diff --git a/src/microcks-async-minion-container.ts b/src/microcks-async-minion-container.ts index 5d0d04d..454eb6b 100644 --- a/src/microcks-async-minion-container.ts +++ b/src/microcks-async-minion-container.ts @@ -23,9 +23,16 @@ export class MicrocksAsyncMinionContainer extends GenericContainer { private network: StartedNetwork; private extraProtocols: string = ""; - constructor(network: StartedNetwork, image = "quay.io/microcks/microcks-uber-async-minion:1.8.1") { + constructor(network: StartedNetwork, image = "quay.io/microcks/microcks-uber-async-minion:1.9.0") { super(image); this.network = network; + this.withNetwork(this.network) + .withNetworkAliases("microcks-async-minion") + .withEnvironment({ + MICROCKS_HOST_PORT: "microcks:" + MicrocksContainer.MICROCKS_HTTP_PORT + }) + .withExposedPorts(MicrocksAsyncMinionContainer.MICROCKS_ASYNC_MINION_HTTP_PORT) + .withWaitStrategy(Wait.forLogMessage(/.*Profile prod activated\..*/, 1)); } /** @@ -85,14 +92,6 @@ export class MicrocksAsyncMinionContainer extends GenericContainer { } public override async start(): Promise { - this.withNetwork(this.network) - .withNetworkAliases("microcks-async-minion") - .withEnvironment({ - MICROCKS_HOST_PORT: "microcks:" + MicrocksContainer.MICROCKS_HTTP_PORT - }) - .withExposedPorts(...(this.hasExposedPorts ? this.exposedPorts : [MicrocksAsyncMinionContainer.MICROCKS_ASYNC_MINION_HTTP_PORT])) - .withWaitStrategy(Wait.forLogMessage(/.*Profile prod activated\..*/, 1)); - return new StartedMicrocksAsyncMinionContainer(await super.start()); } diff --git a/src/microcks-container.ts b/src/microcks-container.ts index a2f2ad5..b60e72c 100644 --- a/src/microcks-container.ts +++ b/src/microcks-container.ts @@ -27,6 +27,8 @@ export class MicrocksContainer extends GenericContainer { constructor(image = "quay.io/microcks/microcks-uber:1.9.0") { super(image); + this.withExposedPorts(MicrocksContainer.MICROCKS_HTTP_PORT, MicrocksContainer.MICROCKS_GRPC_PORT) + .withWaitStrategy(Wait.forLogMessage(/.*Started MicrocksApplication.*/, 1)); } /** @@ -70,9 +72,6 @@ export class MicrocksContainer extends GenericContainer { } public override async start(): Promise { - this.withExposedPorts(...(this.hasExposedPorts ? this.exposedPorts : [MicrocksContainer.MICROCKS_HTTP_PORT, MicrocksContainer.MICROCKS_GRPC_PORT])) - .withWaitStrategy(Wait.forLogMessage(/.*Started MicrocksApplication.*/, 1)); - let startedContainer = new StartedMicrocksContainer(await super.start()); // Import artifacts declared in configuration. for (let i=0; i