knox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kris...@apache.org
Subject [knox] branch master updated: KNOX-2007 - Ensure wait for vault to start on exposed port
Date Fri, 06 Sep 2019 20:03:47 GMT
This is an automated email from the ASF dual-hosted git repository.

krisden pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/knox.git


The following commit(s) were added to refs/heads/master by this push:
     new 62b7acf  KNOX-2007 - Ensure wait for vault to start on exposed port
62b7acf is described below

commit 62b7acf7c65d146b06bcd05ceaec256197b3799c
Author: Kevin Risden <krisden@apache.org>
AuthorDate: Fri Sep 6 15:32:26 2019 -0400

    KNOX-2007 - Ensure wait for vault to start on exposed port
---
 .../backend/hashicorp/vault/TestHashicorpVaultAliasService.java   | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/gateway-service-hashicorp-vault/src/test/java/org/apache/knox/gateway/backend/hashicorp/vault/TestHashicorpVaultAliasService.java
b/gateway-service-hashicorp-vault/src/test/java/org/apache/knox/gateway/backend/hashicorp/vault/TestHashicorpVaultAliasService.java
index 85430a9..9693ba2 100644
--- a/gateway-service-hashicorp-vault/src/test/java/org/apache/knox/gateway/backend/hashicorp/vault/TestHashicorpVaultAliasService.java
+++ b/gateway-service-hashicorp-vault/src/test/java/org/apache/knox/gateway/backend/hashicorp/vault/TestHashicorpVaultAliasService.java
@@ -71,7 +71,8 @@ public class TestHashicorpVaultAliasService {
     try {
       vaultContainer = new VaultContainer(vaultImage)
                            .withVaultToken(vaultToken)
-                           .waitingFor(Wait.forHttp("/"));
+                           .waitingFor(Wait.forListeningPort());
+      vaultContainer.addExposedPort(vaultPort);
     } catch (IllegalStateException e) {
       assumeNoException(e);
     }
@@ -93,8 +94,9 @@ public class TestHashicorpVaultAliasService {
   }
 
   private void setupVaultSecretsEngine() throws Exception {
-    vaultContainer.execInContainer("vault", "secrets", "enable", "-path=" + vaultSecretsEngine,
-        "-version=2", "kv");
+    Container.ExecResult execResult = vaultContainer.execInContainer("vault", "secrets",
+        "enable", "-path=" + vaultSecretsEngine, "-version=2", "kv");
+    assertEquals(0, execResult.getExitCode());
     LOG.debug("created KV secrets engine {}", vaultSecretsEngine);
   }
 


Mime
View raw message