-
Notifications
You must be signed in to change notification settings - Fork 35
Improve client test coverage #1024
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
base: main
Are you sure you want to change the base?
Conversation
peers/proposervm_client_test.go
Outdated
| // TestProposerVMAPI_CombinedQueryParamsAndHeaders verifies both work together | ||
| func TestProposerVMAPI_CombinedQueryParamsAndHeaders(t *testing.T) { |
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.
Is there a way that headers and query params interact that we need to test them together?
geoff-vball
left a comment
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.
Just a few nits. They should also be applied to the other test in the file. Otherwise lgtm :)
| logger := logging.NoLog{} | ||
| _, err := NewDestinationClient(logger, &destinationBlockchain, time.Minute) |
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.
We should just inline short declarations that are only used once.
| logger := logging.NoLog{} | |
| _, err := NewDestinationClient(logger, &destinationBlockchain, time.Minute) | |
| _, err := NewDestinationClient(logging.NoLog{}, &destinationBlockchain, time.Minute) |
| client, err := NewDestinationClient(logger, &destinationBlockchain, time.Minute) | ||
| require.NoError(t, err) | ||
|
|
||
| ctx := context.Background() |
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.
| ctx := context.Background() | |
| ctx := t.Context() |
| mu.Lock() | ||
| defer mu.Unlock() |
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.
I think this mutex is just ensuring that the handler func has finished running? But ethClient.SuggestGasTipCap(ctx) won't finish until the handlerfunc is finished, so I don't think we need it.
Why this should be merged
How this works
How this was tested
How is this documented