Merge pull request #267 from owncloud/apiTests-from-branch-commit

[Tests-Only] Fetch API testrunner from specific branch and commit
This commit is contained in:
Phil Davis
2020-06-15 17:32:51 +05:45
committed by GitHub
+21 -18
View File
@@ -1,7 +1,7 @@
def main(ctx): def main(ctx):
before = [ before = [
testing(ctx), testing(ctx),
apiTests(ctx), apiTests(ctx, 'master', '158bd976047ea8abd137e2c61905d9dd63dc977d'),
] ]
stages = [ stages = [
@@ -23,7 +23,7 @@ def main(ctx):
return before + stages + after return before + stages + after
def apiTests(ctx): def apiTests(ctx, coreBranch = 'master', coreCommit = ''):
return { return {
'kind': 'pipeline', 'kind': 'pipeline',
'type': 'docker', 'type': 'docker',
@@ -100,19 +100,22 @@ def apiTests(ctx):
'TEST_OCIS':'true', 'TEST_OCIS':'true',
'OCIS_REVA_DATA_ROOT': '/srv/app/tmp/reva/', 'OCIS_REVA_DATA_ROOT': '/srv/app/tmp/reva/',
'SKELETON_DIR': '/srv/app/tmp/testing/data/apiSkeleton' 'SKELETON_DIR': '/srv/app/tmp/testing/data/apiSkeleton'
}, },
'commands': [ 'commands': [
'git clone -b master --depth=1 https://github.com/owncloud/testing.git /srv/app/tmp/testing', 'git clone -b master --depth=1 https://github.com/owncloud/testing.git /srv/app/tmp/testing',
'git clone -b master --depth=1 https://github.com/owncloud/core.git /srv/app/testrunner', 'git clone -b %s --single-branch --no-tags https://github.com/owncloud/core.git /srv/app/testrunner' % (coreBranch),
'cd /srv/app/testrunner', 'cd /srv/app/testrunner',
'make test-acceptance-api' ] + ([
], 'git checkout %s' % (coreCommit)
'volumes': [ ] if coreCommit != '' else []) + [
{ 'make test-acceptance-api'
'name': 'gopath', ],
'path': '/srv/app', 'volumes': [
}, {
] 'name': 'gopath',
'path': '/srv/app',
},
]
}, },
], ],
'services': [ 'services': [
@@ -320,7 +323,7 @@ def testing(ctx):
'LITMUS_USERNAME': 'tu1', 'LITMUS_USERNAME': 'tu1',
'LITMUS_PASSWORD': '1234', 'LITMUS_PASSWORD': '1234',
'TESTS': 'basic http copymove props' 'TESTS': 'basic http copymove props'
}, },
}, },
], ],
'services': [ 'services': [
@@ -334,7 +337,7 @@ def testing(ctx):
'LDAP_ADMIN_PASSWORD': 'admin', 'LDAP_ADMIN_PASSWORD': 'admin',
'LDAP_TLS_VERIFY_CLIENT': 'never', 'LDAP_TLS_VERIFY_CLIENT': 'never',
'HOSTNAME': 'ldap' 'HOSTNAME': 'ldap'
}, },
}, },
{ {
'name': 'redis', 'name': 'redis',
@@ -342,7 +345,7 @@ def testing(ctx):
'pull': 'always', 'pull': 'always',
'environment': { 'environment': {
'REDIS_DATABASES': 1 'REDIS_DATABASES': 1
}, },
}, },
], ],
'volumes': [ 'volumes': [