AWS-Lambda

 view release on metacpan or  search on metacpan

MANIFEST  view on Meta::CPAN

lib/AWS/Lambda/Bootstrap.pm
lib/AWS/Lambda/Context.pm
lib/AWS/Lambda/PSGI.pm
lib/AWS/Lambda/ResponseWriter.pm
minil.toml
script/bootstrap
t/00_compile.t
t/01_echo.t
t/02_error.t
t/03_init_error.t
t/04_handler_not_found.t
t/10_lambda_next.t
t/11_lambda_response.t
t/12_lambda_error.t
t/13_lambda_init_error.t
t/14_streaming.t
t/15_lambda_response_streaming.t
t/20_psgi.t
t/21_psgi_response_streaming.t
t/lib/BootstrapMock.pm
t/test_handlers/echo.pl

t/04_handler_not_found.t  view on Meta::CPAN

use Test::More;

use FindBin;
use lib "$FindBin::Bin/lib";
use BootstrapMock;
use AWS::Lambda::Context;
use Try::Tiny;

my $error;
my $bootstrap = BootstrapMock->new(
    handler     => "echo.handle_not_found",
    runtime_api => "example.com",
    task_root   => "$FindBin::Bin/test_handlers",
    lambda_init_error => sub {
        my $self = shift;
        $error = shift;
    },
);

ok !$bootstrap->handle_event;
like $error, qr/handler handle_not_found is not found/;

done_testing;



( run in 0.346 second using v1.01-cache-2.11-cpan-cba739cd03b )