Skip to content

Commit

Permalink
Merge pull request #267 from owncloud/apiTests-from-branch-commit
Browse files Browse the repository at this point in the history
[Tests-Only] Fetch API testrunner from specific branch and commit
  • Loading branch information
phil-davis authored Jun 15, 2020
2 parents 50fda78 + 557015d commit b443db2
Showing 1 changed file with 21 additions and 18 deletions.
39 changes: 21 additions & 18 deletions .drone.star
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
def main(ctx):
before = [
testing(ctx),
apiTests(ctx),
apiTests(ctx, 'master', '158bd976047ea8abd137e2c61905d9dd63dc977d'),
]

stages = [
Expand All @@ -23,7 +23,7 @@ def main(ctx):

return before + stages + after

def apiTests(ctx):
def apiTests(ctx, coreBranch = 'master', coreCommit = ''):
return {
'kind': 'pipeline',
'type': 'docker',
Expand Down Expand Up @@ -100,19 +100,22 @@ def apiTests(ctx):
'TEST_OCIS':'true',
'OCIS_REVA_DATA_ROOT': '/srv/app/tmp/reva/',
'SKELETON_DIR': '/srv/app/tmp/testing/data/apiSkeleton'
},
'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/core.git /srv/app/testrunner',
'cd /srv/app/testrunner',
'make test-acceptance-api'
],
'volumes': [
{
'name': 'gopath',
'path': '/srv/app',
},
]
},
'commands': [
'git clone -b master --depth=1 https://github.com/owncloud/testing.git /srv/app/tmp/testing',
'git clone -b %s --single-branch --no-tags https://github.com/owncloud/core.git /srv/app/testrunner' % (coreBranch),
'cd /srv/app/testrunner',
] + ([
'git checkout %s' % (coreCommit)
] if coreCommit != '' else []) + [
'make test-acceptance-api'
],
'volumes': [
{
'name': 'gopath',
'path': '/srv/app',
},
]
},
],
'services': [
Expand Down Expand Up @@ -320,7 +323,7 @@ def testing(ctx):
'LITMUS_USERNAME': 'tu1',
'LITMUS_PASSWORD': '1234',
'TESTS': 'basic http copymove props'
},
},
},
],
'services': [
Expand All @@ -334,15 +337,15 @@ def testing(ctx):
'LDAP_ADMIN_PASSWORD': 'admin',
'LDAP_TLS_VERIFY_CLIENT': 'never',
'HOSTNAME': 'ldap'
},
},
},
{
'name': 'redis',
'image': 'webhippie/redis',
'pull': 'always',
'environment': {
'REDIS_DATABASES': 1
},
},
},
],
'volumes': [
Expand Down

0 comments on commit b443db2

Please sign in to comment.