forked from TrueCloudLab/restic
backend: let ParseConfig return concrete type
This commit is contained in:
parent
2f7b4ceae1
commit
5260d38980
17 changed files with 55 additions and 62 deletions
|
@ -43,12 +43,11 @@ func newSwiftTestSuite(t testing.TB) *test.Suite {
|
|||
|
||||
// NewConfig returns a config for a new temporary backend that will be used in tests.
|
||||
NewConfig: func() (interface{}, error) {
|
||||
swiftcfg, err := swift.ParseConfig(os.Getenv("RESTIC_TEST_SWIFT"))
|
||||
cfg, err := swift.ParseConfig(os.Getenv("RESTIC_TEST_SWIFT"))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
cfg := swiftcfg.(swift.Config)
|
||||
if err = swift.ApplyEnvironment("RESTIC_TEST_", &cfg); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue