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:
Carlos Salguero
2020-11-02 17:13:29 -03:00
committed by GitHub
parent e731cf4d83
commit ff6b05b381
35 changed files with 286 additions and 136 deletions

View File

@@ -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)
}

View File

@@ -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) {
}