@@ -155,12 +155,34 @@ var _ = Describe("(Integration) [EKS Addons test]", func() {
155
155
})
156
156
157
157
It ("should have full control over configMap when creating addons" , func () {
158
- var (
159
- clusterConfig * api.ClusterConfig
160
- configMap * corev1.ConfigMap
161
- )
158
+ clusterConfig := getInitialClusterConfig ()
159
+ clusterConfig .Addons = []* api.Addon {
160
+ {
161
+ Name : "coredns" ,
162
+ Version : "latest" ,
163
+ },
164
+ }
165
+ cmd := params .EksctlCreateCmd .
166
+ WithArgs (
167
+ "addon" ,
168
+ "--config-file" , "-" ,
169
+ ).
170
+ WithoutArg ("--region" , params .Region ).
171
+ WithStdin (clusterutils .Reader (clusterConfig ))
172
+ Expect (cmd ).To (RunSuccessfully ())
162
173
163
- configMap = getConfigMap (rawClient .ClientSet (), "coredns" )
174
+ cmd = params .EksctlDeleteCmd .
175
+ WithArgs (
176
+ "addon" ,
177
+ "--name" , "coredns" ,
178
+ "--cluster" , clusterName ,
179
+ "--verbose" , "2" ,
180
+ "--region" , params .Region ,
181
+ "--preserve" ,
182
+ )
183
+ Expect (cmd ).To (RunSuccessfully ())
184
+
185
+ configMap := getConfigMap (rawClient .ClientSet (), "coredns" )
164
186
oldCacheValue := getCacheValue (configMap )
165
187
newCacheValue := addToString (oldCacheValue , 5 )
166
188
updateCacheValue (configMap , oldCacheValue , newCacheValue )
@@ -178,7 +200,7 @@ var _ = Describe("(Integration) [EKS Addons test]", func() {
178
200
data , err := json .Marshal (clusterConfig )
179
201
Expect (err ).NotTo (HaveOccurred ())
180
202
181
- cmd : = params .EksctlCreateCmd .
203
+ cmd = params .EksctlCreateCmd .
182
204
WithArgs (
183
205
"addon" ,
184
206
"--config-file" , "-" ,
0 commit comments