Compare commits
8
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ab87ef9b54 | ||
|
|
072d256440 | ||
|
|
e438c12079 | ||
|
|
215d7956a3 | ||
|
|
a2632e89b0 | ||
|
|
bbf0af76c4 | ||
|
|
ed68f7a564 | ||
|
|
049a46ec23 |
No files matched your search
@@ -5,16 +5,58 @@ on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
acceptance-tests-graph:
|
||||
acceptance-tests:
|
||||
name: ${{ matrix.suite }}
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
suite:
|
||||
# graph
|
||||
- apiGraph
|
||||
- apiGraphGroup
|
||||
- apiGraphUser
|
||||
# spaces & dav
|
||||
- apiSpaces
|
||||
- apiSpacesShares
|
||||
- apiSpacesDavOperation
|
||||
- apiDownloads
|
||||
- apiAsyncUpload
|
||||
- apiDepthInfinity
|
||||
- apiArchiver
|
||||
- apiActivities
|
||||
# search
|
||||
- apiSearch1
|
||||
# contract & locks
|
||||
- apiLocks
|
||||
# sharing
|
||||
- apiSharingNgItemInvitation
|
||||
- apiSharingNgPermissions
|
||||
- apiSharingNgShares
|
||||
- apiSharingNgAdditionalShareRole
|
||||
- apiSharingNgDriveInvitation
|
||||
- apiSharingNgItemLinkShare
|
||||
- apiSharingNgDriveLinkShare
|
||||
- apiSharingNgLinkShareManagement
|
||||
|
||||
# search
|
||||
- apiSearchContent # needs Tika
|
||||
# contract & locks
|
||||
- apiContract
|
||||
# auth
|
||||
- apiAuthApp
|
||||
# settings & notifications (needs email)
|
||||
- apiSettings
|
||||
- apiNotification
|
||||
# antivirus (needs ClamAV)
|
||||
- apiAntivirus
|
||||
# federation (needs email + federation ocis)
|
||||
- apiOcm
|
||||
# collaboration (needs WOPI)
|
||||
- apiCollaboration
|
||||
# cli (needs ClamAV + email)
|
||||
- cliCommands
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
@@ -38,3 +80,81 @@ jobs:
|
||||
with:
|
||||
name: test-logs-${{ matrix.suite }}
|
||||
path: tests/acceptance/output/
|
||||
|
||||
core-api-tests:
|
||||
name: ${{ matrix.suite }}
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
suite:
|
||||
- "coreApiAuth,coreApiCapabilities,coreApiFavorites,coreApiMain,coreApiVersions"
|
||||
- "coreApiShareManagementBasicToShares,coreApiShareManagementToShares"
|
||||
- "coreApiSharees,coreApiSharePublicLink2"
|
||||
- "coreApiShareOperationsToShares1,coreApiShareOperationsToShares2,coreApiSharePublicLink1,coreApiShareCreateSpecialToShares1,coreApiShareCreateSpecialToShares2,coreApiShareUpdateToShares"
|
||||
- "coreApiTrashbin,coreApiTrashbinRestore,coreApiWebdavEtagPropagation1,coreApiWebdavEtagPropagation2"
|
||||
- "coreApiWebdavDelete,coreApiWebdavOperations,coreApiWebdavMove2"
|
||||
- "coreApiWebdavProperties"
|
||||
- "coreApiWebdavMove1,coreApiWebdavPreviews,coreApiWebdavUpload,coreApiWebdavUploadTUS"
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
cache: true
|
||||
|
||||
- uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: "8.4"
|
||||
extensions: curl, xml, mbstring, zip
|
||||
tools: composer
|
||||
|
||||
- name: Run ${{ matrix.suite }}
|
||||
run: >
|
||||
BEHAT_SUITES="${{ matrix.suite }}"
|
||||
ACCEPTANCE_TEST_TYPE=core-api
|
||||
EXPECTED_FAILURES_FILE=tests/acceptance/expected-failures-API-on-OCIS-storage.md
|
||||
bash tests/acceptance/run-github.sh
|
||||
|
||||
- name: Upload test logs
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: test-logs-${{ matrix.suite }}
|
||||
path: tests/acceptance/output/
|
||||
|
||||
litmus:
|
||||
name: litmus
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
cache: true
|
||||
- name: Run litmus
|
||||
run: bash tests/acceptance/run-litmus.sh
|
||||
|
||||
cs3-api-tests:
|
||||
name: cs3ApiTests
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
cache: true
|
||||
- name: Run cs3ApiTests
|
||||
run: bash tests/acceptance/run-cs3api.sh
|
||||
|
||||
all-acceptance-tests:
|
||||
needs: [acceptance-tests, core-api-tests, litmus, cs3-api-tests]
|
||||
runs-on: ubuntu-latest
|
||||
if: always()
|
||||
steps:
|
||||
- name: Check all jobs passed
|
||||
run: |
|
||||
if [[ "${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}" == "true" ]]; then
|
||||
exit 1
|
||||
fi
|
||||
@@ -0,0 +1,50 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
REPO_ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
|
||||
OCIS_BIN="$REPO_ROOT/ocis/bin/ocis"
|
||||
WRAPPER_BIN="$REPO_ROOT/tests/ociswrapper/bin/ociswrapper"
|
||||
OCIS_URL="https://localhost:9200"
|
||||
OCIS_CONFIG_DIR="$HOME/.ocis/config"
|
||||
|
||||
# build
|
||||
make -C "$REPO_ROOT/ocis" build
|
||||
GOWORK=off make -C "$REPO_ROOT/tests/ociswrapper" build
|
||||
|
||||
# init + start ocis with gRPC gateway exposed for cs3api-validator
|
||||
"$OCIS_BIN" init --insecure true
|
||||
cp "$REPO_ROOT/tests/config/drone/app-registry.yaml" "$OCIS_CONFIG_DIR/app-registry.yaml"
|
||||
|
||||
OCIS_URL=$OCIS_URL \
|
||||
OCIS_CONFIG_DIR=$OCIS_CONFIG_DIR \
|
||||
STORAGE_USERS_DRIVER=ocis \
|
||||
PROXY_ENABLE_BASIC_AUTH=true \
|
||||
OCIS_EXCLUDE_RUN_SERVICES=idp \
|
||||
OCIS_LOG_LEVEL=error \
|
||||
IDM_CREATE_DEMO_USERS=true \
|
||||
IDM_ADMIN_PASSWORD=admin \
|
||||
OCIS_ASYNC_UPLOADS=true \
|
||||
OCIS_EVENTS_ENABLE_TLS=false \
|
||||
NATS_NATS_HOST=0.0.0.0 \
|
||||
NATS_NATS_PORT=9233 \
|
||||
OCIS_JWT_SECRET=some-ocis-jwt-secret \
|
||||
GATEWAY_GRPC_ADDR=0.0.0.0:9142 \
|
||||
OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD=false \
|
||||
WEB_UI_CONFIG_FILE="$REPO_ROOT/tests/config/drone/ocis-config.json" \
|
||||
"$WRAPPER_BIN" serve \
|
||||
--bin "$OCIS_BIN" \
|
||||
--url "$OCIS_URL" \
|
||||
--admin-username admin \
|
||||
--admin-password admin &
|
||||
WRAPPER_PID=$!
|
||||
trap "kill $WRAPPER_PID 2>/dev/null || true" EXIT
|
||||
|
||||
echo "Waiting for ocis..."
|
||||
timeout 300 bash -c \
|
||||
"while [ \$(curl -sk -uadmin:admin $OCIS_URL/graph/v1.0/users/admin \
|
||||
-w %{http_code} -o /dev/null) != 200 ]; do sleep 1; done"
|
||||
echo "ocis ready."
|
||||
|
||||
docker run --rm --network host \
|
||||
owncloud/cs3api-validator:0.2.1 \
|
||||
/usr/bin/cs3api-validator /var/lib/cs3api-validator --endpoint=localhost:9142
|
||||
@@ -54,11 +54,23 @@ timeout 300 bash -c \
|
||||
echo "ocis ready."
|
||||
|
||||
# run acceptance tests for declared suites
|
||||
echo "Running suites: $BEHAT_SUITES"
|
||||
# ACCEPTANCE_TEST_TYPE: "api" (default) or "core-api"
|
||||
ACCEPTANCE_TEST_TYPE="${ACCEPTANCE_TEST_TYPE:-api}"
|
||||
|
||||
if [ "$ACCEPTANCE_TEST_TYPE" = "core-api" ]; then
|
||||
_FILTER_TAGS="~@skipOnGraph&&~@skipOnOcis-OCIS-Storage"
|
||||
_EXPECTED_FAILURES="${EXPECTED_FAILURES_FILE:-$REPO_ROOT/tests/acceptance/expected-failures-API-on-OCIS-storage.md}"
|
||||
else
|
||||
_FILTER_TAGS="~@skip&&~@skipOnGraph&&~@skipOnOcis-OCIS-Storage"
|
||||
_EXPECTED_FAILURES="${EXPECTED_FAILURES_FILE:-$REPO_ROOT/tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md}"
|
||||
fi
|
||||
|
||||
echo "Running suites: $BEHAT_SUITES (type: $ACCEPTANCE_TEST_TYPE)"
|
||||
TEST_SERVER_URL=$OCIS_URL \
|
||||
OCIS_WRAPPER_URL=http://localhost:5200 \
|
||||
BEHAT_SUITES=$BEHAT_SUITES \
|
||||
BEHAT_FILTER_TAGS="~@skip&&~@skipOnGraph&&~@skipOnOcis-OCIS-Storage" \
|
||||
EXPECTED_FAILURES_FILE="$REPO_ROOT/tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md" \
|
||||
ACCEPTANCE_TEST_TYPE=$ACCEPTANCE_TEST_TYPE \
|
||||
BEHAT_FILTER_TAGS="$_FILTER_TAGS" \
|
||||
EXPECTED_FAILURES_FILE="$_EXPECTED_FAILURES" \
|
||||
STORAGE_DRIVER=ocis \
|
||||
make -C "$REPO_ROOT" test-acceptance-api
|
||||
@@ -0,0 +1,68 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
REPO_ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
|
||||
OCIS_BIN="$REPO_ROOT/ocis/bin/ocis"
|
||||
WRAPPER_BIN="$REPO_ROOT/tests/ociswrapper/bin/ociswrapper"
|
||||
OCIS_URL="https://localhost:9200"
|
||||
OCIS_CONFIG_DIR="$HOME/.ocis/config"
|
||||
|
||||
# build
|
||||
make -C "$REPO_ROOT/ocis" build
|
||||
GOWORK=off make -C "$REPO_ROOT/tests/ociswrapper" build
|
||||
|
||||
# init + start ocis
|
||||
"$OCIS_BIN" init --insecure true
|
||||
cp "$REPO_ROOT/tests/config/drone/app-registry.yaml" "$OCIS_CONFIG_DIR/app-registry.yaml"
|
||||
|
||||
OCIS_URL=$OCIS_URL \
|
||||
OCIS_CONFIG_DIR=$OCIS_CONFIG_DIR \
|
||||
STORAGE_USERS_DRIVER=ocis \
|
||||
PROXY_ENABLE_BASIC_AUTH=true \
|
||||
OCIS_EXCLUDE_RUN_SERVICES=idp \
|
||||
OCIS_LOG_LEVEL=error \
|
||||
IDM_CREATE_DEMO_USERS=true \
|
||||
IDM_ADMIN_PASSWORD=admin \
|
||||
OCIS_ASYNC_UPLOADS=true \
|
||||
OCIS_EVENTS_ENABLE_TLS=false \
|
||||
NATS_NATS_HOST=0.0.0.0 \
|
||||
NATS_NATS_PORT=9233 \
|
||||
OCIS_JWT_SECRET=some-ocis-jwt-secret \
|
||||
WEB_UI_CONFIG_FILE="$REPO_ROOT/tests/config/drone/ocis-config.json" \
|
||||
"$WRAPPER_BIN" serve \
|
||||
--bin "$OCIS_BIN" \
|
||||
--url "$OCIS_URL" \
|
||||
--admin-username admin \
|
||||
--admin-password admin &
|
||||
WRAPPER_PID=$!
|
||||
trap "kill $WRAPPER_PID 2>/dev/null || true" EXIT
|
||||
|
||||
echo "Waiting for ocis..."
|
||||
timeout 300 bash -c \
|
||||
"while [ \$(curl -sk -uadmin:admin $OCIS_URL/graph/v1.0/users/admin \
|
||||
-w %{http_code} -o /dev/null) != 200 ]; do sleep 1; done"
|
||||
echo "ocis ready."
|
||||
|
||||
# setup: creates test folder, share, and exports SPACE_ID + PUBLIC_TOKEN to .env
|
||||
TEST_SERVER_URL=$OCIS_URL bash "$REPO_ROOT/tests/config/drone/setup-for-litmus.sh"
|
||||
source .env
|
||||
|
||||
# run litmus against each WebDAV endpoint
|
||||
ENDPOINTS=(
|
||||
"$OCIS_URL/remote.php/webdav"
|
||||
"$OCIS_URL/remote.php/dav/files/admin"
|
||||
"$OCIS_URL/remote.php/dav/files/admin/Shares/new_folder/"
|
||||
"$OCIS_URL/remote.php/webdav/Shares/new_folder/"
|
||||
"$OCIS_URL/remote.php/dav/spaces/$SPACE_ID"
|
||||
)
|
||||
|
||||
for ENDPOINT in "${ENDPOINTS[@]}"; do
|
||||
echo "Testing endpoint: $ENDPOINT"
|
||||
docker run --rm --network host \
|
||||
-e LITMUS_URL="$ENDPOINT" \
|
||||
-e LITMUS_USERNAME=admin \
|
||||
-e LITMUS_PASSWORD=admin \
|
||||
-e TESTS="basic copymove props http" \
|
||||
owncloudci/litmus:latest \
|
||||
/usr/local/bin/litmus-wrapper
|
||||
done
|
||||
Reference in new issue
Block a user