~percona-toolkit-dev/percona-toolkit/pxc-autodiscover-nodes

« back to all changes in this revision

Viewing changes to t/lib/bash/mysql_options.sh

Merge pt-ms-pt-stalk-standard-mysql-options.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/env bash
 
2
 
 
3
plan 3
 
4
 
 
5
TMPFILE="$TEST_PT_TMPDIR/parse-opts-output"
 
6
TOOL="pt-mysql-summary"
 
7
PT_TMPDIR="$TEST_PT_TMPDIR"
 
8
 
 
9
source "$LIB_DIR/log_warn_die.sh"
 
10
source "$LIB_DIR/parse_options.sh"
 
11
source "$LIB_DIR/mysql_options.sh"
 
12
 
 
13
cnf="/tmp/12345/my.sandbox.cnf"
 
14
 
 
15
parse_options "$PERCONA_TOOLKIT_BRANCH/bin/pt-mysql-summary" --defaults-file $cnf
 
16
is "$OPT_DEFAULTS_FILE" "$cnf" "--defaults-file works"
 
17
 
 
18
# ############################################################################
 
19
# Short forms work
 
20
# ############################################################################
 
21
 
 
22
parse_options "$PERCONA_TOOLKIT_BRANCH/bin/pt-mysql-summary" -F $cnf
 
23
is "$OPT_DEFAULTS_FILE" "$cnf" "-F works"
 
24
 
 
25
parse_options "$PERCONA_TOOLKIT_BRANCH/bin/pt-mysql-summary" -u msandbox
 
26
is "$OPT_USER" "msandbox" "-u works"
 
27
 
 
28
# ############################################################################
 
29
# Done
 
30
# ############################################################################