Skip to content

refactor(testutil): add CompareStructuredNode helper for revision tests - #1185

Merged
kyasbal merged 2 commits into
GoogleCloudPlatform:mainfrom
K53:push-tonlkpyrozuy
Oct 27, 2026
Merged

kyasbal merged 2 commits into
GoogleCloudPlatform:mainfrom
K53:push-tonlkpyrozuy

Conversation

@K53

@K53 K53 commented Oct 27, 2026

Copy link
Copy Markdown
Collaborator

Addressed the refactoring mentioned in the PR#1181 review comment.

The nodeComparer functions throughout the codebase have been unified into the CompareStructuredNode in the test utility.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request centralizes the comparison of structured.Node instances across various test files by removing local nodeComparer implementations and replacing them with a new, shared helper function CompareStructuredNode() in pkg/testutil/util.go, which is verified by new unit tests in pkg/testutil/util_test.go. Feedback is provided regarding a compilation error in pkg/task/inspection/googlecloud/k8scontainer/impl/mapper_test.go where the "github.com/google/go-cmp/cmp" import was removed but the cmp package is still used elsewhere in the file.

Comment thread pkg/testutil/util.go Resolved
@K53
K53 requested a review from kyasbal October 27, 2026 03:02
@kyasbal
kyasbal added this pull request to the merge queue Oct 27, 2026
Merged via the queue into GoogleCloudPlatform:main with commit e595bc5 Oct 27, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants