mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-05-06 08:15:48 -04:00
Azure: Only create debugd loadbalancer when debugCluster is set
This commit is contained in:
parent
1a4b4f564a
commit
d74c7a3769
7 changed files with 109 additions and 40 deletions
|
@ -177,12 +177,18 @@ func TestCreateExternalLoadBalancer(t *testing.T) {
|
|||
testCases := map[string]struct {
|
||||
publicIPAddressesAPI publicIPAddressesAPI
|
||||
loadBalancersAPI loadBalancersAPI
|
||||
isDebugCluster bool
|
||||
wantErr bool
|
||||
}{
|
||||
"successful create": {
|
||||
publicIPAddressesAPI: stubPublicIPAddressesAPI{},
|
||||
loadBalancersAPI: stubLoadBalancersAPI{},
|
||||
},
|
||||
"successful create (debug cluster)": {
|
||||
publicIPAddressesAPI: stubPublicIPAddressesAPI{},
|
||||
loadBalancersAPI: stubLoadBalancersAPI{},
|
||||
isDebugCluster: true,
|
||||
},
|
||||
"failed to get response from successful create": {
|
||||
loadBalancersAPI: stubLoadBalancersAPI{pollErr: someErr},
|
||||
publicIPAddressesAPI: stubPublicIPAddressesAPI{},
|
||||
|
@ -216,7 +222,7 @@ func TestCreateExternalLoadBalancer(t *testing.T) {
|
|||
publicIPAddressesAPI: tc.publicIPAddressesAPI,
|
||||
}
|
||||
|
||||
err := client.CreateExternalLoadBalancer(ctx)
|
||||
err := client.CreateExternalLoadBalancer(ctx, tc.isDebugCluster)
|
||||
if tc.wantErr {
|
||||
assert.Error(err)
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue