Skip to content

Commit 23de5a3

Browse files
neerajmangalrabbah
authored andcommitted
"wsk property get" can now return raw output for specific properties (#430)
1 parent 8861d4b commit 23de5a3

7 files changed

Lines changed: 153 additions & 77 deletions

File tree

commands/flags.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ type FlagsStruct struct {
8484
apihostSet string
8585
apiversionSet string
8686
namespaceSet string
87+
output string
8788
}
8889

8990
action ActionFlags

commands/property.go

Lines changed: 107 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import (
2323
"os"
2424

2525
"github.com/fatih/color"
26-
"github.com/mitchellh/go-homedir"
26+
homedir "github.com/mitchellh/go-homedir"
2727
"github.com/spf13/cobra"
2828

2929
"github.com/apache/incubator-openwhisk-cli/wski18n"
@@ -53,6 +53,18 @@ const DefaultAPIBuildNo string = ""
5353
const DefaultNamespace string = "_"
5454
const DefaultPropsFile string = "~/.wskprops"
5555

56+
const (
57+
propDisplayCert = "client cert"
58+
propDisplayKey = "Client key"
59+
propDisplayAuth = "whisk auth"
60+
propDisplayAPIHost = "whisk API host"
61+
propDisplayAPIVersion = "whisk API version"
62+
propDisplayNamespace = "whisk namespace"
63+
propDisplayCLIVersion = "whisk CLI version"
64+
propDisplayAPIBuild = "whisk API build"
65+
propDisplayAPIBuildNo = "whisk API build number"
66+
)
67+
5668
var propertyCmd = &cobra.Command{
5769
Use: "property",
5870
Short: wski18n.T("work with whisk properties"),
@@ -287,6 +299,22 @@ var propertyGetCmd = &cobra.Command{
287299
PreRunE: SetupClientConfig,
288300
RunE: func(cmd *cobra.Command, args []string) error {
289301

302+
var outputFormat string = "std"
303+
if Flags.property.output != "std" {
304+
switch Flags.property.output {
305+
case "raw":
306+
outputFormat = "raw"
307+
break
308+
//case "json": For future implementation
309+
//case "yaml": For future implementation
310+
default:
311+
errStr := fmt.Sprintf(
312+
wski18n.T("Supported output format are std|raw"))
313+
werr := whisk.MakeWskErrorFromWskError(errors.New(errStr), nil, whisk.EXIT_CODE_ERR_GENERAL, whisk.DISPLAY_MSG, whisk.NO_DISPLAY_USAGE)
314+
return werr
315+
}
316+
}
317+
290318
// If no property is explicitly specified, default to all properties
291319
if !(Flags.property.all || Flags.property.cert ||
292320
Flags.property.key || Flags.property.auth ||
@@ -295,33 +323,44 @@ var propertyGetCmd = &cobra.Command{
295323
Flags.property.apihost || Flags.property.apibuildno) {
296324
Flags.property.all = true
297325
}
326+
if Flags.property.all {
327+
// Currently with all only standard output format is supported.
328+
if outputFormat != "std" {
329+
errStr := fmt.Sprintf(
330+
wski18n.T("--output|-o raw only supported with specific property type"))
331+
werr := whisk.MakeWskErrorFromWskError(errors.New(errStr), nil, whisk.EXIT_CODE_ERR_GENERAL, whisk.DISPLAY_MSG, whisk.NO_DISPLAY_USAGE)
332+
return werr
333+
}
298334

299-
if Flags.property.all || Flags.property.cert {
300-
fmt.Fprintf(color.Output, "%s\t\t%s\n", wski18n.T("client cert"), boldString(Properties.Cert))
301-
}
302-
303-
if Flags.property.all || Flags.property.key {
304-
fmt.Fprintf(color.Output, "%s\t\t%s\n", wski18n.T("Client key"), boldString(Properties.Key))
305-
}
306-
307-
if Flags.property.all || Flags.property.auth {
308-
fmt.Fprintf(color.Output, "%s\t\t%s\n", wski18n.T("whisk auth"), boldString(Properties.Auth))
309-
}
310-
311-
if Flags.property.all || Flags.property.apihost {
312-
fmt.Fprintf(color.Output, "%s\t\t%s\n", wski18n.T("whisk API host"), boldString(Properties.APIHost))
313-
}
314-
315-
if Flags.property.all || Flags.property.apiversion {
316-
fmt.Fprintf(color.Output, "%s\t%s\n", wski18n.T("whisk API version"), boldString(Properties.APIVersion))
317-
}
318-
319-
if Flags.property.all || Flags.property.namespace {
320-
fmt.Fprintf(color.Output, "%s\t\t%s\n", wski18n.T("whisk namespace"), boldString(Properties.Namespace))
321-
}
322-
323-
if Flags.property.all || Flags.property.cliversion {
324-
fmt.Fprintf(color.Output, "%s\t%s\n", wski18n.T("whisk CLI version"), boldString(Properties.CLIVersion))
335+
fmt.Fprintf(color.Output, "%s\t\t%s\n", wski18n.T(propDisplayCert), boldString(Properties.Cert))
336+
fmt.Fprintf(color.Output, "%s\t\t%s\n", wski18n.T(propDisplayKey), boldString(Properties.Key))
337+
fmt.Fprintf(color.Output, "%s\t\t%s\n", wski18n.T(propDisplayAuth), boldString(Properties.Auth))
338+
fmt.Fprintf(color.Output, "%s\t\t%s\n", wski18n.T(propDisplayAPIHost), boldString(Properties.APIHost))
339+
fmt.Fprintf(color.Output, "%s\t%s\n", wski18n.T(propDisplayAPIVersion), boldString(Properties.APIVersion))
340+
fmt.Fprintf(color.Output, "%s\t\t%s\n", wski18n.T(propDisplayNamespace), boldString(Properties.Namespace))
341+
fmt.Fprintf(color.Output, "%s\t%s\n", wski18n.T(propDisplayCLIVersion), boldString(Properties.CLIVersion))
342+
} else {
343+
if Flags.property.cert {
344+
printProperty(Properties.Cert, propDisplayCert, outputFormat)
345+
}
346+
if Flags.property.key {
347+
printProperty(Properties.Key, propDisplayKey, outputFormat)
348+
}
349+
if Flags.property.cliversion {
350+
printProperty(Properties.CLIVersion, propDisplayCLIVersion, outputFormat, "%s\t%s\n")
351+
}
352+
if Flags.property.apihost {
353+
printProperty(Properties.APIHost, propDisplayAPIHost, outputFormat)
354+
}
355+
if Flags.property.auth {
356+
printProperty(Properties.Auth, propDisplayAuth, outputFormat)
357+
}
358+
if Flags.property.apiversion {
359+
printProperty(Properties.APIVersion, propDisplayAPIVersion, outputFormat, "%s\t%s\n")
360+
}
361+
if Flags.property.namespace {
362+
printProperty(Properties.Namespace, propDisplayNamespace, outputFormat)
363+
}
325364
}
326365

327366
if Flags.property.all || Flags.property.apibuild || Flags.property.apibuildno {
@@ -332,11 +371,15 @@ var propertyGetCmd = &cobra.Command{
332371
info.Build = wski18n.T("Unknown")
333372
info.BuildNo = wski18n.T("Unknown")
334373
}
335-
if Flags.property.all || Flags.property.apibuild {
336-
fmt.Fprintf(color.Output, "%s\t\t%s\n", wski18n.T("whisk API build"), boldString(info.Build))
374+
if Flags.property.all {
375+
fmt.Fprintf(color.Output, "%s\t\t%s\n", wski18n.T(propDisplayAPIBuild), boldString(info.Build))
376+
fmt.Fprintf(color.Output, "%s\t%s\n", wski18n.T(propDisplayAPIBuildNo), boldString(info.BuildNo))
377+
}
378+
if Flags.property.apibuild && !Flags.property.all {
379+
printProperty(info.Build, propDisplayAPIBuild, outputFormat)
337380
}
338-
if Flags.property.all || Flags.property.apibuildno {
339-
fmt.Fprintf(color.Output, "%s\t%s\n", wski18n.T("whisk API build number"), boldString(info.BuildNo))
381+
if Flags.property.apibuildno && !Flags.property.all {
382+
printProperty(info.BuildNo, propDisplayAPIBuildNo, outputFormat, "%s\t%s\n")
340383
}
341384
if err != nil {
342385
errStr := fmt.Sprintf(
@@ -346,7 +389,6 @@ var propertyGetCmd = &cobra.Command{
346389
return werr
347390
}
348391
}
349-
350392
return nil
351393
},
352394
}
@@ -359,30 +401,31 @@ func init() {
359401
)
360402

361403
// need to set property flags as booleans instead of strings... perhaps with boolApihost...
362-
propertyGetCmd.Flags().BoolVar(&Flags.property.cert, "cert", false, wski18n.T("client cert"))
363-
propertyGetCmd.Flags().BoolVar(&Flags.property.key, "key", false, wski18n.T("client key"))
404+
propertyGetCmd.Flags().BoolVar(&Flags.property.cert, "cert", false, wski18n.T(propDisplayCert))
405+
propertyGetCmd.Flags().BoolVar(&Flags.property.key, "key", false, wski18n.T(propDisplayKey))
364406
propertyGetCmd.Flags().BoolVar(&Flags.property.auth, "auth", false, wski18n.T("authorization key"))
365-
propertyGetCmd.Flags().BoolVar(&Flags.property.apihost, "apihost", false, wski18n.T("whisk API host"))
366-
propertyGetCmd.Flags().BoolVar(&Flags.property.apiversion, "apiversion", false, wski18n.T("whisk API version"))
407+
propertyGetCmd.Flags().BoolVar(&Flags.property.apihost, "apihost", false, wski18n.T(propDisplayAPIHost))
408+
propertyGetCmd.Flags().BoolVar(&Flags.property.apiversion, "apiversion", false, wski18n.T(propDisplayAPIVersion))
367409
propertyGetCmd.Flags().BoolVar(&Flags.property.apibuild, "apibuild", false, wski18n.T("whisk API build version"))
368-
propertyGetCmd.Flags().BoolVar(&Flags.property.apibuildno, "apibuildno", false, wski18n.T("whisk API build number"))
369-
propertyGetCmd.Flags().BoolVar(&Flags.property.cliversion, "cliversion", false, wski18n.T("whisk CLI version"))
370-
propertyGetCmd.Flags().BoolVar(&Flags.property.namespace, "namespace", false, wski18n.T("whisk namespace"))
410+
propertyGetCmd.Flags().BoolVar(&Flags.property.apibuildno, "apibuildno", false, wski18n.T(propDisplayAPIBuildNo))
411+
propertyGetCmd.Flags().BoolVar(&Flags.property.cliversion, "cliversion", false, wski18n.T(propDisplayCLIVersion))
412+
propertyGetCmd.Flags().BoolVar(&Flags.property.namespace, "namespace", false, wski18n.T(propDisplayNamespace))
371413
propertyGetCmd.Flags().BoolVar(&Flags.property.all, "all", false, wski18n.T("all properties"))
414+
propertyGetCmd.Flags().StringVarP(&Flags.property.output, "output", "o", "std", wski18n.T("Output format in std|raw"))
372415

373416
propertySetCmd.Flags().StringVarP(&Flags.Global.Auth, "auth", "u", "", wski18n.T("authorization `KEY`"))
374-
propertySetCmd.Flags().StringVar(&Flags.Global.Cert, "cert", "", wski18n.T("client cert"))
375-
propertySetCmd.Flags().StringVar(&Flags.Global.Key, "key", "", wski18n.T("client key"))
417+
propertySetCmd.Flags().StringVar(&Flags.Global.Cert, "cert", "", wski18n.T(propDisplayCert))
418+
propertySetCmd.Flags().StringVar(&Flags.Global.Key, "key", "", wski18n.T(propDisplayKey))
376419
propertySetCmd.Flags().StringVar(&Flags.property.apihostSet, "apihost", "", wski18n.T("whisk API `HOST`"))
377420
propertySetCmd.Flags().StringVar(&Flags.property.apiversionSet, "apiversion", "", wski18n.T("whisk API `VERSION`"))
378421
propertySetCmd.Flags().StringVar(&Flags.property.namespaceSet, "namespace", "", wski18n.T("whisk `NAMESPACE`"))
379422

380-
propertyUnsetCmd.Flags().BoolVar(&Flags.property.cert, "cert", false, wski18n.T("client cert"))
381-
propertyUnsetCmd.Flags().BoolVar(&Flags.property.key, "key", false, wski18n.T("client key"))
423+
propertyUnsetCmd.Flags().BoolVar(&Flags.property.cert, "cert", false, wski18n.T(propDisplayCert))
424+
propertyUnsetCmd.Flags().BoolVar(&Flags.property.key, "key", false, wski18n.T(propDisplayKey))
382425
propertyUnsetCmd.Flags().BoolVar(&Flags.property.auth, "auth", false, wski18n.T("authorization key"))
383-
propertyUnsetCmd.Flags().BoolVar(&Flags.property.apihost, "apihost", false, wski18n.T("whisk API host"))
384-
propertyUnsetCmd.Flags().BoolVar(&Flags.property.apiversion, "apiversion", false, wski18n.T("whisk API version"))
385-
propertyUnsetCmd.Flags().BoolVar(&Flags.property.namespace, "namespace", false, wski18n.T("whisk namespace"))
426+
propertyUnsetCmd.Flags().BoolVar(&Flags.property.apihost, "apihost", false, wski18n.T(propDisplayAPIHost))
427+
propertyUnsetCmd.Flags().BoolVar(&Flags.property.apiversion, "apiversion", false, wski18n.T(propDisplayAPIVersion))
428+
propertyUnsetCmd.Flags().BoolVar(&Flags.property.namespace, "namespace", false, wski18n.T(propDisplayNamespace))
386429

387430
}
388431

@@ -558,3 +601,21 @@ func parseConfigFlags(cmd *cobra.Command, args []string) error {
558601

559602
return nil
560603
}
604+
605+
func printProperty(propertyName string, displayText string, formatType string, format ...string) {
606+
switch formatType {
607+
case "std":
608+
if len(format) > 0 {
609+
fmt.Fprintf(color.Output, format[0], wski18n.T(displayText), boldString(propertyName))
610+
break
611+
}
612+
fmt.Fprintf(color.Output, "%s\t\t%s\n", wski18n.T(displayText), boldString(propertyName))
613+
break
614+
case "raw":
615+
fmt.Fprintf(color.Output, "%s\n", boldString(propertyName))
616+
break
617+
default:
618+
// In case of any other type for now print in std format.
619+
fmt.Fprintf(color.Output, "%s\t\t%s\n", wski18n.T(displayText), boldString(propertyName))
620+
}
621+
}

tests/src/integration/command_test.go

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,11 @@
2020
package tests
2121

2222
import (
23-
"github.com/apache/incubator-openwhisk-cli/tests/src/integration/common"
24-
"github.com/stretchr/testify/assert"
2523
"os"
2624
"testing"
25+
26+
"github.com/apache/incubator-openwhisk-cli/tests/src/integration/common"
27+
"github.com/stretchr/testify/assert"
2728
)
2829

2930
var wsk *common.Wsk = common.NewWsk()
@@ -65,17 +66,17 @@ func TestShowCLIBuildVersion(t *testing.T) {
6566
stdout, err := wsk.RunCommand("property", "get", "--cliversion")
6667
assert.Equal(t, nil, err, "The command property get --cliversion failed to run.")
6768
output := common.RemoveRedundentSpaces(string(stdout))
68-
assert.NotContains(t, output, "whisk CLI version not set",
69-
"The output of the command property get --cliversion contains \"whisk CLI version not set\".")
70-
assert.Contains(t, output, "whisk CLI version",
71-
"The output of the command property get --cliversion does not contain \"whisk CLI version\".")
69+
assert.NotContains(t, output, common.PropDisplayCLIVersion+" not set",
70+
"The output of the command property get --cliversion contains "+common.PropDisplayCLIVersion+" not set")
71+
assert.Contains(t, output, common.PropDisplayCLIVersion,
72+
"The output of the command property get --cliversion does not contain "+common.PropDisplayCLIVersion)
7273
}
7374

7475
func TestShowAPIVersion(t *testing.T) {
7576
stdout, err := wsk.RunCommand("property", "get", "--apiversion")
7677
assert.Equal(t, nil, err, "The command property get --apiversion failed to run.")
77-
assert.Contains(t, string(stdout), "whisk API version",
78-
"The output of the command property get --apiversion does not contain \"whisk API version\".")
78+
assert.Contains(t, string(stdout), common.PropDisplayAPIVersion,
79+
"The output of the command property get --apiversion does not contain "+common.PropDisplayCLIVersion)
7980
}
8081

8182
// Test case to verify the default namespace _.
@@ -88,8 +89,8 @@ func TestDefaultNamespace(t *testing.T) {
8889

8990
stdout, err := wsk.RunCommand("property", "get", "-i", "--namespace")
9091
assert.Equal(t, nil, err, "The command property get -i --namespace failed to run.")
91-
assert.Contains(t, common.RemoveRedundentSpaces(string(stdout)), "whisk namespace _",
92-
"The output of the command does not contain \"whisk namespace _\".")
92+
assert.Contains(t, common.RemoveRedundentSpaces(string(stdout)), common.PropDisplayNamespace+" _",
93+
"The output of the command does not contain "+common.PropDisplayCLIVersion+" _")
9394
common.DeleteFile(tmpProp)
9495
}
9596

@@ -114,18 +115,18 @@ func TestValidateDefaultProperties(t *testing.T) {
114115

115116
stdout, err = wsk.RunCommand("property", "get", "--auth")
116117
assert.Equal(t, nil, err, "The command property get --auth failed to run.")
117-
assert.Equal(t, "whisk auth", common.RemoveRedundentSpaces(string(stdout)),
118-
"The output of the command does not equal to \"whisk auth\".")
118+
assert.Equal(t, common.PropDisplayAuth, common.RemoveRedundentSpaces(string(stdout)),
119+
"The output of the command does not equal to "+common.PropDisplayAuth)
119120

120121
stdout, err = wsk.RunCommand("property", "get", "--apihost")
121122
assert.Equal(t, nil, err, "The command property get --apihost failed to run.")
122-
assert.Equal(t, "whisk API host", common.RemoveRedundentSpaces(string(stdout)),
123-
"The output of the command does not equal to \"whisk API host\".")
123+
assert.Equal(t, common.PropDisplayAPIHost, common.RemoveRedundentSpaces(string(stdout)),
124+
"The output of the command does not equal to "+common.PropDisplayAPIHost)
124125

125126
stdout, err = wsk.RunCommand("property", "get", "--namespace")
126127
assert.Equal(t, nil, err, "The command property get --namespace failed to run.")
127-
assert.Equal(t, "whisk namespace _", common.RemoveRedundentSpaces(string(stdout)),
128-
"The output of the command does not equal to \"whisk namespace _\".")
128+
assert.Equal(t, common.PropDisplayNamespace+" _", common.RemoveRedundentSpaces(string(stdout)),
129+
"The output of the command does not equal to "+common.PropDisplayNamespace+" _")
129130

130131
common.DeleteFile(tmpProp)
131132
}

tests/src/integration/common/utils.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,18 @@ import (
2626
"unicode"
2727
)
2828

29+
const (
30+
PropDisplayCert = "client cert"
31+
PropDisplayKey = "Client key"
32+
PropDisplayAuth = "whisk auth"
33+
PropDisplayAPIHost = "whisk API host"
34+
PropDisplayAPIVersion = "whisk API version"
35+
PropDisplayNamespace = "whisk namespace"
36+
PropDisplayCLIVersion = "whisk CLI version"
37+
PropDisplayAPIBuild = "whisk API build"
38+
PropDisplayAPIBuildNo = "whisk API build number"
39+
)
40+
2941
func checkError(err error) {
3042
if err != nil {
3143
fmt.Println(err.Error())

tests/src/integration/integration_test.go

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,12 @@ package tests
2121

2222
import (
2323
"fmt"
24-
"github.com/apache/incubator-openwhisk-cli/tests/src/integration/common"
25-
"github.com/stretchr/testify/assert"
2624
"os"
2725
"strings"
2826
"testing"
27+
28+
"github.com/apache/incubator-openwhisk-cli/tests/src/integration/common"
29+
"github.com/stretchr/testify/assert"
2930
)
3031

3132
var invalidArgs []common.InvalidArg
@@ -370,12 +371,12 @@ func TestShowAPIBuildVersion(t *testing.T) {
370371
stdout, err = wsk.RunCommand("property", "get", "-i", "--apibuild")
371372
assert.Equal(t, nil, err, "The command property get -i --apibuild failed to run.")
372373
println(common.RemoveRedundentSpaces(string(stdout)))
373-
assert.NotContains(t, common.RemoveRedundentSpaces(string(stdout)), "whisk API build Unknown",
374-
"The output of the command property get --apibuild does not contain \"whisk API build Unknown\".")
374+
assert.NotContains(t, common.RemoveRedundentSpaces(string(stdout)), common.PropDisplayAPIBuild+" Unknown",
375+
"The output of the command property get --apibuild does not contain "+common.PropDisplayAPIBuild+" Unknown")
375376
assert.NotContains(t, common.RemoveRedundentSpaces(string(stdout)), "Unable to obtain API build information",
376377
"The output of the command property get --apibuild does not contain \"Unable to obtain API build information\".")
377-
assert.Contains(t, common.RemoveRedundentSpaces(string(stdout)), "whisk API build 20",
378-
"The output of the command property get --apibuild does not contain \"whisk API build 20\".")
378+
assert.Contains(t, common.RemoveRedundentSpaces(string(stdout)), common.PropDisplayAPIBuild+" 20",
379+
"The output of the command property get --apibuild does not contain"+common.PropDisplayAPIBuild+" 20")
379380
common.DeleteFile(tmpProp)
380381
}
381382

@@ -390,8 +391,8 @@ func TestFailShowAPIBuildVersion(t *testing.T) {
390391
assert.Equal(t, nil, err, "The command property set --apihost failed to run.")
391392
stdout, err := wsk.RunCommand("property", "get", "-i", "--apibuild")
392393
assert.NotEqual(t, nil, err, "The command property get -i --apibuild does not raise any error.")
393-
assert.Contains(t, common.RemoveRedundentSpaces(string(stdout)), "whisk API build Unknown",
394-
"The output of the command property get --apibuild does not contain \"whisk API build Unknown\".")
394+
assert.Contains(t, common.RemoveRedundentSpaces(string(stdout)), common.PropDisplayAPIBuild+" Unknown",
395+
"The output of the command property get --apibuild does not contain"+common.PropDisplayAPIBuild+" Unknown")
395396
assert.Contains(t, common.RemoveRedundentSpaces(string(stdout)), "Unable to obtain API build information",
396397
"The output of the command property get --apibuild does not contain \"Unable to obtain API build information\".")
397398
}
@@ -409,12 +410,12 @@ func TestShowAPIBuildVersionHTTP(t *testing.T) {
409410
stdout, err = wsk.RunCommand("property", "get", "-i", "--apibuild")
410411
println(common.RemoveRedundentSpaces(string(stdout)))
411412
//assert.Equal(t, nil, err, "The command property get -i --apibuild failed to run.")
412-
assert.NotContains(t, common.RemoveRedundentSpaces(string(stdout)), "whisk API build Unknown",
413-
"The output of the command property get --apibuild does not contain \"whisk API build Unknown\".")
413+
assert.NotContains(t, common.RemoveRedundentSpaces(string(stdout)), common.PropDisplayAPIBuild+" Unknown",
414+
"The output of the command property get --apibuild does not contain "+common.PropDisplayAPIBuild+" Unknown")
414415
assert.NotContains(t, common.RemoveRedundentSpaces(string(stdout)), "Unable to obtain API build information",
415416
"The output of the command property get --apibuild does not contain \"Unable to obtain API build information\".")
416-
assert.Contains(t, common.RemoveRedundentSpaces(string(stdout)), "whisk API build 20",
417-
"The output of the command property get --apibuild does not contain \"whisk API build 20\".")
417+
assert.Contains(t, common.RemoveRedundentSpaces(string(stdout)), common.PropDisplayAPIBuild+" 20",
418+
"The output of the command property get --apibuild does not contain "+common.PropDisplayAPIBuild+" 20")
418419
common.DeleteFile(tmpProp)
419420
}
420421

tests/src/test/scala/org/apache/openwhisk/core/cli/test/WskCliBasicUsageTests.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ class WskCliBasicUsageTests extends TestHelpers with WskTestHelpers {
8686

8787
it should "show cli build version" in {
8888
val stdout = wsk.cli(Seq("property", "get", "--cliversion")).stdout
89-
stdout should include regex ("""(?i)whisk CLI version\s+201.*""")
89+
stdout should include regex ("""(?i)whisk CLI version\s+20.*""")
9090
}
9191

9292
it should "show api version" in {

0 commit comments

Comments
 (0)