MSP-5093 bump dependencies
This commit is contained in:
1 parent
3be63ce95a
commit
bf8cfff7fa
5 files changed
+79
-80
No files matched your search
@@ -1,7 +1,6 @@
|
||||
package tests_test
|
||||
|
||||
import (
|
||||
"context"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
@@ -40,7 +39,7 @@ func TestInactiveWorker(t *testing.T) {
|
||||
})
|
||||
|
||||
config := assembly.NewLocator(test.Logger(), nil, db).
|
||||
Config(context.Background(), emptyLdap, conf.Remote{
|
||||
Config(t.Context(), emptyLdap, conf.Remote{
|
||||
BlockInactiveWorker: conf.BlockInactiveWorker{
|
||||
DaysThreshold: 1,
|
||||
RunIntervalInMinutes: 60,
|
||||
@@ -48,18 +47,18 @@ func TestInactiveWorker(t *testing.T) {
|
||||
})
|
||||
bgjobCli := bgjobx.NewClient(db, test.Logger())
|
||||
assembly.JobPollInterval = 300 * time.Millisecond
|
||||
err := bgjobCli.Upgrade(context.Background(), config.BgJobCfg)
|
||||
err := bgjobCli.Upgrade(t.Context(), config.BgJobCfg)
|
||||
require.NoError(err)
|
||||
err = inactive_worker.EnqueueSeedJob(context.Background(), bgjobCli)
|
||||
err = inactive_worker.EnqueueSeedJob(t.Context(), bgjobCli)
|
||||
require.NoError(err)
|
||||
|
||||
time.Sleep(5 * time.Second)
|
||||
|
||||
user, err := repository.NewUser(db).GetUserById(context.Background(), userId)
|
||||
user, err := repository.NewUser(db).GetUserById(t.Context(), userId)
|
||||
require.NoError(err)
|
||||
require.True(user.Blocked)
|
||||
|
||||
list, err := repository.NewAudit(db).All(context.Background(), 10, 0)
|
||||
list, err := repository.NewAudit(db).All(t.Context(), 10, 0)
|
||||
require.NoError(err)
|
||||
require.Len(list, 1)
|
||||
}
|
||||
Reference in new issue
Block a user