mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-01 19:17:58 +00:00
Run a more strict formatter over the code (#11312)
* Update tooling * Run gofumpt * go mod vendor
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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}}'@'%';`,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user