Skip to content

Commit

Permalink
FIX #37 - deleting import now requires --service to differentiate
Browse files Browse the repository at this point in the history
  • Loading branch information
aricart committed Dec 8, 2018
1 parent 1537b8f commit a503716
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cmd/deleteimport_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ func Test_DeleteImport(t *testing.T) {
tests := CmdTests{
{createDeleteImportCmd(), []string{"delete", "import", "--account", "A"}, nil, []string{"account \"A\" doesn't have imports"}, true},
{createDeleteImportCmd(), []string{"delete", "import", "--account", "B"}, nil, []string{"subject is required"}, true},
{createDeleteImportCmd(), []string{"delete", "import", "--account", "B", "--subject", "baz"}, nil, []string{"no import matching \"baz\" found"}, true},
{createDeleteImportCmd(), []string{"delete", "import", "--account", "B", "--subject", "foo"}, nil, []string{"deleted import of \"foo\""}, false},
{createDeleteImportCmd(), []string{"delete", "import", "--account", "B", "--subject", "baz"}, nil, []string{"no stream import matching \"baz\" found"}, true},
{createDeleteImportCmd(), []string{"delete", "import", "--account", "B", "--subject", "foo"}, nil, []string{"deleted stream import \"foo\""}, false},
}

tests.Run(t, "root", "delete")
Expand Down Expand Up @@ -71,10 +71,10 @@ func Test_DeleteImportInteractive(t *testing.T) {
ts.AddImport(t, "A", "foo", "B")
ts.AddImport(t, "A", "bar", "B")

input := []interface{}{1, 0}
input := []interface{}{1, false, 0}
cmd := createDeleteImportCmd()
HoistRootFlags(cmd)
_, _, err := ExecuteInteractiveCmd(cmd, input, "-i")
_, _, err := ExecuteInteractiveCmd(cmd, input)
require.NoError(t, err)

ac, err := ts.Store.ReadAccountClaim("B")
Expand Down

0 comments on commit a503716

Please sign in to comment.