Skip to content

Commit

Permalink
Run e2e app provider tests with new wopi server
Browse files Browse the repository at this point in the history
  • Loading branch information
grgprarup committed Apr 16, 2024
1 parent 851e363 commit bfe1766
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 28 deletions.
4 changes: 2 additions & 2 deletions .drone.env
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# The version of OCIS to use in pipelines that test against OCIS
OCIS_COMMITID=e253ad0a298b05d70c6a2c2b81ab72310b8ab529
OCIS_BRANCH=master
OCIS_COMMITID=bd16a07c21fdffa17366fe604fc22969f0a01c2d
OCIS_BRANCH=new_collaboration_service
81 changes: 57 additions & 24 deletions .drone.star
Original file line number Diff line number Diff line change
Expand Up @@ -63,30 +63,36 @@ config = {
"e2e": {
"oCIS-1": {
"earlyFail": True,
"skip": False,
"skip": True,
"suites": [
"journeys",
"smoke",
],
},
"oCIS-2": {
"earlyFail": True,
"skip": False,
"skip": True,
"suites": [
"admin-settings",
"spaces",
],
},
"oCIS-3": {
"earlyFail": True,
"skip": False,
"skip": True,
"tikaNeeded": True,
"suites": [
"search",
"shares",
],
},
"oCIS-app-provider": {
"oCIS-app-provider-wopi-cs3": {
"skip": False,
"suites": [
"app-provider",
],
},
"oCIS-app-provider-wopi-builtin": {
"skip": False,
"suites": [
"app-provider",
Expand All @@ -99,6 +105,7 @@ config = {
"servers": [
"",
],
"skip": True,
"suites": {
"oCISBasic": [
"webUIPreview",
Expand Down Expand Up @@ -296,11 +303,10 @@ def beforePipelines(ctx):
pipelinesDependsOn(pnpmlint(ctx), pnpmCache(ctx))

def stagePipelines(ctx):
unit_test_pipelines = unitTests(ctx)
e2e_pipelines = e2eTests(ctx)
acceptance_pipelines = acceptance(ctx)
keycloak_pipelines = e2eTestsOnKeycloak(ctx)
return unit_test_pipelines + buildAndTestDesignSystem(ctx) + pipelinesDependsOn(e2e_pipelines + keycloak_pipelines + acceptance_pipelines, unit_test_pipelines)
return buildAndTestDesignSystem(ctx) + pipelinesDependsOn(e2e_pipelines + keycloak_pipelines + acceptance_pipelines)

def afterPipelines(ctx):
return build(ctx) + pipelinesDependsOn(notify(), build(ctx))
Expand Down Expand Up @@ -654,7 +660,10 @@ def e2eTests(ctx):
for item in default:
params[item] = matrix[item] if item in matrix else default[item]

if suite == "oCIS-app-provider" and not "full-ci" in ctx.build.title.lower() and ctx.build.event != "cron":
if suite == "oCIS-app-provider-wopi-cs3" and not "full-ci" in ctx.build.title.lower() and ctx.build.event != "cron":
continue

if suite == "oCIS-app-provider-wopi-builtin" and not "full-ci" in ctx.build.title.lower() and ctx.build.event != "cron":
continue

if params["skip"]:
Expand Down Expand Up @@ -689,12 +698,20 @@ def e2eTests(ctx):
# oCIS specific dependencies
depends_on = ["cache-ocis"]

if suite == "oCIS-app-provider":
if suite == "oCIS-app-provider-wopi-cs3":
# app-provider specific steps
steps += collaboraService() + \
onlyofficeService() + \
ocisService("app-provider") + \
wopiServer() + \
wopiServer("cs3") + \
appProviderService("collabora") + \
appProviderService("onlyoffice")
elif suite == "oCIS-app-provider-wopi-builtin":
# app-provider specific steps
steps += collaboraService() + \
onlyofficeService() + \
ocisService("app-provider") + \
wopiServer("builtin") + \
appProviderService("collabora") + \
appProviderService("onlyoffice")
else:
Expand Down Expand Up @@ -2057,24 +2074,40 @@ def tikaService():
},
]

def wopiServer():
return [
{
"name": "wopiserver",
"type": "docker",
"image": "cs3org/wopiserver:v10.3.0",
"detach": True,
"commands": [
"echo 'LoremIpsum567' > /etc/wopi/wopisecret",
"cp %s/tests/drone/wopiserver/wopiserver.conf /etc/wopi/wopiserver.conf" % dir["web"],
"/app/wopiserver.py",
],
},
def wopiServer(wopiServerType):
wopiServer = []

if wopiServerType == "cs3":
wopiServer = [
{
"name": "wopiserver",
"type": "docker",
"image": "cs3org/wopiserver:v10.3.0",
"detach": True,
"commands": [
"echo 'LoremIpsum567' > /etc/wopi/wopisecret",
"cp %s/tests/drone/wopiserver/wopiserver.conf /etc/wopi/wopiserver.conf" % dir["web"],
"/app/wopiserver.py",
],
},
]
else:
wopiServer = [
{
"name": "wopiserver",
"image": OC_CI_GOLANG,
"detach": True,
"commands": [
"./ocis collaboration server",
],
},
]
return wopiServer + [
{
"name": "wait-for-wopi-server",
"image": OC_CI_WAIT_FOR,
"commands": [
"wait-for -it wopiserver:8880 -t 300",
"wait-for -it wopiserver:9300 -t 300",
],
},
]
Expand Down Expand Up @@ -2137,7 +2170,7 @@ def appProviderService(name):
"APP_PROVIDER_GRPC_ADDR": "0.0.0.0:9164",
"APP_PROVIDER_DRIVER": "wopi",
"APP_PROVIDER_WOPI_INSECURE": True,
"APP_PROVIDER_WOPI_WOPI_SERVER_EXTERNAL_URL": "http://wopiserver:8880",
"APP_PROVIDER_WOPI_WOPI_SERVER_EXTERNAL_URL": "http://wopiserver:9300",
"APP_PROVIDER_WOPI_FOLDER_URL_BASE_URL": "https://ocis:9200",
"MICRO_REGISTRY": "nats-js-kv",
"MICRO_REGISTRY_ADDRESS": "ocis:9233",
Expand Down
4 changes: 2 additions & 2 deletions tests/drone/wopiserver/wopiserver.conf
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
storagetype = cs3

# Port where to listen for WOPI requests
port = 8880
port = 9300

# Logging level. Debug enables the Flask debug mode as well.
# Valid values are: Debug, Info, Warning, Error.
Expand Down Expand Up @@ -128,4 +128,4 @@ revagateway = ocis:9142
authtokenvalidity = 3600

# SSL certificate check for Reva
sslverify = False
sslverify = False

0 comments on commit bfe1766

Please sign in to comment.