tests: Remove more flags

This commit is contained in:
Alexander Neumann 2015-06-28 13:15:35 +02:00
parent 189a33730a
commit 26e4d2e019
8 changed files with 52 additions and 87 deletions

View file

@ -5,7 +5,6 @@ import (
"crypto/rand"
"crypto/sha256"
"encoding/json"
"flag"
"io"
"testing"
@ -15,8 +14,6 @@ import (
. "github.com/restic/restic/test"
)
var benchTestDir = flag.String("test.dir", ".", "dir used in benchmarks (default: .)")
type testJSONStruct struct {
Foo uint32
Bar string
@ -159,12 +156,12 @@ func TestLoadJSONPack(t *testing.T) {
repo := SetupRepo()
defer TeardownRepo(repo)
if *benchTestDir == "" {
if BenchArchiveDirectory == "" {
t.Skip("benchdir not set, skipping")
}
// archive a few files
sn := SnapshotDir(t, repo, *benchTestDir, nil)
sn := SnapshotDir(t, repo, BenchArchiveDirectory, nil)
OK(t, repo.Flush())
tree := restic.NewTree()
@ -176,7 +173,7 @@ func TestLoadJSONUnpacked(t *testing.T) {
repo := SetupRepo()
defer TeardownRepo(repo)
if *benchTestDir == "" {
if BenchArchiveDirectory == "" {
t.Skip("benchdir not set, skipping")
}