-
Notifications
You must be signed in to change notification settings - Fork 197
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2294 from ggiguash/add_multi_nic_support
USHIFT-1605: Add multi nic scenario support and robot test
- Loading branch information
Showing
10 changed files
with
312 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
*** Settings *** | ||
Documentation Keywords for testing the MicroShift network | ||
Resource common.resource | ||
Library SSHLibrary | ||
|
||
|
||
*** Variables *** | ||
${HELLO_USHIFT} ./assets/hello-microshift.yaml | ||
${LB_PORT} 5678 | ||
${NP_PORT} 32222 | ||
${HTTP_PORT} 80 | ||
|
||
|
||
*** Keywords *** | ||
Create Hello MicroShift Pod | ||
[Documentation] Create a pod running the "hello microshift" application | ||
Oc Create -f ${HELLO_USHIFT} -n ${NAMESPACE} | ||
Oc Wait For pods -l app=hello-microshift condition\=Ready timeout=300s | ||
|
||
Expose Hello MicroShift Pod Via LB | ||
[Documentation] Expose the "hello microshift" application through the load balancer | ||
Run With Kubeconfig oc create service loadbalancer hello-microshift --tcp=${LB_PORT}:8080 -n ${NAMESPACE} | ||
|
||
Expose Hello MicroShift Pod Via NodePort | ||
[Documentation] Expose the "hello microshift" application through the NodePort | ||
Run With Kubeconfig | ||
... oc create service nodeport hello-microshift --node-port=${NP_PORT} --tcp=8080 -n ${NAMESPACE} | ||
|
||
Access Hello Microshift | ||
[Documentation] Try to retrieve data from the "hello microshift" service end point | ||
[Arguments] ${ushift_port} ${ushift_ip}=${USHIFT_HOST} | ||
|
||
${connect_to}= Set Variable "hello-microshift.cluster.local:${HTTP_PORT}:${ushift_ip}:${ushift_port}" | ||
|
||
${result}= Run Process | ||
... curl -i http://hello-microshift.cluster.local --connect-to ${connect_to} | ||
... shell=True | ||
... timeout=15s | ||
Log Many ${result.rc} ${result.stdout} ${result.stderr} | ||
Should Be Equal As Integers ${result.rc} 0 | ||
Should Match Regexp ${result.stdout} HTTP.*200 | ||
Should Match ${result.stdout} *Hello MicroShift* | ||
|
||
Verify Hello MicroShift LB | ||
[Documentation] Run Hello MicroShift Load Balancer verification | ||
Create Hello MicroShift Pod | ||
Expose Hello MicroShift Pod Via LB | ||
Wait Until Keyword Succeeds 30x 10s | ||
... Access Hello Microshift ${LB_PORT} | ||
|
||
[Teardown] Run Keywords | ||
... Delete Hello MicroShift Pod And Service | ||
|
||
Delete Hello MicroShift Pod And Service | ||
[Documentation] Delete service and pod for cleanup. | ||
Oc Delete service/hello-microshift -n ${NAMESPACE} | ||
Oc Delete -f ${HELLO_USHIFT} -n ${NAMESPACE} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/bash | ||
|
||
# Sourced from scenario.sh and uses functions defined there. | ||
|
||
scenario_create_vms() { | ||
prepare_kickstart host1 kickstart.ks.template rhel-9.2-microshift-source | ||
# Create a VM with 2 NICs | ||
launch_vm host1 "" "" "" "" "" 2 | ||
} | ||
|
||
scenario_remove_vms() { | ||
remove_vm host1 | ||
} | ||
|
||
scenario_run_tests() { | ||
local -r vmname=$(full_vm_name host1) | ||
local -r vm_ip1=$("${ROOTDIR}/scripts/devenv-builder/manage-vm.sh" ip -n "${vmname}" | head -1) | ||
local -r vm_ip2=$("${ROOTDIR}/scripts/devenv-builder/manage-vm.sh" ip -n "${vmname}" | tail -1) | ||
|
||
run_tests host1 \ | ||
--variable "USHIFT_HOST_IP1:${vm_ip1}" \ | ||
--variable "USHIFT_HOST_IP2:${vm_ip2}" \ | ||
suites/network/multi-nic.robot | ||
} |
File renamed without changes.
Oops, something went wrong.