From 0f4873e6b1d2d12ff0376f7af401551f01092a8d Mon Sep 17 00:00:00 2001 From: Mario Rodriguez Molins Date: Fri, 13 Sep 2024 13:25:13 +0200 Subject: [PATCH] Update tests --- .../install/application_configuration_test.go | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/internal/install/application_configuration_test.go b/internal/install/application_configuration_test.go index 20320a58c2..4e257608ee 100644 --- a/internal/install/application_configuration_test.go +++ b/internal/install/application_configuration_test.go @@ -14,43 +14,43 @@ import ( func TestSelectElasticAgentImageName_NoVersion(t *testing.T) { var version string selected := selectElasticAgentImageName(version, "") - assert.Equal(t, selected, elasticAgentLegacyImageName) + assert.Equal(t, elasticAgentWolfiImageName, selected) } func TestSelectElasticAgentImageName_OlderStack(t *testing.T) { version := "7.14.99-SNAPSHOT" selected := selectElasticAgentImageName(version, "") - assert.Equal(t, selected, elasticAgentLegacyImageName) + assert.Equal(t, elasticAgentLegacyImageName, selected) } func TestSelectElasticAgentImageName_FirstStackWithCompleteAgent(t *testing.T) { version := stackVersion715 selected := selectElasticAgentImageName(version, "") - assert.Equal(t, selected, elasticAgentCompleteLegacyImageName) + assert.Equal(t, elasticAgentCompleteLegacyImageName, selected) } func TestSelectElasticAgentImageName_NextStackWithAgentComplete(t *testing.T) { version := "7.16.0-SNAPSHOT" selected := selectElasticAgentImageName(version, "") - assert.Equal(t, selected, elasticAgentCompleteLegacyImageName) + assert.Equal(t, elasticAgentCompleteLegacyImageName, selected) } func TestSelectElasticAgentImageName_OwnNamespace(t *testing.T) { version := "8.2.0-SNAPSHOT" selected := selectElasticAgentImageName(version, "") - assert.Equal(t, selected, elasticAgentCompleteImageName) + assert.Equal(t, elasticAgentCompleteImageName, selected) } func TestSelectElasticAgentImageName_OwnNamespace_Release(t *testing.T) { version := "8.2.0" selected := selectElasticAgentImageName(version, "") - assert.Equal(t, selected, elasticAgentCompleteImageName) + assert.Equal(t, elasticAgentCompleteImageName, selected) } func TestSelectElasticAgentImageName_NextStackInOwnNamespace(t *testing.T) { version := "8.4.0-SNAPSHOT" selected := selectElasticAgentImageName(version, "") - assert.Equal(t, selected, elasticAgentCompleteImageName) + assert.Equal(t, elasticAgentCompleteImageName, selected) } func TestSelectElasticAgentImageName_DefaultImage816_WithoutEnvVar(t *testing.T) { @@ -60,56 +60,56 @@ func TestSelectElasticAgentImageName_DefaultImage816_WithoutEnvVar(t *testing.T) os.Unsetenv(disableElasticAgentWolfiEnvVar) selected := selectElasticAgentImageName(version, "") - assert.Equal(t, selected, elasticAgentWolfiImageName) + assert.Equal(t, elasticAgentWolfiImageName, selected) } func TestSelectElasticAgentImageName_DisableWolfiImageEnvVar(t *testing.T) { version := stackVersion8160 t.Setenv(disableElasticAgentWolfiEnvVar, "true") selected := selectElasticAgentImageName(version, "") - assert.Equal(t, selected, elasticAgentCompleteImageName) + assert.Equal(t, elasticAgentCompleteImageName, selected) } func TestSelectElasticAgentImageName_EnableWolfiImageEnvVar(t *testing.T) { version := stackVersion8160 t.Setenv(disableElasticAgentWolfiEnvVar, "false") selected := selectElasticAgentImageName(version, "") - assert.Equal(t, selected, elasticAgentWolfiImageName) + assert.Equal(t, elasticAgentWolfiImageName, selected) } func TestSelectCompleteElasticAgentImageName_ForceCompleteImage(t *testing.T) { version := stackVersion8160 selected := selectElasticAgentImageName(version, "complete") - assert.Equal(t, selected, elasticAgentCompleteImageName) + assert.Equal(t, elasticAgentCompleteImageName, selected) } func TestSelectCompleteElasticAgentImageName_ForceDefaultImage_DisabledEnvVar(t *testing.T) { version := stackVersion8160 t.Setenv(disableElasticAgentWolfiEnvVar, "true") selected := selectElasticAgentImageName(version, "default") - assert.Equal(t, selected, elasticAgentCompleteImageName) + assert.Equal(t, elasticAgentCompleteImageName, selected) } func TestSelectCompleteElasticAgentImageName_ForceDefaultImage_EnabledEnvVar(t *testing.T) { version := stackVersion8160 t.Setenv(disableElasticAgentWolfiEnvVar, "false") selected := selectElasticAgentImageName(version, "default") - assert.Equal(t, selected, elasticAgentWolfiImageName) + assert.Equal(t, elasticAgentWolfiImageName, selected) } func TestSelectCompleteElasticAgentImageName_ForceDefaultImageOldStack(t *testing.T) { version := "8.15.0-SNAPSHOT" selected := selectElasticAgentImageName(version, "default") - assert.Equal(t, selected, elasticAgentCompleteImageName) + assert.Equal(t, elasticAgentCompleteImageName, selected) } func TestSelectCompleteElasticAgentImageName_ForceSystemDImage(t *testing.T) { version := stackVersion8160 selected := selectElasticAgentImageName(version, "systemd") - assert.Equal(t, selected, elasticAgentImageName) + assert.Equal(t, elasticAgentImageName, selected) } func TestSelectCompleteElasticAgentImageName_ForceSystemDImageOldStack(t *testing.T) { version := stackVersion715 selected := selectElasticAgentImageName(version, "systemd") - assert.Equal(t, selected, elasticAgentLegacyImageName) + assert.Equal(t, elasticAgentLegacyImageName, selected) }