Skip to content

Commit

Permalink
enable async uploads
Browse files Browse the repository at this point in the history
  • Loading branch information
saw-jan committed Dec 27, 2022
1 parent f7e4cb2 commit 4684354
Showing 1 changed file with 9 additions and 27 deletions.
36 changes: 9 additions & 27 deletions .drone.star
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ config = {
"cs3ApiTests": {
"skip": False,
"earlyFail": True,
"enableAsyncUpload": True,
},
"wopiValidatorTests": {
"skip": False,
Expand All @@ -113,7 +112,6 @@ config = {
],
"skip": False,
"earlyFail": True,
"enableAsyncUpload": True,
},
"apiCors": {
"suites": [
Expand All @@ -124,15 +122,13 @@ config = {
"extraServerEnvironment": {
"OCIS_CORS_ALLOW_ORIGINS": "https://aphno.badal",
},
"enableAsyncUpload": True,
},
},
"apiTests": {
"numberOfParts": 10,
"skip": False,
"skipExceptParts": [],
"earlyFail": True,
"enableAsyncUpload": True,
},
"uiTests": {
"filterTags": "@ocisSmokeTest",
Expand Down Expand Up @@ -698,7 +694,6 @@ def localApiTestPipeline(ctx):
"extraServerEnvironment": {},
"storages": ["ocis"],
"accounts_hash_difficulty": 4,
"enableAsyncUpload": False,
}

if "localApiTests" in config:
Expand All @@ -710,14 +705,6 @@ def localApiTestPipeline(ctx):
for suite in params["suites"]:
early_fail = params["earlyFail"] if "earlyFail" in params else False
for storage in params["storages"]:
extra_server_environment = {}
if params["enableAsyncUpload"]:
extra_server_environment["STORAGE_USERS_OCIS_ASYNC_UPLOADS"] = True
extra_server_environment["OCIS_EVENTS_ENABLE_TLS"] = False
extra_server_environment["OCIS_INSECURE"] = True # will be removed

for item in params["extraServerEnvironment"]:
extra_server_environment[item] = params["extraServerEnvironment"][item]
pipeline = {
"kind": "pipeline",
"type": "docker",
Expand All @@ -728,7 +715,7 @@ def localApiTestPipeline(ctx):
},
"steps": skipIfUnchanged(ctx, "acceptance-tests") +
restoreBuildArtifactCache(ctx, "ocis-binary-amd64", "ocis/bin") +
ocisServer(storage, params["accounts_hash_difficulty"], extra_server_environment = extra_server_environment) +
ocisServer(storage, params["accounts_hash_difficulty"], extra_server_environment = params["extraServerEnvironment"]) +
restoreBuildArtifactCache(ctx, "testrunner", dirs["core"]) +
localApiTests(suite, storage, params["extraEnvironment"]) +
failEarly(ctx, early_fail),
Expand Down Expand Up @@ -776,11 +763,6 @@ def localApiTests(suite, storage, extra_environment = {}):

def cs3ApiTests(ctx, storage, accounts_hash_difficulty = 4):
early_fail = config["cs3ApiTests"]["earlyFail"] if "earlyFail" in config["cs3ApiTests"] else False
extra_server_environment = {}
if config["cs3ApiTests"]["enableAsyncUpload"]:
extra_server_environment["STORAGE_USERS_OCIS_ASYNC_UPLOADS"] = True
extra_server_environment["OCIS_EVENTS_ENABLE_TLS"] = False
extra_server_environment["OCIS_INSECURE"] = True # will be removed

return {
"kind": "pipeline",
Expand All @@ -792,7 +774,7 @@ def cs3ApiTests(ctx, storage, accounts_hash_difficulty = 4):
},
"steps": skipIfUnchanged(ctx, "acceptance-tests") +
restoreBuildArtifactCache(ctx, "ocis-binary-amd64", "ocis/bin") +
ocisServer(storage, accounts_hash_difficulty, [], extra_server_environment = extra_server_environment) +
ocisServer(storage, accounts_hash_difficulty, []) +
[
{
"name": "cs3ApiTests-%s" % (storage),
Expand Down Expand Up @@ -921,12 +903,6 @@ def coreApiTests(ctx, part_number = 1, number_of_parts = 1, storage = "ocis", ac
filterTags = "~@skipOnGraph&&~@skipOnOcis&&~@notToImplementOnOCIS&&~@toImplementOnOCIS&&~comments-app-required&&~@federation-app-required&&~@notifications-app-required&&~systemtags-app-required&&~@local_storage&&~@skipOnOcis-%s-Storage&&~@caldav&&~@carddav" % ("OC" if storage == "owncloud" else "OCIS")
expectedFailuresFile = "%s/tests/acceptance/expected-failures-API-on-%s-storage.md" % (dirs["base"], storage.upper())

extra_server_environment = {}
if config["apiTests"]["enableAsyncUpload"]:
extra_server_environment["STORAGE_USERS_OCIS_ASYNC_UPLOADS"] = True
extra_server_environment["OCIS_EVENTS_ENABLE_TLS"] = False
extra_server_environment["OCIS_INSECURE"] = True # will be removed

return {
"kind": "pipeline",
"type": "docker",
Expand All @@ -937,7 +913,7 @@ def coreApiTests(ctx, part_number = 1, number_of_parts = 1, storage = "ocis", ac
},
"steps": skipIfUnchanged(ctx, "acceptance-tests") +
restoreBuildArtifactCache(ctx, "ocis-binary-amd64", "ocis/bin") +
ocisServer(storage, accounts_hash_difficulty, extra_server_environment = extra_server_environment) +
ocisServer(storage, accounts_hash_difficulty) +
restoreBuildArtifactCache(ctx, "testrunner", dirs["core"]) +
[
{
Expand Down Expand Up @@ -2065,6 +2041,8 @@ def ocisServer(storage, accounts_hash_difficulty = 4, volumes = [], depends_on =
"IDM_CREATE_DEMO_USERS": True,
"IDM_ADMIN_PASSWORD": "admin", # override the random admin password from `ocis init`
"FRONTEND_SEARCH_MIN_LENGTH": "2",
"STORAGE_USERS_OCIS_ASYNC_UPLOADS": True,
"OCIS_EVENTS_ENABLE_TLS": False,
}
wait_for_ocis = {
"name": "wait-for-ocis-server",
Expand Down Expand Up @@ -2100,6 +2078,8 @@ def ocisServer(storage, accounts_hash_difficulty = 4, volumes = [], depends_on =
"APP_PROVIDER_WOPI_INSECURE": "true",
"APP_PROVIDER_WOPI_WOPI_SERVER_EXTERNAL_URL": "http://wopiserver:8880",
"APP_PROVIDER_WOPI_FOLDER_URL_BASE_URL": "https://ocis-server:9200",
"STORAGE_USERS_OCIS_ASYNC_UPLOADS": True,
"OCIS_EVENTS_ENABLE_TLS": False,
}
wait_for_ocis = {
"name": "wait-for-ocis-server",
Expand Down Expand Up @@ -2162,6 +2142,8 @@ def ocisServer(storage, accounts_hash_difficulty = 4, volumes = [], depends_on =
"OCIS_CONFIG_DIR": "/etc/ocis",
"PROXY_ENABLE_BASIC_AUTH": "true",
"FRONTEND_SEARCH_MIN_LENGTH": "2",
"STORAGE_USERS_OCIS_ASYNC_UPLOADS": True,
"OCIS_EVENTS_ENABLE_TLS": False,
}
wait_for_ocis = {
"name": "wait-for-ocis-server",
Expand Down

0 comments on commit 4684354

Please sign in to comment.