Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
hiredis
Commits
5d68ad2f
Unverified
Commit
5d68ad2f
authored
Jun 26, 2022
by
Michael Grunder
Committed by
GitHub
Jun 26, 2022
Browse files
Merge pull request #1072 from michael-grunder/fix-redis7-unit-tests
Fix tests so they work for Redis 7.0
parents
95a0c128
f4b6ed28
Changes
2
Hide whitespace changes
Inline
Side-by-side
.github/workflows/build.yml
View file @
5d68ad2f
...
...
@@ -152,7 +152,8 @@ jobs:
-
name
:
Install dependencies
run
:
|
brew install openssl redis
brew install openssl redis@6.2
brew link redis@6.2 --force
-
name
:
Build hiredis
run
:
USE_SSL=1 make
...
...
test.sh
View file @
5d68ad2f
...
...
@@ -5,9 +5,16 @@ REDIS_PORT=${REDIS_PORT:-56379}
REDIS_SSL_PORT
=
${
REDIS_SSL_PORT
:-
56443
}
TEST_SSL
=
${
TEST_SSL
:-
0
}
SKIPS_AS_FAILS
=
${
SKIPS_AS_FAILS
-
:0
}
ENABLE_DEBUG_CMD
=
SSL_TEST_ARGS
=
SKIPS_ARG
=
# We need to enable the DEBUG command for redis-server >= 7.0.0
REDIS_MAJOR_VERSION
=
"
$(
redis-server
--version
|awk
-F
'[^0-9]+'
'{ print $2 }'
)
"
if
[
"
$REDIS_MAJOR_VERSION
"
-gt
"6"
]
;
then
ENABLE_DEBUG_CMD
=
"enable-debug-command local"
fi
tmpdir
=
$(
mktemp
-d
)
PID_FILE
=
${
tmpdir
}
/hiredis-test-redis.pid
SOCK_FILE
=
${
tmpdir
}
/hiredis-test-redis.sock
...
...
@@ -49,8 +56,10 @@ cleanup() {
}
trap
cleanup INT TERM EXIT
cat
>
${
tmpdir
}
/redis.conf
<<
EOF
daemonize yes
${
ENABLE_DEBUG_CMD
}
pidfile
${
PID_FILE
}
port
${
REDIS_PORT
}
bind 127.0.0.1
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment