Skip to content

Commit 4b79414

Browse files
committed
minor fixes and changes
1 parent 3329286 commit 4b79414

File tree

5 files changed

+5
-9
lines changed

5 files changed

+5
-9
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ SHELL = /bin/bash
77
LDFLAGS=-ldflags "-w -s -X main.Version=${TAG}"
88

99

10-
build:
10+
build: test-unit
1111
go build -o mobile ./cmd/mobile
1212

1313
build_linux:

pkg/cmd/clients.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ package cmd
22

33
import (
44
"fmt"
5-
"strings"
65
"io"
6+
"strings"
77

88
"github.com/aerogear/mobile-cli/pkg/apis/mobile/v1alpha1"
99
mobile "github.com/aerogear/mobile-cli/pkg/client/mobile/clientset/versioned"
@@ -71,6 +71,7 @@ func (cc *ClientCmd) GetClientCmd() *cobra.Command {
7171
kubectl plugin mobile get client <clientID>
7272
oc plugin mobile get client <clientID>`,
7373
RunE: func(cmd *cobra.Command, args []string) error {
74+
fmt.Println(args, len(args))
7475
if len(args) != 1 {
7576
return errors.New("missing argument <clientID>")
7677
}

pkg/cmd/clients_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ func TestGetClient(t *testing.T) {
154154
ClientName: "",
155155
Flags: []string{"--namespace=myproject", "-o=json"},
156156
ExpectError: true,
157-
ErrorPattern: "^failed to get mobile client with clientID (\\w+)+:.*",
157+
ErrorPattern: "^missing argument .*",
158158
},
159159
}
160160
for _, tc := range cases {

pkg/cmd/services.go

+1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ func (sc *ServicesCmd) ListServicesCmd() *cobra.Command {
4141
Short: "get mobile aware services that can be provisioned to your namespace",
4242
RunE: func(cmd *cobra.Command, args []string) error {
4343
scList, err := sc.scClient.ServicecatalogV1beta1().ClusterServiceClasses().List(metav1.ListOptions{})
44+
fmt.Println("sclist", scList, err)
4445
if err != nil {
4546
return errors.Wrap(err, "failed to list service classes")
4647
}

pkg/cmd/services_test.go

-6
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,6 @@ func TestServicesCmd_ListServicesCmd(t *testing.T) {
8282
return fakeClient
8383
},
8484
ExpectError: true,
85-
Validate: func(t *testing.T, output []byte) {
86-
err := string(output)
87-
if err == "" {
88-
t.Fatal("expected an error message but got none")
89-
}
90-
},
9185
},
9286
}
9387

0 commit comments

Comments
 (0)