Skip to content
This repository was archived by the owner on Sep 9, 2020. It is now read-only.

Use only fixture repositories in tests #255

Closed
sdboyer opened this issue Feb 21, 2017 · 11 comments
Closed

Use only fixture repositories in tests #255

sdboyer opened this issue Feb 21, 2017 · 11 comments

Comments

@sdboyer
Copy link
Member

sdboyer commented Feb 21, 2017

We currently have a number of tests that use real projects, like github.com/Sirupsen/logrus. When generating lock files resulting from solves involving these projects, there can be variability that results from these real repositories having new commits.

This variation doesn't add any value, and it makes our tests sloppier. We need to replace these instances of real projects with fixture repositories, and rely only on those fixture repositories in tests from here on out (unless there is a real reason for the system under test to do otherwise).

(Follow-up on #246)

sdboyer added a commit that referenced this issue Feb 21, 2017
The -update behavior renders golden files useless with that token, so we
need it replaced right away - #255.
@sdboyer
Copy link
Member Author

sdboyer commented Feb 22, 2017

@tro3 any chance i could get you to work on this one? :)

@tro3
Copy link
Contributor

tro3 commented Feb 22, 2017

I certainly can, but where to create the repos?

@tro3
Copy link
Contributor

tro3 commented Feb 22, 2017

I'm going to patch the sysCommit problem quickly first.

@sdboyer
Copy link
Member Author

sdboyer commented Feb 22, 2017

@tro3 if you want to, sure - I think it might be better just to make the fix here, though, and avoid the need for variation entirely.

I've created github.com/sdboyer/deptest and github.com/sdboyer/deptestdos. The latter imports the former. Both have one tag and one branch, each pointing at a different commit. That should provide enough basic variability, I think.

@sdboyer
Copy link
Member Author

sdboyer commented Feb 22, 2017

Note - eventually I'd like to stop using external fixtures altogether and create some kind of testing harness that lets us just store the source repos locally. Doing this will increase reliability and speed of tests.

That won't work until we have something like local mirror support in gps, though, which is not the highest priority.

@tro3
Copy link
Contributor

tro3 commented Feb 22, 2017

Okay, I have a sysCommit patch running already, though. I'll PR it for use until I get to the above (likely a couple of days). If you don't want the patch, reject and no worries.

@tro3
Copy link
Contributor

tro3 commented Feb 22, 2017

All right - I see your test repos and will start working the golden files. Don't have a ton of time the next few days, but will get a PR started the next few days for you to give early feedback on.

@tro3
Copy link
Contributor

tro3 commented Feb 22, 2017

@sdboyer, can you pls add an 0.8.0 tag to the deptest repo to check the init versioning generation?

@sdboyer
Copy link
Member Author

sdboyer commented Feb 22, 2017

@tro3 sure, added

@tro3
Copy link
Contributor

tro3 commented Feb 26, 2017

@sdboyer - sorry to bug, but can you please add a minor rev tag to one of the repos? (e.g. add 0.8.1 to a repo with 0.8.0). Needed for ensure test.

zbintliff added a commit to zbintliff/dep that referenced this issue Mar 3, 2017
The -update behavior renders golden files useless with that token, so we
need it replaced right away - golang#255.
@sdboyer
Copy link
Member Author

sdboyer commented Mar 10, 2017

#265 is done, closing

@sdboyer sdboyer closed this as completed Mar 10, 2017
ibrasho pushed a commit to ibrasho-forks/dep that referenced this issue May 10, 2017
The -update behavior renders golden files useless with that token, so we
need it replaced right away - golang#255.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants