mirror of
http://github.com/valkey-io/valkey
synced 2024-11-23 20:00:00 +00:00
Fix rename redis to valkey to pass reply-schemas-validator job (#133)
Signed-off-by: Vitah Lin <vitahlin@gmail.com>
This commit is contained in:
parent
ba8bda9cff
commit
98e7b41b85
@ -26,7 +26,7 @@ Basically, this is what it does:
|
||||
1. Goes over req-res files, generated by redis-servers, spawned by the testsuite (see logreqres.c)
|
||||
2. For each request-response pair, it validates the response against the request's reply_schema (obtained from COMMAND DOCS)
|
||||
|
||||
This script spins up a redis-server and a redis-cli in order to obtain COMMAND DOCS.
|
||||
This script spins up a valkey-server and a valkey-cli in order to obtain COMMAND DOCS.
|
||||
|
||||
In order to use this file you must run the redis testsuite with the following flags:
|
||||
./runtest --dont-clean --force-resp3 --log-req-res
|
||||
@ -241,7 +241,7 @@ def fetch_schemas(cli, port, args, docs):
|
||||
|
||||
while True:
|
||||
try:
|
||||
print('Connecting to Redis...')
|
||||
print('Connecting to Valkey...')
|
||||
r = redis.Redis(port=port)
|
||||
r.ping()
|
||||
break
|
||||
@ -271,9 +271,9 @@ if __name__ == '__main__':
|
||||
testdir = os.path.abspath(os.path.dirname(os.path.abspath(__file__)) + "/../tests")
|
||||
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('--server', type=str, default='%s/redis-server' % srcdir)
|
||||
parser.add_argument('--server', type=str, default='%s/valkey-server' % srcdir)
|
||||
parser.add_argument('--port', type=int, default=6534)
|
||||
parser.add_argument('--cli', type=str, default='%s/redis-cli' % srcdir)
|
||||
parser.add_argument('--cli', type=str, default='%s/valkey-cli' % srcdir)
|
||||
parser.add_argument('--module', type=str, action='append', default=[])
|
||||
parser.add_argument('--verbose', action='store_true')
|
||||
parser.add_argument('--fail-commands-not-all-hit', action='store_true')
|
||||
@ -282,8 +282,8 @@ if __name__ == '__main__':
|
||||
|
||||
docs = dict()
|
||||
|
||||
# Fetch schemas from a Redis instance
|
||||
print('Starting Redis server')
|
||||
# Fetch schemas from a Valkey instance
|
||||
print('Starting Valkey server')
|
||||
redis_args = [args.server, '--port', str(args.port)]
|
||||
for module in args.module:
|
||||
redis_args += ['--loadmodule', 'tests/modules/%s.so' % module]
|
||||
@ -291,7 +291,7 @@ if __name__ == '__main__':
|
||||
fetch_schemas(args.cli, args.port, redis_args, docs)
|
||||
|
||||
# Fetch schemas from a sentinel
|
||||
print('Starting Redis sentinel')
|
||||
print('Starting Valkey sentinel')
|
||||
|
||||
# Sentinel needs a config file to start
|
||||
config_file = "tmpsentinel.conf"
|
||||
@ -347,4 +347,3 @@ if __name__ == '__main__':
|
||||
if args.fail_commands_not_all_hit:
|
||||
print("ERROR! at least one command was not hit by the tests")
|
||||
sys.exit(1)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user