forked from openshift/kubernetes-nmstate
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
UPSTREAM: <carry>: Add ocp-e2e-tests script
When running the e2e tests on OCP, we need to do some things slightly different. This adds a script and the necessary files to do so.
- Loading branch information
Showing
3 changed files
with
40 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/bin/bash | ||
|
||
# Make sure to set the IMAGE_REPO env variable to your quay.io username | ||
# before running this script. | ||
|
||
# Additionally, the e2e tests rely on extra nics being configured on the | ||
# node. If running from dev-scripts, it will be necessary to configure it to | ||
# deploy the extra nics. | ||
# See https://github.com/openshift-metal3/dev-scripts/pull/1286 for an example. | ||
|
||
set -ex | ||
|
||
export KUBEVIRT_PROVIDER=external | ||
export IMAGE_BUILDER=podman | ||
export DEV_IMAGE_REGISTRY=quay.io | ||
export KUBEVIRTCI_RUNTIME=podman | ||
export SSH=./hack/ssh.sh | ||
export PRIMARY_NIC=enp2s0 | ||
export FIRST_SECONDARY_NIC=enp3s0 | ||
export SECOND_SECONDARY_NIC=enp4s0 | ||
|
||
make cluster-sync-operator | ||
# Will fail on subsequent runs, this is fine. | ||
oc create -f build/_output/manifests/scc.yaml || : | ||
oc create -f test/e2e/nmstate.yaml | ||
# On first deployment, it can take a while for all of the pods to come up | ||
# First wait for the handler pods to be created | ||
while ! oc get pods -n nmstate | grep handler; do sleep 1; done | ||
# Then wait for them to be ready | ||
while oc get pods -n nmstate | grep "0/1"; do sleep 1; done | ||
# NOTE(bnemec): The test being filtered with "bridged" was re-enabled in 4.8, but seems to be consistently failing on OCP. | ||
make test-e2e-handler E2E_TEST_ARGS="--skip=user-guide --skip=bridged" E2E_TEST_TIMEOUT=120m |
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,4 @@ | ||
#!/bin/bash | ||
node_name=${1} | ||
node_ip=$(oc get node ${node_name} --no-headers -o wide | awk '{print $6}') | ||
ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null core@${node_ip} -- ${@:3} |
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,4 @@ | ||
apiVersion: nmstate.io/v1beta1 | ||
kind: NMState | ||
metadata: | ||
name: nmstate |