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

Convert t/mojo/daemon.t to use subtests #1557

Merged
merged 1 commit into from Sep 4, 2020

Conversation

toshisugimo
Copy link
Contributor

Summary

  • Convert t/mojo/daemon.t to use subtests

Motivation

  • Another file converted.

References

#1520

@toshisugimo toshisugimo force-pushed the use-subtest branch 2 times, most recently from d20aa2f to 56a93d9 Compare August 28, 2020 15:44
t/mojo/daemon.t Outdated
};

subtest 'Timeouts' => sub {
{
Copy link
Member

Choose a reason for hiding this comment

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

Why the block?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was unnecessary.

t/mojo/daemon.t Outdated
is_deeply(Mojo::Server::Daemon->new->listen, ['http://*:80', 'https://*:443'], 'right value');
}
my $ua = Mojo::UserAgent->new;
my $tx = $ua->get('/');
Copy link
Member

Choose a reason for hiding this comment

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

I don't think this line belongs here.

t/mojo/daemon.t Outdated
};

subtest 'Request limit' => sub {
$daemon = Mojo::Server::Daemon->new(app => $app, listen => ['http://127.0.0.1'], silent => 1)->start;
Copy link
Member

Choose a reason for hiding this comment

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

$daemon is not in the right scope.

t/mojo/daemon.t Outdated
like $@, qr/IO::Socket::SSL/, 'right error';
};

subtest 'bstract methods' => sub {
Copy link
Member

Choose a reason for hiding this comment

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

Typo.

@toshisugimo
Copy link
Contributor Author

56a93d9...0c444f9
I fixed the places that were pointed out.

@kraih
Copy link
Member

kraih commented Aug 28, 2020

Squash your commits.

@toshisugimo
Copy link
Contributor Author

Squashed

Copy link
Member

@christopherraa christopherraa left a comment

Choose a reason for hiding this comment

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

This looks good to me. 👍

Copy link
Member

@marcusramberg marcusramberg left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@mergify mergify bot merged commit 34d86b6 into mojolicious:master Sep 4, 2020
@kraih
Copy link
Member

kraih commented Sep 4, 2020

You missed these issues. 34d86b6...46b8784

@toshisugimo
Copy link
Contributor Author

Oops. Thank you for fixing it.

@toshisugimo toshisugimo deleted the use-subtest branch September 4, 2020 09:25
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.

None yet

4 participants