Skip to content

Commit

Permalink
add test to prove env vars are added
Browse files Browse the repository at this point in the history
  • Loading branch information
rain-on committed Jul 18, 2024
1 parent 88eca7a commit bf10d9e
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/octopus_container_test_framework_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,22 @@ func TestCustomEnvironmentVariablesCannotOverrideImplicitValues(t *testing.T) {
}
}

func TestCustomEnvironmentVariablesAreAddedToEnvironment(t *testing.T) {

sut := OctopusContainerTest{}
sut.CustomEnvironment = make(map[string]string)

containerEnv := make(map[string]string)
containerEnv["1"] = "first"
containerEnv["2"] = "second"

fullEnv := sut.AddCustomEnvironment(containerEnv)

if fullEnv["1"] != "first" || fullEnv["2"] != "second" {
t.Error("The original environment was illegally modified")
}
}

func TestContainerWithNoSpecifiedVersionWillUseLatest(t *testing.T) {
sut := OctopusContainerTest{}

Expand Down

0 comments on commit bf10d9e

Please sign in to comment.