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 test for remaining admin modules #59

Merged

Conversation

italo-sampaio
Copy link
Collaborator

  • Added unit tests for certificate.py
  • Added unit tests for dongle_admin.py
  • Added unit tests for rsk_client.py
  • Improved execution time for admin unit tests
  • Improved test coverage for attestation.py unit tests

@italo-sampaio italo-sampaio marked this pull request as draft June 16, 2022 21:18
- Added unit tests for certificate.py
- Added unit tests for rsk_client.py
- Added unit tests for dongle_admin.py
- Refactor unit test for attestation.py
- Optimized test_verify_attestation.py to use only one ecdsa library for keys manipulation
- Reduced execution time for admin tests
- Removed unnecessary check on certificate.py
@italo-sampaio italo-sampaio force-pushed the feature/56-add-unit-test-for-remaining-admin-modules branch from 261d9e9 to 68aa174 Compare June 21, 2022 18:39
@italo-sampaio italo-sampaio marked this pull request as ready for review June 21, 2022 18:50
Copy link
Collaborator

@amendelzon amendelzon left a comment

Choose a reason for hiding this comment

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

Looking great, but I do think we need to address a few issues before merging.

middleware/tests/admin/test_attestation.py Outdated Show resolved Hide resolved
middleware/tests/admin/test_attestation.py Outdated Show resolved Hide resolved
middleware/tests/admin/test_attestation.py Show resolved Hide resolved
middleware/tests/admin/test_attestation.py Show resolved Hide resolved
middleware/tests/admin/test_certificate.py Outdated Show resolved Hide resolved
middleware/tests/admin/test_certificate.py Outdated Show resolved Hide resolved
middleware/tests/admin/test_certificate.py Outdated Show resolved Hide resolved
middleware/tests/admin/test_certificate.py Outdated Show resolved Hide resolved
middleware/tests/admin/test_rsk_client.py Outdated Show resolved Hide resolved
- Reverted changes on copyright year
- Fixed test_attestation according to the code review
- Changed generation of random hex string to a clearer form on certificate unit test
- Fixed certificate unit tests to follow the right semantics
- Created separete class for HSMCertificateElement unit test
- Fixed rsk_client unit tests to avoid mocking os.random
Copy link
Collaborator

@amendelzon amendelzon left a comment

Choose a reason for hiding this comment

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

LGTM, a few minor comments in passing just for awareness.

@amendelzon amendelzon merged commit 4eb4d98 into master Jun 22, 2022
@amendelzon amendelzon deleted the feature/56-add-unit-test-for-remaining-admin-modules branch June 22, 2022 23:59
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.

2 participants