mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-17 08:57:24 +00:00
pt-mysql-summary 2.0
This commit is contained in:
@@ -5,15 +5,16 @@ TMPDIR=$TEST_TMPDIR
|
||||
|
||||
TEST_NAME="get_mysql_timezone"
|
||||
cp samples/mysql-variables-001.txt $TMPDIR/percona-toolkit-mysql-variables
|
||||
is $(get_mysql_timezone) "EDT"
|
||||
is $(get_mysql_timezone "$TMPDIR/percona-toolkit-mysql-variables") "EDT"
|
||||
|
||||
TEST_NAME="get_mysql_uptime"
|
||||
cat <<EOF > $TMPDIR/expected
|
||||
2010-05-27 11:38 (up 0+02:08:52)
|
||||
EOF
|
||||
cp samples/mysql-status-001.txt $TMPDIR/percona-toolkit-mysql-status
|
||||
echo "2010-05-27 11:38" > $TMPDIR/in
|
||||
get_mysql_uptime $TMPDIR/in > $TMPDIR/got
|
||||
local uptime="$(get_stat Uptime $TMPDIR/percona-toolkit-mysql-status)"
|
||||
local current_time="$(echo -e "2010-05-27 11:38\n")"
|
||||
get_mysql_uptime "${uptime}" "${current_time}" > $TMPDIR/got
|
||||
no_diff $TMPDIR/got $TMPDIR/expected
|
||||
|
||||
TEST_NAME="get_mysql_version"
|
||||
@@ -22,5 +23,5 @@ cat <<EOF > $TMPDIR/expected
|
||||
Built On | debian-linux-gnu i486
|
||||
EOF
|
||||
cp samples/mysql-variables-001.txt $TMPDIR/percona-toolkit-mysql-variables
|
||||
get_mysql_version > $TMPDIR/got
|
||||
get_mysql_version $TMPDIR/percona-toolkit-mysql-variables > $TMPDIR/got
|
||||
no_diff $TMPDIR/got $TMPDIR/expected
|
||||
|
Reference in New Issue
Block a user