(self)
| 178 | result.json_content_equals('expected_test_results1.json') |
| 179 | |
| 180 | def testRDB(self): |
| 181 | with self.with_fake_rdb() as records: |
| 182 | # sweet/bananaflakes fails first time on stress but passes on default |
| 183 | def tag_dict(tags): |
| 184 | return {t['key']: t['value'] for t in tags} |
| 185 | |
| 186 | self.run_tests( |
| 187 | '--variants=default,stress', |
| 188 | '--rerun-failures-count=2', |
| 189 | '--time', |
| 190 | 'sweet', |
| 191 | baseroot='testroot2', |
| 192 | infra_staging=False, |
| 193 | ) |
| 194 | |
| 195 | self.assertEqual(len(records), 3) |
| 196 | self.assertEqual(records[0]['testId'], 'sweet/bananaflakes//stress') |
| 197 | self.assertEqual(tag_dict(records[0]['tags'])['run'], '1') |
| 198 | self.assertFalse(records[0]['expected']) |
| 199 | |
| 200 | self.assertEqual(records[1]['testId'], 'sweet/bananaflakes//stress') |
| 201 | self.assertEqual(tag_dict(records[1]['tags'])['run'], '2') |
| 202 | self.assertTrue(records[1]['expected']) |
| 203 | |
| 204 | self.assertEqual(records[2]['testId'], 'sweet/bananaflakes//default') |
| 205 | self.assertEqual(tag_dict(records[2]['tags'])['run'], '1') |
| 206 | self.assertTrue(records[2]['expected']) |
| 207 | |
| 208 | def testFlakeWithRerunAndJSON(self): |
| 209 | """Test re-running a failing test and output to json.""" |
nothing calls this directly
no test coverage detected