Add unit test for upOptions.OnExit method by htoyoda18 · Pull Request #13489 · docker/compose
What I did
Added unit tests for the upOptions.OnExit() method in cmd/compose/up_test.go.
The new test (TestUpOptions_OnExit) covers all cascade behavior modes:
CascadeIgnore(default behavior)CascadeStop(--abort-on-container-exit)CascadeFail(--abort-on-container-failure)- Edge case: both flags set (stop takes precedence)
This test follows the existing test patterns in the codebase, using table-driven tests with the args field containing the full upOptions struct.
Related issue
N/A
(not mandatory) A picture of a cute animal, if possible in relation to what you did
