~pwlars/ubuntu-test-cases/krillin-recovery

« back to all changes in this revision

Viewing changes to selftests/test_run_smoke.py

  • Committer: Andy Doan
  • Date: 2014-01-07 17:56:16 UTC
  • Revision ID: andy.doan@canonical.com-20140107175616-hazstr3a5x75d021
add ability to optionally update the dashboard in realtime

if the right combination of environment variables are provided to
this script then we'll update the dashboard with realtime status
of a smoke run.

Variables needed by a job to enable this are:

  DASHBOARD_HOST
  DASHBOARD_USER
  DASHBOARD_KEY

Optional values are:

  DASHBOARD_PORT
  DASHBOARD_PREFIX

Show diffs side-by-side

added added

removed removed

Lines of Context:
134
134
        with mock.patch.object(self.run_smoke, '_run') as run:
135
135
            with mock.patch.dict('os.environ'):
136
136
                run.side_effects = [subprocess.CalledProcessError, None]
137
 
                self.run_smoke._test_utah(args)
138
 
                p = os.path.join(self.run_smoke.res_dir, 'b')
139
 
                # ensuring b ran means, that we handled the failure of test
140
 
                # 'a' and that the environment is setup correctly
141
 
                self.assertEqual(os.environ['RESDIR'], p)
 
137
                with mock.patch.object(self.run_smoke, '_sync_results') as sr:
 
138
                    self.run_smoke._test_utah(args, None, None)
 
139
                    p = os.path.join(self.run_smoke.res_dir, 'b')
 
140
                    # ensuring b ran means, that we handled the failure of test
 
141
                    # 'a' and that the environment is setup correctly
 
142
                    self.assertEqual(os.environ['RESDIR'], p)
 
143
                    self.assertTrue(sr.called)