From 9697e49900efdbccde4fd4cbf47f9118bb05b973 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matou=C5=A1=20Bor=C3=A1k?= Date: Sat, 8 Jun 2024 12:04:26 +0200 Subject: [PATCH] Fix dump format --- lib/dump_cleaner/processor.rb | 2 +- spec/lib/dump_cleaner/processor_spec.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/dump_cleaner/processor.rb b/lib/dump_cleaner/processor.rb index a59b641..0cc11cb 100644 --- a/lib/dump_cleaner/processor.rb +++ b/lib/dump_cleaner/processor.rb @@ -12,7 +12,7 @@ def run start_time = Time.now cleaner_class = case config.dump_format - when "mysql_shell_zst" + when "mysql_shell" Cleaners::MysqlShellDumpCleaner else raise Config::ConfigurationError, "Unsupported dump format #{config.dump_format}" diff --git a/spec/lib/dump_cleaner/processor_spec.rb b/spec/lib/dump_cleaner/processor_spec.rb index f4d5158..9ee5b93 100644 --- a/spec/lib/dump_cleaner/processor_spec.rb +++ b/spec/lib/dump_cleaner/processor_spec.rb @@ -15,7 +15,7 @@ def with_config_file(content) describe "#run" do it "calls the proper cleaner for the configured dump type" do - with_config_file("dump:\n format: mysql_shell_zst") do |config_file| + with_config_file("dump:\n format: mysql_shell") do |config_file| options = DumpCleaner::Options.new(["-f", "source", "-t", "dest", "-c", config_file]) allow(DumpCleaner::Cleaners::MysqlShellDumpCleaner).to receive(:new).and_call_original @@ -26,7 +26,7 @@ def with_config_file(content) end it "calls the cleaner's hooks" do - with_config_file("dump:\n format: mysql_shell_zst") do |config_file| + with_config_file("dump:\n format: mysql_shell") do |config_file| double = instance_double("DumpCleaner::Cleaners::MysqlShellDumpCleaner") allow(DumpCleaner::Cleaners::MysqlShellDumpCleaner).to receive(:new).and_return(double)