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] Add different storage test pipelines to drone CI #557

Closed
wants to merge 7 commits into from
Closed
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
58 changes: 35 additions & 23 deletions .drone.star
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
config = {
'apiTests': {
'coreBranch': 'master',
'coreCommit': '65ee49ae5dad3af84aa781b98e805fe463baf9fe',
'numberOfParts': 2
'coreCommit': 'e9850b40657ff78f32cb5585ec00342fe07a5ff2',
'numberOfParts': 4
},
'uiTests': {
'phoenixBranch': 'master',
Expand Down Expand Up @@ -55,7 +55,8 @@ def getUITestSuites():
def getCoreApiTestPipelineNames():
names = []
for runPart in range(1, config['apiTests']['numberOfParts'] + 1):
names.append('coreApiTests-%s' % runPart)
names.append('Core-API-Tests-owncloud-storage-%s' % runPart)
names.append('Core-API-Tests-ocis-storage-%s' % runPart)
return names

def main(ctx):
Expand Down Expand Up @@ -86,11 +87,13 @@ def testPipelines(ctx):
pipelines = [
linting(ctx),
unitTests(ctx),
localApiTestsOcStorage(ctx, config['apiTests']['coreBranch'], config['apiTests']['coreCommit'])
localApiTests(ctx, config['apiTests']['coreBranch'], config['apiTests']['coreCommit'], 'owncloud'),
localApiTests(ctx, config['apiTests']['coreBranch'], config['apiTests']['coreCommit'], 'ocis')
]

for runPart in range(1, config['apiTests']['numberOfParts'] + 1):
pipelines.append(coreApiTests(ctx, config['apiTests']['coreBranch'], config['apiTests']['coreCommit'], runPart, config['apiTests']['numberOfParts']))
pipelines.append(coreApiTests(ctx, config['apiTests']['coreBranch'], config['apiTests']['coreCommit'], runPart, config['apiTests']['numberOfParts'], 'owncloud'))
pipelines.append(coreApiTests(ctx, config['apiTests']['coreBranch'], config['apiTests']['coreCommit'], runPart, config['apiTests']['numberOfParts'], 'ocis'))

pipelines += uiTests(ctx, config['uiTests']['phoenixBranch'], config['uiTests']['phoenixCommit'])
return pipelines
Expand Down Expand Up @@ -204,30 +207,31 @@ def unitTests(ctx):
},
}

