summaryrefslogtreecommitdiff
path: root/sync_worker_test.go
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2020-11-09 15:11:10 +0300
committerGitHub <[email protected]>2020-11-09 15:11:10 +0300
commit0874bcb2f6b284a940ba4f3507eb8c4619c27868 (patch)
treec99d15624cd080cad22b7c8fb7d4714b2dc124fb /sync_worker_test.go
parent9fbe7726dd55cfedda724b7644e1b6bf7c1a6cb4 (diff)
parentf218dcbd7e55d9ad1df8336e2331cdaa62d9ded3 (diff)
Merge pull request #390 from spiral/feature/switch_to_spiral_errorsv2.0.0-alpha17
Feature/switch to spiral errors
Diffstat (limited to 'sync_worker_test.go')
-rwxr-xr-xsync_worker_test.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/sync_worker_test.go b/sync_worker_test.go
index 1bc2deb1..add0a066 100755
--- a/sync_worker_test.go
+++ b/sync_worker_test.go
@@ -6,6 +6,7 @@ import (
"sync"
"testing"
+ "github.com/spiral/errors"
"github.com/stretchr/testify/assert"
)
@@ -206,8 +207,10 @@ func Test_Error(t *testing.T) {
assert.Nil(t, res.Body)
assert.Nil(t, res.Context)
- assert.IsType(t, ExecError{}, err)
- assert.Equal(t, "hello", err.Error())
+ if errors.Is(errors.Exec, err) == false {
+ t.Fatal("error should be of type errors.Exec")
+ }
+ assert.Contains(t, err.Error(), "exec payload: Exec: hello")
}
func Test_NumExecs(t *testing.T) {