Пример #1
0
 def test_record_result_data_no_case_name(self):
     influxdb = InfluxdbDispatcher(None, self.yardstick_conf)
     self.assertEqual(influxdb.record_result_data(self.data2), -1)
Пример #2
0
 def test_record_result_data_no_target(self):
     influxdb = InfluxdbDispatcher(None, self.yardstick_conf)
     influxdb.target = ''
     self.assertEqual(influxdb.record_result_data(self.data1), -1)
Пример #3
0
 def test_record_result_data(self, mock_requests):
     type(mock_requests.post.return_value).status_code = 204
     influxdb = InfluxdbDispatcher(None, self.yardstick_conf)
     self.assertEqual(influxdb.record_result_data(self.data1), 0)
     self.assertEqual(influxdb.record_result_data(self.data2), 0)
     self.assertEqual(influxdb.flush_result_data(), 0)
Пример #4
0
 def test_record_result_data(self, mock_requests):
     type(mock_requests.post.return_value).status_code = 204
     influxdb = InfluxdbDispatcher(None)
     self.assertEqual(influxdb.record_result_data(self.data1), 0)
     self.assertEqual(influxdb.record_result_data(self.data2), 0)
     self.assertEqual(influxdb.flush_result_data(), 0)
Пример #5
0
 def test_record_result_data_no_case_name(self):
     influxdb = InfluxdbDispatcher(None)
     self.assertEqual(influxdb.record_result_data(self.data2), -1)
Пример #6
0
 def test_record_result_data_no_target(self):
     influxdb = InfluxdbDispatcher(None)
     influxdb.target = ''
     self.assertEqual(influxdb.record_result_data(self.data1), -1)