Skip to content
This repository has been archived by the owner on Oct 24, 2023. It is now read-only.

Commit

Permalink
test: UT for addons ip-masq-agent image override (#2997)
Browse files Browse the repository at this point in the history
  • Loading branch information
jackfrancis committed Mar 31, 2020
1 parent 50a850a commit 20854f3
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions pkg/api/addons_test.go
Expand Up @@ -3668,6 +3668,40 @@ func TestSetAddonsConfig(t *testing.T) {
},
}, "1.16.0")),
},
{
name: "ip-masq-agent upgrade to 1.1.16 overrides custom image",
cs: &ContainerService{
Properties: &Properties{
OrchestratorProfile: &OrchestratorProfile{
OrchestratorVersion: "1.16.8",
KubernetesConfig: &KubernetesConfig{
KubernetesImageBaseType: common.KubernetesImageBaseTypeGCR,
DNSServiceIP: DefaultKubernetesDNSServiceIP,
KubeletConfig: map[string]string{
"--cluster-domain": "cluster.local",
},
ClusterSubnet: DefaultKubernetesSubnet,
ProxyMode: KubeProxyModeIPTables,
NetworkPlugin: NetworkPluginAzure,
Addons: []KubernetesAddon{
{
Name: common.IPMASQAgentAddonName,
Enabled: to.BoolPtr(true),
Containers: []KubernetesContainerSpec{
{
Name: common.IPMASQAgentAddonName,
Image: "my-custom-image",
},
},
},
},
},
},
},
},
isUpgrade: true,
expectedAddons: getDefaultAddons("1.16.8", "", common.KubernetesImageBaseTypeGCR), // the default addons will include the default image
},
}

for _, test := range tests {
Expand Down

0 comments on commit 20854f3

Please sign in to comment.