Skip to content

Commit 17a67f3

Browse files
test(integration): Ignore SubgraphNotFound errors when removing subgraphs that may not exist
Signed-off-by: Maksim Dimitrov <dimitrov.maksim@gmail.com>
1 parent d965ee8 commit 17a67f3

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tests/src/fixture/mod.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,12 @@ pub async fn cleanup(
626626
hash: &DeploymentHash,
627627
) -> Result<(), Error> {
628628
let locators = subgraph_store.locators(hash).await?;
629-
subgraph_store.remove_subgraph(name.clone()).await?;
629+
// Remove subgraph if it exists, ignore not found errors
630+
match subgraph_store.remove_subgraph(name.clone()).await {
631+
Ok(_) | Err(graph::prelude::StoreError::SubgraphNotFound(_)) => {}
632+
Err(e) => return Err(e.into()),
633+
}
634+
630635
for locator in locators {
631636
subgraph_store.remove_deployment(locator.id.into()).await?;
632637
}

0 commit comments

Comments
 (0)