Merge pull request #945 from owncloud/tests-at-top-level
[tests-only] move ocis/tests/acceptance up to tests/acceptance
This commit is contained in:
+6
-6
@@ -408,7 +408,7 @@ def localApiTests(ctx, coreBranch = 'master', coreCommit = '', storage = 'ownclo
|
||||
'PATH_TO_CORE': '/srv/app/testrunner',
|
||||
},
|
||||
'commands': [
|
||||
'make -C ocis test-acceptance-api',
|
||||
'make test-acceptance-api',
|
||||
],
|
||||
'volumes': [{
|
||||
'name': 'gopath',
|
||||
@@ -461,7 +461,7 @@ def coreApiTests(ctx, coreBranch = 'master', coreCommit = '', part_number = 1, n
|
||||
'BEHAT_FILTER_TAGS': '~@notToImplementOnOCIS&&~@toImplementOnOCIS&&~comments-app-required&&~@federation-app-required&&~@notifications-app-required&&~systemtags-app-required&&~@local_storage&&~@skipOnOcis-%s-Storage' % ('OC' if storage == 'owncloud' else 'OCIS'),
|
||||
'DIVIDE_INTO_NUM_PARTS': number_of_parts,
|
||||
'RUN_PART': part_number,
|
||||
'EXPECTED_FAILURES_FILE': '/drone/src/ocis/tests/acceptance/expected-failures-on-%s-storage.txt' % (storage.upper()),
|
||||
'EXPECTED_FAILURES_FILE': '/drone/src/tests/acceptance/expected-failures-on-%s-storage.txt' % (storage.upper()),
|
||||
},
|
||||
'commands': [
|
||||
'make -C /srv/app/testrunner test-acceptance-api',
|
||||
@@ -525,7 +525,7 @@ def uiTestPipeline(suiteName, phoenixBranch = 'master', phoenixCommit = '', stor
|
||||
'RUN_ON_OCIS': 'true',
|
||||
'OCIS_REVA_DATA_ROOT': '/srv/app/tmp/ocis/owncloud/data',
|
||||
'OCIS_SKELETON_DIR': '/srv/app/testing/data/webUISkeleton',
|
||||
'PHOENIX_CONFIG': '/drone/src/ocis/tests/config/drone/ocis-config.json',
|
||||
'PHOENIX_CONFIG': '/drone/src/tests/config/drone/ocis-config.json',
|
||||
'TEST_TAGS': 'not @skipOnOCIS and not @skip',
|
||||
'LOCAL_UPLOAD_DIR': '/uploads',
|
||||
'NODE_TLS_REJECT_UNAUTHORIZED': 0,
|
||||
@@ -597,7 +597,7 @@ def accountsUITests(ctx, phoenixBranch, phoenixCommit, storage = 'owncloud', acc
|
||||
'RUN_ON_OCIS': 'true',
|
||||
'OCIS_REVA_DATA_ROOT': '/srv/app/tmp/ocis/owncloud/data',
|
||||
'OCIS_SKELETON_DIR': '/srv/app/testing/data/webUISkeleton',
|
||||
'PHOENIX_CONFIG': '/drone/src/ocis/tests/config/drone/ocis-config.json',
|
||||
'PHOENIX_CONFIG': '/drone/src/tests/config/drone/ocis-config.json',
|
||||
'TEST_TAGS': 'not @skipOnOCIS and not @skip',
|
||||
'LOCAL_UPLOAD_DIR': '/uploads',
|
||||
'NODE_TLS_REJECT_UNAUTHORIZED': 0,
|
||||
@@ -1447,8 +1447,8 @@ def ocisServer(storage, accounts_hash_difficulty = 4):
|
||||
'STORAGE_FRONTEND_PUBLIC_URL': 'https://ocis-server:9200',
|
||||
'STORAGE_SHARING_USER_JSON_FILE': '/srv/app/tmp/ocis/shares.json',
|
||||
'PROXY_ENABLE_BASIC_AUTH': True,
|
||||
'PHOENIX_WEB_CONFIG': '/drone/src/ocis/tests/config/drone/ocis-config.json',
|
||||
'KONNECTD_IDENTIFIER_REGISTRATION_CONF': '/drone/src/ocis/tests/config/drone/identifier-registration.yml',
|
||||
'PHOENIX_WEB_CONFIG': '/drone/src/tests/config/drone/ocis-config.json',
|
||||
'KONNECTD_IDENTIFIER_REGISTRATION_CONF': '/drone/src/tests/config/drone/identifier-registration.yml',
|
||||
'KONNECTD_ISS': 'https://ocis-server:9200',
|
||||
'KONNECTD_TLS': 'true',
|
||||
}
|
||||
|
||||
+7
-1
@@ -14,4 +14,10 @@ node_modules/
|
||||
*/yarn-error.log
|
||||
|
||||
# Konnectd
|
||||
konnectd/assets/identifier
|
||||
konnectd/assets/identifier
|
||||
|
||||
# Composer - used for API acceptance tests
|
||||
composer.lock
|
||||
vendor
|
||||
vendor-bin/**/vendor
|
||||
vendor-bin/**/composer.lock
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
SHELL := bash
|
||||
|
||||
.PHONY: help
|
||||
help:
|
||||
@echo "Please use 'make <target>' where <target> is one of the following:"
|
||||
@echo
|
||||
@echo -e "Testing:\n"
|
||||
@echo -e "make test-acceptance-api\trun API acceptance tests"
|
||||
@echo -e "make clean-tests\t\tdelete API tests framework dependencies"
|
||||
@echo
|
||||
@echo -e "See the Makefile in the ocis folder for other build and test targets"
|
||||
|
||||
.PHONY: clean-tests
|
||||
clean-tests:
|
||||
rm -Rf vendor-bin/**/vendor vendor-bin/**/composer.lock
|
||||
|
||||
BEHAT_BIN=vendor-bin/behat/vendor/bin/behat
|
||||
|
||||
.PHONY: test-acceptance-api
|
||||
test-acceptance-api: vendor-bin/behat/vendor
|
||||
BEHAT_BIN=$(BEHAT_BIN) $(PATH_TO_CORE)/tests/acceptance/run.sh --remote --type api
|
||||
|
||||
vendor/bamarni/composer-bin-plugin: composer.lock
|
||||
composer install
|
||||
|
||||
vendor-bin/behat/vendor: vendor/bamarni/composer-bin-plugin vendor-bin/behat/composer.lock
|
||||
composer bin behat install --no-progress
|
||||
|
||||
vendor-bin/behat/composer.lock: vendor-bin/behat/composer.json
|
||||
@echo behat composer.lock is not up to date.
|
||||
|
||||
composer.lock: composer.json
|
||||
@echo composer.lock is not up to date.
|
||||
@@ -42,7 +42,7 @@ In the ownCloud 10 core clone the testing app with the following command:
|
||||
git clone https://github.com/owncloud/testing apps/testing
|
||||
```
|
||||
|
||||
Then run the api acceptance tests with the following command inside the `./ocis` directory:
|
||||
Then run the api acceptance tests with the following command from the root of the OCIS repo:
|
||||
```
|
||||
make test-acceptance-api \
|
||||
TEST_SERVER_URL=https://localhost:9200 \
|
||||
@@ -61,14 +61,14 @@ To run a single test add `BEHAT_FEATURE=<feature file>`
|
||||
### use existing tests for BDD
|
||||
|
||||
As a lot of scenarios are written for oC10, we can use those tests for Behaviour driven development in ocis.
|
||||
Every scenario that does not work in OCIS with "owncloud" storage, is listed in `ocis/tests/acceptance/expected-failures-on-OWNCLOUD-storage.txt` with a link to the related issue.
|
||||
Every scenario that does not work in OCIS with "ocis" storage, is listed in `ocis/tests/acceptance/expected-failures-on-OCIS-storage.txt` with a link to the related issue.
|
||||
Every scenario that does not work in OCIS with "owncloud" storage, is listed in `tests/acceptance/expected-failures-on-OWNCLOUD-storage.txt` with a link to the related issue.
|
||||
Every scenario that does not work in OCIS with "ocis" storage, is listed in `tests/acceptance/expected-failures-on-OCIS-storage.txt` with a link to the related issue.
|
||||
|
||||
Those scenarios are run in the ordinary acceptance test pipeline in CI. The scenarios that fail are checked against the
|
||||
expected failures. If there are any differences then the CI pipeline fails.
|
||||
Similarly, scenarios that do not work in OCIS with EOS storage are listed in `ocis/tests/acceptance/expected-failures-on-EOS-storage.txt`.
|
||||
Similarly, scenarios that do not work in OCIS with EOS storage are listed in `tests/acceptance/expected-failures-on-EOS-storage.txt`.
|
||||
Additionally, some issues have scenarios that demonstrate the current buggy behaviour in ocis(reva).
|
||||
Those scenarios are in this ocis repository in `ocis/tests/acceptance/features/apiOcisSpecific`.
|
||||
Those scenarios are in this ocis repository in `tests/acceptance/features/apiOcisSpecific`.
|
||||
Have a look into the [documentation](https://doc.owncloud.com/server/developer_manual/testing/acceptance-tests.html#writing-scenarios-for-bugs) to understand why we are writing those tests.
|
||||
|
||||
If you want to work on a specific issue
|
||||
@@ -84,7 +84,7 @@ If you want to work on a specific issue
|
||||
}
|
||||
}
|
||||
|
||||
2. locally run each of the tests marked with that issue in the expected failures file. This must be run inside the `./ocis` directory.
|
||||
2. locally run each of the tests marked with that issue in the expected failures file.
|
||||
|
||||
E.g.:
|
||||
```
|
||||
|
||||
@@ -147,21 +147,3 @@ config-docs-generate:
|
||||
.PHONY: watch
|
||||
watch:
|
||||
go run github.com/cespare/reflex -c reflex.conf
|
||||
|
||||
BEHAT_BIN=vendor-bin/behat/vendor/bin/behat
|
||||
|
||||
.PHONY: test-acceptance-api
|
||||
test-acceptance-api: vendor-bin/behat/vendor
|
||||
BEHAT_BIN=$(BEHAT_BIN) $(PATH_TO_CORE)/tests/acceptance/run.sh --remote --type api
|
||||
|
||||
vendor/bamarni/composer-bin-plugin: composer.lock
|
||||
composer install
|
||||
|
||||
vendor-bin/behat/vendor: vendor/bamarni/composer-bin-plugin vendor-bin/behat/composer.lock
|
||||
composer bin behat install --no-progress
|
||||
|
||||
vendor-bin/behat/composer.lock: vendor-bin/behat/composer.json
|
||||
@echo behat composer.lock is not up to date.
|
||||
|
||||
composer.lock: composer.json
|
||||
@echo composer.lock is not up to date.
|
||||
|
||||
Reference in New Issue
Block a user