Compare commits

...

3 Commits

Author SHA1 Message Date
Saw-jan
f159e80fc8 ci: check discovery urls
Signed-off-by: Saw-jan <saw.jan.grg3e@gmail.com>
2026-01-27 09:43:24 +05:45
Saw-jan
ad884bc45a check tests
Signed-off-by: Saw-jan <saw.jan.grg3e@gmail.com>
2026-01-27 09:43:24 +05:45
Saw-jan
a3f9ebdce8 test: add date-time in the request-response log
Signed-off-by: Saw-jan <saw.jan.grg3e@gmail.com>
2026-01-27 09:43:24 +05:45
2 changed files with 69 additions and 38 deletions

View File

@@ -91,10 +91,10 @@ event = {
# configuration # configuration
config = { config = {
"cs3ApiTests": { "cs3ApiTests": {
"skip": False, "skip": True,
}, },
"wopiValidatorTests": { "wopiValidatorTests": {
"skip": False, "skip": True,
}, },
"k6LoadTests": { "k6LoadTests": {
"skip": True, "skip": True,
@@ -111,13 +111,13 @@ config = {
"apiLocks", "apiLocks",
"apiActivities", "apiActivities",
], ],
"skip": False, "skip": True,
}, },
"settings": { "settings": {
"suites": [ "suites": [
"apiSettings", "apiSettings",
], ],
"skip": False, "skip": True,
"withRemotePhp": [True], "withRemotePhp": [True],
"emailNeeded": True, "emailNeeded": True,
"extraTestEnvironment": { "extraTestEnvironment": {
@@ -140,45 +140,45 @@ config = {
# skip tests for collaborativePosix. see https://github.com/opencloud-eu/opencloud/issues/2036 # skip tests for collaborativePosix. see https://github.com/opencloud-eu/opencloud/issues/2036
#"collaborativePosix", #"collaborativePosix",
], ],
"skip": False, "skip": True,
"withRemotePhp": [True], "withRemotePhp": [True],
}, },
"graphUserGroup": { "graphUserGroup": {
"suites": [ "suites": [
"apiGraphUserGroup", "apiGraphUserGroup",
], ],
"skip": False, "skip": True,
"withRemotePhp": [True], "withRemotePhp": [True],
}, },
"spaces": { "spaces": {
"suites": [ "suites": [
"apiSpaces", "apiSpaces",
], ],
"skip": False, "skip": True,
}, },
"spacesShares": { "spacesShares": {
"suites": [ "suites": [
"apiSpacesShares", "apiSpacesShares",
], ],
"skip": False, "skip": True,
}, },
"spacesDavOperation": { "spacesDavOperation": {
"suites": [ "suites": [
"apiSpacesDavOperation", "apiSpacesDavOperation",
], ],
"skip": False, "skip": True,
}, },
"search1": { "search1": {
"suites": [ "suites": [
"apiSearch1", "apiSearch1",
], ],
"skip": False, "skip": True,
}, },
"search2": { "search2": {
"suites": [ "suites": [
"apiSearch2", "apiSearch2",
], ],
"skip": False, "skip": True,
}, },
"sharingNg": { "sharingNg": {
"suites": [ "suites": [
@@ -186,26 +186,26 @@ config = {
"apiSharingNg1", "apiSharingNg1",
"apiSharingNg2", "apiSharingNg2",
], ],
"skip": False, "skip": True,
}, },
"sharingNgShareInvitation": { "sharingNgShareInvitation": {
"suites": [ "suites": [
"apiSharingNgShareInvitation", "apiSharingNgShareInvitation",
], ],
"skip": False, "skip": True,
}, },
"sharingNgLinkShare": { "sharingNgLinkShare": {
"suites": [ "suites": [
"apiSharingNgLinkSharePermission", "apiSharingNgLinkSharePermission",
"apiSharingNgLinkShareRoot", "apiSharingNgLinkShareRoot",
], ],
"skip": False, "skip": True,
}, },
"notification": { "notification": {
"suites": [ "suites": [
"apiNotification", "apiNotification",
], ],
"skip": False, "skip": True,
"withRemotePhp": [True], "withRemotePhp": [True],
"emailNeeded": True, "emailNeeded": True,
"extraTestEnvironment": { "extraTestEnvironment": {
@@ -225,7 +225,7 @@ config = {
"suites": [ "suites": [
"apiAntivirus", "apiAntivirus",
], ],
"skip": False, "skip": True,
"antivirusNeeded": True, "antivirusNeeded": True,
"extraServerEnvironment": { "extraServerEnvironment": {
"ANTIVIRUS_SCANNER_TYPE": "clamav", "ANTIVIRUS_SCANNER_TYPE": "clamav",
@@ -240,14 +240,14 @@ config = {
"suites": [ "suites": [
"apiSearchContent", "apiSearchContent",
], ],
"skip": False, "skip": True,
"tikaNeeded": True, "tikaNeeded": True,
}, },
"ocm": { "ocm": {
"suites": [ "suites": [
"apiOcm", "apiOcm",
], ],
"skip": False, "skip": True,
"withRemotePhp": [True], "withRemotePhp": [True],
"federationServer": True, "federationServer": True,
"emailNeeded": True, "emailNeeded": True,
@@ -279,18 +279,28 @@ config = {
"GATEWAY_GRPC_ADDR": "0.0.0.0:9142", "GATEWAY_GRPC_ADDR": "0.0.0.0:9142",
}, },
}, },
"wopi-2": {
"suites": [
"apiCollaboration",
],
"skip": False,
"collaborationServiceNeeded": True,
"extraServerEnvironment": {
"GATEWAY_GRPC_ADDR": "0.0.0.0:9142",
},
},
"authApp": { "authApp": {
"suites": [ "suites": [
"apiAuthApp", "apiAuthApp",
], ],
"skip": False, "skip": True,
"withRemotePhp": [True], "withRemotePhp": [True],
}, },
"cliCommands": { "cliCommands": {
"suites": [ "suites": [
"cliCommands", "cliCommands",
], ],
"skip": False, "skip": True,
"withRemotePhp": [True], "withRemotePhp": [True],
"antivirusNeeded": True, "antivirusNeeded": True,
"extraServerEnvironment": { "extraServerEnvironment": {
@@ -305,7 +315,7 @@ config = {
"suites": [ "suites": [
"apiTenancy", "apiTenancy",
], ],
"skip": False, "skip": True,
"withRemotePhp": [True], "withRemotePhp": [True],
"ldapNeeded": True, "ldapNeeded": True,
"extraTestEnvironment": { "extraTestEnvironment": {
@@ -338,13 +348,13 @@ config = {
}, },
"coreApiTests": { "coreApiTests": {
"numberOfParts": 7, "numberOfParts": 7,
"skip": False, "skip": True,
"skipExceptParts": [], "skipExceptParts": [],
"storages": ["posix"], "storages": ["posix"],
}, },
"e2eTests": { "e2eTests": {
"part": { "part": {
"skip": False, "skip": True,
"totalParts": 4, # divide and run all suites in parts (divide pipelines) "totalParts": 4, # divide and run all suites in parts (divide pipelines)
# suites to skip # suites to skip
"xsuites": [ "xsuites": [
@@ -361,14 +371,14 @@ config = {
], ],
}, },
"search": { "search": {
"skip": False, "skip": True,
"suites": ["search"], # suites to run "suites": ["search"], # suites to run
"tikaNeeded": True, "tikaNeeded": True,
}, },
}, },
"e2eMultiService": { "e2eMultiService": {
"testSuites": { "testSuites": {
"skip": False, "skip": True,
"suites": [ "suites": [
"smoke", "smoke",
"shares", "shares",
@@ -492,8 +502,8 @@ def main(ctx):
none none
""" """
if ctx.build.event == "cron" and ctx.build.sender == "translation-sync": # if ctx.build.event == "cron" and ctx.build.sender == "translation-sync":
return translation_sync(ctx) # return translation_sync(ctx)
is_release_pr = (ctx.build.event == "pull_request" and ctx.build.sender == "openclouders" and "🎉 release" in ctx.build.title.lower()) is_release_pr = (ctx.build.event == "pull_request" and ctx.build.sender == "openclouders" and "🎉 release" in ctx.build.title.lower())
if is_release_pr: if is_release_pr:
@@ -510,16 +520,7 @@ def main(ctx):
) )
test_pipelines = \ test_pipelines = \
codestyle(ctx) + \
checkGherkinLint(ctx) + \
checkTestSuitesInExpectedFailures(ctx) + \
pipelinesDependsOn(buildWebCache(ctx), savePipelineNumber(ctx)) + \
pipelinesDependsOn(cacheBrowsers(ctx), savePipelineNumber(ctx)) + \
getGoBinForTesting(ctx) + \
pipelinesDependsOn(buildOpencloudBinaryForTesting(ctx), savePipelineNumber(ctx)) + \ pipelinesDependsOn(buildOpencloudBinaryForTesting(ctx), savePipelineNumber(ctx)) + \
checkStarlark(ctx) + \
build_release_helpers + \
testOpencloudAndUploadResults(ctx) + \
testPipelines(ctx) testPipelines(ctx)
build_release_pipelines = \ build_release_pipelines = \
@@ -1264,6 +1265,7 @@ def localApiTestPipeline(ctx):
"steps": evaluateWorkflowStep() + restoreBuildArtifactCache(ctx, dirs["opencloudBinArtifact"], dirs["opencloudBinPath"]) + "steps": evaluateWorkflowStep() + restoreBuildArtifactCache(ctx, dirs["opencloudBinArtifact"], dirs["opencloudBinPath"]) +
(tikaService() if params["tikaNeeded"] else []) + (tikaService() if params["tikaNeeded"] else []) +
(waitForServices("online-offices", ["collabora:9980", "onlyoffice:443", "fakeoffice:8080"]) if params["collaborationServiceNeeded"] else []) + (waitForServices("online-offices", ["collabora:9980", "onlyoffice:443", "fakeoffice:8080"]) if params["collaborationServiceNeeded"] else []) +
(waitForWebOffices(["https://collabora:9980", "https://onlyoffice", "http://fakeoffice:8080"]) if params["collaborationServiceNeeded"] else []) +
(waitForClamavService() if params["antivirusNeeded"] else []) + (waitForClamavService() if params["antivirusNeeded"] else []) +
(waitForEmailService() if params["emailNeeded"] else []) + (waitForEmailService() if params["emailNeeded"] else []) +
(ldapService() if params["ldapNeeded"] else []) + (ldapService() if params["ldapNeeded"] else []) +
@@ -3471,3 +3473,23 @@ def onlyofficeService():
], ],
}, },
] ]
def waitForWebOffices(services = []):
commands = []
if not services:
return []
for service in services:
commands.append(
"timeout 300 bash -c " +
"'while [ `curl %s/hosting/discovery" % service +
" -w \"%{http_code}\" -o /dev/null -sk` != \"200\" ]; do " +
"echo \"Waiting...\" && sleep 2; done'",
)
return [
{
"name": "wait-for-weboffices",
"image": OC_CI_ALPINE,
"commands": commands,
},
]

View File

@@ -77,7 +77,7 @@ class HttpLogger {
} }
$logMessage = "\t\t_______________________________________________________________________\n\n"; $logMessage = "\t\t_______________________________________________________________________\n\n";
$logMessage .= "\t\t==> REQUEST\n"; $logMessage .= "\t\t==> REQUEST [" . self::getDateTime() . "]\n";
$logMessage .= "\t\t$method $path\n"; $logMessage .= "\t\t$method $path\n";
$logMessage .= $query ? "\t\tQUERY: $query\n" : ""; $logMessage .= $query ? "\t\tQUERY: $query\n" : "";
$logMessage .= "\t\t$headers"; $logMessage .= "\t\t$headers";
@@ -105,7 +105,7 @@ class HttpLogger {
$headers = $key . ": " . $value[0] . "\n"; $headers = $key . ": " . $value[0] . "\n";
} }
$logMessage = "\t\t<== RESPONSE\n"; $logMessage = "\t\t<== RESPONSE [" . self::getDateTime() . "]\n";
$logMessage .= "\t\t$statusCode $statusMessage\n"; $logMessage .= "\t\t$statusCode $statusMessage\n";
$logMessage .= "\t\t$headers"; $logMessage .= "\t\t$headers";
@@ -121,4 +121,13 @@ class HttpLogger {
$logMessage = \rtrim($logMessage) . "\n\n"; $logMessage = \rtrim($logMessage) . "\n\n";
self::writeLog(self::getScenarioLogPath(), $logMessage); self::writeLog(self::getScenarioLogPath(), $logMessage);
} }
/**
* Returns current date and time in format: 1999-01-31T23:01:59
*
* @return string
*/
public static function getDateTime(): string {
return date('Y-m-d\TG:i:s');
}
} }