Commit cf07c106 authored by Madhusudan.C.S's avatar Madhusudan.C.S

[Federation] Use and return created replicaset instead of the passed object.

Passed replicaset object doesn't contain object name, but has a prefix set in `GenerateName`. However, we need to operate on the object name later to uniquely identified the created object. So we need the created object with the name set by the API server.
parent 55d500e6
...@@ -400,10 +400,10 @@ func createReplicaSetOrFail(clientset *fedclientset.Clientset, replicaset *v1bet ...@@ -400,10 +400,10 @@ func createReplicaSetOrFail(clientset *fedclientset.Clientset, replicaset *v1bet
} }
By(fmt.Sprintf("Creating federation replicaset %q in namespace %q", replicaset.Name, namespace)) By(fmt.Sprintf("Creating federation replicaset %q in namespace %q", replicaset.Name, namespace))
_, err := clientset.Extensions().ReplicaSets(namespace).Create(replicaset) newRS, err := clientset.Extensions().ReplicaSets(namespace).Create(replicaset)
framework.ExpectNoError(err, "Creating replicaset %q in namespace %q", replicaset.Name, namespace) framework.ExpectNoError(err, "Creating replicaset %q in namespace %q", replicaset.Name, namespace)
By(fmt.Sprintf("Successfully created federation replicaset %q in namespace %q", replicaset.Name, namespace)) By(fmt.Sprintf("Successfully created federation replicaset %q in namespace %q", newRS.Name, namespace))
return replicaset return newRS
} }
func deleteReplicaSetOrFail(clientset *fedclientset.Clientset, nsName string, replicaSetName string, orphanDependents *bool) { func deleteReplicaSetOrFail(clientset *fedclientset.Clientset, nsName string, replicaSetName string, orphanDependents *bool) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment