Skip to content

Commit da98b90

Browse files
committed
Update to waitForContainer
See #781 (comment)
1 parent 39c2ac2 commit da98b90

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

internal/docker/deployer.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ func (d *Deployer) StartServer(hsDep *HomeserverDeployment) error {
313313
}
314314

315315
// Wait for the container to be ready.
316-
err = waitForPorts(ctx, d.Docker, hsDep.ContainerID)
316+
err = waitForContainer(ctx, d.Docker, hsDep.ContainerID)
317317
if err != nil {
318318
return fmt.Errorf("failed to wait for ports on container %s: %s", hsDep.ContainerID, err)
319319
}
@@ -455,7 +455,7 @@ func deployImage(
455455
}
456456

457457
// Wait for the container to be ready.
458-
err = waitForPorts(ctx, docker, containerID)
458+
err = waitForContainer(ctx, docker, containerID)
459459
if err != nil {
460460
return stubDeployment, fmt.Errorf("%s: failed to wait for ports on container %s: %w", contextStr, containerID, err)
461461
}
@@ -564,8 +564,8 @@ func getHostAccessibleHomeserverURLs(ctx context.Context, docker *client.Client,
564564
return baseURL, fedBaseURL, nil
565565
}
566566

567-
// waitForPorts waits until a homeserver container has NAT ports assigned.
568-
func waitForPorts(ctx context.Context, docker *client.Client, containerID string) (err error) {
567+
// waitForContainer waits until a homeserver container has NAT ports assigned.
568+
func waitForContainer(ctx context.Context, docker *client.Client, containerID string) (err error) {
569569
// We need to hammer the inspect endpoint until the ports show up, they don't appear immediately.
570570
inspectStartTime := time.Now()
571571
for time.Since(inspectStartTime) < time.Second {

0 commit comments

Comments
 (0)