Reproduce error for #152 in test case

This commit is contained in:
Ilya Pavlov 2018-10-23 16:51:04 +03:00
parent 0363d6c1ff
commit 396f2fd978
2 changed files with 21 additions and 0 deletions

View file

@ -0,0 +1,6 @@
[settings]
debug = false
api_key = 1090a6ae-855f-4be7-b8fb-3edbaf1aa3ec
[git]
other_settings = true

View file

@ -366,6 +366,21 @@ class ProjectTestCase(TestCase):
entity=entity, entity=entity,
) )
def test_git_submodule_without_option_submodule_disabled(self):
tempdir = tempfile.mkdtemp()
shutil.copytree('tests/samples/projects/git-with-submodule', os.path.join(tempdir, 'git'))
shutil.move(os.path.join(tempdir, 'git', 'dot_git'), os.path.join(tempdir, 'git', '.git'))
shutil.move(os.path.join(tempdir, 'git', 'asubmodule', 'dot_git'), os.path.join(tempdir, 'git', 'asubmodule', '.git'))
entity = os.path.join(tempdir, 'git', 'asubmodule', 'emptyfile.txt')
self.shared(
expected_project='asubmodule',
expected_branch='asubbranch',
entity=entity,
config='git-submodules-without-option.cfg',
)
def test_git_submodule_detected_and_enabled_globally(self): def test_git_submodule_detected_and_enabled_globally(self):
tempdir = tempfile.mkdtemp() tempdir = tempfile.mkdtemp()
shutil.copytree('tests/samples/projects/git-with-submodule', os.path.join(tempdir, 'git')) shutil.copytree('tests/samples/projects/git-with-submodule', os.path.join(tempdir, 'git'))