Пример #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
Пример #2
0
def test_groups(aws_resource, aws_host, group):
    _, _, groups = aws_host(aws_resource, 'module_name')
    assert group in groups
Пример #3
0
def test_name(aws_resource, aws_host):
    name, _, _ = aws_host(aws_resource, '')
    assert name == 'mi-control-01'
Пример #4
0
def test_name(aws_resource, aws_host):
    name, _, _ = aws_host(aws_resource, '')
    assert name == 'mi-control-01'
Пример #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
Пример #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
Пример #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
Пример #10
0
def test_name(aws_resource, aws_host):
    name, _, _ = aws_host(aws_resource, "")
    assert name == "mi-control-01"
Пример #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"