Skip to content

Commit fc36cc2

Browse files
authored
style(cli): fix component uninstall output (#1596)
Signed-off-by: Salim Afiune Maya <[email protected]>
1 parent df97387 commit fc36cc2

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

cli/cmd/component.go

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -746,12 +746,9 @@ func deleteComponent(args []string) (err error) {
746746
cli.StopProgress()
747747

748748
cli.OutputChecklist(successIcon, "Component %s deleted\n", color.HiYellowString(component.Name))
749-
750-
msg := fmt.Sprintf(`\n- We will do better next time.\n\nDo you want to provide feedback?\nReach out to us at %s\n`,
751-
color.HiCyanString("[email protected]"))
752-
753-
cli.OutputHuman(msg)
754-
749+
cli.OutputHuman("\n- We will do better next time.\n")
750+
cli.OutputHuman("\nDo you want to provide feedback?\n")
751+
cli.OutputHuman("Reach out to us at %s\n", color.HiCyanString("[email protected]"))
755752
return
756753
}
757754

integration/component_test.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,13 @@ func TestCDKComponentDevEnter(t *testing.T) {
199199
assert.True(t, found)
200200
assert.Nil(t, err)
201201

202-
run(t, dir, "component", "uninstall", "component-example")
202+
t.Run("uninstall", func(t *testing.T) {
203+
out, err, exitcode := LaceworkCLIWithHome(dir, "component", "uninstall", "component-example")
204+
assert.Empty(t, err.String(), "STDERR should be empty")
205+
assert.Equal(t, 0, exitcode, "EXITCODE is not the expected one")
206+
assert.Contains(t, out.String(), "- We will do better next time.\n\nDo you want to provide feedback?\n",
207+
"STDOUT json keys changed")
208+
})
203209

204210
out = run(t, dir, "component", "list")
205211

0 commit comments

Comments
 (0)