openshift / kube-compare

A Kubectl plugin to allow to compare a known valid reference configuration and a set of specific cluster configuration CRs.
Apache License 2.0
8 stars 8 forks source link

Add report-creator CLI tool #14

Closed AlinaSecret closed 1 month ago

AlinaSecret commented 1 month ago

Introduce report-creator, a CLI tool that allows generating a JUnit test report from the JSON output of the 'kubectl cluster-compare' plugin.

The tool categorizes the cluster comparison results into 3 test suites:

  1. Diff Test Suite: Each test in this suite represents a matched CR compared to a reference CR.

  2. Missing CRs Test Suite: Tests in this suite represent CRs absent in the cluster but present in the reference.

  3. Unmatched CRs Test Suite: This suite includes all CRs in the cluster not matched to any reference.

Additionally, tests of the new tool are added to ensure the the report creation is as expected. These tests use the same references used for the compare command tests to validate the alignment of the reporter with the compare command's reference and output format.

AlinaSecret commented 1 month ago

/hold

depends on #12

pixelsoccupied commented 1 month ago

/lgtm

AlinaSecret commented 1 month ago

/unhold

pixelsoccupied commented 1 month ago

/lgtm /approve

openshift-ci[bot] commented 1 month ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: pixelsoccupied

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/openshift/kube-compare/blob/main/OWNERS)~~ [pixelsoccupied] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
openshift-ci[bot] commented 1 month ago

@AlinaSecret: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).