Skip to content

Commit

Permalink
update kibana saved objects tests (#1845)
Browse files Browse the repository at this point in the history
* remove tests for dashboards

they are no longer bundled with kibana as of elastic/kibana#29043

* update generated index pattern location
  • Loading branch information
graphaelli authored Jan 27, 2019
1 parent 704a9fa commit 2a9a218
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions script/are_kibana_saved_objects_updated.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -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:
Expand Down

0 comments on commit 2a9a218

Please sign in to comment.