Skip to content

Cluster describe cleanup#1397

Merged
Steven Gagniere (sgagniere) merged 2 commits intomainfrom
cluster-describe-cleanup
Aug 12, 2022
Merged

Cluster describe cleanup#1397
Steven Gagniere (sgagniere) merged 2 commits intomainfrom
cluster-describe-cleanup

Conversation

@sgagniere
Copy link
Member

Checklist

  1. [CRUCIAL] Is the change for CP or CCloud functionalities that are already live in prod?
    • yes: ok

What

Removed some redundant code in command_cluster_describe.go that I noticed while working on a ticket. Since the terminal output is controlled by the fields string slice input to output.DescribeObject, I collapsed two structs which differed by only 1 field into a combined struct and removed the function convertClusterToDescribeStructWithKAPI since its implementation was identical to convertClusterToDescribeStruct.

Also added 2 new integration tests to also check the json and yaml output of kafka cluster describe lkc-id --all.

References

N/A

Test & Review

Ran all tests.

Manually checked on a basic cluster that the output of kafka cluster describe lkc-id --all, kafka cluster describe lkc-id --all -o json and kafka cluster describe lkc-id --all -o yaml did not change.

@sgagniere Steven Gagniere (sgagniere) requested a review from a team as a code owner August 11, 2022 19:54
Copy link
Contributor

@DABH David Hyde (DABH) left a comment

Choose a reason for hiding this comment

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

Added test coverage = ❤️

Thanks for the cleanup! ✨

@sgagniere Steven Gagniere (sgagniere) deleted the cluster-describe-cleanup branch August 12, 2022 00:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants