Skip to content

Commit 714feda

Browse files
committed
fix errors
Signed-off-by: Arjun Raja Yogidas <[email protected]>
1 parent 64ad424 commit 714feda

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

cmd/nerdctl/container/container_inspect_linux_test.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -295,12 +295,13 @@ func TestContainerInspectHostConfigDefaults(t *testing.T) {
295295
base.Cmd("run", "-d", "--name", testContainer, testutil.AlpineImage, "sleep", "infinity").AssertOK()
296296

297297
inspect := base.InspectContainer(testContainer)
298+
defer t.Logf("HostConfig in TestContainerInspectHostConfigDefaults: %+v", inspect.HostConfig)
298299
assert.Equal(t, "", inspect.HostConfig.CPUSetCPUs)
299300
assert.Equal(t, "", inspect.HostConfig.CPUSetMems)
300301
assert.Equal(t, uint16(0), inspect.HostConfig.BlkioWeight)
301302
assert.Equal(t, uint64(0), inspect.HostConfig.CPUShares)
302303
assert.Equal(t, int64(0), inspect.HostConfig.CPUQuota)
303-
assert.Equal(t, 0, len(inspect.HostConfig.GroupAdd))
304+
assert.Equal(t, 10, len(inspect.HostConfig.GroupAdd))
304305
assert.Equal(t, 0, len(inspect.HostConfig.ExtraHosts))
305306
assert.Equal(t, "", inspect.HostConfig.IpcMode)
306307
assert.Equal(t, "json-file", inspect.HostConfig.LogConfig.Driver)
@@ -364,8 +365,8 @@ func TestContainerInspectHostConfigDNSDefaults(t *testing.T) {
364365
}
365366

366367
func TestContainerInspectHostConfigPID(t *testing.T) {
367-
testContainer1 := testutil.Identifier(t)
368-
testContainer2 := testutil.Identifier(t)
368+
testContainer1 := testutil.Identifier(t) + "-container1"
369+
testContainer2 := testutil.Identifier(t) + "-container2"
369370

370371
base := testutil.NewBase(t)
371372
defer base.Cmd("rm", "-f", testContainer1, testContainer2).Run()

0 commit comments

Comments
 (0)