|
|
|
|
@ -124,7 +124,8 @@ func TestRequireAdoption(t *testing.T) {
|
|
|
|
|
var (
|
|
|
|
|
missing = newMissingDeployment("missing", "ns-a")
|
|
|
|
|
existing = newDeploymentWithOwner("existing", "ns-a", nil, nil)
|
|
|
|
|
resources = kube.ResourceList{missing, existing}
|
|
|
|
|
existingWithGeneratedName = newDeploymentWithOwner("", "ns-a", nil, nil)
|
|
|
|
|
resources = kube.ResourceList{missing, existing, existingWithGeneratedName}
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// Verify that a resource that lacks labels/annotations can be adopted
|
|
|
|
|
@ -148,8 +149,9 @@ func TestExistingResourceConflict(t *testing.T) {
|
|
|
|
|
}
|
|
|
|
|
missing = newMissingDeployment("missing", "ns-a")
|
|
|
|
|
existing = newDeploymentWithOwner("existing", "ns-a", labels, annotations)
|
|
|
|
|
existingWithGeneratedName = newDeploymentWithOwner("", "ns-a", nil, nil)
|
|
|
|
|
conflict = newDeploymentWithOwner("conflict", "ns-a", nil, nil)
|
|
|
|
|
resources = kube.ResourceList{missing, existing}
|
|
|
|
|
resources = kube.ResourceList{missing, existing, existingWithGeneratedName}
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// Verify only existing resources are returned
|
|
|
|
|
|