Skip to content

Commit

Permalink
test: ipv4 or v6 is ok
Browse files Browse the repository at this point in the history
  • Loading branch information
grooverdan committed Jun 23, 2023
1 parent 4277fc2 commit fbb2d9a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .test/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -270,16 +270,18 @@ killoff
$mariadb --defaults-file=/var/lib/mysql/.my-healthcheck.cnf \
--silent \
-e "show create user")
# shellcheck disable=SC2016
[[ "${createuser//\'/\`}" =~ 'CREATE USER `healthcheck`@`::1` IDENTIFIED' ]] || die "healtheck wasn't created how I was expected"
# shellcheck disable=SC2016,SC2076
[[ "${createuser//\'/\`}" =~ 'CREATE USER `healthcheck`@`::1` IDENTIFIED' ]] || \
[[ "${createuser//\'/\`}" =~ 'CREATE USER `healthcheck`@`127.0.0.1` IDENTIFIED' ]] || die "healtheck wasn't created how I was expected"

grants="$(docker exec --user mysql -i \
$cname \
$mariadb --defaults-file=/var/lib/mysql/.my-healthcheck.cnf \
--silent \
-e show\ grants)"

[[ "${grants//\'/\`}" =~ GRANT\ USAGE\ ON\ *.*\ TO\ \`healthcheck\`@\`::1\` ]] || die "healthcheck wasn't granted what I was expected"
[[ "${grants//\'/\`}" =~ GRANT\ USAGE\ ON\ *.*\ TO\ \`healthcheck\`@\`::1\` ]] || \
[[ "${grants//\'/\`}" =~ GRANT\ USAGE\ ON\ *.*\ TO\ \`healthcheck\`@\`127.0.0.1\` ]] || die "healthcheck wasn't granted what I was expected"
killoff

;&
Expand Down

0 comments on commit fbb2d9a

Please sign in to comment.