Skip to content

Commit 4de2f6c

Browse files
committed
Fix Vault health check
1 parent 0303d47 commit 4de2f6c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

modules/vault/testcontainers/vault/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
# under the License.
1313

1414
from http.client import HTTPException
15+
from urllib.error import URLError
1516
from urllib.request import urlopen
1617

1718
from testcontainers.core.container import DockerContainer
@@ -61,7 +62,7 @@ def get_connection_url(self) -> str:
6162
exposed_port = self.get_exposed_port(self.port)
6263
return f"http://{host_ip}:{exposed_port}"
6364

64-
@wait_container_is_ready(HTTPException)
65+
@wait_container_is_ready(HTTPException, URLError)
6566
def _healthcheck(self) -> None:
6667
url = f"{self.get_connection_url()}/v1/sys/health"
6768
with urlopen(url) as res:

0 commit comments

Comments
 (0)