Remove remnant of Go 1.9 compatibility code from tests

This commit is contained in:
greatroar 2020-02-17 13:07:55 +01:00
parent 616f9499ae
commit 4f6fd9fb98
4 changed files with 9 additions and 25 deletions

View file

@ -42,7 +42,7 @@ const testChunkerPol = chunker.Pol(0x3DA3358B4DC173)
// password. If be is nil, an in-memory backend is used. A constant polynomial
// is used for the chunker and low-security test parameters.
func TestRepositoryWithBackend(t testing.TB, be restic.Backend) (r restic.Repository, cleanup func()) {
test.Helper(t).Helper()
t.Helper()
TestUseLowSecurityKDFParameters(t)
restic.TestDisableCheckPolynomial(t)
@ -71,7 +71,7 @@ func TestRepositoryWithBackend(t testing.TB, be restic.Backend) (r restic.Reposi
// a non-existing directory, a local backend is created there and this is used
// instead. The directory is not removed, but left there for inspection.
func TestRepository(t testing.TB) (r restic.Repository, cleanup func()) {
test.Helper(t).Helper()
t.Helper()
dir := os.Getenv("RESTIC_TEST_REPO")
if dir != "" {
_, err := os.Stat(dir)