From 0e00ca85ef863fb6b74473dace71b98fd014ff18 Mon Sep 17 00:00:00 2001 From: Adam Miller Date: May 24 2017 14:45:08 +0000 Subject: fix tests after namespace change After the namespace change from 'docker' to 'container' in DistGit the unit tests were failing. This fixes that. Signed-off-by: Adam Miller --- diff --git a/runtests.sh b/runtests.sh index f25e460..5528769 100755 --- a/runtests.sh +++ b/runtests.sh @@ -1,3 +1,3 @@ #!/bin/bash -PYTHONPATH=flr py.test $* +PYTHONPATH=flr py.test -vvv $* diff --git a/tests/test_koji.py b/tests/test_koji.py index 6c046ac..24bf8de 100644 --- a/tests/test_koji.py +++ b/tests/test_koji.py @@ -30,7 +30,7 @@ fake_distgit_path = os.path.join(os.path.realpath(os.path.curdir), 'FakeDistGit' # (because why not?) aname = 'foo' branch = 'f9000' -distgit_ns = 'docker' +distgit_ns = 'container' fedpkg_cmd = 'fedpkg' koji_cmd = 'koji' @@ -180,9 +180,11 @@ def test_rebuild_container(mock_dockerfileparser, mock_subproc_call, mock_subpro from mock import call assert mock_subproc_call.mock_calls == [ call( - [fedpkg_cmd, '', '', 'clone', 'docker/foo'], - log_msg='Cloning docker/foo distgit repo' + [fedpkg_cmd, '', '', 'clone', '{}/foo'.format(distgit_ns)], + ignore_failure=True, + log_msg='Cloning {}/foo distgit repo'.format(distgit_ns) ), + call().__nonzero__(), call( [fedpkg_cmd, '', '', 'switch-branch', 'f9000'], log_msg='Switching branch to f9000' @@ -226,9 +228,11 @@ def test_rebuild_container_stage(mock_dockerfileparser, mock_subproc_call, mock_ from mock import call assert mock_subproc_call.mock_calls == [ call( - [fedpkg_cmd, '', '', 'clone', 'docker/foo'], - log_msg='Cloning docker/foo distgit repo' + [fedpkg_cmd, '', '', 'clone', '{}/foo'.format(distgit_ns)], + ignore_failure=True, + log_msg='Cloning {}/foo distgit repo'.format(distgit_ns) ), + call().__nonzero__(), call( [fedpkg_cmd, '', '', 'switch-branch', 'f9000'], log_msg='Switching branch to f9000' @@ -269,9 +273,11 @@ def test_rebuild_container_user(mock_dockerfileparser, mock_subproc_call, mock_s from mock import call assert mock_subproc_call.mock_calls == [ call( - [fedpkg_cmd, '--user', 'testuser', 'clone', 'docker/foo'], - log_msg='Cloning docker/foo distgit repo' + [fedpkg_cmd, '--user', 'testuser', 'clone', '{}/foo'.format(distgit_ns)], + ignore_failure=True, + log_msg='Cloning {}/foo distgit repo'.format(distgit_ns) ), + call().__nonzero__(), call( [fedpkg_cmd, '--user', 'testuser', 'switch-branch', 'f9000'], log_msg='Switching branch to f9000'