carvel-dev / carvel-dev/kapp

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

Open Beginner friendly
#484 6 comments 1 reaction 0 assignees View on GitHub
carvel accepted cleanup good first issue
Dominant language
Go
Stars
1.1k
Forks
134
PR merge metrics
No merged PRs in 30d

Description

**What steps did you take:**
```bash
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
```bash
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](https://github.com/vmware-tanzu/carvel-kapp/blob/4efc4822852b4077de8a3e6d3887d67529ff30f6/test/e2e/annotations_test.go#L95) of hardcoded namespace.
We need to update the tests to use`env.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.

Contributor guide

Open the contributing guide

Research direction

Start with test/e2e/annotations_test.go, especially the referenced hardcoded namespace, and inspect the other e2e tests for the same value. Use hack/test-e2e.sh with a custom KAPP_E2E_NAMESPACE such as test-ns. Done means the e2e tests no longer require the namespace kapp-test and run successfully with the configured namespace.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes
Domain
devops, testing
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.