#Is it possible trigger dagger inside a python unit tests?

1 messages · Page 1 of 1 (latest)

spiral solar
#

I am trying to use dagger instead of testcontainers in a new project. I am trying to trigger dagger inside the test, instead of running it first. Is that possible?

When I attempt to create a Service I encounter this error:

start engine: failed to pull image: failed to run command: exec: "docker": executable file not found in $PATH
My development computer is a Mac, which uses colima. What should I do?

errant hornet
#

@spiral solar what container runtime do you use with Colima?

spiral solar
#

Docker locally and containerd in self-hosted CI (though we're not there yet) 🙂

errant hornet
#

Got it. How are you running your python tests? Are those running in your local machine vía pytest or unittest?

#

Or do you run them in Dagger / some other tool?

spiral solar
#

I want to run them by pytest locally, and whatever you suggest in CI. I had imagined it would in dagger, since we'd build the container and run the tests before publishing it.

I am trying to copy this pattern.

Filesystem

spiral solar
#

Great example! I solved the problem by creating a soft link for docker: sudo ln -s /opt/local/bin/docker ./venv/bin/docker

spiral solar