mirror of
https://github.com/opencontainers/runc.git
synced 2025-10-26 00:50:52 +08:00
errcheck: libcontainer
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@@ -122,7 +122,10 @@ func TestFactoryNewTmpfs(t *testing.T) {
|
||||
if m.Source != "tmpfs" {
|
||||
t.Fatalf("Source of root: %s, expected %s", m.Source, "tmpfs")
|
||||
}
|
||||
unix.Unmount(root, unix.MNT_DETACH)
|
||||
err = unix.Unmount(root, unix.MNT_DETACH)
|
||||
if err != nil {
|
||||
t.Error("failed to unmount root:", err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestFactoryLoadNotExists(t *testing.T) {
|
||||
@@ -130,7 +133,7 @@ func TestFactoryLoadNotExists(t *testing.T) {
|
||||
if rerr != nil {
|
||||
t.Fatal(rerr)
|
||||
}
|
||||
defer os.RemoveAll(root)
|
||||
defer os.RemoveAll(root) //nolint: errcheck
|
||||
factory, err := New(root, Cgroupfs)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
@@ -153,7 +156,7 @@ func TestFactoryLoadContainer(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
defer os.RemoveAll(root)
|
||||
defer os.RemoveAll(root) //nolint: errcheck
|
||||
// setup default container config and state for mocking
|
||||
var (
|
||||
id = "1"
|
||||
@@ -219,7 +222,7 @@ func marshal(path string, v interface{}) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer f.Close()
|
||||
defer f.Close() //nolint: errcheck
|
||||
return utils.WriteJSON(f, v)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user