mirror of
https://github.com/SecurityBrewery/catalyst.git
synced 2025-12-07 15:52:47 +01:00
feat: improve python actions (#1083)
This commit is contained in:
39
app/migrate_internal_test.go
Normal file
39
app/migrate_internal_test.go
Normal file
@@ -0,0 +1,39 @@
|
||||
package app
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func Test_isIgnored(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
type args struct {
|
||||
err error
|
||||
}
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
args args
|
||||
want bool
|
||||
}{
|
||||
{
|
||||
name: "error is ignored",
|
||||
args: args{err: errors.New("1673167670_multi_match_migrate")},
|
||||
want: true,
|
||||
},
|
||||
{
|
||||
name: "error is not ignored",
|
||||
args: args{err: errors.New("1673167670_multi_match")},
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
assert.Equalf(t, tt.want, isIgnored(tt.args.err), "isIgnored(%v)", tt.args.err)
|
||||
})
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user