feat: test locust installation

This commit is contained in:
Aravinth Manivannan 2023-08-17 05:06:17 +05:30
parent 83a1421314
commit fc4d54410d
Signed by: realaravinth
GPG key ID: AD9F0F08E855ED88

20
tests/locust/base.py Normal file
View file

@ -0,0 +1,20 @@
# SPDX-FileCopyrightText: 2023 Aravinth Manivannan <realaravinth@batsense.net>
#
# SPDX-License-Identifier: AGPL-3.0-or-later
import os
def test_locust_is_listening(host):
socket = host.socket(f"tcp://0.0.0.0:8089")
assert socket.is_listening
def test_locust_config_exists(host):
config = host.file("/etc/locust/docker-compose.yml")
assert config.exists
assert config.is_file
def test_docker_is_installed(host):
assert host.package("docker-compose").is_installed