Skip to content

Commit

Permalink
[tests-only] [full-ci] Run API tests from ocis repo (master) (#3592)
Browse files Browse the repository at this point in the history
* Bump CORE_COMMITID for API tests

* Fetch API tests from ocis repo

* Set APITESTS_COMMITID to the latest commit in owncloud/ocis

* Run core-api suites from ocis

* Adjust API test suite names in expected-failures

* acceptance tests run.sh no longer needs --remote
  • Loading branch information
phil-davis authored Jan 25, 2023
1 parent 657d3f2 commit 74afdca
Show file tree
Hide file tree
Showing 7 changed files with 2,318 additions and 2,303 deletions.
4 changes: 2 additions & 2 deletions .drone.env
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# The test runner source for API tests
CORE_COMMITID=3d6c0aafd7710bee6a115c27742a7939b622079e
CORE_BRANCH=master
APITESTS_COMMITID=6357a703181b368e2109f720e0785a11222eed88
APITESTS_BRANCH=master
26 changes: 13 additions & 13 deletions .drone.star
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ def makeStep():
],
}

def cloneOc10TestReposStep():
def cloneApiTestReposStep():
return {
"name": "clone-oC10-test-repos",
"name": "clone-api-test-repos",
"image": OC_CI_ALPINE,
"commands": [
"source /drone/src/.drone.env",
"git clone -b master --depth=1 https://github.com/owncloud/testing.git /drone/src/tmp/testing",
"git clone -b $CORE_BRANCH --single-branch --no-tags https://github.com/owncloud/core.git /drone/src/tmp/testrunner",
"git clone -b $APITESTS_BRANCH --single-branch --no-tags https://github.com/owncloud/ocis.git /drone/src/tmp/testrunner",
"cd /drone/src/tmp/testrunner",
"git checkout $CORE_COMMITID",
"git checkout $APITESTS_COMMITID",
],
}

Expand Down Expand Up @@ -103,9 +103,9 @@ def virtualViews():
"/drone/src/cmd/revad/revad -c users.toml",
],
},
cloneOc10TestReposStep(),
cloneApiTestReposStep(),
{
"name": "oC10APIAcceptanceTestsOcisStorage",
"name": "APIAcceptanceTestsOcisStorage",
"image": OC_CI_PHP,
"commands": [
"cd /drone/src",
Expand All @@ -114,7 +114,7 @@ def virtualViews():
"make test-acceptance-api",
],
"environment": {
"PATH_TO_CORE": "/drone/src/tmp/testrunner",
"PATH_TO_APITESTS": "/drone/src/tmp/testrunner",
"TEST_SERVER_URL": "http://revad-services:20180",
"OCIS_REVA_DATA_ROOT": "/drone/src/tmp/reva/data/",
"DELETE_USER_DATA_CMD": "rm -rf /drone/src/tmp/reva/data/nodes/root/* /drone/src/tmp/reva/data/nodes/*-*-*-* /drone/src/tmp/reva/data/blobs/*",
Expand Down Expand Up @@ -170,15 +170,15 @@ def ocisIntegrationTests(parallelRuns, skipExceptParts = []):
"/drone/src/cmd/revad/revad -c ldap-users.toml",
],
},
cloneOc10TestReposStep(),
cloneApiTestReposStep(),
{
"name": "oC10APIAcceptanceTestsOcisStorage",
"name": "APIAcceptanceTestsOcisStorage",
"image": OC_CI_PHP,
"commands": [
"cd /drone/src/tmp/testrunner",
"composer self-update",
"composer --version",
"make test-acceptance-api",
"make test-acceptance-core-api",
],
"environment": {
"TEST_SERVER_URL": "http://revad-services:20080",
Expand Down Expand Up @@ -246,15 +246,15 @@ def s3ngIntegrationTests(parallelRuns, skipExceptParts = []):
"/drone/src/cmd/revad/revad -c ldap-users.toml",
],
},
cloneOc10TestReposStep(),
cloneApiTestReposStep(),
{
"name": "oC10APIAcceptanceTestsS3ngStorage",
"name": "APIAcceptanceTestsS3ngStorage",
"image": OC_CI_PHP,
"commands": [
"cd /drone/src/tmp/testrunner",
"composer self-update",
"composer --version",
"make test-acceptance-api",
"make test-acceptance-core-api",
],
"environment": {
"TEST_SERVER_URL": "http://revad-services:20080",
Expand Down
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,14 @@ dist: gen-doc
go run tools/create-artifacts/main.go -version ${VERSION} -commit ${GIT_COMMIT} -goversion ${GO_VERSION}

BEHAT_BIN=vendor-bin/behat/vendor/bin/behat
# behat config file for core api tests
CORE_BEHAT_YML=$(PATH_TO_APITESTS)/tests/acceptance/config/behat-core.yml

test-acceptance-api: vendor-bin/behat/vendor
BEHAT_BIN=$(BEHAT_BIN) $(PATH_TO_CORE)/tests/acceptance/run.sh --remote --type api
BEHAT_BIN=$(BEHAT_BIN) $(PATH_TO_APITESTS)/tests/acceptance/run.sh --type api

test-acceptance-core-api: vendor-bin/behat/vendor
BEHAT_BIN=$(BEHAT_BIN) BEHAT_YML=$(CORE_BEHAT_YML) $(PATH_TO_APITESTS)/tests/acceptance/run.sh --type core-api

vendor/bamarni/composer-bin-plugin: composer.lock
composer install
Expand Down
Loading

0 comments on commit 74afdca

Please sign in to comment.