コード例 #1
0
def test_machine_keys():
    schema = ResourceSchema().machine_schema
    assert 'hostname' in schema
    assert 'owner' in schema
    assert 'state' in schema
    assert 'job_id' in schema
    assert 'tags' in schema
コード例 #2
0
def test_domains():
    schema = ResourceSchema()
    domain_check(schema.machines, "machine")
    domain_check(schema.private_addresses, "private-address")
    domain_check(schema.public_addresses, "public-address")
コード例 #3
0
def test_address_unique():
    schema = ResourceSchema().address_schema
    assert schema['address']['unique']
コード例 #4
0
def test_address_required():
    schema = ResourceSchema().address_schema
    assert schema['address']['required']
コード例 #5
0
def test_address_keys():
    schema = ResourceSchema().address_schema
    assert 'address' in schema
    assert 'owner' in schema
コード例 #6
0
def test_machine_states():
    schema = ResourceSchema().machine_schema
    assert schema["state"]['allowed'] == [
        "pxe", "pxe_failed", "idle", "in_use", "needs_repair"
    ]
コード例 #7
0
def test_machine_unique():
    schema = ResourceSchema().machine_schema
    assert schema['hostname']['unique']
コード例 #8
0
def test_machine_required():
    schema = ResourceSchema().machine_schema
    assert schema['hostname']['required']
    assert schema['state']['required']