File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -31,6 +31,14 @@ func TestPodSandboxStatus(t *testing.T) {
3131 id = "test-id"
3232 ip = "10.10.10.10"
3333 )
34+ idmap := []* runtime.IDMapping {
35+ {
36+ ContainerId : 0 ,
37+ HostId : 100 ,
38+ Length : 1 ,
39+ },
40+ }
41+
3442 additionalIPs := []string {"8.8.8.8" , "2001:db8:85a3::8a2e:370:7334" }
3543 createdAt := time .Now ()
3644 config := & runtime.PodSandboxConfig {
@@ -46,6 +54,11 @@ func TestPodSandboxStatus(t *testing.T) {
4654 Network : runtime .NamespaceMode_NODE ,
4755 Pid : runtime .NamespaceMode_CONTAINER ,
4856 Ipc : runtime .NamespaceMode_POD ,
57+ UsernsOptions : & runtime.UserNamespace {
58+ Uids : idmap ,
59+ Gids : idmap ,
60+ Mode : runtime .NamespaceMode_POD ,
61+ },
4962 },
5063 },
5164 },
@@ -80,6 +93,11 @@ func TestPodSandboxStatus(t *testing.T) {
8093 Network : runtime .NamespaceMode_NODE ,
8194 Pid : runtime .NamespaceMode_CONTAINER ,
8295 Ipc : runtime .NamespaceMode_POD ,
96+ UsernsOptions : & runtime.UserNamespace {
97+ Uids : idmap ,
98+ Gids : idmap ,
99+ Mode : runtime .NamespaceMode_POD ,
100+ },
83101 },
84102 },
85103 },
Original file line number Diff line number Diff line change @@ -31,6 +31,13 @@ func TestPodSandboxStatus(t *testing.T) {
3131 id = "test-id"
3232 ip = "10.10.10.10"
3333 )
34+ idmap := []* runtime.IDMapping {
35+ {
36+ ContainerId : 0 ,
37+ HostId : 100 ,
38+ Length : 1 ,
39+ },
40+ }
3441 additionalIPs := []string {"8.8.8.8" , "2001:db8:85a3::8a2e:370:7334" }
3542 createdAt := time .Now ()
3643 config := & runtime.PodSandboxConfig {
@@ -46,6 +53,11 @@ func TestPodSandboxStatus(t *testing.T) {
4653 Network : runtime .NamespaceMode_NODE ,
4754 Pid : runtime .NamespaceMode_CONTAINER ,
4855 Ipc : runtime .NamespaceMode_POD ,
56+ UsernsOptions : & runtime.UserNamespace {
57+ Uids : idmap ,
58+ Gids : idmap ,
59+ Mode : runtime .NamespaceMode_POD ,
60+ },
4961 },
5062 },
5163 },
@@ -80,6 +92,11 @@ func TestPodSandboxStatus(t *testing.T) {
8092 Network : runtime .NamespaceMode_NODE ,
8193 Pid : runtime .NamespaceMode_CONTAINER ,
8294 Ipc : runtime .NamespaceMode_POD ,
95+ UsernsOptions : & runtime.UserNamespace {
96+ Uids : idmap ,
97+ Gids : idmap ,
98+ Mode : runtime .NamespaceMode_POD ,
99+ },
83100 },
84101 },
85102 },
You can’t perform that action at this time.
0 commit comments