Deployment: Clear obsolete OverlapAnnotaiton.
This ensures old clients will not assume the Deployment is blocked.
This commit is contained in:
@@ -254,6 +254,32 @@ func TestSyncDeploymentCreatesReplicaSet(t *testing.T) {
|
||||
f.run(getKey(d, t))
|
||||
}
|
||||
|
||||
func TestSyncDeploymentClearsOverlapAnnotation(t *testing.T) {
|
||||
f := newFixture(t)
|
||||
|
||||
d := newDeployment("foo", 1, nil, nil, nil, map[string]string{"foo": "bar"})
|
||||
d.Annotations[util.OverlapAnnotation] = "overlap"
|
||||
f.dLister = append(f.dLister, d)
|
||||
f.objects = append(f.objects, d)
|
||||
|
||||
rs := newReplicaSet(d, "deploymentrs-4186632231", 1)
|
||||
|
||||
f.expectUpdateDeploymentStatusAction(d)
|
||||
f.expectCreateRSAction(rs)
|
||||
f.expectUpdateDeploymentStatusAction(d)
|
||||
f.expectUpdateDeploymentStatusAction(d)
|
||||
|
||||
f.run(getKey(d, t))
|
||||
|
||||
d, err := f.client.ExtensionsV1beta1().Deployments(d.Namespace).Get(d.Name, metav1.GetOptions{})
|
||||
if err != nil {
|
||||
t.Fatalf("can't get deployment: %v", err)
|
||||
}
|
||||
if _, ok := d.Annotations[util.OverlapAnnotation]; ok {
|
||||
t.Errorf("OverlapAnnotation = %q, wanted absent", d.Annotations[util.OverlapAnnotation])
|
||||
}
|
||||
}
|
||||
|
||||
func TestSyncDeploymentDontDoAnythingDuringDeletion(t *testing.T) {
|
||||
f := newFixture(t)
|
||||
|
||||
|
Reference in New Issue
Block a user