Skip to content
This repository has been archived by the owner on Mar 9, 2021. It is now read-only.

Commit

Permalink
update e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
Daisy Guo committed Apr 21, 2020
1 parent b8bfb02 commit ff7de36
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 12 deletions.
23 changes: 17 additions & 6 deletions plugins/source-kafka/README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,39 @@
## kn-source_kafka

`kn-source_kafka` is a plugin of Knative Client, which allows you to management of Kafka event source interactively from the command line.
`kn-source_kafka` is a plugin of Knative Client, which allows you to management
of Kafka event source interactively from the command line.

### Description

`kn-source_kafka` is a plugin of Knative Client. You could create, update, describe and delete Kafka event sources in Knative Eventing. Go to [Knative Eventing document](https://knative.dev/docs/eventing/samples/kafka/source/) to understand more about Kafka event sources.
`kn-source_kafka` is a plugin of Knative Client. You could create, update,
describe and delete Kafka event sources in Knative Eventing. Go to
[Knative Eventing document](https://knative.dev/docs/eventing/samples/kafka/source/)
to understand more about Kafka event sources.

### Build and Install

You must [set up your development environment](https://github.com/knative/client/blob/master/docs/DEVELOPMENT.md#prerequisites) before you build `kn-source_kafka`.
You must
[set up your development environment](https://github.com/knative/client/blob/master/docs/DEVELOPMENT.md#prerequisites)
before you build `kn-source_kafka`.

**Building:**

Once you've set up your development environment, let's build `kn-source_kafka`. Run below command under the directory of `client-contrib/plugins/source-kafka`.
Once you've set up your development environment, let's build `kn-source_kafka`.
Run below command under the directory of `client-contrib/plugins/source-kafka`.

```sh
$ hack/build.sh
```

**Installing:**

You will get an excuatable file `kn-source_kafka` under the directory of `client-contrib/plugins/source-kafka` after you run the build command. Then let's install it to become a Knative Client `kn` plugin.
You will get an excuatable file `kn-source_kafka` under the directory of
`client-contrib/plugins/source-kafka` after you run the build command. Then
let's install it to become a Knative Client `kn` plugin.

Install a plugin by simply copying the excuatable file `kn-source_kafka` to the folder of the `kn` plugins directory. You will be able to invoke it by `kn source_kafka`.
Install a plugin by simply copying the excuatable file `kn-source_kafka` to the
folder of the `kn` plugins directory. You will be able to invoke it by
`kn source_kafka`.

### Usage

Expand Down
2 changes: 1 addition & 1 deletion plugins/source-kafka/go.mod
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module knative.dev/client-contrib/plugins/source-kafka

require (
github.com/maximilien/kn-source-pkg v0.3.2
github.com/maximilien/kn-source-pkg v0.3.3
github.com/spf13/cobra v0.0.6
github.com/spf13/pflag v1.0.5
gotest.tools v2.2.0+incompatible
Expand Down
4 changes: 2 additions & 2 deletions plugins/source-kafka/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,8 @@ github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzp
github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU=
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
github.com/maxbrunsfeld/counterfeiter/v6 v6.2.2/go.mod h1:eD9eIE7cdwcMi9rYluz88Jz2VyhSmden33/aXg4oVIY=
github.com/maximilien/kn-source-pkg v0.3.2 h1:ey2rzgOZ1A02OvwUqXBYiNxCTNtlrdNbyeBS8fAN8bM=
github.com/maximilien/kn-source-pkg v0.3.2/go.mod h1:EDa7rFyEq3i2X02NaP1/pnrg+yVUlWPOS4CCZaZwCx0=
github.com/maximilien/kn-source-pkg v0.3.3 h1:IiAcZta3RzXvhXLIF8M4bEbRxEqvzUtqVISzMBTa5E4=
github.com/maximilien/kn-source-pkg v0.3.3/go.mod h1:EDa7rFyEq3i2X02NaP1/pnrg+yVUlWPOS4CCZaZwCx0=
github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE=
Expand Down
Binary file removed plugins/source-kafka/kn-source_kafka
Binary file not shown.
2 changes: 1 addition & 1 deletion plugins/source-kafka/test/e2e-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ base=$(cd "$dir/.." && pwd)

echo "TEST_INFRA_SCRIPTS: $TEST_INFRA_SCRIPTS"
echo "Testing kn-source-kafka"
cd ${REPO_ROOT_DIR}

# Strimzi installation config template used for starting up Kafka clusters.
readonly STRIMZI_INSTALLATION_CONFIG_TEMPLATE="test/config/100-strimzi-cluster-operator-0.17.0.yaml"
Expand Down Expand Up @@ -100,5 +101,4 @@ run() {
}

# Fire up
cd ${REPO_ROOT_DIR}
run $@

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion plugins/source-kafka/vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ github.com/magiconair/properties
github.com/mailru/easyjson/buffer
github.com/mailru/easyjson/jlexer
github.com/mailru/easyjson/jwriter
# github.com/maximilien/kn-source-pkg v0.3.2
# github.com/maximilien/kn-source-pkg v0.3.3
github.com/maximilien/kn-source-pkg/pkg/client
github.com/maximilien/kn-source-pkg/pkg/commands/source
github.com/maximilien/kn-source-pkg/pkg/core
Expand Down

0 comments on commit ff7de36

Please sign in to comment.