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

Create TestEnvironmentVariables object for storing the env vars in each test suite #62

Merged
merged 2 commits into from
May 14, 2024

Conversation

im-konge
Copy link
Member

This PR adds TestEnvironmentVariables object, which contains more or less everything from the TestFrameEnv.
Thanks to this, we are able to initialize this object in each test suite, print the env variables and extend the class if needed.

Why I created the object instead of making the functions public in the TestFrameEnv

The print is done when the TestFrameEnv is initialized. That's usually done before the class which can extend this one is called/initialized. So the log of the env variables doesn't show the full list + it will be quite confusing to print the same values more times -> when the TestFrameEnv is initialized and then when our class (so even if I add a print method there, it will show some values twice)

@im-konge im-konge self-assigned this May 10, 2024
@github-actions github-actions bot requested review from Frawless and kornys May 10, 2024 13:07
Copy link
Member

@kornys kornys left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@kornys
Copy link
Member

kornys commented May 11, 2024

Adding test into test module would be nice

…ch test suite

Signed-off-by: Lukas Kral <lukywill16@gmail.com>

public for getOrDefault

add unit test

Signed-off-by: Lukas Kral <lukywill16@gmail.com>
@im-konge im-konge merged commit f3deb21 into main May 14, 2024
3 checks passed
@im-konge im-konge deleted the test-env-vars branch May 14, 2024 09:13
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.

None yet

2 participants