Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse configuration at compile time in tests #5

Open
Thomasdezeeuw opened this issue Jun 26, 2020 · 0 comments
Open

Parse configuration at compile time in tests #5

Thomasdezeeuw opened this issue Jun 26, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@Thomasdezeeuw
Copy link
Owner

Currently all end-to-end tests (in the tests directory) have various constants, such as:

const DB_PORT: u16 = 9002;
const DB_PATH: &'static str = "/tmp/stored_post_tests.db";
const CONF_PATH: &'static str = "tests/config/post.toml";

These must match the configuration as defined in the files (in tests/config). Keeping this in check is a bit of hazard. It would be could if we could parse it at compile this and set the constants to the correct values. Or even have the entire Config structure as a constant.

@Thomasdezeeuw Thomasdezeeuw added the enhancement New feature or request label Jun 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant