Skip to content

Commit

Permalink
fix(controller): update tests which were relying on this bug(?)
Browse files Browse the repository at this point in the history
Signed-off-by: ben.minter <[email protected]>
  • Loading branch information
benminter-treatwell committed Jun 24, 2024
1 parent e914d01 commit 4e31b41
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion rollout/analysis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2491,7 +2491,7 @@ func TestRolloutPostPromotionAnalysisSuccess(t *testing.T) {
Status: v1alpha1.AnalysisPhaseRunning,
}

rs1 := newReplicaSetWithStatus(r1, 0, 0)
rs1 := newReplicaSetWithStatus(r1, 1, 1)
rs2 := newReplicaSetWithStatus(r2, 1, 1)
rs1PodHash := rs1.Labels[v1alpha1.DefaultRolloutUniqueLabelKey]
rs2PodHash := rs2.Labels[v1alpha1.DefaultRolloutUniqueLabelKey]
Expand All @@ -2517,6 +2517,7 @@ func TestRolloutPostPromotionAnalysisSuccess(t *testing.T) {
patch := f.getPatchedRollout(patchIndex)
expectedPatch := fmt.Sprintf(`{
"status": {
"replicas":2,
"stableRS": "%s",
"blueGreen": {
"postPromotionAnalysisRunStatus":{"status":"Successful"}
Expand Down
2 changes: 1 addition & 1 deletion rollout/ephemeralmetadata_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ func TestSyncBlueGreenEphemeralMetadataSecondRevision(t *testing.T) {
f := newFixture(t)
defer f.Close()

r1 := newBlueGreenRollout("foo", 1, nil, "active", "preview")
r1 := newBlueGreenRollout("foo", 3, nil, "active", "preview")
r1.Spec.Strategy.BlueGreen.AutoPromotionEnabled = pointer.BoolPtr(false)
r1.Annotations[annotations.RevisionAnnotation] = "1"
r1.Spec.Strategy.BlueGreen.PreviewMetadata = &v1alpha1.PodTemplateMetadata{
Expand Down

0 comments on commit 4e31b41

Please sign in to comment.