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

Testing for the Docker driver #103

Open
radu-matei opened this issue May 10, 2019 · 2 comments
Open

Testing for the Docker driver #103

radu-matei opened this issue May 10, 2019 · 2 comments

Comments

@radu-matei
Copy link
Member

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?

@jeremyrickard jeremyrickard transferred this issue from cnabio/duffle Aug 12, 2019
@silvin-lubecki
Copy link
Contributor

Hello @radu-matei sorry I missed this one 😅
In the docker/cli there's a FakeClibut put on purpose in theinternal` 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?

@radu-matei
Copy link
Member Author

radu-matei commented Aug 20, 2019

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.

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

No branches or pull requests

2 participants