Skip to content

Commit aae0fcb

Browse files
committed
Fix tests after new fields were added
1 parent 4d9b417 commit aae0fcb

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

scripts/compare_against_released_patterns_test.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,11 @@ def test_index_pattern_fields_field_only(self):
111111
# https://github.com/ViaQ/elasticsearch-templates/commit/b3db410bc93144a94ac0acfa0312de4efc313973
112112
generated_fields = [item for item in generated_fields if not item["name"] == "docker.container_name"]
113113
generated_fields = [item for item in generated_fields if not item["name"] == "docker.container_name.raw"]
114+
115+
# https://github.com/ViaQ/elasticsearch-templates/pull/106
116+
generated_fields = [item for item in generated_fields if not item["name"] == "systemd.t.LINE_BREAK"]
117+
generated_fields = [item for item in generated_fields if not item["name"] == "systemd.t.STREAM_ID"]
118+
generated_fields = [item for item in generated_fields if not item["name"] == "systemd.t.SYSTEMD_INVOCATION_ID"]
114119
# ======================
115120

116121
# Exit the context of temporary folder. This will remove also all the content in it.

scripts/compare_against_released_templates_test.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,12 @@ def _support_compare_index_templates(self, args, json_url):
8585
# https://github.com/ViaQ/elasticsearch-templates/commit/b3db410bc93144a94ac0acfa0312de4efc313973
8686
if 'docker' in generated_json["mappings"]["_default_"]["properties"]:
8787
del generated_json["mappings"]["_default_"]["properties"]["docker"]["properties"]["container_name"]
88+
89+
# https://github.com/ViaQ/elasticsearch-templates/pull/106
90+
if 'systemd' in generated_json["mappings"]["_default_"]["properties"]:
91+
del generated_json["mappings"]["_default_"]["properties"]["systemd"]["properties"]["t"]["properties"]["LINE_BREAK"]
92+
del generated_json["mappings"]["_default_"]["properties"]["systemd"]["properties"]["t"]["properties"]["STREAM_ID"]
93+
del generated_json["mappings"]["_default_"]["properties"]["systemd"]["properties"]["t"]["properties"]["SYSTEMD_INVOCATION_ID"]
8894
# ======================
8995

9096
generated_index_template = self._sort(generated_json)

0 commit comments

Comments
 (0)