Skip to content

Commit 1af07b3

Browse files
authored
fix bad dns agent test for ocp 4.16+ (#1661)
1 parent 3c655f4 commit 1af07b3

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

agent/06_agent_create_cluster.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,8 @@ function run_agent_test_cases() {
291291

292292
echo "Fixing DNS through agent-tui"
293293
# call script to fix DNS IP address on master-0
294-
./agent/e2e/agent-tui/test-fix-wrong-dns.sh $CLUSTER_NAME $PROVISIONING_HOST_EXTERNAL_IP
294+
local version="$(openshift_version ${OCP_DIR})"
295+
./agent/e2e/agent-tui/test-fix-wrong-dns.sh $CLUSTER_NAME $PROVISIONING_HOST_EXTERNAL_IP $version
295296

296297
echo "Finished fixing DNS through agent-tui"
297298
fi

agent/e2e/agent-tui/test-fix-wrong-dns.sh

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
#!/bin/bash
22

3+
source common.sh
4+
set +x
5+
36
CLUSTER_NAME=$1
47
GOOD_DNS_IP=$2
8+
OCP_VERSION=$3
59

610
### utils function for sending various keys and/or text to the console
711

@@ -124,7 +128,15 @@ pressEnter "Reactivate 'enp2s0'"
124128
sleep 3
125129
pressTab "Goto <Back> button" 2
126130
pressEnter "Select '<Back>' button'"
127-
pressDown "Select Quit" 2
131+
132+
# Since ocp 4.16, the nmtui has an additional menu entry "Radio" in the main panel
133+
# so it's necessary an additional step
134+
numStepsToQuit=2
135+
if ! is_lower_version "${OCP_VERSION}" "4.16"; then
136+
numStepsToQuit=3
137+
fi
138+
pressDown "Select Quit" ${numStepsToQuit}
139+
128140
pressEnter "Select 'Quit' menu item"
129141
pressEsc "Esc from network tree view"
130142
pressTab "Goto <Quit> button to exit agent-tui" 1

0 commit comments

Comments
 (0)