Skip to content

Replace hardcoded namespace in KUTTL tests with $NAMESPACE variable#694

Merged
openshift-merge-bot[bot] merged 1 commit into
openstack-k8s-operators:mainfrom
abays:keystone_kuttl_ns_fix
Apr 22, 2026
Merged

Replace hardcoded namespace in KUTTL tests with $NAMESPACE variable#694
openshift-merge-bot[bot] merged 1 commit into
openstack-k8s-operators:mainfrom
abays:keystone_kuttl_ns_fix

Conversation

@abays
Copy link
Copy Markdown
Contributor

@abays abays commented Apr 22, 2026

KEYSTONE_KUTTL_NAMESPACE is user-configurable in install_yamls (via ?= assignment), but test scripts and asserts had "keystone-kuttl-tests" hardcoded in service hostnames, secret metadata, and databaseHostname assertions. Tests would fail when run with a non-default namespace.

Replace all hardcoded namespace references with the $NAMESPACE env var that KUTTL provides to test scripts. For databaseHostname validation, switch from static YAML asserts to script-based checks that dynamically construct the expected value.

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

KEYSTONE_KUTTL_NAMESPACE is user-configurable in install_yamls (via
?= assignment), but test scripts and asserts had "keystone-kuttl-tests"
hardcoded in service hostnames, secret metadata, and databaseHostname
assertions. Tests would fail when run with a non-default namespace.

Replace all hardcoded namespace references with the $NAMESPACE env var
that KUTTL provides to test scripts. For databaseHostname validation,
switch from static YAML asserts to script-based checks that dynamically
construct the expected value.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@abays abays requested review from Deydra71 and stuggi April 22, 2026 14:45
@openshift-ci openshift-ci Bot requested review from dmendiza and dprince April 22, 2026 14:45
Copy link
Copy Markdown
Contributor

@Deydra71 Deydra71 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Apr 22, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: abays, Deydra71

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot openshift-merge-bot Bot merged commit d957b84 into openstack-k8s-operators:main Apr 22, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants