mirror of https://github.com/knative/client.git
fix: `kn source list` command print spelling problems (#963)
This commit is contained in:
parent
49a552f155
commit
7f2de9eb9d
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Reference in New Issue