From 48c1e7b00debb29a52b8aa39d09a649595f000d0 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Tue, 6 Jun 2017 21:12:38 +0200 Subject: [PATCH] Fix location tests --- src/restic/backend/location/location_test.go | 71 +++++++++++--------- 1 file changed, 41 insertions(+), 30 deletions(-) diff --git a/src/restic/backend/location/location_test.go b/src/restic/backend/location/location_test.go index 46bb6b187..09e45cecd 100644 --- a/src/restic/backend/location/location_test.go +++ b/src/restic/backend/location/location_test.go @@ -120,9 +120,10 @@ var parseTests = []struct { "s3://eu-central-1/bucketname", Location{Scheme: "s3", Config: s3.Config{ - Endpoint: "eu-central-1", - Bucket: "bucketname", - Prefix: "restic", + Endpoint: "eu-central-1", + Bucket: "bucketname", + Prefix: "restic", + Connections: 20, }, }, }, @@ -130,9 +131,10 @@ var parseTests = []struct { "s3://hostname.foo/bucketname", Location{Scheme: "s3", Config: s3.Config{ - Endpoint: "hostname.foo", - Bucket: "bucketname", - Prefix: "restic", + Endpoint: "hostname.foo", + Bucket: "bucketname", + Prefix: "restic", + Connections: 20, }, }, }, @@ -140,9 +142,10 @@ var parseTests = []struct { "s3://hostname.foo/bucketname/prefix/directory", Location{Scheme: "s3", Config: s3.Config{ - Endpoint: "hostname.foo", - Bucket: "bucketname", - Prefix: "prefix/directory", + Endpoint: "hostname.foo", + Bucket: "bucketname", + Prefix: "prefix/directory", + Connections: 20, }, }, }, @@ -150,9 +153,10 @@ var parseTests = []struct { "s3:eu-central-1/repo", Location{Scheme: "s3", Config: s3.Config{ - Endpoint: "eu-central-1", - Bucket: "repo", - Prefix: "restic", + Endpoint: "eu-central-1", + Bucket: "repo", + Prefix: "restic", + Connections: 20, }, }, }, @@ -160,9 +164,10 @@ var parseTests = []struct { "s3:eu-central-1/repo/prefix/directory", Location{Scheme: "s3", Config: s3.Config{ - Endpoint: "eu-central-1", - Bucket: "repo", - Prefix: "prefix/directory", + Endpoint: "eu-central-1", + Bucket: "repo", + Prefix: "prefix/directory", + Connections: 20, }, }, }, @@ -170,9 +175,10 @@ var parseTests = []struct { "s3:https://hostname.foo/repo", Location{Scheme: "s3", Config: s3.Config{ - Endpoint: "hostname.foo", - Bucket: "repo", - Prefix: "restic", + Endpoint: "hostname.foo", + Bucket: "repo", + Prefix: "restic", + Connections: 20, }, }, }, @@ -180,9 +186,10 @@ var parseTests = []struct { "s3:https://hostname.foo/repo/prefix/directory", Location{Scheme: "s3", Config: s3.Config{ - Endpoint: "hostname.foo", - Bucket: "repo", - Prefix: "prefix/directory", + Endpoint: "hostname.foo", + Bucket: "repo", + Prefix: "prefix/directory", + Connections: 20, }, }, }, @@ -190,10 +197,11 @@ var parseTests = []struct { "s3:http://hostname.foo/repo", Location{Scheme: "s3", Config: s3.Config{ - Endpoint: "hostname.foo", - Bucket: "repo", - Prefix: "restic", - UseHTTP: true, + Endpoint: "hostname.foo", + Bucket: "repo", + Prefix: "restic", + UseHTTP: true, + Connections: 20, }, }, }, @@ -201,8 +209,9 @@ var parseTests = []struct { "swift:container17:/", Location{Scheme: "swift", Config: swift.Config{ - Container: "container17", - Prefix: "", + Container: "container17", + Prefix: "", + Connections: 20, }, }, }, @@ -210,8 +219,9 @@ var parseTests = []struct { "swift:container17:/prefix97", Location{Scheme: "swift", Config: swift.Config{ - Container: "container17", - Prefix: "prefix97", + Container: "container17", + Prefix: "prefix97", + Connections: 20, }, }, }, @@ -219,7 +229,8 @@ var parseTests = []struct { "rest:http://hostname.foo:1234/", Location{Scheme: "rest", Config: rest.Config{ - URL: parseURL("http://hostname.foo:1234/"), + URL: parseURL("http://hostname.foo:1234/"), + Connections: 20, }, }, },