Skip to content

Commit 0c19b37

Browse files
authored
fix output message mistake (#190)
1 parent ba7270d commit 0c19b37

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

config/configure.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ func doConfigure(ctx *cli.Context, profileName string, mode string) error {
8989
// configure common
9090
cli.Printf(w, "Default Region Id [%s]: ", cp.RegionId)
9191
cp.RegionId = ReadInput(cp.RegionId)
92-
cli.Printf(w, "Default Output Format [%s]: json (Only support json))\n", cp.OutputFormat)
92+
cli.Printf(w, "Default Output Format [%s]: json (Only support json)\n", cp.OutputFormat)
9393

9494
// cp.OutputFormat = ReadInput(cp.OutputFormat)
9595
cp.OutputFormat = "json"

config/configure_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ func TestNewConfigureCommand(t *testing.T) {
9292
err = cmd.Run(ctx, []string{})
9393
assert.Nil(t, err)
9494
assert.Equal(t, "Configuring profile '' in '' authenticate mode...\n"+
95-
"Access Key Id []: Access Key Secret []: Default Region Id []: Default Output Format [json]: json (Only support json))\n"+
95+
"Access Key Id []: Access Key Secret []: Default Region Id []: Default Output Format [json]: json (Only support json)\n"+
9696
"Default Language [zh|en] en: Saving profile[] ...Done.\n"+
9797
"-----------------------------------------------\n"+
9898
"!!! Configure Failed please configure again !!!\n"+
@@ -125,7 +125,7 @@ func TestDoConfigure(t *testing.T) {
125125
AddFlags(ctx.Flags())
126126
err := doConfigure(ctx, "profile", "AK")
127127
assert.Nil(t, err)
128-
assert.Equal(t, "Configuring profile 'profile' in 'AK' authenticate mode...\nAccess Key Id []: Access Key Secret []: Default Region Id []: Default Output Format [json]: json (Only support json))\nDefault Language [zh|en] en: Saving profile[profile] ...Done.\n-----------------------------------------------\n!!! Configure Failed please configure again !!!\n-----------------------------------------------\nAccessKeyId/AccessKeySecret is empty! run `aliyun configure` first\n-----------------------------------------------\n!!! Configure Failed please configure again !!!\n-----------------------------------------------\n", w.String())
128+
assert.Equal(t, "Configuring profile 'profile' in 'AK' authenticate mode...\nAccess Key Id []: Access Key Secret []: Default Region Id []: Default Output Format [json]: json (Only support json)\nDefault Language [zh|en] en: Saving profile[profile] ...Done.\n-----------------------------------------------\n!!! Configure Failed please configure again !!!\n-----------------------------------------------\nAccessKeyId/AccessKeySecret is empty! run `aliyun configure` first\n-----------------------------------------------\n!!! Configure Failed please configure again !!!\n-----------------------------------------------\n", w.String())
129129
}
130130

131131
func TestConfigureAK(t *testing.T) {

0 commit comments

Comments
 (0)