Skip to content

Commit

Permalink
Fixed merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
vyasgun committed Jan 10, 2022
1 parent 1993a94 commit 84c7a4f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
3 changes: 1 addition & 2 deletions pkg/kn/commands/completion_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ var (
resourceToFuncMap = map[string]func(config *completionConfig) []string{
"service": completeService,
"revision": completeRevision,
"broker": completeBroker,
"broker": completeBroker,
}
)

Expand Down Expand Up @@ -126,7 +126,6 @@ func completeService(config *completionConfig) (suggestions []string) {
return
}


func completeBroker(config *completionConfig) (suggestions []string) {
suggestions = make([]string, 0)
if len(config.args) != 0 {
Expand Down
10 changes: 5 additions & 5 deletions pkg/kn/commands/completion_helper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,28 +121,28 @@ func initialiseKnParams() *KnParams {
}

var (
testRev1 = v12.Revision{
testRev1 = servingv1.Revision{
TypeMeta: metav1.TypeMeta{
Kind: "Revision",
APIVersion: "serving.knative.dev/v1",
},
ObjectMeta: metav1.ObjectMeta{Name: "test-rev-1", Namespace: testNs},
}
testRev2 = v12.Revision{
testRev2 = servingv1.Revision{
TypeMeta: metav1.TypeMeta{
Kind: "Revision",
APIVersion: "serving.knative.dev/v1",
},
ObjectMeta: metav1.ObjectMeta{Name: "test-rev-2", Namespace: testNs},
}
testRev3 = v12.Revision{
testRev3 = servingv1.Revision{
TypeMeta: metav1.TypeMeta{
Kind: "Revision",
APIVersion: "serving.knative.dev/v1",
},
ObjectMeta: metav1.ObjectMeta{Name: "test-rev-3", Namespace: testNs},
}
testNsRevs = []v12.Revision{testRev1, testRev2, testRev3}
testNsRevs = []servingv1.Revision{testRev1, testRev2, testRev3}
)

func TestResourceNameCompletionFuncService(t *testing.T) {
Expand Down Expand Up @@ -316,7 +316,7 @@ func TestResourceNameCompletionFuncRevision(t *testing.T) {
if a.GetNamespace() == errorNs {
return true, nil, errors.NewInternalError(fmt.Errorf("unable to list revisions"))
}
return true, &v12.RevisionList{Items: testNsRevs}, nil
return true, &servingv1.RevisionList{Items: testNsRevs}, nil
})

tests := []testType{
Expand Down

0 comments on commit 84c7a4f

Please sign in to comment.