github.com/cs3org/reva/v2@v2.27.7/tests/acceptance/README.md (about) 1 ## Acceptance Tests (ownCloud Legacy) 2 3 This will require some PHP-related tools to run, for instance on Ubuntu you will need `apt install -y php-xml php-curl composer`. 4 5 1. [Build reva](https://github.com/cs3org/reva/tree/edge?tab=readme-ov-file#build) 6 7 2. Start the reva server (with ocis storage driver) 8 9 ```bash 10 make reva 11 ``` 12 13 > **INFO:** 14 > 15 > You can run reva with other storage drivers. 16 > 17 > To run reva with `posix` storage driver: 18 > 19 > ```bash 20 > make reva-posix 21 > ``` 22 > 23 > To run reva with `s3ng` storage driver: 24 > 25 > ```bash 26 > make reva-s3ng 27 > ``` 28 29 3. Get ownCloud Infinite Scale `OCIS` 30 31 ```bash 32 git clone https://github.com/owncloud/ocis.git ./testrunner 33 ``` 34 35 4. To run the correct version of the testsuite check out the commit id from the `.drone.env` file 36 37 ```bash 38 cd testrunner 39 git checkout <commit-id> 40 ``` 41 42 5. Run the tests 43 44 ```bash 45 TEST_SERVER_URL='http://localhost:20080' \ 46 TEST_REVA='true' \ 47 TEST_WITH_LDAP='true' \ 48 OCIS_REVA_DATA_ROOT='/tmp/reva/' \ 49 DELETE_USER_DATA_CMD="rm -rf /tmp/reva/data/nodes/root/* /tmp/reva/data/nodes/*-*-*-* /tmp/reva/data/blobs/*" \ 50 REVA_LDAP_HOSTNAME='localhost' \ 51 BEHAT_FILTER_TAGS='~@skip&&~@skipOnReva&&~@env-config' \ 52 EXPECTED_FAILURES_FILE=<path-to-reva>/tests/acceptance/expected-failures-on-OCIS-storage.md \ 53 DIVIDE_INTO_NUM_PARTS=1 \ 54 RUN_PART=1 \ 55 ACCEPTANCE_TEST_TYPE=core-api \ 56 make test-acceptance-api 57 ``` 58 59 This will run all tests that are relevant to reva. 60 61 To run a single test add `BEHAT_FEATURE=<feature file>` and specify the path to the feature file and an optional line number. 62 For example: 63 64 ```bash 65 ... 66 BEHAT_FEATURE='tests/acceptance/features/coreApiWebdavUpload/uploadFile.feature:20' \ 67 make test-acceptance-api 68 ``` 69 70 **NOTE:** 71 Make sure to double check the paths if you are changing the `OCIS_REVA_DATA_ROOT`. The `DELETE_USER_DATA_CMD` needs to clean up the correct folders. 72 73 > **INFO:** 74 > 75 > Use these proper environment variables to run tests with different storage drivers: 76 > 77 > 1. Run tests with `s3ng` storage driver: 78 > 79 > ```bash 80 > ... 81 > DELETE_USER_DATA_CMD="rm -rf /tmp/reva/data/spaces/* /tmp/reva/data/blobs/* /tmp/reva/data/indexes/by-type/*" \ 82 > EXPECTED_FAILURES_FILE=<path-to-reva>/tests/acceptance/expected-failures-on-S3NG-storage.md \ 83 > make test-acceptance-api 84 > ``` 85 > 86 > 2. Run tests with `posix` storage driver: 87 > 88 > ```bash 89 > ... 90 > DELETE_USER_DATA_CMD="bash -cx 'rm -rf /tmp/reva/data/users/* /tmp/reva/data/indexes/by-type/*'" \ 91 > EXPECTED_FAILURES_FILE=<path-to-reva>/tests/acceptance/expected-failures-on-POSIX-storage.md \ 92 > make test-acceptance-api 93 > ``` 94 95 6. Cleanup the setup 96 97 ```bash 98 make clean 99 ```