From dc9ca1b98da657fecfb5bc32b6a57d2b9931007a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20S=C3=B6derqvist?= Date: Mon, 13 Jan 2025 03:14:09 +0100 Subject: [PATCH] Test coverage for ECHO for reply schema validation (#1549) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit After #1545 disabled some tests for reply schema validation, we now have another issue that ECHO is not covered. ``` WARNING! The following commands were not hit at all: echo ERROR! at least one command was not hit by the tests ``` This patch adds a test case for ECHO in the unit/other test suite. I haven't checked if there are more commands that aren't covered. Signed-off-by: Viktor Söderqvist --- .github/workflows/daily.yml | 2 +- tests/unit/other.tcl | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/daily.yml b/.github/workflows/daily.yml index e1d577b51b..c0e7e4b446 100644 --- a/.github/workflows/daily.yml +++ b/.github/workflows/daily.yml @@ -1220,7 +1220,7 @@ jobs: if: | (github.event_name == 'workflow_dispatch' || (github.event_name == 'schedule' && github.repository == 'valkey-io/valkey') || - (github.event_name == 'pull_request' && github.event.pull_request.base.ref != 'unstable')) && + (github.event_name == 'pull_request' && (contains(github.event.pull_request.labels.*.name, 'run-extra-tests') || github.event.pull_request.base.ref != 'unstable'))) && !contains(github.event.inputs.skipjobs, 'reply-schema') steps: - name: prep diff --git a/tests/unit/other.tcl b/tests/unit/other.tcl index bb08c67471..225287aa3a 100644 --- a/tests/unit/other.tcl +++ b/tests/unit/other.tcl @@ -30,6 +30,10 @@ start_server {tags {"other"}} { } } + test {Coverage: ECHO} { + assert_equal bang [r ECHO bang] + } + test {SAVE - make sure there are all the types as values} { # Wait for a background saving in progress to terminate waitForBgsave r