Skip to content

Add test for metadata - #254

Open
furtib wants to merge 4 commits into
Ericsson:mainfrom
furtib:metadata-test
Open

Add test for metadata#254
furtib wants to merge 4 commits into
Ericsson:mainfrom
furtib:metadata-test

Conversation

@furtib

@furtib furtib commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Why:
We want to test metadata contents before merging #79.

What:

  • Added tests for inspecting the contents of metadata files.

Addresses:
#45

@furtib
furtib requested a review from Szelethus June 30, 2026 07:31
@furtib furtib self-assigned this Jun 30, 2026
@furtib furtib added the test ☑️ Adding or refactoring tests label Jun 30, 2026
@furtib
furtib force-pushed the metadata-test branch 4 times, most recently from b88bc48 to 6f62e93 Compare June 30, 2026 08:54
Comment thread test/unit/metadata/BUILD
Comment thread test/unit/metadata/BUILD Outdated
unit_test(
name = "per_file_metadata_test",
data = [":per_file_multiple_source"],
excludes = [r"\"action_num\": 2,"],

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose this is the important bit, no? That this should be contains instead.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch, fixed it!

Comment thread test/unit/metadata/BUILD
Comment on lines +67 to +68
# FIXME: remove when metadata is generated
tags = ["manual"],

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As is, I don't think this is a great precursor patch. We could check whether this (these?) files exists at all, AND THEN check how merging works.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is currently no way to check if a file is missing.
If no input file is found the test just fails.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to make a way to assert files existing #261.

Using that, we could assert the existence of individual metadata files, but not the merged one.

@Szelethus Szelethus left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM if you rebase on #261 and adjust the test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test ☑️ Adding or refactoring tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants