Beispiel #1
0
def test_integration():
    SLAVES = ('slave001', 'slave123')
    FRAMEWORKS = ('framework1', 'framework2')
    EXECUTORS = ('executor_a', 'executor_b')
    RUNS = ('001', '002', 'latest')

    with temporary_dir() as td:
        all_groups = set()
        for slave, framework, executor, run in itertools.product(
                SLAVES, FRAMEWORKS, EXECUTORS, RUNS):
            match = Match(td, slave, framework, executor, run)
            safe_mkdir(ExecutorDetector.path(match))
            all_groups.add(tuple(sorted(match.groups().items())))

        for match in ExecutorDetector(td):
            assert tuple(sorted(match.groups().items())) in all_groups