Skip to content

Commit

Permalink
test(e2e): seed DB with two entries for same iccid
Browse files Browse the repository at this point in the history
to make sure it returns the most recent one
  • Loading branch information
Lenakh97 committed Jul 4, 2024
1 parent 5bbd02b commit a35a1a3
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion e2e-tests/seedingDBFunction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,25 @@ export const seedingDBFunction = async ({
usedBytes: 50,
totalBytes: 1000,
}
const simDetails3 = {
usedBytes: 25,
totalBytes: 1000,
}
//put recent data on DB
await putSimDetails(db, outputs.cacheTableName)(
iccidNew,
true,
simDetails,
now,
)
//put old data in DB
//put 10 min old data in DB for iccidOld
await putSimDetails(db, outputs.cacheTableName)(
iccidOld,
true,
simDetails3,
new Date(Date.now() - 10 * 60 * 1000),
)
//put 6 min old data in DB for iccidOld
await putSimDetails(db, outputs.cacheTableName)(
iccidOld,
true,
Expand Down

0 comments on commit a35a1a3

Please sign in to comment.