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

Refactor our test suite to not be reliant on specific values for ID #48

Closed
sgrif opened this Issue Dec 4, 2015 · 2 comments

Comments

Projects
None yet
1 participant
@sgrif
Member

sgrif commented Dec 4, 2015

As we start to get into things like schema inference and migrations, which mean we want a persistent schema for our tests, we need to stop assuming the ids 1 and 2. Even though our tests will still run in isolated transactions, inserting rows in a transaction will bump the PK counter, regardless of whether or not the transaction is committed. This is fine, but we need to make sure our suite still passes.

@sgrif sgrif changed the title from Refactor our test suite to not be reliant on IDs to Refactor our test suite to not be reliant on specific values for ID Dec 4, 2015

mcasper added a commit to mcasper/diesel that referenced this issue Dec 5, 2015

Refactor test suite to not use hardcoded IDs
Instead of relying on the 'Sean' and 'Tess' users to be ids 1 and 2
respectively, find the users by their names.

Resolves diesel-rs#48

@sgrif sgrif closed this in #52 Dec 5, 2015

@sgrif

This comment has been minimized.

Member

sgrif commented Dec 5, 2015

This issue still exists for doctests.

@sgrif sgrif reopened this Dec 5, 2015

@sgrif

This comment has been minimized.

Member

sgrif commented Dec 5, 2015

There's still a lot of cases in our integration suite that #52 missed, too.

@sgrif sgrif closed this in c49328b Dec 14, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment