[otrs-cvs] UnitTest/bin UnitTestAutoSetup.pl,1.242,1.243
"CVS commits notifications of OTRS.org" <[email protected]>
| Newsgroups | gmane.comp.otrs.cvs |
|---|---|
| Message-ID | <[email protected]> |
Comments:
Update of /home/cvs/UnitTest/bin
In directory lancelot:/tmp/cvs-serv585/bin
Modified Files:
UnitTestAutoSetup.pl
Log Message:
Added vacuum feature to protect postgresql databases to fail.
Author: mh
Index: UnitTestAutoSetup.pl
===================================================================
RCS file: /home/cvs/UnitTest/bin/UnitTestAutoSetup.pl,v
retrieving revision 1.242
retrieving revision 1.243
diff -2 -u -d -r1.242 -r1.243
--- UnitTestAutoSetup.pl 2 Dec 2012 20:07:01 -0000 1.242
+++ UnitTestAutoSetup.pl 11 Dec 2012 09:25:33 -0000 1.243
@@ -1106,4 +1106,26 @@
sleep 5;
+ # create drop commands
+ my $PGVacuumCommands = 'vacuum full;';
+
+ # write sql file
+ open my $FH, '>', '/var/tmp/PGVacuum.sql';
+ print $FH $PGVacuumCommands;
+ close $FH;
+
+ # vacuum databases
+ system(
+ "su - $Databases{postgresql}->{User} -c 'postgres -D $Databases{postgresql}->{ConfDir} otrs_unit_test < /var/tmp/PGVacuum.sql'"
+ );
+ sleep 1;
+ system(
+ "su - $Databases{postgresql}->{User} -c 'postgres -D $Databases{postgresql}->{ConfDir} template1 < /var/tmp/PGVacuum.sql'"
+ );
+ sleep 1;
+ system(
+ "su - $Databases{postgresql}->{User} -c 'postgres -D $Databases{postgresql}->{ConfDir} postgres < /var/tmp/PGVacuum.sql'"
+ );
+ sleep 1;
+
# create new database
system(
---------------------------------------------------------------------
OTRS mailing list: cvs-log - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/cvs-log
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/cvs-log