Skip to content

Instantly share code, notes, and snippets.

@dsaltares
Last active September 3, 2017 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dsaltares/98a45a5f704483fba258f251d9f82dcc to your computer and use it in GitHub Desktop.
Save dsaltares/98a45a5f704483fba258f251d9f82dcc to your computer and use it in GitHub Desktop.
dothub error
C02RC5H0G8WP:dothub dsaltares$ make test
tox
GLOB sdist-make: /Users/dsaltares/github/dothub/setup.py
py27 inst-nodeps: /Users/dsaltares/github/dothub/.tox/dist/dothub-0.15.1.zip
py27 installed: betamax==0.8.0,click==6.6,coverage==4.3,deepdiff==2.5.3,dothub==0.15.1,Flask==0.12,funcsigs==1.0.2,gitdb2==2.0.0,github-token==0.1.0,GitPython==2.1.1,itsdangerous==0.24,Jinja2==2.9.4,MarkupSafe==0.23,mock==2.0.0,pbr==1.10.0,py==1.4.32,pytest==3.0.5,PyYAML==3.12,requests==2.12.4,sealedmock==0.3.0,six==1.10.0,smmap2==2.0.1,Werkzeug==0.11.15
py27 runtests: PYTHONHASHSEED='3216646903'
py27 runtests: commands[0] | py.test tests -vvvv
===================================================================================== test session starts ======================================================================================
platform darwin -- Python 2.7.10, pytest-3.0.5, py-1.4.32, pluggy-0.4.0 -- /Users/dsaltares/github/dothub/.tox/py27/bin/python
cachedir: .cache
rootdir: /Users/dsaltares/github/dothub, inifile:
plugins: betamax-0.8.0
collected 30 items
tests/integration/test_end_to_end.py::test_configure_org_vcr <- .tox/py27/lib/python2.7/site-packages/betamax/decorator.py FAILED
tests/integration/test_end_to_end.py::test_configure_repo_vcr <- .tox/py27/lib/python2.7/site-packages/betamax/decorator.py FAILED
tests/integration/test_end_to_end.py::test_configure_org SKIPPED
tests/integration/test_end_to_end.py::test_configure_repo SKIPPED
tests/integration/test_org.py::test_repo_serialization FAILED
tests/integration/test_org.py::test_org_push_without_changes FAILED
tests/integration/test_org.py::test_repo_push_with_changes FAILED
tests/integration/test_org.py::test_org_push_all_repos_without_changes FAILED
tests/integration/test_regex_dict.py::test_regex_dict PASSED
tests/integration/test_repo.py::test_repo_serialization FAILED
tests/integration/test_repo.py::test_repo_push_without_changes FAILED
tests/integration/test_repo.py::test_repo_push_with_changes FAILED
tests/unit/test_diff_dict.py::test_diff_empty_dicts PASSED
tests/unit/test_diff_dict.py::test_equal_dicts PASSED
tests/unit/test_diff_dict.py::test_full_diff_dicts PASSED
tests/unit/test_org.py::test_get_org_repos PASSED
tests/unit/test_repo.py::test_get_repo_config[options-response0-expected0] PASSED
tests/unit/test_repo.py::test_get_repo_config[collaborators-response1-expected1] PASSED
tests/unit/test_repo.py::test_get_repo_config[labels-response2-expected2] PASSED
tests/unit/test_repo.py::test_get_repo_config[hooks-response3-expected3] PASSED
tests/unit/test_repo.py::test_hooks_cannot_update_config_with_tokens PASSED
tests/unit/test_repo.py::test_hooks_can_update_not_config_with_tokens PASSED
tests/unit/test_runner.py::test_dothub_help PASSED
tests/unit/test_runner.py::test_dothub_repo_help FAILED
tests/unit/test_utils.py::test_extract_gh_info_for_ssh PASSED
tests/unit/test_utils.py::test_extract_gh_info_for_http PASSED
tests/unit/test_utils.py::test_confirm_changes_no_change PASSED
tests/unit/test_utils.py::test_confirm_changes_with_changes PASSED
tests/unit/test_utils.py::test_confirm_changes_missing_keys_are_ignored PASSED
tests/unit/test_utils.py::test_confirm_changes_str_unicode_changes_are_ignored PASSED
=========================================================================================== FAILURES ===========================================================================================
____________________________________________________________________________________ test_configure_org_vcr ____________________________________________________________________________________
args = (<requests.sessions.Session object at 0x10a2cef10>,), kwargs = {}, session = <requests.sessions.Session object at 0x10a2cef10>, recr = <betamax.recorder.Betamax object at 0x10a2f4490>
@functools.wraps(func)
def test_wrapper(*args, **kwargs):
session = requests.Session()
recr = recorder.Betamax(
session=session,
cassette_library_dir=cassette_library_dir,
default_cassette_options=default_cassette_options
)
if args:
fst, args = args[0], args[1:]
if isinstance(fst, unittest.TestCase):
args = (fst, session) + args
else:
args = (session, fst) + args
else:
args = (session,)
with recr.use_cassette(cassette_name, **use_cassette_kwargs):
> func(*args, **kwargs)
.tox/py27/lib/python2.7/site-packages/betamax/decorator.py:56:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/integration/test_end_to_end.py:204: in _
res = func(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
@vcr_requests('configure_org')
def test_configure_org_vcr():
runner = CliRunner()
with tempfile.NamedTemporaryFile() as test_config:
test_config_file = test_config.name
# ########################
# Test updating the config
# ########################
utils.serialize_yaml(ORG_CONFIG, test_config_file)
args = CLI_BASE_ARGS + ["org", "--name=dothub-sandbox", "push",
"--input_file=" + test_config_file]
result = runner.invoke(dothub, args, obj={})
> assert 0 == result.exit_code
E assert 0 == -1
E + where -1 = <Result GitCommandError()>.exit_code
tests/integration/test_end_to_end.py:249: AssertionError
------------------------------------------------------------------------------------- Captured stderr call -------------------------------------------------------------------------------------
DEBUG:git.cmd:Popen(['git', 'remote', 'get-url', '--all', 'origin'], cwd=/Users/dsaltares/github/dothub, universal_newlines=False, shell=None)
___________________________________________________________________________________ test_configure_repo_vcr ____________________________________________________________________________________
args = (<requests.sessions.Session object at 0x10a33c0d0>,), kwargs = {}, session = <requests.sessions.Session object at 0x10a33c0d0>, recr = <betamax.recorder.Betamax object at 0x10a33c2d0>
@functools.wraps(func)
def test_wrapper(*args, **kwargs):
session = requests.Session()
recr = recorder.Betamax(
session=session,
cassette_library_dir=cassette_library_dir,
default_cassette_options=default_cassette_options
)
if args:
fst, args = args[0], args[1:]
if isinstance(fst, unittest.TestCase):
args = (fst, session) + args
else:
args = (session, fst) + args
else:
args = (session,)
with recr.use_cassette(cassette_name, **use_cassette_kwargs):
> func(*args, **kwargs)
.tox/py27/lib/python2.7/site-packages/betamax/decorator.py:56:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/integration/test_end_to_end.py:204: in _
res = func(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
@vcr_requests('configure_repo')
def test_configure_repo_vcr():
runner = CliRunner()
with tempfile.NamedTemporaryFile() as test_config:
test_config_file = test_config.name
# ########################
# Test updating the config
# ########################
utils.serialize_yaml(REPO_CONFIG, test_config_file)
args = CLI_BASE_ARGS + ["repo", "--owner=dothub-sandbox", "--repository=test-repo",
"push", "--input_file=" + test_config_file]
result = runner.invoke(dothub, args, obj={})
> assert 0 == result.exit_code
E assert 0 == -1
E + where -1 = <Result GitCommandError()>.exit_code
tests/integration/test_end_to_end.py:224: AssertionError
------------------------------------------------------------------------------------- Captured stderr call -------------------------------------------------------------------------------------
DEBUG:git.cmd:Popen(['git', 'remote', 'get-url', '--all', 'origin'], cwd=/Users/dsaltares/github/dothub, universal_newlines=False, shell=None)
___________________________________________________________________________________ test_repo_serialization ____________________________________________________________________________________
session_mock = <SealedMock name='Session' id='4465974864'>
@sealedmock.patch("dothub.cli.github_helper.requests.Session")
def test_repo_serialization(session_mock):
runner = CliRunner()
session_mock.return_value.get.side_effect = data_utils.requests_mock(GET_REQUESTS)
session_mock.sealed = True
with tempfile.NamedTemporaryFile() as file_:
args = base_args + ["org", "--name=etcaterva", "pull",
"--output_file=" + file_.name]
result = runner.invoke(dothub, args, obj={})
> assert 0 == result.exit_code
E assert 0 == -1
E + where -1 = <Result GitCommandError()>.exit_code
tests/integration/test_org.py:126: AssertionError
________________________________________________________________________________ test_org_push_without_changes _________________________________________________________________________________
session_mock = <SealedMock name='Session' id='4468326800'>
@sealedmock.patch("dothub.cli.github_helper.requests.Session")
def test_org_push_without_changes(session_mock):
runner = CliRunner()
session_mock.return_value.get.side_effect = data_utils.requests_mock(GET_REQUESTS)
session_mock.sealed = True
with tempfile.NamedTemporaryFile() as file_:
with open(file_.name, 'w') as f:
f.write(EXPECTED_RESULT)
args = base_args + ["org", "--name=etcaterva", "push",
"--input_file=" + file_.name]
result = runner.invoke(dothub, args, obj={})
> assert 0 == result.exit_code
E assert 0 == -1
E + where -1 = <Result GitCommandError()>.exit_code
tests/integration/test_org.py:145: AssertionError
_________________________________________________________________________________ test_repo_push_with_changes __________________________________________________________________________________
session_mock = <SealedMock name='Session' id='4466133264'>
@sealedmock.patch("dothub.cli.github_helper.requests.Session")
def test_repo_push_with_changes(session_mock):
runner = CliRunner()
session_mock.return_value.get.side_effect = data_utils.requests_mock(GET_REQUESTS)
session_mock.return_value.post.return_value = mock.MagicMock()
session_mock.return_value.patch.return_value = mock.MagicMock()
session_mock.return_value.put.return_value = mock.MagicMock()
session_mock.return_value.delete.return_value = mock.MagicMock()
session_mock.sealed = True
new_config = yaml.safe_load(EXPECTED_RESULT)
# Remove a member
member_config = new_config['members'].pop("palvarez89")
# Add member
new_config['members']["new_member"] = member_config
# Updated member
new_config['members']["mariocj89"]["role"] = "member"
new_config["options"]["company"] = "Bloomberg"
team_config = new_config["teams"].pop("Automation")
new_config["teams"]["new_team"] = team_config
with tempfile.NamedTemporaryFile() as file_:
with open(file_.name, 'w') as f:
yaml.safe_dump(new_config, f, encoding='utf-8', allow_unicode=True,
default_flow_style=False)
args = base_args + ["org", "--name=etcaterva", "push",
"--input_file=" + file_.name]
result = runner.invoke(dothub, args, obj={})
> assert 0 == result.exit_code
E assert 0 == -1
E + where -1 = <Result GitCommandError()>.exit_code
tests/integration/test_org.py:181: AssertionError
___________________________________________________________________________ test_org_push_all_repos_without_changes ____________________________________________________________________________
session_mock = <SealedMock name='Session' id='4468204944'>
@sealedmock.patch("dothub.cli.github_helper.requests.Session")
def test_org_push_all_repos_without_changes(session_mock):
runner = CliRunner()
session_mock.return_value.get.side_effect = data_utils.requests_mock(GET_REQUESTS)
session_mock.sealed = True
with tempfile.NamedTemporaryFile() as file_:
utils.serialize_yaml(SAMPLE_REPO_CONFIG, file_.name)
args = base_args + ["org", "--name=etcaterva", "repos",
"--input_file=" + file_.name]
result = runner.invoke(dothub, args, obj={})
> assert 0 == result.exit_code
E assert 0 == -1
E + where -1 = <Result GitCommandError()>.exit_code
tests/integration/test_org.py:199: AssertionError
___________________________________________________________________________________ test_repo_serialization ____________________________________________________________________________________
session_mock = <SealedMock name='Session' id='4465989392'>
@sealedmock.patch("dothub.cli.github_helper.requests.Session")
def test_repo_serialization(session_mock):
runner = CliRunner()
session_mock.return_value.get.side_effect = get_mock_response
session_mock.sealed = True
with tempfile.NamedTemporaryFile() as file_:
args = base_args + ["repo", "--owner=org", "--repository=repo", "pull",
"--output_file=" + file_.name]
result = runner.invoke(dothub, args, obj={})
> assert 0 == result.exit_code
E assert 0 == -1
E + where -1 = <Result GitCommandError()>.exit_code
tests/integration/test_repo.py:85: AssertionError
________________________________________________________________________________ test_repo_push_without_changes ________________________________________________________________________________
session_mock = <SealedMock name='Session' id='4466593296'>
@sealedmock.patch("dothub.cli.github_helper.requests.Session")
def test_repo_push_without_changes(session_mock):
runner = CliRunner()
session_mock.return_value.get.side_effect = get_mock_response
session_mock.sealed = True
with tempfile.NamedTemporaryFile() as file_:
with open(file_.name, 'w') as f:
f.write(EXPECTED_RESULT)
args = base_args + ["repo", "--owner=org", "--repository=repo", "push",
"--input_file=" + file_.name]
result = runner.invoke(dothub, args, obj={})
> assert 0 == result.exit_code
E assert 0 == -1
E + where -1 = <Result GitCommandError()>.exit_code
tests/integration/test_repo.py:104: AssertionError
_________________________________________________________________________________ test_repo_push_with_changes __________________________________________________________________________________
session_mock = <SealedMock name='Session' id='4468156816'>
@sealedmock.patch("dothub.cli.github_helper.requests.Session")
def test_repo_push_with_changes(session_mock):
runner = CliRunner()
session_mock.return_value.get.side_effect = get_mock_response
session_mock.return_value.post.return_value = Mock()
session_mock.return_value.patch.return_value = Mock()
session_mock.return_value.put.return_value = Mock()
session_mock.return_value.delete.return_value = Mock()
session_mock.sealed = True
new_config = yaml.safe_load(EXPECTED_RESULT)
# Rename collaborator
new_config['collaborators']['new_collaborators'] = new_config['collaborators'].pop("mariocj89")
# Rename label
new_config["labels"]["cool_bug"] = new_config["labels"].pop("bug")
# Update label
new_config["labels"]["question"]["color"] = "000000"
# Update options
new_config["options"]["description"] = "Yet a cooler description"
with tempfile.NamedTemporaryFile() as file_:
with open(file_.name, 'w') as f:
yaml.safe_dump(new_config, f, encoding='utf-8', allow_unicode=True,
default_flow_style=False)
args = base_args + ["repo", "--owner=org", "--repository=repo", "push",
"--input_file=" + file_.name]
result = runner.invoke(dothub, args, obj={})
> assert 0 == result.exit_code
E assert 0 == -1
E + where -1 = <Result GitCommandError()>.exit_code
tests/integration/test_repo.py:139: AssertionError
____________________________________________________________________________________ test_dothub_repo_help _____________________________________________________________________________________
def test_dothub_repo_help():
runner = CliRunner()
result = runner.invoke(dothub, base_args + ['repo', "--help"], obj={})
> assert result.exit_code == 0
E assert -1 == 0
E + where -1 = <Result GitCommandError()>.exit_code
tests/unit/test_runner.py:17: AssertionError
======================================================================= 10 failed, 18 passed, 2 skipped in 0.46 seconds ========================================================================
ERROR: InvocationError: '/Users/dsaltares/github/dothub/.tox/py27/bin/py.test tests -vvvv'
py36 create: /Users/dsaltares/github/dothub/.tox/py36
py36 installdeps: -rrequirements.txt
py36 inst: /Users/dsaltares/github/dothub/.tox/dist/dothub-0.15.1.zip
py36 installed: betamax==0.8.0,click==6.6,coverage==4.3,deepdiff==2.5.3,dothub==0.15.1,Flask==0.12,funcsigs==1.0.2,gitdb2==2.0.0,github-token==0.1.0,GitPython==2.1.1,itsdangerous==0.24,Jinja2==2.9.4,MarkupSafe==0.23,mock==2.0.0,pbr==1.10.0,py==1.4.32,pytest==3.0.5,PyYAML==3.12,requests==2.12.4,sealedmock==0.3.0,six==1.10.0,smmap2==2.0.1,Werkzeug==0.11.15
py36 runtests: PYTHONHASHSEED='3216646903'
py36 runtests: commands[0] | py.test tests -vvvv
===================================================================================== test session starts ======================================================================================
platform darwin -- Python 3.6.2, pytest-3.0.5, py-1.4.32, pluggy-0.4.0 -- /Users/dsaltares/github/dothub/.tox/py36/bin/python3.6
cachedir: .cache
rootdir: /Users/dsaltares/github/dothub, inifile:
plugins: betamax-0.8.0
collected 30 items
tests/integration/test_end_to_end.py::test_configure_org SKIPPED
tests/integration/test_end_to_end.py::test_configure_repo SKIPPED
tests/integration/test_end_to_end.py::test_configure_repo_vcr FAILED
tests/integration/test_end_to_end.py::test_configure_org_vcr FAILED
tests/integration/test_org.py::test_repo_serialization FAILED
tests/integration/test_org.py::test_org_push_without_changes FAILED
tests/integration/test_org.py::test_repo_push_with_changes FAILED
tests/integration/test_org.py::test_org_push_all_repos_without_changes FAILED
tests/integration/test_regex_dict.py::test_regex_dict PASSED
tests/integration/test_repo.py::test_repo_serialization FAILED
tests/integration/test_repo.py::test_repo_push_without_changes FAILED
tests/integration/test_repo.py::test_repo_push_with_changes FAILED
tests/unit/test_diff_dict.py::test_diff_empty_dicts PASSED
tests/unit/test_diff_dict.py::test_equal_dicts PASSED
tests/unit/test_diff_dict.py::test_full_diff_dicts PASSED
tests/unit/test_org.py::test_get_org_repos PASSED
tests/unit/test_repo.py::test_get_repo_config[options-response0-expected0] PASSED
tests/unit/test_repo.py::test_get_repo_config[collaborators-response1-expected1] PASSED
tests/unit/test_repo.py::test_get_repo_config[labels-response2-expected2] PASSED
tests/unit/test_repo.py::test_get_repo_config[hooks-response3-expected3] PASSED
tests/unit/test_repo.py::test_hooks_cannot_update_config_with_tokens PASSED
tests/unit/test_repo.py::test_hooks_can_update_not_config_with_tokens PASSED
tests/unit/test_runner.py::test_dothub_help PASSED
tests/unit/test_runner.py::test_dothub_repo_help FAILED
tests/unit/test_utils.py::test_extract_gh_info_for_ssh PASSED
tests/unit/test_utils.py::test_extract_gh_info_for_http PASSED
tests/unit/test_utils.py::test_confirm_changes_no_change PASSED
tests/unit/test_utils.py::test_confirm_changes_with_changes PASSED
tests/unit/test_utils.py::test_confirm_changes_missing_keys_are_ignored PASSED
tests/unit/test_utils.py::test_confirm_changes_str_unicode_changes_are_ignored PASSED
=========================================================================================== FAILURES ===========================================================================================
___________________________________________________________________________________ test_configure_repo_vcr ____________________________________________________________________________________
args = [], kwargs = {}, vcr_session = <requests.sessions.Session object at 0x1035551d0>
@use_cassette(cassete_name, cassette_library_dir=CASSETTE_DIR, record='none')
def _(*args, **kwargs):
args = list(args)
vcr_session = args.pop(0)
# Patch the global session
github_helper.GitHub._session = vcr_session
> res = func(*args, **kwargs)
tests/integration/test_end_to_end.py:204:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
@vcr_requests('configure_repo')
def test_configure_repo_vcr():
runner = CliRunner()
with tempfile.NamedTemporaryFile() as test_config:
test_config_file = test_config.name
# ########################
# Test updating the config
# ########################
utils.serialize_yaml(REPO_CONFIG, test_config_file)
args = CLI_BASE_ARGS + ["repo", "--owner=dothub-sandbox", "--repository=test-repo",
"push", "--input_file=" + test_config_file]
result = runner.invoke(dothub, args, obj={})
> assert 0 == result.exit_code
E assert 0 == -1
E + where -1 = <Result GitCommandError(['git', 'remote', 'get-url', '--all', 'origin'], 128, b"error: Could not expand include path '~/.gitcinclude'\nfatal: bad config file line 49 in /usr/local/git/etc/gitconfig", b'')>.exit_code
tests/integration/test_end_to_end.py:224: AssertionError
------------------------------------------------------------------------------------- Captured stderr call -------------------------------------------------------------------------------------
DEBUG:git.cmd:Popen(['git', 'remote', 'get-url', '--all', 'origin'], cwd=/Users/dsaltares/github/dothub, universal_newlines=False, shell=None)
____________________________________________________________________________________ test_configure_org_vcr ____________________________________________________________________________________
args = [], kwargs = {}, vcr_session = <requests.sessions.Session object at 0x1043b4630>
@use_cassette(cassete_name, cassette_library_dir=CASSETTE_DIR, record='none')
def _(*args, **kwargs):
args = list(args)
vcr_session = args.pop(0)
# Patch the global session
github_helper.GitHub._session = vcr_session
> res = func(*args, **kwargs)
tests/integration/test_end_to_end.py:204:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
@vcr_requests('configure_org')
def test_configure_org_vcr():
runner = CliRunner()
with tempfile.NamedTemporaryFile() as test_config:
test_config_file = test_config.name
# ########################
# Test updating the config
# ########################
utils.serialize_yaml(ORG_CONFIG, test_config_file)
args = CLI_BASE_ARGS + ["org", "--name=dothub-sandbox", "push",
"--input_file=" + test_config_file]
result = runner.invoke(dothub, args, obj={})
> assert 0 == result.exit_code
E assert 0 == -1
E + where -1 = <Result GitCommandError(['git', 'remote', 'get-url', '--all', 'origin'], 128, b"error: Could not expand include path '~/.gitcinclude'\nfatal: bad config file line 49 in /usr/local/git/etc/gitconfig", b'')>.exit_code
tests/integration/test_end_to_end.py:249: AssertionError
------------------------------------------------------------------------------------- Captured stderr call -------------------------------------------------------------------------------------
DEBUG:git.cmd:Popen(['git', 'remote', 'get-url', '--all', 'origin'], cwd=/Users/dsaltares/github/dothub, universal_newlines=False, shell=None)
___________________________________________________________________________________ test_repo_serialization ____________________________________________________________________________________
session_mock = <SealedMock name='Session' id='4365846008'>
@sealedmock.patch("dothub.cli.github_helper.requests.Session")
def test_repo_serialization(session_mock):
runner = CliRunner()
session_mock.return_value.get.side_effect = data_utils.requests_mock(GET_REQUESTS)
session_mock.sealed = True
with tempfile.NamedTemporaryFile() as file_:
args = base_args + ["org", "--name=etcaterva", "pull",
"--output_file=" + file_.name]
result = runner.invoke(dothub, args, obj={})
> assert 0 == result.exit_code
E assert 0 == -1
E + where -1 = <Result GitCommandError(['git', 'remote', 'get-url', '--all', 'origin'], 128, b"error: Could not expand include path '~/.gitcinclude'\nfatal: bad config file line 49 in /usr/local/git/etc/gitconfig", b'')>.exit_code
tests/integration/test_org.py:126: AssertionError
________________________________________________________________________________ test_org_push_without_changes _________________________________________________________________________________
session_mock = <SealedMock name='Session' id='4365942344'>
@sealedmock.patch("dothub.cli.github_helper.requests.Session")
def test_org_push_without_changes(session_mock):
runner = CliRunner()
session_mock.return_value.get.side_effect = data_utils.requests_mock(GET_REQUESTS)
session_mock.sealed = True
with tempfile.NamedTemporaryFile() as file_:
with open(file_.name, 'w') as f:
f.write(EXPECTED_RESULT)
args = base_args + ["org", "--name=etcaterva", "push",
"--input_file=" + file_.name]
result = runner.invoke(dothub, args, obj={})
> assert 0 == result.exit_code
E assert 0 == -1
E + where -1 = <Result GitCommandError(['git', 'remote', 'get-url', '--all', 'origin'], 128, b"error: Could not expand include path '~/.gitcinclude'\nfatal: bad config file line 49 in /usr/local/git/etc/gitconfig", b'')>.exit_code
tests/integration/test_org.py:145: AssertionError
_________________________________________________________________________________ test_repo_push_with_changes __________________________________________________________________________________
session_mock = <SealedMock name='Session' id='4365560408'>
@sealedmock.patch("dothub.cli.github_helper.requests.Session")
def test_repo_push_with_changes(session_mock):
runner = CliRunner()
session_mock.return_value.get.side_effect = data_utils.requests_mock(GET_REQUESTS)
session_mock.return_value.post.return_value = mock.MagicMock()
session_mock.return_value.patch.return_value = mock.MagicMock()
session_mock.return_value.put.return_value = mock.MagicMock()
session_mock.return_value.delete.return_value = mock.MagicMock()
session_mock.sealed = True
new_config = yaml.safe_load(EXPECTED_RESULT)
# Remove a member
member_config = new_config['members'].pop("palvarez89")
# Add member
new_config['members']["new_member"] = member_config
# Updated member
new_config['members']["mariocj89"]["role"] = "member"
new_config["options"]["company"] = "Bloomberg"
team_config = new_config["teams"].pop("Automation")
new_config["teams"]["new_team"] = team_config
with tempfile.NamedTemporaryFile() as file_:
with open(file_.name, 'w') as f:
yaml.safe_dump(new_config, f, encoding='utf-8', allow_unicode=True,
default_flow_style=False)
args = base_args + ["org", "--name=etcaterva", "push",
"--input_file=" + file_.name]
result = runner.invoke(dothub, args, obj={})
> assert 0 == result.exit_code
E assert 0 == -1
E + where -1 = <Result GitCommandError(['git', 'remote', 'get-url', '--all', 'origin'], 128, b"error: Could not expand include path '~/.gitcinclude'\nfatal: bad config file line 49 in /usr/local/git/etc/gitconfig", b'')>.exit_code
tests/integration/test_org.py:181: AssertionError
___________________________________________________________________________ test_org_push_all_repos_without_changes ____________________________________________________________________________
session_mock = <SealedMock name='Session' id='4365058624'>
@sealedmock.patch("dothub.cli.github_helper.requests.Session")
def test_org_push_all_repos_without_changes(session_mock):
runner = CliRunner()
session_mock.return_value.get.side_effect = data_utils.requests_mock(GET_REQUESTS)
session_mock.sealed = True
with tempfile.NamedTemporaryFile() as file_:
utils.serialize_yaml(SAMPLE_REPO_CONFIG, file_.name)
args = base_args + ["org", "--name=etcaterva", "repos",
"--input_file=" + file_.name]
result = runner.invoke(dothub, args, obj={})
> assert 0 == result.exit_code
E assert 0 == -1
E + where -1 = <Result GitCommandError(['git', 'remote', 'get-url', '--all', 'origin'], 128, b"error: Could not expand include path '~/.gitcinclude'\nfatal: bad config file line 49 in /usr/local/git/etc/gitconfig", b'')>.exit_code
tests/integration/test_org.py:199: AssertionError
___________________________________________________________________________________ test_repo_serialization ____________________________________________________________________________________
session_mock = <SealedMock name='Session' id='4365461768'>
@sealedmock.patch("dothub.cli.github_helper.requests.Session")
def test_repo_serialization(session_mock):
runner = CliRunner()
session_mock.return_value.get.side_effect = get_mock_response
session_mock.sealed = True
with tempfile.NamedTemporaryFile() as file_:
args = base_args + ["repo", "--owner=org", "--repository=repo", "pull",
"--output_file=" + file_.name]
result = runner.invoke(dothub, args, obj={})
> assert 0 == result.exit_code
E assert 0 == -1
E + where -1 = <Result GitCommandError(['git', 'remote', 'get-url', '--all', 'origin'], 128, b"error: Could not expand include path '~/.gitcinclude'\nfatal: bad config file line 49 in /usr/local/git/etc/gitconfig", b'')>.exit_code
tests/integration/test_repo.py:85: AssertionError
________________________________________________________________________________ test_repo_push_without_changes ________________________________________________________________________________
session_mock = <SealedMock name='Session' id='4366035544'>
@sealedmock.patch("dothub.cli.github_helper.requests.Session")
def test_repo_push_without_changes(session_mock):
runner = CliRunner()
session_mock.return_value.get.side_effect = get_mock_response
session_mock.sealed = True
with tempfile.NamedTemporaryFile() as file_:
with open(file_.name, 'w') as f:
f.write(EXPECTED_RESULT)
args = base_args + ["repo", "--owner=org", "--repository=repo", "push",
"--input_file=" + file_.name]
result = runner.invoke(dothub, args, obj={})
> assert 0 == result.exit_code
E assert 0 == -1
E + where -1 = <Result GitCommandError(['git', 'remote', 'get-url', '--all', 'origin'], 128, b"error: Could not expand include path '~/.gitcinclude'\nfatal: bad config file line 49 in /usr/local/git/etc/gitconfig", b'')>.exit_code
tests/integration/test_repo.py:104: AssertionError
_________________________________________________________________________________ test_repo_push_with_changes __________________________________________________________________________________
session_mock = <SealedMock name='Session' id='4366299376'>
@sealedmock.patch("dothub.cli.github_helper.requests.Session")
def test_repo_push_with_changes(session_mock):
runner = CliRunner()
session_mock.return_value.get.side_effect = get_mock_response
session_mock.return_value.post.return_value = Mock()
session_mock.return_value.patch.return_value = Mock()
session_mock.return_value.put.return_value = Mock()
session_mock.return_value.delete.return_value = Mock()
session_mock.sealed = True
new_config = yaml.safe_load(EXPECTED_RESULT)
# Rename collaborator
new_config['collaborators']['new_collaborators'] = new_config['collaborators'].pop("mariocj89")
# Rename label
new_config["labels"]["cool_bug"] = new_config["labels"].pop("bug")
# Update label
new_config["labels"]["question"]["color"] = "000000"
# Update options
new_config["options"]["description"] = "Yet a cooler description"
with tempfile.NamedTemporaryFile() as file_:
with open(file_.name, 'w') as f:
yaml.safe_dump(new_config, f, encoding='utf-8', allow_unicode=True,
default_flow_style=False)
args = base_args + ["repo", "--owner=org", "--repository=repo", "push",
"--input_file=" + file_.name]
result = runner.invoke(dothub, args, obj={})
> assert 0 == result.exit_code
E assert 0 == -1
E + where -1 = <Result GitCommandError(['git', 'remote', 'get-url', '--all', 'origin'], 128, b"error: Could not expand include path '~/.gitcinclude'\nfatal: bad config file line 49 in /usr/local/git/etc/gitconfig", b'')>.exit_code
tests/integration/test_repo.py:139: AssertionError
____________________________________________________________________________________ test_dothub_repo_help _____________________________________________________________________________________
def test_dothub_repo_help():
runner = CliRunner()
result = runner.invoke(dothub, base_args + ['repo', "--help"], obj={})
> assert result.exit_code == 0
E assert -1 == 0
E + where -1 = <Result GitCommandError(['git', 'remote', 'get-url', '--all', 'origin'], 128, b"error: Could not expand include path '~/.gitcinclude'\nfatal: bad config file line 49 in /usr/local/git/etc/gitconfig", b'')>.exit_code
tests/unit/test_runner.py:17: AssertionError
======================================================================= 10 failed, 18 passed, 2 skipped in 0.61 seconds ========================================================================
ERROR: InvocationError: '/Users/dsaltares/github/dothub/.tox/py36/bin/py.test tests -vvvv'
___________________________________________________________________________________________ summary ____________________________________________________________________________________________
ERROR: py27: commands failed
ERROR: py36: commands failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment