Пример #1
0
def test_dummy_source_dockerfile():
    """Test of DummySource used for source container builds

    Test if fake Dockerfile was properly injected to meet expectations of
    inner and core codebase
    """
    ds = DummySource(None, None)
    assert ds.get()
    assert os.path.exists(os.path.join(ds.get(), 'Dockerfile'))
Пример #2
0
def mock_source(source_dir):
    source = DummySource("git",
                         "https://git.host/app-operator",
                         workdir=str(source_dir))
    source.get()
    return source