Skip to content

Commit

Permalink
Ignore debug_log in delete_products even if it's empty
Browse files Browse the repository at this point in the history
  • Loading branch information
Luc45 committed Jan 8, 2025
1 parent fbf32fb commit 896e3a5
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
8 changes: 4 additions & 4 deletions _tests/managed_tests/tests/QITE2ETestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -217,10 +217,6 @@ public function validate_and_normalize( string $file_path, ?callable $callback =
],
'debug_log' => [
'normalize' => function ( $value ) use ( $file_path ) {
if ( ! is_array( $value ) ) {
return $value;
}

if ( stripos( $file_path, 'woo-e2e/delete_products' ) !== false || stripos( $file_path, 'woo-api/delete_products' ) !== false ) {
return [
[
Expand All @@ -230,6 +226,10 @@ public function validate_and_normalize( string $file_path, ?callable $callback =
];
}

if ( ! is_array( $value ) ) {
return $value;
}

$normalize_custom_tests_debug_log = function ( $debug_log ) {
$normalized = [];
foreach ( $debug_log as $fatal_or_not => $logs ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,12 @@
"test_results_manager_url": "https:\\/\\/test-results-manager.com",
"test_results_manager_expiration": 1234567890,
"test_summary": "Delete_Products Normalized Summary",
"debug_log": "",
"debug_log": [
{
"count": "0",
"message": "Debug log is ignored for woo-e2e\\/delete_products tests."
}
],
"version": "Undefined",
"update_complete": true,
"ai_suggestion_status": "none",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,12 @@
"test_results_manager_url": "https:\\/\\/test-results-manager.com",
"test_results_manager_expiration": 1234567890,
"test_summary": "Delete_Products Normalized Summary",
"debug_log": "",
"debug_log": [
{
"count": "0",
"message": "Debug log is ignored for woo-e2e\\/delete_products tests."
}
],
"version": "Undefined",
"update_complete": true,
"ai_suggestion_status": "none",
Expand Down

0 comments on commit 896e3a5

Please sign in to comment.