[tests-only] [full-ci] api test for email notification (#6145)

This commit is contained in:
Prajwol Amatya
2023-05-10 14:03:52 +05:45
committed by GitHub
parent 33034e86e5
commit 1f8164c527
6 changed files with 413 additions and 1 deletions
+37
View File
@@ -260,3 +260,40 @@ make test-paralleldeployment-api \
... \
BEHAT_FEATURE="tests/parallelDeployAcceptance/features/apiShareManagement/acceptShares.feature"
```
## Running test suite with email service (inbucket)
### Setup inbucket
Run the following command to setup inbucket
```bash
docker run -d --name inbucket -p 9000:9000 -p 2500:2500 -p 1100:1100 inbucket/inbucket
```
### Run oCIS with following environment variables
Documentation for environment variables is available [here](https://owncloud.dev/services/notifications/#environment-variables)
```bash
OCIS_INSECURE=true \
PROXY_ENABLE_BASIC_AUTH=true \
NOTIFICATIONS_SMTP_HOST=localhost \
NOTIFICATIONS_SMTP_INSECURE=true \
NOTIFICATIONS_SMTP_PORT=2500 \
OCIS_URL=https://localhost:9200 \
<path_to_ocis>/ocis/bin/ocis server
```
### Run the acceptance test
Run the acceptance test with the following command:
```bash
make test-acceptance-api \
TEST_SERVER_URL="https://localhost:9200" \
TEST_OCIS=true \
TEST_WITH_GRAPH_API=true \
EMAIL_HOST="localhost" \
EMAIL_PORT=9000 \
BEHAT_FEATURE="tests/acceptance/features/apiEmailNotification/emailNotification.feature"
```