Example #1
0
def test_attrs(aws_resource, aws_host, attr, should):
    _, attrs, _ = aws_host(aws_resource, 'module_name')
    assert attr in attrs
    assert attrs[attr] == should
Example #2
0
def test_groups(aws_resource, aws_host, group):
    _, _, groups = aws_host(aws_resource, 'module_name')
    assert group in groups
Example #3
0
def test_name(aws_resource, aws_host):
    name, _, _ = aws_host(aws_resource, '')
    assert name == 'mi-control-01'
Example #4
0
def test_name(aws_resource, aws_host):
    name, _, _ = aws_host(aws_resource, '')
    assert name == 'mi-control-01'
Example #5
0
def test_attrs(aws_resource, aws_host, attr, should):
    _, attrs, _ = aws_host(aws_resource, 'module_name')
    assert attr in attrs
    assert attrs[attr] == should
Example #6
0
def test_groups(aws_resource, aws_host, group):
    _, _, groups = aws_host(aws_resource, 'module_name')
    assert group in groups
def test_groups(aws_resource, aws_host, group):
    _, _, groups = aws_host(aws_resource)
    assert group in groups
Example #8
0
def test_private_ip_default(aws_resource, aws_host):
    private_resource = deepcopy(aws_resource)
    private_resource["primary"]["attributes"]["public_ip"] = ""
    _, attrs, _ = aws_host(private_resource, 'module_name')
    assert attrs['ansible_ssh_host'] == '10.0.152.191'
def test_groups(aws_resource, aws_host, group):
    _, _, groups = aws_host(aws_resource)
    assert group in groups
Example #10
0
def test_name(aws_resource, aws_host):
    name, _, _ = aws_host(aws_resource, "")
    assert name == "mi-control-01"
Example #11
0
def test_private_ip_default(aws_resource, aws_host):
    private_resource = deepcopy(aws_resource)
    private_resource["primary"]["attributes"]["public_ip"] = ""
    _, attrs, _ = aws_host(private_resource, "module_name")
    assert attrs["ansible_ssh_host"] == "10.0.152.191"