Skip to content

Commit 92a7a5b

Browse files
committed
add back options?
Signed-off-by: Arjun Raja Yogidas <[email protected]>
1 parent 92ebc28 commit 92a7a5b

File tree

2 files changed

+7
-20
lines changed

2 files changed

+7
-20
lines changed

cmd/nerdctl/container/container_inspect_linux_test.go

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -248,10 +248,17 @@ func TestContainerInspectHostConfig(t *testing.T) {
248248
"--add-host", "host2:10.0.0.2",
249249
"--ipc", "host",
250250
"--memory", "512m",
251+
"--read-only",
252+
"--shm-size", "256m",
253+
"--uts", "host",
254+
"--device", "/dev/null:/dev/null",
251255
testutil.AlpineImage, "sleep", "infinity").AssertOK()
252256

253257
inspect := base.InspectContainer(testContainer)
254258

259+
// "--runtime", "io.containerd.runtime.v1.linux",
260+
// "--sysctl", "net.core.somaxconn=1024",
261+
255262
assert.Equal(t, "0-1", inspect.HostConfig.CPUSetCPUs)
256263
assert.Equal(t, "0", inspect.HostConfig.CPUSetMems)
257264
assert.Equal(t, uint16(500), inspect.HostConfig.BlkioWeight)
@@ -261,7 +268,6 @@ func TestContainerInspectHostConfig(t *testing.T) {
261268
expectedExtraHosts := []string{"host1:10.0.0.1", "host2:10.0.0.2"}
262269
assert.DeepEqual(t, expectedExtraHosts, inspect.HostConfig.ExtraHosts)
263270
assert.Equal(t, "host", inspect.HostConfig.IpcMode)
264-
t.Logf("Actual LogConfig.Driver: %s", inspect.HostConfig.LogConfig.Driver)
265271
assert.Equal(t, "", inspect.HostConfig.LogConfig.Driver)
266272
assert.Equal(t, int64(536870912), inspect.HostConfig.Memory)
267273
assert.Equal(t, int64(1073741824), inspect.HostConfig.MemorySwap)
@@ -400,13 +406,6 @@ func TestContainerInspectHostConfigPIDDefaults(t *testing.T) {
400406
assert.Equal(t, "", inspect.HostConfig.PidMode)
401407
}
402408

403-
// //"--read-only",
404-
// "--uts", "host",
405-
// "--shm-size", "256m",
406-
// "--runtime", "io.containerd.runtime.v1.linux",
407-
// "--sysctl", "net.core.somaxconn=1024",
408-
// "--device", "/dev/null:/dev/null",
409-
410409
// assert.Equal(t, true, inspect.HostConfig.ReadonlyRootfs)
411410
// assert.Equal(t, "host", inspect.HostConfig.UTSMode)
412411
// assert.Equal(t, int64(268435456), inspect.HostConfig.ShmSize)

pkg/inspecttypes/dockercompat/dockercompat.go

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -562,18 +562,6 @@ func mountsFromNative(spMounts []specs.Mount) []MountPoint {
562562
return mountpoints
563563
}
564564

565-
// filterTmpfsMounts filters the tmpfs mounts
566-
func filterTmpfsMounts(spMounts []MountPoint) []MountPoint {
567-
mountpoints := make([]MountPoint, 0, len(spMounts))
568-
for _, m := range spMounts {
569-
if m.Type == "tmpfs" {
570-
mountpoints = append(mountpoints, m)
571-
}
572-
}
573-
574-
return mountpoints
575-
}
576-
577565
func statusFromNative(x containerd.Status, labels map[string]string) string {
578566
switch s := x.Status; s {
579567
case containerd.Stopped:

0 commit comments

Comments
 (0)