mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-20 10:55:01 +00:00
Merge pt-ms-pt-stalk-standard-mysql-options.
This commit is contained in:
30
t/lib/bash/mysql_options.sh
Normal file
30
t/lib/bash/mysql_options.sh
Normal file
@@ -0,0 +1,30 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
plan 3
|
||||
|
||||
TMPFILE="$TEST_PT_TMPDIR/parse-opts-output"
|
||||
TOOL="pt-mysql-summary"
|
||||
PT_TMPDIR="$TEST_PT_TMPDIR"
|
||||
|
||||
source "$LIB_DIR/log_warn_die.sh"
|
||||
source "$LIB_DIR/parse_options.sh"
|
||||
source "$LIB_DIR/mysql_options.sh"
|
||||
|
||||
cnf="/tmp/12345/my.sandbox.cnf"
|
||||
|
||||
parse_options "$PERCONA_TOOLKIT_BRANCH/bin/pt-mysql-summary" --defaults-file $cnf
|
||||
is "$OPT_DEFAULTS_FILE" "$cnf" "--defaults-file works"
|
||||
|
||||
# ############################################################################
|
||||
# Short forms work
|
||||
# ############################################################################
|
||||
|
||||
parse_options "$PERCONA_TOOLKIT_BRANCH/bin/pt-mysql-summary" -F $cnf
|
||||
is "$OPT_DEFAULTS_FILE" "$cnf" "-F works"
|
||||
|
||||
parse_options "$PERCONA_TOOLKIT_BRANCH/bin/pt-mysql-summary" -u msandbox
|
||||
is "$OPT_USER" "msandbox" "-u works"
|
||||
|
||||
# ############################################################################
|
||||
# Done
|
||||
# ############################################################################
|
1
t/lib/bash/mysql_options.t
Symbolic link
1
t/lib/bash/mysql_options.t
Symbolic link
@@ -0,0 +1 @@
|
||||
../../../util/test-bash-functions
|
Reference in New Issue
Block a user