satellite/payments/billing: fix test

`time.Now()` can return the same value when called sequentially.

Change-Id: I800c7696b919ad073e4558fb51c8d2eb4a04f05e
This commit is contained in:
Egon Elbre 2023-07-18 16:25:40 +03:00
parent 583ad54d86
commit b1e7d70a86

View File

@ -29,6 +29,8 @@ func TestTransactionsDBList(t *testing.T) {
// create transactions
userID := testrand.UUID()
firstTimestamp := makeTimestamp()
var txs []billing.Transaction
var txStatus billing.TransactionStatus
var txType billing.TransactionType
@ -60,7 +62,7 @@ func TestTransactionsDBList(t *testing.T) {
Status: txStatus,
Type: txType,
Metadata: metadata,
Timestamp: makeTimestamp(),
Timestamp: firstTimestamp.Add(time.Duration(i) * time.Second),
}
txs = append(txs, createTX)