mirror of
https://github.com/containers/skopeo.git
synced 2025-09-05 00:31:45 +00:00
Add various missing error handling
... as found by (golangci-lint run). Note: this does not add (golangci-lint run) to the Makefile to ensure the coding standard. (BTW golangci-lint currently fails on structcheck, which doesn't handle embedded structs, and that's a years-long known unfixed limitation.) Signed-off-by: Miloslav Trmač <mitr@redhat.com>
This commit is contained in:
@@ -126,7 +126,10 @@ func (t *testRegistryV2) Ping() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (t *testRegistryV2) Close() {
|
||||
t.cmd.Process.Kill()
|
||||
os.RemoveAll(t.dir)
|
||||
func (t *testRegistryV2) tearDown(c *check.C) {
|
||||
// It’s undocumented what Kill() returns if the process has terminated,
|
||||
// so we couldn’t check just for that. This is running in a container anyway…
|
||||
_ = t.cmd.Process.Kill()
|
||||
err := os.RemoveAll(t.dir)
|
||||
c.Assert(err, check.IsNil)
|
||||
}
|
||||
|
Reference in New Issue
Block a user