Skip to content

Commit 6d01176

Browse files
committed
Allow dind to be enabled
1 parent 2848f54 commit 6d01176

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

test/octopus_container_test_framework.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,11 @@ func (o *OctopusContainerTest) setupOctopus(ctx context.Context, connString stri
190190
return nil, errors.New("the LICENSE environment variable must be set to a base 64 encoded Octopus license key")
191191
}
192192

193+
disableDind := os.Getenv("OCTODISABLEDIND")
194+
if disableDind == "" {
195+
disableDind = "Y"
196+
}
197+
193198
req := testcontainers.ContainerRequest{
194199
Name: "octopus-" + uuid.New().String(),
195200
Image: o.getOctopusImageUrl() + ":" + o.getOctopusVersion(),
@@ -201,14 +206,14 @@ func (o *OctopusContainerTest) setupOctopus(ctx context.Context, connString stri
201206
"CONNSTRING": connString,
202207
"CREATE_DB": "Y",
203208
"ADMIN_API_KEY": ApiKey,
204-
"DISABLE_DIND": "Y",
209+
"DISABLE_DIND": disableDind,
205210
"ADMIN_USERNAME": "admin",
206211
"ADMIN_PASSWORD": "Password01!",
207212
"OCTOPUS_SERVER_BASE64_LICENSE": os.Getenv("LICENSE"),
208213
"LICENSE_BASE64": os.Getenv("LICENSE"),
209214
"ENABLE_USAGE": "N",
210215
},
211-
Privileged: false,
216+
Privileged: disableDind != "Y",
212217
WaitingFor: wait.ForLog("Listening for HTTP requests on").WithStartupTimeout(30 * time.Minute),
213218
Networks: []string{
214219
network,

0 commit comments

Comments
 (0)