Keep test files on assertion failure
We were pretty careful to keep the test directory around if the test ever exited early due to a panic or error return. But if the test ran to completion and failed -- for example, if ExtraRuntimeValidation caused the test to fail -- we would end up deleting the test directory. Fixes #868
This commit is contained in:
parent
818246a708
commit
606c45ffea
|
@ -399,7 +399,9 @@ func (pt *programTester) testLifeCycleInitAndDestroy() error {
|
|||
return errors.Wrap(err, "running test preview, update, and edits")
|
||||
}
|
||||
|
||||
keepTestDir = false
|
||||
// Ran to completion. Delete the test directory if the test passed.
|
||||
keepTestDir = pt.t.Failed()
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue