Skip to content

Flatware not connecting to the right database without flatware_helper.rb #108

@dgmora

Description

@dgmora

I got some errors when using flatware_helper.rb, so I decided to not use it. I noticed then that most tests work, although not all of them. After inspecting and setting a breakpoint in the test, I saw that ActiveRecord::Base.connection_db_config.database is my_app_test and not my_app_test1. All workers run against the same test DB.

The environment variable is set correctly in the database.yml and in tests I see that variable is set correctly.

I have made sure that the are no connections in the DB in the spec helper, removed maintain_test_schema and other stuff, even shutting down the DB to see if there was some connection before any test was run. But it still connects to the usual test DB. Not sure what else do to diagnose this, my next step was going to try to fix the errors I had with flatware_helper.rb, but I was wondering if I missed something obvious, since it looked like it should have worked without it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions