1
0
mirror of synced 2026-02-06 19:05:55 +00:00

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:
Hidde Beydals
2023-02-15 13:56:55 +01:00
parent 1f5961d2ad
commit 662f0d8cae
5 changed files with 5 additions and 5 deletions

View File

@@ -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)
}

View File

@@ -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)
}

View File

@@ -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)
}

View File

@@ -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 {

View File

@@ -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)
}