tests: rename "kubectl" setupTestNamespace
As the other version has a different signature, but exists for a different build tag. Resulting in my IDE becoming absolutely confused when I tried to enable both at the same time. Opted for "exec" because this one shells out. Signed-off-by: Hidde Beydals <hello@hidde.co>
This commit is contained in:
@@ -23,7 +23,7 @@ import "testing"
|
||||
|
||||
func TestHelmReleaseFromGit(t *testing.T) {
|
||||
namespace := allocateNamespace("thrfg")
|
||||
del, err := setupTestNamespace(namespace)
|
||||
del, err := execSetupTestNamespace(namespace)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ import "testing"
|
||||
|
||||
func TestImageScanning(t *testing.T) {
|
||||
namespace := allocateNamespace("tis")
|
||||
del, err := setupTestNamespace(namespace)
|
||||
del, err := execSetupTestNamespace(namespace)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ import "testing"
|
||||
|
||||
func TestKustomizationFromGit(t *testing.T) {
|
||||
namespace := allocateNamespace("tkfg")
|
||||
del, err := setupTestNamespace(namespace)
|
||||
del, err := execSetupTestNamespace(namespace)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ func TestMain(m *testing.M) {
|
||||
os.Exit(code)
|
||||
}
|
||||
|
||||
func setupTestNamespace(namespace string) (func(), error) {
|
||||
func execSetupTestNamespace(namespace string) (func(), error) {
|
||||
kubectlArgs := []string{"create", "namespace", namespace}
|
||||
_, err := utils.ExecKubectlCommand(context.TODO(), utils.ModeStderrOS, *kubeconfigArgs.KubeConfig, *kubeconfigArgs.Context, kubectlArgs...)
|
||||
if err != nil {
|
||||
|
||||
@@ -25,7 +25,7 @@ import (
|
||||
|
||||
func TestSourceOCI(t *testing.T) {
|
||||
namespace := allocateNamespace("oci-test")
|
||||
del, err := setupTestNamespace(namespace)
|
||||
del, err := execSetupTestNamespace(namespace)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user