Skip to content

Commit

Permalink
Used system command for decrypt all command
Browse files Browse the repository at this point in the history
  • Loading branch information
kiranparajuli589 committed Sep 14, 2021
1 parent f75bed3 commit fbc6369
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
12 changes: 12 additions & 0 deletions tests/acceptance/features/bootstrap/OccContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -711,6 +711,18 @@ public function theAdministratorRunsUpgradeRoutinesOnLocalServerUsingTheOccComma
}
}

/**
* @When the administrator runs encryption decrypt all using the occ command
*
* @return void
*/
public function theAdministratorRunsEncryptionDecryptAllUsingTheOccCommand() {
\system("./occ maintenance:mode --on");
\system("./occ encryption:decrypt-all -c yes", $status);
var_dump($status);
\system("./occ maintenance:mode --off");
}

/**
* @return bool
*/
Expand Down
5 changes: 2 additions & 3 deletions tests/acceptance/features/cliEncryption/encryption.feature
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,8 @@ 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: should be possible to disable encryption after decrypting all encrypted files
When the administrator invokes occ command "encryption:decrypt-all -c yes"
Then the command should have been successful
When the administrator invokes occ command "encryption:disable"
When the administrator runs encryption decrypt all using the occ command
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"
And the command output should contain the text "Encryption is already disabled"
Expand Down

0 comments on commit fbc6369

Please sign in to comment.