mirror of
https://github.com/octoleo/restic.git
synced 2024-12-28 04:56:04 +00:00
Fix location tests
This commit is contained in:
parent
aa5bc39311
commit
48c1e7b00d
@ -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,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user