diff options
-rw-r--r-- | ui/tests/api_json/testDiscoveryRule.php | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/ui/tests/api_json/testDiscoveryRule.php b/ui/tests/api_json/testDiscoveryRule.php index 76fe8414130..22d9b0be83c 100644 --- a/ui/tests/api_json/testDiscoveryRule.php +++ b/ui/tests/api_json/testDiscoveryRule.php @@ -5389,7 +5389,22 @@ class testDiscoveryRule extends CAPITest { foreach ($expected_overrides as &$override) { usort($override['filter']['conditions'], function ($a, $b) { return $a['formulaid'] <=> $b['formulaid']; - });; + }); + + foreach ($override['operations'] as &$operation) { + if (array_key_exists('optag', $operation)) { + usort($operation['optag'], function ($a, $b) { + return $a['tag'] <=> $b['tag']; + }); + } + + if (array_key_exists('optemplate', $operation)) { + usort($operation['optemplate'], function ($a, $b) { + return $a['templateid'] <=> $b['templateid']; + }); + } + } + unset($operation); } unset($override); @@ -5412,7 +5427,22 @@ class testDiscoveryRule extends CAPITest { foreach ($lld_rule['overrides'] as &$override) { usort($override['filter']['conditions'], function ($a, $b) { return $a['formulaid'] <=> $b['formulaid']; - });; + }); + + foreach ($override['operations'] as &$operation) { + if (array_key_exists('optag', $operation)) { + usort($operation['optag'], function ($a, $b) { + return $a['tag'] <=> $b['tag']; + }); + } + + if (array_key_exists('optemplate', $operation)) { + usort($operation['optemplate'], function ($a, $b) { + return $a['templateid'] <=> $b['templateid']; + }); + } + } + unset($operation); } unset($override); |