2017-07-08 06:38:48 -07:00
|
|
|
package azure
|
|
|
|
|
2023-04-20 23:02:56 +02:00
|
|
|
import (
|
|
|
|
"testing"
|
2017-07-08 06:38:48 -07:00
|
|
|
|
2023-04-20 23:02:56 +02:00
|
|
|
"github.com/restic/restic/internal/backend/test"
|
|
|
|
)
|
|
|
|
|
|
|
|
var configTests = []test.ConfigTestData[Config]{
|
2023-04-21 21:11:33 +02:00
|
|
|
{S: "azure:container-name:/", Cfg: Config{
|
2017-07-08 06:38:48 -07:00
|
|
|
Container: "container-name",
|
|
|
|
Prefix: "",
|
|
|
|
Connections: 5,
|
|
|
|
}},
|
2023-04-21 21:11:33 +02:00
|
|
|
{S: "azure:container-name:/prefix/directory", Cfg: Config{
|
2017-07-08 06:38:48 -07:00
|
|
|
Container: "container-name",
|
|
|
|
Prefix: "prefix/directory",
|
|
|
|
Connections: 5,
|
|
|
|
}},
|
2023-04-21 21:11:33 +02:00
|
|
|
{S: "azure:container-name:/prefix/directory/", Cfg: Config{
|
2017-07-08 06:38:48 -07:00
|
|
|
Container: "container-name",
|
|
|
|
Prefix: "prefix/directory",
|
|
|
|
Connections: 5,
|
|
|
|
}},
|
|
|
|
}
|
|
|
|
|
|
|
|
func TestParseConfig(t *testing.T) {
|
2023-04-20 23:02:56 +02:00
|
|
|
test.ParseConfigTester(t, ParseConfig, configTests)
|
2017-07-08 06:38:48 -07:00
|
|
|
}
|