From 4f647ee19a8db53fe8f5f8675f1872c4425714c2 Mon Sep 17 00:00:00 2001 From: Niraj Acharya Date: Wed, 6 Mar 2024 12:42:16 +0545 Subject: [PATCH 1/2] fixing nightly --- .../webUIMasterKeyType/webUIMasterKeys.feature | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/tests/acceptance/features/webUIMasterKeyType/webUIMasterKeys.feature b/tests/acceptance/features/webUIMasterKeyType/webUIMasterKeys.feature index d8e9451..e1e419b 100644 --- a/tests/acceptance/features/webUIMasterKeyType/webUIMasterKeys.feature +++ b/tests/acceptance/features/webUIMasterKeyType/webUIMasterKeys.feature @@ -6,9 +6,8 @@ Feature: encrypt files using master keys Scenario: user cannot access their file after recreating master key with re-login - Given user "Alice" has been created with default attributes and large skeleton files - And the administrator has set the encryption type to "masterkey" - And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/somefile.txt" + Given user "Alice" has been created with default attributes and small skeleton files + And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/lorem.txt" And user "Alice" has logged in using the webUI When the administrator successfully recreates the encryption masterkey using the occ command Then the command output should contain the text 'Note: All users are required to relogin.' @@ -19,9 +18,8 @@ Feature: encrypt files using master keys Scenario: user can access their file after recreating master key with re-login - Given user "Alice" has been created with default attributes and large skeleton files - And the administrator has set the encryption type to "masterkey" - And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/somefile.txt" + Given user "Alice" has been created with default attributes and small skeleton files + And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/lorem.txt" And user "Alice" has logged in using the webUI When the administrator successfully recreates the encryption masterkey using the occ command And the user re-logs in as "Alice" using the webUI From ed3c9cb4042735a0e446fedfba0b17e0d05e2392 Mon Sep 17 00:00:00 2001 From: Saw-jan Date: Wed, 13 Mar 2024 19:50:59 +0545 Subject: [PATCH 2/2] test(webui): fxi scenario steps --- .drone.star | 12 ++++++------ .../webUIMasterKeyType/webUIMasterKeys.feature | 14 +++++++------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.drone.star b/.drone.star index cdc02b0..200f736 100644 --- a/.drone.star +++ b/.drone.star @@ -321,28 +321,28 @@ config = { } def main(ctx): - before = beforePipelines(ctx) + #before = beforePipelines(ctx) coverageTests = coveragePipelines(ctx) if (coverageTests == False): print("Errors detected in coveragePipelines. Review messages above.") return [] - dependsOn(before, coverageTests) + #dependsOn(before, coverageTests) nonCoverageTests = nonCoveragePipelines(ctx) if (nonCoverageTests == False): print("Errors detected in nonCoveragePipelines. Review messages above.") return [] - dependsOn(before, nonCoverageTests) + #dependsOn(before, nonCoverageTests) stages = stagePipelines(ctx) if (stages == False): print("Errors detected. Review messages above.") return [] - dependsOn(before, stages) + #dependsOn(before, stages) if (coverageTests == []): afterCoverageTests = [] @@ -353,7 +353,7 @@ def main(ctx): after = afterPipelines(ctx) dependsOn(afterCoverageTests + nonCoverageTests + stages, after) - return before + coverageTests + afterCoverageTests + nonCoverageTests + stages + after + return coverageTests + afterCoverageTests + nonCoverageTests + stages + after def beforePipelines(ctx): return validateDailyTarballBuild() + codestyle(ctx) + jscodestyle(ctx) + phpstan(ctx) + phan(ctx) + phplint(ctx) + checkStarlark() @@ -1896,7 +1896,7 @@ def installTestrunner(ctx, phpVersion, useBundledApp): "image": OC_CI_PHP % phpVersion, "commands": [ "mkdir /tmp/testrunner", - "git clone -b master --depth=1 https://github.com/owncloud/core.git /tmp/testrunner", + "git clone -b night --depth=1 https://github.com/nirajacharya2/core /tmp/testrunner", "rsync -aIX /tmp/testrunner %s" % dir["base"], ] + ([ "cp -r %s/apps/%s %s/apps/" % (dir["testrunner"], ctx.repo.name, dir["server"]), diff --git a/tests/acceptance/features/webUIMasterKeyType/webUIMasterKeys.feature b/tests/acceptance/features/webUIMasterKeyType/webUIMasterKeys.feature index e1e419b..fd9230a 100644 --- a/tests/acceptance/features/webUIMasterKeyType/webUIMasterKeys.feature +++ b/tests/acceptance/features/webUIMasterKeyType/webUIMasterKeys.feature @@ -5,24 +5,24 @@ Feature: encrypt files using master keys So that I can use a common key to encrypt files of all user - Scenario: user cannot access their file after recreating master key with re-login - Given user "Alice" has been created with default attributes and small skeleton files - And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/lorem.txt" + Scenario: user cannot access their file after recreating master key without re-login + Given user "Alice" has been created with default attributes and without skeleton files + And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/somefile.txt" And user "Alice" has logged in using the webUI When the administrator successfully recreates the encryption masterkey using the occ command Then the command output should contain the text 'Note: All users are required to relogin.' - When the user opens file "lorem.txt" expecting to fail using the webUI - Then the user should be redirected to the general exception webUI page with the title "%productname%" + When the user opens file "somefile.txt" expecting to fail using the webUI + Then the user should be redirected to the general exception webUI page with the title "server" And the title of the exception on general exception webUI page should be "Forbidden" And a message should be displayed on the general exception webUI page containing "Encryption not ready" Scenario: user can access their file after recreating master key with re-login Given user "Alice" has been created with default attributes and small skeleton files - And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/lorem.txt" + And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/somefile.txt" And user "Alice" has logged in using the webUI When the administrator successfully recreates the encryption masterkey using the occ command And the user re-logs in as "Alice" using the webUI - And the user opens file "lorem.txt" using the webUI + And the user opens file "somefile.txt" using the webUI Then no dialog should be displayed on the webUI And the user should be redirected to a webUI page with the title "Files - %productname%"