示例#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"