Collect gitea sshd logs
Currently we don't have any logs from our gitea sshd processes because sshd logs to syslog by default and /dev/log isn't in our containers. You can ask sshd nicely to log to stderr instead with the -e flag which docker will pick up and store for us. Update the sshd command to include -e then use testinfra to check we collect logs and they are accssible from docker. Change-Id: Ib7d6d405554c3c30be410bc08c6fee7d4363b096
This commit is contained in:
parent
788d91df1f
commit
05e0ffdebc
@ -113,4 +113,4 @@ COPY sshd-entrypoint.sh /usr/bin/entrypoint
|
|||||||
EXPOSE 22
|
EXPOSE 22
|
||||||
VOLUME ["/data"]
|
VOLUME ["/data"]
|
||||||
ENTRYPOINT ["/usr/bin/entrypoint"]
|
ENTRYPOINT ["/usr/bin/entrypoint"]
|
||||||
CMD ["/usr/sbin/sshd", "-D"]
|
CMD ["/usr/sbin/sshd", "-D", "-e"]
|
||||||
|
@ -29,3 +29,7 @@ def test_ulimit(host):
|
|||||||
expected = ("STACK max stack size "
|
expected = ("STACK max stack size "
|
||||||
"16777216 9223372036854775807 bytes")
|
"16777216 9223372036854775807 bytes")
|
||||||
assert expected in cmd.stdout.split('\n')
|
assert expected in cmd.stdout.split('\n')
|
||||||
|
|
||||||
|
def test_sshd_logs(host):
|
||||||
|
cmd = host.run("docker logs giteadocker_gitea-ssh_1")
|
||||||
|
assert cmd.stdout != '' or cmd.stderr != ''
|
||||||
|
Loading…
Reference in New Issue
Block a user