Sha256: 4da2d2e3b9339f006e56d9875072936bad791f056f88f58de622daa850949e6c
Contents?: true
Size: 1.86 KB
Versions: 21
Compression:
Stored size: 1.86 KB
Contents
Given \ /^backups for mysql are run$/ do capturing_stdio do EY::Backup.logger = EY::Backup::Logger.new EY::Backup.run([ "-c", backup_config_file ]) end end Given \ /^backups for postgresql are run$/ do capturing_stdio do EY::Backup.logger = EY::Backup::Logger.new EY::Backup.run(["-e", "postgresql", "-c", backup_config_file ]) end end When \ /^backup "([^\"]*)" for the "([^\"]*)" database is downloaded$/ do |index,db_key| db_name = created_mysql_dbs[db_key] capturing_stdio do EY::Backup.logger = EY::Backup::Logger.new EY::Backup.run(["-d", "#{index}:#{db_name}", "-c", backup_config_file ]) end end When \ /^backup "([^\"]*)" for the "([^\"]*)" database is restored$/ do |index,db_key| db_name = created_postgresql_dbs[db_key] capturing_stdio do EY::Backup.logger = EY::Backup::Logger.new EY::Backup.run(["-e", "postgresql", "-r", "#{index}:#{db_name}", "-c", backup_config_file ]) end end When \ /^listing the backups for the "([^\"]*)" postgresql database$/ do |db_key| db_name = created_postgresql_dbs[db_key] capturing_stdio do EY::Backup.logger = EY::Backup::Logger.new EY::Backup.run(["-e", "postgresql", "-l", db_name, "-c", backup_config_file ]) end end Then \ /^the output contains "([^\"]*)" substituting the "([^\"]*)" postgresql database$/ do |text,db_key| db_name = created_postgresql_dbs[db_key] last_stdout.should include(text % db_name) end Then \ /^there is a backup file for the "([^\"]*)" database$/ do |db_key| db_name = created_mysql_dbs[db_key] Dir.glob("#{EY::Backup.tmp_dir}/#{db_name}.*").should have(1).entries Dir.glob("#{EY::Backup.tmp_dir}/#{db_name}.*").each{ |f| FileUtils.rm(f) } end Then \ /^there is no backup file for the "([^\"]*)" database$/ do |db_key| db_name = created_mysql_dbs[db_key] Dir.glob("#{db_name}.*").should have(0).entries end
Version data entries
21 entries across 21 versions & 1 rubygems