-
Notifications
You must be signed in to change notification settings - Fork 21
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
Added test for test_util to ensure file absence when open for reading #1794
base: main
Are you sure you want to change the base?
Conversation
ilyas829
commented
Oct 2, 2024
- I have added a pytest function to ensure file absence when open for reading.
- It basically for below purpose
- Creates a file
- Open the file for reading and
- Ensures that the file is removed
- Please review my PR and merge it
- also suggest your valuable feedback.
@ilyas829 thanks for your contribution. could you please run "poetry run ruff format" before submitting ? you could amend the commit. since you're only adding testcases, is the only purpose to increase test coverage or did you find a real issue somewhere? |
Thank you for reviewing my test coverage codes.. Yes the purpose of appending test cases were to increase test coverage but I din not found any issue as i wrote and tested these cases, but now I am moving up in the hierarchy and find errors or bugs in the test_user, test_services and so on. |
Thanks. basically your new test is a duplicate of https://github.com/SUSE/BCI-dockerfile-generator/pull/1794/files#diff-0dcbadaa6c70afb6fea041dec04bb89c3cc7fe201fb7c3185a669efa49769f28R10-R16 . the fact that you can read a file after creating it is not super useful given that the purpose of this unit test is to validate that "ensure_absent" works. Given that you confirmed that this isn't testing for a real issue, I would actually not be in favor of adding this test. if you can find a combination of file / directory / permission creation where ensure_absent breaks and you write a test for that, that would be awesome as a contribution. |
Perfect, 1st of all Thank you for describing the required test case. Yes we can do that.
The code for the same is just pushed and please review and suggest your valuable feedback |
Hey @dirkmueller please can you check as it this condition is working for me.. |