-
Notifications
You must be signed in to change notification settings - Fork 18
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 unit tests for secret_store module #206
Conversation
- Removed unneeded include - Removed redundant check for blob_size
- Added unit tests for secret_store - Added mock implementations for the ocalls and seal API - Added trivial definitions of some open enclave types needed by the secret_store module
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.
Looking fairly good. Left some comments that I think would be reasonable to address before adding more tests and potentially generating more inconsistencies.
- Mock functions are now prefixed with `mock_` to follow the general pattern used for other HAL tests - Mock implementation of functions needed by the tested unit are now part of the test suite, and just call the corresponding mock functions
- mocks no longer depend on specific definitions from secret_store - now asserting that the expected values are written to the kvstore - read/remove/exist tests now just write data interact directly to the kvstore and only test the read/remove/exist logic
@amendelzon Thanks for the suggestions. I pushed some commits addressing all of them, let me know if it looks good now. |
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.
LGTM
- Added secret store unit tests - Minor changes to secret_store.c to allow for easier unit testing - Removed mock files from test coverage report
- Added secret store unit tests - Minor changes to secret_store.c to allow for easier unit testing - Removed mock files from test coverage report
secret_module.c
to allow for full test coverage