MCPcopy Create free account
hub / github.com/docker/compose / TestUpOptions_OnExit

Function TestUpOptions_OnExit

cmd/compose/up_test.go:83–120  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

81}
82
83func TestUpOptions_OnExit(t *testing.T) {
84 tests := []struct {
85 name string
86 args upOptions
87 want api.Cascade
88 }{
89 {
90 name: "no cascade",
91 args: upOptions{},
92 want: api.CascadeIgnore,
93 },
94 {
95 name: "cascade stop",
96 args: upOptions{cascadeStop: true},
97 want: api.CascadeStop,
98 },
99 {
100 name: "cascade fail",
101 args: upOptions{cascadeFail: true},
102 want: api.CascadeFail,
103 },
104 {
105 name: "both set - stop takes precedence",
106 args: upOptions{
107 cascadeStop: true,
108 cascadeFail: true,
109 },
110 want: api.CascadeStop,
111 },
112 }
113
114 for _, tt := range tests {
115 t.Run(tt.name, func(t *testing.T) {
116 got := tt.args.OnExit()
117 assert.Equal(t, got, tt.want)
118 })
119 }
120}
121
122func TestRunUpAllowsTemplatedPortFieldsInRemoteStackPrompt(t *testing.T) {
123 ctrl := gomock.NewController(t)

Callers

nothing calls this directly

Calls 1

OnExitMethod · 0.80

Tested by

no test coverage detected