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 integration test workflow #154

Merged
merged 2 commits into from
Apr 15, 2024
Merged

Add integration test workflow #154

merged 2 commits into from
Apr 15, 2024

Conversation

adamyeats
Copy link
Collaborator

@adamyeats adamyeats commented Mar 19, 2024

This PR adds integration tests for the datasource. Part of https://github.com/grafana/oss-plugin-partnerships/issues/845.

@adamyeats adamyeats added datasource/SurrealDB github-actions Pull requests that update GitHub Actions code labels Mar 19, 2024
@adamyeats adamyeats self-assigned this Mar 19, 2024
@adamyeats adamyeats force-pushed the integration-tests branch 4 times, most recently from a4405c5 to a30d963 Compare March 20, 2024 15:28
@adamyeats adamyeats force-pushed the integration-tests branch 2 times, most recently from 3d210b2 to f0624e9 Compare March 22, 2024 17:28
@adamyeats adamyeats marked this pull request as ready for review March 22, 2024 17:40
@adamyeats adamyeats requested review from a team, asimpson, bossinc, aangelisc and alyssabull and removed request for a team March 22, 2024 17:40
Copy link
Contributor

@aangelisc aangelisc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work on this! I like this implementation of integration testing a lot (wherever we can do this in a pipeline).

instance, err := createTestInstance()

if err != nil {
t.Errorf("unexpected error: %s", err)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only nit from me is to not use conditions to cause the tests to error but instead use the assert and require testing functions. Wdyt?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those require testify though right?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, feel free to ignore the suggestion I just think it'll improve the readability 😊

@adamyeats adamyeats merged commit b00dc71 into main Apr 15, 2024
5 checks passed
@adamyeats adamyeats deleted the integration-tests branch April 15, 2024 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
datasource/SurrealDB github-actions Pull requests that update GitHub Actions code
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants