Run a more strict formatter over the code (#11312)

* Update tooling

* Run gofumpt

* go mod vendor
This commit is contained in:
Brian Kassouf
2021-04-08 09:43:39 -07:00
committed by GitHub
parent 60f3ba99a4
commit a24653cc5c
658 changed files with 10961 additions and 3671 deletions

View File

@@ -95,10 +95,10 @@ func TestInit_clientTLS(t *testing.T) {
certhelpers.Parent(caCert),
)
writeFile(t, paths.Join(confDir, "ca.pem"), caCert.CombinedPEM(), 0644)
writeFile(t, paths.Join(confDir, "server-cert.pem"), serverCert.Pem, 0644)
writeFile(t, paths.Join(confDir, "server-key.pem"), serverCert.PrivateKeyPEM(), 0644)
writeFile(t, paths.Join(confDir, "client.pem"), clientCert.CombinedPEM(), 0644)
writeFile(t, paths.Join(confDir, "ca.pem"), caCert.CombinedPEM(), 0o644)
writeFile(t, paths.Join(confDir, "server-cert.pem"), serverCert.Pem, 0o644)
writeFile(t, paths.Join(confDir, "server-key.pem"), serverCert.PrivateKeyPEM(), 0o644)
writeFile(t, paths.Join(confDir, "client.pem"), clientCert.CombinedPEM(), 0o644)
// //////////////////////////////////////////////////////
// Set up MySQL config file
@@ -109,7 +109,7 @@ ssl-ca=/etc/mysql/ca.pem
ssl-cert=/etc/mysql/server-cert.pem
ssl-key=/etc/mysql/server-key.pem`
writeFile(t, paths.Join(confDir, "my.cnf"), []byte(rawConf), 0644)
writeFile(t, paths.Join(confDir, "my.cnf"), []byte(rawConf), 0o644)
// //////////////////////////////////////////////////////
// Start MySQL container

View File

@@ -487,7 +487,8 @@ func TestMySQL_RotateRootCredentials(t *testing.T) {
statements: []string{defaultMySQLRotateCredentialsSQL},
},
"default name": {
statements: []string{`
statements: []string{
`
ALTER USER '{{username}}'@'%' IDENTIFIED BY '{{password}}';`,
},
},
@@ -569,7 +570,8 @@ func TestMySQL_DeleteUser(t *testing.T) {
revokeStmts: []string{defaultMysqlRevocationStmts},
},
"default username": {
revokeStmts: []string{`
revokeStmts: []string{
`
REVOKE ALL PRIVILEGES, GRANT OPTION FROM '{{username}}'@'%';
DROP USER '{{username}}'@'%'`,
},
@@ -609,7 +611,8 @@ func TestMySQL_DeleteUser(t *testing.T) {
RoleName: "test",
},
Statements: dbplugin.Statements{
Commands: []string{`
Commands: []string{
`
CREATE USER '{{name}}'@'%' IDENTIFIED BY '{{password}}';
GRANT SELECT ON *.* TO '{{name}}'@'%';`,
},