Skip to content

Commit

Permalink
fix: append weighted destination only when weight is mentioned
Browse files Browse the repository at this point in the history
Signed-off-by: divyansh375 <[email protected]>
  • Loading branch information
divyansh375 committed May 7, 2023
1 parent b1e3f04 commit 31816e6
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions rollout/trafficrouting_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,11 +249,11 @@ func TestRolloutWithExperimentStep(t *testing.T) {
Replicas: pointer.Int32Ptr(1),
Weight: pointer.Int32Ptr(5),
},
{
Name: "experiment-template-without-weight",
SpecRef: "stable",
Replicas: pointer.Int32Ptr(1),
}},
{
Name: "experiment-template-without-weight",
SpecRef: "stable",
Replicas: pointer.Int32Ptr(1),
}},
},
},
}
Expand Down Expand Up @@ -281,11 +281,11 @@ func TestRolloutWithExperimentStep(t *testing.T) {
ServiceName: "experiment-service",
PodTemplateHash: rs2PodHash,
},
{
Name: "experiment-template-without-weight",
ServiceName: "experiment-service-without-weight",
PodTemplateHash: rs2PodHash,
}}
{
Name: "experiment-template-without-weight",
ServiceName: "experiment-service-without-weight",
PodTemplateHash: rs2PodHash,
}}
r2.Status.Canary.CurrentExperiment = ex.Name

f.kubeobjects = append(f.kubeobjects, rs1, rs2, canarySvc, stableSvc)
Expand Down Expand Up @@ -1054,4 +1054,4 @@ func TestDynamicScalingDecreaseWeightAccordingToStableAvailabilityWhenAbortedAnd
f.fakeTrafficRouting.On("RemoveManagedRoutes", mock.Anything, mock.Anything).Return(nil)
f.fakeTrafficRouting.On("VerifyWeight", mock.Anything).Return(pointer.BoolPtr(true), nil)
f.run(getKey(r1, t))
}
}

0 comments on commit 31816e6

Please sign in to comment.