-
Notifications
You must be signed in to change notification settings - Fork 97
Add an integration testing pattern and a few team integration tests #105
Conversation
Signed-off-by: Mike Ball <mikedball@gmail.com>
Signed-off-by: Mike Ball <mikedball@gmail.com>
Signed-off-by: Mike Ball <mikedball@gmail.com>
Signed-off-by: Mike Ball <mikedball@gmail.com>
Signed-off-by: Mike Ball <mikedball@gmail.com>
Signed-off-by: Mike Ball <mikedball@gmail.com>
Signed-off-by: Mike Ball <mikedball@gmail.com>
Signed-off-by: Mike Ball <mikedball@gmail.com>
grafana: | ||
image: grafana/grafana:${GRAFANA_VERSION} | ||
networks: | ||
- grafana-api-golang-client-test |
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 is very similar to terraform-provider-grafana
's docker-compose.yml
.
if err != nil { | ||
t.Fatalf("failed to delete team: %v", err) | ||
} | ||
} |
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.
There may be more elegant ways to organize these tests, but I chose to err on the side of simplicity, at least for now.
Signed-off-by: Mike Ball <mikedball@gmail.com>
👋 I am closing this PR because this repository is now deprecated and will be archived. It will still be accessible in read-only mode. We are now generating the Grafana client from its OpenAPI spec. Check out https://github.com/grafana/grafana-openapi-client-go for the new client. Consider opening an issue or a PR there if functionality is missing. |
Summary:
grafana-api-golang-client
can be integration tested using a local, Dockerized Grafana instanceFurther context:
Without a suite of easy-to-run integration tests,
grafana-api-golang-client
functionality and bugs were a bit difficult to prove and discuss. In particular, this PR seeks to offer a simple testing technique to assist PR 102 discussion.Potential further follow-on improvements: