mirror of
https://github.com/restic/restic.git
synced 2025-08-13 22:57:44 +00:00
backend: let ParseConfig return concrete type
This commit is contained in:
@@ -27,12 +27,11 @@ func newGSTestSuite(t testing.TB) *test.Suite {
|
||||
|
||||
// NewConfig returns a config for a new temporary backend that will be used in tests.
|
||||
NewConfig: func() (interface{}, error) {
|
||||
gscfg, err := gs.ParseConfig(os.Getenv("RESTIC_TEST_GS_REPOSITORY"))
|
||||
cfg, err := gs.ParseConfig(os.Getenv("RESTIC_TEST_GS_REPOSITORY"))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
cfg := gscfg.(gs.Config)
|
||||
cfg.ProjectID = os.Getenv("RESTIC_TEST_GS_PROJECT_ID")
|
||||
cfg.Prefix = fmt.Sprintf("test-%d", time.Now().UnixNano())
|
||||
return cfg, nil
|
||||
|
Reference in New Issue
Block a user