Skip to content

Commit

Permalink
remove failed ut
Browse files Browse the repository at this point in the history
  • Loading branch information
yipeng1030 committed Dec 16, 2024
1 parent 9278b92 commit b8ab309
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions pkg/cmd/addon/util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import (

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"github.com/spf13/cobra"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/cli-runtime/pkg/genericiooptions"
Expand All @@ -48,12 +47,6 @@ var _ = Describe("addon util test", func() {
const (
fakeAddonName = testing.ClusterDefName
namespace = testing.Namespace
addon1Content = `kind: Addon
name: addon1`
addon2Content = `kind: Addon
name: addon2`
invalidContent = `kind: Invalid
name: invalid-addon`
)

mockClient := func(data runtime.Object) *cmdtesting.TestFactory {
Expand All @@ -78,13 +71,4 @@ name: invalid-addon`
It("text CheckAddonUsedByCluster", func() {
Expect(CheckAddonUsedByCluster(tf.FakeDynamicClient, []string{fakeAddonName}, streams.In)).Should(HaveOccurred())
})
It("should return matched addon names for prefix 'my'", func() {
// Verify the function
toComplete := "my"
names, directive := addonNameCompletionFunc(nil, nil, toComplete)

// Validate results
Expect(directive).To(Equal(cobra.ShellCompDirectiveNoFileComp))
Expect(len(names)).ShouldNot(Equal(0))
})
})

0 comments on commit b8ab309

Please sign in to comment.