diff --git a/definitions/procedures/backup/online/safety_confirmation.rb b/definitions/procedures/backup/online/safety_confirmation.rb deleted file mode 100644 index c8c35c8c4..000000000 --- a/definitions/procedures/backup/online/safety_confirmation.rb +++ /dev/null @@ -1,27 +0,0 @@ -module Procedures::Backup - module Online - class SafetyConfirmation < ForemanMaintain::Procedure - metadata do - description 'Data consistency warning' - tags :backup - end - - def run - answer = ask_decision(warning_message, actions_msg: 'y(yes), q(quit)') - abort! unless answer == :yes - end - - def warning_message - "*** WARNING: The online backup is intended for making a copy of the data\n" \ - '*** for debugging purposes only.' \ - " The backup routine can not ensure 100% consistency while the\n" \ - "*** backup is taking place as there is a chance there may be data mismatch between\n" \ - '*** the databases while the services are live.' \ - " If you wish to utilize the online backup\n" \ - '*** for production use you need to ensure that there are' \ - " no modifications occurring during\n" \ - "*** your backup run.\n\nDo you want to proceed?" - end - end - end -end diff --git a/definitions/scenarios/backup.rb b/definitions/scenarios/backup.rb index bd5da2094..a9093ae77 100644 --- a/definitions/scenarios/backup.rb +++ b/definitions/scenarios/backup.rb @@ -22,7 +22,6 @@ def compose :online_backup => strategy == :online) add_step(Checks::ForemanTasks::NotRunning.new(:wait_for_tasks => wait_for_tasks?)) add_step(Checks::Pulpcore::NoRunningTasks.new(:wait_for_tasks => wait_for_tasks?)) - safety_confirmation add_step_with_context(Procedures::Backup::AccessibilityConfirmation) if strategy == :offline add_step_with_context(Procedures::Backup::PrepareDirectory) add_step_with_context(Procedures::Backup::Metadata, :online_backup => strategy == :online) @@ -65,12 +64,6 @@ def set_context_mapping private - def safety_confirmation - if strategy == :online - add_step_with_context(Procedures::Backup::Online::SafetyConfirmation) - end - end - def check_valid_strategy unless [:online, :offline].include? strategy raise ArgumentError, "Unsupported strategy '#{strategy}'" diff --git a/test/definitions/scenarios/backup_test.rb b/test/definitions/scenarios/backup_test.rb index a5fd0327d..47c66b4e4 100644 --- a/test/definitions/scenarios/backup_test.rb +++ b/test/definitions/scenarios/backup_test.rb @@ -91,7 +91,6 @@ module Scenarios checks.each do |check| assert_scenario_has_step(scenario, check) end - assert_scenario_has_step(scenario, Procedures::Backup::Online::SafetyConfirmation) refute_scenario_has_step(scenario, Procedures::Backup::AccessibilityConfirmation) assert_scenario_has_step(scenario, Procedures::Backup::PrepareDirectory) assert_scenario_has_step(scenario, Procedures::Backup::Metadata)