DCD-436: Add flag to disable CloudWatch completely.

This commit is contained in:
Steve Smith
2019-09-12 10:57:45 +10:00
parent e1090ba4fe
commit ee6df8f8a8
11 changed files with 92 additions and 3 deletions

View File

@@ -0,0 +1,23 @@
import os
import pytest
import testinfra.utils.ansible_runner
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
@pytest.mark.parametrize('exe', [
'/usr/bin/ec2-metadata',
'/usr/bin/amazon-ssm-agent',
'/sbin/mount.efs'
])
def test_package_exes(host, exe):
assert host.file(exe).exists
@pytest.mark.parametrize('path', [
'/opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent',
'/opt/aws/amazon-cloudwatch-agent/etc/amazon-cloudwatch-agent.json'
])
def test_package_not_installed(host, path):
assert not host.file(path).exists