-
Notifications
You must be signed in to change notification settings - Fork 230
USHIFT-3001: Add initial RF ipv6 tests #3658
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
42b4c45
USHIFT-3001: Add RF ipv6 tests
pacevedom bc85b72
USHIFT-3001: RF verify
pacevedom 59ca2eb
USHIFT-3001: Add single stack ipv6 scenario
pacevedom fa54718
USHIFT-3001: Enable nat mode in ipv6 network
pacevedom 9c45a71
USHIFT-3001: Add brackets for ipv6 in kubeconfig handling
pacevedom 1f8a18f
USHIFT-3001: Fix container mirror name resolution
pacevedom f354c79
USHIFT-3001: Force mirror usage in ipv6 tests
pacevedom 51f12bf
USHIFT-3001: Use special domain for router tests
pacevedom da5138b
USHIFT-3001: Check mDNS returns ipv6
pacevedom e3e4059
USHIFT-3001: RF format
pacevedom File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,28 @@ | ||
| #!/bin/bash | ||
|
|
||
| # Sourced from scenario.sh and uses functions defined there. | ||
|
|
||
| # Redefine network-related settings to use the dedicated network bridge | ||
| # shellcheck disable=SC2034 # used elsewhere | ||
| VM_BRIDGE_IP="$(get_vm_bridge_ip "${VM_IPV6_NETWORK}")" | ||
| # shellcheck disable=SC2034 # used elsewhere | ||
| WEB_SERVER_URL="http://[${VM_BRIDGE_IP}]:${WEB_SERVER_PORT}" | ||
| # shellcheck disable=SC2034 # used elsewhere | ||
| BOOTC_REGISTRY_URL="${VM_BRIDGE_IP}:5000" | ||
| # Redefine registry mirror. The redhat.registry.io does not resolve to | ||
| # ipv6 and the mirror is mandatory. | ||
| # shellcheck disable=SC2034 # used elsewhere | ||
| ENABLE_REGISTRY_MIRROR=true | ||
|
|
||
| scenario_create_vms() { | ||
| prepare_kickstart host1 kickstart.ks.template rhel-9.4-microshift-source | ||
| launch_vm host1 rhel-9.4 "${VM_IPV6_NETWORK}" | ||
| } | ||
|
|
||
| scenario_remove_vms() { | ||
| remove_vm host1 | ||
| } | ||
|
|
||
| scenario_run_tests() { | ||
| run_tests host1 suites/ipv6/singlestack.robot | ||
| } |
This file contains hidden or 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,104 @@ | ||
| *** Settings *** | ||
| Documentation Tests related to MicroShift running in an IPv6-only host | ||
|
|
||
| Resource ../../resources/common.resource | ||
| Resource ../../resources/oc.resource | ||
| Resource ../../resources/ostree-health.resource | ||
| Resource ../../resources/microshift-network.resource | ||
| Library ../../resources/libipv6.py | ||
|
|
||
| Suite Setup Setup | ||
| Suite Teardown Teardown | ||
|
|
||
| Test Tags ipv6 network | ||
|
|
||
|
|
||
| *** Variables *** | ||
| ${USHIFT_HOST} ${EMPTY} | ||
| ${HOSTNAME} hello-microshift.ipv6.cluster.local | ||
|
|
||
|
|
||
| *** Test Cases *** | ||
| Verify Router Serves IPv6 | ||
| [Documentation] Verify router is capable of serving ipv6 traffic. | ||
| [Setup] Run Keywords | ||
| ... Create Hello MicroShift Pod | ||
| ... Expose Hello MicroShift Service Via Route | ||
| ... Restart Router | ||
|
|
||
| Must Be Ipv6 ${USHIFT_HOST} | ||
| Wait Until Keyword Succeeds 10x 6s | ||
| ... Access Hello Microshift Success ushift_port=${HTTP_PORT} hostname=${HOSTNAME} | ||
|
|
||
| DNS Entry For Route Should Resolve | ||
|
|
||
| [Teardown] Run Keywords | ||
| ... Delete Hello MicroShift Route | ||
| ... Delete Hello MicroShift Pod And Service | ||
| ... Wait For Service Deletion With Timeout | ||
|
|
||
| Verify All Services Are Ipv6 | ||
| [Documentation] Check all services are running IPv6 only | ||
|
|
||
| All Services Are Ipv6 | ||
|
|
||
|
|
||
| *** Keywords *** | ||
| Setup | ||
| [Documentation] Test suite setup | ||
| Login MicroShift Host | ||
| Setup Suite With Namespace | ||
| Wait Until Greenboot Health Check Exited | ||
|
|
||
| Teardown | ||
| [Documentation] Test suite teardown | ||
| Logout MicroShift Host | ||
|
|
||
| Delete Hello MicroShift Route | ||
| [Documentation] Delete route for cleanup. | ||
| Oc Delete route/hello-microshift -n ${NAMESPACE} | ||
|
|
||
| Wait For Service Deletion With Timeout | ||
| [Documentation] Polls for service and endpoint by "app=hello-microshift" label. Fails if timeout | ||
| ... expires. This check is unique to this test suite because each test here reuses the same namespace. Since | ||
| ... the tests reuse the service name, a small race window exists between the teardown of one test and the setup | ||
| ... of the next. This produces flakey failures when the service or endpoint names collide. | ||
| Wait Until Keyword Succeeds 30s 1s | ||
| ... Network APIs With Test Label Are Gone | ||
|
|
||
| Expose Hello MicroShift Service Via Route | ||
| [Documentation] Expose the "hello microshift" application through the Route | ||
| Oc Expose pod hello-microshift -n ${NAMESPACE} | ||
| Oc Expose svc hello-microshift --hostname ${HOSTNAME} -n ${NAMESPACE} | ||
|
|
||
| Network APIs With Test Label Are Gone | ||
| [Documentation] Check for service and endpoint by "app=hello-microshift" label. Succeeds if response matches | ||
| ... "No resources found in <namespace> namespace." Fail if not. | ||
| ${match_string}= Catenate No resources found in ${NAMESPACE} namespace. | ||
| ${match_string}= Remove String ${match_string} " | ||
| ${response}= Run With Kubeconfig oc get svc,ep -l app\=hello-microshift -n ${NAMESPACE} | ||
| Should Be Equal As Strings ${match_string} ${response} strip_spaces=True | ||
|
|
||
| DNS Entry For Route Should Resolve | ||
| [Documentation] Resolve hello-microshift route via mDNS from the hypervisor/RF runner. | ||
| ... Expects RF runner host has opened port 5353 for libvirt zone. | ||
|
|
||
| ${result}= Run Process | ||
| ... avahi-resolve-host-name ${HOSTNAME} | ||
| ... shell=True | ||
| ... timeout=15s | ||
| Should Be Equal As Integers 0 ${result.rc} | ||
| Log Many ${result.stdout} ${result.stderr} | ||
| @{words}= Split String ${result.stdout} | ||
| Must Be Ipv6 ${words}[1] | ||
|
|
||
| Restart Router | ||
| [Documentation] Restart the router and wait for readiness again. The router is sensitive to apiserver | ||
| ... downtime and might need a restart (after the apiserver is ready) to resync all the routes. | ||
| Run With Kubeconfig oc rollout restart deployment router-default -n openshift-ingress | ||
| Named Deployment Should Be Available router-default openshift-ingress 5m | ||
|
|
||
| All Services Are Ipv6 | ||
| [Documentation] Retrieve all services and check none of them have an IPv4 family | ||
| ${response}= Run With Kubeconfig oc get svc -A -o jsonpath='{.items[*].spec.ipFamilies[*]}' | ||
| Should Not Contain ${response} IPv4 | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see it returned
hello-microshift.cluster.local 2001:db8:ca7:ff::1522. Do think it's possible to have a race condition with another test that would also exposehello-microshift.cluster.local?Should we check if the IP we got is indeed IPv6?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good points, did both.