Clean up Deployment overlap annotation code

This commit is contained in:
Haoran Wang
2017-06-15 14:42:20 +08:00
parent 7831a5426f
commit f732e4baae
5 changed files with 0 additions and 57 deletions

View File

@@ -271,32 +271,6 @@ 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)