Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix dashboards export test #17768

Merged
merged 6 commits into from
Apr 20, 2020
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions libbeat/tests/system/test_dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ def test_export_dashboard_cmd_export_dashboard_by_id_unknown_id(self):
"""
Test testbeat export dashboard fails gracefully when dashboard with unknown ID is requested
"""
dashboard_id = 'No-such-dashboard'
self.render_config_template()
beat = self.start_beat(
logging_args=["-e", "-d", "*"],
Expand All @@ -183,12 +184,13 @@ def test_export_dashboard_cmd_export_dashboard_by_id_unknown_id(self):
"-E", "setup.kibana.protocol=http",
"-E", "setup.kibana.host=" + self.get_kibana_host(),
"-E", "setup.kibana.port=" + self.get_kibana_port(),
"-id", "No-such-dashboard"]
"-id", dashboard_id]
)

beat.check_wait(exit_code=1)

assert self.log_contains("error exporting dashboard: Not found") is True
expected_error = "error exporting dashboard: Saved object [dashboard/{}] not found".format(dashboard_id)
jsoriano marked this conversation as resolved.
Show resolved Hide resolved
assert self.log_contains(expected_error)

@unittest.skipUnless(INTEGRATION_TESTS, "integration test")
@attr('integration')
Expand Down