Commit Graph

4 Commits

Author SHA1 Message Date
Alessio Treglia f51f5e6784
testutil: new TempFile function, simplify WriteToNewTempFile (#8123)
Files returned by WriteToNewTempFile are cleaned up
automatically at the end of a test case execution.
WriteToNewTempFile now relies on the TB.TempDir()
function provided by the testing std package.

TempFile returns a temporary file that can be used
within a test case and is automatically removed
at the end of the test execution.
2020-12-09 18:27:20 +00:00
Alessio Treglia 3e616a60d5
replace testutil.NewTestCaseDir() with Go1.15's T.TempDir() (#7014)
Override go's default version with go 1.15.
2020-09-18 12:08:24 +01:00
Alessio Treglia 255ed06eb4
testutil: add ApplyMockIODiscardOutErr, simplify existing functions (#6665) 2020-07-10 08:55:48 +02:00
Alessio Treglia a940214a49
testutil cleanup and reorg (#6658)
Prepare migrating testing auxiliary functions from tests
to testutil.

Remove local duplicates on testutil.WriteToNewTempFile().

Always favor testutil.NewTestCaseDir() over ioutil.TempDir().

Add test cases for the testing auxiliary functions.
2020-07-09 14:21:20 +02:00