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

test: Add event tests #965

Merged
merged 4 commits into from
Dec 14, 2022
Merged

test: Add event tests #965

merged 4 commits into from
Dec 14, 2022

Conversation

AndrewSisley
Copy link
Contributor

Relevant issue(s)

Resolves #865

Description

Adds integration tests for the public-external Events channel.

@AndrewSisley AndrewSisley added area/testing Related to any test or testing suite action/no-benchmark Skips the action that runs the benchmark. labels Dec 13, 2022
@AndrewSisley AndrewSisley added this to the DefraDB v0.4 milestone Dec 13, 2022
@AndrewSisley AndrewSisley requested a review from a team December 13, 2022 21:44
@AndrewSisley AndrewSisley self-assigned this Dec 13, 2022
)

// This test documents undesirable behaviour which should be corrected in
// https://github.com/sourcenetwork/defradb/issues/867
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The linked ticket has been commented on with a reference to this test

@AndrewSisley AndrewSisley force-pushed the sisley/test/I865-event-tests branch 3 times, most recently from bb1e82b to ad92fcd Compare December 13, 2022 23:04
Copy link
Collaborator

@fredcarle fredcarle left a comment

Choose a reason for hiding this comment

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

Looks good Andy. Only a few things I want to go over before approving.

tests/integration/events/simple/with_create_test.go Outdated Show resolved Hide resolved
tests/integration/events/utils.go Outdated Show resolved Hide resolved
tests/integration/events/utils.go Outdated Show resolved Hide resolved
Comment on lines +180 to +184
func assertIfExpected[T any](t *testing.T, expected immutable.Option[T], actual T) {
if expected.HasValue() {
assert.Equal(t, expected.Value(), actual)
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

praise: I like what the Option type brings to this kind of assertion.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

nice I'm glad, and thanks :)

Copy link
Collaborator

@fredcarle fredcarle left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for the changes :)

@AndrewSisley
Copy link
Contributor Author

LGTM! Thanks for the changes :)

😁 Thanks for requsting them

@AndrewSisley AndrewSisley merged commit 7b6ee3b into develop Dec 14, 2022
@AndrewSisley AndrewSisley deleted the sisley/test/I865-event-tests branch December 14, 2022 23:51
shahzadlone pushed a commit to shahzadlone/defradb that referenced this pull request Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action/no-benchmark Skips the action that runs the benchmark. area/testing Related to any test or testing suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Events: Expand integration tests to explicitly cover events
2 participants