Merge pull request #153 from elipavlov/master
Reproduce error for #152 in test case
This commit is contained in:
commit
84e0664d31
2 changed files with 21 additions and 0 deletions
6
tests/samples/configs/git-submodules-without-option.cfg
Normal file
6
tests/samples/configs/git-submodules-without-option.cfg
Normal file
|
@ -0,0 +1,6 @@
|
|||
[settings]
|
||||
debug = false
|
||||
api_key = 1090a6ae-855f-4be7-b8fb-3edbaf1aa3ec
|
||||
|
||||
[git]
|
||||
other_settings = true
|
|
@ -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'))
|
||||
|
|
Loading…
Reference in a new issue