Skip to content
This repository has been archived by the owner on Mar 31, 2022. It is now read-only.

Commit

Permalink
fix MainIT to work on Docker for Mac
Browse files Browse the repository at this point in the history
need to add a healthcheck to the TemporaryJob to avoid helios-testing
from thinking that the job is immediately available after the deploy
finishes.

see:
#13 (comment)
spotify/helios#916 (comment)
  • Loading branch information
mattnworb committed Jun 1, 2017
1 parent 8e24364 commit abb4800
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import com.google.common.io.Resources;
import com.google.common.net.HostAndPort;

import com.spotify.helios.common.descriptors.HealthCheck;
import com.spotify.helios.testing.HeliosDeploymentResource;
import com.spotify.helios.testing.HeliosSoloDeployment;
import com.spotify.helios.testing.TemporaryJob;
Expand Down Expand Up @@ -76,6 +77,11 @@ public void setUp() throws Exception {
Resources.getResource("META-INF/docker/com.spotify.it/backend/image-name"),
Charsets.UTF_8).trim())
.port("http", 1337)
.healthCheck(HealthCheck.newHttpHealthCheck()
.setPath("/api/version")
.setPort("http")
.build()
)
.deploy();
HostAndPort backendAddress = backendJob.address("http");
backend = httpUri(backendAddress);
Expand All @@ -85,6 +91,11 @@ public void setUp() throws Exception {
Charsets.UTF_8))
.command(backend.toString())
.port("http", 1338)
.healthCheck(HealthCheck.newHttpHealthCheck()
.setPath("/")
.setPort("http")
.build()
)
.deploy();
HostAndPort frontendAddress = frontendJob.address("http");
frontend = httpUri(frontendAddress);
Expand Down

0 comments on commit abb4800

Please sign in to comment.