def localApiTestsOcStorage(ctx, coreBranch = 'master', coreCommit = ''):
def localApiTests(ctx, coreBranch = 'master', coreCommit = '', storage = 'owncloud'):
return {
'kind': 'pipeline',
'type': 'docker',
'name': 'localApiTestsOcStorage',
'name': 'localApiTests-%s-storage' % (storage),
'platform': {
'os': 'linux',
'arch': 'amd64',
},
'steps':
generate() +
build() +
ocisServer() +
ocisServer(storage) +
cloneCoreRepos(coreBranch, coreCommit) + [
{
'name': 'localApiTestsOcStorage',
'name': 'localApiTests-%s-storage' % (storage),
'image': 'owncloudci/php:7.2',
'pull': 'always',
'environment' : {
'TEST_SERVER_URL': 'https://ocis-server:9200',
'OCIS_REVA_DATA_ROOT': '/srv/app/tmp/reva/',
'OCIS_REVA_DATA_ROOT': '%s' % ('/srv/app/tmp/reva/' if storage == 'owncloud' else ''),
'DELETE_USER_DATA_CMD': '%s' % ('rm -rf /srv/app/tmp/reva/data/*' if storage == 'owncloud' else 'rm -rf /srv/app/tmp/ocis/root/nodes/root/*'),
'SKELETON_DIR': '/srv/app/tmp/testing/data/apiSkeleton',
'TEST_OCIS':'true',
'BEHAT_FILTER_TAGS': '~@skipOnOcis-OC-Storage',
'BEHAT_FILTER_TAGS': '~@skipOnOcis-%s-Storage' % ('OC' if storage == 'owncloud' else 'OCIS'),
'PATH_TO_CORE': '/srv/app/testrunner'
},
'commands': [
Expand Down Expand Up @@ -256,33 +260,34 @@ def localApiTestsOcStorage(ctx, coreBranch = 'master', coreCommit = ''):
},
}

def coreApiTests(ctx, coreBranch = 'master', coreCommit = '', part_number = 1, number_of_parts = 1):
def coreApiTests(ctx, coreBranch = 'master', coreCommit = '', part_number = 1, number_of_parts = 1, storage = 'owncloud'):
return {
'kind': 'pipeline',
'type': 'docker',
'name': 'coreApiTests-%s' % (part_number),
'name': 'Core-API-Tests-%s-storage-%s' % (storage, part_number),
'platform': {
'os': 'linux',
'arch': 'amd64',
},
'steps':
generate() +
build() +
ocisServer() +
ocisServer(storage) +
cloneCoreRepos(coreBranch, coreCommit) + [
{
'name': 'oC10ApiTests-%s' % (part_number),
'name': 'oC10ApiTests-%s-storage-%s' % (storage, part_number),
'image': 'owncloudci/php:7.2',
'pull': 'always',
'environment' : {
'TEST_SERVER_URL': 'https://ocis-server:9200',
'OCIS_REVA_DATA_ROOT': '/srv/app/tmp/reva/',
'OCIS_REVA_DATA_ROOT': '%s' % ('/srv/app/tmp/reva/' if storage == 'owncloud' else ''),
'DELETE_USER_DATA_CMD': '%s' % ('rm -rf /srv/app/tmp/reva/data/*' if storage == 'owncloud' else 'rm -rf /srv/app/tmp/ocis/root/nodes/root/*'),
'SKELETON_DIR': '/srv/app/tmp/testing/data/apiSkeleton',
'TEST_OCIS':'true',
'BEHAT_FILTER_TAGS': '~@notToImplementOnOCIS&&~@toImplementOnOCIS&&~comments-app-required&&~@federation-app-required&&~@notifications-app-required&&~systemtags-app-required&&~@local_storage',
'DIVIDE_INTO_NUM_PARTS': number_of_parts,
'RUN_PART': part_number,
'EXPECTED_FAILURES_FILE': '/drone/src/tests/acceptance/expected-failures-on-OC-storage.txt'
'EXPECTED_FAILURES_FILE': '/drone/src/tests/acceptance/expected-failures-on-%s-storage.txt' % (storage.upper())
},
'commands': [
'cd /srv/app/testrunner',
Expand Down Expand Up @@ -315,7 +320,7 @@ def uiTests(ctx, phoenixBranch, phoenixCommit):
suiteNames = getUITestSuiteNames()
return [uiTestPipeline(suiteName, phoenixBranch, phoenixCommit) for suiteName in suiteNames]

def uiTestPipeline(suiteName, phoenixBranch = 'master', phoenixCommit = ''):
def uiTestPipeline(suiteName, phoenixBranch = 'master', phoenixCommit = '', storage = 'owncloud'):
suites = getUITestSuites()
paths = ""
for path in suites[suiteName]:
Expand All @@ -332,7 +337,7 @@ def uiTestPipeline(suiteName, phoenixBranch = 'master', phoenixCommit = ''):
'steps':
generate() +
build() +
ocisServer() + [
ocisServer(storage) + [
{
'name': 'webUITests',
'image': 'owncloudci/nodejs:11',
Expand Down Expand Up @@ -456,7 +461,8 @@ def docker(ctx, arch):
'depends_on': [
'linting',
'unitTests',
'localApiTestsOcStorage',
'localApiTests-owncloud-storage',
'localApiTests-ocis-storage',
] + getCoreApiTestPipelineNames() + getUITestSuiteNames(),
'trigger': {
'ref': [
Expand Down Expand Up @@ -602,7 +608,8 @@ def binary(ctx, name):
'depends_on': [
'linting',
'unitTests',
'localApiTestsOcStorage',
'localApiTests-owncloud-storage',
'localApiTests-ocis-storage',
] + getCoreApiTestPipelineNames() + getUITestSuiteNames(),
'trigger': {
'ref': [
Expand Down Expand Up @@ -988,7 +995,7 @@ def build():
},
]

def ocisServer():
def ocisServer(storage):
return [
{
'name': 'ocis-server',
Expand All @@ -997,8 +1004,12 @@ def ocisServer():
'detach': True,
'environment' : {
'OCIS_LOG_LEVEL': 'debug',

'REVA_STORAGE_HOME_DRIVER': '%s' % (storage),
'REVA_STORAGE_HOME_DATA_DRIVER': '%s' % (storage),
'REVA_STORAGE_OC_DRIVER': '%s' % (storage),
'REVA_STORAGE_OC_DATA_DRIVER': '%s' % (storage),
'REVA_STORAGE_HOME_DATA_TEMP_FOLDER': '/srv/app/tmp/',
'REVA_STORAGE_OCIS_ROOT': '/srv/app/tmp/ocis/root',
'REVA_STORAGE_LOCAL_ROOT': '/srv/app/tmp/reva/root',
'REVA_STORAGE_OWNCLOUD_DATADIR': '/srv/app/tmp/reva/data',
'REVA_STORAGE_OC_DATA_TEMP_FOLDER': '/srv/app/tmp/',
Expand All @@ -1017,6 +1028,7 @@ def ocisServer():
'commands': [
'apk add mailcap', # install /etc/mime.types
'mkdir -p /srv/app/tmp/reva',
'mkdir -p /srv/app/tmp/ocis/root/nodes',
'bin/ocis server'
],
'volumes': [
Expand Down
11 changes: 11 additions & 0 deletions changelog/unreleased/update-reva-12_09_2020.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Change: Update ocis-reva to v0.14.0

- Update ocis-reva to v0.14.0
- Fix default configuration for accessing shares (ocis-reva/#461)
- Allow configuring arbitrary storage registry rules (ocis-reva/#461)
- Update reva to v1.2.1-0.20200911111727-51649e37df2d (reva/#454, reva/#466)

https://github.com/owncloud/ocis/pull/556
https://github.com/owncloud/ocis-reva/pull/461
https://github.com/owncloud/ocis-reva/pull/454
https://github.com/owncloud/ocis-reva/pull/466
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ require (
github.com/owncloud/ocis-phoenix v0.13.1-0.20200910090722-8e3ed0e966a5
github.com/owncloud/ocis-pkg/v2 v2.4.1-0.20200902134813-1e87c6173ada
github.com/owncloud/ocis-proxy v0.7.1-0.20200907105449-201b9a652685
github.com/owncloud/ocis-reva v0.13.1-0.20200910085648-26465bbdcf46
github.com/owncloud/ocis-reva v0.14.0
github.com/owncloud/ocis-settings v0.3.2-0.20200903035407-ad5de8264f91
github.com/owncloud/ocis-store v0.1.1
github.com/owncloud/ocis-thumbnails v0.3.0
Expand Down
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ github.com/aws/aws-sdk-go v1.33.19 h1:SMna0QLInNqm+nNL9tb7OVWTqSfNYSxrCa2adnyVth
github.com/aws/aws-sdk-go v1.33.19/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0=
github.com/aws/aws-sdk-go v1.34.2 h1:9vCknCdTAmmV4ht7lPuda7aJXzllXwEQyCMZKJHjBrM=
github.com/aws/aws-sdk-go v1.34.2/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0=
github.com/aws/aws-sdk-go v1.34.12/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0=
github.com/aws/aws-xray-sdk-go v0.9.4/go.mod h1:XtMKdBQfpVut+tJEwI7+dJFRxxRdxHDyVNp2tHXRq04=
github.com/baiyubin/aliyun-sts-go-sdk v0.0.0-20180326062324-cfa1a18b161f/go.mod h1:AuiFmCCPBSrqvVMvuqFuk0qogytodnVFVSN5CeJB8Gc=
github.com/beevik/etree v1.1.0 h1:T0xke/WvNtMoCqgzPhkX2r4rjY3GDZFi+FjpRZY2Jbs=
Expand Down Expand Up @@ -323,6 +324,7 @@ github.com/cs3org/reva v1.1.1-0.20200819100654-dcbf0c8ea187 h1:ZyDXH+zy5KPOH5AM5
github.com/cs3org/reva v1.1.1-0.20200819100654-dcbf0c8ea187/go.mod h1:gkGtoun9QABW8k7jzAWWxB9jO64DJ1lreSzTucci/ok=
github.com/cs3org/reva v1.2.1-0.20200826162318-c0f54e1f37ea h1:xVyJvR+GoaBrRJV6GnDflgm9bzkmjchCBBg0nMiHu6M=
github.com/cs3org/reva v1.2.1-0.20200826162318-c0f54e1f37ea/go.mod h1:FvYB+UPpuPCw0hH42qHVR1R2atZyy69METZI/zEaST8=
github.com/cs3org/reva v1.2.1-0.20200911111727-51649e37df2d/go.mod h1:Q1/JB40ZKtlhZUxz+ZqB/O/VlrnQX//NYdPPRPsP0UE=
github.com/cznic/b v0.0.0-20181122101859-a26611c4d92d h1:SwD98825d6bdB+pEuTxWOXiSjBrHdOl/UVp75eI7JT8=
github.com/cznic/b v0.0.0-20181122101859-a26611c4d92d/go.mod h1:URriBxXwVq5ijiJ12C7iIZqlA69nTlI+LgI6/pwftG8=
github.com/cznic/mathutil v0.0.0-20181122101859-297441e03548 h1:iwZdTE0PVqJCos1vaoKsclOGD3ADKpshg3SRtYBbwso=
Expand Down Expand Up @@ -1342,6 +1344,8 @@ github.com/owncloud/ocis-reva v0.13.0 h1:np4Xk/hBWSOIsahimP6tnwiEl1YKj8okJ7M5IAa
github.com/owncloud/ocis-reva v0.13.0/go.mod h1:cTcLFOO/tg4/GyYygi/VVXFjZAQWE3YxlyfhZ/vcAj4=
github.com/owncloud/ocis-reva v0.13.1-0.20200910085648-26465bbdcf46 h1:V+LuunhiVuQZX40jlkBVoqlHxU/aUgbS8jJXxWy9ges=
github.com/owncloud/ocis-reva v0.13.1-0.20200910085648-26465bbdcf46/go.mod h1:cTcLFOO/tg4/GyYygi/VVXFjZAQWE3YxlyfhZ/vcAj4=
github.com/owncloud/ocis-reva v0.14.0 h1:JSLd6RWYzDAVyhNFzNbgL2/6G3iAh6N6e2rd/7xF4YE=
github.com/owncloud/ocis-reva v0.14.0/go.mod h1:ZYs0NaqS/KlQgb92JJsqy3AJXbFqe4ejZO9k0hb7rDY=
github.com/owncloud/ocis-settings v0.0.0-20200522101320-46ea31026363 h1:wk/7aAUITTrM192TFoIDq4fqzJQtFOQ0dDdSRkJ25SU=
github.com/owncloud/ocis-settings v0.0.0-20200522101320-46ea31026363/go.mod h1:/h0ceztOoFc3KAnm8nqZI4zwsaaZK9q4MTgtintwsXc=
github.com/owncloud/ocis-settings v0.0.0-20200629120229-69693c5f8f43 h1:IekDKhkoaOhUnpIHSG5d02hGMOW5u4tZEEfxVC1KGgk=
Expand Down
Loading