Skip to content

Commit ca30f63

Browse files
authored
use a list for IPs in subaltnames
1 parent 2ad087b commit ca30f63

File tree

1 file changed

+14
-15
lines changed

1 file changed

+14
-15
lines changed

test/suites/network/multi-nic.robot

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Verify MicroShift Runs Only On Primary NIC
4949
... configuration (without the secondary IP) and regenerates the
5050
... certificates, which will be lacking the IP from secondary NIC.
5151
52-
Configure Subject Alternative Name ${USHIFT_HOST_IP1} ${EMPTY}
52+
Configure Subject Alternative Name ${USHIFT_HOST_IP1}
5353

5454
Login Switch To IP ${USHIFT_HOST_IP1}
5555
Disable Interface ${NIC2_NAME}
@@ -68,7 +68,7 @@ Verify MicroShift Runs Only On Secondary NIC
6868
... be that of the secondary NIC, and certificates will be updated according
6969
... to the new configuration (which includes only the secondary IP).
7070
71-
Configure Subject Alternative Name ${USHIFT_HOST_IP2} ${EMPTY}
71+
Configure Subject Alternative Name ${USHIFT_HOST_IP2}
7272

7373
${cur_pid}= MicroShift Process ID
7474

@@ -174,21 +174,20 @@ Verify MicroShift On Single NIC
174174
Configure Subject Alternative Name
175175
[Documentation] Replace subjectAltNames entries in the configuration
176176
... to include the IPs provided
177-
[Arguments] ${ip_1} ${ip_2}
177+
[Arguments] @{ips}
178178

179-
IF '${ip_2}' == 'False'
180-
${subject_alt_names}= CATENATE SEPARATOR=\n
181-
... ---
182-
... apiServer:
183-
... \ \ subjectAltNames:
184-
... \ \ - ${ip_1}
185-
ELSE
179+
${ips_len}= Get Length ${ips}
180+
Should Be True '${ips_len}'>'0'
181+
182+
${subject_alt_names}= CATENATE SEPARATOR=\n
183+
... ---
184+
... apiServer:
185+
... \ \ subjectAltNames:
186+
187+
FOR ${ip} IN @{ips}
186188
${subject_alt_names}= CATENATE SEPARATOR=\n
187-
... ---
188-
... apiServer:
189-
... \ \ subjectAltNames:
190-
... \ \ - ${ip_1}
191-
... \ \ - ${ip_2}
189+
... ${subject_alt_names}
190+
... \ \ - ${ip}
192191
END
193192

194193
Drop In MicroShift Config ${subject_alt_names} 10-subjectAltNames

0 commit comments

Comments
 (0)