Beispiel #1
0
def test_get_goodplay_config_defaults(tmpdir):
    playbook_path = tmpdir.join('test_playbook.yml').ensure(file=True)

    cfg = config.get_goodplay_config(playbook_path)

    assert isinstance(cfg, dict)
    assert cfg.get('platforms') == []
Beispiel #2
0
def test_get_goodplay_config(tmpdir):
    playbook_path = tmpdir.join('test_playbook.yml').ensure(file=True)

    tmpdir.join('.goodplay.yml').write('''---
platforms:
  - name: EL
    version: 7
    image: centos:centos7
''', ensure=True)

    cfg = config.get_goodplay_config(playbook_path)

    assert isinstance(cfg, dict)
    assert isinstance(cfg['platforms'], list)
    assert cfg['platforms'] == [
        dict(name='EL', version=7, image='centos:centos7')]
Beispiel #3
0
 def config(self):
     return get_goodplay_config(self.playbook_path)