From 2462f935336810b2c25cebe85917f04077c7c6ad Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Tue, 17 Feb 2015 23:40:37 +0100 Subject: [PATCH] Disable Tests when benchdir is unset --- archiver_test.go | 4 ++++ server_test.go | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/archiver_test.go b/archiver_test.go index 6bd16046d..7689e274d 100644 --- a/archiver_test.go +++ b/archiver_test.go @@ -166,6 +166,10 @@ func countBlobs(t *testing.T, server restic.Server) int { } func TestArchiverPreload(t *testing.T) { + if *benchArchiveDirectory == "" { + t.Skip("benchdir not set, skipping TestArchiverPreload") + } + be := setupBackend(t) defer teardownBackend(t, be) key := setupKey(t, be, "geheim") diff --git a/server_test.go b/server_test.go index 5c3f2dd46..c5c6f11d4 100644 --- a/server_test.go +++ b/server_test.go @@ -125,6 +125,10 @@ func BenchmarkSaveFrom(t *testing.B) { } func TestServerStats(t *testing.T) { + if *benchArchiveDirectory == "" { + t.Skip("benchdir not set, skipping TestServerStats") + } + be := setupBackend(t) defer teardownBackend(t, be) key := setupKey(t, be, "geheim")