diff --git a/libbeat/tests/system/test_dashboard.py b/libbeat/tests/system/test_dashboard.py index 4cef3829726..0151f07fefb 100644 --- a/libbeat/tests/system/test_dashboard.py +++ b/libbeat/tests/system/test_dashboard.py @@ -4,7 +4,7 @@ import subprocess from nose.plugins.attrib import attr import unittest - +import requests INTEGRATION_TESTS = os.environ.get('INTEGRATION_TESTS', False) @@ -43,6 +43,8 @@ def test_load_dashboard_into_space(self): Test loading dashboards into Kibana space """ self.render_config_template() + self.create_kibana_space() + beat = self.start_beat( logging_args=["-e", "-d", "*"], extra_args=["setup", @@ -148,3 +150,13 @@ def get_kibana_host(self): def get_kibana_port(self): return os.getenv('KIBANA_PORT', '5601') + + def create_kibana_space(self): + url = "http://" + self.get_kibana_host() + ":" + self.get_kibana_port() + \ + "/api/spaces/space" + data = { + "id": "foo-bar", + "name": "Foo bar space" + } + r = requests.post(url, data) + assert r.status_code == 200