Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
m-darbinyan committed Jan 9, 2025
1 parent bb2c22b commit ba3aa09
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Run Tests with All Adapters
run: bundle exec rake test:all
run: bundle exec rake test:postgresql TEST=test/rake_task_multi_tenant_test.rb TESTOPTS="--name='/db:rollback_branches.*rolls back phantom migrations/'"

rubocop:
runs-on: ubuntu-latest
Expand Down
24 changes: 12 additions & 12 deletions test/rake_task_multi_tenant_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -95,18 +95,18 @@ def down
end

describe "db:rollback_branches:manual" do
it "rolls back phantom migrations both in public (or primary) schema and tenant1" do
utils.prepare_phantom_migrations
assert_equal %i[first second first second], TestingState.up
assert_empty TestingState.down
assert_empty ActualDbSchema.failed
utils.simulate_input("y") do
Rake::Task["db:rollback_branches:manual"].invoke
Rake::Task["db:rollback_branches:manual"].reenable
end
assert_equal %i[second first second first], TestingState.down
assert_empty utils.migrated_files
end
# it "rolls back phantom migrations both in public (or primary) schema and tenant1" do
# utils.prepare_phantom_migrations
# assert_equal %i[first second first second], TestingState.up
# assert_empty TestingState.down
# assert_empty ActualDbSchema.failed
# utils.simulate_input("y") do
# Rake::Task["db:rollback_branches:manual"].invoke
# Rake::Task["db:rollback_branches:manual"].reenable
# end
# assert_equal %i[second first second first], TestingState.down
# assert_empty utils.migrated_files
# end

it "skips migrations if the input is 'n'" do
utils.prepare_phantom_migrations
Expand Down

0 comments on commit ba3aa09

Please sign in to comment.