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

Add functionality for running against local CRC instances #1843

Merged

Conversation

sebrandon1
Copy link
Member

https://developers.redhat.com/products/openshift-local/overview

If you are running an instance of OpenShift Local (formerly CodeReady Containers) on your local machine and want to run the containerized version of the test suite against it, you have to use --add-host for the container to be able reach the apiserver correctly.

@sebrandon1 sebrandon1 self-assigned this Jan 26, 2024
@dcibot
Copy link
Collaborator

dcibot commented Jan 26, 2024

Comment on lines +163 to +166
if [ -n "${TNF_ENABLE_CRC_TESTING}" ]; then
ADD_HOST_ARG="--add-host api.crc.testing:host-gateway"
fi

Copy link
Member

@rdavid rdavid Jan 26, 2024

Choose a reason for hiding this comment

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

Suggested change
if [ -n "${TNF_ENABLE_CRC_TESTING}" ]; then
ADD_HOST_ARG="--add-host api.crc.testing:host-gateway"
fi
ADD_HOST_ARG="${TNF_ENABLE_CRC_TESTING:+--add-host api.crc.testing:host-gateway}"

ADD_HOST_ARG will be assigned --add... value if TNF_ENABLE_CRC_TESTING is set, otherwise ''. Currently if TNF_ENABLE_CRC_TESTING is unset $ADD_HOST_ARG fails when executed with set -o nounset, which is recommended. This can be addressed in a separate pull request for all variables.

@sebrandon1
Copy link
Member Author

Let's just adjust what you suggested for all of the other similar instances above in another PR.

@sebrandon1 sebrandon1 merged commit 74135ce into redhat-best-practices-for-k8s:main Jan 29, 2024
19 checks passed
@sebrandon1 sebrandon1 deleted the add_crc_support branch January 29, 2024 15:58
@dcibot
Copy link
Collaborator

dcibot commented Jan 29, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants