Skip to content

Commit 3c2a91b

Browse files
liamcervantedsa0x
andauthored
Update internal/moduletest/graph/node_state_cleanup.go
Co-authored-by: Samsondeen <[email protected]>
1 parent 0e49c59 commit 3c2a91b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

internal/moduletest/graph/node_state_cleanup.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ func (n *NodeStateCleanup) cleanup(ctx *EvalContext, runNode *NodeTestRun, waite
189189
return updated, diags
190190
}
191191

192+
// shouldSkipCleanup determines whether the state cleanup should be skipped.
192193
func (n *NodeStateCleanup) shouldSkipCleanup(evalCtx *EvalContext, state *TestFileState, file *moduletest.File) bool {
193194
// If the state was loaded as a result of an intentional skip, we
194195
// don't need to clean it up when in repair mode.
@@ -209,7 +210,8 @@ func (n *NodeStateCleanup) shouldSkipCleanup(evalCtx *EvalContext, state *TestFi
209210
log.Printf("[DEBUG] TestStateManager: skipping state cleanup for state %q due to cancellation", n.stateKey)
210211
return true
211212
}
212-
213+
// If the node is marked as skip, we may need to override its state by applying that node, so
214+
// we would return false here unless already matched by the branches above.
213215
return false
214216
}
215217

0 commit comments

Comments
 (0)