mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-28 05:57:25 +00:00
fieldmanager: Comment test broken by status being separated from main resource
This commit is contained in:
parent
93dffdc1af
commit
e477c31307
@ -969,31 +969,32 @@ func TestExtractModifyApply(t *testing.T) {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
// TODO: We probably need "ExtractStatus" (or a variadic argument to "Extract").
|
||||||
// Append a condition to the status if the object
|
// {
|
||||||
name: "modify-status-conditions",
|
// // Append a condition to the status if the object
|
||||||
modifyStatusFunc: func(apply *appsv1ac.DeploymentApplyConfiguration) {
|
// name: "modify-status-conditions",
|
||||||
apply.WithStatus(appsv1ac.DeploymentStatus().
|
// modifyStatusFunc: func(apply *appsv1ac.DeploymentApplyConfiguration) {
|
||||||
WithConditions(appsv1ac.DeploymentCondition().
|
// apply.WithStatus(appsv1ac.DeploymentStatus().
|
||||||
WithType(appsv1.DeploymentProgressing).
|
// WithConditions(appsv1ac.DeploymentCondition().
|
||||||
WithStatus(v1.ConditionUnknown).
|
// WithType(appsv1.DeploymentProgressing).
|
||||||
WithLastTransitionTime(metav1.Now()).
|
// WithStatus(v1.ConditionUnknown).
|
||||||
WithLastUpdateTime(metav1.Now()).
|
// WithLastTransitionTime(metav1.Now()).
|
||||||
WithMessage("progressing").
|
// WithLastUpdateTime(metav1.Now()).
|
||||||
WithReason("TestExtractModifyApply_Status"),
|
// WithMessage("progressing").
|
||||||
),
|
// WithReason("TestExtractModifyApply_Status"),
|
||||||
)
|
// ),
|
||||||
},
|
// )
|
||||||
verifyStatusAppliedFunc: func(applied *appsv1ac.DeploymentApplyConfiguration) {
|
// },
|
||||||
conditions := applied.Status.Conditions
|
// verifyStatusAppliedFunc: func(applied *appsv1ac.DeploymentApplyConfiguration) {
|
||||||
if len(conditions) != 1 {
|
// conditions := applied.Status.Conditions
|
||||||
t.Errorf("Expected 1 conditions but got %d", len(conditions))
|
// if len(conditions) != 1 {
|
||||||
}
|
// t.Errorf("Expected 1 conditions but got %d", len(conditions))
|
||||||
if *conditions[0].Type != appsv1.DeploymentProgressing {
|
// }
|
||||||
t.Errorf("Expected condition name DeploymentProgressing but got: %s", *conditions[0].Type)
|
// if *conditions[0].Type != appsv1.DeploymentProgressing {
|
||||||
}
|
// t.Errorf("Expected condition name DeploymentProgressing but got: %s", *conditions[0].Type)
|
||||||
},
|
// }
|
||||||
},
|
// },
|
||||||
|
// },
|
||||||
}
|
}
|
||||||
|
|
||||||
testServer := kubeapiservertesting.StartTestServerOrDie(t, nil, []string{"--disable-admission-plugins", "ServiceAccount"}, framework.SharedEtcd())
|
testServer := kubeapiservertesting.StartTestServerOrDie(t, nil, []string{"--disable-admission-plugins", "ServiceAccount"}, framework.SharedEtcd())
|
||||||
|
Loading…
Reference in New Issue
Block a user