You've already forked woodpecker
mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-11-23 21:44:44 +02:00
@@ -16,6 +16,8 @@ package pipeline
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestExitError(t *testing.T) {
|
||||
@@ -23,18 +25,12 @@ func TestExitError(t *testing.T) {
|
||||
UUID: "14534321",
|
||||
Code: 255,
|
||||
}
|
||||
got, want := err.Error(), "uuid=14534321: exit code 255"
|
||||
if got != want {
|
||||
t.Errorf("Want error message %q, got %q", want, got)
|
||||
}
|
||||
assert.Equal(t, "uuid=14534321: exit code 255", err.Error())
|
||||
}
|
||||
|
||||
func TestOomError(t *testing.T) {
|
||||
err := OomError{
|
||||
UUID: "14534321",
|
||||
}
|
||||
got, want := err.Error(), "uuid=14534321: received oom kill"
|
||||
if got != want {
|
||||
t.Errorf("Want error message %q, got %q", want, got)
|
||||
}
|
||||
assert.Equal(t, "uuid=14534321: received oom kill", err.Error())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user