From b220e6b45015a4e06d385cb0ed30606e50968bf6 Mon Sep 17 00:00:00 2001 From: Wen Hui Date: Wed, 19 Apr 2023 02:08:11 -0400 Subject: 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 * sentinel slaves (deprecated) --- src/commands/sentinel-masters.json | 12 +++++++++++- src/commands/sentinel-myid.json | 6 +++++- src/commands/sentinel-sentinels.json | 10 ++++++++++ src/commands/sentinel-slaves.json | 10 ++++++++++ 4 files changed, 36 insertions(+), 2 deletions(-) (limited to 'src/commands') diff --git a/src/commands/sentinel-masters.json b/src/commands/sentinel-masters.json index 0b6e15b63..1e96b7105 100644 --- a/src/commands/sentinel-masters.json +++ b/src/commands/sentinel-masters.json @@ -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" + } + } + } } } diff --git a/src/commands/sentinel-myid.json b/src/commands/sentinel-myid.json index a49c78bd9..4d366ebf3 100644 --- a/src/commands/sentinel-myid.json +++ b/src/commands/sentinel-myid.json @@ -11,6 +11,10 @@ "ADMIN", "SENTINEL", "ONLY_SENTINEL" - ] + ], + "reply_schema": { + "description": "Node ID of the sentinel instance.", + "type": "string" + } } } diff --git a/src/commands/sentinel-sentinels.json b/src/commands/sentinel-sentinels.json index 3a2c7362a..fdaa5cb99 100644 --- a/src/commands/sentinel-sentinels.json +++ b/src/commands/sentinel-sentinels.json @@ -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", diff --git a/src/commands/sentinel-slaves.json b/src/commands/sentinel-slaves.json index 83ee44d16..c1fec41bb 100644 --- a/src/commands/sentinel-slaves.json +++ b/src/commands/sentinel-slaves.json @@ -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", -- cgit v1.2.1