-
Notifications
You must be signed in to change notification settings - Fork 577
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
Subtests for issue #1520 #1829
Subtests for issue #1520 #1829
Conversation
t/mojo/response.t
Outdated
# Defaults | ||
my $res = Mojo::Message::Response->new; | ||
is $res->max_message_size, 2147483648, 'right default'; | ||
# $dir is used in multiple subtests. |
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.
Inconsistent comment format.
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.
Removed since that $dir is going away.
How should that comment have been done?
}; | ||
|
||
subtest 'WebSocket with SOCKS proxy' => sub { | ||
my $ua = Mojo::UserAgent->new(ioloop => Mojo::IOLoop->singleton, insecure => 1); |
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.
This test doesn't appear to have a SOCKS proxy configured in the new user agent.
t/mojo/response.t
Outdated
my $res = Mojo::Message::Response->new; | ||
is $res->max_message_size, 2147483648, 'right default'; | ||
# $dir is used in multiple subtests. | ||
my $dir = tempdir; |
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.
It's only used in two places, that's not really worth sharing. The two tests can just have their own tempdir each.
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.
That's fine with me. I didn't want to potentially cause any changes in behavior by using two different temp dirs.
}; | ||
|
||
subtest 'Keep alive request with SOCKS proxy' => sub { | ||
my $ua = Mojo::UserAgent->new(ioloop => Mojo::IOLoop->singleton, insecure => 1); |
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.
This test doesn't appear to have a SOCKS proxy configured in the new user agent.
Please squash perltidy commits into the relevant "feature" commits. |
Do you want one commit for each of the test files? Or should all three go into one commit? |
One commit for everything would be fine too. The preferred version would be one commit per test file though. |
Then that's what I'll do. |
I've redone this PR as #1831 |
Summary
Convert three .t files to use subtest in response to issue #1520.