update: Solved in Re: Default DB connection details not found: Plack::Test & Dancer2./update

I'm beginning to write my tests for my Dancer2 application. It uses Dancer2::Plugin::Database. It works perfectly fine when running with perl or plackup from the command line, but when I try to execute the following sample/example test, it gives the below error. I just started with Plack::Test, so I'm hoping I'm missing something obvious that I haven't spotted yet. Can those who have experience with webapps have a quick look to see if I'm missing anything glaring?

[App::EnvUI:30727] error @2016-09-30 10:44:11> Asked for default conne +ction (no name given) but no default connection details found in conf +ig in /usr/local/share/perl/5.18.2/Dancer2/Plugin.pm l. 526 Can't get a database connection without settings supplied! Please check you've supplied settings in config as per the Dancer::Plu +gin::Database documentation at /usr/local/share/perl/5.18.2/Dancer/Pl +ugin/Database/Core.pm line 206. Compilation failed in require at t/base.t line 4. BEGIN failed--compilation aborted at t/base.t line 4.

Code:

use strict; use warnings; use App::EnvUI; use HTTP::Request::Common; use Plack::Test; use Test::More; my $test = Plack::Test->create( App::EnvUI->to_app ); subtest 'Sample test' => sub { my $res = $test->request( GET '/' ); ok( $res->is_success, 'Successful request' ); is( $res->content, '{}', 'Empty response back' ); }; done_testing();

My configuration file, config.yml, per the docs (which I know works fine in normal run mode):

plugins: Database: driver: SQLite database: 'db/envui.db' dbi_params: RaiseError: 1 AutoCommit: 1

In reply to [SOLVED] Default DB connection details not found: Plack::Test & Dancer2 by stevieb

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.