-
Notifications
You must be signed in to change notification settings - Fork 0
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
Test Loki client integration. #4
Conversation
from requests import Response | ||
|
||
|
||
# TODO: contribute to testcontainers modules |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once this lands I'd like to contribute it upstream to https://github.com/testcontainers/testcontainers-python/tree/main/modules
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to testcontainers/testcontainers-python#733 they might not accept it because it's too simple 🤷
efcbfcc
to
fab62e6
Compare
"""This method starts the Loki container and runs the readniness check | ||
to verify that the container is ready to use.""" | ||
super().start() | ||
self._readiness_check() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to this it has a 120s timeout, should we do less?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Loki does take a while to become ready.
return loki.get_client() | ||
|
||
|
||
def test_push(client: LokiClient): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😮💨
This change formats the test code and introduces a Loki testcontainer that's used in a simple Loki client push integration test.
Closes https://github.com/grafana/grafana-csp-app/issues/225