mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-01 10:40:30 -05:00
Compare commits
12 Commits
replaceCII
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
45bc0b60d1 | ||
|
|
9c651af32d | ||
|
|
15ece66e96 | ||
|
|
2231a7b280 | ||
|
|
8d092b49a9 | ||
|
|
38786ab291 | ||
|
|
0ac473af73 | ||
|
|
01600cdc4b | ||
|
|
c5c5399067 | ||
|
|
151ccb1609 | ||
|
|
941aa689d2 | ||
|
|
01b768d33c |
638
.woodpecker.star
638
.woodpecker.star
@@ -307,8 +307,8 @@ config = {
|
|||||||
"ANTIVIRUS_CLAMAV_SOCKET": "tcp://clamav:3310",
|
"ANTIVIRUS_CLAMAV_SOCKET": "tcp://clamav:3310",
|
||||||
"OC_ASYNC_UPLOADS": True,
|
"OC_ASYNC_UPLOADS": True,
|
||||||
"OC_ADD_RUN_SERVICES": "antivirus",
|
"OC_ADD_RUN_SERVICES": "antivirus",
|
||||||
"STORAGE_USERS_DRIVER": "decomposed",
|
|
||||||
},
|
},
|
||||||
|
"storages": ["decomposed"],
|
||||||
},
|
},
|
||||||
"multiTenancy": {
|
"multiTenancy": {
|
||||||
"suites": [
|
"suites": [
|
||||||
@@ -345,16 +345,29 @@ config = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"apiTests": {
|
"coreApiTests": {
|
||||||
"numberOfParts": 7,
|
"numberOfParts": 7,
|
||||||
"skip": False,
|
"skip": False,
|
||||||
"skipExceptParts": [],
|
"skipExceptParts": [],
|
||||||
|
"storages": ["posix"],
|
||||||
},
|
},
|
||||||
"e2eTests": {
|
"e2eTests": {
|
||||||
"part": {
|
"part": {
|
||||||
"skip": False,
|
"skip": False,
|
||||||
"totalParts": 4, # divide and run all suites in parts (divide pipelines)
|
"totalParts": 4, # divide and run all suites in parts (divide pipelines)
|
||||||
"xsuites": ["search", "app-provider", "app-provider-onlyOffice", "app-store", "keycloak", "oidc", "ocm", "a11y", "mobile-view", "navigation"], # suites to skip
|
# suites to skip
|
||||||
|
"xsuites": [
|
||||||
|
"search",
|
||||||
|
"app-provider",
|
||||||
|
"app-provider-onlyOffice",
|
||||||
|
"app-store",
|
||||||
|
"keycloak",
|
||||||
|
"oidc",
|
||||||
|
"ocm",
|
||||||
|
"a11y",
|
||||||
|
"mobile-view",
|
||||||
|
"navigation",
|
||||||
|
],
|
||||||
},
|
},
|
||||||
"search": {
|
"search": {
|
||||||
"skip": False,
|
"skip": False,
|
||||||
@@ -609,16 +622,9 @@ def testPipelines(ctx):
|
|||||||
pipelines.append(wopiValidatorTests(ctx, storage, "cs3", "default"))
|
pipelines.append(wopiValidatorTests(ctx, storage, "cs3", "default"))
|
||||||
|
|
||||||
pipelines += localApiTestPipeline(ctx)
|
pipelines += localApiTestPipeline(ctx)
|
||||||
|
pipelines += coreApiTestPipeline(ctx)
|
||||||
if "skip" not in config["apiTests"] or not config["apiTests"]["skip"]:
|
pipelines += e2eTestPipeline(ctx)
|
||||||
pipelines += apiTests(ctx)
|
pipelines += multiServiceE2ePipeline(ctx)
|
||||||
|
|
||||||
enable_watch_fs = [False]
|
|
||||||
if ctx.build.event == "cron":
|
|
||||||
enable_watch_fs.append(True)
|
|
||||||
|
|
||||||
for run_with_watch_fs_enabled in enable_watch_fs:
|
|
||||||
pipelines += e2eTestPipeline(ctx, run_with_watch_fs_enabled) + multiServiceE2ePipeline(ctx, run_with_watch_fs_enabled)
|
|
||||||
|
|
||||||
if ("skip" not in config["k6LoadTests"] or not config["k6LoadTests"]["skip"]) and ("k6-test" in ctx.build.title.lower() or ctx.build.event == "cron"):
|
if ("skip" not in config["k6LoadTests"] or not config["k6LoadTests"]["skip"]) and ("k6-test" in ctx.build.title.lower() or ctx.build.event == "cron"):
|
||||||
pipelines += k6LoadTests(ctx)
|
pipelines += k6LoadTests(ctx)
|
||||||
@@ -995,124 +1001,6 @@ def codestyle(ctx):
|
|||||||
|
|
||||||
return pipelines
|
return pipelines
|
||||||
|
|
||||||
def localApiTestPipeline(ctx):
|
|
||||||
pipelines = []
|
|
||||||
|
|
||||||
with_remote_php = [True]
|
|
||||||
enable_watch_fs = [False]
|
|
||||||
if ctx.build.event == "cron":
|
|
||||||
with_remote_php.append(False)
|
|
||||||
enable_watch_fs.append(True)
|
|
||||||
|
|
||||||
storages = ["posix"]
|
|
||||||
if "[decomposed]" in ctx.build.title.lower():
|
|
||||||
storages = ["decomposed"]
|
|
||||||
|
|
||||||
defaults = {
|
|
||||||
"suites": {},
|
|
||||||
"skip": False,
|
|
||||||
"extraTestEnvironment": {},
|
|
||||||
"extraServerEnvironment": {},
|
|
||||||
"storages": storages,
|
|
||||||
"accounts_hash_difficulty": 4,
|
|
||||||
"emailNeeded": False,
|
|
||||||
"antivirusNeeded": False,
|
|
||||||
"tikaNeeded": False,
|
|
||||||
"federationServer": False,
|
|
||||||
"collaborationServiceNeeded": False,
|
|
||||||
"extraCollaborationEnvironment": {},
|
|
||||||
"withRemotePhp": with_remote_php,
|
|
||||||
"enableWatchFs": enable_watch_fs,
|
|
||||||
"ldapNeeded": False,
|
|
||||||
"generateVirusFiles": False,
|
|
||||||
}
|
|
||||||
|
|
||||||
if "localApiTests" in config:
|
|
||||||
for name, matrix in config["localApiTests"].items():
|
|
||||||
if "skip" not in matrix or not matrix["skip"]:
|
|
||||||
params = {}
|
|
||||||
for item in defaults:
|
|
||||||
params[item] = matrix[item] if item in matrix else defaults[item]
|
|
||||||
for storage in params["storages"]:
|
|
||||||
for run_with_remote_php in params["withRemotePhp"]:
|
|
||||||
for run_with_watch_fs_enabled in params["enableWatchFs"]:
|
|
||||||
pipeline = {
|
|
||||||
"name": "%s-%s%s-%s%s" % ("CLI" if name.startswith("cli") else "API", name, "-withoutRemotePhp" if not run_with_remote_php else "", "decomposed" if name.startswith("cli") else storage, "-watchfs" if run_with_watch_fs_enabled else ""),
|
|
||||||
"steps": restoreBuildArtifactCache(ctx, dirs["opencloudBinArtifact"], dirs["opencloudBinPath"]) +
|
|
||||||
(tikaService() if params["tikaNeeded"] else []) +
|
|
||||||
(waitForServices("online-offices", ["collabora:9980", "onlyoffice:443", "fakeoffice:8080"]) if params["collaborationServiceNeeded"] else []) +
|
|
||||||
(waitForClamavService() if params["antivirusNeeded"] else []) +
|
|
||||||
(waitForEmailService() if params["emailNeeded"] else []) +
|
|
||||||
(ldapService() if params["ldapNeeded"] else []) +
|
|
||||||
(waitForLdapService() if params["ldapNeeded"] else []) +
|
|
||||||
opencloudServer(storage, params["accounts_hash_difficulty"], extra_server_environment = params["extraServerEnvironment"], with_wrapper = True, tika_enabled = params["tikaNeeded"], watch_fs_enabled = run_with_watch_fs_enabled) +
|
|
||||||
(opencloudServer(storage, params["accounts_hash_difficulty"], deploy_type = "federation", extra_server_environment = params["extraServerEnvironment"], watch_fs_enabled = run_with_watch_fs_enabled) if params["federationServer"] else []) +
|
|
||||||
((wopiCollaborationService("fakeoffice") + wopiCollaborationService("collabora") + wopiCollaborationService("onlyoffice")) if params["collaborationServiceNeeded"] else []) +
|
|
||||||
(openCloudHealthCheck("wopi", ["wopi-collabora:9304", "wopi-onlyoffice:9304", "wopi-fakeoffice:9304"]) if params["collaborationServiceNeeded"] else []) +
|
|
||||||
localApiTests(name, params["suites"], storage, params["extraTestEnvironment"], run_with_remote_php, params["generateVirusFiles"]) +
|
|
||||||
logRequests(),
|
|
||||||
"services": (emailService() if params["emailNeeded"] else []) +
|
|
||||||
(clamavService() if params["antivirusNeeded"] else []) +
|
|
||||||
((fakeOffice() + collaboraService() + onlyofficeService()) if params["collaborationServiceNeeded"] else []),
|
|
||||||
"depends_on": getPipelineNames(buildOpencloudBinaryForTesting(ctx)),
|
|
||||||
"when": [
|
|
||||||
event["base"],
|
|
||||||
event["cron"],
|
|
||||||
{
|
|
||||||
"event": "pull_request",
|
|
||||||
"path": {
|
|
||||||
"exclude": skipIfUnchanged(ctx, "acceptance-tests"),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
}
|
|
||||||
pipelines.append(pipeline)
|
|
||||||
return pipelines
|
|
||||||
|
|
||||||
def localApiTests(name, suites, storage = "decomposed", extra_environment = {}, with_remote_php = False, generate_virus_files = False):
|
|
||||||
test_dir = "%s/tests/acceptance" % dirs["base"]
|
|
||||||
expected_failures_file = "%s/expected-failures-localAPI-on-%s-storage.md" % (test_dir, storage)
|
|
||||||
|
|
||||||
environment = {
|
|
||||||
"TEST_SERVER_URL": OC_URL,
|
|
||||||
"TEST_SERVER_FED_URL": OC_FED_URL,
|
|
||||||
"SEND_SCENARIO_LINE_REFERENCES": True,
|
|
||||||
"STORAGE_DRIVER": storage,
|
|
||||||
"BEHAT_SUITES": ",".join(suites),
|
|
||||||
"BEHAT_FILTER_TAGS": "~@skip&&~@skipOnOpencloud-%s-Storage" % storage,
|
|
||||||
"EXPECTED_FAILURES_FILE": expected_failures_file,
|
|
||||||
"UPLOAD_DELETE_WAIT_TIME": "1" if storage == "owncloud" else 0,
|
|
||||||
"OC_WRAPPER_URL": "http://%s:5200" % OC_SERVER_NAME,
|
|
||||||
"WITH_REMOTE_PHP": with_remote_php,
|
|
||||||
"COLLABORATION_SERVICE_URL": "http://wopi-fakeoffice:9300",
|
|
||||||
"OC_STORAGE_PATH": "$HOME/.opencloud/storage/users",
|
|
||||||
"USE_BEARER_TOKEN": True,
|
|
||||||
}
|
|
||||||
|
|
||||||
for item in extra_environment:
|
|
||||||
environment[item] = extra_environment[item]
|
|
||||||
|
|
||||||
commands = []
|
|
||||||
|
|
||||||
# Generate EICAR virus test files if needed
|
|
||||||
if generate_virus_files:
|
|
||||||
commands.append("chmod +x %s/tests/acceptance/scripts/generate-virus-files.sh" % dirs["base"])
|
|
||||||
commands.append("bash %s/tests/acceptance/scripts/generate-virus-files.sh" % dirs["base"])
|
|
||||||
|
|
||||||
# Merge expected failures
|
|
||||||
if not with_remote_php:
|
|
||||||
commands.append("cat %s/expected-failures-without-remotephp.md >> %s" % (test_dir, expected_failures_file))
|
|
||||||
|
|
||||||
# Run tests
|
|
||||||
commands.append("make -C %s test-acceptance-api" % (dirs["base"]))
|
|
||||||
|
|
||||||
return [{
|
|
||||||
"name": "localApiTests-%s" % name,
|
|
||||||
"image": OC_CI_PHP % DEFAULT_PHP_VERSION,
|
|
||||||
"environment": environment,
|
|
||||||
"commands": commands,
|
|
||||||
}]
|
|
||||||
|
|
||||||
def cs3ApiTests(ctx, storage, accounts_hash_difficulty = 4):
|
def cs3ApiTests(ctx, storage, accounts_hash_difficulty = 4):
|
||||||
return {
|
return {
|
||||||
"name": "cs3ApiTests-%s" % storage,
|
"name": "cs3ApiTests-%s" % storage,
|
||||||
@@ -1257,62 +1145,8 @@ def wopiValidatorTests(ctx, storage, wopiServerType, accounts_hash_difficulty =
|
|||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
def coreApiTests(ctx, part_number = 1, number_of_parts = 1, with_remote_php = False, accounts_hash_difficulty = 4, watch_fs_enabled = False):
|
def localApiTestPipeline(ctx):
|
||||||
storage = "posix"
|
|
||||||
if "[decomposed]" in ctx.build.title.lower():
|
|
||||||
storage = "decomposed"
|
|
||||||
filterTags = "~@skipOnOpencloud-%s-Storage" % storage
|
|
||||||
test_dir = "%s/tests/acceptance" % dirs["base"]
|
|
||||||
expected_failures_file = "%s/expected-failures-API-on-%s-storage.md" % (test_dir, storage)
|
|
||||||
|
|
||||||
return {
|
|
||||||
"name": "Core-API-Tests-%s%s-%s%s" % (part_number, "-withoutRemotePhp" if not with_remote_php else "", storage, "-watchfs" if watch_fs_enabled else ""),
|
|
||||||
"steps": restoreBuildArtifactCache(ctx, dirs["opencloudBinArtifact"], dirs["opencloudBinPath"]) +
|
|
||||||
opencloudServer(storage, accounts_hash_difficulty, with_wrapper = True, watch_fs_enabled = watch_fs_enabled) +
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"name": "oC10ApiTests-%s" % part_number,
|
|
||||||
"image": OC_CI_PHP % DEFAULT_PHP_VERSION,
|
|
||||||
"environment": {
|
|
||||||
"TEST_SERVER_URL": OC_URL,
|
|
||||||
"OC_REVA_DATA_ROOT": "%s" % (dirs["opencloudRevaDataRoot"] if storage == "owncloud" else ""),
|
|
||||||
"SEND_SCENARIO_LINE_REFERENCES": True,
|
|
||||||
"STORAGE_DRIVER": storage,
|
|
||||||
"BEHAT_FILTER_TAGS": filterTags,
|
|
||||||
"DIVIDE_INTO_NUM_PARTS": number_of_parts,
|
|
||||||
"RUN_PART": part_number,
|
|
||||||
"ACCEPTANCE_TEST_TYPE": "core-api",
|
|
||||||
"EXPECTED_FAILURES_FILE": expected_failures_file,
|
|
||||||
"UPLOAD_DELETE_WAIT_TIME": "1" if storage == "owncloud" else 0,
|
|
||||||
"OC_WRAPPER_URL": "http://%s:5200" % OC_SERVER_NAME,
|
|
||||||
"WITH_REMOTE_PHP": with_remote_php,
|
|
||||||
},
|
|
||||||
"commands": [
|
|
||||||
# merge the expected failures
|
|
||||||
"" if with_remote_php else "cat %s/expected-failures-without-remotephp.md >> %s" % (test_dir, expected_failures_file),
|
|
||||||
"make -C %s test-acceptance-api" % (dirs["base"]),
|
|
||||||
],
|
|
||||||
},
|
|
||||||
] +
|
|
||||||
logRequests(),
|
|
||||||
"services": redisForOCStorage(storage),
|
|
||||||
"depends_on": getPipelineNames(buildOpencloudBinaryForTesting(ctx)),
|
|
||||||
"when": [
|
|
||||||
event["base"],
|
|
||||||
event["cron"],
|
|
||||||
{
|
|
||||||
"event": "pull_request",
|
|
||||||
"path": {
|
|
||||||
"exclude": skipIfUnchanged(ctx, "acceptance-tests"),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
}
|
|
||||||
|
|
||||||
def apiTests(ctx):
|
|
||||||
pipelines = []
|
pipelines = []
|
||||||
debugParts = config["apiTests"]["skipExceptParts"]
|
|
||||||
debugPartsEnabled = (len(debugParts) != 0)
|
|
||||||
|
|
||||||
with_remote_php = [True]
|
with_remote_php = [True]
|
||||||
enable_watch_fs = [False]
|
enable_watch_fs = [False]
|
||||||
@@ -1321,19 +1155,239 @@ def apiTests(ctx):
|
|||||||
enable_watch_fs.append(True)
|
enable_watch_fs.append(True)
|
||||||
|
|
||||||
defaults = {
|
defaults = {
|
||||||
|
"suites": {},
|
||||||
|
"skip": False,
|
||||||
|
"extraTestEnvironment": {},
|
||||||
|
"extraServerEnvironment": {},
|
||||||
|
"storages": ["posix"],
|
||||||
|
"accounts_hash_difficulty": 4,
|
||||||
|
"emailNeeded": False,
|
||||||
|
"antivirusNeeded": False,
|
||||||
|
"tikaNeeded": False,
|
||||||
|
"federationServer": False,
|
||||||
|
"collaborationServiceNeeded": False,
|
||||||
|
"extraCollaborationEnvironment": {},
|
||||||
"withRemotePhp": with_remote_php,
|
"withRemotePhp": with_remote_php,
|
||||||
"enableWatchFs": enable_watch_fs,
|
"enableWatchFs": enable_watch_fs,
|
||||||
|
"ldapNeeded": False,
|
||||||
|
"generateVirusFiles": False,
|
||||||
}
|
}
|
||||||
|
|
||||||
for runPart in range(1, config["apiTests"]["numberOfParts"] + 1):
|
if "localApiTests" in config:
|
||||||
for run_with_remote_php in defaults["withRemotePhp"]:
|
for name, matrix in config["localApiTests"].items():
|
||||||
for run_with_watch_fs_enabled in defaults["enableWatchFs"]:
|
if "skip" not in matrix or not matrix["skip"]:
|
||||||
if not debugPartsEnabled or (debugPartsEnabled and runPart in debugParts):
|
params = {}
|
||||||
pipelines.append(coreApiTests(ctx, runPart, config["apiTests"]["numberOfParts"], run_with_remote_php, watch_fs_enabled = run_with_watch_fs_enabled))
|
for item in defaults:
|
||||||
|
params[item] = matrix[item] if item in matrix else defaults[item]
|
||||||
|
|
||||||
|
# use decomposed storage if specified in the PR title
|
||||||
|
# run CLI tests only with decomposed storage
|
||||||
|
if "[decomposed]" in ctx.build.title.lower() or name.startswith("cli"):
|
||||||
|
params["storages"] = ["decomposed"]
|
||||||
|
|
||||||
|
for storage in params["storages"]:
|
||||||
|
for run_with_remote_php in params["withRemotePhp"]:
|
||||||
|
for run_with_watch_fs_enabled in params["enableWatchFs"]:
|
||||||
|
pipeline_name = "API"
|
||||||
|
if name.startswith("cli"):
|
||||||
|
pipeline_name = "CLI"
|
||||||
|
pipeline_name += "-%s" % name
|
||||||
|
if not run_with_remote_php:
|
||||||
|
pipeline_name += "-withoutRemotePhp"
|
||||||
|
pipeline_name += "-%s" % storage
|
||||||
|
if run_with_watch_fs_enabled:
|
||||||
|
pipeline_name += "-watchfs"
|
||||||
|
|
||||||
|
pipeline = {
|
||||||
|
"name": pipeline_name,
|
||||||
|
"steps": restoreBuildArtifactCache(ctx, dirs["opencloudBinArtifact"], dirs["opencloudBinPath"]) +
|
||||||
|
(tikaService() if params["tikaNeeded"] else []) +
|
||||||
|
(waitForServices("online-offices", ["collabora:9980", "onlyoffice:443", "fakeoffice:8080"]) if params["collaborationServiceNeeded"] else []) +
|
||||||
|
(waitForClamavService() if params["antivirusNeeded"] else []) +
|
||||||
|
(waitForEmailService() if params["emailNeeded"] else []) +
|
||||||
|
(ldapService() if params["ldapNeeded"] else []) +
|
||||||
|
(waitForLdapService() if params["ldapNeeded"] else []) +
|
||||||
|
opencloudServer(
|
||||||
|
storage,
|
||||||
|
params["accounts_hash_difficulty"],
|
||||||
|
extra_server_environment = params["extraServerEnvironment"],
|
||||||
|
with_wrapper = True,
|
||||||
|
tika_enabled = params["tikaNeeded"],
|
||||||
|
watch_fs_enabled = run_with_watch_fs_enabled,
|
||||||
|
) +
|
||||||
|
(opencloudServer(storage, params["accounts_hash_difficulty"], deploy_type = "federation", extra_server_environment = params["extraServerEnvironment"], watch_fs_enabled = run_with_watch_fs_enabled) if params["federationServer"] else []) +
|
||||||
|
((wopiCollaborationService("fakeoffice") + wopiCollaborationService("collabora") + wopiCollaborationService("onlyoffice")) if params["collaborationServiceNeeded"] else []) +
|
||||||
|
(openCloudHealthCheck("wopi", ["wopi-collabora:9304", "wopi-onlyoffice:9304", "wopi-fakeoffice:9304"]) if params["collaborationServiceNeeded"] else []) +
|
||||||
|
localApiTest(params["suites"], storage, params["extraTestEnvironment"], run_with_remote_php, params["generateVirusFiles"]) +
|
||||||
|
logRequests(),
|
||||||
|
"services": (emailService() if params["emailNeeded"] else []) +
|
||||||
|
(clamavService() if params["antivirusNeeded"] else []) +
|
||||||
|
((fakeOffice() + collaboraService() + onlyofficeService()) if params["collaborationServiceNeeded"] else []),
|
||||||
|
"depends_on": getPipelineNames(buildOpencloudBinaryForTesting(ctx)),
|
||||||
|
"when": [
|
||||||
|
event["base"],
|
||||||
|
event["cron"],
|
||||||
|
{
|
||||||
|
"event": "pull_request",
|
||||||
|
"path": {
|
||||||
|
"exclude": skipIfUnchanged(ctx, "acceptance-tests"),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}
|
||||||
|
pipelines.append(pipeline)
|
||||||
return pipelines
|
return pipelines
|
||||||
|
|
||||||
def e2eTestPipeline(ctx, watch_fs_enabled = False):
|
def localApiTest(suites, storage = "decomposed", extra_environment = {}, with_remote_php = False, generate_virus_files = False):
|
||||||
|
test_dir = "%s/tests/acceptance" % dirs["base"]
|
||||||
|
expected_failures_file = "%s/expected-failures-localAPI-on-%s-storage.md" % (test_dir, storage)
|
||||||
|
|
||||||
|
environment = {
|
||||||
|
"TEST_SERVER_URL": OC_URL,
|
||||||
|
"TEST_SERVER_FED_URL": OC_FED_URL,
|
||||||
|
"SEND_SCENARIO_LINE_REFERENCES": True,
|
||||||
|
"STORAGE_DRIVER": storage,
|
||||||
|
"BEHAT_SUITES": ",".join(suites),
|
||||||
|
"BEHAT_FILTER_TAGS": "~@skip&&~@skipOnOpencloud-%s-Storage" % storage,
|
||||||
|
"EXPECTED_FAILURES_FILE": expected_failures_file,
|
||||||
|
"UPLOAD_DELETE_WAIT_TIME": "1" if storage == "owncloud" else 0,
|
||||||
|
"OC_WRAPPER_URL": "http://%s:5200" % OC_SERVER_NAME,
|
||||||
|
"WITH_REMOTE_PHP": with_remote_php,
|
||||||
|
"COLLABORATION_SERVICE_URL": "http://wopi-fakeoffice:9300",
|
||||||
|
"OC_STORAGE_PATH": "$HOME/.opencloud/storage/users",
|
||||||
|
"USE_BEARER_TOKEN": True,
|
||||||
|
}
|
||||||
|
|
||||||
|
for item in extra_environment:
|
||||||
|
environment[item] = extra_environment[item]
|
||||||
|
|
||||||
|
commands = []
|
||||||
|
|
||||||
|
# Generate EICAR virus test files if needed
|
||||||
|
if generate_virus_files:
|
||||||
|
commands.append("chmod +x %s/tests/acceptance/scripts/generate-virus-files.sh" % dirs["base"])
|
||||||
|
commands.append("bash %s/tests/acceptance/scripts/generate-virus-files.sh" % dirs["base"])
|
||||||
|
|
||||||
|
# Merge expected failures
|
||||||
|
if not with_remote_php:
|
||||||
|
commands.append("cat %s/expected-failures-without-remotephp.md >> %s" % (test_dir, expected_failures_file))
|
||||||
|
|
||||||
|
# Run tests
|
||||||
|
commands.append("make -C %s test-acceptance-api" % (dirs["base"]))
|
||||||
|
|
||||||
|
return [{
|
||||||
|
"name": "api-tests",
|
||||||
|
"image": OC_CI_PHP % DEFAULT_PHP_VERSION,
|
||||||
|
"environment": environment,
|
||||||
|
"commands": commands,
|
||||||
|
}]
|
||||||
|
|
||||||
|
def coreApiTestPipeline(ctx):
|
||||||
|
defaults = {
|
||||||
|
"withRemotePhp": [True],
|
||||||
|
"enableWatchFs": [False],
|
||||||
|
"storages": ["posix"],
|
||||||
|
"numberOfParts": 7,
|
||||||
|
"skipExceptParts": [],
|
||||||
|
"skip": False,
|
||||||
|
"accounts_hash_difficulty": 4,
|
||||||
|
}
|
||||||
|
|
||||||
|
pipelines = []
|
||||||
|
if "coreApiTests" in config:
|
||||||
|
matrix = config["coreApiTests"]
|
||||||
|
if matrix["skip"]:
|
||||||
|
return pipelines
|
||||||
|
|
||||||
|
params = {}
|
||||||
|
for item in defaults:
|
||||||
|
params[item] = matrix[item] if item in matrix else defaults[item]
|
||||||
|
|
||||||
|
# use decomposed storage if specified in the PR title
|
||||||
|
if "[decomposed]" in ctx.build.title.lower():
|
||||||
|
params["storages"] = ["decomposed"]
|
||||||
|
|
||||||
|
if ctx.build.event == "cron":
|
||||||
|
params["withRemotePhp"] = [True, False]
|
||||||
|
params["enableWatchFs"] = [True, False]
|
||||||
|
|
||||||
|
debugParts = params["skipExceptParts"]
|
||||||
|
debugPartsEnabled = (len(debugParts) != 0)
|
||||||
|
|
||||||
|
for storage in params["storages"]:
|
||||||
|
for runPart in range(1, params["numberOfParts"] + 1):
|
||||||
|
for run_with_remote_php in params["withRemotePhp"]:
|
||||||
|
for run_with_watch_fs_enabled in params["enableWatchFs"]:
|
||||||
|
if not debugPartsEnabled or (debugPartsEnabled and runPart in debugParts):
|
||||||
|
pipeline_name = "Core-API-%s" % runPart
|
||||||
|
if not run_with_remote_php:
|
||||||
|
pipeline_name += "-withoutRemotePhp"
|
||||||
|
pipeline_name += "-%s" % storage
|
||||||
|
if run_with_watch_fs_enabled:
|
||||||
|
pipeline_name += "-watchfs"
|
||||||
|
|
||||||
|
pipeline = {
|
||||||
|
"name": pipeline_name,
|
||||||
|
"steps": restoreBuildArtifactCache(ctx, dirs["opencloudBinArtifact"], dirs["opencloudBinPath"]) +
|
||||||
|
opencloudServer(
|
||||||
|
storage,
|
||||||
|
params["accounts_hash_difficulty"],
|
||||||
|
with_wrapper = True,
|
||||||
|
watch_fs_enabled = run_with_watch_fs_enabled,
|
||||||
|
) +
|
||||||
|
coreApiTest(
|
||||||
|
runPart,
|
||||||
|
params["numberOfParts"],
|
||||||
|
run_with_remote_php,
|
||||||
|
storage,
|
||||||
|
) +
|
||||||
|
logRequests(),
|
||||||
|
"services": redisForOCStorage(storage),
|
||||||
|
"depends_on": getPipelineNames(buildOpencloudBinaryForTesting(ctx)),
|
||||||
|
"when": [
|
||||||
|
event["base"],
|
||||||
|
event["cron"],
|
||||||
|
{
|
||||||
|
"event": "pull_request",
|
||||||
|
"path": {
|
||||||
|
"exclude": skipIfUnchanged(ctx, "acceptance-tests"),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}
|
||||||
|
pipelines.append(pipeline)
|
||||||
|
return pipelines
|
||||||
|
|
||||||
|
def coreApiTest(part_number = 1, number_of_parts = 1, with_remote_php = False, storage = "posix"):
|
||||||
|
filterTags = "~@skipOnOpencloud-%s-Storage" % storage
|
||||||
|
test_dir = "%s/tests/acceptance" % dirs["base"]
|
||||||
|
expected_failures_file = "%s/expected-failures-API-on-%s-storage.md" % (test_dir, storage)
|
||||||
|
|
||||||
|
return [{
|
||||||
|
"name": "api-tests",
|
||||||
|
"image": OC_CI_PHP % DEFAULT_PHP_VERSION,
|
||||||
|
"environment": {
|
||||||
|
"TEST_SERVER_URL": OC_URL,
|
||||||
|
"OC_REVA_DATA_ROOT": "%s" % (dirs["opencloudRevaDataRoot"] if storage == "owncloud" else ""),
|
||||||
|
"SEND_SCENARIO_LINE_REFERENCES": True,
|
||||||
|
"STORAGE_DRIVER": storage,
|
||||||
|
"BEHAT_FILTER_TAGS": filterTags,
|
||||||
|
"DIVIDE_INTO_NUM_PARTS": number_of_parts,
|
||||||
|
"RUN_PART": part_number,
|
||||||
|
"ACCEPTANCE_TEST_TYPE": "core-api",
|
||||||
|
"EXPECTED_FAILURES_FILE": expected_failures_file,
|
||||||
|
"UPLOAD_DELETE_WAIT_TIME": "1" if storage == "owncloud" else 0,
|
||||||
|
"OC_WRAPPER_URL": "http://%s:5200" % OC_SERVER_NAME,
|
||||||
|
"WITH_REMOTE_PHP": with_remote_php,
|
||||||
|
},
|
||||||
|
"commands": [
|
||||||
|
# merge the expected failures
|
||||||
|
"" if with_remote_php else "cat %s/expected-failures-without-remotephp.md >> %s" % (test_dir, expected_failures_file),
|
||||||
|
"make -C %s test-acceptance-api" % (dirs["base"]),
|
||||||
|
],
|
||||||
|
}]
|
||||||
|
|
||||||
|
def e2eTestPipeline(ctx):
|
||||||
defaults = {
|
defaults = {
|
||||||
"skip": False,
|
"skip": False,
|
||||||
"suites": [],
|
"suites": [],
|
||||||
@@ -1341,6 +1395,8 @@ def e2eTestPipeline(ctx, watch_fs_enabled = False):
|
|||||||
"totalParts": 0,
|
"totalParts": 0,
|
||||||
"tikaNeeded": False,
|
"tikaNeeded": False,
|
||||||
"reportTracing": False,
|
"reportTracing": False,
|
||||||
|
"enableWatchFs": [False],
|
||||||
|
"storages": ["posix"],
|
||||||
}
|
}
|
||||||
|
|
||||||
extra_server_environment = {
|
extra_server_environment = {
|
||||||
@@ -1373,10 +1429,6 @@ def e2eTestPipeline(ctx, watch_fs_enabled = False):
|
|||||||
if ctx.build.event == "tag":
|
if ctx.build.event == "tag":
|
||||||
return pipelines
|
return pipelines
|
||||||
|
|
||||||
storage = "posix"
|
|
||||||
if "[decomposed]" in ctx.build.title.lower():
|
|
||||||
storage = "decomposed"
|
|
||||||
|
|
||||||
for name, suite in config["e2eTests"].items():
|
for name, suite in config["e2eTests"].items():
|
||||||
if "skip" in suite and suite["skip"]:
|
if "skip" in suite and suite["skip"]:
|
||||||
continue
|
continue
|
||||||
@@ -1385,6 +1437,12 @@ def e2eTestPipeline(ctx, watch_fs_enabled = False):
|
|||||||
for item in defaults:
|
for item in defaults:
|
||||||
params[item] = suite[item] if item in suite else defaults[item]
|
params[item] = suite[item] if item in suite else defaults[item]
|
||||||
|
|
||||||
|
if ctx.build.event == "cron":
|
||||||
|
params["enableWatchFs"] = [False, True]
|
||||||
|
|
||||||
|
if "[decomposed]" in ctx.build.title.lower():
|
||||||
|
params["storages"] = ["decomposed"]
|
||||||
|
|
||||||
e2e_args = ""
|
e2e_args = ""
|
||||||
if params["totalParts"] > 0:
|
if params["totalParts"] > 0:
|
||||||
e2e_args = "--total-parts %d" % params["totalParts"]
|
e2e_args = "--total-parts %d" % params["totalParts"]
|
||||||
@@ -1398,61 +1456,67 @@ def e2eTestPipeline(ctx, watch_fs_enabled = False):
|
|||||||
if "with-tracing" in ctx.build.title.lower():
|
if "with-tracing" in ctx.build.title.lower():
|
||||||
params["reportTracing"] = True
|
params["reportTracing"] = True
|
||||||
|
|
||||||
steps_before = \
|
for storage in params["storages"]:
|
||||||
restoreBuildArtifactCache(ctx, dirs["opencloudBinArtifact"], dirs["opencloudBin"]) + \
|
for watch_fs_enabled in params["enableWatchFs"]:
|
||||||
restoreWebCache() + \
|
steps_before = \
|
||||||
restoreWebPnpmCache() + \
|
restoreBuildArtifactCache(ctx, dirs["opencloudBinArtifact"], dirs["opencloudBin"]) + \
|
||||||
restoreBrowsersCache() + \
|
restoreWebCache() + \
|
||||||
(tikaService() if params["tikaNeeded"] else []) + \
|
restoreWebPnpmCache() + \
|
||||||
opencloudServer(storage, extra_server_environment = extra_server_environment, tika_enabled = params["tikaNeeded"], watch_fs_enabled = watch_fs_enabled)
|
restoreBrowsersCache() + \
|
||||||
|
(tikaService() if params["tikaNeeded"] else []) + \
|
||||||
|
opencloudServer(
|
||||||
|
storage,
|
||||||
|
extra_server_environment = extra_server_environment,
|
||||||
|
tika_enabled = params["tikaNeeded"],
|
||||||
|
watch_fs_enabled = watch_fs_enabled,
|
||||||
|
)
|
||||||
|
|
||||||
step_e2e = {
|
step_e2e = {
|
||||||
"name": "e2e-tests",
|
"name": "e2e-tests",
|
||||||
"image": OC_CI_NODEJS % DEFAULT_NODEJS_VERSION,
|
"image": OC_CI_NODEJS % DEFAULT_NODEJS_VERSION,
|
||||||
"environment": {
|
"environment": {
|
||||||
"OC_BASE_URL": OC_DOMAIN,
|
"OC_BASE_URL": OC_DOMAIN,
|
||||||
"HEADLESS": True,
|
"HEADLESS": True,
|
||||||
"RETRY": "1",
|
"RETRY": "1",
|
||||||
"WEB_UI_CONFIG_FILE": "%s/%s" % (dirs["base"], dirs["opencloudConfig"]),
|
"WEB_UI_CONFIG_FILE": "%s/%s" % (dirs["base"], dirs["opencloudConfig"]),
|
||||||
"LOCAL_UPLOAD_DIR": "/uploads",
|
"LOCAL_UPLOAD_DIR": "/uploads",
|
||||||
"PLAYWRIGHT_BROWSERS_PATH": "%s/%s" % (dirs["base"], ".playwright"),
|
"PLAYWRIGHT_BROWSERS_PATH": "%s/%s" % (dirs["base"], ".playwright"),
|
||||||
"BROWSER": "chromium",
|
"BROWSER": "chromium",
|
||||||
"REPORT_TRACING": params["reportTracing"],
|
"REPORT_TRACING": params["reportTracing"],
|
||||||
},
|
},
|
||||||
"commands": [
|
"commands": [
|
||||||
"cd %s/tests/e2e" % dirs["web"],
|
"cd %s/tests/e2e" % dirs["web"],
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
steps_after = uploadTracingResult(ctx)
|
steps_after = uploadTracingResult(ctx)
|
||||||
|
|
||||||
if params["totalParts"]:
|
|
||||||
for index in range(params["totalParts"]):
|
|
||||||
run_part = index + 1
|
|
||||||
run_e2e = {}
|
|
||||||
run_e2e.update(step_e2e)
|
|
||||||
run_e2e["commands"] = [
|
|
||||||
"cd %s/tests/e2e" % dirs["web"],
|
|
||||||
"bash run-e2e.sh %s --run-part %d" % (e2e_args, run_part),
|
|
||||||
]
|
|
||||||
pipelines.append({
|
|
||||||
"name": "e2e-tests-%s-%s-%s%s" % (name, run_part, storage, "-watchfs" if watch_fs_enabled else ""),
|
|
||||||
"steps": steps_before + [run_e2e] + steps_after,
|
|
||||||
"depends_on": getPipelineNames(buildOpencloudBinaryForTesting(ctx) + buildWebCache(ctx)),
|
|
||||||
"when": e2e_trigger,
|
|
||||||
})
|
|
||||||
else:
|
|
||||||
step_e2e["commands"].append("bash run-e2e.sh %s" % e2e_args)
|
|
||||||
pipelines.append({
|
|
||||||
"name": "e2e-tests-%s-%s%s" % (name, storage, "-watchfs" if watch_fs_enabled else ""),
|
|
||||||
"steps": steps_before + [step_e2e] + steps_after,
|
|
||||||
"depends_on": getPipelineNames(buildOpencloudBinaryForTesting(ctx) + buildWebCache(ctx)),
|
|
||||||
"when": e2e_trigger,
|
|
||||||
})
|
|
||||||
|
|
||||||
|
if params["totalParts"]:
|
||||||
|
for index in range(params["totalParts"]):
|
||||||
|
run_part = index + 1
|
||||||
|
run_e2e = {}
|
||||||
|
run_e2e.update(step_e2e)
|
||||||
|
run_e2e["commands"] = [
|
||||||
|
"cd %s/tests/e2e" % dirs["web"],
|
||||||
|
"bash run-e2e.sh %s --run-part %d" % (e2e_args, run_part),
|
||||||
|
]
|
||||||
|
pipelines.append({
|
||||||
|
"name": "e2e-tests-%s-%s-%s%s" % (name, run_part, storage, "-watchfs" if watch_fs_enabled else ""),
|
||||||
|
"steps": steps_before + [run_e2e] + steps_after,
|
||||||
|
"depends_on": getPipelineNames(buildOpencloudBinaryForTesting(ctx) + buildWebCache(ctx)),
|
||||||
|
"when": e2e_trigger,
|
||||||
|
})
|
||||||
|
else:
|
||||||
|
step_e2e["commands"].append("bash run-e2e.sh %s" % e2e_args)
|
||||||
|
pipelines.append({
|
||||||
|
"name": "e2e-tests-%s-%s%s" % (name, storage, "-watchfs" if watch_fs_enabled else ""),
|
||||||
|
"steps": steps_before + [step_e2e] + steps_after,
|
||||||
|
"depends_on": getPipelineNames(buildOpencloudBinaryForTesting(ctx) + buildWebCache(ctx)),
|
||||||
|
"when": e2e_trigger,
|
||||||
|
})
|
||||||
return pipelines
|
return pipelines
|
||||||
|
|
||||||
def multiServiceE2ePipeline(ctx, watch_fs_enabled = False):
|
def multiServiceE2ePipeline(ctx):
|
||||||
pipelines = []
|
pipelines = []
|
||||||
|
|
||||||
defaults = {
|
defaults = {
|
||||||
@@ -1461,6 +1525,8 @@ def multiServiceE2ePipeline(ctx, watch_fs_enabled = False):
|
|||||||
"xsuites": [],
|
"xsuites": [],
|
||||||
"tikaNeeded": False,
|
"tikaNeeded": False,
|
||||||
"reportTracing": False,
|
"reportTracing": False,
|
||||||
|
"enableWatchFs": [False],
|
||||||
|
"storages": ["posix"],
|
||||||
}
|
}
|
||||||
|
|
||||||
e2e_trigger = [
|
e2e_trigger = [
|
||||||
@@ -1481,10 +1547,6 @@ def multiServiceE2ePipeline(ctx, watch_fs_enabled = False):
|
|||||||
if not "full-ci" in ctx.build.title.lower() and ctx.build.event != "cron":
|
if not "full-ci" in ctx.build.title.lower() and ctx.build.event != "cron":
|
||||||
return pipelines
|
return pipelines
|
||||||
|
|
||||||
storage = "posix"
|
|
||||||
if "[decomposed]" in ctx.build.title.lower():
|
|
||||||
storage = "decomposed"
|
|
||||||
|
|
||||||
extra_server_environment = {
|
extra_server_environment = {
|
||||||
"OC_PASSWORD_POLICY_BANNED_PASSWORDS_LIST": "%s" % dirs["bannedPasswordList"],
|
"OC_PASSWORD_POLICY_BANNED_PASSWORDS_LIST": "%s" % dirs["bannedPasswordList"],
|
||||||
"OC_JWT_SECRET": "some-opencloud-jwt-secret",
|
"OC_JWT_SECRET": "some-opencloud-jwt-secret",
|
||||||
@@ -1499,9 +1561,6 @@ def multiServiceE2ePipeline(ctx, watch_fs_enabled = False):
|
|||||||
"GRAPH_AVAILABLE_ROLES": "%s" % GRAPH_AVAILABLE_ROLES,
|
"GRAPH_AVAILABLE_ROLES": "%s" % GRAPH_AVAILABLE_ROLES,
|
||||||
}
|
}
|
||||||
|
|
||||||
if watch_fs_enabled:
|
|
||||||
extra_server_environment["STORAGE_USERS_POSIX_WATCH_FS"] = True
|
|
||||||
|
|
||||||
storage_users_environment = {
|
storage_users_environment = {
|
||||||
"OC_CORS_ALLOW_ORIGINS": "%s,https://%s:9201" % (OC_URL, OC_SERVER_NAME),
|
"OC_CORS_ALLOW_ORIGINS": "%s,https://%s:9201" % (OC_URL, OC_SERVER_NAME),
|
||||||
"STORAGE_USERS_JWT_SECRET": "some-opencloud-jwt-secret",
|
"STORAGE_USERS_JWT_SECRET": "some-opencloud-jwt-secret",
|
||||||
@@ -1546,6 +1605,12 @@ def multiServiceE2ePipeline(ctx, watch_fs_enabled = False):
|
|||||||
for item in defaults:
|
for item in defaults:
|
||||||
params[item] = suite[item] if item in suite else defaults[item]
|
params[item] = suite[item] if item in suite else defaults[item]
|
||||||
|
|
||||||
|
if ctx.build.event == "cron":
|
||||||
|
params["enableWatchFs"] = [False, True]
|
||||||
|
|
||||||
|
if "[decomposed]" in ctx.build.title.lower():
|
||||||
|
params["storages"] = ["decomposed"]
|
||||||
|
|
||||||
e2e_args = ""
|
e2e_args = ""
|
||||||
if params["suites"]:
|
if params["suites"]:
|
||||||
e2e_args = "--suites %s" % ",".join(params["suites"])
|
e2e_args = "--suites %s" % ",".join(params["suites"])
|
||||||
@@ -1557,38 +1622,43 @@ def multiServiceE2ePipeline(ctx, watch_fs_enabled = False):
|
|||||||
if "with-tracing" in ctx.build.title.lower():
|
if "with-tracing" in ctx.build.title.lower():
|
||||||
params["reportTracing"] = True
|
params["reportTracing"] = True
|
||||||
|
|
||||||
steps = \
|
for storage in params["storages"]:
|
||||||
restoreBuildArtifactCache(ctx, dirs["opencloudBinArtifact"], dirs["opencloudBin"]) + \
|
for watch_fs_enabled in params["enableWatchFs"]:
|
||||||
restoreWebCache() + \
|
if watch_fs_enabled:
|
||||||
restoreWebPnpmCache() + \
|
extra_server_environment["STORAGE_USERS_POSIX_WATCH_FS"] = True
|
||||||
restoreBrowsersCache() + \
|
|
||||||
tikaService() + \
|
|
||||||
opencloudServer(storage, extra_server_environment = extra_server_environment, tika_enabled = params["tikaNeeded"]) + \
|
|
||||||
storage_users_services + \
|
|
||||||
[{
|
|
||||||
"name": "e2e-tests",
|
|
||||||
"image": OC_CI_NODEJS % DEFAULT_NODEJS_VERSION,
|
|
||||||
"environment": {
|
|
||||||
"OC_BASE_URL": OC_DOMAIN,
|
|
||||||
"HEADLESS": True,
|
|
||||||
"RETRY": "1",
|
|
||||||
"REPORT_TRACING": params["reportTracing"],
|
|
||||||
"PLAYWRIGHT_BROWSERS_PATH": "%s/%s" % (dirs["base"], ".playwright"),
|
|
||||||
"BROWSER": "chromium",
|
|
||||||
},
|
|
||||||
"commands": [
|
|
||||||
"cd %s/tests/e2e" % dirs["web"],
|
|
||||||
"bash run-e2e.sh %s" % e2e_args,
|
|
||||||
],
|
|
||||||
}] + \
|
|
||||||
uploadTracingResult(ctx)
|
|
||||||
|
|
||||||
pipelines.append({
|
steps = \
|
||||||
"name": "e2e-tests-multi-service%s" % ("-watchfs" if watch_fs_enabled else ""),
|
restoreBuildArtifactCache(ctx, dirs["opencloudBinArtifact"], dirs["opencloudBin"]) + \
|
||||||
"steps": steps,
|
restoreWebCache() + \
|
||||||
"depends_on": getPipelineNames(buildOpencloudBinaryForTesting(ctx) + buildWebCache(ctx)),
|
restoreWebPnpmCache() + \
|
||||||
"when": e2e_trigger,
|
restoreBrowsersCache() + \
|
||||||
})
|
tikaService() + \
|
||||||
|
opencloudServer(storage, extra_server_environment = extra_server_environment, tika_enabled = params["tikaNeeded"]) + \
|
||||||
|
storage_users_services + \
|
||||||
|
[{
|
||||||
|
"name": "e2e-tests",
|
||||||
|
"image": OC_CI_NODEJS % DEFAULT_NODEJS_VERSION,
|
||||||
|
"environment": {
|
||||||
|
"OC_BASE_URL": OC_DOMAIN,
|
||||||
|
"HEADLESS": True,
|
||||||
|
"RETRY": "1",
|
||||||
|
"REPORT_TRACING": params["reportTracing"],
|
||||||
|
"PLAYWRIGHT_BROWSERS_PATH": "%s/%s" % (dirs["base"], ".playwright"),
|
||||||
|
"BROWSER": "chromium",
|
||||||
|
},
|
||||||
|
"commands": [
|
||||||
|
"cd %s/tests/e2e" % dirs["web"],
|
||||||
|
"bash run-e2e.sh %s" % e2e_args,
|
||||||
|
],
|
||||||
|
}] + \
|
||||||
|
uploadTracingResult(ctx)
|
||||||
|
|
||||||
|
pipelines.append({
|
||||||
|
"name": "e2e-tests-multi-service%s" % ("-watchfs" if watch_fs_enabled else ""),
|
||||||
|
"steps": steps,
|
||||||
|
"depends_on": getPipelineNames(buildOpencloudBinaryForTesting(ctx) + buildWebCache(ctx)),
|
||||||
|
"when": e2e_trigger,
|
||||||
|
})
|
||||||
return pipelines
|
return pipelines
|
||||||
|
|
||||||
def uploadTracingResult(ctx):
|
def uploadTracingResult(ctx):
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ var serviceCommands = []register.Command{
|
|||||||
},
|
},
|
||||||
func(cfg *config.Config) *cobra.Command {
|
func(cfg *config.Config) *cobra.Command {
|
||||||
return ServiceCommand(cfg, cfg.Antivirus.Service.Name, antivirus.GetCommands(cfg.Antivirus), func(c *config.Config) {
|
return ServiceCommand(cfg, cfg.Antivirus.Service.Name, antivirus.GetCommands(cfg.Antivirus), func(c *config.Config) {
|
||||||
// cfg.Antivirus.Commons = cfg.Commons // antivirus needs no commons atm
|
cfg.Antivirus.Commons = cfg.Commons
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
func(cfg *config.Config) *cobra.Command {
|
func(cfg *config.Config) *cobra.Command {
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ var (
|
|||||||
// LatestTag is the latest released version plus the dev meta version.
|
// LatestTag is the latest released version plus the dev meta version.
|
||||||
// Will be overwritten by the release pipeline
|
// Will be overwritten by the release pipeline
|
||||||
// Needs a manual change for every tagged release
|
// Needs a manual change for every tagged release
|
||||||
LatestTag = "4.0.0-rc.3+dev"
|
LatestTag = "4.1.0+dev"
|
||||||
|
|
||||||
// Date indicates the build date.
|
// Date indicates the build date.
|
||||||
// This has been removed, it looks like you can only replace static strings with recent go versions
|
// This has been removed, it looks like you can only replace static strings with recent go versions
|
||||||
|
|||||||
@@ -1,19 +0,0 @@
|
|||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"os"
|
|
||||||
"os/signal"
|
|
||||||
"syscall"
|
|
||||||
|
|
||||||
"github.com/opencloud-eu/opencloud/services/activitylog/pkg/command"
|
|
||||||
"github.com/opencloud-eu/opencloud/services/activitylog/pkg/config/defaults"
|
|
||||||
)
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
cfg := defaults.DefaultConfig()
|
|
||||||
cfg.Context, _ = signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT, syscall.SIGHUP)
|
|
||||||
if err := command.Execute(cfg); err != nil {
|
|
||||||
os.Exit(1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"os"
|
|
||||||
"os/signal"
|
|
||||||
"syscall"
|
|
||||||
|
|
||||||
"github.com/opencloud-eu/opencloud/services/antivirus/pkg/command"
|
|
||||||
"github.com/opencloud-eu/opencloud/services/antivirus/pkg/config/defaults"
|
|
||||||
)
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
cfg := defaults.DefaultConfig()
|
|
||||||
cfg.Context, _ = signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT, syscall.SIGHUP)
|
|
||||||
if err := command.Execute(cfg); err != nil {
|
|
||||||
os.Exit(1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"os"
|
|
||||||
"os/signal"
|
|
||||||
"syscall"
|
|
||||||
|
|
||||||
"github.com/opencloud-eu/opencloud/services/app-provider/pkg/command"
|
|
||||||
"github.com/opencloud-eu/opencloud/services/app-provider/pkg/config/defaults"
|
|
||||||
)
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
cfg := defaults.DefaultConfig()
|
|
||||||
cfg.Context, _ = signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT, syscall.SIGHUP)
|
|
||||||
if err := command.Execute(cfg); err != nil {
|
|
||||||
os.Exit(1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"os"
|
|
||||||
"os/signal"
|
|
||||||
"syscall"
|
|
||||||
|
|
||||||
"github.com/opencloud-eu/opencloud/services/app-registry/pkg/command"
|
|
||||||
"github.com/opencloud-eu/opencloud/services/app-registry/pkg/config/defaults"
|
|
||||||
)
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
cfg := defaults.DefaultConfig()
|
|
||||||
cfg.Context, _ = signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT, syscall.SIGHUP)
|
|
||||||
if err := command.Execute(cfg); err != nil {
|
|
||||||
os.Exit(1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"os"
|
|
||||||
"os/signal"
|
|
||||||
"syscall"
|
|
||||||
|
|
||||||
"github.com/opencloud-eu/opencloud/services/audit/pkg/command"
|
|
||||||
"github.com/opencloud-eu/opencloud/services/audit/pkg/config/defaults"
|
|
||||||
)
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
cfg := defaults.DefaultConfig()
|
|
||||||
cfg.Context, _ = signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT, syscall.SIGHUP)
|
|
||||||
if err := command.Execute(cfg); err != nil {
|
|
||||||
os.Exit(1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"os"
|
|
||||||
"os/signal"
|
|
||||||
"syscall"
|
|
||||||
|
|
||||||
"github.com/opencloud-eu/opencloud/services/auth-app/pkg/command"
|
|
||||||
"github.com/opencloud-eu/opencloud/services/auth-app/pkg/config/defaults"
|
|
||||||
)
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
cfg := defaults.DefaultConfig()
|
|
||||||
cfg.Context, _ = signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT, syscall.SIGHUP)
|
|
||||||
if err := command.Execute(cfg); err != nil {
|
|
||||||
os.Exit(1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"os"
|
|
||||||
"os/signal"
|
|
||||||
"syscall"
|
|
||||||
|
|
||||||
"github.com/opencloud-eu/opencloud/services/auth-basic/pkg/command"
|
|
||||||
"github.com/opencloud-eu/opencloud/services/auth-basic/pkg/config/defaults"
|
|
||||||
)
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
cfg := defaults.DefaultConfig()
|
|
||||||
cfg.Context, _ = signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT, syscall.SIGHUP)
|
|
||||||
if err := command.Execute(cfg); err != nil {
|
|
||||||
os.Exit(1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"os"
|
|
||||||
"os/signal"
|
|
||||||
"syscall"
|
|
||||||
|
|
||||||
"github.com/opencloud-eu/opencloud/services/auth-bearer/pkg/command"
|
|
||||||
"github.com/opencloud-eu/opencloud/services/auth-bearer/pkg/config/defaults"
|
|
||||||
)
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
cfg := defaults.DefaultConfig()
|
|
||||||
cfg.Context, _ = signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT, syscall.SIGHUP)
|
|
||||||
if err := command.Execute(cfg); err != nil {
|
|
||||||
os.Exit(1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"os"
|
|
||||||
"os/signal"
|
|
||||||
"syscall"
|
|
||||||
|
|
||||||
"github.com/opencloud-eu/opencloud/services/auth-machine/pkg/command"
|
|
||||||
"github.com/opencloud-eu/opencloud/services/auth-machine/pkg/config/defaults"
|
|
||||||
)
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
cfg := defaults.DefaultConfig()
|
|
||||||
cfg.Context, _ = signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT, syscall.SIGHUP)
|
|
||||||
if err := command.Execute(cfg); err != nil {
|
|
||||||
os.Exit(1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"os"
|
|
||||||
"os/signal"
|
|
||||||
"syscall"
|
|
||||||
|
|
||||||
"github.com/opencloud-eu/opencloud/services/auth-service/pkg/command"
|
|
||||||
"github.com/opencloud-eu/opencloud/services/auth-service/pkg/config/defaults"
|
|
||||||
)
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
cfg := defaults.DefaultConfig()
|
|
||||||
cfg.Context, _ = signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT, syscall.SIGHUP)
|
|
||||||
if err := command.Execute(cfg); err != nil {
|
|
||||||
os.Exit(1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"os"
|
|
||||||
"os/signal"
|
|
||||||
"syscall"
|
|
||||||
|
|
||||||
"github.com/opencloud-eu/opencloud/services/clientlog/pkg/command"
|
|
||||||
"github.com/opencloud-eu/opencloud/services/clientlog/pkg/config/defaults"
|
|
||||||
)
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
cfg := defaults.DefaultConfig()
|
|
||||||
cfg.Context, _ = signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT, syscall.SIGHUP)
|
|
||||||
if err := command.Execute(cfg); err != nil {
|
|
||||||
os.Exit(1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"os"
|
|
||||||
"os/signal"
|
|
||||||
"syscall"
|
|
||||||
|
|
||||||
"github.com/opencloud-eu/opencloud/services/activitylog/pkg/command"
|
|
||||||
"github.com/opencloud-eu/opencloud/services/activitylog/pkg/config/defaults"
|
|
||||||
)
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
cfg := defaults.DefaultConfig()
|
|
||||||
cfg.Context, _ = signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT, syscall.SIGHUP)
|
|
||||||
if err := command.Execute(cfg); err != nil {
|
|
||||||
os.Exit(1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"os"
|
|
||||||
"os/signal"
|
|
||||||
"syscall"
|
|
||||||
|
|
||||||
"github.com/opencloud-eu/opencloud/services/eventhistory/pkg/command"
|
|
||||||
"github.com/opencloud-eu/opencloud/services/eventhistory/pkg/config/defaults"
|
|
||||||
)
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
cfg := defaults.DefaultConfig()
|
|
||||||
cfg.Context, _ = signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT, syscall.SIGHUP)
|
|
||||||
if err := command.Execute(cfg); err != nil {
|
|
||||||
os.Exit(1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"os"
|
|
||||||
"os/signal"
|
|
||||||
"syscall"
|
|
||||||
|
|
||||||
"github.com/opencloud-eu/opencloud/services/frontend/pkg/command"
|
|
||||||
"github.com/opencloud-eu/opencloud/services/frontend/pkg/config/defaults"
|
|
||||||
)
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
cfg := defaults.DefaultConfig()
|
|
||||||
cfg.Context, _ = signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT, syscall.SIGHUP)
|
|
||||||
if err := command.Execute(cfg); err != nil {
|
|
||||||
os.Exit(1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"os"
|
|
||||||
"os/signal"
|
|
||||||
"syscall"
|
|
||||||
|
|
||||||
"github.com/opencloud-eu/opencloud/services/gateway/pkg/command"
|
|
||||||
"github.com/opencloud-eu/opencloud/services/gateway/pkg/config/defaults"
|
|
||||||
)
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
cfg := defaults.DefaultConfig()
|
|
||||||
cfg.Context, _ = signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT, syscall.SIGHUP)
|
|
||||||
if err := command.Execute(cfg); err != nil {
|
|
||||||
os.Exit(1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"os"
|
|
||||||
"os/signal"
|
|
||||||
"syscall"
|
|
||||||
|
|
||||||
"github.com/opencloud-eu/opencloud/services/graph/pkg/command"
|
|
||||||
"github.com/opencloud-eu/opencloud/services/graph/pkg/config/defaults"
|
|
||||||
)
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
cfg := defaults.DefaultConfig()
|
|
||||||
cfg.Context, _ = signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT, syscall.SIGHUP)
|
|
||||||
if err := command.Execute(cfg); err != nil {
|
|
||||||
os.Exit(1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"os"
|
|
||||||
"os/signal"
|
|
||||||
"syscall"
|
|
||||||
|
|
||||||
"github.com/opencloud-eu/opencloud/services/groups/pkg/command"
|
|
||||||
"github.com/opencloud-eu/opencloud/services/groups/pkg/config/defaults"
|
|
||||||
)
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
cfg := defaults.DefaultConfig()
|
|
||||||
cfg.Context, _ = signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT, syscall.SIGHUP)
|
|
||||||
if err := command.Execute(cfg); err != nil {
|
|
||||||
os.Exit(1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"os"
|
|
||||||
"os/signal"
|
|
||||||
"syscall"
|
|
||||||
|
|
||||||
"github.com/opencloud-eu/opencloud/services/idm/pkg/command"
|
|
||||||
"github.com/opencloud-eu/opencloud/services/idm/pkg/config/defaults"
|
|
||||||
)
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
cfg := defaults.DefaultConfig()
|
|
||||||
cfg.Context, _ = signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT, syscall.SIGHUP)
|
|
||||||
if err := command.Execute(cfg); err != nil {
|
|
||||||
os.Exit(1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"os"
|
|
||||||
"os/signal"
|
|
||||||
"syscall"
|
|
||||||
|
|
||||||
"github.com/opencloud-eu/opencloud/services/idp/pkg/command"
|
|
||||||
"github.com/opencloud-eu/opencloud/services/idp/pkg/config/defaults"
|
|
||||||
)
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
cfg := defaults.DefaultConfig()
|
|
||||||
cfg.Context, _ = signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT, syscall.SIGHUP)
|
|
||||||
if err := command.Execute(cfg); err != nil {
|
|
||||||
os.Exit(1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"os"
|
|
||||||
"os/signal"
|
|
||||||
"syscall"
|
|
||||||
|
|
||||||
"github.com/opencloud-eu/opencloud/services/invitations/pkg/command"
|
|
||||||
"github.com/opencloud-eu/opencloud/services/invitations/pkg/config/defaults"
|
|
||||||
)
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
cfg := defaults.DefaultConfig()
|
|
||||||
cfg.Context, _ = signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT, syscall.SIGHUP)
|
|
||||||
if err := command.Execute(cfg); err != nil {
|
|
||||||
os.Exit(1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"os"
|
|
||||||
"os/signal"
|
|
||||||
"syscall"
|
|
||||||
|
|
||||||
"github.com/opencloud-eu/opencloud/services/nats/pkg/command"
|
|
||||||
"github.com/opencloud-eu/opencloud/services/nats/pkg/config/defaults"
|
|
||||||
)
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
cfg := defaults.DefaultConfig()
|
|
||||||
cfg.Context, _ = signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT, syscall.SIGHUP)
|
|
||||||
if err := command.Execute(cfg); err != nil {
|
|
||||||
os.Exit(1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"os"
|
|
||||||
"os/signal"
|
|
||||||
"syscall"
|
|
||||||
|
|
||||||
"github.com/opencloud-eu/opencloud/services/notifications/pkg/command"
|
|
||||||
"github.com/opencloud-eu/opencloud/services/notifications/pkg/config/defaults"
|
|
||||||
)
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
cfg := defaults.DefaultConfig()
|
|
||||||
cfg.Context, _ = signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT, syscall.SIGHUP)
|
|
||||||
if err := command.Execute(cfg); err != nil {
|
|
||||||
os.Exit(1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"os"
|
|
||||||
"os/signal"
|
|
||||||
"syscall"
|
|
||||||
|
|
||||||
"github.com/opencloud-eu/opencloud/services/ocdav/pkg/command"
|
|
||||||
"github.com/opencloud-eu/opencloud/services/ocdav/pkg/config/defaults"
|
|
||||||
)
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
cfg := defaults.DefaultConfig()
|
|
||||||
cfg.Context, _ = signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT, syscall.SIGHUP)
|
|
||||||
if err := command.Execute(cfg); err != nil {
|
|
||||||
os.Exit(1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"os"
|
|
||||||
"os/signal"
|
|
||||||
"syscall"
|
|
||||||
|
|
||||||
"github.com/opencloud-eu/opencloud/services/ocm/pkg/command"
|
|
||||||
"github.com/opencloud-eu/opencloud/services/ocm/pkg/config/defaults"
|
|
||||||
)
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
cfg := defaults.DefaultConfig()
|
|
||||||
cfg.Context, _ = signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT, syscall.SIGHUP)
|
|
||||||
if err := command.Execute(cfg); err != nil {
|
|
||||||
os.Exit(1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"os"
|
|
||||||
"os/signal"
|
|
||||||
"syscall"
|
|
||||||
|
|
||||||
"github.com/opencloud-eu/opencloud/services/ocs/pkg/command"
|
|
||||||
"github.com/opencloud-eu/opencloud/services/ocs/pkg/config/defaults"
|
|
||||||
)
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
cfg := defaults.DefaultConfig()
|
|
||||||
cfg.Context, _ = signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT, syscall.SIGHUP)
|
|
||||||
if err := command.Execute(cfg); err != nil {
|
|
||||||
os.Exit(1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"os"
|
|
||||||
"os/signal"
|
|
||||||
"syscall"
|
|
||||||
|
|
||||||
"github.com/opencloud-eu/opencloud/services/policies/pkg/command"
|
|
||||||
"github.com/opencloud-eu/opencloud/services/policies/pkg/config/defaults"
|
|
||||||
)
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
cfg := defaults.DefaultConfig()
|
|
||||||
cfg.Context, _ = signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT, syscall.SIGHUP)
|
|
||||||
if err := command.Execute(cfg); err != nil {
|
|
||||||
os.Exit(1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"os"
|
|
||||||
"os/signal"
|
|
||||||
"syscall"
|
|
||||||
|
|
||||||
"github.com/opencloud-eu/opencloud/services/postprocessing/pkg/command"
|
|
||||||
"github.com/opencloud-eu/opencloud/services/postprocessing/pkg/config/defaults"
|
|
||||||
)
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
cfg := defaults.DefaultConfig()
|
|
||||||
cfg.Context, _ = signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT, syscall.SIGHUP)
|
|
||||||
if err := command.Execute(cfg); err != nil {
|
|
||||||
os.Exit(1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"os"
|
|
||||||
"os/signal"
|
|
||||||
"syscall"
|
|
||||||
|
|
||||||
"github.com/opencloud-eu/opencloud/services/proxy/pkg/command"
|
|
||||||
"github.com/opencloud-eu/opencloud/services/proxy/pkg/config/defaults"
|
|
||||||
)
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
cfg := defaults.DefaultConfig()
|
|
||||||
cfg.Context, _ = signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT, syscall.SIGHUP)
|
|
||||||
if err := command.Execute(cfg); err != nil {
|
|
||||||
os.Exit(1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"os"
|
|
||||||
"os/signal"
|
|
||||||
"syscall"
|
|
||||||
|
|
||||||
"github.com/opencloud-eu/opencloud/services/search/pkg/command"
|
|
||||||
"github.com/opencloud-eu/opencloud/services/search/pkg/config/defaults"
|
|
||||||
)
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
cfg := defaults.DefaultConfig()
|
|
||||||
cfg.Context, _ = signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT, syscall.SIGHUP)
|
|
||||||
if err := command.Execute(cfg); err != nil {
|
|
||||||
os.Exit(1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"os"
|
|
||||||
"os/signal"
|
|
||||||
"syscall"
|
|
||||||
|
|
||||||
"github.com/opencloud-eu/opencloud/services/settings/pkg/command"
|
|
||||||
"github.com/opencloud-eu/opencloud/services/settings/pkg/config/defaults"
|
|
||||||
)
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
cfg := defaults.DefaultConfig()
|
|
||||||
cfg.Context, _ = signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT, syscall.SIGHUP)
|
|
||||||
if err := command.Execute(cfg); err != nil {
|
|
||||||
os.Exit(1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -11,7 +11,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: \n"
|
"Project-Id-Version: \n"
|
||||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||||
"POT-Creation-Date: 2025-12-18 00:04+0000\n"
|
"POT-Creation-Date: 2025-12-25 00:05+0000\n"
|
||||||
"PO-Revision-Date: 2025-01-27 10:17+0000\n"
|
"PO-Revision-Date: 2025-01-27 10:17+0000\n"
|
||||||
"Last-Translator: ii kaka, 2025\n"
|
"Last-Translator: ii kaka, 2025\n"
|
||||||
"Language-Team: Japanese (https://app.transifex.com/opencloud-eu/teams/204053/ja/)\n"
|
"Language-Team: Japanese (https://app.transifex.com/opencloud-eu/teams/204053/ja/)\n"
|
||||||
@@ -44,7 +44,7 @@ msgstr "ファイルの拒否"
|
|||||||
#. translation for the 'instant' email interval option
|
#. translation for the 'instant' email interval option
|
||||||
#: pkg/store/defaults/templates.go:48
|
#: pkg/store/defaults/templates.go:48
|
||||||
msgid "Instant"
|
msgid "Instant"
|
||||||
msgstr "即時 "
|
msgstr "即時"
|
||||||
|
|
||||||
#. translation for the 'never' email interval option
|
#. translation for the 'never' email interval option
|
||||||
#: pkg/store/defaults/templates.go:54
|
#: pkg/store/defaults/templates.go:54
|
||||||
@@ -111,7 +111,7 @@ msgstr "選択された値:"
|
|||||||
#. name of the notification option 'Share Expired'
|
#. name of the notification option 'Share Expired'
|
||||||
#: pkg/store/defaults/templates.go:16
|
#: pkg/store/defaults/templates.go:16
|
||||||
msgid "Share Expired"
|
msgid "Share Expired"
|
||||||
msgstr " 共有期限切れ"
|
msgstr "共有期限切れ"
|
||||||
|
|
||||||
#. name of the notification option 'Share Received'
|
#. name of the notification option 'Share Received'
|
||||||
#: pkg/store/defaults/templates.go:8
|
#: pkg/store/defaults/templates.go:8
|
||||||
|
|||||||
@@ -1,19 +0,0 @@
|
|||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"os"
|
|
||||||
"os/signal"
|
|
||||||
"syscall"
|
|
||||||
|
|
||||||
"github.com/opencloud-eu/opencloud/services/sharing/pkg/command"
|
|
||||||
"github.com/opencloud-eu/opencloud/services/sharing/pkg/config/defaults"
|
|
||||||
)
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
cfg := defaults.DefaultConfig()
|
|
||||||
cfg.Context, _ = signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT, syscall.SIGHUP)
|
|
||||||
if err := command.Execute(cfg); err != nil {
|
|
||||||
os.Exit(1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"os"
|
|
||||||
"os/signal"
|
|
||||||
"syscall"
|
|
||||||
|
|
||||||
"github.com/opencloud-eu/opencloud/services/sse/pkg/command"
|
|
||||||
"github.com/opencloud-eu/opencloud/services/sse/pkg/config/defaults"
|
|
||||||
)
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
cfg := defaults.DefaultConfig()
|
|
||||||
cfg.Context, _ = signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT, syscall.SIGHUP)
|
|
||||||
if err := command.Execute(cfg); err != nil {
|
|
||||||
os.Exit(1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"os"
|
|
||||||
"os/signal"
|
|
||||||
"syscall"
|
|
||||||
|
|
||||||
"github.com/opencloud-eu/opencloud/services/storage-publiclink/pkg/command"
|
|
||||||
"github.com/opencloud-eu/opencloud/services/storage-publiclink/pkg/config/defaults"
|
|
||||||
)
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
cfg := defaults.DefaultConfig()
|
|
||||||
cfg.Context, _ = signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT, syscall.SIGHUP)
|
|
||||||
if err := command.Execute(cfg); err != nil {
|
|
||||||
os.Exit(1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"os"
|
|
||||||
"os/signal"
|
|
||||||
"syscall"
|
|
||||||
|
|
||||||
"github.com/opencloud-eu/opencloud/services/storage-shares/pkg/command"
|
|
||||||
"github.com/opencloud-eu/opencloud/services/storage-shares/pkg/config/defaults"
|
|
||||||
)
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
cfg := defaults.DefaultConfig()
|
|
||||||
cfg.Context, _ = signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT, syscall.SIGHUP)
|
|
||||||
if err := command.Execute(cfg); err != nil {
|
|
||||||
os.Exit(1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"os"
|
|
||||||
"os/signal"
|
|
||||||
"syscall"
|
|
||||||
|
|
||||||
"github.com/opencloud-eu/opencloud/services/storage-system/pkg/command"
|
|
||||||
"github.com/opencloud-eu/opencloud/services/storage-system/pkg/config/defaults"
|
|
||||||
)
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
cfg := defaults.DefaultConfig()
|
|
||||||
cfg.Context, _ = signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT, syscall.SIGHUP)
|
|
||||||
if err := command.Execute(cfg); err != nil {
|
|
||||||
os.Exit(1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"os"
|
|
||||||
"os/signal"
|
|
||||||
"syscall"
|
|
||||||
|
|
||||||
"github.com/opencloud-eu/opencloud/services/storage-users/pkg/command"
|
|
||||||
"github.com/opencloud-eu/opencloud/services/storage-users/pkg/config/defaults"
|
|
||||||
)
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
cfg := defaults.DefaultConfig()
|
|
||||||
cfg.Context, _ = signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT, syscall.SIGHUP)
|
|
||||||
if err := command.Execute(cfg); err != nil {
|
|
||||||
os.Exit(1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"os"
|
|
||||||
"os/signal"
|
|
||||||
"syscall"
|
|
||||||
|
|
||||||
"github.com/opencloud-eu/opencloud/services/thumbnails/pkg/command"
|
|
||||||
"github.com/opencloud-eu/opencloud/services/thumbnails/pkg/config/defaults"
|
|
||||||
)
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
cfg := defaults.DefaultConfig()
|
|
||||||
cfg.Context, _ = signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT, syscall.SIGHUP)
|
|
||||||
if err := command.Execute(cfg); err != nil {
|
|
||||||
os.Exit(1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -20,6 +20,7 @@ import (
|
|||||||
"golang.org/x/image/math/fixed"
|
"golang.org/x/image/math/fixed"
|
||||||
|
|
||||||
"github.com/dhowden/tag"
|
"github.com/dhowden/tag"
|
||||||
|
|
||||||
thumbnailerErrors "github.com/opencloud-eu/opencloud/services/thumbnails/pkg/errors"
|
thumbnailerErrors "github.com/opencloud-eu/opencloud/services/thumbnails/pkg/errors"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -142,7 +143,11 @@ Scan: // Label for the scanner loop, so we can break it easily
|
|||||||
textResult.MergeCommon(DefaultMergeMap)
|
textResult.MergeCommon(DefaultMergeMap)
|
||||||
|
|
||||||
for _, sRange := range textResult.ScriptRanges {
|
for _, sRange := range textResult.ScriptRanges {
|
||||||
targetFontFace, _ := t.fontLoader.LoadFaceForScript(sRange.TargetScript)
|
targetFontFace, err := t.fontLoader.LoadFaceForScript(sRange.TargetScript)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
// if the target script is "_unknown" it's expected that the loaded face
|
// if the target script is "_unknown" it's expected that the loaded face
|
||||||
// uses the default font
|
// uses the default font
|
||||||
faceHeight := targetFontFace.Face.Metrics().Height
|
faceHeight := targetFontFace.Face.Metrics().Height
|
||||||
@@ -156,15 +161,18 @@ Scan: // Label for the scanner loop, so we can break it easily
|
|||||||
if canvas.Dot.Y > maxY {
|
if canvas.Dot.Y > maxY {
|
||||||
break Scan
|
break Scan
|
||||||
}
|
}
|
||||||
drawWord(canvas, textResult.Text[initialByte:sRangeSpace], minX, maxX, height, maxY, true)
|
|
||||||
|
drawWord(canvas, textResult.Text[initialByte:sRangeSpace], minX, maxX, height, maxY)
|
||||||
initialByte = sRangeSpace
|
initialByte = sRangeSpace
|
||||||
}
|
}
|
||||||
|
|
||||||
if initialByte <= sRange.High {
|
if initialByte <= sRange.High {
|
||||||
// some bytes left to be written
|
// some bytes left to be written
|
||||||
if canvas.Dot.Y > maxY {
|
if canvas.Dot.Y > maxY {
|
||||||
break Scan
|
break Scan
|
||||||
}
|
}
|
||||||
drawWord(canvas, textResult.Text[initialByte:sRange.High+1], minX, maxX, height, maxY, len(sRange.Spaces) > 0)
|
|
||||||
|
drawWord(canvas, textResult.Text[initialByte:sRange.High+1], minX, maxX, height, maxY)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -235,43 +243,58 @@ func extractBase64ImageFromGGP(ggp *GGPStruct) (string, error) {
|
|||||||
// need to draw the word in a new line
|
// need to draw the word in a new line
|
||||||
//
|
//
|
||||||
// Note that the word will likely start with a white space char
|
// Note that the word will likely start with a white space char
|
||||||
func drawWord(canvas *font.Drawer, word string, minX, maxX, incY, maxY fixed.Int26_6, goToNewLine bool) {
|
func drawWord(canvas *font.Drawer, word string, minX, maxX, incY, maxY fixed.Int26_6) {
|
||||||
bbox, _ := canvas.BoundString(word)
|
// calculate the actual measurement of the string at a given X position
|
||||||
if bbox.Max.X <= maxX {
|
measure := func(s string, dotX fixed.Int26_6) (min, max fixed.Int26_6) {
|
||||||
// word fits in the current line
|
bbox, _ := canvas.BoundString(s)
|
||||||
canvas.DrawString(word)
|
return dotX + bbox.Min.X, dotX + bbox.Max.X
|
||||||
} else {
|
}
|
||||||
// word doesn't fit -> retry in a new line
|
|
||||||
trimmedWord := strings.TrimSpace(word)
|
|
||||||
oldDot := canvas.Dot
|
|
||||||
|
|
||||||
canvas.Dot.X = minX
|
// first try to draw the whole word
|
||||||
canvas.Dot.Y += incY
|
absMin, absMax := measure(word, canvas.Dot.X)
|
||||||
bbox2, _ := canvas.BoundString(trimmedWord)
|
if absMin >= minX && absMax <= maxX {
|
||||||
if goToNewLine && bbox2.Max.X <= maxX {
|
canvas.DrawString(word)
|
||||||
if canvas.Dot.Y > maxY {
|
return
|
||||||
// Don't draw if we're over the Y limit
|
}
|
||||||
return
|
|
||||||
}
|
// try to draw the trimmed word in a new line
|
||||||
canvas.DrawString(trimmedWord)
|
trimmed := strings.TrimSpace(word)
|
||||||
} else {
|
oldDot := canvas.Dot
|
||||||
// word doesn't fit in a new line -> draw as many chars as possible
|
canvas.Dot.X = minX
|
||||||
canvas.Dot = oldDot
|
canvas.Dot.Y += incY
|
||||||
for _, char := range trimmedWord {
|
|
||||||
charBytes := []byte(string(char))
|
if canvas.Dot.Y <= maxY {
|
||||||
bbox3, _ := canvas.BoundBytes(charBytes)
|
tMin, tMax := measure(trimmed, canvas.Dot.X)
|
||||||
if bbox3.Max.X > maxX {
|
if tMin >= minX && tMax <= maxX {
|
||||||
canvas.Dot.X = minX
|
canvas.DrawString(trimmed)
|
||||||
canvas.Dot.Y += incY
|
return
|
||||||
if canvas.Dot.Y > maxY {
|
|
||||||
// Don't draw if we're over the Y limit
|
|
||||||
return
|
|
||||||
}
|
|
||||||
}
|
|
||||||
canvas.DrawBytes(charBytes)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// if the trimmed word is still too big, draw it char by char
|
||||||
|
canvas.Dot = oldDot
|
||||||
|
for _, char := range trimmed {
|
||||||
|
s := string(char)
|
||||||
|
_, cMax := measure(s, canvas.Dot.X)
|
||||||
|
|
||||||
|
if cMax > maxX {
|
||||||
|
canvas.Dot.X = minX
|
||||||
|
canvas.Dot.Y += incY
|
||||||
|
}
|
||||||
|
|
||||||
|
// stop drawing if we exceed maxY
|
||||||
|
if canvas.Dot.Y > maxY {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// ensure that we don't start drawing before minX
|
||||||
|
cMin, _ := measure(s, canvas.Dot.X)
|
||||||
|
if cMin < minX {
|
||||||
|
canvas.Dot.X += minX - cMin
|
||||||
|
}
|
||||||
|
|
||||||
|
canvas.DrawString(s)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ForType returns the converter for the specified mimeType
|
// ForType returns the converter for the specified mimeType
|
||||||
|
|||||||
@@ -149,6 +149,17 @@ var _ = Describe("ImageDecoder", func() {
|
|||||||
Expect(err).ToNot(HaveOccurred())
|
Expect(err).ToNot(HaveOccurred())
|
||||||
Expect(img).ToNot(BeNil())
|
Expect(img).ToNot(BeNil())
|
||||||
})
|
})
|
||||||
|
|
||||||
|
It("fails if the font is missing", func() {
|
||||||
|
decoder.fontLoader.fontMapData = &FontMapData{
|
||||||
|
FMap: &FontMap{
|
||||||
|
DefaultFont: "/some/unknown/font.otf",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
img, err := decoder.Convert(bytes.NewReader([]byte("This is a test text")))
|
||||||
|
Expect(err).To(HaveOccurred())
|
||||||
|
Expect(img).To(BeNil())
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
Describe("test ForType", func() {
|
Describe("test ForType", func() {
|
||||||
|
|||||||
@@ -12,13 +12,14 @@ import (
|
|||||||
rpc "github.com/cs3org/go-cs3apis/cs3/rpc/v1beta1"
|
rpc "github.com/cs3org/go-cs3apis/cs3/rpc/v1beta1"
|
||||||
provider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1"
|
provider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1"
|
||||||
"github.com/golang-jwt/jwt/v5"
|
"github.com/golang-jwt/jwt/v5"
|
||||||
|
"github.com/pkg/errors"
|
||||||
|
merrors "go-micro.dev/v4/errors"
|
||||||
|
"google.golang.org/grpc/metadata"
|
||||||
|
|
||||||
revactx "github.com/opencloud-eu/reva/v2/pkg/ctx"
|
revactx "github.com/opencloud-eu/reva/v2/pkg/ctx"
|
||||||
"github.com/opencloud-eu/reva/v2/pkg/rgrpc/todo/pool"
|
"github.com/opencloud-eu/reva/v2/pkg/rgrpc/todo/pool"
|
||||||
"github.com/opencloud-eu/reva/v2/pkg/storagespace"
|
"github.com/opencloud-eu/reva/v2/pkg/storagespace"
|
||||||
"github.com/opencloud-eu/reva/v2/pkg/utils"
|
"github.com/opencloud-eu/reva/v2/pkg/utils"
|
||||||
"github.com/pkg/errors"
|
|
||||||
merrors "go-micro.dev/v4/errors"
|
|
||||||
"google.golang.org/grpc/metadata"
|
|
||||||
|
|
||||||
"github.com/opencloud-eu/opencloud/pkg/log"
|
"github.com/opencloud-eu/opencloud/pkg/log"
|
||||||
thumbnailssvc "github.com/opencloud-eu/opencloud/protogen/gen/opencloud/services/thumbnails/v0"
|
thumbnailssvc "github.com/opencloud-eu/opencloud/protogen/gen/opencloud/services/thumbnails/v0"
|
||||||
@@ -169,6 +170,10 @@ func (g Thumbnail) handleCS3Source(ctx context.Context, req *thumbnailssvc.GetTh
|
|||||||
}
|
}
|
||||||
pp := preprocessor.ForType(sRes.GetInfo().GetMimeType(), ppOpts)
|
pp := preprocessor.ForType(sRes.GetInfo().GetMimeType(), ppOpts)
|
||||||
img, err := pp.Convert(r)
|
img, err := pp.Convert(r)
|
||||||
|
if err != nil {
|
||||||
|
g.logger.Error().Err(err).Msg("failed to convert image")
|
||||||
|
}
|
||||||
|
|
||||||
if img == nil || err != nil {
|
if img == nil || err != nil {
|
||||||
return "", merrors.NotFound(g.serviceID, "could not get image")
|
return "", merrors.NotFound(g.serviceID, "could not get image")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,19 +0,0 @@
|
|||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"os"
|
|
||||||
"os/signal"
|
|
||||||
"syscall"
|
|
||||||
|
|
||||||
"github.com/opencloud-eu/opencloud/services/userlog/pkg/command"
|
|
||||||
"github.com/opencloud-eu/opencloud/services/userlog/pkg/config/defaults"
|
|
||||||
)
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
cfg := defaults.DefaultConfig()
|
|
||||||
cfg.Context, _ = signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT, syscall.SIGHUP)
|
|
||||||
if err := command.Execute(cfg); err != nil {
|
|
||||||
os.Exit(1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -11,7 +11,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: \n"
|
"Project-Id-Version: \n"
|
||||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||||
"POT-Creation-Date: 2025-12-19 00:05+0000\n"
|
"POT-Creation-Date: 2025-12-25 00:05+0000\n"
|
||||||
"PO-Revision-Date: 2025-01-27 10:17+0000\n"
|
"PO-Revision-Date: 2025-01-27 10:17+0000\n"
|
||||||
"Last-Translator: ii kaka, 2025\n"
|
"Last-Translator: ii kaka, 2025\n"
|
||||||
"Language-Team: Japanese (https://app.transifex.com/opencloud-eu/teams/204053/ja/)\n"
|
"Language-Team: Japanese (https://app.transifex.com/opencloud-eu/teams/204053/ja/)\n"
|
||||||
@@ -52,7 +52,7 @@ msgstr "メンバーシップの期限が切れました"
|
|||||||
|
|
||||||
#: pkg/service/templates.go:13
|
#: pkg/service/templates.go:13
|
||||||
msgid "Policies enforced"
|
msgid "Policies enforced"
|
||||||
msgstr " ポリシーが適用されました"
|
msgstr "ポリシーが適用されました"
|
||||||
|
|
||||||
#: pkg/service/templates.go:23
|
#: pkg/service/templates.go:23
|
||||||
msgid "Removed from Space"
|
msgid "Removed from Space"
|
||||||
@@ -84,7 +84,7 @@ msgstr "スペースが共有されました"
|
|||||||
|
|
||||||
#: pkg/service/templates.go:8
|
#: pkg/service/templates.go:8
|
||||||
msgid "Virus found"
|
msgid "Virus found"
|
||||||
msgstr " ウイルスが検出されました"
|
msgstr "ウイルスが検出されました"
|
||||||
|
|
||||||
#: pkg/service/templates.go:9
|
#: pkg/service/templates.go:9
|
||||||
msgid "Virus found in {resource}. Upload not possible. Virus: {virus}"
|
msgid "Virus found in {resource}. Upload not possible. Virus: {virus}"
|
||||||
|
|||||||
@@ -1,19 +0,0 @@
|
|||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"os"
|
|
||||||
"os/signal"
|
|
||||||
"syscall"
|
|
||||||
|
|
||||||
"github.com/opencloud-eu/opencloud/services/users/pkg/command"
|
|
||||||
"github.com/opencloud-eu/opencloud/services/users/pkg/config/defaults"
|
|
||||||
)
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
cfg := defaults.DefaultConfig()
|
|
||||||
cfg.Context, _ = signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT, syscall.SIGHUP)
|
|
||||||
if err := command.Execute(cfg); err != nil {
|
|
||||||
os.Exit(1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"os"
|
|
||||||
"os/signal"
|
|
||||||
"syscall"
|
|
||||||
|
|
||||||
"github.com/opencloud-eu/opencloud/services/web/pkg/command"
|
|
||||||
"github.com/opencloud-eu/opencloud/services/web/pkg/config/defaults"
|
|
||||||
)
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
cfg := defaults.DefaultConfig()
|
|
||||||
cfg.Context, _ = signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT, syscall.SIGHUP)
|
|
||||||
if err := command.Execute(cfg); err != nil {
|
|
||||||
os.Exit(1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"os"
|
|
||||||
"os/signal"
|
|
||||||
"syscall"
|
|
||||||
|
|
||||||
"github.com/opencloud-eu/opencloud/services/webdav/pkg/command"
|
|
||||||
"github.com/opencloud-eu/opencloud/services/webdav/pkg/config/defaults"
|
|
||||||
)
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
cfg := defaults.DefaultConfig()
|
|
||||||
cfg.Context, _ = signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT, syscall.SIGHUP)
|
|
||||||
if err := command.Execute(cfg); err != nil {
|
|
||||||
os.Exit(1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"os"
|
|
||||||
"os/signal"
|
|
||||||
"syscall"
|
|
||||||
|
|
||||||
"github.com/opencloud-eu/opencloud/services/webfinger/pkg/command"
|
|
||||||
"github.com/opencloud-eu/opencloud/services/webfinger/pkg/config/defaults"
|
|
||||||
)
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
cfg := defaults.DefaultConfig()
|
|
||||||
cfg.Context, _ = signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT, syscall.SIGHUP)
|
|
||||||
if err := command.Execute(cfg); err != nil {
|
|
||||||
os.Exit(1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -198,7 +198,7 @@ class HttpRequestHelper {
|
|||||||
// wait for post-processing to finish if applicable
|
// wait for post-processing to finish if applicable
|
||||||
if (WebdavHelper::isDAVRequest($url)
|
if (WebdavHelper::isDAVRequest($url)
|
||||||
&& \str_starts_with($url, OcHelper::getServerUrl())
|
&& \str_starts_with($url, OcHelper::getServerUrl())
|
||||||
&& \in_array($method, ["PUT", "MOVE", "COPY"])
|
&& \in_array($method, ["PUT", "MOVE", "COPY", "MKCOL"])
|
||||||
&& \in_array($response->getStatusCode(), [Response::HTTP_CREATED, Response::HTTP_NO_CONTENT])
|
&& \in_array($response->getStatusCode(), [Response::HTTP_CREATED, Response::HTTP_NO_CONTENT])
|
||||||
&& OcConfigHelper::getPostProcessingDelay() === 0
|
&& OcConfigHelper::getPostProcessingDelay() === 0
|
||||||
) {
|
) {
|
||||||
|
|||||||
@@ -377,7 +377,7 @@ class NotificationContext implements Context {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Then /^user "([^"]*)" should (?:get|have) a notification with subject "([^"]*)" and message:$/
|
* @Then /^user "([^"]*)" should get a notification with subject "([^"]*)" and message:$/
|
||||||
*
|
*
|
||||||
* @param string $user
|
* @param string $user
|
||||||
* @param string $subject
|
* @param string $subject
|
||||||
@@ -411,10 +411,10 @@ class NotificationContext implements Context {
|
|||||||
throw new \Exception("Notification was not found even after retrying for 5 seconds.");
|
throw new \Exception("Notification was not found even after retrying for 5 seconds.");
|
||||||
}
|
}
|
||||||
$expectedMessage = $table->getColumnsHash()[0]['message'];
|
$expectedMessage = $table->getColumnsHash()[0]['message'];
|
||||||
Assert::assertSame(
|
Assert::assertStringStartsWith(
|
||||||
$expectedMessage,
|
$expectedMessage,
|
||||||
$actualMessage,
|
$actualMessage,
|
||||||
__METHOD__ . "expected message to be '$expectedMessage' but found'$actualMessage'"
|
__METHOD__ . "expected message to start with '$expectedMessage' but found'$actualMessage'"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -441,10 +441,10 @@ class NotificationContext implements Context {
|
|||||||
if (\count($notification) === 1) {
|
if (\count($notification) === 1) {
|
||||||
$actualMessage = str_replace(["\r", "\r"], " ", $notification[0]->message);
|
$actualMessage = str_replace(["\r", "\r"], " ", $notification[0]->message);
|
||||||
$expectedMessage = $table->getColumnsHash()[0]['message'];
|
$expectedMessage = $table->getColumnsHash()[0]['message'];
|
||||||
Assert::assertSame(
|
Assert::assertStringStartsWith(
|
||||||
$expectedMessage,
|
$expectedMessage,
|
||||||
$actualMessage,
|
$actualMessage,
|
||||||
__METHOD__ . "expected message to be '$expectedMessage' but found'$actualMessage'"
|
__METHOD__ . "expected message to start with '$expectedMessage' but found'$actualMessage'"
|
||||||
);
|
);
|
||||||
$response = $this->userDeletesNotification($user);
|
$response = $this->userDeletesNotification($user);
|
||||||
$this->featureContext->theHTTPStatusCodeShouldBe(200, '', $response);
|
$this->featureContext->theHTTPStatusCodeShouldBe(200, '', $response);
|
||||||
@@ -462,7 +462,7 @@ class NotificationContext implements Context {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Then user :user should not have a notification related to resource :resource with subject :subject
|
* @Then user :user should not get a notification related to resource :resource with subject :subject
|
||||||
*
|
*
|
||||||
* @param string $user
|
* @param string $user
|
||||||
* @param string $resource
|
* @param string $resource
|
||||||
|
|||||||
@@ -36,13 +36,13 @@ Feature: antivirus
|
|||||||
| <message> |
|
| <message> |
|
||||||
And as "Alice" file "<new-file-name>" should not exist
|
And as "Alice" file "<new-file-name>" should not exist
|
||||||
Examples:
|
Examples:
|
||||||
| dav-path-version | file-name | new-file-name | message |
|
| dav-path-version | file-name | new-file-name | message |
|
||||||
| old | eicar.com | virusFile1.txt | Virus found in virusFile1.txt. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
| old | eicar.com | virusFile1.txt | Virus found in virusFile1.txt. Upload not possible. Virus: |
|
||||||
| old | eicar_com.zip | virusFile2.zip | Virus found in virusFile2.zip. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
| old | eicar_com.zip | virusFile2.zip | Virus found in virusFile2.zip. Upload not possible. Virus: |
|
||||||
| new | eicar.com | virusFile1.txt | Virus found in virusFile1.txt. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
| new | eicar.com | virusFile1.txt | Virus found in virusFile1.txt. Upload not possible. Virus: |
|
||||||
| new | eicar_com.zip | virusFile2.zip | Virus found in virusFile2.zip. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
| new | eicar_com.zip | virusFile2.zip | Virus found in virusFile2.zip. Upload not possible. Virus: |
|
||||||
| spaces | eicar.com | virusFile1.txt | Virus found in virusFile1.txt. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
| spaces | eicar.com | virusFile1.txt | Virus found in virusFile1.txt. Upload not possible. Virus: |
|
||||||
| spaces | eicar_com.zip | virusFile2.zip | Virus found in virusFile2.zip. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
| spaces | eicar_com.zip | virusFile2.zip | Virus found in virusFile2.zip. Upload not possible. Virus: |
|
||||||
|
|
||||||
|
|
||||||
Scenario Outline: upload a file with virus and a file without virus
|
Scenario Outline: upload a file with virus and a file without virus
|
||||||
@@ -64,13 +64,13 @@ Feature: antivirus
|
|||||||
Cheers.
|
Cheers.
|
||||||
"""
|
"""
|
||||||
Examples:
|
Examples:
|
||||||
| dav-path-version | file-name | new-file-name | message |
|
| dav-path-version | file-name | new-file-name | message |
|
||||||
| old | eicar.com | virusFile1.txt | Virus found in virusFile1.txt. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
| old | eicar.com | virusFile1.txt | Virus found in virusFile1.txt. Upload not possible. Virus: |
|
||||||
| old | eicar_com.zip | virusFile2.zip | Virus found in virusFile2.zip. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
| old | eicar_com.zip | virusFile2.zip | Virus found in virusFile2.zip. Upload not possible. Virus: |
|
||||||
| new | eicar.com | virusFile1.txt | Virus found in virusFile1.txt. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
| new | eicar.com | virusFile1.txt | Virus found in virusFile1.txt. Upload not possible. Virus: |
|
||||||
| new | eicar_com.zip | virusFile2.zip | Virus found in virusFile2.zip. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
| new | eicar_com.zip | virusFile2.zip | Virus found in virusFile2.zip. Upload not possible. Virus: |
|
||||||
| spaces | eicar.com | virusFile1.txt | Virus found in virusFile1.txt. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
| spaces | eicar.com | virusFile1.txt | Virus found in virusFile1.txt. Upload not possible. Virus: |
|
||||||
| spaces | eicar_com.zip | virusFile2.zip | Virus found in virusFile2.zip. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
| spaces | eicar_com.zip | virusFile2.zip | Virus found in virusFile2.zip. Upload not possible. Virus: |
|
||||||
|
|
||||||
|
|
||||||
Scenario Outline: upload a file with virus in chunks
|
Scenario Outline: upload a file with virus in chunks
|
||||||
@@ -83,8 +83,8 @@ Feature: antivirus
|
|||||||
# antivirus service can scan files during post-processing. on demand scanning is currently not available
|
# antivirus service can scan files during post-processing. on demand scanning is currently not available
|
||||||
Then the HTTP status code should be "201"
|
Then the HTTP status code should be "201"
|
||||||
And user "Alice" should get a notification with subject "Virus found" and message:
|
And user "Alice" should get a notification with subject "Virus found" and message:
|
||||||
| message |
|
| message |
|
||||||
| Virus found in myChunkedFile.txt. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
| Virus found in myChunkedFile.txt. Upload not possible. Virus: |
|
||||||
And as "Alice" file "/myChunkedFile.txt" should not exist
|
And as "Alice" file "/myChunkedFile.txt" should not exist
|
||||||
Examples:
|
Examples:
|
||||||
| dav-path-version |
|
| dav-path-version |
|
||||||
@@ -110,13 +110,13 @@ Feature: antivirus
|
|||||||
| <message> |
|
| <message> |
|
||||||
And as "Alice" file "/uploadFolder/<new-file-name>" should not exist
|
And as "Alice" file "/uploadFolder/<new-file-name>" should not exist
|
||||||
Examples:
|
Examples:
|
||||||
| dav-path-version | file-name | new-file-name | message |
|
| dav-path-version | file-name | new-file-name | message |
|
||||||
| old | eicar.com | virusFile1.txt | Virus found in virusFile1.txt. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
| old | eicar.com | virusFile1.txt | Virus found in virusFile1.txt. Upload not possible. Virus: |
|
||||||
| old | eicar_com.zip | virusFile2.zip | Virus found in virusFile2.zip. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
| old | eicar_com.zip | virusFile2.zip | Virus found in virusFile2.zip. Upload not possible. Virus: |
|
||||||
| new | eicar.com | virusFile1.txt | Virus found in virusFile1.txt. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
| new | eicar.com | virusFile1.txt | Virus found in virusFile1.txt. Upload not possible. Virus: |
|
||||||
| new | eicar_com.zip | virusFile2.zip | Virus found in virusFile2.zip. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
| new | eicar_com.zip | virusFile2.zip | Virus found in virusFile2.zip. Upload not possible. Virus: |
|
||||||
| spaces | eicar.com | virusFile1.txt | Virus found in virusFile1.txt. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
| spaces | eicar.com | virusFile1.txt | Virus found in virusFile1.txt. Upload not possible. Virus: |
|
||||||
| spaces | eicar_com.zip | virusFile2.zip | Virus found in virusFile2.zip. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
| spaces | eicar_com.zip | virusFile2.zip | Virus found in virusFile2.zip. Upload not possible. Virus: |
|
||||||
|
|
||||||
@issue-10331
|
@issue-10331
|
||||||
Scenario Outline: public uploads a file with the virus to a password-protected public share
|
Scenario Outline: public uploads a file with the virus to a password-protected public share
|
||||||
@@ -136,13 +136,13 @@ Feature: antivirus
|
|||||||
| <message> |
|
| <message> |
|
||||||
And as "Alice" file "/uploadFolder/<new-file-name>" should not exist
|
And as "Alice" file "/uploadFolder/<new-file-name>" should not exist
|
||||||
Examples:
|
Examples:
|
||||||
| dav-path-version | file-name | new-file-name | message |
|
| dav-path-version | file-name | new-file-name | message |
|
||||||
| old | eicar.com | virusFile1.txt | Virus found in virusFile1.txt. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
| old | eicar.com | virusFile1.txt | Virus found in virusFile1.txt. Upload not possible. Virus: |
|
||||||
| old | eicar_com.zip | virusFile2.zip | Virus found in virusFile2.zip. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
| old | eicar_com.zip | virusFile2.zip | Virus found in virusFile2.zip. Upload not possible. Virus: |
|
||||||
| new | eicar.com | virusFile1.txt | Virus found in virusFile1.txt. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
| new | eicar.com | virusFile1.txt | Virus found in virusFile1.txt. Upload not possible. Virus: |
|
||||||
| new | eicar_com.zip | virusFile2.zip | Virus found in virusFile2.zip. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
| new | eicar_com.zip | virusFile2.zip | Virus found in virusFile2.zip. Upload not possible. Virus: |
|
||||||
| spaces | eicar.com | virusFile1.txt | Virus found in virusFile1.txt. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
| spaces | eicar.com | virusFile1.txt | Virus found in virusFile1.txt. Upload not possible. Virus: |
|
||||||
| spaces | eicar_com.zip | virusFile2.zip | Virus found in virusFile2.zip. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
| spaces | eicar_com.zip | virusFile2.zip | Virus found in virusFile2.zip. Upload not possible. Virus: |
|
||||||
|
|
||||||
|
|
||||||
Scenario Outline: upload a file with virus to a user share
|
Scenario Outline: upload a file with virus to a user share
|
||||||
@@ -164,13 +164,13 @@ Feature: antivirus
|
|||||||
And as "Brian" file "/Shares/uploadFolder/<new-file-name>" should not exist
|
And as "Brian" file "/Shares/uploadFolder/<new-file-name>" should not exist
|
||||||
And as "Alice" file "/uploadFolder/<new-file-name>" should not exist
|
And as "Alice" file "/uploadFolder/<new-file-name>" should not exist
|
||||||
Examples:
|
Examples:
|
||||||
| dav-path-version | file-name | new-file-name | message |
|
| dav-path-version | file-name | new-file-name | message |
|
||||||
| old | eicar.com | virusFile1.txt | Virus found in virusFile1.txt. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
| old | eicar.com | virusFile1.txt | Virus found in virusFile1.txt. Upload not possible. Virus: |
|
||||||
| old | eicar_com.zip | virusFile2.zip | Virus found in virusFile2.zip. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
| old | eicar_com.zip | virusFile2.zip | Virus found in virusFile2.zip. Upload not possible. Virus: |
|
||||||
| new | eicar.com | virusFile1.txt | Virus found in virusFile1.txt. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
| new | eicar.com | virusFile1.txt | Virus found in virusFile1.txt. Upload not possible. Virus: |
|
||||||
| new | eicar_com.zip | virusFile2.zip | Virus found in virusFile2.zip. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
| new | eicar_com.zip | virusFile2.zip | Virus found in virusFile2.zip. Upload not possible. Virus: |
|
||||||
| spaces | eicar.com | virusFile1.txt | Virus found in virusFile1.txt. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
| spaces | eicar.com | virusFile1.txt | Virus found in virusFile1.txt. Upload not possible. Virus: |
|
||||||
| spaces | eicar_com.zip | virusFile2.zip | Virus found in virusFile2.zip. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
| spaces | eicar_com.zip | virusFile2.zip | Virus found in virusFile2.zip. Upload not possible. Virus: |
|
||||||
|
|
||||||
|
|
||||||
Scenario Outline: upload a file with virus to a group share
|
Scenario Outline: upload a file with virus to a group share
|
||||||
@@ -195,13 +195,13 @@ Feature: antivirus
|
|||||||
And as "Brian" file "/Shares/uploadFolder/<new-file-name>" should not exist
|
And as "Brian" file "/Shares/uploadFolder/<new-file-name>" should not exist
|
||||||
And as "Alice" file "/uploadFolder/<new-file-name>" should not exist
|
And as "Alice" file "/uploadFolder/<new-file-name>" should not exist
|
||||||
Examples:
|
Examples:
|
||||||
| dav-path-version | file-name | new-file-name | message |
|
| dav-path-version | file-name | new-file-name | message |
|
||||||
| old | eicar.com | virusFile1.txt | Virus found in virusFile1.txt. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
| old | eicar.com | virusFile1.txt | Virus found in virusFile1.txt. Upload not possible. Virus: |
|
||||||
| old | eicar_com.zip | virusFile2.zip | Virus found in virusFile2.zip. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
| old | eicar_com.zip | virusFile2.zip | Virus found in virusFile2.zip. Upload not possible. Virus: |
|
||||||
| new | eicar.com | virusFile1.txt | Virus found in virusFile1.txt. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
| new | eicar.com | virusFile1.txt | Virus found in virusFile1.txt. Upload not possible. Virus: |
|
||||||
| new | eicar_com.zip | virusFile2.zip | Virus found in virusFile2.zip. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
| new | eicar_com.zip | virusFile2.zip | Virus found in virusFile2.zip. Upload not possible. Virus: |
|
||||||
| spaces | eicar.com | virusFile1.txt | Virus found in virusFile1.txt. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
| spaces | eicar.com | virusFile1.txt | Virus found in virusFile1.txt. Upload not possible. Virus: |
|
||||||
| spaces | eicar_com.zip | virusFile2.zip | Virus found in virusFile2.zip. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
| spaces | eicar_com.zip | virusFile2.zip | Virus found in virusFile2.zip. Upload not possible. Virus: |
|
||||||
|
|
||||||
|
|
||||||
Scenario Outline: upload a file with virus to a project space
|
Scenario Outline: upload a file with virus to a project space
|
||||||
@@ -224,9 +224,9 @@ Feature: antivirus
|
|||||||
And for user "Alice" the space "new-space" should not contain these entries:
|
And for user "Alice" the space "new-space" should not contain these entries:
|
||||||
| /<new-file-name> |
|
| /<new-file-name> |
|
||||||
Examples:
|
Examples:
|
||||||
| file-name | new-file-name | message |
|
| file-name | new-file-name | message |
|
||||||
| eicar.com | virusFile1.txt | Virus found in virusFile1.txt. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
| eicar.com | virusFile1.txt | Virus found in virusFile1.txt. Upload not possible. Virus: |
|
||||||
| eicar_com.zip | virusFile2.zip | Virus found in virusFile2.zip. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
| eicar_com.zip | virusFile2.zip | Virus found in virusFile2.zip. Upload not possible. Virus: |
|
||||||
|
|
||||||
|
|
||||||
Scenario Outline: upload a file with virus to a shared project space
|
Scenario Outline: upload a file with virus to a shared project space
|
||||||
@@ -249,9 +249,9 @@ Feature: antivirus
|
|||||||
And for user "Alice" the space "new-space" should not contain these entries:
|
And for user "Alice" the space "new-space" should not contain these entries:
|
||||||
| /<new-file-name> |
|
| /<new-file-name> |
|
||||||
Examples:
|
Examples:
|
||||||
| file-name | new-file-name | message |
|
| file-name | new-file-name | message |
|
||||||
| eicar.com | virusFile1.txt | Virus found in virusFile1.txt. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
| eicar.com | virusFile1.txt | Virus found in virusFile1.txt. Upload not possible. Virus: |
|
||||||
| eicar_com.zip | virusFile2.zip | Virus found in virusFile2.zip. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
| eicar_com.zip | virusFile2.zip | Virus found in virusFile2.zip. Upload not possible. Virus: |
|
||||||
|
|
||||||
@env-config @issue-6494
|
@env-config @issue-6494
|
||||||
Scenario Outline: upload a file with virus by setting antivirus infected file handling config to continue
|
Scenario Outline: upload a file with virus by setting antivirus infected file handling config to continue
|
||||||
@@ -273,8 +273,8 @@ Feature: antivirus
|
|||||||
When user "Alice" uploads file "filesForUpload/filesWithVirus/eicar.com" to "/aFileWithVirus.txt" using the WebDAV API
|
When user "Alice" uploads file "filesForUpload/filesWithVirus/eicar.com" to "/aFileWithVirus.txt" using the WebDAV API
|
||||||
Then the HTTP status code should be "201"
|
Then the HTTP status code should be "201"
|
||||||
And user "Alice" should get a notification with subject "Virus found" and message:
|
And user "Alice" should get a notification with subject "Virus found" and message:
|
||||||
| message |
|
| message |
|
||||||
| Virus found in aFileWithVirus.txt. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
| Virus found in aFileWithVirus.txt. Upload not possible. Virus: |
|
||||||
And as "Alice" file "/aFileWithVirus.txt" should not exist
|
And as "Alice" file "/aFileWithVirus.txt" should not exist
|
||||||
Examples:
|
Examples:
|
||||||
| dav-path-version |
|
| dav-path-version |
|
||||||
@@ -307,12 +307,12 @@ Feature: antivirus
|
|||||||
And as "Alice" file "/aFileWithVirus.txt" should not exist
|
And as "Alice" file "/aFileWithVirus.txt" should not exist
|
||||||
Examples:
|
Examples:
|
||||||
| dav-path-version | language | subject | message |
|
| dav-path-version | language | subject | message |
|
||||||
| old | es | Virus encontrado | Virus encontrado en aFileWithVirus.txt. La subida no ha sido posible. Virus: Win.Test.EICAR_HDB-1 |
|
| old | es | Virus encontrado | Virus encontrado en aFileWithVirus.txt. La subida no ha sido posible. Virus: |
|
||||||
| new | es | Virus encontrado | Virus encontrado en aFileWithVirus.txt. La subida no ha sido posible. Virus: Win.Test.EICAR_HDB-1 |
|
| new | es | Virus encontrado | Virus encontrado en aFileWithVirus.txt. La subida no ha sido posible. Virus: |
|
||||||
| spaces | es | Virus encontrado | Virus encontrado en aFileWithVirus.txt. La subida no ha sido posible. Virus: Win.Test.EICAR_HDB-1 |
|
| spaces | es | Virus encontrado | Virus encontrado en aFileWithVirus.txt. La subida no ha sido posible. Virus: |
|
||||||
| old | de | Virus gefunden | In aFileWithVirus.txt wurde potenziell schädlicher Code gefunden. Das Hochladen wurde abgebrochen. Grund: Win.Test.EICAR_HDB-1 |
|
| old | de | Virus gefunden | In aFileWithVirus.txt wurde potenziell schädlicher Code gefunden. Das Hochladen wurde abgebrochen. Grund: |
|
||||||
| new | de | Virus gefunden | In aFileWithVirus.txt wurde potenziell schädlicher Code gefunden. Das Hochladen wurde abgebrochen. Grund: Win.Test.EICAR_HDB-1 |
|
| new | de | Virus gefunden | In aFileWithVirus.txt wurde potenziell schädlicher Code gefunden. Das Hochladen wurde abgebrochen. Grund: |
|
||||||
| spaces | de | Virus gefunden | In aFileWithVirus.txt wurde potenziell schädlicher Code gefunden. Das Hochladen wurde abgebrochen. Grund: Win.Test.EICAR_HDB-1 |
|
| spaces | de | Virus gefunden | In aFileWithVirus.txt wurde potenziell schädlicher Code gefunden. Das Hochladen wurde abgebrochen. Grund: |
|
||||||
|
|
||||||
@issue-enterprise-5709
|
@issue-enterprise-5709
|
||||||
Scenario Outline: try to create a version of file by uploading virus content
|
Scenario Outline: try to create a version of file by uploading virus content
|
||||||
@@ -322,8 +322,8 @@ Feature: antivirus
|
|||||||
When user "Alice" uploads file with content "X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*" to "test.txt" using the WebDAV API
|
When user "Alice" uploads file with content "X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*" to "test.txt" using the WebDAV API
|
||||||
Then the HTTP status code should be "204"
|
Then the HTTP status code should be "204"
|
||||||
And user "Alice" should get a notification with subject "Virus found" and message:
|
And user "Alice" should get a notification with subject "Virus found" and message:
|
||||||
| message |
|
| message |
|
||||||
| Virus found in test.txt. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
| Virus found in test.txt. Upload not possible. Virus: |
|
||||||
And as "Alice" file "/test.txt" should exist
|
And as "Alice" file "/test.txt" should exist
|
||||||
And the version folder of file "/test.txt" for user "Alice" should contain "1" element
|
And the version folder of file "/test.txt" for user "Alice" should contain "1" element
|
||||||
And the content of file "/test.txt" for user "Alice" should be "hello nepal"
|
And the content of file "/test.txt" for user "Alice" should be "hello nepal"
|
||||||
@@ -349,8 +349,8 @@ Feature: antivirus
|
|||||||
When the public overwrites file "test.txt" with content "X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*" using the public WebDAV API
|
When the public overwrites file "test.txt" with content "X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*" using the public WebDAV API
|
||||||
Then the HTTP status code should be "204"
|
Then the HTTP status code should be "204"
|
||||||
And user "Alice" should get a notification with subject "Virus found" and message:
|
And user "Alice" should get a notification with subject "Virus found" and message:
|
||||||
| message |
|
| message |
|
||||||
| Virus found in test.txt. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
| Virus found in test.txt. Upload not possible. Virus: |
|
||||||
And the content of file "/test.txt" for user "Alice" should be "hello"
|
And the content of file "/test.txt" for user "Alice" should be "hello"
|
||||||
Examples:
|
Examples:
|
||||||
| dav-path-version |
|
| dav-path-version |
|
||||||
@@ -376,8 +376,8 @@ Feature: antivirus
|
|||||||
When user "Brian" uploads file with content "X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*" to "Shares/test.txt" using the WebDAV API
|
When user "Brian" uploads file with content "X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*" to "Shares/test.txt" using the WebDAV API
|
||||||
Then the HTTP status code should be "204"
|
Then the HTTP status code should be "204"
|
||||||
And user "Brian" should get a notification with subject "Virus found" and message:
|
And user "Brian" should get a notification with subject "Virus found" and message:
|
||||||
| message |
|
| message |
|
||||||
| Virus found in test.txt. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
| Virus found in test.txt. Upload not possible. Virus: |
|
||||||
And the content of file "/test.txt" for user "Alice" should be "hello"
|
And the content of file "/test.txt" for user "Alice" should be "hello"
|
||||||
And the content of file "Shares/test.txt" for user "Brian" should be "hello"
|
And the content of file "Shares/test.txt" for user "Brian" should be "hello"
|
||||||
Examples:
|
Examples:
|
||||||
@@ -410,15 +410,15 @@ Feature: antivirus
|
|||||||
When user "Brian" uploads file with content "X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*" to "Shares/uploadFolder/test.txt" using the WebDAV API
|
When user "Brian" uploads file with content "X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*" to "Shares/uploadFolder/test.txt" using the WebDAV API
|
||||||
Then the HTTP status code should be "204"
|
Then the HTTP status code should be "204"
|
||||||
And user "Brian" should get a notification for resource "test.txt" with subject "Virus found" and message:
|
And user "Brian" should get a notification for resource "test.txt" with subject "Virus found" and message:
|
||||||
| message |
|
| message |
|
||||||
| Virus found in test.txt. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
| Virus found in test.txt. Upload not possible. Virus: |
|
||||||
And the content of file "Shares/uploadFolder/test.txt" for user "Brian" should be "this is a test file."
|
And the content of file "Shares/uploadFolder/test.txt" for user "Brian" should be "this is a test file."
|
||||||
And the content of file "uploadFolder/test.txt" for user "Alice" should be "this is a test file."
|
And the content of file "uploadFolder/test.txt" for user "Alice" should be "this is a test file."
|
||||||
When user "Brian" uploads file with content "X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*" to "Shares/test.txt" using the WebDAV API
|
When user "Brian" uploads file with content "X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*" to "Shares/test.txt" using the WebDAV API
|
||||||
Then the HTTP status code should be "204"
|
Then the HTTP status code should be "204"
|
||||||
And user "Brian" should get a notification for resource "test.txt" with subject "Virus found" and message:
|
And user "Brian" should get a notification for resource "test.txt" with subject "Virus found" and message:
|
||||||
| message |
|
| message |
|
||||||
| Virus found in test.txt. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
| Virus found in test.txt. Upload not possible. Virus: |
|
||||||
And the content of file "Shares/test.txt" for user "Brian" should be "this is a test file."
|
And the content of file "Shares/test.txt" for user "Brian" should be "this is a test file."
|
||||||
And the content of file "/test.txt" for user "Alice" should be "this is a test file."
|
And the content of file "/test.txt" for user "Alice" should be "this is a test file."
|
||||||
Examples:
|
Examples:
|
||||||
@@ -437,8 +437,8 @@ Feature: antivirus
|
|||||||
When user "Alice" uploads a file inside space "new-space" with content "X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*" to ".space/readme.md" using the WebDAV API
|
When user "Alice" uploads a file inside space "new-space" with content "X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*" to ".space/readme.md" using the WebDAV API
|
||||||
Then the HTTP status code should be "204"
|
Then the HTTP status code should be "204"
|
||||||
And user "Alice" should get a notification with subject "Virus found" and message:
|
And user "Alice" should get a notification with subject "Virus found" and message:
|
||||||
| message |
|
| message |
|
||||||
| Virus found in readme.md. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
| Virus found in readme.md. Upload not possible. Virus: |
|
||||||
And for user "Alice" the content of the file ".space/readme.md" of the space "new-space" should be "Here you can add a description for this Space."
|
And for user "Alice" the content of the file ".space/readme.md" of the space "new-space" should be "Here you can add a description for this Space."
|
||||||
|
|
||||||
|
|
||||||
@@ -458,8 +458,8 @@ Feature: antivirus
|
|||||||
When user "Brian" uploads a file inside space "new-space" with content "X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*" to ".space/readme.md" using the WebDAV API
|
When user "Brian" uploads a file inside space "new-space" with content "X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*" to ".space/readme.md" using the WebDAV API
|
||||||
Then the HTTP status code should be "204"
|
Then the HTTP status code should be "204"
|
||||||
And user "Brian" should get a notification with subject "Virus found" and message:
|
And user "Brian" should get a notification with subject "Virus found" and message:
|
||||||
| message |
|
| message |
|
||||||
| Virus found in readme.md. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
| Virus found in readme.md. Upload not possible. Virus: |
|
||||||
And for user "Brian" the content of the file ".space/readme.md" of the space "new-space" should be "Here you can add a description for this Space."
|
And for user "Brian" the content of the file ".space/readme.md" of the space "new-space" should be "Here you can add a description for this Space."
|
||||||
And for user "Alice" the content of the file ".space/readme.md" of the space "new-space" should be "Here you can add a description for this Space."
|
And for user "Alice" the content of the file ".space/readme.md" of the space "new-space" should be "Here you can add a description for this Space."
|
||||||
|
|
||||||
@@ -478,7 +478,7 @@ Feature: antivirus
|
|||||||
When user "Brian" uploads a file "filesForUpload/filesWithVirus/eicar.com" to "text.txt" in space "new-space" using the WebDAV API
|
When user "Brian" uploads a file "filesForUpload/filesWithVirus/eicar.com" to "text.txt" in space "new-space" using the WebDAV API
|
||||||
Then the HTTP status code should be "204"
|
Then the HTTP status code should be "204"
|
||||||
And user "Brian" should get a notification with subject "Virus found" and message:
|
And user "Brian" should get a notification with subject "Virus found" and message:
|
||||||
| message |
|
| message |
|
||||||
| Virus found in text.txt. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
| Virus found in text.txt. Upload not possible. Virus: |
|
||||||
And for user "Brian" the content of the file "/text.txt" of the space "new-space" should be "hello world"
|
And for user "Brian" the content of the file "/text.txt" of the space "new-space" should be "hello world"
|
||||||
And for user "Alice" the content of the file "/text.txt" of the space "new-space" should be "hello world"
|
And for user "Alice" the content of the file "/text.txt" of the space "new-space" should be "hello world"
|
||||||
|
|||||||
@@ -27,10 +27,10 @@ Feature: Delete notification
|
|||||||
Scenario: delete a notification
|
Scenario: delete a notification
|
||||||
When user "Brian" deletes a notification related to resource "my_data" with subject "Resource shared"
|
When user "Brian" deletes a notification related to resource "my_data" with subject "Resource shared"
|
||||||
Then the HTTP status code should be "200"
|
Then the HTTP status code should be "200"
|
||||||
And user "Brian" should have a notification with subject "Resource shared" and message:
|
And user "Brian" should get a notification with subject "Resource shared" and message:
|
||||||
| message |
|
| message |
|
||||||
| Alice Hansen shared textfile1.txt with you |
|
| Alice Hansen shared textfile1.txt with you |
|
||||||
But user "Brian" should not have a notification related to resource "my_data" with subject "Resource shared"
|
But user "Brian" should not get a notification related to resource "my_data" with subject "Resource shared"
|
||||||
|
|
||||||
|
|
||||||
Scenario: delete all notifications
|
Scenario: delete all notifications
|
||||||
|
|||||||
@@ -202,7 +202,7 @@ Feature: capabilities
|
|||||||
"properties": {
|
"properties": {
|
||||||
"edition": {
|
"edition": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"enum": ["dev"]
|
"enum": ["%edition%"]
|
||||||
},
|
},
|
||||||
"product": {
|
"product": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
@@ -240,7 +240,7 @@ Feature: capabilities
|
|||||||
},
|
},
|
||||||
"edition": {
|
"edition": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"enum": ["dev"]
|
"enum": ["%edition%"]
|
||||||
},
|
},
|
||||||
"product": {
|
"product": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ Feature: default capabilities for normal user
|
|||||||
"const": "%versionstring%"
|
"const": "%versionstring%"
|
||||||
},
|
},
|
||||||
"edition": {
|
"edition": {
|
||||||
"const": "dev"
|
"const": "%edition%"
|
||||||
},
|
},
|
||||||
"productname": {
|
"productname": {
|
||||||
"const": "%productname%"
|
"const": "%productname%"
|
||||||
|
|||||||
Reference in New Issue
Block a user