Test and implement more run_agent(). Fix as_json() for lists of resources. Add alias attrib to Service for its friendly name; make name its code-friendly name. Fix ts in log messages.

This commit is contained in:
Daniel Nichter
2012-12-26 17:44:19 -07:00
parent 66fb54e793
commit 0495f9aa8a
7 changed files with 318 additions and 47 deletions

View File

@@ -14,6 +14,7 @@ use Test::More;
use PerconaTest;
use Percona::Toolkit;
use Percona::WebAPI::Resource::Agent;
use Percona::WebAPI::Resource::Config;
use Percona::WebAPI::Representation;
my $agent = Percona::WebAPI::Resource::Agent->new(
@@ -30,6 +31,18 @@ is(
"as_json"
);
my $config = Percona::WebAPI::Resource::Config->new(
options => {
'check-interval' => 60,
},
);
is(
Percona::WebAPI::Representation::as_config($config),
"check-interval=60\n",
"as_config"
);
# #############################################################################
# Done.
# #############################################################################