File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,13 @@ func TestPodSandboxStatus(t *testing.T) {
31
31
id = "test-id"
32
32
ip = "10.10.10.10"
33
33
)
34
+ idmap := []* runtime.IDMapping {
35
+ {
36
+ ContainerId : 0 ,
37
+ HostId : 100 ,
38
+ Length : 1 ,
39
+ },
40
+ }
34
41
additionalIPs := []string {"8.8.8.8" , "2001:db8:85a3::8a2e:370:7334" }
35
42
createdAt := time .Now ()
36
43
config := & runtime.PodSandboxConfig {
@@ -46,6 +53,11 @@ func TestPodSandboxStatus(t *testing.T) {
46
53
Network : runtime .NamespaceMode_NODE ,
47
54
Pid : runtime .NamespaceMode_CONTAINER ,
48
55
Ipc : runtime .NamespaceMode_POD ,
56
+ UsernsOptions : & runtime.UserNamespace {
57
+ Uids : idmap ,
58
+ Gids : idmap ,
59
+ Mode : runtime .NamespaceMode_POD ,
60
+ },
49
61
},
50
62
},
51
63
},
@@ -80,6 +92,11 @@ func TestPodSandboxStatus(t *testing.T) {
80
92
Network : runtime .NamespaceMode_NODE ,
81
93
Pid : runtime .NamespaceMode_CONTAINER ,
82
94
Ipc : runtime .NamespaceMode_POD ,
95
+ UsernsOptions : & runtime.UserNamespace {
96
+ Uids : idmap ,
97
+ Gids : idmap ,
98
+ Mode : runtime .NamespaceMode_POD ,
99
+ },
83
100
},
84
101
},
85
102
},
You can’t perform that action at this time.
0 commit comments