From 2a9a218eced7a4a364c483163841b8c954501f42 Mon Sep 17 00:00:00 2001 From: Gil Raphaelli Date: Sat, 26 Jan 2019 21:33:09 -0500 Subject: [PATCH] update kibana saved objects tests (#1845) * remove tests for dashboards they are no longer bundled with kibana as of https://github.com/elastic/kibana/pull/29043 * update generated index pattern location --- script/are_kibana_saved_objects_updated.py | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/script/are_kibana_saved_objects_updated.py b/script/are_kibana_saved_objects_updated.py index f78784f99fc..5c07d1d5058 100755 --- a/script/are_kibana_saved_objects_updated.py +++ b/script/are_kibana_saved_objects_updated.py @@ -100,9 +100,6 @@ def iterate(val_id, key, v1, v2): def main(): parser = argparse.ArgumentParser() parser.add_argument('branch') - parser.add_argument('-D', '--dashboards', type=str, - default='src/legacy/core_plugins/kibana/server/tutorials/apm/saved_objects/saved_objects.json', - help='dashboards file path') parser.add_argument('-I', '--index-pattern', type=str, default='src/legacy/core_plugins/kibana/server/tutorials/apm/saved_objects/index_pattern.json', help='index-pattern file path') @@ -112,18 +109,9 @@ def main(): args = parser.parse_args() exit_val = 0 - print("---- Comparing Dashboards:") - k = fetch_kibana_file(args.repo_path, args.branch, args.dashboards) - with open(os.path.abspath(os.path.join('_meta', 'kibana.generated', '6', 'dashboard', 'apm-dashboards.json'))) as f: - s = json.load(f)["objects"] - for idx in range(len(k)): - exit_val = max(exit_val, iterate(k[idx]["id"], "", s[idx], k[idx])) - if exit_val == 0: - print("up-to-date") - print("---- Comparing Index Pattern:") k = fetch_kibana_file(args.repo_path, args.branch, args.index_pattern) - with open(os.path.abspath(os.path.join('_meta', 'kibana.generated', '6', 'index-pattern', 'apmserver.json'))) as f: + with open(os.path.abspath(os.path.join('_meta', 'kibana.generated', '7', 'index-pattern', 'apmserver.json'))) as f: s = json.load(f)["objects"][0] exit_val = max(exit_val, iterate(k["id"], "", s, k)) if exit_val == 0: