From 5ac58953d330985ea0296021b06f836c1bd31486 Mon Sep 17 00:00:00 2001 From: James Moessis Date: Tue, 25 Jan 2022 17:06:02 +1100 Subject: [PATCH] add extra_yaml_files param and use it in metric_table test --- .../src/tests/semconv/templating/test_markdown.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/semantic-conventions/src/tests/semconv/templating/test_markdown.py b/semantic-conventions/src/tests/semconv/templating/test_markdown.py index 53701861..c8badac1 100644 --- a/semantic-conventions/src/tests/semconv/templating/test_markdown.py +++ b/semantic-conventions/src/tests/semconv/templating/test_markdown.py @@ -124,7 +124,10 @@ def test_event_renamed(self): self.check("markdown/event_renamed/") def test_metric_tables(self): - self.check("markdown/metrics_tables") + self.check( + "markdown/metrics_tables", + extra_yaml_files=["yaml/general.yaml", "yaml/http_metrics.yaml"], + ) def testSamplingRelevant(self): self.check("markdown/sampling_relevant/") @@ -136,6 +139,7 @@ def check( *, expected_name="expected.md", extra_yaml_dirs: Sequence[str] = (), + extra_yaml_files: Sequence[str] = (), assert_raises=None ) -> Optional[BaseException]: dirpath = Path(self.get_file_path(input_dir)) @@ -151,6 +155,9 @@ def check( for fname in Path(self.get_file_path(extra_dir)).glob("*.yaml"): print("Parsing", fname) semconv.parse(fname) + for fname in map(self.get_file_path, extra_yaml_files): + print("Parsing ", fname) + semconv.parse(fname) semconv.finish()