mirror of https://github.com/VinGarcia/ksql.git
Fix test coverage issue
parent
1ce6aa9634
commit
c2c8d02a1b
|
@ -1,16 +1,20 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
cmd=$@
|
||||||
|
|
||||||
# Update go.mod with replace so testing will
|
# Update go.mod with replace so testing will
|
||||||
# run against the local version of ksql:
|
# run against the local version of ksql:
|
||||||
echo "replace github.com/vingarcia/ksql => ../../" >> go.mod
|
echo "replace github.com/vingarcia/ksql => ../../" >> go.mod
|
||||||
go mod tidy
|
go mod tidy
|
||||||
go test
|
|
||||||
|
# Run the input command:
|
||||||
|
eval $cmd
|
||||||
|
|
||||||
# Save whether the tests succeeded or not:
|
# Save whether the tests succeeded or not:
|
||||||
tests_succedeed=$?
|
tests_succedeed=$?
|
||||||
|
|
||||||
# Undo the changes:
|
# Undo the changes:
|
||||||
git checkout go.mod go.sum > /dev/null
|
git checkout go.mod go.sum > /dev/null 2>&1
|
||||||
|
|
||||||
# Return error if the tests failed:
|
# Return error if the tests failed:
|
||||||
test $tests_succedeed -eq 0
|
test $tests_succedeed -eq 0
|
||||||
|
|
Loading…
Reference in New Issue