mirror of
https://github.com/restic/restic.git
synced 2025-10-09 07:33:53 +00:00
Merge pull request #3470 from MichaelEischer/sanitize-debug-log
Sanitize debug log
This commit is contained in:
@@ -40,7 +40,7 @@ var _ restic.Backend = &Backend{}
|
||||
func open(cfg Config, rt http.RoundTripper) (*Backend, error) {
|
||||
debug.Log("open, config %#v", cfg)
|
||||
|
||||
client, err := storage.NewBasicClient(cfg.AccountName, cfg.AccountKey)
|
||||
client, err := storage.NewBasicClient(cfg.AccountName, cfg.AccountKey.Unwrap())
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "NewBasicClient")
|
||||
}
|
||||
|
@@ -13,6 +13,7 @@ import (
|
||||
"github.com/restic/restic/internal/backend/azure"
|
||||
"github.com/restic/restic/internal/backend/test"
|
||||
"github.com/restic/restic/internal/errors"
|
||||
"github.com/restic/restic/internal/options"
|
||||
"github.com/restic/restic/internal/restic"
|
||||
rtest "github.com/restic/restic/internal/test"
|
||||
)
|
||||
@@ -36,7 +37,7 @@ func newAzureTestSuite(t testing.TB) *test.Suite {
|
||||
|
||||
cfg := azcfg.(azure.Config)
|
||||
cfg.AccountName = os.Getenv("RESTIC_TEST_AZURE_ACCOUNT_NAME")
|
||||
cfg.AccountKey = os.Getenv("RESTIC_TEST_AZURE_ACCOUNT_KEY")
|
||||
cfg.AccountKey = options.NewSecretString(os.Getenv("RESTIC_TEST_AZURE_ACCOUNT_KEY"))
|
||||
cfg.Prefix = fmt.Sprintf("test-%d", time.Now().UnixNano())
|
||||
return cfg, nil
|
||||
},
|
||||
@@ -146,7 +147,7 @@ func TestUploadLargeFile(t *testing.T) {
|
||||
|
||||
cfg := azcfg.(azure.Config)
|
||||
cfg.AccountName = os.Getenv("RESTIC_TEST_AZURE_ACCOUNT_NAME")
|
||||
cfg.AccountKey = os.Getenv("RESTIC_TEST_AZURE_ACCOUNT_KEY")
|
||||
cfg.AccountKey = options.NewSecretString(os.Getenv("RESTIC_TEST_AZURE_ACCOUNT_KEY"))
|
||||
cfg.Prefix = fmt.Sprintf("test-upload-large-%d", time.Now().UnixNano())
|
||||
|
||||
tr, err := backend.Transport(backend.TransportOptions{})
|
||||
|
@@ -12,7 +12,7 @@ import (
|
||||
// server.
|
||||
type Config struct {
|
||||
AccountName string
|
||||
AccountKey string
|
||||
AccountKey options.SecretString
|
||||
Container string
|
||||
Prefix string
|
||||
|
||||
|
Reference in New Issue
Block a user