diff --git a/pkg/kuttlctl/cmd/test.go b/pkg/kuttlctl/cmd/test.go index 52549e64..c62b99d0 100644 --- a/pkg/kuttlctl/cmd/test.go +++ b/pkg/kuttlctl/cmd/test.go @@ -71,7 +71,7 @@ The test operator supports connecting to an existing Kubernetes cluster or it ca It can also apply manifests before running the tests. If no arguments are provided, the test harness will attempt to load the test configuration from kuttl-test.yaml. -For more detailed documentation, visit: https://kudo.dev/docs/testing`, +For more detailed documentation, visit: https://kuttl.dev`, Example: testExample, PreRunE: func(cmd *cobra.Command, args []string) error { flags := cmd.Flags() diff --git a/pkg/test/case.go b/pkg/test/case.go index 4a5f2f9d..611965e1 100644 --- a/pkg/test/case.go +++ b/pkg/test/case.go @@ -250,7 +250,7 @@ func (t *Case) determineNamespace() *namespace { } // no preferred ns, means we auto-create with petnames if t.PreferredNamespace == "" { - ns.Name = fmt.Sprintf("kudo-test-%s", petname.Generate(2, "-")) + ns.Name = fmt.Sprintf("kuttl-test-%s", petname.Generate(2, "-")) ns.AutoCreated = true } // if we have a preferred namespace, we do NOT auto-create diff --git a/pkg/test/step_integration_test.go b/pkg/test/step_integration_test.go index c4967cc2..a9ddaa6d 100644 --- a/pkg/test/step_integration_test.go +++ b/pkg/test/step_integration_test.go @@ -232,7 +232,7 @@ func TestCheckResourceIntegration(t *testing.T) { }, } { t.Run(test.testName, func(t *testing.T) { - namespace := fmt.Sprintf("kudo-test-%s", petname.Generate(2, "-")) + namespace := fmt.Sprintf("kuttl-test-%s", petname.Generate(2, "-")) err := testenv.Client.Create(context.TODO(), testutils.NewResource("v1", "Namespace", namespace, "")) if !k8serrors.IsAlreadyExists(err) { @@ -404,7 +404,7 @@ func TestStepFailure(t *testing.T) { }, } - namespace := fmt.Sprintf("kudo-test-%s", petname.Generate(2, "-")) + namespace := fmt.Sprintf("kuttl-test-%s", petname.Generate(2, "-")) err := testenv.Client.Create(context.TODO(), testutils.NewResource("v1", "Namespace", namespace, "")) if !k8serrors.IsAlreadyExists(err) { diff --git a/pkg/test/utils/kubernetes.go b/pkg/test/utils/kubernetes.go index 8aa3f42c..def71305 100644 --- a/pkg/test/utils/kubernetes.go +++ b/pkg/test/utils/kubernetes.go @@ -392,6 +392,9 @@ func ConvertUnstructured(in runtime.Object) (runtime.Object, error) { // Deprecated: kudo.dev is deprecated. kudoGroup := "kudo.dev" kuttlGroup := "kuttl.dev" + if group == kudoGroup { + log.Print("WARNING: kudo.dev group has been deprecated and is schedule to be removed in KUTTL 0.8.0") + } if (group == kudoGroup || group == kuttlGroup) && kind == "TestStep" { converted = &harness.TestStep{} } else if (group == kudoGroup || group == kuttlGroup) && kind == "TestAssert" { @@ -1043,10 +1046,10 @@ func RunCommand(ctx context.Context, namespace string, cmd harness.Command, cwd return nil, fmt.Errorf("command %q with %w", cmd.Command, err) } - kudoENV := make(map[string]string) - kudoENV["NAMESPACE"] = namespace - kudoENV["KUBECONFIG"] = fmt.Sprintf("%s/kubeconfig", actualDir) - kudoENV["PATH"] = fmt.Sprintf("%s/bin/:%s", actualDir, os.Getenv("PATH")) + kuttlENV := make(map[string]string) + kuttlENV["NAMESPACE"] = namespace + kuttlENV["KUBECONFIG"] = fmt.Sprintf("%s/kubeconfig", actualDir) + kuttlENV["PATH"] = fmt.Sprintf("%s/bin/:%s", actualDir, os.Getenv("PATH")) // by default testsuite timeout is the command timeout // 0 is allowed for testsuite which means forever (or no timeout) @@ -1070,7 +1073,7 @@ func RunCommand(ctx context.Context, namespace string, cmd harness.Command, cwd defer cancel() } - builtCmd, err := GetArgs(cmdCtx, cmd, namespace, kudoENV) + builtCmd, err := GetArgs(cmdCtx, cmd, namespace, kuttlENV) if err != nil { return nil, fmt.Errorf("processing command %q with %w", cmd.Command, err) } @@ -1083,7 +1086,7 @@ func RunCommand(ctx context.Context, namespace string, cmd harness.Command, cwd builtCmd.Stderr = stderr } builtCmd.Env = os.Environ() - for key, value := range kudoENV { + for key, value := range kuttlENV { builtCmd.Env = append(builtCmd.Env, fmt.Sprintf("%s=%s", key, value)) }