Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor custom checks with DescribeTopicPartitionsResponseAssertion #27

Merged
merged 23 commits into from
Oct 2, 2024

Conversation

ryan-gang
Copy link
Contributor

@ryan-gang ryan-gang commented Oct 1, 2024

This pull request introduces a new assertion type and refactors existing tests to use this new assertion for Kafka topic partition responses. The most important changes include the addition of the DescribeTopicPartitionsResponseAssertion type, updates to existing test functions to use this new assertion, and the addition of a new test function.

New Assertion Type:

Refactoring Existing Tests:

  • internal/stagep2.go: Updated the testDTPartitionWithUnknownTopic function to use DescribeTopicPartitionsResponseAssertion for response validation. [1] [2] [3]
  • internal/stagep3.go: Updated the testDTPartitionWithTopicAndSinglePartition function to use DescribeTopicPartitionsResponseAssertion for response validation. [1] [2] [3]

New Test Function:

  • internal/stagep4.go: Added a new test function testDTPartitionWithTopicAndMultiplePartitions2 to validate responses for topics with multiple partitions using the new assertion type.

Minor Refactor:

  • internal/stagep5.go: Renamed the test function to testDTPartitionWithTopics and removed redundant error handling for GenerateLogDirs. [1] [2]

@ryan-gang ryan-gang self-assigned this Oct 1, 2024
@ryan-gang ryan-gang changed the title Refactor DescribeTopicPartition to DescribeTopicPartitions Refactor custom checks with DescribeTopicPartitionAssertion Oct 1, 2024
@ryan-gang ryan-gang changed the title Refactor custom checks with DescribeTopicPartitionAssertion Refactor custom checks with DescribeTopicPartitionsResponseAssertion Oct 1, 2024
@ryan-gang ryan-gang merged commit 96c574c into main Oct 2, 2024
2 checks passed
@ryan-gang ryan-gang deleted the dtp-assertion branch October 2, 2024 08:35
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.

1 participant