Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
mariadb
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GitHub Mirror
docker-library
mariadb
Commits
27fdd426
Commit
27fdd426
authored
11 months ago
by
Daniel Black
Browse files
Options
Downloads
Patches
Plain Diff
add test case for healthcheck.sh variants
parent
ee80a97d
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
.test/run.sh
+37
-0
37 additions, 0 deletions
.test/run.sh
with
37 additions
and
0 deletions
.test/run.sh
+
37
−
0
View file @
27fdd426
...
@@ -921,6 +921,43 @@ zstd "${initdb}"/*zst*
...
@@ -921,6 +921,43 @@ zstd "${initdb}"/*zst*
mariadbclient -u root -psoverysecret -e 'select current_user() as connected_ok'
mariadbclient -u root -psoverysecret -e 'select current_user() as connected_ok'
docker exec "
$cname
" healthcheck.sh --connect --innodb_initialized
docker exec "
$cname
" healthcheck.sh --connect --innodb_initialized
# healthcheck shouldn't return true on insufficient connection information
# Enforce fallback to tcp in healthcheck.
docker exec "
$cname
" sed -i -e 's/
\(
socket=
\)
/
\1
breakpath/' /var/lib/mysql/.my-healthcheck.cnf
# select @@skip-networking via tcp successful
docker exec "
$cname
" healthcheck.sh --connect
mariadbclient -u root -psoverysecret -e 'alter user healthcheck@
`
127.0.0.1
`
ACCOUNT LOCK'
mariadbclient -u root -psoverysecret -e 'alter user healthcheck@
`
::1
`
ACCOUNT LOCK'
# ERROR 4151 (HY000): Access denied, this account is locked
docker exec "
$cname
" healthcheck.sh --connect
mariadbclient -u root -psoverysecret -e 'alter user healthcheck@
`
127.0.0.1
`
WITH MAX_QUERIES_PER_HOUR 1 ACCOUNT UNLOCK'
mariadbclient -u root -psoverysecret -e 'alter user healthcheck@
`
::1
`
WITH MAX_QUERIES_PER_HOUR 1 ACCOUNT UNLOCK'
# ERROR 1226 (42000) at line 1: User '
\'
'healthcheck'
\'
' has exceeded the '
\'
'max_queries_per_hour'
\'
' resource (current value: 1)'
docker exec "
$cname
" healthcheck.sh --connect
docker exec "
$cname
" healthcheck.sh --connect
mariadbclient -u root -psoverysecret -e 'alter user healthcheck@
`
127.0.0.1
`
WITH MAX_QUERIES_PER_HOUR 2000 PASSWORD EXPIRE'
mariadbclient -u root -psoverysecret -e 'alter user healthcheck@
`
::1
`
WITH MAX_QUERIES_PER_HOUR 2000 PASSWORD EXPIRE'
# ERROR 1820 (HY000) at line 1: You must SET PASSWORD before executing this statement
docker exec "
$cname
" healthcheck.sh --connect
mariadbclient -u root -psoverysecret -e 'set password for healthcheck@
`
127.0.0.1
`
= PASSWORD("
mismatch
")'
mariadbclient -u root -psoverysecret -e 'set password for healthcheck@
`
::1
`
= PASSWORD("
mismatch
")'
# ERROR 1045 (28000): Access denied
docker exec "
$cname
" healthcheck.sh --connect
# break port
docker exec "
$cname
" sed -i -e 's/
\(
port=
\)
/
\1
4/' /var/lib/mysql/.my-healthcheck.cnf
docker exec "
$cname
" healthcheck.sh --connect || echo "
ok, broken port is a connection failure
"
killoff
killoff
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment