Skip to content

Commit 3159ef5

Browse files
authored
Merge pull request #11904 from owncloud/test/docs-for-coreapi8-test-suites-in-k8s
[docs-only] docs: add docs for running coreapi8 test suites in k8s
2 parents 3ab9ee3 + ad59b0b commit 3159ef5

File tree

1 file changed

+39
-3
lines changed

1 file changed

+39
-3
lines changed

docs/ocis/development/testing.md

Lines changed: 39 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -679,9 +679,6 @@ Also, clone the [ocis-charts](https://github.com/owncloud/ocis-charts/) reposito
679679
```bash
680680
cp -r config/drone/k8s/clamav charts/ocis/templates/
681681

682-
sed -i 's/{{ *\.Values\.features\.virusscan\.infectedFileHandling *| *quote *}}/"delete"/' \
683-
ocis/templates/antivirus/deployment.yaml
684-
685682
sed -i 's/{{ *\.Values\.features\.virusscan\.infectedFileHandling *| *quote *}}/"delete"/' \
686683
ocis/templates/antivirus/deployment.yaml
687684

@@ -710,6 +707,45 @@ Also, clone the [ocis-charts](https://github.com/owncloud/ocis-charts/) reposito
710707
cp -r <path-to-ocis-repo>/tests/config/drone/k8s/tika charts/ocis/templates/
711708
```
712709

710+
### Running Core API Test Suites from Pipeline "8"
711+
712+
For running specific core API suites (`coreApiWebdavMove1`, `coreApiWebdavPreviews`, `coreApiWebdavUpload`, `coreApiWebdavUploadTUS`) on k8s:
713+
714+
1. **Additional Configs** (after step 1 above):
715+
```bash
716+
# Create fonts configmaps
717+
echo '{"defaultFont": "/etc/ocis/fonts/NotoSans.ttf"}' > fontsMap.json
718+
kubectl create configmap -n ocis sharing-banned-passwords \
719+
--from-file=banned-password-list.txt=<path-to-ocis-repo>/tests/config/drone/banned-password-list.txt
720+
kubectl create configmap -n ocis ocis-fonts-map --from-file=./fontsMap.json
721+
722+
# Patch sharing for banned passwords
723+
sed -i 's|/etc/ocis/sharing-banned-passwords.txt|/etc/ocis/config/drone/banned-password-list.txt|' ./charts/ocis/templates/sharing/deployment.yaml
724+
sed -i 's|- name: configs|- name: banned-passwords|' ./charts/ocis/templates/sharing/deployment.yaml
725+
sed -i 's|mountPath: /etc/ocis$|mountPath: /etc/ocis/config/drone|' ./charts/ocis/templates/sharing/deployment.yaml
726+
sed -i 's|name: sharing-banned-passwords-{{ .appName }}|name: sharing-banned-passwords|' ./charts/ocis/templates/sharing/deployment.yaml
727+
728+
kubectl create configmap -n ocis sharing-banned-passwords \
729+
--from-file=banned-password-list.txt=<path-to-ocis-repo>/tests/config/drone/banned-password-list.txt
730+
```
731+
732+
2. **Install and Setup** (after step 2 above):
733+
```bash
734+
make helm-install-atomic
735+
```
736+
737+
3. **Run Tests**:
738+
```bash
739+
cd <path-to-ocis-repo>
740+
K8S=true \
741+
TEST_OCIS=true \
742+
TEST_WITH_GRAPH_API=true \
743+
TEST_SERVER_URL="https://ocis-server" \
744+
OCIS_WRAPPER_URL="http://localhost:5200" \
745+
make test-acceptance-api \
746+
BEHAT_FEATURE=tests/acceptance/features/coreApiWebdavMove1/moveFolder.feature
747+
```
748+
713749
## Generating Code Coverage Report by Running Acceptance Tests
714750

715751
To find out what oCIS code is covered by the API tests, first create a debug build of oCIS.

0 commit comments

Comments
 (0)