~gz/juju-ci-tools/jes_no_upload

« back to all changes in this revision

Viewing changes to test_deploy_stack.py

  • Committer: John George
  • Date: 2015-08-07 15:27:22 UTC
  • mfrom: (1056.1.5 upload_jenkins_job)
  • Revision ID: john.george@canonical.com-20150807152722-zwcx4w3iu1a88om3
Rename upload_hetero_control.py to upload_jenkins_job.py and allow it to upload any Jenkins job artifacts to S3.

Show diffs side-by-side

added added

removed removed

Lines of Context:
192
192
                               autospec=True) as crl_mock:
193
193
                        with patch('deploy_stack.archive_logs',
194
194
                                   autospec=True) as al_mock:
195
 
                            env = SimpleEnvironment('foo', {'type': 'nonlocal'})
 
195
                            env = SimpleEnvironment('foo',
 
196
                                                    {'type': 'nonlocal'})
196
197
                            client = EnvJujuClient(env, '1.234-76', None)
197
198
                            dump_env_logs(client, '10.10.0.1', artifacts_dir)
198
199
            al_mock.assert_called_once_with(artifacts_dir)
221
222
                               autospec=True) as crl_mock:
222
223
                        with patch('deploy_stack.archive_logs',
223
224
                                   autospec=True) as al_mock:
224
 
                            env = SimpleEnvironment('foo', {'type': 'nonlocal'})
 
225
                            env = SimpleEnvironment('foo',
 
226
                                                    {'type': 'nonlocal'})
225
227
                            client = EnvJujuClient(env, '1.234-76', None)
226
228
                            dump_env_logs(client, '10.10.0.1', artifacts_dir)
227
229
            al_mock.assert_called_once_with(artifacts_dir)
308
310
                with patch('deploy_stack.lxc_template_glob',
309
311
                           os.path.join(juju_home_dir, "*.log")):
310
312
                    with patch('subprocess.check_call', autospec=True,
311
 
                               side_effect=err) as cc_mock:
 
313
                               side_effect=err):
312
314
                        copy_local_logs(env, '/destination/dir')
313
315
        self.assertEqual(
314
316
            ["WARNING Could not retrieve local logs: Command 'cp' returned"