Fix write_services.t samples. Make send_data.t deterministic.

This commit is contained in:
Daniel Nichter
2013-01-31 17:14:32 -07:00
parent 3f4a02e1fb
commit 5e362d9e4b
5 changed files with 20 additions and 8 deletions

View File

@@ -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,