示例#1
0
def mock(init_config, instance):
    check = MesosMaster(common.CHECK_NAME, init_config, [instance])
    check._get_master_roles = lambda v, x: json.loads(
        read_fixture('roles.json'))
    check._get_master_stats = lambda v, x: json.loads(
        read_fixture('stats.json'))
    check._get_master_state = lambda v, x: json.loads(
        read_fixture('state.json'))
    return check
示例#2
0
def check():
    check = MesosMaster(CHECK_NAME, {}, {})
    check._get_master_roles = lambda v, x, y, z: json.loads(
        read_fixture('roles.json'))
    check._get_master_stats = lambda v, x, y, z: json.loads(
        read_fixture('stats.json'))
    check._get_master_state = lambda v, x, y, z: json.loads(
        read_fixture('state.json'))

    return check