iac/tests/locust/base.py

21 lines
494 B
Python
Raw Normal View History

2023-08-17 05:06:17 +05:30
# 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