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

Export the Binder type in slacktest #1177

Merged
merged 1 commit into from Mar 28, 2023
Merged

Export the Binder type in slacktest #1177

merged 1 commit into from Mar 28, 2023

Conversation

kpaulisse
Copy link
Contributor

@kpaulisse kpaulisse commented Feb 27, 2023

Fixes #1176

The binder type is defined as such in slacktest/server.go:

type binder func(Customize)

This PR changes slacktest.binder to slacktest.Binder. The reason for doing this is to be able to define a slice of custom functions to pass to the constructor. This makes things much easier for table-driven tests. Without this change, each entry in the table has to build its own *slacktest.Server which is less than convenient.

As far as I can tell these are the only places in the code where binder is used explicitly. There are only a few tests in this entire project that actually do these customizations (three tests in websocket_managed_conn_test.go). I've explicitly tested that this change has no effect on those tests.

Copy link
Member

@kanata2 kanata2 left a comment

Choose a reason for hiding this comment

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

👍

@kanata2 kanata2 merged commit c8507df into slack-go:master Mar 28, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expose the "Binder" type in slacktest
2 participants