Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ TC_PATHS="tests/kafkatest/tests/client/pluggable_test.py::PluggableConsumerTest.
```
bash tests/docker/ducker-ak up -j 'openjdk:11'; tests/docker/run_tests.sh
```
* Rebuild first and then run tests
```
REBUILD="t" bash tests/docker/run_tests.sh
```

* Notes
- The scripts to run tests creates and destroys docker network named *knw*.
Expand Down
5 changes: 5 additions & 0 deletions tests/docker/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,17 @@
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
KAFKA_NUM_CONTAINERS=${KAFKA_NUM_CONTAINERS:-14}
TC_PATHS=${TC_PATHS:-./kafkatest/}
REBUILD=${REBUILD:f}

die() {
echo $@
exit 1
}

if [ "$REBUILD" == "t" ]; then
./gradlew clean systemTestLibs

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure it's safe to depend of the local directory. Perhaps it should be relative to $SCRIPT_DIR?

I am also not too sure a prompt is the best way. If we have any automated systems using this script, it would fail, right? Could we pass an optional flag instead? Something like --rebuild which defaults to false?

fi

if ${SCRIPT_DIR}/ducker-ak ssh | grep -q '(none)'; then
${SCRIPT_DIR}/ducker-ak up -n "${KAFKA_NUM_CONTAINERS}" || die "ducker-ak up failed"
fi
Expand Down