Commit d5ae0656 authored by rajesh's avatar rajesh

Add testcases for clone using without ssh

parent 4322da16
Pipeline #1514 passed with stages
in 35 seconds
......@@ -144,7 +144,7 @@ class TestClitoo(object):
"""Test _run function of the git module."""
base_dir = os.path.dirname(os.path.abspath(__file__))
app_path = base_dir + "/clitoo/testcli"
cmd = ['clone', self.ssh_url]
cmd = ['clone', self.url]
cmd.append(app_path)
clitoo.git._run(cmd)
assert os.path.isdir(app_path)
......@@ -180,17 +180,17 @@ class TestClitoo(object):
with pytest.raises(AttributeError):
print(clitoo.exists())
# def test_environ_method(self):
# """Test clone feature with ssh key.
# Taken a clone using ssh and after check project directory is available
# or not.
# """
# os.environ['SSH_PRIVATE_KEY'] = ""
# base_dir = os.path.dirname(os.path.abspath(__file__))
# clitoo.git.clone(self.ssh_url, base_dir + "/clitoo/testclit")
# assert os.path.isdir(base_dir + "/clitoo/testclit")
# shutil.rmtree(base_dir + "/clitoo/testclit")
def test_environ_method(self):
"""Test clone feature with ssh key.
Taken a clone using ssh and after check project directory is available
or not.
"""
# os.environ['SSH_PRIVATE_KEY'] = ""
base_dir = os.path.dirname(os.path.abspath(__file__))
clitoo.git.clone(self.url, base_dir + "/clitoo/testclit")
assert os.path.isdir(base_dir + "/clitoo/testclit")
shutil.rmtree(base_dir + "/clitoo/testclit")
# def test_apply_cmd(self):
# """Test apply of the git module."""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment