Skip to content

Commit

Permalink
Merge pull request #657 from grisu48/git_healthcheck_startup
Browse files Browse the repository at this point in the history
Add startup delay of 1min to git healthcheck
  • Loading branch information
dirkmueller authored Nov 14, 2024
2 parents 7820786 + 111c689 commit 0fd5862
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tests/test_git.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from pytest_container.container import container_and_marks_from_pytest_param
from pytest_container.pod import Pod
from pytest_container.pod import PodData
from pytest_container.runtime import LOCALHOST

from bci_tester.data import GIT_CONTAINER

Expand All @@ -23,7 +24,8 @@

_SSH_PORT = 22022

_GIT_SERVER_CONTAINERFILE = rf"""
_GIT_SERVER_CONTAINERFILE = (
rf"""
RUN zypper -n in git-core openssh-server openssh-clients
RUN ssh-keygen -A
RUN useradd -U -m -p "*" git
Expand Down Expand Up @@ -56,8 +58,11 @@
CMD ["/usr/sbin/sshd", "-De"]
HEALTHCHECK --interval=5s --timeout=5s --retries=5 CMD ["/usr/bin/ssh-keyscan", "-vvv", "-H", "-p", "{_SSH_PORT}", "127.0.0.1"]
HEALTHCHECK --interval=5s --timeout=5s --retries=5"""
+ (" --start-period=1m" if LOCALHOST.system_info.arch == "ppc64le" else "")
+ """ CMD ["/usr/bin/ssh-keyscan", "-vvv", "-H", "-p", "{_SSH_PORT}", "127.0.0.1"]
"""
)


def test_git_version(auto_container):
Expand Down

0 comments on commit 0fd5862

Please sign in to comment.