From 6bd37d8e081d0d95210ae51ef4a0d2c3d7ff6233 Mon Sep 17 00:00:00 2001 From: Rene Krenn Date: Tue, 29 Mar 2022 18:22:50 +0200 Subject: [PATCH] TT#168050 fix allowed_cli check for duplicates - fix tests Change-Id: Ie70dbf45a9ad77ee2419bde10cf4b984dd1b63dc (cherry picked from commit 7c9aa484ff800375824ea2ad51920a706f0cc899) --- t/api-rest/api-preferences.t | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/api-rest/api-preferences.t b/t/api-rest/api-preferences.t index a7af62686f..e9ac19e3e4 100644 --- a/t/api-rest/api-preferences.t +++ b/t/api-rest/api-preferences.t @@ -165,12 +165,12 @@ foreach my $api (@apis){ is_deeply([@{$preferences_new->{content}->{allowed_clis}}[-5..-1]], $addmulti_value, "check patched allowed_clis: add multi to existing"); $preferences_patch_op = [ - {'op' => 'remove', 'path' => '/allowed_clis', value => '222', 'index' => 1 }, + {'op' => 'remove', 'path' => '/allowed_clis', value => '888', 'index' => 1 }, ]; ($res, $preferences_put->{content}) = $test_machine->request_patch($preferences_patch_op,$preferences->{uri}); $test_machine->http_code_msg(200, "check extended patch result: remove by value", $res, $preferences_put->{content}); (undef, $preferences_new->{content}) = $test_machine->check_item_get($preferences->{uri}); - is_deeply([@{$preferences_new->{content}->{allowed_clis}}[-8..-1]], ['111','222','333','444','555','666','777','888'], "check patched allowed_clis: remove by value."); + is_deeply([@{$preferences_new->{content}->{allowed_clis}}[-5..-2]], ['444','555','666','777'], "check patched allowed_clis: remove by value."); }