Skip to content

Commit

Permalink
test/e2e: Switch tests away from default namespace
Browse files Browse the repository at this point in the history
- Currently we are run e2e-test cases under a  namespace defined by
```
namespace := envconf.RandomName("default", 7)
```
The way that
[envconf.RandomName](https://pkg.go.dev/sigs.k8s.io/e2e-framework/pkg/envconf#RandomName)
works is to add random name after the prefix, up to the specified length.
As default is 7 chars long then envconf.RandomName("default", 7) will just return `default`.

- This means that we have a lot of duplicated code in
each test case that does nothing, so we should resolved this.

- It's also a good idea to have a single namespace for testing anyway,
like we;ve done in kata-containers,  as in case things fail and go wrong
it's easier to clean up by deleting the namespace, though
obviously `default` shouldn't be that namespace here.

- This PR adds a new shared namespace e2e-test across each test
run to address these.

Fixes: #1652

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
  • Loading branch information
stevenhorsman committed Jan 9, 2024
1 parent 7ba7e16 commit 381e887
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 63 deletions.
Loading

0 comments on commit 381e887

Please sign in to comment.