mirror of
https://github.com/fluxcd/flux2.git
synced 2026-02-08 00:37:27 +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:
parent
1f5961d2ad
commit
662f0d8cae
5 changed files with 5 additions and 5 deletions
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue