diff --git a/lib/manageiq/appliance_console/database_admin.rb b/lib/manageiq/appliance_console/database_admin.rb index 106eda6b..564968e8 100644 --- a/lib/manageiq/appliance_console/database_admin.rb +++ b/lib/manageiq/appliance_console/database_admin.rb @@ -15,14 +15,6 @@ class DatabaseAdmin < HighLine Example: 'mydomain.com/user' PROMPT - DB_DUMP_WARNING = <<-WARN.strip_heredoc - WARNING: This is not the recommended and supported way of running a - database backup, and is strictly meant for exporting a database for - support/debugging purposes! - - - WARN - attr_reader :action, :backup_type, :database_opts, :delete_agree, :filename def initialize(action = :restore, input = $stdin, output = $stdout) @@ -43,7 +35,6 @@ def ask_questions press_any_key raise MiqSignalError end - say(DB_DUMP_WARNING) if action == :dump ask_file_location ask_for_tables_to_exclude_in_dump end diff --git a/spec/database_admin_spec.rb b/spec/database_admin_spec.rb index 73db653a..1dd29d77 100644 --- a/spec/database_admin_spec.rb +++ b/spec/database_admin_spec.rb @@ -461,40 +461,13 @@ def confirm_and_execute subject { described_class.new(:dump, input, output) } describe "#ask_questions" do - let(:pg_dump_warning) do - <<-WARN.strip_heredoc - WARNING: This is not the recommended and supported way of running a - database backup, and is strictly meant for exporting a database for - support/debugging purposes! - - - WARN - end - - it "warns about using pg_dump and asks for file location" do + it "asks for file location and tables to exclude" do expect(subject).to receive(:say).with("Create Database Dump\n\n") - expect(subject).to receive(:say).with(pg_dump_warning) expect(subject).to receive(:ask_file_location) expect(subject).to receive(:ask_for_tables_to_exclude_in_dump) subject.ask_questions end - - it "has proper formatting for the pg_dump warning" do - allow(subject).to receive(:ask_file_location) - allow(subject).to receive(:ask_for_tables_to_exclude_in_dump) - subject.ask_questions - - expect_output <<-PROMPT.strip_heredoc - Create Database Dump - - WARNING: This is not the recommended and supported way of running a - database backup, and is strictly meant for exporting a database for - support/debugging purposes! - - - PROMPT - end end describe "#activate" do