forked from TrueCloudLab/restic
location: fix tests
This commit is contained in:
parent
5722ccfcda
commit
338ad42273
1 changed files with 15 additions and 8 deletions
|
@ -46,28 +46,35 @@ var parseTests = []struct {
|
|||
|
||||
{"s3://eu-central-1/bucketname", Location{Scheme: "s3",
|
||||
Config: s3.Config{
|
||||
Region: "eu-central-1",
|
||||
Endpoint: "eu-central-1",
|
||||
Bucket: "bucketname",
|
||||
}},
|
||||
},
|
||||
{"s3://hostname.foo/bucketname", Location{Scheme: "s3",
|
||||
Config: s3.Config{
|
||||
Region: "hostname.foo",
|
||||
Endpoint: "hostname.foo",
|
||||
Bucket: "bucketname",
|
||||
}},
|
||||
},
|
||||
{"s3:eu-central-1/repo", Location{Scheme: "s3",
|
||||
Config: s3.Config{
|
||||
Region: "eu-central-1",
|
||||
Endpoint: "eu-central-1",
|
||||
Bucket: "repo",
|
||||
}},
|
||||
},
|
||||
{"s3:https://hostname.foo/repo", Location{Scheme: "s3",
|
||||
Config: s3.Config{
|
||||
URL: "https://hostname.foo",
|
||||
Endpoint: "hostname.foo",
|
||||
Bucket: "repo",
|
||||
}},
|
||||
},
|
||||
{"s3:http://hostname.foo/repo", Location{Scheme: "s3",
|
||||
Config: s3.Config{
|
||||
Endpoint: "hostname.foo",
|
||||
Bucket: "repo",
|
||||
UseHTTP: true,
|
||||
}},
|
||||
},
|
||||
}
|
||||
|
||||
func TestParse(t *testing.T) {
|
||||
|
|
Loading…
Reference in a new issue