Compare commits

...
Author SHA1 Message Date
Deyan Zhekov 4c7b07ffb7 feat: [OCISDEV-744] fix failing test for apiSearchContent 2026-03-26 17:26:15 +02:00
Deyan Zhekov 96c10714ab feat: [OCISDEV-744] fix the invalid workflow file 2026-03-26 16:23:39 +02:00
Deyan Zhekov aef4f67a44 Merge branch 'master' into feat/ocisdev-741 2026-03-26 16:15:00 +02:00
Deyan Zhekov c3f16f5850 feat: [OCISDEV-744] fix a typo 2026-03-26 16:12:39 +02:00
Deyan Zhekov 00b4021320 feat: [OCISDEV-744] fix (again) apiSearchContent tests 2026-03-26 16:06:04 +02:00
Thomas Müller c49316b424 ci: [ocisdev-730] code quality 2026-03-26 14:57:42 +01:00
Deyan Zhekov 8178dd1a62 feat: [OCISDEV-744] fix apiSearchContent acceptance tests
# Conflicts:
#	.github/workflows/acceptance-tests.yml
#	tests/acceptance/run-github.sh
2026-03-26 14:37:34 +01:00
Michal Klos feff4c7285 feat: [OCISDEV-741] local-api-test, apiSettings 2026-03-26 14:37:08 +01:00
Michal Klos ae1ceb5e0c feat: [OCISDEV-741] acceptance test, coverage P1 2026-03-26 14:37:08 +01:00
Michal Klos 2a88685a53 feat: [OCISDEV-741] acceptance test, coverage P1 2026-03-26 14:36:49 +01:00
Michal Klos 825838898d feat: [OCISDEV-743] build and unit test 2026-03-26 13:56:07 +01:00
Thomas Müller 524cd79841 ci: add ecosystem github-actions to dependabot 2026-03-26 13:00:28 +01:00
Michal Klos a7a5ed8a91 feat: [OCISDEV-740] acceptance test, coverage P0 2026-03-26 09:34:06 +01:00
Michal Klos b620b5453a feat: [OCISDEV-732] acceptance test (#12143)
* feat: acceptance test - graph

* feat: acceptance test - graph

* feat: acceptance test - graph

* fix: remove drone

* feat: run each behat suite as a separate worker

* feat: rename
2026-03-25 14:20:04 +01:00
3 changed files with 282 additions and 4 deletions

No files matched your search

+2 -4
View File
@@ -55,8 +55,7 @@ branches:
require_code_owner_reviews: false
required_status_checks:
strict: false
contexts:
- continuous-integration/drone/pr
contexts: []
enforce_admins: null
restrictions:
apps: []
@@ -74,8 +73,7 @@ branches:
require_code_owner_reviews: false
required_status_checks:
strict: false
contexts:
- continuous-integration/drone/pr
contexts: []
enforce_admins: null
restrictions:
apps: []
+200
View File
@@ -0,0 +1,200 @@
name: Acceptance Tests
on:
pull_request:
workflow_dispatch:
jobs:
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
- apiSearch2
# contract & locks
- apiContract
- apiLocks
# sharing
- apiSharingNgItemInvitation
- apiSharingNgPermissions
- apiSharingNgShares
- apiSharingNgAdditionalShareRole
- apiSharingNgDriveInvitation
- apiSharingNgItemLinkShare
- apiSharingNgDriveLinkShare
- apiSharingNgLinkShareManagement
# auth
- apiAuthApp
# settings & notifications (needs email)
- apiSettings
- apiNotification
# antivirus (needs ClamAV)
- apiAntivirus
# federation (needs email + federation ocis)
- apiOcm
# collaboration (needs WOPI)
- apiCollaboration
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 }} 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/
local-api-tests-tika:
name: apiSearchContent
runs-on: ubuntu-latest
services:
tika:
image: apache/tika:3.2.2.0-full
ports:
- 9998:9998
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: Wait for Tika
run: |
timeout 120 bash -c \
"until curl -sf http://localhost:9998/tika; do sleep 2; done"
echo "Tika ready."
- name: Run apiSearchContent
run: |
BEHAT_SUITES=apiSearchContent \
SEARCH_EXTRACTOR_TYPE=tika \
SEARCH_EXTRACTOR_TIKA_TIKA_URL=http://localhost:9998 \
SEARCH_EXTRACTOR_CS3SOURCE_INSECURE=true \
FRONTEND_FULL_TEXT_SEARCH_ENABLED=true \
bash tests/acceptance/run-github.sh
- name: Upload test logs
if: failure()
uses: actions/upload-artifact@v4
with:
name: test-logs-apiSearchContent
path: tests/acceptance/output/
cli-tests:
name: ${{ matrix.suite }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
suite:
- cliCommands # needs ClamAV + email
- apiServiceAvailability
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 }} 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/
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
all-acceptance-tests:
needs: [acceptance-tests, local-api-tests-tika, cli-tests, core-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
+80
View File
@@ -0,0 +1,80 @@
#!/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"
# suite(s) to run — set via env or passed from CI matrix
: "${BEHAT_SUITES:?BEHAT_SUITES is required, e.g. BEHAT_SUITES=apiGraph bash run-graph.sh}"
# build
make -C "$REPO_ROOT/ocis" build
GOWORK=off make -C "$REPO_ROOT/tests/ociswrapper" build
# php deps
cd "$REPO_ROOT"
composer install --no-progress
composer bin behat install --no-progress
# init ocis config
"$OCIS_BIN" init --insecure true
cp "$REPO_ROOT/tests/config/drone/app-registry.yaml" "$OCIS_CONFIG_DIR/app-registry.yaml"
# start ociswrapper in background, kill on exit
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" \
SEARCH_EXTRACTOR_TYPE="${SEARCH_EXTRACTOR_TYPE:-basic}" \
SEARCH_EXTRACTOR_TIKA_TIKA_URL="${SEARCH_EXTRACTOR_TIKA_TIKA_URL:-}" \
SEARCH_EXTRACTOR_CS3SOURCE_INSECURE="${SEARCH_EXTRACTOR_CS3SOURCE_INSECURE:-false}" \
FRONTEND_FULL_TEXT_SEARCH_ENABLED="${FRONTEND_FULL_TEXT_SEARCH_ENABLED:-false}" \
"$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
# wait for ocis graph API to be ready
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."
# run acceptance tests for declared 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 \
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