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

Kafka integration test in CI. #97

Open
YooSunYoung opened this issue Sep 26, 2023 · 1 comment
Open

Kafka integration test in CI. #97

YooSunYoung opened this issue Sep 26, 2023 · 1 comment
Labels
github_actions Pull requests that update GitHub Actions code

Comments

@YooSunYoung
Copy link
Member

For now, kafka related test is excluded by a flag kafka-test among pytest test cases.

Those tests should be automated later once there are more complicated kafka integration test cases.

There are a few ideas about how to run kafka integration test

Mock Kafka clients

Unit tests with Mocked kafka objects.
Most of interfaces could be unit-tested with mocked object.
See mocked kafka broker example

Local kafka instance in the CI environment

Similarly what we are doing on the local machine, we can set up a kafka broker in the same machine/virtual environment and use it.
It may require a lot of work to maintain the kafka container/deployment to be consistent with the service version otherwise it may not be sufficient to test with the local kafka broker instance.

Tester credential

We can set up a dummy user in the cluster with a limited access to topics/read-write permissions and use it for testings.
It might be as easy as setting a secret in the github repository but it may also not be possible for security issue...

@MridulS
Copy link
Member

MridulS commented May 1, 2024

Just dropping this here for future use: https://www.confluent.io/blog/apache-kafka-ci-cd-with-github/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
github_actions Pull requests that update GitHub Actions code
Projects
None yet
Development

No branches or pull requests

2 participants