carvel-dev / kapp

kapp is a simple deployment tool focused on the concept of "Kubernetes application" — a set of resources with the same label

Home Page:https://carvel.dev/kapp

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

e2e tests should not have hardcoded namespace `kapp-test`

praveenrewar opened this issue · comments

What steps did you take:

export KAPP_E2E_NAMESPACE=test-ns
./hack/test-e2e.sh

What happened:
A few tests failed because they have hardcoded namespace kapp-test and hence require using a ns with the same name for running the e2e tests.

What did you expect:
Tests should have ran successfully.

Anything else you would like to add:
If we currently use

export KAPP_E2E_NAMESPACE=kapp-test
./hack/test-e2e.sh

the tests run successfully as the namespace from the environment variable matches with the hardcoded namespace
An example of hardcoded namespace.
We need to update the tests to useenv.Namespace instead of kapp-test so that setting any namespace as KAPP_E2E_NAMESPACE would work.

Environment:

  • kapp version (use kapp --version):
  • OS (e.g. from /etc/os-release):
  • Kubernetes version (use kubectl version)

Vote on this request

This is an invitation to the community to vote on issues, to help us prioritize our backlog. Use the "smiley face" up to the right of this comment to vote.

👍 "I would like to see this addressed as soon as possible"
👎 "There are other more important things to focus on right now"

We are also happy to receive and review Pull Requests if you want to help working on this issue.

This is a good improvement and I would like to take it up. To confirm, does this seek to address the hardcoded kapp-test namespace instances in annotations_test.go only?

This is a good improvement and I would like to take it up

@EdwinWalela Thanks a lot.

To confirm, does this seek to address the hardcoded kapp-test namespace instances in annotations_test.go only?

There are some e2e tests in other files as well, but all of them are in /test/e2e only. For example, this one is in app_filter_test.go

@praveenrewar The kapp-test namespace is hard coded here, yet the namespace is provided as an environment here. Could this cause the test to fail as well?

@EdwinWalela Yep, this is one example where the tests would fail if a different namespace is used for running the tests. I will add some more details to the description.

(Updated the description)

@praveenrewar Thanks for the update. I have submitted a PR to fix this issue. Let me know if there is something I have missed out :)

This issue is being marked as stale due to a long period of inactivity and will be closed in 5 days if there is no response.