From 4aa0d4e470723f5a0356c3dce4b9e53dd33ced1c Mon Sep 17 00:00:00 2001 From: "Marcelo E. Magallon" Date: Mon, 9 Oct 2023 15:51:53 -0600 Subject: [PATCH] TestSettingsToScript passes Signed-off-by: Marcelo E. Magallon --- internal/prober/multihttp/script_test.go | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/internal/prober/multihttp/script_test.go b/internal/prober/multihttp/script_test.go index 1f097463..b75e85e0 100644 --- a/internal/prober/multihttp/script_test.go +++ b/internal/prober/multihttp/script_test.go @@ -660,12 +660,6 @@ func TestSettingsToScript(t *testing.T) { Url: testServer.URL + "/response-headers?foo=bar", }, Assertions: []*sm.MultiHttpEntryAssertion{ - { - Type: sm.MultiHttpEntryAssertionType_TEXT, - Subject: sm.MultiHttpEntryAssertionSubjectVariant_RESPONSE_BODY, - Condition: sm.MultiHttpEntryAssertionConditionVariant_CONTAINS, - Value: "httpbin", - }, { Type: sm.MultiHttpEntryAssertionType_TEXT, Subject: sm.MultiHttpEntryAssertionSubjectVariant_RESPONSE_HEADERS, @@ -764,7 +758,7 @@ func TestSettingsToScript(t *testing.T) { { Type: sm.MultiHttpEntryAssertionType_REGEX_ASSERTION, Subject: sm.MultiHttpEntryAssertionSubjectVariant_RESPONSE_HEADERS, - Expression: "Content-Type: .*; charset=utf-8", + Expression: "content-type: .*; charset=utf-8", }, { Type: sm.MultiHttpEntryAssertionType_REGEX_ASSERTION, @@ -827,9 +821,10 @@ func TestSettingsToScript(t *testing.T) { require.NotNil(t, userLogger) success := prober.Probe(ctx, check.Target, reg, userLogger) - require.True(t, success) - t.Log(buf.String()) + t.Log("Log entries:\n" + buf.String()) + + require.True(t, success) } func TestReplaceVariablesInString(t *testing.T) {