Skip to content

Commit

Permalink
Validate the canary properly in e2e tests (#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmed-mez committed Nov 3, 2020
1 parent 4720595 commit a8d38a8
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions controllers/extendeddaemonset_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,14 +152,11 @@ var _ = Describe("ExtendedDaemonSet Controller", func() {
return false
}

if eds.Status.Canary == nil {
return false
if eds.Annotations == nil {
eds.Annotations = make(map[string]string)
}

eds.Status.ActiveReplicaSet = eds.Status.Canary.ReplicaSet
eds.Status.State = datadoghqv1alpha1.ExtendedDaemonSetStatusStateRunning
eds.Status.Desired = nodesCount
eds.Status.Canary = nil
eds.Annotations[datadoghqv1alpha1.ExtendedDaemonSetCanaryValidAnnotationKey] = eds.Status.Canary.ReplicaSet

if err = k8sClient.Update(context.Background(), eds); err != nil {
fmt.Fprint(GinkgoWriter, err)
Expand Down

0 comments on commit a8d38a8

Please sign in to comment.