Skip to content

Commit

Permalink
Fix dump format
Browse files Browse the repository at this point in the history
  • Loading branch information
borama committed Jun 8, 2024
1 parent 70ff906 commit 9697e49
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/dump_cleaner/processor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down
4 changes: 2 additions & 2 deletions spec/lib/dump_cleaner/processor_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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)

Expand Down

0 comments on commit 9697e49

Please sign in to comment.