Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tests-only] [full-ci] Run API tests from ocis repo (edge) #3591

Merged
merged 5 commits into from
Jan 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -34,16 +34,16 @@ def makeStep(target):
],
}

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 @@ -227,9 +227,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 @@ -238,7 +238,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/spaces/* /drone/src/tmp/reva/data/blobs/* /drone/src/tmp/reva/data/indexes",
Expand Down Expand Up @@ -574,15 +574,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 @@ -652,15 +652,15 @@ def s3ngIntegrationTests(parallelRuns, skipExceptParts = []):
"/drone/src/cmd/revad/revad -c machine-auth.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 @@ -174,9 +174,14 @@ go-generate:
go generate ./...

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 --remote --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