#Does anyone have good strategies for
1 messages · Page 1 of 1 (latest)
I just run it with real dagger.
The interface is a lot to mock.
Right, and I think that running it with Real Dagger is important too, but I'd like to be able to test things like "did this try to execute a container" or "this gracefully handles if a container execution fails for some reason", which are unneccessarily complicated by Really Doing It.
Which SDK are you using @elder idol ?
Go
maybe we could add a “mock mode” to the engine to facilitate this?
Might be interesting. One of the things that is super interesting about Dagger is treating the pipelines as software and testability is an important part of that.
absolutely
one thing to note is that, once you adopt a pattern to run your tests in dagger, then it’s a relatively small step to test your dagger pipelines inside dagger as well. This makes it generally cheaper and more reasonable to run tests “for real” instead of mocking
For example to test for proper handling of failure: run a canari container that is configured to fail; etc
I do think you can get way more mileage without mocking than you may initially think