gps tests: dry and cleanup; remove unused code#620
gps tests: dry and cleanup; remove unused code#620sdboyer merged 2 commits intogolang:masterfrom jmank88:test_cleanup
Conversation
| do(typ, fixtures, t) | ||
| }) | ||
| } | ||
| t.Run("second", runSet) |
There was a problem hiding this comment.
do calls t.Run with t.Parallel, but since each do was called from a separate t.Run, those calls would block until the single test completed.
| // just in case something needs punishing, kubernetes is happy to oblige | ||
| kub = atom{ | ||
| id: pi("github.com/kubernetes/kubernetes"), | ||
| v: NewVersion("1.0.0").Is(Revision("528f879e7d3790ea4287687ef0ab3f2a01cc2718")), |
There was a problem hiding this comment.
Let's leave this in; as the comment indicates, it's there mostly to do the work of picking out a known kubernetes rev to work from. Even though it's not currently used anywhere, simply making that choice has some potential value down the road.
There was a problem hiding this comment.
Is dead code the best way to document that choice? What about commenting out the block?
Is there any other rationale for this particular revision, other than that its 'known to work'?
// Just in case something needs punishing, kubernetes offers a complex,
// real-world set of dependencies, and this revision is known to work.
/*
_ = atom{
id: pi("github.com/kubernetes/kubernetes"),
v: NewVersion("1.0.0").Is(Revision("528f879e7d3790ea4287687ef0ab3f2a01cc2718")),
}
*/There was a problem hiding this comment.
Commenting it out is also OK, I suppose.
The biggest reason to pick a revision is just the chaos that results from suddenly this, and having people pick their own random revisions. Or, worse, a branch tip.
Basically, this is me just trying to proactively head off a coordination problem, should it arise.
| do(typ, fixtures, t) | ||
| }) | ||
| } | ||
| t.Run("second", runSet) |
|
thanks! 🎉 |
This is a small change to gps tests which removes some unused code, and cleans-up some repeated sub-test code which was unintentionally serial.