示例#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)