Skip node count test when using InfluxDB 1.1

Change-Id: Ide10fe7cff611b65a801d221564f110481ab687d
This commit is contained in:
Swann Croiset 2017-01-20 13:25:54 +01:00
parent e0bfdb76dd
commit 12334e7031

View File

@ -133,19 +133,21 @@ class InfluxdbPluginApi(base_test.PluginApi):
auth=(plugin_settings.grafana_user, 'rogue'), expected_code=401) auth=(plugin_settings.grafana_user, 'rogue'), expected_code=401)
def check_influxdb_nodes_count(self, count=1): def check_influxdb_nodes_count(self, count=1):
# TODO(all): this is broken with InfluxDB 1.1 # This test is only executed for plugins 0.x, because
logger.debug('Check the number of InfluxDB servers') # cluster has been removed with plugin 1.0 (InfluxDB 1.1)
response = self.do_influxdb_query( if self.settings.version.startswith("0."):
"show servers", logger.debug('Check the number of InfluxDB servers')
user=self.settings.influxdb_rootuser, response = self.do_influxdb_query(
password=self.settings.influxdb_rootpass) "show servers",
user=self.settings.influxdb_rootuser,
password=self.settings.influxdb_rootpass)
nodes_count_responsed = len( nodes_count_responsed = len(
response.json()["results"][0]["series"][0]["values"]) response.json()["results"][0]["series"][0]["values"])
msg = "Expected {0} InfluxDB nodes, got {1}".format( msg = "Expected {0} InfluxDB nodes, got {1}".format(
count, nodes_count_responsed) count, nodes_count_responsed)
asserts.assert_equal(count, nodes_count_responsed, msg) asserts.assert_equal(count, nodes_count_responsed, msg)
def uninstall_plugin(self): def uninstall_plugin(self):
return self.helpers.uninstall_plugin(self.settings.name, return self.helpers.uninstall_plugin(self.settings.name,