Merge pull request #118242 from aojea/fix_e2e_rs

fix unknown field error in rs e2e
This commit is contained in:
Kubernetes Prow Robot 2023-05-24 17:14:50 -07:00 committed by GitHub
commit 04d14ba389
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -515,7 +515,7 @@ func testRSLifeCycle(ctx context.Context, f *framework.Framework) {
"replicas": rsPatchReplicas, "replicas": rsPatchReplicas,
"template": map[string]interface{}{ "template": map[string]interface{}{
"spec": map[string]interface{}{ "spec": map[string]interface{}{
"TerminationGracePeriodSeconds": &zero, "terminationGracePeriodSeconds": &zero,
"containers": [1]map[string]interface{}{{ "containers": [1]map[string]interface{}{{
"name": rsName, "name": rsName,
"image": rsPatchImage, "image": rsPatchImage,
@ -536,7 +536,8 @@ func testRSLifeCycle(ctx context.Context, f *framework.Framework) {
rset.ObjectMeta.Labels["test-rs"] == "patched" && rset.ObjectMeta.Labels["test-rs"] == "patched" &&
rset.Status.ReadyReplicas == rsPatchReplicas && rset.Status.ReadyReplicas == rsPatchReplicas &&
rset.Status.AvailableReplicas == rsPatchReplicas && rset.Status.AvailableReplicas == rsPatchReplicas &&
rset.Spec.Template.Spec.Containers[0].Image == rsPatchImage rset.Spec.Template.Spec.Containers[0].Image == rsPatchImage &&
*rset.Spec.Template.Spec.TerminationGracePeriodSeconds == zero
if !found { if !found {
framework.Logf("observed ReplicaSet %v in namespace %v with ReadyReplicas %v, AvailableReplicas %v", rset.ObjectMeta.Name, rset.ObjectMeta.Namespace, rset.Status.ReadyReplicas, framework.Logf("observed ReplicaSet %v in namespace %v with ReadyReplicas %v, AvailableReplicas %v", rset.ObjectMeta.Name, rset.ObjectMeta.Namespace, rset.Status.ReadyReplicas,
rset.Status.AvailableReplicas) rset.Status.AvailableReplicas)