mirror of
https://github.com/octoleo/restic.git
synced 2024-11-24 05:37:37 +00:00
33 lines
682 B
Go
33 lines
682 B
Go
package gs
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/restic/restic/internal/backend/test"
|
|
)
|
|
|
|
var configTests = []test.ConfigTestData[Config]{
|
|
{S: "gs:bucketname:/", Cfg: Config{
|
|
Bucket: "bucketname",
|
|
Prefix: "",
|
|
Connections: 5,
|
|
Region: "us",
|
|
}},
|
|
{S: "gs:bucketname:/prefix/directory", Cfg: Config{
|
|
Bucket: "bucketname",
|
|
Prefix: "prefix/directory",
|
|
Connections: 5,
|
|
Region: "us",
|
|
}},
|
|
{S: "gs:bucketname:/prefix/directory/", Cfg: Config{
|
|
Bucket: "bucketname",
|
|
Prefix: "prefix/directory",
|
|
Connections: 5,
|
|
Region: "us",
|
|
}},
|
|
}
|
|
|
|
func TestParseConfig(t *testing.T) {
|
|
test.ParseConfigTester(t, ParseConfig, configTests)
|
|
}
|