From f9a2a62c853af6b50f9235900b4e8b8a7611e13a Mon Sep 17 00:00:00 2001 From: Parajuli Kiran Date: Thu, 21 Oct 2021 12:33:54 +0545 Subject: [PATCH] Added enc type setting step before disabling --- tests/acceptance/features/bootstrap/OccContext.php | 3 ++- tests/acceptance/features/cliEncryption/encryption.feature | 7 +++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/acceptance/features/bootstrap/OccContext.php b/tests/acceptance/features/bootstrap/OccContext.php index 159045679cc4..44f95022fab2 100644 --- a/tests/acceptance/features/bootstrap/OccContext.php +++ b/tests/acceptance/features/bootstrap/OccContext.php @@ -763,7 +763,8 @@ public function theAdministratorHasDecryptedEverything():void { */ public function theAdministratorRunsEncryptionDecryptAllUsingTheOccCommand():void { \system("./occ encryption:decrypt-all -c yes", $status); - // $this->featureContext->setResultOfOccCommand(["code" => $status, "stdOut" => null, "stdErr" => null]); + + $this->featureContext->setResultOfOccCommand(["code" => $status, "stdOut" => null, "stdErr" => null]); if ($status !== 0) { // if the above command fails make sure to turn off maintenance mode \system("./occ maintenance:mode --off"); diff --git a/tests/acceptance/features/cliEncryption/encryption.feature b/tests/acceptance/features/cliEncryption/encryption.feature index b9f8f371133d..42782f1bf8e6 100644 --- a/tests/acceptance/features/cliEncryption/encryption.feature +++ b/tests/acceptance/features/cliEncryption/encryption.feature @@ -47,8 +47,11 @@ Feature: encryption command And the command output should contain the text "The system still have encrypted files. Please decrypt them all before disabling encryption." - Scenario: it should be possible to disable encryption after decrypting all encrypted files - Given the administrator has decrypted everything + Scenario: it should be possible to disable encryption after decrypting all of the encrypted files + Given the administrator has invoked occ command "encryption:enable" + And the administrator has selected master key encryption type using the occ command + And the administrator has uploaded file with content "uploaded content" to "/lorem.txt" + And the administrator has decrypted everything And the administrator invokes occ command "encryption:disable" Then the command should have been successful And the command output should contain the text "Cleaned up config"