Skip to content

Commit

Permalink
test static check.
Browse files Browse the repository at this point in the history
  • Loading branch information
runkecheng committed Mar 31, 2022
1 parent 9aff314 commit a590de7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions controllers/mysqluser_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,8 @@ func (r *MysqlUserReconciler) reconcileUserInDB(ctx context.Context, mysqlUser *
return err
}

// test static check

password := string(secret.Data[mysqlUser.Spec.SecretSelector.SecretKey])
if password == "" {
return fmt.Errorf("the MySQL user's password must not be empty")
Expand Down

0 comments on commit a590de7

Please sign in to comment.