assert.True(t,ingressController.hasFinalizerFunc(updatedIngress,apiv1.FinalizerOrphan),fmt.Sprintf("ingress does not have the orphan finalizer: %v",updatedIngress))
ing1 = *updatedIngress
*/
fedIngress=*updatedIngress
t.Log("Checking that Ingress was correctly created in cluster 1")
assert.NotNil(t,updatedIngress,"Cluster's ingress load balancer status was not correctly transferred to the federated ingress")
if updatedIngress != nil {
assert.True(t, reflect.DeepEqual(createdIngress.Status.LoadBalancer.Ingress, updatedIngress.Status.LoadBalancer.Ingress), fmt.Sprintf("Ingress IP was not transferred from cluster ingress to federated ingress. %v is not equal to %v", createdIngress.Status.LoadBalancer.Ingress, updatedIngress.Status.LoadBalancer.Ingress))
assert.True(t, reflect.DeepEqual(updatedIngress2.Spec, updatedIngress.Spec), "Spec of updated ingress is not equal")
assert.Equal(t, updatedIngress2.ObjectMeta.Annotations["A"], updatedIngress.ObjectMeta.Annotations["A"], "Updated annotation not transferred from federated to cluster ingress.")
assert.True(t,reflect.DeepEqual(updatedIngress2.Spec,fedIngress.Spec),"Spec of updated ingress is not equal")
assert.Equal(t,updatedIngress2.ObjectMeta.Annotations["A"],fedIngress.ObjectMeta.Annotations["A"],"Updated annotation not transferred from federated to cluster ingress.")
// Test add cluster
t.Log("Adding a second cluster")
ing1.Annotations[staticIPNameKeyWritable]="foo"// Make sure that the base object has a static IP name first.
fedIngressWatch.Modify(&ing1)
fedIngress.Annotations[staticIPNameKeyWritable]="foo"// Make sure that the base object has a static IP name first.
fedIngressWatch.Modify(&fedIngress)
clusterWatch.Add(cluster2)
// First check that the original values are not equal - see above comment
assert.NotEqual(t,cfg1.Data[uidKey],cfg2.Data[uidKey],fmt.Sprintf("ConfigMap in cluster 2 must initially not equal that in cluster 1 for this test - please fix test"))