Conversation
|
Pipeline controller notification For optional jobs, comment This repository is configured in: automatic mode |
|
Skipping CI for Draft Pull Request. |
WalkthroughThese changes add support for test-case-level properties in JUnit XML output. A new Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 12✅ Passed checks (12 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
/test e2e-aws-csi |
There was a problem hiding this comment.
🧹 Nitpick comments (2)
pkg/test/ginkgo/junit.go (1)
37-42: Please add a focused regression test for lifecycle property serialization.This changes JUnit output shape; add coverage for both cases: lifecycle set (property emitted) and lifecycle empty (property omitted).
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@pkg/test/ginkgo/junit.go` around lines 37 - 42, Add a focused regression test that verifies lifecycle property serialization: create two tests that exercise the code path which builds junit test cases (using the same construction as the code around extensionResult.Lifecycle and testCase.Properties); one test sets extensionResult.Lifecycle to a non-empty value and asserts that a junitapi.TestCaseProperty with Name "lifecycle" and Value equal to the lifecycle string is present in testCase.Properties, and the other leaves extensionResult.Lifecycle empty and asserts that no "lifecycle" property exists; use the same types/variables referenced in the diff (extensionResult.Lifecycle, testCase.Properties, junitapi.TestCaseProperty) and add these tests alongside the existing ginkgo junit tests.pkg/test/ginkgo/junitapi/types.go (1)
56-62: Consider a shared property type to reduce duplication.
TestSuitePropertyandTestCasePropertycurrently have identical structure and tags. A sharedPropertytype would keep this DRY and simplify future changes.Also applies to: 86-88
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@pkg/test/ginkgo/junitapi/types.go` around lines 56 - 62, TestCaseProperty and TestSuiteProperty share identical fields/tags; replace both with a single shared struct (e.g., Property) that has XMLName xml.Name `xml:"property"`, Name string `xml:"name,attr"`, and Value string `xml:"value,attr"`, then update usages: rename TestCaseProperty and TestSuiteProperty types to Property (or alias them) and update any code referencing TestCaseProperty or TestSuiteProperty to use Property so future changes are centralized.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@pkg/test/ginkgo/junit.go`:
- Around line 37-42: Add a focused regression test that verifies lifecycle
property serialization: create two tests that exercise the code path which
builds junit test cases (using the same construction as the code around
extensionResult.Lifecycle and testCase.Properties); one test sets
extensionResult.Lifecycle to a non-empty value and asserts that a
junitapi.TestCaseProperty with Name "lifecycle" and Value equal to the lifecycle
string is present in testCase.Properties, and the other leaves
extensionResult.Lifecycle empty and asserts that no "lifecycle" property exists;
use the same types/variables referenced in the diff (extensionResult.Lifecycle,
testCase.Properties, junitapi.TestCaseProperty) and add these tests alongside
the existing ginkgo junit tests.
In `@pkg/test/ginkgo/junitapi/types.go`:
- Around line 56-62: TestCaseProperty and TestSuiteProperty share identical
fields/tags; replace both with a single shared struct (e.g., Property) that has
XMLName xml.Name `xml:"property"`, Name string `xml:"name,attr"`, and Value
string `xml:"value,attr"`, then update usages: rename TestCaseProperty and
TestSuiteProperty types to Property (or alias them) and update any code
referencing TestCaseProperty or TestSuiteProperty to use Property so future
changes are centralized.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Central YAML (inherited)
Review profile: CHILL
Plan: Pro Plus
Run ID: ee219c03-5a16-4bc8-a786-2782f96d3306
📒 Files selected for processing (2)
pkg/test/ginkgo/junit.gopkg/test/ginkgo/junitapi/types.go
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: coderabbitai[bot], sosiouxme The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/test e2e-aws-ovn-fips |
|
@sosiouxme: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Summary by CodeRabbit