Merge "Add zk test to check myid is set in service"

This commit is contained in:
Zuul 2023-10-24 18:38:03 +00:00 committed by Gerrit Code Review
commit a045d7590a

View File

@ -24,6 +24,12 @@ def test_id_file(host):
myid = host.file('/var/zookeeper/data/myid')
assert myid.content == b'4\n'
def test_zk_myid_is_set(host):
# Test that our wacky hostname regex results in the correct
# myid value in the running service.
cmd = host.run("docker logs zookeeper-compose_zk_1")
assert "[myid:4]" in cmd.stdout
def test_zk_listening(host):
zk = host.socket("tcp://0.0.0.0:2181")
assert zk.is_listening