Skip to content

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mrodm committed Aug 27, 2024
1 parent 5cf76f3 commit 2de477a
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions internal/install/application_configuration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,22 @@ func TestSelectElasticAgentImageName_NextStackInOwnNamespace(t *testing.T) {
selected := selectElasticAgentImageName(version)
assert.Equal(t, selected, elasticAgentCompleteImageName)
}

func TestSelectElasticAgentImageName_WolfiImage(t *testing.T) {
version := "8.16.0-SNAPSHOT"
selected := selectElasticAgentImageName(version)
assert.Equal(t, selected, elasticAgentWolfiImageName)
}

func TestSelectElasticAgentImageName_DisableWolfiImageEnvVar(t *testing.T) {
version := "8.16.0-SNAPSHOT"
t.Setenv(disableElasticAgentWolfiEnvVar, "true")
selected := selectElasticAgentImageName(version)
assert.Equal(t, selected, elasticAgentCompleteImageName)
}
func TestSelectElasticAgentImageName_EnableWolfiImageEnvVar(t *testing.T) {
version := "8.16.0-SNAPSHOT"
t.Setenv(disableElasticAgentWolfiEnvVar, "false")
selected := selectElasticAgentImageName(version)
assert.Equal(t, selected, elasticAgentWolfiImageName)
}

0 comments on commit 2de477a

Please sign in to comment.