Skip to content
Merged
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
7 changes: 1 addition & 6 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,7 @@ jobs:

- name: Run e2e tests
run: |
if [[ "${{ matrix.name }}" != "gazpacho" ]]; then
echo "Skip limit import tests due to Keystone API issue(list limit) in older versions"
rm -rf internal/controllers/limit/tests/limit-import*
fi

make test-e2e
make test-e2e E2E_OPENSTACK_VERSION=$(echo ${{ matrix.openstack_version }} | cut -d/ -f2)
make test-examples

- name: Generate logs on failure
Expand Down
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,9 @@ test: envtest
# run. If not set, all discovered kuttl tests will run.
# - E2E_KUTTL_TEST: if set, only run the specific named test, e.g.
# 'create-full-v4'. If not set, all tests will run.
# - E2E_OPENSTACK_VERSION: if set, the known OpenStack versions range covering
# this version will be passed as a test run label `--test-run-labels min-version1=true,min-version2=true,max-version2=true,max-version3=true,`.
# See ./hack/e2e.sh . Test cases can be run/skipped with `testRunSelector` in `TestCase` based on it.
.PHONY: test-e2e # Run the e2e tests against a Kind k8s instance that is spun up.
test-e2e: kuttl
# go test ./test/e2e/ -v -ginkgo.v
Expand Down Expand Up @@ -333,7 +336,7 @@ CONTROLLER_TOOLS_VERSION ?= v0.20.1
ENVTEST_VERSION ?= release-0.23
GOLANGCI_LINT_VERSION ?= v2.11.4
MOCKGEN_VERSION ?= v0.6.0
KUTTL_VERSION ?= v0.27.0
KUTTL_VERSION ?= v0.28.0
GOVULNCHECK_VERSION ?= v1.1.4
OPERATOR_SDK_VERSION ?= v1.42.2

Expand Down
31 changes: 30 additions & 1 deletion hack/e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,39 @@ if [ -n "$E2E_KUTTL_DELETE_OPTION" ]; then
E2E_KUTTL_DELETE_OPT="--delete ${E2E_KUTTL_DELETE_OPTION}"
fi

# Add the OpenStack version to the test run labels if it is set.
# https://releases.openstack.org/
# 2027.1 Indri
# 2026.2 Hibiscus
# 2026.1 Gazpacho
# 2025.2 Flamingo
# 2025.1 Epoxy
KNOWN_RELEASES=("2025.1" "2025.2" "2026.1" "2026.2" "2027.1")
E2E_KUTTL_TEST_RUN_LABELS=
if [ -n "${E2E_OPENSTACK_VERSION:-}" ]; then
OS_RELEASE="$E2E_OPENSTACK_VERSION"
labels=
Comment thread
mandre marked this conversation as resolved.
Resolved

for release in "${KNOWN_RELEASES[@]}"; do
if [[ ! "$OS_RELEASE" < "$release" ]]; then
labels="${labels:+$labels,}min-${release}=true"
fi
if [[ ! "$OS_RELEASE" > "$release" ]]; then
labels="${labels:+$labels,}max-${release}=true"
fi
done

if [ -n "$labels" ]; then
E2E_KUTTL_TEST_RUN_LABELS="--test-run-labels $labels"
fi
fi

# Export variables referenced in kuttl tests.
export E2E_EXTERNAL_NETWORK_NAME
export E2E_KUTTL_OSCLOUDS=${PREPARED_OSCLOUDS}
export E2E_KUTTL_CACERT_OPT
export E2E_KUTTL_FLAVOR

kubectl kuttl test $E2E_KUTTL_DIR $E2E_KUTTL_TIMEOUT_OPT $E2E_KUTTL_DELETE_OPT --test "$E2E_KUTTL_TEST"
set -x
kubectl kuttl test $E2E_KUTTL_DIR $E2E_KUTTL_TIMEOUT_OPT $E2E_KUTTL_DELETE_OPT $E2E_KUTTL_TEST_RUN_LABELS --test "$E2E_KUTTL_TEST"
set +x
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Skip limit import tests due to a Keystone API issue (list limit) in older versions
apiVersion: kuttl.dev/v1beta1
kind: TestCase
testRunSelector:
matchExpressions:
- key: "max-2025.2"
operator: NotIn
values:
- "true"
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Skip limit import tests due to a Keystone API issue (list limit) in older versions
apiVersion: kuttl.dev/v1beta1
kind: TestCase
testRunSelector:
matchExpressions:
- key: "max-2025.2"
operator: NotIn
values:
- "true"
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Skip limit import tests due to a Keystone API issue (list limit) in older versions
apiVersion: kuttl.dev/v1beta1
kind: TestCase
testRunSelector:
matchExpressions:
- key: "max-2025.2"
operator: NotIn
values:
- "true"
Loading