Skip to content
Open
Show file tree
Hide file tree
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
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[submodule "cnf-tests/submodules/metallb-operator"]
path = cnf-tests/submodules/metallb-operator
url = https://github.com/openshift/metallb-operator.git
[submodule "cnf-tests/submodules/sriov-network-operator"]
path = cnf-tests/submodules/sriov-network-operator
url = https://github.com/openshift/sriov-network-operator.git
Expand Down
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#TODO add default features here
export FEATURES?=sctp performance vrf container-mount-namespace metallb tuningcni bondcni knmstate
export FEATURES?=sctp performance vrf container-mount-namespace tuningcni bondcni knmstate
export SKIP_TESTS?=
export FOCUS_TESTS?=
export METALLB_OPERATOR_TARGET_COMMIT?=main
export SRIOV_NETWORK_OPERATOR_TARGET_COMMIT?=main
export CLUSTER_NODE_TUNING_OPERATOR_TARGET_COMMIT?=main
IMAGE_BUILD_CMD ?= "docker"
Expand Down
15 changes: 4 additions & 11 deletions cnf-tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,12 @@ Table of Contents

The conformance test suites verify that the operators we maintain are working properly on CNF-enabled clusters. The suites are "validationsuite", "configsuite", and "cnftests". The underlying Ginkgo test suites run by each suite can be found in the `TESTS_PATHS` variable in `hack/common.sh` in the root directory.

To prevent dependency conflicts, we use git submodules to store external repositories: `cluster-node-tuning-operator`, `metallb-operator`, and `sriov-network-operator`, in the path `cnf-tests/submodules`.
To prevent dependency conflicts, we use git submodules to store external repositories: `cluster-node-tuning-operator` and `sriov-network-operator`, in the path `cnf-tests/submodules`.


To specify the desired commit of the external repositories, we expose the following environment variables:

```
export METALLB_OPERATOR_TARGET_COMMIT?=main
export SRIOV_NETWORK_OPERATOR_TARGET_COMMIT?=main
export CLUSTER_NODE_TUNING_OPERATOR_TARGET_COMMIT?=main
```
Expand All @@ -40,7 +39,7 @@ We invoke the tests using the Ginkgo CLI tool.
**SKIP_TESTS**: Translates to the ginkgo skip flag.
**FEATURES** and **FOCUS_TESTS**: Translates to the ginkgo focus flag.
**GINKGO_PARAMS**: Provide any additional valid ginkgo parameters.
**EXTERNAL_SUITES**: Specifies which external test suites to run; options include: (integration/metallb/nto/sriov/nto-performance)
**EXTERNAL_SUITES**: Specifies which external test suites to run; options include: (integration/nto/sriov/nto-performance)
**TESTS_REPORTS_PATH**: Path where the test reports will be stored.
**FAIL_FAST**: Set to "true" to enable the ginkgo `--fail-fast` flag.
**TEST_SUITES**: : Set this if you want to focus on a specific suite; options are: (validationsuite/configsuite/cnftests)
Expand All @@ -60,7 +59,7 @@ We invoke the tests using the Ginkgo CLI tool.
- CLEAN_PERFORMANCE_PROFILE - disable performance profile cleanup for faster tests
- PERFORMANCE_PROFILE_MANIFEST_OVERRIDE - performance profile manifest override
- IPERF3_BITRATE_OVERRIDE - set a maximum bitrate for iperf3 to use in ovs_qos tests
- SKIP_LOCAL_RESOURCES - use default test resource of dependant test suites, using hardcoded defaults instead, needed to successfuly run the metallb e2e tests
- SKIP_LOCAL_RESOURCES - use default test resource of dependant test suites, using hardcoded defaults instead

## Test Reports

