Skip to content

Commit 99f6901

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 99f6a5a commit 99f6901

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
@@ -627,7 +627,12 @@ pub async fn cleanup(
627627
hash: &DeploymentHash,
628628
) -> Result<(), Error> {
629629
let locators = subgraph_store.locators(hash).await?;
630-
subgraph_store.remove_subgraph(name.clone()).await?;
630+
// Remove subgraph if it exists, ignore not found errors
631+
match subgraph_store.remove_subgraph(name.clone()).await {
632+
Ok(_) | Err(graph::prelude::StoreError::SubgraphNotFound(_)) => {}
633+
Err(e) => return Err(e.into()),
634+
}
635+
631636
for locator in locators {
632637
subgraph_store.remove_deployment(locator.id.into()).await?;
633638
}

0 commit comments

Comments
 (0)