test(docs): add docs for running coreapi8 test suites in k8s

This commit is contained in:
pradip
2026-01-13 17:15:33 +05:45
committed by Martin
parent 3ab9ee3594
commit 31548bfc10

View File

@@ -710,6 +710,49 @@ Also, clone the [ocis-charts](https://github.com/owncloud/ocis-charts/) reposito
cp -r <path-to-ocis-repo>/tests/config/drone/k8s/tika charts/ocis/templates/
```
### Running Core API Test Suites from Pipeline "8"
For running specific core API suites (`coreApiWebdavMove1`, `coreApiWebdavPreviews`, `coreApiWebdavUpload`, `coreApiWebdavUploadTUS`) on k8s:
1. **Additional Configs** (after step 1 above):
```bash
# Create fonts configmaps
echo '{"defaultFont": "/etc/ocis/fonts/NotoSans.ttf"}' > fontsMap.json
kubectl create configmap -n ocis ocis-fonts-ttf --from-file=<path-to-ocis-repo>/tests/config/drone/NotoSans.ttf
kubectl create configmap -n ocis ocis-fonts-map --from-file=./fontsMap.json
# Patch sharing for banned passwords
sed -i 's|/etc/ocis/sharing-banned-passwords.txt|/etc/ocis/config/drone/banned-password-list.txt|' ./charts/ocis/templates/sharing/deployment.yaml
sed -i 's|- name: configs|- name: banned-passwords|' ./charts/ocis/templates/sharing/deployment.yaml
sed -i 's|mountPath: /etc/ocis$|mountPath: /etc/ocis/config/drone|' ./charts/ocis/templates/sharing/deployment.yaml
sed -i 's|name: sharing-banned-passwords-{{ .appName }}|name: sharing-banned-passwords|' ./charts/ocis/templates/sharing/deployment.yaml
kubectl create configmap -n ocis sharing-banned-passwords --from-file=banned-password-list.txt=<path-to-ocis-repo>/tests/config/drone/banned-password-list.txt
# Deploy FakeOffice
kubectl apply -f fakeoffice-deployment.yaml
kubectl -n ocis rollout restart deployment/fakeoffice
```
2. **Install and Setup** (after step 2):
```bash
make helm-install-atomic
kubectl -n ocis wait --for=condition=ready pod -l app=collaboration-onlyoffice --timeout=300s
# Port forwards
kubectl -n ocis port-forward deploy/collaboration-fakeoffice 9300:9300 --address=127.0.0.1 &
kubectl -n ocis port-forward deploy/collaboration-collabora 9302:9300 --address=127.0.0.1 &
kubectl -n ocis port-forward deploy/collaboration-onlyoffice 9305:9300 --address=127.0.0.1 &
COLLAB_POD=$(kubectl -n ocis get pod -l app=collaboration-onlyoffice -o jsonpath='{.items[0].metadata.name}')
kubectl -n ocis port-forward pod/$COLLAB_POD 9304:9304 --address=127.0.0.1 &
```
3. **Run Tests**:
```bash
cd <path-to-ocis-repo>
K8S=true TEST_SERVER_URL="https://ocis-server" STORAGE_DRIVER="ocis" BEHAT_FILTER_TAGS="~@skipOnGraph&&~@skipOnOcis-OCIS-Storage" BEHAT_SUITES="coreApiWebdavMove1,coreApiWebdavPreviews,coreApiWebdavUpload,coreApiWebdavUploadTUS" ACCEPTANCE_TEST_TYPE="core-api" EXPECTED_FAILURES_FILE="tests/acceptance/expected-failures-API-on-OCIS-storage.md" UPLOAD_DELETE_WAIT_TIME="0" OCIS_WRAPPER_URL="http://ociswrapper:5200" WITH_REMOTE_PHP="false" make test-acceptance-api
```
## Generating Code Coverage Report by Running Acceptance Tests
To find out what oCIS code is covered by the API tests, first create a debug build of oCIS.