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 test cases trust.rs #91

Merged
merged 1 commit into from
Aug 10, 2021
Merged

Conversation

vedangj044
Copy link
Contributor

@vedangj044 vedangj044 commented Aug 9, 2021

This PR adds 3 test cases in the trust.rs file, which accounts for about 90% code coverage in trust.rs. The test cases are as follows:

test_create_trust_anchor(): Unit test for create_trust_anchor(). To pass this - the JSON response should be valid, the key should be written to a file, certificate should be a valid x509 cert.

test_device_certificate: Unit test for create_device_certificate(). To pass this - function should normally run and export certificate and key.

test_key_certificate_mismatch: create_device_certificate() is called but with a wrong CA key, it should terminate with an error.

#16

@jbtrystram jbtrystram merged commit 4d60585 into drogue-iot:main Aug 10, 2021
@vedangj044 vedangj044 deleted the trust_test branch August 10, 2021 14:31
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