Skip to content

Commit

Permalink
test: add additional test for skip create or update for gateway=true/…
Browse files Browse the repository at this point in the history
…false

Signed-off-by: Dustin Scott <[email protected]>
  • Loading branch information
scottd018 committed Feb 6, 2025
1 parent 26139fa commit ca2b1ca
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion pkg/cluster/deploybaseresources_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,18 @@ func TestSetMasterSubnetPolicies(t *testing.T) {
gatewayEnabled: true,
},
{
name: "ok, skipCreateOrUpdate",
name: "ok, skipCreateOrUpdate, !gatewayEnabled",
mocks: func(subnet *mock_subnet.MockManager) {
subnet.EXPECT().Get(ctx, "subnetID").Return(&mgmtnetwork.Subnet{
SubnetPropertiesFormat: &mgmtnetwork.SubnetPropertiesFormat{
PrivateLinkServiceNetworkPolicies: to.StringPtr("Disabled"),
},
}, nil)
subnet.EXPECT().CreateOrUpdate(gomock.Any(), gomock.Any(), gomock.Any()).Times(0)
},
},
{
name: "ok, skipCreateOrUpdate, gatewayEnabled",
mocks: func(subnet *mock_subnet.MockManager) {
subnet.EXPECT().Get(ctx, "subnetID").Return(&mgmtnetwork.Subnet{
SubnetPropertiesFormat: &mgmtnetwork.SubnetPropertiesFormat{
Expand Down

0 comments on commit ca2b1ca

Please sign in to comment.