bigbite / wp-cypress

WordPress end to end testing with Cypress.io.
MIT License
86 stars 19 forks source link

Fail if docker desktop is not open #53

Closed liamdefty closed 3 years ago

liamdefty commented 3 years ago

WP Cypress start should fail if docker desktop is not open

ampersarnie commented 3 years ago

Just had a little look into this, the Docker Desktop app is a separate process which serves only as an interface for various Docker services. This is why even if the docker desktop app is closed completely, you can still run and access containers from the CLI.

Docker Desktop is an easy-to-install application for your Mac or Windows environment that enables you to build and share containerized applications and microservices. Docker Desktop includes Docker Engine, Docker CLI client, Docker Compose, Notary, Kubernetes, and Credential Helper. — https://docs.docker.com/desktop/

So I believe that still being able to run and execute wp-cypress when the desktop app is not active is the actual expected result, as the background services are still running.

jasonagnew commented 3 years ago

I think this issue is more if docker is not running wp-cypress looks to be working but it isn't. With Docker Desktop I think if thats how you've installed docker, if its not open or has been closed then its not possible for wp-cypress to work because background services are not running. I guess maybe we could check to see docker background services are running, if not request them to run.

ampersarnie commented 3 years ago

Given this a try by closing the Docker Desktop app a couple of times and found that containers are still running on occasion. Strange, but the issue makes sense now if the app can close down the background services. Should be easy enough to tackle by checking for the containers.