[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb:[2931] trunk/t



Revision: 2931
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=2931&view=rev
Author:   einhverfr
Date:     2010-03-01 05:14:36 +0000 (Mon, 01 Mar 2010)

Log Message:
-----------
Moving role loading out of transactions so it works when db is repeatedly dropped and created

Modified Paths:
--------------
    trunk/t/40-dbsetup.t
    trunk/t/63-lwp.t

Modified: trunk/t/40-dbsetup.t
===================================================================
--- trunk/t/40-dbsetup.t	2010-03-01 04:12:15 UTC (rev 2930)
+++ trunk/t/40-dbsetup.t	2010-03-01 05:14:36 UTC (rev 2931)
@@ -76,18 +76,16 @@
 (open (ROLES, '<', 'sql/modules/Roles.sql') && pass("Roles description found"))
 || fail("Roles description found");
 
-print PSQL "BEGIN;\n";
 for my $roleline (<ROLES>){
     $roleline =~ s/<\?lsmb dbname \?>/$ENV{LSMB_NEW_DB}/;
     print PSQL $roleline;
 }
 
-print PSQL "COMMIT;\n";
 close (PSQL);
 SKIP: {
      skip 'No admin info', 4
-           if (!defined $ENV{LSMB_USERNAME} 
-                or !defined $ENV{LSMB_PASSWORD}
+           if (!defined $ENV{LSMB_ADMIN_USERNAME} 
+                or !defined $ENV{LSMB_ADMIN_PASSWORD}
                 or !defined $ENV{LSMB_COUNTRY_CODE}
                 or !defined $ENV{LSMB_ADMIN_FNAME}
                 or !defined $ENV{LSMB_ADMIN_LNAME});

Modified: trunk/t/63-lwp.t
===================================================================
--- trunk/t/63-lwp.t	2010-03-01 04:12:15 UTC (rev 2930)
+++ trunk/t/63-lwp.t	2010-03-01 05:14:36 UTC (rev 2931)
@@ -5,18 +5,20 @@
 
 if (!$ENV{'LSMB_TEST_LWP'}){
 	plan 'skip_all' => 'LWP Test not enabled!';
+} elsif ($ENV{'LSMB_INSTALL_DB'}){
+        Plan 'skip_all' => 'Tests not save for production db';
 } else {
 	plan 'no_plan';
 }
 
 
-my $host = $ENV{LSMB_BASE_URL} || 'http://localhost/ledger-smb/';
+my $host = $ENV{LSMB_BASE_URL} || 'http://localhost/ledgersmb/';
 if ($host !~ /\/$/){
 	$host .= "/";
 };
 $host =~ /https?:\/\/([^\/]+)\//;
 $hostname = $1;
-my $db = $ENV{LSMB_TEST_NEW_DB} || $ENV{PGDATABASE};
+my $db = $ENV{LSMB_NEW_DB} || $ENV{PGDATABASE};
 do 't/data/62-request-data'; # Import test case oashes
 my $browser = LWP::UserAgent->new( );
 if ($host !~ /https?:.+:/){


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.