This is an automated email from the ASF dual-hosted git repository.

zhongxjian pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dubbo-kubernetes.git


The following commit(s) were added to refs/heads/master by this push:
     new 0c492234 [dubboctl] fix errors
0c492234 is described below

commit 0c492234b9b6b6f7afadc8ed950fc3dde9078eb7
Author: mfordjody <[email protected]>
AuthorDate: Tue Oct 29 21:24:50 2024 +0800

    [dubboctl] fix errors
---
 dubboctl/cmd/create_test.go     | 7 ++++---
 dubboctl/cmd/repository_test.go | 3 ++-
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/dubboctl/cmd/create_test.go b/dubboctl/cmd/create_test.go
index e21a4453..9ed795b1 100644
--- a/dubboctl/cmd/create_test.go
+++ b/dubboctl/cmd/create_test.go
@@ -17,6 +17,7 @@ package cmd
 
 import (
        "errors"
+       "github.com/apache/dubbo-kubernetes/dubboctl/pkg/deploy"
        "testing"
 )
 
@@ -44,7 +45,7 @@ func TestCreate_NoRuntime(t *testing.T) {
        cmd := GetRootCmd([]string{"create", "myfunc"})
 
        err := cmd.Execute()
-       var e ErrNoRuntime
+       var e deploy.ErrNoRuntime
        if !errors.As(err, &e) {
                t.Fatalf("Did not receive ErrNoRuntime. Got %v", err)
        }
@@ -58,7 +59,7 @@ func TestCreate_WithInvalidRuntime(t *testing.T) {
        cmd := GetRootCmd([]string{"create", "--language", "invalid", "myfunc"})
 
        err := cmd.Execute()
-       var e ErrInvalidRuntime
+       var e deploy.ErrInvalidRuntime
        if !errors.As(err, &e) {
                t.Fatalf("Did not receive ErrInvalidRuntime. Got %v", err)
        }
@@ -72,7 +73,7 @@ func TestCreate_InvalidTemplate(t *testing.T) {
        cmd := GetRootCmd([]string{"create", "--language", "go", "--template", 
"invalid", "myfunc"})
 
        err := cmd.Execute()
-       var e ErrInvalidTemplate
+       var e deploy.ErrInvalidTemplate
        if !errors.As(err, &e) {
                t.Fatalf("Did not receive ErrInvalidTemplate. Got %v", err)
        }
diff --git a/dubboctl/cmd/repository_test.go b/dubboctl/cmd/repository_test.go
index 169af733..751991e0 100644
--- a/dubboctl/cmd/repository_test.go
+++ b/dubboctl/cmd/repository_test.go
@@ -16,6 +16,7 @@
 package cmd
 
 import (
+       "github.com/apache/dubbo-kubernetes/dubboctl/pkg/deploy"
        "testing"
 )
 
@@ -25,7 +26,7 @@ import (
 func TestRepository_List(t *testing.T) {
        _ = fromTempDirectory(t)
 
-       cmd := NewRepositoryListCmd(NewClient)
+       cmd := deploy.NewRepositoryListCmd(deploy.NewClient)
        cmd.SetArgs([]string{}) // Do not use test command args
 
        // Execute the command, capturing the output sent to stdout

Reply via email to