mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2025-12-31 01:10:20 -06:00
Add accountsUi tests
This commit is contained in:
159
.drone.star
159
.drone.star
@@ -142,6 +142,7 @@ def testPipelines(ctx):
|
||||
pipelines.append(coreApiTests(ctx, config['apiTests']['coreBranch'], config['apiTests']['coreCommit'], runPart, config['apiTests']['numberOfParts'], 'ocis'))
|
||||
|
||||
pipelines += uiTests(ctx, config['uiTests']['phoenixBranch'], config['uiTests']['phoenixCommit'])
|
||||
pipelines.append(accountsUITests(ctx, config['uiTests']['phoenixBranch'], config['uiTests']['phoenixCommit'], 'ocis'))
|
||||
return pipelines
|
||||
|
||||
def testing(ctx, module):
|
||||
@@ -508,6 +509,164 @@ def uiTestPipeline(suiteName, phoenixBranch = 'master', phoenixCommit = '', stor
|
||||
},
|
||||
}
|
||||
|
||||
def accountsUITests(ctx, phoenixBranch, phoenixCommitId, storage):
|
||||
return {
|
||||
'kind': 'pipeline',
|
||||
'type': 'docker',
|
||||
'name': 'accountsUiTests',
|
||||
'platform': {
|
||||
'os': 'linux',
|
||||
'arch': 'amd64',
|
||||
},
|
||||
'steps': [
|
||||
{
|
||||
'name': 'build-ocis',
|
||||
'image': 'webhippie/golang:1.13',
|
||||
'pull': 'always',
|
||||
'commands': [
|
||||
'cd ocis',
|
||||
'make build',
|
||||
'mkdir -p /srv/app/ocis/bin',
|
||||
'cp bin/ocis /srv/app/ocis/bin',
|
||||
],
|
||||
'volumes': [
|
||||
{
|
||||
'name': 'gopath',
|
||||
'path': '/srv/app'
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
'name': 'ocis-server',
|
||||
'image': 'webhippie/golang:1.13',
|
||||
'pull': 'always',
|
||||
'detach': True,
|
||||
'environment' : {
|
||||
#'OCIS_LOG_LEVEL': 'debug',
|
||||
'STORAGE_STORAGE_HOME_DRIVER': '%s' % (storage),
|
||||
'STORAGE_STORAGE_HOME_DATA_DRIVER': '%s' % (storage),
|
||||
'STORAGE_STORAGE_OC_DRIVER': '%s' % (storage),
|
||||
'STORAGE_STORAGE_OC_DATA_DRIVER': '%s' % (storage),
|
||||
'STORAGE_STORAGE_HOME_DATA_TEMP_FOLDER': '/srv/app/tmp/',
|
||||
'STORAGE_STORAGE_OCIS_ROOT': '/srv/app/tmp/ocis/storage/users',
|
||||
'STORAGE_STORAGE_LOCAL_ROOT': '/srv/app/tmp/ocis/reva/root',
|
||||
'STORAGE_STORAGE_OWNCLOUD_DATADIR': '/srv/app/tmp/ocis/owncloud/data',
|
||||
'STORAGE_STORAGE_OC_DATA_TEMP_FOLDER': '/srv/app/tmp/',
|
||||
'STORAGE_STORAGE_OWNCLOUD_REDIS_ADDR': 'redis:6379',
|
||||
'STORAGE_OIDC_ISSUER': 'https://ocis-server:9200',
|
||||
'STORAGE_LDAP_IDP': 'https://ocis-server:9200',
|
||||
'PROXY_OIDC_ISSUER': 'https://ocis-server:9200',
|
||||
'STORAGE_STORAGE_OC_DATA_SERVER_URL': 'http://ocis-server:9164/data',
|
||||
'STORAGE_DATAGATEWAY_URL': 'https://ocis-server:9200/data',
|
||||
'STORAGE_FRONTEND_URL': 'https://ocis-server:9200',
|
||||
'PHOENIX_WEB_CONFIG': '/drone/src/accounts/ui/tests/config/drone/ocis-config.json',
|
||||
'KONNECTD_IDENTIFIER_REGISTRATION_CONF': '/drone/src/accounts/ui/tests/config/drone/identifier-registration.yml',
|
||||
'KONNECTD_ISS': 'https://ocis-server:9200',
|
||||
'ACCOUNTS_STORAGE_DISK_PATH': '/srv/app/tmp/ocis-accounts', # Temporary workaround, don't use metadata storage
|
||||
},
|
||||
'commands': [
|
||||
'mkdir -p /srv/app/tmp/reva',
|
||||
# First run settings service because accounts need it to register the settings bundles
|
||||
'/srv/app/ocis/bin/ocis settings &',
|
||||
|
||||
# Wait for the settings service to start
|
||||
"while [[ \"$(curl -s -o /dev/null -w ''%{http_code}'' localhost:9190)\" != \"404\" ]]; do sleep 2; done",
|
||||
|
||||
# Now start the accounts service
|
||||
'/srv/app/ocis/bin/ocis accounts &',
|
||||
|
||||
# Wait for the accounts service to start
|
||||
"while [[ \"$(curl -s -o /dev/null -w ''%{http_code}'' localhost:9181)\" != \"404\" ]]; do sleep 2; done",
|
||||
|
||||
# Now run all the ocis services except the accounts and settings because they are already running
|
||||
'/srv/app/ocis/bin/ocis server',
|
||||
],
|
||||
'volumes': [
|
||||
{
|
||||
'name': 'gopath',
|
||||
'path': '/srv/app'
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
'name': 'WebUIAcceptanceTests',
|
||||
'image': 'owncloudci/nodejs:10',
|
||||
'pull': 'always',
|
||||
'environment': {
|
||||
'SERVER_HOST': 'https://ocis-server:9200',
|
||||
'BACKEND_HOST': 'https://ocis-server:9200',
|
||||
'RUN_ON_OCIS': 'true',
|
||||
'OCIS_REVA_DATA_ROOT': '/srv/app/tmp/ocis/owncloud',
|
||||
'OCIS_SKELETON_DIR': '/srv/app/testing/data/webUISkeleton',
|
||||
'PHOENIX_CONFIG': '/drone/src/accounts/ui/tests/config/drone/ocis-config.json',
|
||||
'TEST_TAGS': 'not @skipOnOCIS and not @skip',
|
||||
'LOCAL_UPLOAD_DIR': '/uploads',
|
||||
'PHOENIX_PATH': '/srv/app/phoenix',
|
||||
'FEATURE_PATH': '/drone/src/accounts/ui/tests/acceptance/features',
|
||||
'NODE_TLS_REJECT_UNAUTHORIZED': '0'
|
||||
},
|
||||
'commands': [
|
||||
'git clone --depth=1 https://github.com/owncloud/testing.git /srv/app/testing',
|
||||
'git clone -b %s --single-branch https://github.com/owncloud/phoenix /srv/app/phoenix' % (phoenixBranch),
|
||||
'cd /srv/app/phoenix',
|
||||
'git checkout %s' % (phoenixCommitId),
|
||||
'cp -r /srv/app/phoenix/tests/acceptance/filesForUpload/* /uploads',
|
||||
'yarn install-all',
|
||||
'cd /drone/src/accounts',
|
||||
'yarn install --all',
|
||||
'make test-acceptance-webui'
|
||||
],
|
||||
'volumes': [
|
||||
{
|
||||
'name': 'gopath',
|
||||
'path': '/srv/app',
|
||||
},
|
||||
{
|
||||
'name': 'uploads',
|
||||
'path': '/uploads'
|
||||
}
|
||||
],
|
||||
},
|
||||
],
|
||||
'services': [
|
||||
{
|
||||
'name': 'redis',
|
||||
'image': 'webhippie/redis',
|
||||
'pull': 'always',
|
||||
'environment': {
|
||||
'REDIS_DATABASES': 1
|
||||
},
|
||||
},
|
||||
{
|
||||
'name': 'selenium',
|
||||
'image': 'selenium/standalone-chrome-debug:3.141.59-20200326',
|
||||
'pull': 'always',
|
||||
'volumes': [
|
||||
{
|
||||
'name': 'uploads',
|
||||
'path': '/uploads'
|
||||
}
|
||||
],
|
||||
},
|
||||
],
|
||||
'volumes': [
|
||||
{
|
||||
'name': 'gopath',
|
||||
'temp': {},
|
||||
},
|
||||
{
|
||||
'name': 'uploads',
|
||||
'temp': {}
|
||||
}
|
||||
],
|
||||
'trigger': {
|
||||
'ref': [
|
||||
'refs/tags/v*',
|
||||
'refs/pull/**',
|
||||
],
|
||||
},
|
||||
}
|
||||
|
||||
def docker(ctx, arch):
|
||||
return {
|
||||
'kind': 'pipeline',
|
||||
|
||||
Reference in New Issue
Block a user