diff --git a/test/octopus_container_test_framework.go b/test/octopus_container_test_framework.go index 460df8b..7eadc46 100644 --- a/test/octopus_container_test_framework.go +++ b/test/octopus_container_test_framework.go @@ -60,7 +60,6 @@ func (g *TestLogConsumer) Accept(l testcontainers.Log) { var globalMutex = sync.Mutex{} type OctopusContainerTest struct { - OctopusVersion string CustomEnvironment map[string]string } @@ -155,9 +154,6 @@ func (o *OctopusContainerTest) getOctopusImageUrl() string { } func (o *OctopusContainerTest) getOctopusVersion() string { - if o.OctopusVersion != "" { - return o.OctopusVersion - } overrideOctoTag := os.Getenv("OCTOTESTVERSION") if overrideOctoTag != "" { return overrideOctoTag @@ -209,7 +205,7 @@ func (o *OctopusContainerTest) setupOctopus(ctx context.Context, connString stri network, }, } - + req.Env = o.AddCustomEnvironment(req.Env) log.Println("Creating Octopus container") diff --git a/test/octopus_container_test_framework_test.go b/test/octopus_container_test_framework_test.go index 68962a6..5bae98d 100644 --- a/test/octopus_container_test_framework_test.go +++ b/test/octopus_container_test_framework_test.go @@ -44,14 +44,3 @@ func TestContainerWithNoSpecifiedVersionWillUseLatest(t *testing.T) { t.Errorf("The OctopusServer version is %v", version) } } - -func TestContainerVersionCanBeOverridenAtConstruction(t *testing.T) { - sut := OctopusContainerTest{} - sut.OctopusVersion = "ArbitraryVersion" - - version := sut.getOctopusVersion() - - if version != "ArbitraryVersion" { - t.Errorf("The OctopusServer version is %v", version) - } -}