Revert "Revert "update acl test to work in github action container env""
This reverts commit 2abaa92e97.
This commit is contained in:
@@ -13,10 +13,14 @@ BEGIN {
|
|||||||
|
|
||||||
use Dancer qw/:script !pass/;
|
use Dancer qw/:script !pass/;
|
||||||
|
|
||||||
config->{'dns'} = {no => ['::1','fe80::/10','127.0.0.0/8','169.254.0.0/16']};
|
# this is needed so that test works in github action container
|
||||||
|
# and actually ends up cutting out live DNS anyway 👍
|
||||||
|
config->{'dns'} = { 'ETCHOSTS' => { localhost => [ [ '127.0.0.1' ] ] } };
|
||||||
|
|
||||||
|
config->{'dns'}->{'no'} = ['::1','fe80::/10','127.0.0.0/8','169.254.0.0/16'];
|
||||||
is(hostname_from_ip('127.0.0.1'), undef, '127.0.0.1 blocked');
|
is(hostname_from_ip('127.0.0.1'), undef, '127.0.0.1 blocked');
|
||||||
|
|
||||||
config->{'dns'} = {no => ['::1','fe80::/10','169.254.0.0/16']};
|
config->{'dns'}->{'no'} = ['::1','fe80::/10','169.254.0.0/16'];
|
||||||
is(hostname_from_ip('127.0.0.1'), 'localhost', '127.0.0.1 allowed');
|
is(hostname_from_ip('127.0.0.1'), 'localhost', '127.0.0.1 allowed');
|
||||||
|
|
||||||
done_testing;
|
done_testing;
|
||||||
|
|||||||
Reference in New Issue
Block a user