mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-29 09:32:47 +00:00
Fix write_services.t samples. Make send_data.t deterministic.
This commit is contained in:
@@ -1,4 +1,8 @@
|
||||
{"id":"123","hostname":"prod1"}
|
||||
{
|
||||
"hostname" : "prod1",
|
||||
"id" : "123"
|
||||
}
|
||||
|
||||
--Ym91bmRhcnk=
|
||||
[
|
||||
{
|
||||
|
@@ -7,9 +7,9 @@
|
||||
"runs" : [
|
||||
{
|
||||
"number" : "0",
|
||||
"options" : "--report-format profile /Users/daniel/p/pt-agent/t/lib/samples/slowlogs/slow008.txt",
|
||||
"options" : "--report-format profile slow008.txt",
|
||||
"output" : "spool",
|
||||
"program" : "/Users/daniel/p/pt-agent/bin/pt-query-digest"
|
||||
"program" : "pt-query-digest"
|
||||
}
|
||||
],
|
||||
"spool_schedule" : "2 * * * *"
|
||||
|
@@ -29,7 +29,7 @@ my $sample = "t/pt-agent/samples";
|
||||
# These aren't the real tests yet: to run_agent(), first we need
|
||||
# a client and Agent, so create mock ones.
|
||||
|
||||
my $json = JSON->new;
|
||||
my $json = JSON->new->canonical([1])->pretty;
|
||||
$json->allow_blessed([]);
|
||||
$json->convert_blessed([]);
|
||||
|
||||
@@ -78,7 +78,7 @@ is_deeply(
|
||||
) or die;
|
||||
|
||||
# #############################################################################
|
||||
# Test send_data()
|
||||
# Test send_data
|
||||
# #############################################################################
|
||||
|
||||
my $tmpdir = tempdir("/tmp/pt-agent.$PID.XXXXXX", CLEANUP => 1);
|
||||
@@ -104,6 +104,7 @@ my $output = output(
|
||||
service => 'query-monitor',
|
||||
lib_dir => $tmpdir,
|
||||
spool_dir => $tmpdir,
|
||||
json => $json, # optional, for testing
|
||||
),
|
||||
},
|
||||
stderr => 1,
|
||||
|
@@ -65,8 +65,8 @@ sub test_write_services {
|
||||
|
||||
my $run0 = Percona::WebAPI::Resource::Run->new(
|
||||
number => '0',
|
||||
program => "$trunk/bin/pt-query-digest",
|
||||
options => "--report-format profile $trunk/t/lib/samples/slowlogs/slow008.txt",
|
||||
program => "pt-query-digest",
|
||||
options => "--report-format profile slow008.txt",
|
||||
output => 'spool',
|
||||
);
|
||||
|
||||
|
Reference in New Issue
Block a user