Skip to content

Commit

Permalink
feat: add caldavtester to drone
Browse files Browse the repository at this point in the history
  • Loading branch information
DeepDiver1975 committed Feb 9, 2024
1 parent 3f55fe8 commit edc1645
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 5 deletions.
60 changes: 56 additions & 4 deletions .drone.star
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ dirs = {
# configuration
config = {
"cs3ApiTests": {
"skip": False,
"skip": True,
},
"wopiValidatorTests": {
"skip": False,
"skip": True,
},
"k6LoadTests": {
"skip": False,
Expand Down Expand Up @@ -287,7 +287,7 @@ def main(ctx):

pipelines = pipelines + k6LoadTests(ctx)

pipelines += checkStarlark()
# pipelines += checkStarlark()
pipelineSanityChecks(ctx, pipelines)
return pipelines

Expand Down Expand Up @@ -335,7 +335,8 @@ def testPipelines(ctx):
if "skip" not in config["wopiValidatorTests"] or not config["wopiValidatorTests"]["skip"]:
pipelines.append(wopiValidatorTests(ctx, "ocis", "default"))

pipelines += localApiTestPipeline(ctx)
# pipelines += localApiTestPipeline(ctx)
pipelines += ccsTestPipeline(ctx)

if "skip" not in config["apiTests"] or not config["apiTests"]["skip"]:
pipelines += apiTests(ctx)
Expand Down Expand Up @@ -847,6 +848,57 @@ def localApiTests(suite, storage, extra_environment = {}):
],
}]

def ccsTestPipeline(ctx):
storage = "ocis"

pipeline = {
"kind": "pipeline",
"type": "docker",
"name": "calendar-contacts-tests",
"platform": {
"os": "linux",
"arch": "amd64",
},
"steps": restoreBuildArtifactCache(ctx, "ocis-binary-amd64", "ocis/bin") +
ocisServer(storage, with_wrapper = False) +
ccsTests(storage) +
logRequests(),
"services": [],
"depends_on": getPipelineNames([buildOcisBinaryForTesting(ctx)]),
"trigger": {
"ref": [
"refs/heads/master",
"refs/pull/**",
],
},
}

pipelines = []
pipelines.append(pipeline)
return pipelines

def ccsTests(storage):
environment = {
"PATH_TO_OCIS": dirs["base"],
"TEST_SERVER_URL": "https://ocis-server:9200",
"OCIS_REVA_DATA_ROOT": "%s" % (dirs["ocisRevaDataRoot"] if storage == "owncloud" else ""),
"OCIS_SKELETON_STRATEGY": "%s" % ("copy" if storage == "owncloud" else "upload"),
"SEND_SCENARIO_LINE_REFERENCES": "true",
"STORAGE_DRIVER": storage,
}

return [{
"name": "ccsTests",
"image": "deepdiver/ccs-caldavtester:latest",
"environment": environment,
"commands": [
"pwd",
"ls -l /app",
"cd tests/caldav",
"python3 /app/testcaldav.py --ssl --print-details-onfail --basedir caldavtest CalDAV/caldavIOP.xml",
],
}]

def cs3ApiTests(ctx, storage, accounts_hash_difficulty = 4):
return {
"kind": "pipeline",
Expand Down
3 changes: 2 additions & 1 deletion tests/caldav/serverinfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
-->

<serverinfo>
<host>localhost</host>
<!-- for local testing change this - ocis-server is used for drone ci -->
<host>ocis-server</host>
<nonsslport>9200</nonsslport>
<sslport>9200</sslport>
<authtype>basic</authtype>
Expand Down

0 comments on commit edc1645

Please sign in to comment.