@@ -152,15 +152,10 @@ var _ = Describe("Output Result", func() {
152
152
var w * bytes.Buffer
153
153
var output []byte
154
154
var resJSON Result
155
- var exitCode int
156
- exit = func (code int ) {
157
- exitCode = code
158
- }
159
155
const warnText = "example of a warning"
160
156
const errorText = "example of an error"
161
157
162
158
BeforeEach (func () {
163
- exitCode = 0
164
159
w = & bytes.Buffer {}
165
160
resJSON = Result {}
166
161
})
@@ -177,7 +172,6 @@ var _ = Describe("Output Result", func() {
177
172
Expect (resJSON .Outputs ).To (HaveLen (1 ))
178
173
Expect (resJSON .Outputs [0 ].Type ).To (Equal ("warning" ))
179
174
Expect (resJSON .Outputs [0 ].Message ).To (Equal (warnText ))
180
- Expect (exitCode ).To (Equal (0 ))
181
175
})
182
176
183
177
It ("prints an error" , func () {
@@ -193,7 +187,6 @@ var _ = Describe("Output Result", func() {
193
187
Expect (resJSON .Outputs ).To (HaveLen (1 ))
194
188
Expect (resJSON .Outputs [0 ].Type ).To (Equal ("error" ))
195
189
Expect (resJSON .Outputs [0 ].Message ).To (Equal (errorText ))
196
- Expect (exitCode ).To (Equal (0 ))
197
190
})
198
191
})
199
192
@@ -209,7 +202,6 @@ var _ = Describe("Output Result", func() {
209
202
line := string (lines [0 ])
210
203
Expect (line ).To (ContainSubstring ("level=warning" ), line )
211
204
Expect (line ).To (ContainSubstring (`msg="example of a warning"` ), line )
212
- Expect (exitCode ).To (Equal (0 ))
213
205
})
214
206
215
207
It ("prints an error" , func () {
@@ -224,7 +216,6 @@ var _ = Describe("Output Result", func() {
224
216
fmt .Println (line )
225
217
Expect (line ).To (ContainSubstring ("level=error" ), line )
226
218
Expect (line ).To (ContainSubstring (`msg="example of an error"` ), line )
227
- Expect (exitCode ).To (Equal (0 ))
228
219
})
229
220
})
230
221
0 commit comments