Am Sonntag, 28. Mai 2017 19:34:11 UTC+2 schrieb iaw4:
>
>
> my app redirects to http://auth.localhost:3000/index ,
>
Well, on my OpenSUSE box neither the "host" nor the "nslookup" (or "dig")
commands return an IP address for "auth.localhost" (they do, of course, for
"localhost"), so I´d say that explains the "Can't connect: nodename nor
servname provided, or not known" error message in your initial post.
The new demo code shows a different error:
and the output is
> # Connection refused
>
AFAIK, you should _not_ provide a hostname and port as parameter to
get_ok().
So I'd say a corrected test file should look like this:
use Test::More;
use Test::Mojo;
use FindBin;
require "$FindBin::Bin/../myapp.pl";
my $t = Test::Mojo->new;
$t->ua->max_redirects(100);
$t->get_ok('/')->status_is(200); # ->content_like( qr{abc});
done_testing();
If I test this with your server code (running "perl myapp.pl test -v t/t.pl
") I once again get the "Can't connect: nodename nor servname provided, or
not known" error message.
My browser follows without problems. I am guessing the Mojo Test daemon
> does not...
>
I´d say that the Chrome browser you use shows some non-standard behavior
here since I believe that localhost isn't a proper domain that could take
subdomains.
But I cannot provide an authoritative source for that right now.
Try using a different browser like Firefox for a start.
- Heiko
--
You received this message because you are subscribed to the Google Groups
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.