Skip to content

Commit ea3a6c8

Browse files
gnd: Separate tests and fix retry count env var value
Signed-off-by: Maksim Dimitrov <dimitrov.maksim@gmail.com>
1 parent b330e50 commit ea3a6c8

2 files changed

Lines changed: 16 additions & 5 deletions

File tree

gnd/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ async fn main() -> Result<()> {
181181
// Disable RPC retries so unmocked calls fail immediately.
182182
// SAFETY: single-threaded here, before the Tokio runtime is built.
183183
unsafe {
184-
std::env::set_var("GRAPH_ETHEREUM_REQUEST_RETRIES", "0");
184+
std::env::set_var("GRAPH_ETHEREUM_REQUEST_RETRIES", "1");
185185
}
186186
run_test(test_opt).await
187187
}

gnd/tests/gnd_test.rs

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,13 +159,24 @@ fn run_gnd_test(args: &[&str], cwd: &Path) -> std::process::Output {
159159
// ============================================================================
160160

161161
#[test]
162-
fn test_token_transfer_and_templates() {
162+
fn test_token_transfer() {
163163
let (_temp_dir, subgraph_dir) = setup_fixture("token");
164164

165-
let output = run_gnd_test(
166-
&["tests/transfer.json", "tests/templates.json"],
167-
&subgraph_dir,
165+
let output = run_gnd_test(&["tests/transfer.json"], &subgraph_dir);
166+
167+
assert!(
168+
output.status.success(),
169+
"gnd test failed for token fixture\nstdout: {}\nstderr: {}",
170+
String::from_utf8_lossy(&output.stdout),
171+
String::from_utf8_lossy(&output.stderr),
168172
);
173+
}
174+
175+
#[test]
176+
fn test_templates() {
177+
let (_temp_dir, subgraph_dir) = setup_fixture("token");
178+
179+
let output = run_gnd_test(&["tests/templates.json"], &subgraph_dir);
169180

170181
assert!(
171182
output.status.success(),

0 commit comments

Comments
 (0)