github.com/machinefi/w3bstream@v1.6.5-rc9.0.20240426031326-b8c7c4876e72/cmd/srv-applet-mgr/tests/requires/error_check.go (about) 1 package requires 2 3 import ( 4 "testing" 5 6 . "github.com/onsi/gomega" 7 8 "github.com/machinefi/w3bstream/pkg/depends/kit/statusx" 9 ) 10 11 func CheckError(t *testing.T, err error, expect error) { 12 if err == nil && expect == nil { 13 return 14 } 15 se1 := statusx.FromErr(err) 16 se2 := statusx.FromErr(expect) 17 18 NewWithT(t).Expect(se1.Key).To(Equal(se2.Key)) 19 }