From 56a253e62d0c78769d88d88edc22b3cfe20e45e2 Mon Sep 17 00:00:00 2001 From: Daniel Reuter Date: Fri, 27 Oct 2023 13:29:23 +0200 Subject: [PATCH] build: fix warning about missing shade plugin version --- CHANGELOG.md | 4 ++++ exthttpcheck/check.go | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 777d153..74de513 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ # Changelog +## v1.0.13 + +- Fix "Response Contains" check + ## v1.0.12 - Possibility to exclude attributes from discovery diff --git a/exthttpcheck/check.go b/exthttpcheck/check.go index 39ee89f..b1acf16 100644 --- a/exthttpcheck/check.go +++ b/exthttpcheck/check.go @@ -233,8 +233,9 @@ func requestWorker(executionRunData *ExecutionRunData, state *HTTPCheckState, ch responseBodyWasSuccessful = false } else { bodyString := string(bodyBytes) - metricMap["response_constraints_fulfilled"] = strconv.FormatBool(strings.Contains(bodyString, state.ResponsesContains)) - responseBodyWasSuccessful = true + responseConstraintFulfilled := strings.Contains(bodyString, state.ResponsesContains) + metricMap["response_constraints_fulfilled"] = strconv.FormatBool(responseConstraintFulfilled) + responseBodyWasSuccessful = responseConstraintFulfilled } } }