Skip to content

Commit

Permalink
Fix Failing Unit test (Azure#166)
Browse files Browse the repository at this point in the history
  • Loading branch information
tariq1890 authored and jackfrancis committed Dec 18, 2018
1 parent 4ace5af commit aa1b264
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/api/defaults-kubelet_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ func TestKubeletCalico(t *testing.T) {

func TestKubeletHostedMasterIPMasqAgentDisabled(t *testing.T) {
subnet := "172.16.0.0/16"
defaultSubnet := "0.0.0.0"
defaultSubnet := "0.0.0.0/0"
// MasterIPMasqAgent disabled, --non-masquerade-cidr should be subnet
cs := CreateMockContainerService("testcluster", defaultTestClusterVer, 3, 2, false)
cs.Properties.HostedMasterProfile = &HostedMasterProfile{
Expand All @@ -228,7 +228,7 @@ func TestKubeletHostedMasterIPMasqAgentDisabled(t *testing.T) {
k["--non-masquerade-cidr"], subnet)
}

// MasterIPMasqAgent enabled, --non-masquerade-cidr should be 0.0.0.0
// MasterIPMasqAgent enabled, --non-masquerade-cidr should be 0.0.0.0/0
cs = CreateMockContainerService("testcluster", defaultTestClusterVer, 3, 2, false)
cs.Properties.HostedMasterProfile = &HostedMasterProfile{
IPMasqAgent: true,
Expand All @@ -241,7 +241,7 @@ func TestKubeletHostedMasterIPMasqAgentDisabled(t *testing.T) {
k["--non-masquerade-cidr"], defaultSubnet)
}

// no HostedMasterProfile, --non-masquerade-cidr should be 0.0.0.0
// no HostedMasterProfile, --non-masquerade-cidr should be 0.0.0.0/0
cs = CreateMockContainerService("testcluster", defaultTestClusterVer, 3, 2, false)
cs.Properties.OrchestratorProfile.KubernetesConfig.ClusterSubnet = subnet
cs.setKubeletConfig()
Expand Down

0 comments on commit aa1b264

Please sign in to comment.