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

Update .travis.yml #412

Merged
merged 7 commits into from
Oct 5, 2017
Merged

Update .travis.yml #412

merged 7 commits into from
Oct 5, 2017

Conversation

hmadison
Copy link
Member

@hmadison hmadison commented Oct 4, 2017

Sets up services needed for test.

@talklittle
Copy link
Contributor

Awesome! Maybe add the badge to the README while you're at it?

[![Build Status](https://travis-ci.org/lobsters/lobsters.svg?branch=master)](https://travis-ci.org/lobsters/lobsters)

@@ -6,7 +6,7 @@
expect { User.make!(:username => "") }.to raise_error
expect { User.make!(:username => "*") }.to raise_error

User.make!(:username => "test")
User.make!(:username => "test") unless User.find_by(username: 'test')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this needed? Is this papering over a test failing to clean the database?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uh... that sure looks like either test data failed to get cleaned or some general pre-test hook is creating duplicate data. There's something wrong here, this unless shouldn't exist. I'm sorry I didn't think of this before hitting merge.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ill dig at this more locally and try to see whats causing the issue.

@pushcx
Copy link
Member

pushcx commented Oct 5, 2017

Thanks, this is great to have on PRs.

@pushcx pushcx closed this Oct 5, 2017
@pushcx
Copy link
Member

pushcx commented Oct 5, 2017

Reopening so I can't forget about the unless again. @hmadison, please reuse this PR if you can land a fix on your travis--conf branch. Hopefully GitHub does the right thing... it looks like reopening deleted the merge commit, which is an OK approach.

@pushcx pushcx reopened this Oct 5, 2017
.travis.yml Outdated
services:
- mysql
env:
- DATABASE_URL=mysql2://root:@localhost/lobsters_test
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: indentation :)

@hmadison
Copy link
Member Author

hmadison commented Oct 5, 2017

@pushcx The issue was the seeds.rb file had a definition for the test user which was getting loaded in before the test run.

@pushcx
Copy link
Member

pushcx commented Oct 5, 2017

Great, thank you for running that down!

@pushcx pushcx merged commit a3d3e7a into lobsters:master Oct 5, 2017
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.

3 participants