2
2
mirror of https://github.com/octoleo/restic.git synced 2024-12-18 16:42:00 +00:00
restic/internal/backend/gs/config_test.go

33 lines
682 B
Go
Raw Normal View History

package gs
import (
"testing"
"github.com/restic/restic/internal/backend/test"
)
var configTests = []test.ConfigTestData[Config]{
2023-04-21 19:11:33 +00:00
{S: "gs:bucketname:/", Cfg: Config{
Bucket: "bucketname",
Prefix: "",
Connections: 5,
2023-02-27 06:53:25 +00:00
Region: "us",
}},
2023-04-21 19:11:33 +00:00
{S: "gs:bucketname:/prefix/directory", Cfg: Config{
Bucket: "bucketname",
Prefix: "prefix/directory",
Connections: 5,
2023-02-27 06:53:25 +00:00
Region: "us",
}},
2023-04-21 19:11:33 +00:00
{S: "gs:bucketname:/prefix/directory/", Cfg: Config{
Bucket: "bucketname",
Prefix: "prefix/directory",
Connections: 5,
2023-02-27 06:53:25 +00:00
Region: "us",
}},
}
func TestParseConfig(t *testing.T) {
test.ParseConfigTester(t, ParseConfig, configTests)
}