Update the remove all backup plans command.

Refactor the commands names.
Add the service to remove all plans.
Add tests for remove all command.
This commit is contained in:
2025-01-28 10:40:23 +02:00
parent 76e555aefb
commit 2874dc76ad
11 changed files with 75 additions and 25 deletions
+26
View File
@@ -28,3 +28,29 @@ Feature: Deleting a backup plan with the CLI
| arguments | result | result_error | description |
| plans remove one -i 8aa59e7e-dc75-459b-aeb5-b710b39be583 | error | [ERROR] Failed to delete the backup plan, because it doesn't exist. | delete a non-existing plan |
@fixture.injector
@fixture.in_memory_database
@fixture.cli
Scenario Outline: Delete no backup plans with the CLI
Given the CLI arguments are "<arguments>"
When I run the CLI
Then the CLI executed with "<result>"
And the CLI output contains "<result_message>"
Examples:
| arguments | result | result_message | description |
| plans remove all | success | Nothing to remove. No backup plans. | delete no plans |
@fixture.injector
@fixture.in_memory_database
@fixture.seeds
@fixture.cli
Scenario Outline: Delete all backup plans with the CLI
Given the CLI arguments are "<arguments>"
When I run the CLI
Then the CLI executed with "<result>"
And the CLI output contains "<result_message>"
Examples:
| arguments | result | result_message | description |
| plans remove all | success | All backup plans removed. | delete all backup plans |