MT#15269 increase stable tests, small fixes

* fix api-root
* fix api-balanceintervals
* fix warning in Test::Collection (typo)
* add new tests to stable: balanceintervals, customers, faxes, lnp, root
* add new test to fast: root

Change-Id: I058b586c6f2e166106194038de233126715121e8
changes/24/6824/3
Gerhard Jungwirth 9 years ago
parent b8b39b8aa6
commit cf845a9f71

@ -346,6 +346,7 @@ if (_get_allow_fake_client_time()) { # && $enable_profile_packages) {
]);
is(_get_subscriber_lock_level($subscriber),4,"check subscriber id " . $subscriber->{id} . " lock level");
_set_time(NGCP::Panel::Utils::DateTime::from_string('2015-01-23 14:00:00'));
_switch_package($customer,$package_2);
_set_time(NGCP::Panel::Utils::DateTime::from_string('2015-01-24 13:00:00'));

@ -107,6 +107,8 @@ $ua->credentials($netloc, "api_admin_http", $user, $pass);
resellers => 1,
rewriterules => 1,
rewriterulesets => 1,
rtcnetworks => 1,
rtcsessions => 1,
soundfilerecordings => 1,
soundfiles => 1,
soundhandles => 1,

@ -25,10 +25,10 @@ fi
if [ "${SELECT}" = "stable" ] ; then
echo "Test selection: ${SELECT}"
SELECT=$(echo t/api-rest/api-{all-links,billingfees,billingnetworks,billingprofiles,billingzones,calllists,calls,cert-auth,cfdestinationsets,contracts,customercontacts,ncoslevels,pbxdevicemodels,pbxdevices,peeringgroups,peeringrules,peeringservers,preferences,profilepackages,resellers,rewriterules,rewriterulesets,soundsets,subscriberregistrations,subscribers,systemcontacts,threads,topuplogs,trustedsources,valid-patch,vouchers}.t)
SELECT=$(echo t/api-rest/api-{all-links,balanceintervals,billingfees,billingnetworks,billingprofiles,billingzones,calllists,calls,cert-auth,cfdestinationsets,contracts,customercontacts,customers,faxes,lnp,ncoslevels,pbxdevicemodels,pbxdevices,peeringgroups,peeringrules,peeringservers,preferences,profilepackages,resellers,rewriterules,rewriterulesets,root,soundsets,subscriberregistrations,subscribers,systemcontacts,threads,topuplogs,trustedsources,valid-patch,vouchers}.t)
elif [ "${SELECT}" = "fast" ] ; then
echo "Test selection: ${SELECT}"
SELECT=$(echo t/api-rest/api-{billingnetworks,billingzones,calls,cert-auth,cfdestinationsets,ncoslevels,peeringgroups,peeringrules,peeringservers,resellers,rewriterules,soundsets,systemcontacts,valid-patch,vouchers}.t)
SELECT=$(echo t/api-rest/api-{billingnetworks,billingzones,calls,cert-auth,cfdestinationsets,ncoslevels,peeringgroups,peeringrules,peeringservers,resellers,rewriterules,root,soundsets,systemcontacts,valid-patch,vouchers}.t)
elif [ "${SELECT}" = "all" ] ; then
echo "Test selection: all"
SELECT=$(echo t/api-rest/*.t)

@ -320,7 +320,7 @@ sub get_item_hal{
$uri //= $self->get_uri_collection($name)."?page=1&rows=1";
my($res,$list_collection,$req) = $self->check_item_get($self->normalize_uri($uri));
($reshal,$location) = $self->get_hal_from_collection($list_collection,$name);
if($reshal->{total_count} || ('HASH' eq $reshal->{content} && $reshal->{content}->{total_count})){
if($reshal->{total_count} || ('HASH' eq ref $reshal->{content} && $reshal->{content}->{total_count})){
$resitem = { num => 1, content => $reshal, res => $res, req => $req, location => $location };
$self->DATA_LOADED->{$name} ||= [];
push @{$self->DATA_LOADED->{$name}}, $resitem;

Loading…
Cancel
Save