Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
terrareg
Manage
Activity
Members
Labels
Plan
Issues
191
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
19
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Public
terrareg
Merge requests
!83
Resolve "Provide better errors when cloning URL"
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Resolve "Provide better errors when cloning URL"
108-provide-better-errors-when-cloning-url
into
main
Overview
0
Commits
5
Pipelines
5
Changes
4
Merged
Matt
requested to merge
108-provide-better-errors-when-cloning-url
into
main
3 years ago
Overview
0
Commits
5
Pipelines
5
Changes
1
Expand
Closes
#108 (closed)
Edited
3 years ago
by
Matt
0
0
Merge request reports
Viewing commit
e6721fb9
Prev
Next
Show latest version
1 file
+
3
−
1
Expand all files
Preferences
File browser
List view
Tree view
Compare changes
Inline
Side-by-side
Show whitespace changes
Show one file at a time
e6721fb9
test: Issue
#108
Fix tests for module_extractor to check for new subprocess call
· e6721fb9
Matt
authored
3 years ago
test/unit/terrareg/test_module_extractor.py
+
3
−
1
Options
import
subprocess
from
unittest.main
import
MODULE_EXAMPLES
import
unittest.mock
@@ -32,7 +33,7 @@ class TestGitModuleExtractor(TerraregUnitTest):
check_call_mock
=
unittest
.
mock
.
MagicMock
()
module_extractor
=
GitModuleExtractor
(
module_version
=
module_version
)
with
unittest
.
mock
.
patch
(
'
terrareg.module_extractor.subprocess.check_
call
'
,
check_call_mock
):
with
unittest
.
mock
.
patch
(
'
terrareg.module_extractor.subprocess.check_
output
'
,
check_call_mock
):
with
module_extractor
as
me
:
me
.
_clone_repository
()
@@ -42,5 +43,6 @@ class TestGitModuleExtractor(TerraregUnitTest):
'
--branch
'
,
expected_git_tag
,
expected_git_url
,
module_extractor
.
extract_directory
],
stderr
=
subprocess
.
STDOUT
,
env
=
unittest
.
mock
.
ANY
)
assert
check_call_mock
.
call_args
.
kwargs
[
'
env
'
][
'
GIT_SSH_COMMAND
'
]
==
'
ssh -o StrictHostKeyChecking=accept-new
'