mesg-foundation / engine

Build apps or autonomous workflows with reusable, shareable integrations connecting any service, app, blockchain or decentralized network.
https://mesg.com/
Apache License 2.0
130 stars 13 forks source link

convert to unit tests #283

Closed ilgooz closed 6 years ago

ilgooz commented 6 years ago

We are heavily depending on integration tests in docker client related tests, gRPC calls and tests that run gitClone.

ilgooz commented 6 years ago

includes https://github.com/mesg-foundation/core/issues/274

ilgooz commented 6 years ago

Update: use buffconn and WithDialer to create a mock server for gRPC

ilgooz commented 6 years ago

docker client doesn't provide a test server nor a mock interface at this moment. this possibly leaves us directly checking generated api calls like described in the first message of this thread.

see https://github.com/moby/moby/issues/30454

edit: we use docker.CommonAPIClient for mocking (docker provides a mocking interface)

NicolasMahe commented 6 years ago

Useful resource for the integration test posted on Discord: http://pliutau.com/separate_unit_integration_tests/

ilgooz commented 6 years ago

I split git and gRPC related tests to other issues. See https://github.com/mesg-foundation/core/issues/339 and https://github.com/mesg-foundation/core/issues/310.