fix(import): check exists (#4268)

* fix(import): check if org exists and user

* refactor: imports

* fix(user): ignore malformed events

* refactor: method naming

* fix: test

* refactor: correct errors.Is call
This commit is contained in:
Silvan
2022-08-29 17:09:07 +02:00
committed by GitHub
parent dd53f70fd5
commit 60b2092d2c
10 changed files with 156 additions and 84 deletions

View File

@@ -1602,7 +1602,7 @@ func TestStatementHandler_updateCurrentSequence(t *testing.T) {
},
want: want{
isErr: func(err error) bool {
return errors.As(err, &errSeqNotUpdated)
return errors.Is(err, errSeqNotUpdated)
},
expectations: []mockExpectation{
expectUpdateCurrentSequenceNoRows("my_table", "my_projection", 5, "agg", "instanceID"),

View File

@@ -167,7 +167,7 @@ func TestStatementHandler_renewLock(t *testing.T) {
expectLockNoRows(lockTable, workerName, 2, "instanceID"),
},
isErr: func(err error) bool {
return errors.As(err, &renewNoRowsAffectedErr)
return errors.Is(err, renewNoRowsAffectedErr)
},
},
args: args{