112
112
run_mock.assert_called_with(
113
113
['taskkill.exe', '/F', '/FI', 'imagename eq mongod.exe'])
115
def test_go_test_package_compile_failure(self):
116
with temp_dir() as gopath:
117
package_path = os.path.join(
118
gopath, 'src', 'github.com', 'juju', 'juju')
119
os.makedirs(package_path)
120
with patch('gotesttarfile.run', return_value=1,
121
autospec=True) as run_mock:
122
devnull = open(os.devnull, 'w')
123
with patch('sys.stdout', devnull):
124
returncode = go_test_package(
125
'github.com/juju/juju', 'go', gopath)
126
self.assertEqual(1, returncode)
127
self.assertEqual(run_mock.call_count, 1)
128
args, kwargs = run_mock.call_args_list[0]
129
self.assertEqual((['go', 'test', '-i', './...'],), args)
115
131
def test_parse_args(self):
116
132
args = parse_args(
117
133
['-v', '-g', 'go', '-p' 'github/foo', '-r', 'juju.tar.gz'])