mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-22 08:08:53 -05:00
Updating reply_schema for sentinal commands (#12018)
Some sentinel subcommands are missing the reply_schema in the json file, so add the proper reply_schema part in json file as sentinel replicas commands. The schema validator was skipping coverage test for sentinel commands, this was initially done just in order to focus on redis commands and leave sentinel coverage for later, so this check is now removed. sentinel commands that were missing reply schema: * sentinel masters * sentinel myid * sentinel sentinels <master-name> * sentinel slaves (deprecated) <master-name>
This commit is contained in:
parent
528b0e691e
commit
b220e6b450
@ -11,6 +11,16 @@
|
||||
"ADMIN",
|
||||
"SENTINEL",
|
||||
"ONLY_SENTINEL"
|
||||
]
|
||||
],
|
||||
"reply_schema": {
|
||||
"type": "array",
|
||||
"description": "List of monitored Redis masters, and their state.",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -11,6 +11,10 @@
|
||||
"ADMIN",
|
||||
"SENTINEL",
|
||||
"ONLY_SENTINEL"
|
||||
]
|
||||
],
|
||||
"reply_schema": {
|
||||
"description": "Node ID of the sentinel instance.",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -12,6 +12,16 @@
|
||||
"SENTINEL",
|
||||
"ONLY_SENTINEL"
|
||||
],
|
||||
"reply_schema": {
|
||||
"type": "array",
|
||||
"description": "List of sentinel instances, and their state.",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"arguments": [
|
||||
{
|
||||
"name": "master-name",
|
||||
|
@ -17,6 +17,16 @@
|
||||
"SENTINEL",
|
||||
"ONLY_SENTINEL"
|
||||
],
|
||||
"reply_schema": {
|
||||
"type": "array",
|
||||
"description": "List of monitored replicas, and their state.",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"arguments": [
|
||||
{
|
||||
"name": "master-name",
|
||||
|
@ -334,9 +334,7 @@ if __name__ == '__main__':
|
||||
print("Hits per command:")
|
||||
for k, v in sorted(command_counter.items()):
|
||||
print(f" {k}: {v}")
|
||||
# We don't care about SENTINEL commands
|
||||
not_hit = set(filter(lambda x: not x.startswith("sentinel"),
|
||||
set(docs.keys()) - set(command_counter.keys()) - set(IGNORED_COMMANDS)))
|
||||
not_hit = set(set(docs.keys()) - set(command_counter.keys()) - set(IGNORED_COMMANDS))
|
||||
if not_hit:
|
||||
if args.verbose:
|
||||
print("WARNING! The following commands were not hit at all:")
|
||||
|
Loading…
Reference in New Issue
Block a user