Skip to content

Commit 31305ad

Browse files
committed
test: turn receipts into invalid
Signed-off-by: Gustavo Inacio <[email protected]>
1 parent e06e84f commit 31305ad

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

crates/tap-agent/src/agent/sender_allocation.rs

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1702,18 +1702,20 @@ pub mod tests {
17021702
.register(
17031703
Mock::given(method("POST"))
17041704
.and(body_string_contains("transactions"))
1705-
.respond_with(
1706-
ResponseTemplate::new(200)
1707-
.set_body_json(json!({ "data": { "transactions": []}})),
1708-
),
1705+
.respond_with(ResponseTemplate::new(200).set_body_json(
1706+
json!({ "data": { "transactions": [
1707+
{
1708+
"id": "redeemed"
1709+
}
1710+
]}}),
1711+
)),
17091712
)
17101713
.await;
1711-
// Add invalid receipts to the database. ( receipts are older than rav )
1714+
// Add invalid receipts to the database. ( already redeemed )
17121715
let timestamp = SystemTime::now()
17131716
.duration_since(UNIX_EPOCH)
17141717
.expect("Time went backwards")
1715-
.as_nanos() as u64
1716-
- 10000;
1718+
.as_nanos() as u64;
17171719
const RECEIPT_VALUE: u128 = 1622018441284756158;
17181720
const TOTAL_RECEIPTS: u64 = 10;
17191721
const TOTAL_SUM: u128 = RECEIPT_VALUE * TOTAL_RECEIPTS as u128;

0 commit comments

Comments
 (0)