mirror of
https://github.com/containers/skopeo.git
synced 2025-04-28 03:10:18 +00:00
We are maintaining code to set up and run registries, including the fairly complex setup for Atomic Registry, in the integration tests. This is all useful for experimentation in shell, and the easiest way to do that is to add a “test” which, after all the set up is done, simply starts a shell. This is gated by a build tag, so it does not affect normal test runs. A possible alternative would be to convert all of the setup code not to depend on check.C and testing.T, but that would be fairly cumbersome due to how prevalent c.Logf and c.Assert are throughout the setup code. Especially the natural replacement of c.Assert with a panic() would be pretty ugly, and adding real error handling to all of that would make the code noticeably longer. The build tag and copy&pasting a command works just as well, at least for now. (It is not conveniently possible to create a new “main program” which manually creates a check.C and testing.T just for the purpose of running the setup code either; check.C can be created given a testing.T, but testing.T is only created by testing.MainStart, which does not allow us to submit a non-test method; and testing.MainStart is excluded from the Go compatibility promise.) |
||
---|---|---|
.. | ||
fixtures | ||
check_test.go | ||
copy_test.go | ||
fixtures_info_test.go | ||
openshift_shell_test.go | ||
openshift.go | ||
registry.go | ||
signing_test.go | ||
utils.go |