@@ -248,6 +248,12 @@ func TestContainerInspectHostConfig(t *testing.T) {
248248 "--add-host" , "host2:10.0.0.2" ,
249249 "--ipc" , "host" ,
250250 "--memory" , "512m" ,
251+ "--read-only" ,
252+ "--uts" , "host" ,
253+ "--shm-size" , "256m" ,
254+ "--runtime" , "io.containerd.runtime.v1.linux" ,
255+ "--sysctl" , "net.core.somaxconn=1024" ,
256+ "--device" , "/dev/null:/dev/null" ,
251257 testutil .AlpineImage , "sleep" , "infinity" ).AssertOK ()
252258
253259 inspect := base .InspectContainer (testContainer )
@@ -261,7 +267,6 @@ func TestContainerInspectHostConfig(t *testing.T) {
261267 expectedExtraHosts := []string {"host1:10.0.0.1" , "host2:10.0.0.2" }
262268 assert .DeepEqual (t , expectedExtraHosts , inspect .HostConfig .ExtraHosts )
263269 assert .Equal (t , "host" , inspect .HostConfig .IpcMode )
264- t .Logf ("Actual LogConfig.Driver: %s" , inspect .HostConfig .LogConfig .Driver )
265270 assert .Equal (t , "" , inspect .HostConfig .LogConfig .Driver )
266271 assert .Equal (t , int64 (536870912 ), inspect .HostConfig .Memory )
267272 assert .Equal (t , int64 (1073741824 ), inspect .HostConfig .MemorySwap )
@@ -400,13 +405,6 @@ func TestContainerInspectHostConfigPIDDefaults(t *testing.T) {
400405 assert .Equal (t , "" , inspect .HostConfig .PidMode )
401406}
402407
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-
410408// assert.Equal(t, true, inspect.HostConfig.ReadonlyRootfs)
411409// assert.Equal(t, "host", inspect.HostConfig.UTSMode)
412410// assert.Equal(t, int64(268435456), inspect.HostConfig.ShmSize)
0 commit comments