Skip to content
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

Run upstream NetPol e2e tests for UDN #4762

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions test/scripts/e2e-cp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ set -ex
export KUBERNETES_CONFORMANCE_TEST=y
export KUBECONFIG=${KUBECONFIG:-${HOME}/ovn.conf}

TMP_DIR="$(mktemp -d)"

# Skip tests which are not IPv6 ready yet (see description of https://github.com/ovn-org/ovn-kubernetes/pull/2276)
# (Note that netflow v5 is IPv4 only)
# NOTE: Some of these tests that check connectivity to internet cannot be run.
Expand Down Expand Up @@ -183,3 +185,38 @@ go test -test.timeout 180m -v . \
${NUM_NODES:+"--num-nodes=${NUM_NODES}"} \
${E2E_REPORT_DIR:+"--report-dir=${E2E_REPORT_DIR}"}
popd

if [[ "${WHAT}" == "${NETWORK_SEGMENTATION_TESTS}"* ]]; then
pushd "$TMP_DIR"
curl -L https://github.com/pperiyasamy/kubernetes/raw/netpol-udn-release-1.30/test/e2e/kubernetes-test-linux-amd64.tar.gz -o kubernetes-test-linux-amd64.tar.gz
tar xvzf kubernetes-test-linux-amd64.tar.gz
sudo mv e2e.test /usr/local/bin/e2e.test
rm kubernetes-test-linux-amd64.tar.gz
popd

export NUM_WORKER_NODES=3
if [ "$SINGLE_NODE_CLUSTER" == true ]; then
export NUM_WORKER_NODES=1
fi

# Run NetPol conformance tests for layer2 topology.
topologies=("layer2")
for topology in "${topologies[@]}"
do
# NetPol with named port is not supported in ovn-kubernetes, so skip those tests.
ginkgo --nodes=${NUM_NODES} \
--focus="Netpol" \
--skip="named port.+\[Feature:NetworkPolicy\]" \
--timeout=3h \
--flake-attempts="${FLAKE_ATTEMPTS:-2}" \
/usr/local/bin/e2e.test \
-- \
--kubeconfig="${KUBECONFIG}" \
--provider=local \
--dump-logs-on-failure=false \
--report-dir="${E2E_REPORT_DIR}" \
--disable-log-dump=true \
--num-nodes=${NUM_WORKER_NODES} \
--topology="${topology}"
done
fi
Loading