File tree 5 files changed +5
-9
lines changed
5 files changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ SHELL = /bin/bash
7
7
LDFLAGS =-ldflags "-w -s -X main.Version=${TAG}"
8
8
9
9
10
- build :
10
+ build : test-unit
11
11
go build -o mobile ./cmd/mobile
12
12
13
13
build_linux :
Original file line number Diff line number Diff line change @@ -2,8 +2,8 @@ package cmd
2
2
3
3
import (
4
4
"fmt"
5
- "strings"
6
5
"io"
6
+ "strings"
7
7
8
8
"github.com/aerogear/mobile-cli/pkg/apis/mobile/v1alpha1"
9
9
mobile "github.com/aerogear/mobile-cli/pkg/client/mobile/clientset/versioned"
@@ -71,6 +71,7 @@ func (cc *ClientCmd) GetClientCmd() *cobra.Command {
71
71
kubectl plugin mobile get client <clientID>
72
72
oc plugin mobile get client <clientID>` ,
73
73
RunE : func (cmd * cobra.Command , args []string ) error {
74
+ fmt .Println (args , len (args ))
74
75
if len (args ) != 1 {
75
76
return errors .New ("missing argument <clientID>" )
76
77
}
Original file line number Diff line number Diff line change @@ -154,7 +154,7 @@ func TestGetClient(t *testing.T) {
154
154
ClientName : "" ,
155
155
Flags : []string {"--namespace=myproject" , "-o=json" },
156
156
ExpectError : true ,
157
- ErrorPattern : "^failed to get mobile client with clientID ( \\ w+)+: .*" ,
157
+ ErrorPattern : "^missing argument .*" ,
158
158
},
159
159
}
160
160
for _ , tc := range cases {
Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ func (sc *ServicesCmd) ListServicesCmd() *cobra.Command {
41
41
Short : "get mobile aware services that can be provisioned to your namespace" ,
42
42
RunE : func (cmd * cobra.Command , args []string ) error {
43
43
scList , err := sc .scClient .ServicecatalogV1beta1 ().ClusterServiceClasses ().List (metav1.ListOptions {})
44
+ fmt .Println ("sclist" , scList , err )
44
45
if err != nil {
45
46
return errors .Wrap (err , "failed to list service classes" )
46
47
}
Original file line number Diff line number Diff line change @@ -82,12 +82,6 @@ func TestServicesCmd_ListServicesCmd(t *testing.T) {
82
82
return fakeClient
83
83
},
84
84
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
- },
91
85
},
92
86
}
93
87
You can’t perform that action at this time.
0 commit comments