Skip to content

Commit 3313f22

Browse files
committed
allow parrot docker container to use custom startup time
1 parent 89e6d79 commit 3313f22

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/docker/test_env/parrot.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ const (
2424
defaultParrotImage = "kalverra/parrot"
2525
defaultParrotVersion = "v0.6.2"
2626
defaultParrotPort = "80"
27+
defaultStartupTimeout = 10 * time.Second
2728
)
2829

2930
// Parrot is a test environment component that wraps a Parrot server.
@@ -56,14 +57,18 @@ func NewParrot(networks []string, opts ...EnvComponentOption) *Parrot {
5657
EnvComponent: EnvComponent{
5758
ContainerName: fmt.Sprintf("%s-%s", "parrot", uuid.NewString()[0:3]),
5859
Networks: networks,
59-
StartupTimeout: 10 * time.Second,
6060
},
6161
l: log.Logger,
6262
}
6363
p.SetDefaultHooks()
6464
for _, opt := range opts {
6565
opt(&p.EnvComponent)
6666
}
67+
68+
if p.StartupTimeout == 0 {
69+
p.StartupTimeout = defaultStartupTimeout
70+
}
71+
6772
return p
6873
}
6974

0 commit comments

Comments
 (0)