Skip to content

Commit

Permalink
More testing
Browse files Browse the repository at this point in the history
  • Loading branch information
tomkrouper committed Dec 11, 2024
1 parent f7364d3 commit 06799bb
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/cookbooks/test/recipes/smoke.rb
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,10 @@
# Create user repl on master
bash 'create replication user' do
code <<-EOF
MYSQL_PWD=#{Shellwords.escape(root_pass_master)} /usr/bin/mysql -u root -h 127.0.0.1 -P 3306 -D mysql -e "CREATE USER 'repl'@'127.0.0.1' IDENTIFIED BY 'REPLICAAATE';"
MYSQL_PWD=#{Shellwords.escape(root_pass_master)} /usr/bin/mysql -u root -h 127.0.0.1 -P 3306 -D mysql -e "GRANT REPLICATION SLAVE ON *.* TO 'repl'@'127.0.0.1';"
/usr/bin/mysql -u root -h 127.0.0.1 -P 3306 -p#{Shellwords.escape(root_pass_master)} -e 'show grants'
# MYSQL_PWD=#{Shellwords.escape(root_pass_master)} /usr/bin/mysql -u root -h 127.0.0.1 -P 3306 -D mysql -e "CREATE USER 'repl'@'127.0.0.1' IDENTIFIED BY 'REPLICAAATE';"
# MYSQL_PWD=#{Shellwords.escape(root_pass_master)} /usr/bin/mysql -u root -h 127.0.0.1 -P 3306 -D mysql -e "GRANT REPLICATION SLAVE ON *.* TO 'repl'@'127.0.0.1';"
MYSQL_PWD=ilikerandompasswords /usr/bin/mysql -u root -h 127.0.0.1 -P 3306 -D mysql -e "CREATE USER 'repl'@'127.0.0.1' IDENTIFIED BY 'REPLICAAATE';"
MYSQL_PWD=ilikerandompasswords /usr/bin/mysql -u root -h 127.0.0.1 -P 3306 -D mysql -e "GRANT REPLICATION SLAVE ON *.* TO 'repl'@'127.0.0.1';"
EOF
not_if "/usr/bin/mysql -u root -h 127.0.0.1 -P 3306 -p#{Shellwords.escape(root_pass_master)} -e 'select User,Host from mysql.user' | grep repl"
action :run
Expand Down

0 comments on commit 06799bb

Please sign in to comment.