TT#50907 Make subscriber profiles tests more stable

Change-Id: I1905565ae91f8deed1647dd51d22d28f3997bcc3
(cherry picked from commit 32e646eff9)
changes/62/27762/3
Irina Peshinskaya 6 years ago
parent 620a6d766c
commit b914796692

@ -357,6 +357,10 @@ if($remote_config->{config}->{features}->{cloudpbx}){
my $data = clone $test_machine->DATA_ITEM;
$data->{administrative} = 1;
$pilot = $test_machine->get_item_hal('subscribers','/api/subscribers/?customer_id='.$data->{customer_id}.'&'.'is_pbx_pilot=1');
if(!$pilot->{total_count} || $pilot->{total_count} <= 0){
undef $pilot;
}
my $pbxsubscriberadmin = $test_machine->check_create_correct(1, sub {
my $num = $_[1]->{i};
$_[0]->{administrative} = 1;
@ -415,10 +419,12 @@ if($remote_config->{config}->{features}->{cloudpbx}){
($res,$content,$req) = $test_machine->request_patch( [ { op => 'replace', path => '/profile_set_id', value => $wrong_profile_sets->[0]->{content}->{id} } ], $subscriber->{location} );
$test_machine->http_code_msg(422, "Check incorrect profile_set_id patch for administrator", $res, $content);
($res,$content,$req) = $test_machine->request_patch( [ { op => 'replace', path => '/profile_id', value => undef }, { op => 'replace', path => '/profile_set_id', value => undef } ], $subscriber->{location} );
$test_machine->http_code_msg(200, "Check unset profile_id and profile_set_id patch for administrator", $res, $content);
($res,$content,$req) = $test_machine->request_patch( [ { op => 'replace', path => '/profile_id', value => $wrong_profiles->[0]->{content}->{id} } ], $subscriber->{location} );
$test_machine->http_code_msg(422, "Check incorrect profile_id patch for administrator", $res, $content);
($res,$content,$req) = $test_machine->request_patch( [ { op => 'replace', path => '/profile_set_id', value => $wrong_profile_sets->[0]->{content}->{id} } ], $subscriber->{location} );
$test_machine->http_code_msg(422, "Check profile_set_id patch for administrator", $res, $content);

Loading…
Cancel
Save