Skip to content

Commit 5885ca6

Browse files
committed
test(test-assets): update data creation functions for v2
1 parent 1b8c7da commit 5885ca6

File tree

1 file changed

+51
-1
lines changed

1 file changed

+51
-1
lines changed

crates/test-assets/src/lib.rs

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,50 @@ pub const ESCROW_QUERY_RESPONSE: &str = r#"
113113
}
114114
"#;
115115

116+
pub const ESCROW_QUERY_RESPONSE_V2: &str = r#"
117+
{
118+
"data": {
119+
"paymentsEscrowAccounts": [
120+
{
121+
"balance": "34",
122+
"totalAmountThawing": "10",
123+
"payer": {
124+
"id": "0x9858EfFD232B4033E47d90003D41EC34EcaEda94",
125+
"signers": [
126+
{
127+
"id": "0x533661F0fb14d2E8B26223C86a610Dd7D2260892"
128+
},
129+
{
130+
"id": "0x2740f6fA9188cF53ffB6729DDD21575721dE92ce"
131+
}
132+
]
133+
}
134+
},
135+
{
136+
"balance": "42",
137+
"totalAmountThawing": "0",
138+
"payer": {
139+
"id": "0x22d491bde2303f2f43325b2108d26f1eaba1e32b",
140+
"signers": [
141+
{
142+
"id": "0x245059163ff6ee14279aa7b35ea8f0fdb967df6e"
143+
}
144+
]
145+
}
146+
},
147+
{
148+
"balance": "2987",
149+
"totalAmountThawing": "12",
150+
"payer": {
151+
"id": "0x192c3B6e0184Fa0Cc5B9D2bDDEb6B79Fb216a002",
152+
"signers": []
153+
}
154+
}
155+
]
156+
}
157+
}
158+
"#;
159+
116160
pub const NETWORK_SUBGRAPH_DEPLOYMENT: DeploymentId =
117161
deployment_id!("QmU7zqJyHSyUP3yFii8sBtHT8FaJn2WmUnRvwjAUTjwMBP");
118162

@@ -417,8 +461,14 @@ pub fn pgpool() -> Pin<Box<dyn Future<Output = PgPool>>> {
417461
ConnectOptions, Connection,
418462
};
419463
Box::pin(async {
464+
let timestamp = SystemTime::now()
465+
.duration_since(UNIX_EPOCH)
466+
.unwrap()
467+
.as_nanos();
468+
let test_path =
469+
Box::leak(format!("{}_{}", stdext::function_name!(), timestamp).into_boxed_str());
420470
let args = TestArgs {
421-
test_path: stdext::function_name!(),
471+
test_path,
422472
migrator: Some(&migrate!("../../migrations")),
423473
fixtures: &[],
424474
};

0 commit comments

Comments
 (0)