Open radu-matei opened 5 years ago
Hello @radu-matei sorry I missed this one 😅
In the docker/cli there's a FakeClibut put on purpose in the
internal` package because we don't think it's at the right level for tests.
We instead prefer faking the docker client, like here. Unfortunately the client is a giant interface 😞, but using this pattern I guess you only have to implement the methods you are using? Or maybe we should abstract from the docker client/cli and have our own interface in the cnab-go?
We do have the integration tests now, which directly create a container.
That being said, executing that test does require a Docker daemon, and it would be nice if we had a fake client.
I've been going through the Docker driver code and I realized that it currently has no testing, and we should probably add some.
@silvin-lubecki - is there a fake Docker client / CLI / standard way of testing the creation of containers, adding volumes and other typical operations we might execute with the Docker driver?