[go: nahoru, domu]

Skip to content

Commit

Permalink
api: use clock package
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardoveiga authored and otavio committed Jun 11, 2021
1 parent fd60cc8 commit 5fa3e65
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions api/store/mongo/migrations/migration_23_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package migrations
import (
"context"
"testing"
"time"

"github.com/shellhub-io/shellhub/api/pkg/dbtest"
"github.com/shellhub-io/shellhub/pkg/clock"
"github.com/shellhub-io/shellhub/pkg/models"
"github.com/stretchr/testify/assert"
migrate "github.com/xakep666/mongo-migrate"
Expand Down Expand Up @@ -48,7 +48,7 @@ func TestMigration23(t *testing.T) {
UID: "uid",
Identity: &models.DeviceIdentity{MAC: "mac"},
TenantID: "tenant",
LastSeen: time.Now(),
LastSeen: clock.Now(),
}
_, err = db.Client().Database("test").Collection("devices").InsertOne(context.TODO(), device)
assert.NoError(t, err)
Expand All @@ -58,7 +58,7 @@ func TestMigration23(t *testing.T) {
UID: "uid2",
Identity: &models.DeviceIdentity{MAC: "mac"},
TenantID: "tenant2",
LastSeen: time.Now(),
LastSeen: clock.Now(),
}
_, err = db.Client().Database("test").Collection("devices").InsertOne(context.TODO(), device)
assert.NoError(t, err)
Expand Down

0 comments on commit 5fa3e65

Please sign in to comment.