e2e: handle nil ReplicaSet in checkDeploymentRevision

deploymentutil.GetNewReplicaSet is allowed to return nil.
pull/6/head
Dr. Stefan Schimanski 2017-04-24 17:33:42 +02:00
parent e38c575ae6
commit 6b066ee135
1 changed files with 1 additions and 0 deletions

View File

@ -127,6 +127,7 @@ func checkDeploymentRevision(c clientset.Interface, ns, deploymentName, revision
// Check revision of the new replica set of this deployment
newRS, err := deploymentutil.GetNewReplicaSet(deployment, c)
Expect(err).NotTo(HaveOccurred())
Expect(newRS).NotTo(Equal(nil))
Expect(newRS.Annotations).NotTo(Equal(nil))
Expect(newRS.Annotations[deploymentutil.RevisionAnnotation]).Should(Equal(revision))
// Check revision of This deployment