Skip to content
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

Merged
merged 2 commits into from Dec 22, 2013
Merged

Conversation

schneems
Copy link
Member

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: fbb79b5

This 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 or postgresql

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.

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.
@kuldeepaggarwal
Copy link
Contributor

I have already sent a PR #13439 for this.

@schneems
Copy link
Member Author

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

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 =(

@schneems
Copy link
Member Author

@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 s/sqlite3/postgresql/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants