Skip to content

Commit

Permalink
fix: kn source list command print spelling problems (knative#963)
Browse files Browse the repository at this point in the history
  • Loading branch information
gosoon authored and navidshaikh committed Aug 18, 2020
1 parent 775073d commit d1e7e6b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pkg/kn/commands/source/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func NewListCommand(p *commands.KnParams) *cobra.Command {
}

if sourceList == nil || len(sourceList.Items) == 0 {
fmt.Fprintf(cmd.OutOrStdout(), "No sources found in %s namespace.\n", namespace)
fmt.Fprintf(cmd.OutOrStdout(), "No sources found.\n")
return nil
}
// empty namespace indicates all namespaces flag is specified
Expand Down
6 changes: 3 additions & 3 deletions test/e2e/source_list_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func TestSourceList(t *testing.T) {

t.Log("List sources empty case")
output := sourceList(r)
assert.Check(t, util.ContainsAll(output, "No", "sources", "found", "namespace"))
assert.Check(t, util.ContainsAll(output, "No", "sources", "found."))
assert.Check(t, util.ContainsNone(output, "NAME", "TYPE", "RESOURCE", "SINK", "READY"))

t.Log("Create API Server")
Expand All @@ -86,9 +86,9 @@ func TestSourceList(t *testing.T) {

t.Log("List sources filter invalid case")
output = sourceList(r, "--type", "testapisource0")
assert.Check(t, util.ContainsAll(output, "No", "sources", "found", "namespace"))
assert.Check(t, util.ContainsAll(output, "No", "sources", "found."))
output = sourceList(r, "--type", "TestSource", "-oyaml")
assert.Check(t, util.ContainsAll(output, "No", "sources", "found", "namespace"))
assert.Check(t, util.ContainsAll(output, "No", "sources", "found."))

t.Log("List available source in YAML format")
output = sourceList(r, "--type", "PingSource,ApiServerSource", "-oyaml")
Expand Down

0 comments on commit d1e7e6b

Please sign in to comment.