mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-20 19:04:59 +00:00
PT-1891 Fixed mongodb-summary connection with ssl (#469)
* PT-1891 Fixed mongodb-summary connection with ssl - Added SSL connection options - Fixed old tests - Replaced gofmt by gofumpt in Makefile - There are no ssl test for mongodb-summary because the current sandbox doesnt support it * PT-1891 Ran gofumports * PMM-1891 Fixes for CR * PT-1891 Decreased minimum TLS reqs for compatibility
This commit is contained in:
@@ -50,7 +50,7 @@ func encrypt(infile, outfile string, pass [32]byte) error {
|
||||
var iv [aes.BlockSize]byte
|
||||
stream := cipher.NewOFB(block, iv[:])
|
||||
|
||||
outFile, err := os.OpenFile(outfile, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0600)
|
||||
outFile, err := os.OpenFile(outfile, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0o600)
|
||||
if err != nil {
|
||||
return errors.Wrapf(err, "Cannot create output file %q", outfile)
|
||||
}
|
||||
@@ -81,7 +81,7 @@ func decrypt(infile, outfile string, pass [32]byte) error {
|
||||
var iv [aes.BlockSize]byte
|
||||
stream := cipher.NewOFB(block, iv[:])
|
||||
|
||||
outFile, err := os.OpenFile(outfile, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0600)
|
||||
outFile, err := os.OpenFile(outfile, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0o600)
|
||||
if err != nil {
|
||||
return errors.Wrapf(err, "Cannot open %q for writing", outfile)
|
||||
}
|
||||
|
@@ -32,11 +32,9 @@ func TestProcessCliParams(t *testing.T) {
|
||||
t.Errorf("Test #%d expected error, have nil", i)
|
||||
}
|
||||
if !reflect.DeepEqual(opts, test.WantOpts) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestCollect(t *testing.T) {
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user