Beispiel #1
0
def test_git_remote_init_bundle(tmpdir):
    source = tmpdir.mkdir("source")
    dest = tmpdir.mkdir("dest")
    with source.as_cwd():
        remote_core.cmd("git init")
        source.join("foo.txt").write("bar")
        remote_core.cmd("git add foo.txt")
        remote_core.cmd("git commit -m bar")
        remote_core.cmd("git bundle create {} master ".format(
            dest.join("batou-bundle.git")))

    remote_core.ensure_repository(str(dest), "git-bundle")
    remote_core.git_unbundle_code()
    remote_core.git_update_working_copy("master")

    assert "bar" == dest.join("foo.txt").read()
Beispiel #2
0
def test_git_remote_init_bundle(tmpdir):
    source = tmpdir.mkdir('source')
    dest = tmpdir.mkdir('dest')
    with source.as_cwd():
        remote_core.cmd('git init')
        source.join('foo.txt').write('bar')
        remote_core.cmd('git add foo.txt')
        remote_core.cmd('git commit -m bar')
        remote_core.cmd('git bundle create {} master '.format(
            dest.join('batou-bundle.git')))

    remote_core.ensure_repository(str(dest), 'git-bundle')
    remote_core.git_unbundle_code()
    remote_core.git_update_working_copy('master')

    assert 'bar' == dest.join('foo.txt').read()
Beispiel #3
0
def test_cmd():
    result = remote_core.cmd('echo "asdf"')
    assert result == (b'asdf\n', b'')
Beispiel #4
0
def test_cmd():
    result = remote_core.cmd('echo "asdf"')
    assert result == (b"asdf\n", b"")