Expand All @@ -72,12 +71,6 @@ The tests produce two kinds of outputs, which are stored in the directory specif
├── junit_cnftests.xml
├── junit_setup.xml
├── junit_validation.xml
├── metallb_failure_report.log
│   └── metallb_MetalLB_deploy_should_have_frr-k8s_pods_in_running_state
│   ├── crs.log
│   ├── nodes.log
│   ├── openshift-metallb-system-pods_logs.log
│   └── openshift-metallb-system-pods_specs.log
├── setup_junit.xml
└── validation_junit.xml
```
Expand All @@ -88,7 +81,7 @@ A JUnit-compliant XML file is produced for each test suite: `junit_cnftests.xml`

### Test Failure Report

A report containing information about the cluster state (and resources) for troubleshooting is produced for each failed test. For example, if a test fails in the metallb suite, the logs are dumped into the following file: `metallb_failure_report.log`.
A report containing information about the cluster state (and resources) for troubleshooting is produced for each failed test.

## Gatekeeper

Expand Down
8 changes: 1 addition & 7 deletions cnf-tests/hack/init-git-submodules.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,14 @@ set -x
set -e

if [ -n "$TARGET_RELEASE" ]; then
METALLB_OPERATOR_TARGET_COMMIT="$TARGET_RELEASE"
SRIOV_NETWORK_OPERATOR_TARGET_COMMIT="$TARGET_RELEASE"
CLUSTER_NODE_TUNING_OPERATOR_TARGET_COMMIT="$TARGET_RELEASE"
fi

echo "metallb-operator target commit: ${METALLB_OPERATOR_TARGET_COMMIT}"
echo "sriov-operator target commit: ${SRIOV_NETWORK_OPERATOR_TARGET_COMMIT}"
echo "cluster-node-tuning-operator target commit: ${CLUSTER_NODE_TUNING_OPERATOR_TARGET_COMMIT}"

cd submodules/metallb-operator/
git fetch --all
git checkout origin/"${METALLB_OPERATOR_TARGET_COMMIT}"

cd ../sriov-network-operator/
cd submodules/sriov-network-operator/
git fetch --all
git checkout origin/"${SRIOV_NETWORK_OPERATOR_TARGET_COMMIT}"

Expand Down
1 change: 0 additions & 1 deletion cnf-tests/submodules/metallb-operator
Submodule metallb-operator deleted from fa9212
3 changes: 0 additions & 3 deletions cnf-tests/testsuites/pkg/namespaces/namespaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ var IntelOperator = "vran-acceleration-operators"
// SpecialResourceOperator is the namespace where the SRO is installed
var SpecialResourceOperator = "openshift-special-resource-operator"

// MetalLBOperator is the namespace where the MetalLB Operator is installed
var MetalLBOperator = "openshift-metallb-system"

// SroTestNamespace is the namespace where we run the oot driver builds as part of the sro testing
var SroTestNamespace = "oot-driver"

Expand Down
1 change: 0 additions & 1 deletion cnf-tests/testsuites/pkg/utils/reporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ func NewReporter(reportPath string) (*k8sreporter.KubernetesReporter, error) {
namespaces.SroTestNamespace: "sro",
namespaces.SroTestNamespace: "sro",
namespaces.BondTestNamespace: "bondcni",
namespaces.MetalLBOperator: "metallb",
namespaces.TuningTest: "tuningcni",
namespaces.Multus: "multus",
}
Expand Down
8 changes: 0 additions & 8 deletions feature-configs/ci/metallb/kustomization.yaml

This file was deleted.

10 changes: 0 additions & 10 deletions feature-configs/ci/metallb/operator_subscription.yaml

This file was deleted.

7 changes: 0 additions & 7 deletions feature-configs/deploy/metallb/kustomization.yaml

This file was deleted.

4 changes: 0 additions & 4 deletions feature-configs/deploy/metallb/operator_namespace.yaml

This file was deleted.

5 changes: 0 additions & 5 deletions feature-configs/deploy/metallb/operator_operatorgroup.yaml

This file was deleted.

10 changes: 0 additions & 10 deletions feature-configs/deploy/metallb/operator_subscription.yaml

This file was deleted.

8 changes: 0 additions & 8 deletions feature-configs/hypershift-ci/metallb/kustomization.yaml

This file was deleted.

10 changes: 0 additions & 10 deletions feature-configs/hypershift-ci/metallb/operator_subscription.yaml

This file was deleted.

6 changes: 0 additions & 6 deletions hack/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ export OPERATOR_VERSION="${OPERATOR_VERSION:-4.21}"
export GATEKEEPER_VERSION="${GATEKEEPER_VERSION:-v0.2.0}"
export SRO_VERSION="${SRO_VERSION:-4.11}"

# the metallb-operator deployment and test namespace
export OO_INSTALL_NAMESPACE="${OO_INSTALL_NAMESPACE:-openshift-metallb-system}"
export FRRK8S_EXTERNAL_NAMESPACE="${FRRK8S_EXTERNAL_NAMESPACE:-openshift-frr-k8s}"

export TESTS_REPORTS_PATH="${TESTS_REPORTS_PATH:-/logs/artifacts/}"
export JUNIT_TO_HTML="${JUNIT_TO_HTML:-false}"

Expand All @@ -38,9 +34,7 @@ export HYPERSHIFT_ENVIRONMENT="${HYPERSHIFT_ENVIRONMENT:-false}"
declare -A TESTS_PATHS=\
(["configsuite nto"]="cnf-tests/submodules/cluster-node-tuning-operator/test/e2e/performanceprofile/functests/0_config"\
["validationsuite integration"]="cnf-tests/testsuites/validationsuite"\
["validationsuite metallb"]="cnf-tests/submodules/metallb-operator/test/e2e/validation"\
["cnftests integration"]="cnf-tests/testsuites/e2esuite"\
["cnftests metallb"]="cnf-tests/submodules/metallb-operator/test/e2e/functional"\
["cnftests sriov"]="cnf-tests/submodules/sriov-network-operator/test/conformance"\
["cnftests nto-performance"]="cnf-tests/submodules/cluster-node-tuning-operator/test/e2e/performanceprofile/functests/1_performance")
export TESTS_PATHS
Expand Down
6 changes: 1 addition & 5 deletions hack/run-functests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@ export IS_OPENSHIFT="${IS_OPENSHIFT:-true}"
# https://github.com/k8snetworkplumbingwg/sriov-network-operator/pull/636
export MULTUS_NAMESPACE=openshift-multus

# The metallb tests cover both frr and frr-k8s, and we don't
# currently deploy frr-k8s mode
export BLACKLISTED_TESTS="frr-k8s"

# Map for the suites' junit report names
declare -A JUNIT_REPORT_NAME=( ["configsuite"]="junit_setup.xml" ["cnftests"]="junit_cnftests.xml" ["validationsuite"]="junit_validation.xml")

Expand Down Expand Up @@ -119,7 +115,7 @@ for step in "${steps[@]}"; do

get_current_commit "$step" "$external_suite"
echo "now testing $CURRENT_TEST"
EXEC_TESTS="ginkgo -tags=validationtests,e2etests $FAIL_FAST $SKIP --skip $BLACKLISTED_TESTS $FOCUS $GINKGO_PARAMS $REPORTERS $TEST_PATH -- -report=${TESTS_REPORTS_PATH}"
EXEC_TESTS="ginkgo -tags=validationtests,e2etests $FAIL_FAST $SKIP $FOCUS $GINKGO_PARAMS $REPORTERS $TEST_PATH -- -report=${TESTS_REPORTS_PATH}"
if ! $EXEC_TESTS; then
failed=true
failures+=( "Tier 2 tests for $external_suite" )
Expand Down
9 changes: 1 addition & 8 deletions hack/setup-build-index-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,6 @@ spec:
cd ../../..


git clone --single-branch --branch OPERATOR_RELEASES https://github.com/openshift/metallb-operator.git
cd metallb-operator
podman build -f bundleci.Dockerfile --tag image-registry.openshift-image-registry.svc:5000/openshift-marketplace/metallb-operator-bundle:latest .
podman push image-registry.openshift-image-registry.svc:5000/openshift-marketplace/metallb-operator-bundle:latest --tls-verify=false
cd ..


git clone --single-branch --branch GATEKEEPER_VERSION https://github.com/open-cluster-management/gatekeeper-operator.git
cd gatekeeper-operator
podman build -f bundle.Dockerfile --tag image-registry.openshift-image-registry.svc:5000/openshift-marketplace/gatekeeper-operator-bundle:latest .
Expand All @@ -135,7 +128,7 @@ spec:
podman push image-registry.openshift-image-registry.svc:5000/openshift-marketplace/kubernetes-nmstate-operator-bundle:latest --tls-verify=false
cd ..

./opm index --skip-tls add --bundles image-registry.openshift-image-registry.svc:5000/openshift-marketplace/sriov-operator-bundle:latest,image-registry.openshift-image-registry.svc:5000/openshift-marketplace/ptp-operator-bundle:latest,image-registry.openshift-image-registry.svc:5000/openshift-marketplace/special-resource-operator-bundle:latest,image-registry.openshift-image-registry.svc:5000/openshift-marketplace/cluster-nfd-operator-bundle:latest,image-registry.openshift-image-registry.svc:5000/openshift-marketplace/metallb-operator-bundle:latest,image-registry.openshift-image-registry.svc:5000/openshift-marketplace/gatekeeper-operator-bundle:latest,image-registry.openshift-image-registry.svc:5000/openshift-marketplace/kubernetes-nmstate-operator-bundle:latest --tag image-registry.openshift-image-registry.svc:5000/openshift-marketplace/ci-index:latest -p podman --mode semver
./opm index --skip-tls add --bundles image-registry.openshift-image-registry.svc:5000/openshift-marketplace/sriov-operator-bundle:latest,image-registry.openshift-image-registry.svc:5000/openshift-marketplace/ptp-operator-bundle:latest,image-registry.openshift-image-registry.svc:5000/openshift-marketplace/special-resource-operator-bundle:latest,image-registry.openshift-image-registry.svc:5000/openshift-marketplace/cluster-nfd-operator-bundle:latest,image-registry.openshift-image-registry.svc:5000/openshift-marketplace/gatekeeper-operator-bundle:latest,image-registry.openshift-image-registry.svc:5000/openshift-marketplace/kubernetes-nmstate-operator-bundle:latest --tag image-registry.openshift-image-registry.svc:5000/openshift-marketplace/ci-index:latest -p podman --mode semver
podman push image-registry.openshift-image-registry.svc:5000/openshift-marketplace/ci-index:latest --tls-verify=false
securityContext:
privileged: true
Expand Down