Skip to content

Commit

Permalink
add test case
Browse files Browse the repository at this point in the history
Signed-off-by: Haywood Shannon <[email protected]>
  • Loading branch information
haywoodsh committed Nov 17, 2023
1 parent dde75c4 commit 227ddfb
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions pkg/apis/configuration/validation/virtualserver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1774,6 +1774,27 @@ func TestValidateSplitsFails(t *testing.T) {
},
msg: "invalid action with non-existing upstream",
},
{
splits: []v1.Split{
{
Weight: 100,
Action: &v1.Action{
Pass: "test-1",
},
},
{
Weight: -2,
Action: &v1.Action{
Pass: "test-2",
},
},
},
upstreamNames: map[string]sets.Empty{
"test-1": {},
"test-2": {},
},
msg: "invalid negative weight",
},
}

vsv := &VirtualServerValidator{isPlus: false}
Expand Down

0 comments on commit 227ddfb

Please sign in to comment.