Skip to content

Commit

Permalink
Update test doc (#381)
Browse files Browse the repository at this point in the history
* update test runner

* change test runner's --local-driver to --local

* update to 0.6.0-alph.3
  • Loading branch information
sehz authored Oct 8, 2020
1 parent ffc9b38 commit 6720668
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 33 deletions.
29 changes: 15 additions & 14 deletions Cargo.lock

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

4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ build:
#

smoke-test: test-clean-up
$(TEST_BIN) --spu ${DEFAULT_SPU} --produce-iteration ${DEFAULT_ITERATION} --local-driver --rust-log ${DEFAULT_LOG}
$(TEST_BIN) --spu ${DEFAULT_SPU} --produce-iteration ${DEFAULT_ITERATION} --local --rust-log ${DEFAULT_LOG}

smoke-test-tls: test-clean-up
$(TEST_BIN) --spu ${DEFAULT_SPU} --produce-iteration ${DEFAULT_ITERATION} --tls --local-driver --rust-log ${DEFAULT_LOG}
$(TEST_BIN) --spu ${DEFAULT_SPU} --produce-iteration ${DEFAULT_ITERATION} --tls --local --rust-log ${DEFAULT_LOG}

smoke-test-k8: test-clean-up minikube_image
$(TEST_BIN) --spu ${DEFAULT_SPU} --produce-iteration ${DEFAULT_ITERATION} --develop --rust-log ${DEFAULT_LOG}
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.6.0-alpha.2
0.6.0-alpha.3
2 changes: 1 addition & 1 deletion src/cli/src/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.6.0-alpha.2
0.6.0-alpha.3
51 changes: 38 additions & 13 deletions tests/README.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,58 @@
# Local test
This run test with SC and SPU running in your dev machine.
# Fluvio Test Runner

## Setting up
Used to run a various test against `Fluvio` platform.

This assumes you have read Fluvio doc and setup or access to a Fluvio cluster .



## Setting up Test runer

Build all `Fluvio` crates.

```
cargo build
```

Set up alias to run development version of Fluvio and Test runner CLI.

```
alias flvd=./target/debug/fluvio
alias flvt=./target/debug/flv-test
```


# Running simple test
# Running Test runner

This run a simple smoke test with a single record
Test runner can be a running in two ways:
- Create new cluster (local or k8) and run tests (smoke test)
- Run tests againts existing cluster

```
$ flvt --local-driver --log-dir /tmp
```

Displaying current offsets:
## Smoke test

This run a simple smoke test by creating new local cluster.

It creates a simple topic: `topic0` and perform produce/consume

```
$ flvd partition list
TOPIC PARTITION LEADER REPLICAS RESOLUTION HW LEO LSR FOLLOWER OFFSETS
topic0 0 5001 [] Online 1 1 0 []
$ flvt --local
....various cluster installation
start testing...
found topic: topic0 offset: 0
starting produce
Ok!
send message of len 108
topic: topic0, consume message validated!
```

Smoke test can be specified with more than 1 iterations:

Run a test with sending 10 records:
```
flvt --produce-iteration 10 -d
flvt --local --produce-iteration 10
no setup
no topic initialized
Expand Down
4 changes: 2 additions & 2 deletions tests/runner/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ pub struct TestOption {

/// run local environment
#[structopt(long)]
local_driver: bool,
local: bool,

/// run develop image, this is for k8
#[structopt(long)]
Expand Down Expand Up @@ -113,7 +113,7 @@ impl TestOption {

/// use k8 env driver
pub fn use_k8_driver(&self) -> bool {
!self.local_driver
!self.local
}

pub fn develop_mode(&self) -> bool {
Expand Down

0 comments on commit 6720668

Please sign in to comment.