mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-09 20:17:41 +00:00
Merge pull request #114873 from tnqn/fix-conformance-test
Fix unknown field error in deployment lifecycle e2e
This commit is contained in:
commit
4d0f75d183
@ -184,6 +184,7 @@ var _ = SIGDescribe("Deployment", func() {
|
|||||||
*/
|
*/
|
||||||
framework.ConformanceIt("should run the lifecycle of a Deployment", func(ctx context.Context) {
|
framework.ConformanceIt("should run the lifecycle of a Deployment", func(ctx context.Context) {
|
||||||
one := int64(1)
|
one := int64(1)
|
||||||
|
two := int64(2)
|
||||||
deploymentResource := schema.GroupVersionResource{Group: "apps", Version: "v1", Resource: "deployments"}
|
deploymentResource := schema.GroupVersionResource{Group: "apps", Version: "v1", Resource: "deployments"}
|
||||||
testNamespaceName := f.Namespace.Name
|
testNamespaceName := f.Namespace.Name
|
||||||
testDeploymentName := "test-deployment"
|
testDeploymentName := "test-deployment"
|
||||||
@ -259,7 +260,7 @@ var _ = SIGDescribe("Deployment", func() {
|
|||||||
"replicas": testDeploymentMinimumReplicas,
|
"replicas": testDeploymentMinimumReplicas,
|
||||||
"template": map[string]interface{}{
|
"template": map[string]interface{}{
|
||||||
"spec": map[string]interface{}{
|
"spec": map[string]interface{}{
|
||||||
"TerminationGracePeriodSeconds": &one,
|
"terminationGracePeriodSeconds": &two,
|
||||||
"containers": [1]map[string]interface{}{{
|
"containers": [1]map[string]interface{}{{
|
||||||
"name": testDeploymentName,
|
"name": testDeploymentName,
|
||||||
"image": testDeploymentPatchImage,
|
"image": testDeploymentPatchImage,
|
||||||
@ -301,7 +302,8 @@ var _ = SIGDescribe("Deployment", func() {
|
|||||||
deployment.Status.ReadyReplicas == testDeploymentMinimumReplicas &&
|
deployment.Status.ReadyReplicas == testDeploymentMinimumReplicas &&
|
||||||
deployment.Status.UpdatedReplicas == testDeploymentMinimumReplicas &&
|
deployment.Status.UpdatedReplicas == testDeploymentMinimumReplicas &&
|
||||||
deployment.Status.UnavailableReplicas == 0 &&
|
deployment.Status.UnavailableReplicas == 0 &&
|
||||||
deployment.Spec.Template.Spec.Containers[0].Image == testDeploymentPatchImage
|
deployment.Spec.Template.Spec.Containers[0].Image == testDeploymentPatchImage &&
|
||||||
|
*deployment.Spec.Template.Spec.TerminationGracePeriodSeconds == two
|
||||||
if !found {
|
if !found {
|
||||||
framework.Logf("observed Deployment %v in namespace %v with ReadyReplicas %v", deployment.ObjectMeta.Name, deployment.ObjectMeta.Namespace, deployment.Status.ReadyReplicas)
|
framework.Logf("observed Deployment %v in namespace %v with ReadyReplicas %v", deployment.ObjectMeta.Name, deployment.ObjectMeta.Namespace, deployment.Status.ReadyReplicas)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user