New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix DB Console tests #13443
Fix DB Console tests #13443
Conversation
The build is broken: https://travis-ci.org/rails/rails/builds/15824530 This commit fixes it. The problem: Sqlite expects the `database` part to be an absolute path. That prompted this change to be committed to master: rails@fbb79b5 This change provides correct behavior. Unfortunately tests were introduced in rails@971d510 that were relying on the incorrect behavior. We can avoid the fix by changing to another database url such as `mysql` or `postgresql` In addition to fixing the failure, the assertions are changed so that the "expected" value comes before "actual" value.
I have already sent a PR #13439 for this. |
All tests are green, no code was harmed in the making of this PR (only modified tests) |
} | ||
} | ||
app_db_config(sample_config) | ||
assert_equal Rails::DBConsole.new.config["host"], "dburl" | ||
assert_equal host, Rails::DBConsole.new.config["host"] | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having to change all this seems unexpected =(
@carlosantoniodasilva wanted to switch the order to have valid expected versus actual: 971d510 It was also unclear that only the host value was being compared and it was expected. Since I was already modifying the line I decided to update the rest of it. The minimum required change would have been |
The build is broken: https://travis-ci.org/rails/rails/builds/15824530
This commit fixes that.
The problem: Sqlite expects the
database
part to be an absolute path. That prompted this change to be committed to master: fbb79b5This change provides correct behavior. Unfortunately tests were introduced in 971d510 that were relying on the incorrect behavior. We can avoid the fix by changing to another database url such as
mysql
orpostgresql
In addition to fixing the failure, the assertions are changed so that the "expected" value comes before "actual" value.
More tests fixed by specifying absolute paths rather then relative.