-
Notifications
You must be signed in to change notification settings - Fork 981
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(tests): ioredis being able to successfully run tests, make it re…
…ady to be part of CI Signed-off-by: Boaz Sade <boaz@dragonflydb.io>
- Loading branch information
Showing
6 changed files
with
103 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Dockerfile | ||
*.Dockerfile | ||
stress_shutdown.sh | ||
get_sets.sh | ||
async.py | ||
generate_sets.py | ||
venv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/usr/bin/env bash | ||
|
||
# This script is only temporary until issue https://github.com/luin/ioredis/issues/1671 is resolved (hopefully soon) | ||
# what we are doing here, is making sure that we would not compare the result case sensitive. | ||
sed -i 's/expect(args\[0\]).to.eql("get")/expect(args\[0\]).to.match(\/get\/i)/' $1 | ||
sed -i 's/args\[0\] === "set"/args\[0\] === "set" || args\[0\] === "SET"/' $1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/usr/bin/env bash | ||
|
||
# The following tests are not supported | ||
#"should reconnect if reconnectOnError | ||
# should reload scripts on redis restart | ||
# should check and load uniq scripts only | ||
# supported in transaction blocks | ||
# rejects when monitor is disabled" | ||
# should resend unfulfilled commands to the correct | ||
# should set the name before any subscribe | ||
# should name the connection if options | ||
# scanStream | ||
# scripting | ||
# should affect the old way | ||
# should support Map | ||
# should support object | ||
# should batch all commands before ready event | ||
# should support key prefixing for sort | ||
# should be sent on the connect event | ||
|
||
## Some issues that are still open need to be resolved such as | ||
# https://github.com/dragonflydb/dragonfly/issues/457 | ||
# and https://github.com/dragonflydb/dragonfly/issues/458 | ||
|
||
|
||
TS_NODE_TRANSPILE_ONLY=true NODE_ENV=test mocha \ | ||
"test/helpers/*.ts" "test/unit/**/*.ts" "test/functional/**/*.ts" \ | ||
-g "should reconnect if reconnectOnError|should reload scripts on redis restart|should check and load uniq scripts only|should be supported in transaction blocks|rejects when monitor is disabled|should resend unfulfilled commands to the correct|should set the name before any subscribe|should name the connection if options|scanStream|scripting|should affect the old way|should support Map|should support object|should batch all commands before ready event|should support key prefixing for sort|should be sent on the connect event" \ | ||
--invert |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/usr/bin/env bash | ||
# Running this with --build would build the image as well | ||
if [ "$1" = "--build" ]; then | ||
docker build -t ioredis-test -f ./ioredis.Dockerfile . || { | ||
echo "failed to build io redis image" | ||
exit 1 | ||
} | ||
fi | ||
|
||
# run the tests | ||
echo "runniing ioredis tess" | ||
docker run --rm -i --network=host ioredis-test ./run_tests.sh | ||
if [ $? -ne 0 ];then | ||
echo "some tests failed - please look at the output from this run" | ||
exit 1 | ||
else | ||
echo "finish runing tests successfully" | ||
exit 0 | ||
fi |