[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[2933] trunk
- Subject: SF.net SVN: ledger-smb:[2933] trunk
- From: ..hidden..
- Date: Mon, 01 Mar 2010 05:35:59 +0000
Revision: 2933
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=2933&view=rev
Author: einhverfr
Date: 2010-03-01 05:35:58 +0000 (Mon, 01 Mar 2010)
Log Message:
-----------
Correcting a few more db build/test issues
Modified Paths:
--------------
trunk/sql/modules/Roles.sql
trunk/t/40-dbsetup.t
trunk/t/89-dropdb.t
Modified: trunk/sql/modules/Roles.sql
===================================================================
--- trunk/sql/modules/Roles.sql 2010-03-01 05:17:11 UTC (rev 2932)
+++ trunk/sql/modules/Roles.sql 2010-03-01 05:35:58 UTC (rev 2933)
@@ -1392,6 +1392,7 @@
"lsmb_<?lsmb dbname ?>__project_translation_create";
CREATE ROLE "lsmb_<?lsmb dbname ?>__users_manage"
+IN ROLE "lsmb_<?lsmb dbname ?>__contact_read"
WITH INHERIT NOLOGIN;
GRANT EXECUTE ON FUNCTION admin__add_user_to_role(TEXT, TEXT)
Modified: trunk/t/40-dbsetup.t
===================================================================
--- trunk/t/40-dbsetup.t 2010-03-01 05:17:11 UTC (rev 2932)
+++ trunk/t/40-dbsetup.t 2010-03-01 05:35:58 UTC (rev 2933)
@@ -109,16 +109,17 @@
ok($sth->execute($ENV{LSMB_ADMIN_FNAME},
$ENV{LSMB_ADMIN_LNAME},
uc($ENV{LSMB_COUNTRY_CODE}),
- $ENV{LSMB_USERNAME},
- $ENV{LSMB_PASSWORD}), 'Admin user creation query ran');
+ $ENV{LSMB_ADMIN_USERNAME},
+ $ENV{LSMB_ADMIN_PASSWORD}), 'Admin user creation query ran');
my ($var) = $sth->fetchrow_array();
cmp_ok($var, '>', 0, 'User id retrieved');
$sth->finish;
$sth = $dbh->prepare("SELECT admin__add_user_to_role(?, ?)");
my $rolename = "lsmb_" . $ENV{PGDATABASE} . "__users_manage";
- ok($sth->execute($ENV{LSMB_USERNAME}, $rolename),
+ ok($sth->execute($ENV{LSMB_ADMIN_USERNAME}, $rolename),
'Admin user assigned rights');
$sth->finish;
+ $dbh->commit;
};
SKIP: {
Modified: trunk/t/89-dropdb.t
===================================================================
--- trunk/t/89-dropdb.t 2010-03-01 05:17:11 UTC (rev 2932)
+++ trunk/t/89-dropdb.t 2010-03-01 05:35:58 UTC (rev 2933)
@@ -21,7 +21,7 @@
ok(open (DBLOCK, '<', "$temp/LSMB_TEST_DB"), 'Opened db lock file');
my $db = <DBLOCK>;
chomp($db);
-cmp_ok($db, 'eq', $ENV{LSMB_NEW_DB}, 'Got expected db name out');
+cmp_ok($db, 'eq', $ENV{LSMB_NEW_DB}, 'Got expected db name out') &&
+ok(!system ("dropdb $ENV{LSMB_NEW_DB}"), 'dropped db');
ok(close (DBLOCK), 'Closed db lock file');
-ok(!system ("dropdb $ENV{LSMB_NEW_DB}"), 'dropped db');
ok(unlink ("$temp/LSMB_TEST_DB"), 'Removed test db lockfile');
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.