Exemplo n.º 1
0
def test_build_app():
    build_dir = mkdtemp()
    build.build_app('echo test_build_app > testfile', ref, build_id, build_dir)

    assert "test_build_app\n" == open(os.path.join(build_dir,
                                                   build_id,
                                                   'testfile')).read()

    rmtree(build_dir)
Exemplo n.º 2
0
def test_compress_dir():
    build_dir = mkdtemp()
    host_dir = mkdtemp()

    build.build_app('true', ref, build_id, build_dir)
    build.compress_dir(host_dir, build_dir, build_id)

    assert os.path.isfile(os.path.join(host_dir, build_id, 'release.tar'))

    rmtree(build_dir)
    rmtree(host_dir)