Merge pull request #47579 from wanghaoran1988/fix_43322

Automatic merge from submit-queue (batch tested with PRs 47958, 46261, 46667, 47709, 47579)

Clean up Deployment overlap annotation code

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #43322

**Special notes for your reviewer**:

**Release note**:

```
None
```
This commit is contained in:
Kubernetes Submit Queue
2017-06-23 07:21:36 -07:00
committed by GitHub
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)