~percona-toolkit-dev/percona-toolkit/fix-1156867-pt-stalk-show-function-name

« back to all changes in this revision

Viewing changes to t/pt-query-digest/option_sanity.t

  • Committer: Daniel Nichter
  • Date: 2013-03-09 17:24:56 UTC
  • mfrom: (530.3.18 clean-up-pqd-2.2)
  • Revision ID: daniel@percona.com-20130309172456-h0xhi9as8y1hsc0t
Merge clean-up-pqd-2.2.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
my $output;
20
20
 
21
21
# #############################################################################
22
 
# Test cmd line op sanity.
23
 
# #############################################################################
24
 
for my $opt (qw(review-table history-table)) {
25
 
   $output = `$cmd --review h=127.1,P=12345,u=msandbox,p=msandbox --$opt test`;
26
 
   like($output, qr/--$opt should be passed a/, "Dies if no database part in --$opt");
27
 
}
28
 
 
29
 
$output = `$cmd --review h=127.1,P=12345,u=msandbox,p=msandbox,D=test,t=test`;
30
 
like($output, qr/--review does not accept a t option/, 'Dies if t part in --review DSN');
31
 
 
32
 
like(
33
 
   $help,
34
 
   qr/review-table\s+\Qpercona_schema.query_review\E/,
35
 
   "--review-table has a sane default"
36
 
);
37
 
 
38
 
like(
39
 
   $help,
40
 
   qr/history-table\s+\Qpercona_schema.query_history\E/,
41
 
   "--history-table has a sane default"
42
 
);
43
 
 
44
 
# #############################################################################
45
22
# https://bugs.launchpad.net/percona-toolkit/+bug/885382
46
23
# pt-query-digest --embedded-attributes doesn't check cardinality
47
24
# #############################################################################
81
58
# We removed --statistics, but they should still print out if we use PTDEBUG.
82
59
 
83
60
$output = qx{PTDEBUG=1 $cmd --no-report ${sample}slow002.txt 2>&1};
84
 
my $stats = slurp_file("t/pt-query-digest/samples/stats-slow002.txt");
 
61
my $stats = load_file("t/pt-query-digest/samples/stats-slow002.txt");
85
62
 
86
63
like(
87
64
   $output,