Merge pull request #153 from elipavlov/master

Reproduce error for #152 in test case
This commit is contained in:
Alan Hamlett 2018-10-23 07:54:04 -07:00 committed by GitHub
commit 84e0664d31
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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,
)
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):
tempdir = tempfile.mkdtemp()
shutil.copytree('tests/samples/projects/git-with-submodule', os.path.join(tempdir, 'git'))