Skip to content

Conversation

@mschlaipfer
Copy link
Contributor

Issue #, if available:

Description of changes: Improve testing when configuration files have invalid data. Instead of continueing on wrong data at runtime, we now fail, as we know that we will have parsed the same files (the same way!) during testing.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@mschlaipfer mschlaipfer requested a review from weibenz1 December 2, 2025 14:45

## How It Works

The negative tests use **RustEmbed** to embed these invalid test files at compile time, just like the production code embeds valid configuration files. The key difference is:
Copy link
Contributor

Choose a reason for hiding this comment

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

Are we actually compiling it and do we need to?

Copy link
Contributor Author

@mschlaipfer mschlaipfer Dec 2, 2025

Choose a reason for hiding this comment

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

I think RustEmbed actually does not embed them for debug builds, but it abstracts that away from us. I think the point is more that we use the same interface to consume these files. I can update the comment as part of fixing the build.

@weibenz1
Copy link
Contributor

weibenz1 commented Dec 2, 2025

@mschlaipfer
Copy link
Contributor Author

Yes, I noticed that this needs some more work and I opened this prematurely.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants