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

Add tests #60

Merged
merged 50 commits into from
May 18, 2022
Merged

Add tests #60

merged 50 commits into from
May 18, 2022

Conversation

mostafa
Copy link
Owner

@mostafa mostafa commented May 12, 2022

This PR addresses the following issue and includes unit tests, integration tests, and E2E tests. I tried my best to fix issues while writing these tests and, at some point, asked for help from @mstoykov, which he kindly offered, as always. 🙏

These tests prove that the extension needs serious refactoring to become stable, as mentioned in #44. Also, I'll add more tests over time, either when new features are added or when more edge cases are found. All in all, I hope these tests contribute to the overall stability and reliability of this extension.

While adding tests, I also fixed the test pipeline and introduced a few different tools and steps, in hope that it prevents future issues. 🤞

mostafa added 12 commits May 14, 2022 00:58
* Update deserializer function interface and add topic
* Revamp avro.go to address multiple issues (fetching schemas, manual serialization, etc.)
* Add more error codes and errors
* Separate various Schema Registry functions
* Simplify serialization functions
* Explicitly pass srClient to SR functions
* Export all functions
* Fix tests to reflect changes
* Add tests to serde_registry.go
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 18 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@mostafa mostafa marked this pull request as ready for review May 17, 2022 19:03
@mostafa mostafa merged commit 44de914 into main May 18, 2022
@mostafa mostafa deleted the add-tests branch May 18, 2022 09:09
mostafa added a commit that referenced this pull request May 31, 2022
* Add test for string.go
* Add test for bytearray.go
* Add test for errors.go
* Add test for auth.go
* Fix linter errors
* Fix tests after rebasing with the logging/error-reporting PR merge
* Remove the old ReportErrors function and test
* Run Go tests in the test pipeline
* Add more tests to auth_test.go after refactoring loggin and error-reporting
* Refactor functions a bit until proper configuration validation is implemented
* Fix assertions
* Remove schema from function signatures (unused parameter)
* Add tests for serde.go
* Add tests for avro.go
* Update deserializer function interface and add topic
* Revamp avro.go to address multiple issues (fetching schemas, manual serialization, etc.)
* Add more error codes and errors
* Separate various Schema Registry functions
* Simplify serialization functions
* Explicitly pass srClient to SR functions
* Export all functions
* Fix tests to reflect changes
* Fix linter error
* Add more tests to SerializeAvro
* Refactor serde and add serde registry
* Add tests to serde_registry.go
* Rename schema registry module
* Remove duplicate code by using a function to get a connection to Kafka
* Add tests to configuration.go
* Update jsonschema.go with the latest changes to schema registry
* Add tests to jsonschema.go
* Add more test to avro.go
* Add tests to jsonschema.go
* Add tests to schema_registry.go
* Create coverage report
* Fix linter errors
* Remove duplicate tests
* Refactor configuration_test.go
* Use constants
* Fix typo
* Ignore act
* Add tests to topic.go
* Run lensesio/fast-data-dev container for testing against Kafka
* Use title case
* Assert module instance and runtime
* WIP: Add tests to producer.go (has issues with default function)
* Rename kafkatest.go so it doesnt' get included in non test builds
* Make test being able to go to vu code mode and other fixes
* Create topic before producing messages
* Check output metrics of produce function plus some fixes
* Fix bugs and add some TODO comments
* Add more tests to producer.go
* Fix typos
* Separate nil context from cancelled context error
* Fix an edge case with setting offset together with groupID
* Fix tests
* Add tests to consumer.go (buggy)
* Add more tests to consumer.go and fix others
Co-authored-by: Mihail Stoykov <[email protected]>
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