From 5745d90ce2f33283f17def6650aabaab1ad2d769 Mon Sep 17 00:00:00 2001 From: Pierre HILBERT Date: Wed, 18 Oct 2023 08:21:28 +0200 Subject: [PATCH] Changing tests according to behavior change --- libbeat/cmd/instance/beat_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libbeat/cmd/instance/beat_test.go b/libbeat/cmd/instance/beat_test.go index b6834d89b5d8..fc8c88a49159 100644 --- a/libbeat/cmd/instance/beat_test.go +++ b/libbeat/cmd/instance/beat_test.go @@ -236,7 +236,7 @@ func TestReloader(t *testing.T) { elasticsearch: hosts: ["https://127.0.0.1:9200"] username: "elastic" - allow_older_versions: true + allow_older_versions: false ` c, err := config.NewConfigWithYAML([]byte(cfg), cfg) require.NoError(t, err) @@ -248,13 +248,13 @@ elasticsearch: reloader := b.makeOutputReloader(m) require.False(t, b.Config.Output.IsSet(), "the output should not be set yet") - require.False(t, b.isConnectionToOlderVersionAllowed(), "the flag should not be present in the empty configuration") + require.True(t, b.isConnectionToOlderVersionAllowed(), "allow_older_versions flag should be true from 8.11") err = reloader.Reload(update) require.NoError(t, err) require.True(t, b.Config.Output.IsSet(), "now the output should be set") require.Equal(t, outCfg, b.Config.Output.Config()) require.Same(t, c, m.cfg.Config) - require.True(t, b.isConnectionToOlderVersionAllowed(), "the flag should be present") + require.False(t, b.isConnectionToOlderVersionAllowed(), "allow_older_versions flag should now be set to false") }) }