Skip to content

Commit 074ad7a

Browse files
committed
Add DBI tests for Snowflake URI.
1 parent 70961e5 commit 074ad7a

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

t/dbi.t

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,36 @@ for my $spec (
388388
dbi => [ [EXAHOST => 'foo'], [EXAPORT => 123] ],
389389
qry => [ foo => 1, foo => 2, lol => 'yes', Driver => 'HPExasol' ],
390390
},
391+
{
392+
uri => 'db:snowflake:',
393+
dsn => 'dbi:ODBC:',
394+
dbi => [ [DSN => undef] ],
395+
qry => [],
396+
},
397+
{
398+
uri => 'db:snowflake:dbadmin',
399+
dsn => 'dbi:ODBC:DSN=dbadmin',
400+
dbi => [ [DSN => 'dbadmin'] ],
401+
qry => [],
402+
},
403+
{
404+
uri => 'db:snowflake://yow',
405+
dsn => 'dbi:ODBC:Server=yow;Port=443',
406+
dbi => [ [Server => 'yow'], [Port => 443], [Database => undef] ],
407+
qry => [],
408+
},
409+
{
410+
uri => 'db:snowflake://yow:33',
411+
dsn => 'dbi:ODBC:Server=yow;Port=33',
412+
dbi => [ [Server => 'yow'], [Port => 33], [Database => undef] ],
413+
qry => [],
414+
},
415+
{
416+
uri => 'db:snowflake://foo:123/try?foo=1&foo=2&lol=yes&Driver=Snowflaker',
417+
dsn => 'dbi:ODBC:Server=foo;Port=123;Database=try;foo=1;foo=2;lol=yes;Driver=Snowflaker',
418+
dbi => [ [Server => 'foo'], [Port => 123], [Database => 'try'] ],
419+
qry => [ foo => 1, foo => 2, lol => 'yes', Driver => 'Snowflaker' ],
420+
},
391421
) {
392422
my $uri = $spec->{uri};
393423
ok my $u = URI->new($uri), "URI $uri";

0 commit comments

Comments
 (0)