test: use standard logging methods from testing for the test helpers

Use the logging methods from testing.TB to make use of tb.Helper(). This
allows the tests to log the filename and line number in which the test
helper was called. Previously the test helper was logged which is rarely
useful.
This commit is contained in:
Michael Eischer
2023-05-05 23:26:13 +02:00
parent 658aa4c0f7
commit c3212ab6a6
2 changed files with 15 additions and 13 deletions

View File

@@ -31,6 +31,7 @@ import (
)
func parseIDsFromReader(t testing.TB, rd io.Reader) restic.IDs {
t.Helper()
IDs := restic.IDs{}
sc := bufio.NewScanner(rd)
@@ -148,6 +149,7 @@ func testRunRestoreAssumeFailure(snapshotID string, opts RestoreOptions, gopts G
}
func testRunCheck(t testing.TB, gopts GlobalOptions) {
t.Helper()
opts := CheckOptions{
ReadData: true,
CheckUnused: true,