mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-06 04:09:40 -06:00
run all tests
This commit is contained in:
@@ -274,3 +274,20 @@ clean-files:
|
||||
|
||||
.PHONY: clean
|
||||
clean: clean-docker-container clean-docker-volumes clean-dev-docker-image clean-files ## clean all
|
||||
|
||||
.PHONY: start-server
|
||||
start-server: ## build and start server
|
||||
@echo "Build and start server..."
|
||||
COMPOSE_FILE=src/opencloud-base.yml:src/tika.yml:src/email.yml \
|
||||
COMPOSE_PROJECT_NAME=opencloud \
|
||||
SEARCH_EXTRACTOR_TYPE=tika \
|
||||
OC_IMAGE_TAG=dev \
|
||||
WITH_WRAPPER=true \
|
||||
TEST_SOURCE=opencloud \
|
||||
STORAGE_DRIVER=ocis \
|
||||
OC_ASYNC_UPLOADS=true \
|
||||
START_TIKA=true \
|
||||
SEARCH_EXTRACTOR_TYPE=tika \
|
||||
START_EMAIL=true \
|
||||
OC_ADD_RUN_SERVICES=notifications \
|
||||
docker compose up -d --build --force-recreate
|
||||
|
||||
@@ -6,3 +6,5 @@ services:
|
||||
command: email:9000
|
||||
email:
|
||||
image: inbucket/inbucket
|
||||
ports:
|
||||
- '9000:9000'
|
||||
|
||||
@@ -23,6 +23,8 @@ services:
|
||||
FRONTEND_SEARCH_MIN_LENGTH: "2"
|
||||
OC_ASYNC_UPLOADS: $OC_ASYNC_UPLOADS
|
||||
OC_ADD_RUN_SERVICES: $OC_ADD_RUN_SERVICES
|
||||
PROXY_HTTP_ADDR: "0.0.0.0:9200"
|
||||
OC_JWT_SECRET: "some-ocis-jwt-secret"
|
||||
|
||||
# s3ng specific settings
|
||||
STORAGE_USERS_S3NG_ENDPOINT: http://ceph:8080
|
||||
@@ -34,7 +36,8 @@ services:
|
||||
NOTIFICATIONS_SMTP_HOST: email
|
||||
NOTIFICATIONS_SMTP_PORT: 2500
|
||||
NOTIFICATIONS_SMTP_INSECURE: "true"
|
||||
NOTIFICATIONS_SMTP_SENDER: "opencloud <noreply@example.com>"
|
||||
NOTIFICATIONS_SMTP_SENDER: "OpenCloud <noreply@example.com>"
|
||||
NOTIFICATIONS_DEBUG_ADDR: 0.0.0.0:9174
|
||||
|
||||
# antivirus
|
||||
ANTIVIRUS_SCANNER_TYPE: "clamav"
|
||||
@@ -50,6 +53,10 @@ services:
|
||||
|
||||
# fonts map for txt thumbnails (including unicode support)
|
||||
THUMBNAILS_TXT_FONTMAP_FILE: "/drone/src/tests/config/drone/fontsMap.json"
|
||||
ports:
|
||||
- '9200:9200'
|
||||
- '5200:5200' ## ocwrapper
|
||||
- '9174:9174' ## notifications debug
|
||||
volumes:
|
||||
- ../../../config:/drone/src/tests/config
|
||||
- ../../../ocwrapper/bin/ocwrapper:/usr/bin/ocwrapper
|
||||
|
||||
@@ -34,8 +34,8 @@ Feature: propfind extracted props
|
||||
Then the HTTP status code should be "207"
|
||||
And as user "Alice" the REPORT response should contain a resource "testavatar.jpg" with these key and value pairs:
|
||||
| key | value |
|
||||
| oc:image/oc:width | 640 |
|
||||
| oc:image/oc:height | 480 |
|
||||
| oc:image/oc:width | 1402 |
|
||||
| oc:image/oc:height | 500 |
|
||||
| oc:location/oc:latitude | 43.467157 |
|
||||
| oc:location/oc:longitude | 11.885395 |
|
||||
| oc:photo/oc:camera-make | NIKON |
|
||||
@@ -67,8 +67,8 @@ Feature: propfind extracted props
|
||||
Then the HTTP status code should be "207"
|
||||
And as user "Alice" the REPORT response should contain a resource "testavatar.jpg" with these key and value pairs:
|
||||
| key | value |
|
||||
| oc:image/oc:width | 640 |
|
||||
| oc:image/oc:height | 480 |
|
||||
| oc:image/oc:width | 1402 |
|
||||
| oc:image/oc:height | 500 |
|
||||
| oc:location/oc:latitude | 43.467157 |
|
||||
| oc:location/oc:longitude | 11.885395 |
|
||||
| oc:photo/oc:camera-make | NIKON |
|
||||
@@ -117,8 +117,8 @@ Feature: propfind extracted props
|
||||
Then the HTTP status code should be "207"
|
||||
And as user "Brian" the REPORT response should contain a resource "testavatar.jpg" with these key and value pairs:
|
||||
| key | value |
|
||||
| oc:image/oc:width | 640 |
|
||||
| oc:image/oc:height | 480 |
|
||||
| oc:image/oc:width | 1402 |
|
||||
| oc:image/oc:height | 500 |
|
||||
| oc:location/oc:latitude | 43.467157 |
|
||||
| oc:location/oc:longitude | 11.885395 |
|
||||
| oc:photo/oc:camera-make | NIKON |
|
||||
@@ -194,10 +194,10 @@ Feature: propfind extracted props
|
||||
"required": [ "height", "width" ],
|
||||
"properties": {
|
||||
"height": {
|
||||
"const": 480
|
||||
"const": 500
|
||||
},
|
||||
"width": {
|
||||
"const": 640
|
||||
"const": 1402
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -328,10 +328,10 @@ Feature: propfind extracted props
|
||||
"required": [ "height", "width" ],
|
||||
"properties": {
|
||||
"height": {
|
||||
"const": 480
|
||||
"const": 1402
|
||||
},
|
||||
"width": {
|
||||
"const": 640
|
||||
"const": 500
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -474,10 +474,10 @@ Feature: propfind extracted props
|
||||
"required": [ "height", "width" ],
|
||||
"properties": {
|
||||
"height": {
|
||||
"const": 480
|
||||
"const": 1402
|
||||
},
|
||||
"width": {
|
||||
"const": 640
|
||||
"const": 500
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
# LOCAL TEST WITHOUT EXTRA ENVS
|
||||
TEST_SERVER_URL="https://localhost:9200"
|
||||
TEST_SERVER_URL="https://opencloud-server:9200"
|
||||
OC_WRAPPER_URL="http://opencloud-server:5200"
|
||||
EXPECTED_FAILURES_FILE="tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md"
|
||||
EXPECTED_FAILURES_FILE_FROM_CORE="tests/acceptance/expected-failures-API-on-OCIS-storage.md"
|
||||
|
||||
@@ -32,6 +33,8 @@ SUITES=(
|
||||
"apiSharingNgLinkSharePermission"
|
||||
"apiSharingNgLinkShareRoot"
|
||||
"apiAccountsHashDifficulty"
|
||||
"apiSearchContent"
|
||||
"apiNotification"
|
||||
)
|
||||
|
||||
# List of suites from core
|
||||
@@ -65,6 +68,27 @@ CORE_SUITES=(
|
||||
"coreApiWebdavUploadTUS"
|
||||
)
|
||||
|
||||
EXTRA_SUITE=(
|
||||
"apiAntivirus"
|
||||
"apiOcm"
|
||||
"apiCollaboration"
|
||||
"apiAuthApp"
|
||||
"cliCommands"
|
||||
)
|
||||
|
||||
E2E_SUITES=(
|
||||
"admin-settings"
|
||||
"file-action"
|
||||
"journeys"
|
||||
"navigation"
|
||||
"search"
|
||||
"shares"
|
||||
"spaces"
|
||||
"user-settings"
|
||||
)
|
||||
|
||||
EXTRA_E2E_SUITE="app-providerapp-store,keycloak,ocm,oidc"
|
||||
|
||||
# Create log directory
|
||||
LOG_DIR="./suite-logs"
|
||||
mkdir -p "$LOG_DIR"
|
||||
@@ -80,7 +104,7 @@ for SUITE in "${SUITES[@]}"; do
|
||||
LOG_FILE="$LOG_DIR/${SUITE}.log"
|
||||
|
||||
# Run suite
|
||||
make test-acceptance-api TEST_SERVER_URL=$TEST_SERVER_URL EXPECTED_FAILURES_FILE=$EXPECTED_FAILURES_FILE BEHAT_SUITE=$SUITE > "$LOG_FILE" 2>&1
|
||||
make test-acceptance-api TEST_SERVER_URL=$TEST_SERVER_URL OC_WRAPPER_URL=$OC_WRAPPER_URL EXPECTED_FAILURES_FILE=$EXPECTED_FAILURES_FILE BEHAT_SUITE=$SUITE > "$LOG_FILE" 2>&1
|
||||
|
||||
# Check if suite was successful
|
||||
if [ $? -eq 0 ]; then
|
||||
@@ -112,6 +136,30 @@ for SUITE in "${CORE_SUITES[@]}"; do
|
||||
fi
|
||||
done
|
||||
|
||||
# Run e2e suites
|
||||
for SUITE in "${E2E_SUITES[@]}"; do
|
||||
echo "=============================================="
|
||||
echo "Running e2e suite: $SUITE"
|
||||
echo "=============================================="
|
||||
|
||||
LOG_FILE="$LOG_DIR/${SUITE}.log"
|
||||
|
||||
# Run suite
|
||||
(
|
||||
cd services/web/_web/tests/e2e || exit 1
|
||||
BASE_URL_OPEN_CLOUD=$TEST_SERVER_URL RETRY=1 HEADLESS=true ./run-e2e.sh --suites $SUITE > "../../../../../$LOG_FILE" 2>&1
|
||||
)
|
||||
|
||||
# Check if suite was successful
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "✅ Suite $SUITE completed successfully."
|
||||
((SUCCESS_COUNT++))
|
||||
else
|
||||
echo "❌ Suite $SUITE failed. Check log: $LOG_FILE"
|
||||
((FAILURE_COUNT++))
|
||||
fi
|
||||
done
|
||||
|
||||
# Report summary
|
||||
echo "=============================================="
|
||||
echo "Test Summary:"
|
||||
|
||||
Reference in New Issue
Block a user