adorsys / didcomm-mediator-rs

Simple mediator for DIDComm Messaging v2
Apache License 2.0
2 stars 0 forks source link

added test to didgen. Initial test run else not working. #53

Closed francis-pouatcha closed 9 months ago

francis-pouatcha commented 9 months ago

Somehow after naked checkout, i could not run the test. Maybe because did.json missing. I added some tests to didgen. Those produce keys/did that are used for subsequent test. This are not unit test. So we need the review the arch of the code. For now running on my side.

IngridPuppet commented 9 months ago

The added test_validate_diddoc actually conflicts with verify_didpop. I had already run into a similar situation: the former alters the did.json file while the latter expects the file to be readily readable.

image

To circumvent this, I used a temporary directory for testing keystore operations.

https://github.com/ADORSYS-GIS/didcomm-mediator-rs/blob/56b8a48e44983327280257d6c5bae4591104ff13/sample-pop-server/src/plugin/didpop/util/keystore.rs#L147-L154

I definitely agree this is a situation that must be fixed to improve testability. Since a lot of files are moving right now, I think we should come back to this matter afterward.

francis-pouatcha commented 9 months ago

Manually moved tests to another branch.