mirror of
https://github.com/restic/restic.git
synced 2025-08-11 21:27:50 +00:00
b2/s3: Move config validation from ApplyEnvironment to Open/Create
Conceptually the backend configuration should be validated when creating or opening the backend, but not when filling in information from environment variables into the configuration.
This commit is contained in:
@@ -35,11 +35,7 @@ func newAzureTestSuite(t testing.TB) *test.Suite[azure.Config] {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
err = cfg.ApplyEnvironment("RESTIC_TEST_")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
cfg.ApplyEnvironment("RESTIC_TEST_")
|
||||
cfg.Prefix = fmt.Sprintf("test-%d", time.Now().UnixNano())
|
||||
return cfg, nil
|
||||
},
|
||||
|
Reference in New Issue
Block a user