Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style(cli): fix component uninstall output #1596

Merged
merged 1 commit into from
Mar 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions cli/cmd/component.go
Original file line number Diff line number Diff line change
Expand Up @@ -746,12 +746,9 @@ func deleteComponent(args []string) (err error) {
cli.StopProgress()

cli.OutputChecklist(successIcon, "Component %s deleted\n", color.HiYellowString(component.Name))

msg := fmt.Sprintf(`\n- We will do better next time.\n\nDo you want to provide feedback?\nReach out to us at %s\n`,
color.HiCyanString("support@lacework.net"))

cli.OutputHuman(msg)

cli.OutputHuman("\n- We will do better next time.\n")
cli.OutputHuman("\nDo you want to provide feedback?\n")
cli.OutputHuman("Reach out to us at %s\n", color.HiCyanString("support@lacework.net"))
return
}

Expand Down
8 changes: 7 additions & 1 deletion integration/component_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,13 @@ func TestCDKComponentDevEnter(t *testing.T) {
assert.True(t, found)
assert.Nil(t, err)

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

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

Expand Down
Loading