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

Added unit tests for secret_store module #206

Merged
merged 6 commits into from
Oct 9, 2024

Commits on Oct 8, 2024

  1. Minor changes to secret_store.c to allow for easier unit testing

    - Removed unneeded include
    - Removed redundant check for blob_size
    italo-sampaio committed Oct 8, 2024
    Configuration menu
    Copy the full SHA
    1adf629 View commit details
    Browse the repository at this point in the history
  2. Added secret store unit tests

    - 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
    italo-sampaio committed Oct 8, 2024
    Configuration menu
    Copy the full SHA
    8fd993b View commit details
    Browse the repository at this point in the history

Commits on Oct 9, 2024

  1. Configuration menu
    Copy the full SHA
    ba6eb8c View commit details
    Browse the repository at this point in the history
  2. Fixed inconsistency on mock approach

    - 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
    italo-sampaio committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    e391d27 View commit details
    Browse the repository at this point in the history
  3. Fixed tightly coupled mocks

    - 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
    italo-sampaio committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    03da1bd View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    1a568c4 View commit details
    Browse the repository at this point in the history