From c1268abc1dedc964b37b4fa5f7eb5c7fca1bbf4a Mon Sep 17 00:00:00 2001 From: KKlochko Date: Mon, 27 Jan 2025 12:27:43 +0200 Subject: [PATCH] Add tests for CLI errors. --- features/backup_plan_cli_delete.feature | 12 ++++++++++++ features/backup_plan_cli_show.feature | 13 +++++++++++++ 2 files changed, 25 insertions(+) diff --git a/features/backup_plan_cli_delete.feature b/features/backup_plan_cli_delete.feature index 0674383..2fc331a 100644 --- a/features/backup_plan_cli_delete.feature +++ b/features/backup_plan_cli_delete.feature @@ -15,4 +15,16 @@ Feature: Deleting a backup plan with the CLI | plans remove one -i 8aa59e7e-dc75-459b-beb5-b710b39be583 | 8aa59e7e-dc75-459b-beb5-b710b39be583 | success | delete an existing plan | | plans remove one -i 8aa59e7e-dc75-459b-aeb5-b710b39be583 | 8aa59e7e-dc75-459b-beb5-b710b39be512 | error | delete a non-existing plan | + @fixture.injector + @fixture.in_memory_database + @fixture.cli + Scenario Outline: Delete non-existing backup plan with the CLI + Given the CLI arguments are "" + When I run the CLI + Then the CLI executed with "" + And the CLI contains the error: "" + + Examples: + | 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 | diff --git a/features/backup_plan_cli_show.feature b/features/backup_plan_cli_show.feature index a5d0d5f..1cce6a3 100644 --- a/features/backup_plan_cli_show.feature +++ b/features/backup_plan_cli_show.feature @@ -15,6 +15,19 @@ Feature: Show a backup plan with the CLI | plans show one -i 8aa59e7e-dc75-459b-beb5-b710b39be583 | 8aa59e7e-dc75-459b-beb5-b710b39be583 | success | show an existing plan | | plans show one -i 8aa59e7e-dc75-459b-aeb5-b710b39be583 | 8aa59e7e-dc75-459b-beb5-b710b39be512 | error | show a non-existing plan | + @fixture.injector + @fixture.in_memory_database + @fixture.cli + Scenario Outline: Show non-existing backup plans with the CLI + Given the CLI arguments are "" + When I run the CLI + Then the CLI executed with "" + And the CLI contains the error: "" + + Examples: + | arguments | result | result_error | description | + | plans show one -i 8aa59e7e-dc75-459b-aeb5-b710b39be583 | error | [ERROR] The backup plan was not found. | show a non-existing plan | + @fixture.injector @fixture.in_memory_database @fixture.cli