MT#17607 tests: use default billing profile for providers by default

+set RATEOMAT_SPLIT_PEAK_PARTS = 1 for rateomat-split-cdr.t

Change-Id: I6252d71cf437ab95e5bed9e82919456087881628
changes/34/4334/3
Rene Krenn 10 years ago
parent 9ef94e4223
commit 0c0ada2386

@ -713,7 +713,7 @@ sub add_interval {
} elsif($unit eq "hour") {
$to_time = mktime($from_second,$from_minute,$from_hour + $count,$from_day,$from_month,$from_year);
} elsif($unit eq "day") {
$to_time = mktime($from_second,$from_minute,$from_hour,$from_day + $count,$from_month,$from_year);
$to_time = mktime($from_second,$from_minute,$from_hour,$from_day + $count,$from_month,$from_year);
} elsif($unit eq "week") {
$to_time = mktime($from_second,$from_minute,$from_hour,$from_day + 7*$count,$from_month,$from_year);
} elsif($unit eq "month") {

@ -692,15 +692,17 @@ sub setup_provider {
);
$provider->{profile} = $profile_fee->{profile};
$provider->{provider_fee} = $profile_fee;
$provider->{contract} = update_item($provider->{contract},
billing_profile_id => $provider->{profile}->{id},
);
} else {
ok(!$split_peak_parts,'provider rate required for split cdrs');
$provider->{profile} = create_billing_profile(
reseller_id => $provider->{reseller}->{id},
);
#use default billing profile id, which already comes with fees.
#$provider->{profile} = create_billing_profile(
# reseller_id => $provider->{reseller}->{id},
#);
}
$provider->{contract} = update_item($provider->{contract},
billing_profile_id => $provider->{profile}->{id},
);
$provider->{domain} = create_domain(
reseller_id => $provider->{reseller}->{id},
domain => $domain_name.'.<t>',

@ -5,7 +5,7 @@ use Utils::Api qw();
use Utils::Rateomat qw();
use Test::More;
#THIS TEST CASE REQUIRES RATEOMAT_SPLIT_PEAK_PARTS=1 !
$ENV{RATEOMAT_SPLIT_PEAK_PARTS} = 1;
#use Text::Table;
#use Text::Wrap;

Loading…
Cancel
Save