Skip to content

Commit

Permalink
add extra_yaml_files param and use it in metric_table test
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesmoessis committed Jan 25, 2022
1 parent a56703e commit 9d5eb06
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ 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/")
Expand All @@ -136,6 +136,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))
Expand All @@ -151,6 +152,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()

Expand Down

0 comments on commit 9d5eb06

Please sign in to comment.