Skip to content

Commit

Permalink
Allow dind to be enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
mcasperson committed Jul 26, 2024
1 parent 2848f54 commit 6d01176
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions test/octopus_container_test_framework.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,11 @@ func (o *OctopusContainerTest) setupOctopus(ctx context.Context, connString stri
return nil, errors.New("the LICENSE environment variable must be set to a base 64 encoded Octopus license key")
}

disableDind := os.Getenv("OCTODISABLEDIND")
if disableDind == "" {
disableDind = "Y"
}

req := testcontainers.ContainerRequest{
Name: "octopus-" + uuid.New().String(),
Image: o.getOctopusImageUrl() + ":" + o.getOctopusVersion(),
Expand All @@ -201,14 +206,14 @@ func (o *OctopusContainerTest) setupOctopus(ctx context.Context, connString stri
"CONNSTRING": connString,
"CREATE_DB": "Y",
"ADMIN_API_KEY": ApiKey,
"DISABLE_DIND": "Y",
"DISABLE_DIND": disableDind,
"ADMIN_USERNAME": "admin",
"ADMIN_PASSWORD": "Password01!",
"OCTOPUS_SERVER_BASE64_LICENSE": os.Getenv("LICENSE"),
"LICENSE_BASE64": os.Getenv("LICENSE"),
"ENABLE_USAGE": "N",
},
Privileged: false,
Privileged: disableDind != "Y",
WaitingFor: wait.ForLog("Listening for HTTP requests on").WithStartupTimeout(30 * time.Minute),
Networks: []string{
network,
Expand Down

0 comments on commit 6d01176

Please sign in to comment.