Repository: knative/client
Pull request #785 (2020-04-07 14:31:28)

Update sink binding create usage string

knative-prow-robot: [APPROVALNOTIFIER] This PR is **APPROVED**

This pull-request has been approved by: *<a href="https://github.com/knative/client/pull/785#" title="Author self-approved">navidshaikh</a>*

The full list of commands accepted by this bot can be found [here](https://go.k8s.io/bot-commands?repo=knative%2Fclient).

The pull request process is described [here](https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process)

<details >
Needs approval from an approver in each of these files:

- ~~[OWNERS](https://github.com/knative/client/blob/master/OWNERS)~~ [navidshaikh]

Approvers can indicate their approval by writing `/approve` in a comment
Approvers can cancel approval by writing `/approve cancel` in a comment
</details>
<!-- META={"approvers":[]} -->
navidshaikh: /ok-to-test


knative-prow-robot: @navidshaikh: The following test **failed**, say `/retest` to rerun all failed tests:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
pull-knative-client-build-tests | ed42f1e102ee507efce4515d052aae6fdf610fee | [link](https://prow.knative.dev/view/gcs/knative-prow/pr-logs/pull/knative_client/785/pull-knative-client-build-tests/1247533172304908289) | `/test pull-knative-client-build-tests`

[Full PR test history](https://gubernator.knative.dev/pr/knative_client/785). [Your PR dashboard](https://gubernator.knative.dev/pr/navidshaikh).

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
knative-prow-robot: @navidshaikh: The following test **failed**, say `/retest` to rerun all failed tests:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
pull-knative-client-build-tests | 8c64ee4c4a45dd092dc97a259a6eccec92926db8 | [link](https://prow.knative.dev/view/gcs/knative-prow/pr-logs/pull/knative_client/785/pull-knative-client-build-tests/1247541474296336385) | `/test pull-knative-client-build-tests`

[Full PR test history](https://gubernator.knative.dev/pr/knative_client/785). [Your PR dashboard](https://gubernator.knative.dev/pr/navidshaikh).

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
chizhg: /retest
knative-prow-robot: @navidshaikh: The following test **failed**, say `/retest` to rerun all failed tests:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
pull-knative-client-build-tests | 8c64ee4c4a45dd092dc97a259a6eccec92926db8 | [link](https://prow.knative.dev/view/gcs/knative-prow/pr-logs/pull/knative_client/785/pull-knative-client-build-tests/1247599985353035776) | `/test pull-knative-client-build-tests`

[Full PR test history](https://gubernator.knative.dev/pr/knative_client/785). [Your PR dashboard](https://gubernator.knative.dev/pr/navidshaikh).

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
chizhg: /test pull-knative-client-build-tests
knative-prow-robot: @navidshaikh: The following test **failed**, say `/retest` to rerun all failed tests:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
pull-knative-client-build-tests | 8c64ee4c4a45dd092dc97a259a6eccec92926db8 | [link](https://prow.knative.dev/view/gcs/knative-prow/pr-logs/pull/knative_client/785/pull-knative-client-build-tests/1247600865154437120) | `/test pull-knative-client-build-tests`

[Full PR test history](https://gubernator.knative.dev/pr/knative_client/785). [Your PR dashboard](https://gubernator.knative.dev/pr/navidshaikh).

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
knative-prow-robot: @navidshaikh: The following test **failed**, say `/retest` to rerun all failed tests:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
pull-knative-client-integration-tests-latest-release | 678d23feb5def30e969fc0da6ed4c1165a2ce793 | [link](https://prow.knative.dev/view/gcs/knative-prow/pr-logs/pull/knative_client/785/pull-knative-client-integration-tests-latest-release/1247605395606736899) | `/test pull-knative-client-integration-tests-latest-release`

[Full PR test history](https://gubernator.knative.dev/pr/knative_client/785). [Your PR dashboard](https://gubernator.knative.dev/pr/navidshaikh).

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
navidshaikh: /test pull-knative-client-integration-tests-latest-release

Patch:
diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc
index 298a26f3..08f7a34e 100644
--- a/CHANGELOG.adoc
+++ b/CHANGELOG.adoc
@@ -26,6 +26,10 @@
 | Fix plugin lookup with file ext on Windows
 | https://github.com/knative/client/pull/774[#774]
 
+| 🐛
+| Correct error message when updating service
+| https://github.com/knative/client/pull/778[#778]
+
 |===
 
 ## v0.13.1 (2020-03-25)
diff --git a/README.md b/README.md
index 38089858..fb1c558a 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,11 @@
 # Kn
 
+[![go.dev reference](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white)](https://pkg.go.dev/knative.dev/client)
+[![Go Report Card](https://goreportcard.com/badge/knative/client)](https://goreportcard.com/report/knative/client)
+[![Releases](https://img.shields.io/github/release-pre/knative/client.svg)](https://github.com/knative/client/releases)
+[![LICENSE](https://img.shields.io/github/license/knative/client.svg)](https://github.com/knative/client/blob/master/LICENSE)
+[![Slack Status](https://img.shields.io/badge/slack-join_chat-white.svg?logo=slack&style=social)](https://knative.slack.com)
+
 The Knative client `kn` is your door to the [Knative](https://knative.dev)
 world. It allows you to create Knative resources interactively from the command
 line or from within Shell scripts.
diff --git a/docs/cmd/kn_source_binding_create.md b/docs/cmd/kn_source_binding_create.md
index 91fba1d1..ed5e0296 100644
--- a/docs/cmd/kn_source_binding_create.md
+++ b/docs/cmd/kn_source_binding_create.md
@@ -7,7 +7,7 @@ Create a sink binding.
 Create a sink binding.
 
 ```
-kn source binding create NAME --subject SCHEDULE --sink SINK --ce-override KEY=VALUE [flags]
+kn source binding create NAME --subject SUBJECT --sink SINK --ce-override KEY=VALUE [flags]
 ```
 
 ### Examples
diff --git a/pkg/kn/commands/service/delete.go b/pkg/kn/commands/service/delete.go
index 81dc8f96..413c7aea 100644
--- a/pkg/kn/commands/service/delete.go
+++ b/pkg/kn/commands/service/delete.go
@@ -40,7 +40,7 @@ func NewServiceDeleteCommand(p *commands.KnParams) *cobra.Command {
 
 		RunE: func(cmd *cobra.Command, args []string) error {
 			if len(args) < 1 {
-				return errors.New("requires the service name")
+				return errors.New("'service delete' requires the service name(s)")
 			}
 
 			namespace, err := p.GetNamespace(cmd)
diff --git a/pkg/kn/commands/service/describe.go b/pkg/kn/commands/service/describe.go
index 866c0827..d3041248 100644
--- a/pkg/kn/commands/service/describe.go
+++ b/pkg/kn/commands/service/describe.go
@@ -81,7 +81,7 @@ func NewServiceDescribeCommand(p *commands.KnParams) *cobra.Command {
 		Short: "Show details of a service",
 		RunE: func(cmd *cobra.Command, args []string) error {
 			if len(args) != 1 {
-				return errors.New("'kn service describe' requires name of the service as single argument")
+				return errors.New("'service describe' requires the service name given as single argument")
 			}
 			serviceName := args[0]
 
diff --git a/pkg/kn/commands/service/update.go b/pkg/kn/commands/service/update.go
index b0589e0a..fe82ce23 100644
--- a/pkg/kn/commands/service/update.go
+++ b/pkg/kn/commands/service/update.go
@@ -60,7 +60,7 @@ func NewServiceUpdateCommand(p *commands.KnParams) *cobra.Command {
 		Example: updateExample,
 		RunE: func(cmd *cobra.Command, args []string) (err error) {
 			if len(args) != 1 {
-				return errors.New("requires the service name")
+				return errors.New("'service update' requires the service name given as single argument")
 			}
 
 			namespace, err := p.GetNamespace(cmd)
diff --git a/pkg/kn/commands/source/binding/create.go b/pkg/kn/commands/source/binding/create.go
index 48eb0a1d..89177056 100644
--- a/pkg/kn/commands/source/binding/create.go
+++ b/pkg/kn/commands/source/binding/create.go
@@ -31,7 +31,7 @@ func NewBindingCreateCommand(p *commands.KnParams) *cobra.Command {
 	var sinkFlags flags.SinkFlags
 
 	cmd := &cobra.Command{
-		Use:   "create NAME --subject SCHEDULE --sink SINK --ce-override KEY=VALUE",
+		Use:   "create NAME --subject SUBJECT --sink SINK --ce-override KEY=VALUE",
 		Short: "Create a sink binding.",
 		Example: `
   # Create a sink binding which connects a deployment 'myapp' with a Knative service 'mysvc'


Test patch:
diff --git a/pkg/kn/commands/service/create_test.go b/pkg/kn/commands/service/create_test.go
index 0ade9c32..548018f1 100644
--- a/pkg/kn/commands/service/create_test.go
+++ b/pkg/kn/commands/service/create_test.go
@@ -143,6 +143,13 @@ func TestServiceCreateWithMultipleImages(t *testing.T) {
 	assert.Assert(t, util.ContainsAll(err.Error(), "\"--image\"", "\"gcr.io/bar/foo:baz\"", "flag", "once"))
 }
 
+func TestServiceCreateWithMultipleNames(t *testing.T) {
+	_, _, _, err := fakeServiceCreate([]string{
+		"service", "create", "foo", "foo1", "--image", "gcr.io/foo/bar:baz", "--no-wait"}, false)
+
+	assert.Assert(t, util.ContainsAll(err.Error(), "'service create' requires the service name given as single argument"))
+}
+
 func TestServiceCreateImageSync(t *testing.T) {
 	action, created, output, err := fakeServiceCreate([]string{
 		"service", "create", "foo", "--image", "gcr.io/foo/bar:baz"}, false)
diff --git a/pkg/kn/commands/service/describe_test.go b/pkg/kn/commands/service/describe_test.go
index 1c45b2e0..0c2bceb8 100644
--- a/pkg/kn/commands/service/describe_test.go
+++ b/pkg/kn/commands/service/describe_test.go
@@ -75,6 +75,16 @@ func TestServiceDescribeBasic(t *testing.T) {
 	r.Validate()
 }
 
+func TestServiceDescribeWithMultipleNames(t *testing.T) {
+	client := knclient.NewMockKnServiceClient(t)
+	r := client.Recorder()
+	createTestService("foo", []string{"rev1"}, goodConditions())
+	_, err := executeServiceCommand(client, "describe", "foo", "foo1")
+
+	assert.Assert(t, util.ContainsAll(err.Error(), "'service describe' requires the service name given as single argument"))
+	r.Validate()
+}
+
 func TestServiceDescribeSad(t *testing.T) {
 	client := knclient.NewMockKnServiceClient(t)
 	r := client.Recorder()
diff --git a/pkg/kn/commands/service/update_test.go b/pkg/kn/commands/service/update_test.go
index bb48aad8..e197684c 100644
--- a/pkg/kn/commands/service/update_test.go
+++ b/pkg/kn/commands/service/update_test.go
@@ -195,11 +195,19 @@ func TestServiceUpdateImage(t *testing.T) {
 func TestServiceUpdateWithMultipleImages(t *testing.T) {
 	orig := newEmptyService()
 	_, _, _, err := fakeServiceUpdate(orig, []string{
-		"service", "create", "foo", "--image", "gcr.io/foo/bar:baz", "--image", "gcr.io/bar/foo:baz", "--no-wait"})
+		"service", "update", "foo", "--image", "gcr.io/foo/bar:baz", "--image", "gcr.io/bar/foo:baz", "--no-wait"})
 
 	assert.Assert(t, util.ContainsAll(err.Error(), "\"--image\"", "\"gcr.io/bar/foo:baz\"", "flag", "once"))
 }
 
+func TestServiceUpdateWithMultipleNames(t *testing.T) {
+	orig := newEmptyService()
+	_, _, _, err := fakeServiceUpdate(orig, []string{
+		"service", "update", "foo", "foo1", "--image", "gcr.io/foo/bar:baz", "--no-wait"})
+
+	assert.Assert(t, util.ContainsAll(err.Error(), "'service update' requires the service name given as single argument"))
+}
+
 func TestServiceUpdateCommand(t *testing.T) {
 	orig := newEmptyService()
 
diff --git a/test/local-e2e-tests.sh b/test/local-e2e-tests.sh
index a52f094a..8f1f7fd2 100755
--- a/test/local-e2e-tests.sh
+++ b/test/local-e2e-tests.sh
@@ -15,6 +15,7 @@
 # limitations under the License.
 
 export PATH=$PWD:$PATH
+export GO111MODULE=on
 
 dir=$(dirname "${BASH_SOURCE[0]}")
 base=$(cd "$dir/.." && pwd)
@@ -23,4 +24,4 @@ base=$(cd "$dir/.." && pwd)
 export KN_E2E_NAMESPACE=kne2etests
 
 echo "🧪  Testing"
-go test ${base}/test/e2e/ -test.v -tags "e2e ${E2E_TAGS}" "$@"
+go test -mod=vendor ${base}/test/e2e/ -test.v -tags "e2e ${E2E_TAGS}" "$@"