Skip to content

Commit aa88a63

Browse files
committed
Fix for the coredns configmap update: the corefile was not updated, even though a different cache size is set up in the test parameters.
1 parent 34c6438 commit aa88a63

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

dns/py/params.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,11 @@ def is_relevant(self, attributes):
160160
def set(self, inputs, value):
161161
if value > 0:
162162
cf = inputs.configmap_yaml['data']['Corefile']
163-
cfList = cf.decode().split("\n")
163+
# fix the cf type so that it works also for python3
164+
if(type(cf) == str):
165+
cfList = cf.split("\n")
166+
else:
167+
cfList = cf.decode().split("\n")
164168
cfList.insert(1,
165169
" cache {\n"
166170
" success " + repr(value) + "\n"

dns/py/runner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ def go(self):
124124
self._create(inputs.deployment_yaml)
125125
self._create(self.service_yaml)
126126
if self.configmap_yaml is not None:
127-
self._create(self.configmap_yaml)
127+
self._create(inputs.configmap_yaml)
128128
self._wait_for_status(True)
129129
test_threads=[]
130130
#Spawn off a thread to run the test case in each client pod simultaneously.

0 commit comments

Comments
 (0)