-
Notifications
You must be signed in to change notification settings - Fork 12
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
Add Unit Test for CompressOutbox to Tempfile Creation Refactoring (SOFTWARE-5540) #176
base: 2.x
Are you sure you want to change the base?
Add Unit Test for CompressOutbox to Tempfile Creation Refactoring (SOFTWARE-5540) #176
Conversation
@jtakaki-matc I don't see anything obvious that would indicate why this failed so I would
|
763a4ff
to
46d3c94
Compare
@brianhlin Test seems to be working, checked locally running from 2.x branch as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking great! One minor whitespace change and a request for additional tests.
EDIT: Could you also update the title of this PR? I don't think it summarizes ALL of the commits in the PR
Co-authored-by: Brian Lin <brianhlin@gmail.com>
@brianhlin Added two more tests! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of improvements to be made but this is looking great!
test/test_sandbox_mgmt.py
Outdated
names.sort() | ||
outfiles.sort() | ||
|
||
self.assertListEqual(names, outfiles) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a good assertion! Another one would be to also check that the contents are expected
Co-authored-by: Brian Lin <brianhlin@gmail.com>
Make corrections to tarball file extraction and tarball location check
@brianhlin Made a few changes per your suggestions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks solid! A suggestion to improve the message upon one test failure and a slight logic issue. Pre-approving
Co-authored-by: Brian Lin <brianhlin@gmail.com>
get_tarball_function handles IndexError exception and fails test if no tarball is created. test_tarball_creation and test_tarball_contents both make a call to this function
@brianhlin Refactored! |
@brianhlin I have been getting
AssertionError: False is not true
and I think it has to do with how I am using the mock patch. I tried a few different ways of incorporating the mock with not much success. It's possible I am provisioning the test environment incorrectly??