-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
tests for creating HTTPS, IMAP and custom port monitors #22
base: master
Are you sure you want to change the base?
Conversation
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.
Nice PR, thank you! A few minor comments below.
This is a very good improvement to the project.
got, err := client.CreateMonitor(create) | ||
if err != nil { | ||
t.Error(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.
Just a house style tip; I don't use blank lines within functions in this project.
|
||
for _, tc := range tcs { | ||
t.Run(tc.name, func(t *testing.T) { | ||
t.Parallel() |
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.
Watch out, there's a subtle bug here: https://gist.github.com/posener/92a55c4cd441fc5e5e85f27bca008721
In fact, we just end up running the Custom port
test four times, and none of the others.
for _, tc := range tcs { | ||
t.Run(tc.name, func(t *testing.T) { | ||
t.Parallel() | ||
client := New("dummy") |
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 probably move the client setup outside the t.Run()
function, shouldn't we?
Plan to look into addressing feedback during the next week. |
@mkrivoshein how are you getting on? Need any help? |
Fixes #21