Skip to content

Commit

Permalink
Added enc type setting step before disabling
Browse files Browse the repository at this point in the history
  • Loading branch information
kiranparajuli589 committed Oct 21, 2021
1 parent f38c9d0 commit f9a2a62
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion tests/acceptance/features/bootstrap/OccContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
7 changes: 5 additions & 2 deletions tests/acceptance/features/cliEncryption/encryption.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit f9a2a62

Please sign in to comment.