From ba3aa09a29749c5b5153f91afe4327a1ef24c095 Mon Sep 17 00:00:00 2001 From: Mane Darbinyan Date: Thu, 9 Jan 2025 17:35:04 +0400 Subject: [PATCH] wip --- .github/workflows/main.yml | 2 +- test/rake_task_multi_tenant_test.rb | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 99a0474..0c71645 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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 diff --git a/test/rake_task_multi_tenant_test.rb b/test/rake_task_multi_tenant_test.rb index 27dce89..5b40fe7 100644 --- a/test/rake_task_multi_tenant_test.rb +++ b/test/rake_task_multi_tenant_test.rb @@ -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