mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-17 15:13:08 +00:00
add v1 tests to hack/test-go; let default value of Container.SecurityContext to be nil
This commit is contained in:
@@ -27,7 +27,6 @@ import (
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/api/validation"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/kubelet"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/runtime"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/securitycontext"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/util"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/util/errors"
|
||||
)
|
||||
@@ -161,7 +160,7 @@ func TestExtractPodsFromHTTP(t *testing.T) {
|
||||
Image: "foo",
|
||||
TerminationMessagePath: "/dev/termination-log",
|
||||
ImagePullPolicy: "Always",
|
||||
SecurityContext: securitycontext.ValidSecurityContextWithContainerDefaults()}},
|
||||
}},
|
||||
},
|
||||
}),
|
||||
},
|
||||
@@ -214,7 +213,7 @@ func TestExtractPodsFromHTTP(t *testing.T) {
|
||||
Image: "foo",
|
||||
TerminationMessagePath: "/dev/termination-log",
|
||||
ImagePullPolicy: "Always",
|
||||
SecurityContext: securitycontext.ValidSecurityContextWithContainerDefaults()}},
|
||||
}},
|
||||
},
|
||||
},
|
||||
&api.Pod{
|
||||
@@ -234,7 +233,7 @@ func TestExtractPodsFromHTTP(t *testing.T) {
|
||||
Image: "bar",
|
||||
TerminationMessagePath: "/dev/termination-log",
|
||||
ImagePullPolicy: "IfNotPresent",
|
||||
SecurityContext: securitycontext.ValidSecurityContextWithContainerDefaults()}},
|
||||
}},
|
||||
},
|
||||
}),
|
||||
},
|
||||
|
Reference in New Issue
Block a user