mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-02 06:41:18 +00:00
27 lines
463 B
Go
27 lines
463 B
Go
|
package pipeline
|
||
|
|
||
|
import (
|
||
|
"testing"
|
||
|
)
|
||
|
|
||
|
func TestExitError(t *testing.T) {
|
||
|
err := ExitError{
|
||
|
Name: "build",
|
||
|
Code: 255,
|
||
|
}
|
||
|
got, want := err.Error(), "build : exit code 255"
|
||
|
if got != want {
|
||
|
t.Errorf("Want error message %q, got %q", want, got)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
func TestOomError(t *testing.T) {
|
||
|
err := OomError{
|
||
|
Name: "build",
|
||
|
}
|
||
|
got, want := err.Error(), "build : received oom kill"
|
||
|
if got != want {
|
||
|
t.Errorf("Want error message %q, got %q", want, got)
|
||
|
}
|
||
|
}
|