Exemplo n.º 1
0
def test_clone_or_update():
    path = settings['WORKSPACE'] + '/test_clone'

    assert not (git.exists(path)), 'Directory should not exist.'
    git.clone_or_update(config, 'git://github.com/markstory/lint-review.git',
                        path, 'e4f880c77e6b2c81c81cad5d45dd4e1c39b919a0')
    assert git.exists(path)
    git.destroy(path)
Exemplo n.º 2
0
 def test_repo_operations(self):
     teardown_repo()
     res = git.clone(
         'git://github.com/markstory/lint-review.git',
         clone_path)
     assert res, 'Cloned successfully.'
     assert git.exists(clone_path), 'Cloned dir should be there.'
     git.destroy(clone_path)
     assert not(git.exists(clone_path)), 'Cloned dir should be gone.'
Exemplo n.º 3
0
def test_repo_operations():
    path = settings['WORKSPACE'] + '/test_clone'

    assert not (git.exists(path)), 'Directory should not exist.'
    res = git.clone('git://github.com/markstory/lint-review.git', path)
    assert res, 'Cloned successfully.'
    assert git.exists(path), 'Cloned dir should be there.'
    git.destroy(path)
    assert not (git.exists(path)), 'Cloned dir should be gone.'
Exemplo n.º 4
0
def test_clone_or_update():
    path = settings["WORKSPACE"] + "/test_clone"

    assert not (git.exists(path)), "Directory should not exist."
    git.clone_or_update(
        config, "git://github.com/markstory/lint-review.git", path, "e4f880c77e6b2c81c81cad5d45dd4e1c39b919a0"
    )
    assert git.exists(path)
    git.destroy(path)
Exemplo n.º 5
0
def test_repo_operations():
    path = settings["WORKSPACE"] + "/test_clone"

    assert not (git.exists(path)), "Directory should not exist."
    res = git.clone("git://github.com/markstory/lint-review.git", path)
    assert res, "Cloned successfully."
    assert git.exists(path), "Cloned dir should be there."
    git.destroy(path)
    assert not (git.exists(path)), "Cloned dir should be gone."
Exemplo n.º 6
0
def test_clone_or_update():
    path = settings['WORKSPACE'] + '/test_clone'

    assert not(git.exists(path)), 'Directory should not exist.'
    git.clone_or_update(
        'git://github.com/markstory/lint-review.git',
        path,
        'e4f880c77e6b2c81c81cad5d45dd4e1c39b919a0')
    assert git.exists(path)
    git.destroy(path)
Exemplo n.º 7
0
def test_repo_operations():
    path = settings['WORKSPACE'] + '/test_clone'

    assert not(git.exists(path)), 'Directory should not exist.'
    res = git.clone(
        'git://github.com/markstory/lint-review.git',
        path)
    assert res, 'Cloned successfully.'
    assert git.exists(path), 'Cloned dir should be there.'
    git.destroy(path)
    assert not(git.exists(path)), 'Cloned dir should be gone.'
Exemplo n.º 8
0
 def test_clone_or_update(self, mock_fetch, mock_checkout):
     teardown_repo()
     git.clone_or_update(
         config,
         'git://github.com/markstory/lint-review.git',
         clone_path,
         'e4f880c77e6b2c81c81cad5d45dd4e1c39b919a0')
     assert git.exists(clone_path)
Exemplo n.º 9
0
def test_exists__no_git():
    assert not git.exists(settings['WORKSPACE'])
Exemplo n.º 10
0
def test_exists__no_path():
    assert not git.exists(settings['WORKSPACE'] + '/herp/derp')
Exemplo n.º 11
0
def teardown_repo():
    if git.exists(clone_path):
        git.destroy(clone_path)
Exemplo n.º 12
0
def test_clone_or_update():
    git.clone_or_update(config, 'git://github.com/markstory/lint-review.git',
                        clone_path, 'e4f880c77e6b2c81c81cad5d45dd4e1c39b919a0')
    assert git.exists(clone_path)
Exemplo n.º 13
0
def test_exists__no_git():
    assert not git.exists(settings['WORKSPACE'])
Exemplo n.º 14
0
def test_exists__no_path():
    assert not git.exists(settings['WORKSPACE'] + '/herp/derp')
Exemplo n.º 15
0
def teardown_repo():
    if git.exists(clone_path):
        git.destroy(clone_path)
Exemplo n.º 16
0
def test_exists__no_path():
    assert not git.exists(settings["WORKSPACE"] + "/herp/derp")