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

[Bacula-devel] regression tests: make db parameters configurable


hi

I ran into an issue with PostgreSQL. I don't know how to get it working
without a password for user "regress".

So here is my proposal to set the parameters in the config file. Patch generated with "svn diff" in "regress" folder.

- Thomas


Index: scripts/bacula-dir.conf.testrunscript.in
===================================================================
--- scripts/bacula-dir.conf.testrunscript.in	(revision 7126)
+++ scripts/bacula-dir.conf.testrunscript.in	(working copy)
@@ -228,7 +228,7 @@
 Catalog {
   Name = MyCatalog
   @libdbi@
-  dbname = regress; user = regress; password = ""
+  dbname = @db_name@; user = @db_user@; password = "@db_password@"
 }
 
 
Index: scripts/bacula-dir-2client.conf.in
===================================================================
--- scripts/bacula-dir-2client.conf.in	(revision 7126)
+++ scripts/bacula-dir-2client.conf.in	(working copy)
@@ -233,7 +233,7 @@
 Catalog {
   Name = MyCatalog
   @libdbi@
-  dbname = regress; user = regress; password = ""
+  dbname = @db_name@; user = @db_user@; password = "@db_password@"
 }
 
 # Reasonable message delivery -- send most everything to email address
Index: scripts/win32-bacula-dir.conf.in
===================================================================
--- scripts/win32-bacula-dir.conf.in	(revision 7126)
+++ scripts/win32-bacula-dir.conf.in	(working copy)
@@ -118,7 +118,7 @@
 Catalog {
   Name = MyCatalog
   @libdbi@
-  dbname = regress; user = regress; password = ""
+  dbname = @db_name@; user = @db_user@; password = "@db_password@"
 }
 
 # Reasonable message delivery -- send most everything to email address
Index: scripts/create_sed
===================================================================
--- scripts/create_sed	(revision 7126)
+++ scripts/create_sed	(working copy)
@@ -65,3 +65,6 @@
 echo "s%@win32_file@%${WIN32_FILE}%g" >>${out}
 echo "s%@win32_port@%${WIN32_PORT}%g" >>${out}
 echo "s%@win32_password@%${WIN32_PASSWORD}%g" >>${out}
+echo "s%@db_name@%${db_name}%g" >>${out}
+echo "s%@db_user@%${db_user}%g" >>${out}
+echo "s%@db_password@%${db_password}%g" >>${out}
Index: scripts/bacula-dir.conf.regexwhere.in
===================================================================
--- scripts/bacula-dir.conf.regexwhere.in	(revision 7126)
+++ scripts/bacula-dir.conf.regexwhere.in	(working copy)
@@ -118,7 +118,7 @@
 Catalog {
   Name = MyCatalog
   @libdbi@
-  dbname = regress; user = regress; password = ""
+  dbname = @db_name@; user = @db_user@; password = "@db_password@"
 }
 
 
Index: scripts/testa-bacula-dir.conf.in
===================================================================
--- scripts/testa-bacula-dir.conf.in	(revision 7126)
+++ scripts/testa-bacula-dir.conf.in	(working copy)
@@ -103,7 +103,7 @@
 Catalog {
   Name = MyCatalog
   @libdbi@
-  dbname = regress; user = regress; password = ""
+  dbname = @db_name@; user = @db_user@; password = "@db_password@"
 }
 
 # Reasonable message delivery -- send most everything to email address
Index: scripts/bacula-dir-fifo.conf.in
===================================================================
--- scripts/bacula-dir-fifo.conf.in	(revision 7126)
+++ scripts/bacula-dir-fifo.conf.in	(working copy)
@@ -162,7 +162,7 @@
 Catalog {
   Name = MyCatalog
   @libdbi@
-  dbname = regress; user = regress; password = ""
+  dbname = @db_name@; user = @db_user@; password = "@db_password@"
 }
 
 # Reasonable message delivery -- send most everything to email address
Index: scripts/regress-config.in
===================================================================
--- scripts/regress-config.in	(revision 0)
+++ scripts/regress-config.in	(revision 0)
@@ -0,0 +1,29 @@
+#!/bin/sh
+#
+# This is the configuration script for regression testing
+#
+
+. ${1}/config
+
+CFLAGS="-g -O2 -Wall" \
+ ./configure \
+    --sbindir=${1}/bin \
+    --sysconfdir=${1}/bin \
+    --mandir=${1}/bin \
+    --with-pid-dir=${1}/working \
+    --with-subsys-dir=${1}/working \
+    --enable-smartalloc \
+    --disable-readline \
+    --with-working-dir=${1}/working \
+    --with-archivedir=${1}/tmp \
+    --with-dump-email=${EMAIL} \
+    --with-job-email=${EMAIL} \
+    --with-smtp-host=${SMTP_HOST} \
+    --with-db-name=@db_name@ \
+    --with-db-user=@db_user@ \
+    ${OPENSSL} \
+    ${TCPWRAPPERS} \
+    ${WHICHDB} \
+    --with-baseport=${BASEPORT}
+
+exit 0

Property changes on: scripts/regress-config.in
___________________________________________________________________
Name: svn:executable
   + *

Index: scripts/bacula-dir-tape.conf.in
===================================================================
--- scripts/bacula-dir-tape.conf.in	(revision 7126)
+++ scripts/bacula-dir-tape.conf.in	(working copy)
@@ -202,7 +202,7 @@
 Catalog {
   Name = MyCatalog
   @libdbi@
-  dbname = regress; user = regress; password = ""
+  dbname = @db_name@; user = @db_user@; password = "@db_password@"
 }
 
 # Reasonable message delivery -- send most everything to email address
Index: scripts/bacula-dir-migration.conf.in
===================================================================
--- scripts/bacula-dir-migration.conf.in	(revision 7126)
+++ scripts/bacula-dir-migration.conf.in	(working copy)
@@ -175,7 +175,7 @@
 Catalog {
   Name = MyCatalog
   @libdbi@
-  dbname = regress; user = regress; password = ""
+  dbname = @db_name@; user = @db_user@; password = "@db_password@"
 }
 
 # Reasonable message delivery -- send most everything to email address
Index: scripts/win32-bacula-dir-tape.conf.in
===================================================================
--- scripts/win32-bacula-dir-tape.conf.in	(revision 7126)
+++ scripts/win32-bacula-dir-tape.conf.in	(working copy)
@@ -118,7 +118,7 @@
 Catalog {
   Name = MyCatalog
   @libdbi@
-  dbname = regress; user = regress; password = ""
+  dbname = @db_name@; user = @db_user@; password = "@db_password@"
 }
 
 # Reasonable message delivery -- send most everything to email address
Index: scripts/bacula-dir-strip.conf.in
===================================================================
--- scripts/bacula-dir-strip.conf.in	(revision 7126)
+++ scripts/bacula-dir-strip.conf.in	(working copy)
@@ -168,7 +168,7 @@
 Catalog {
   Name = MyCatalog
   @libdbi@
-  dbname = regress; user = regress; password = ""
+  dbname = @db_name@; user = @db_user@; password = "@db_password@"
 }
 
 # Reasonable message delivery -- send most everything to email address
Index: scripts/bacula-dir-vtape.conf.in
===================================================================
--- scripts/bacula-dir-vtape.conf.in	(revision 7126)
+++ scripts/bacula-dir-vtape.conf.in	(working copy)
@@ -306,7 +306,7 @@
 Catalog {
   Name = MyCatalog
   @libdbi@
-  dbname = regress; user = regress; password = ""
+  dbname = @db_name@; user = @db_user@; password = "@db_password@"
 }
 
 # Reasonable message delivery -- send most everything to email address
Index: scripts/bacula-dir.conf.accurate.in
===================================================================
--- scripts/bacula-dir.conf.accurate.in	(revision 7126)
+++ scripts/bacula-dir.conf.accurate.in	(working copy)
@@ -123,7 +123,7 @@
 Catalog {
   Name = MyCatalog
   @libdbi@
-  dbname = regress; user = regress; password = ""
+  dbname = @db_name@; user = @db_user@; password = "@db_password@"
 }
 
 
Index: scripts/bacula-dir-2d.conf.in
===================================================================
--- scripts/bacula-dir-2d.conf.in	(revision 7126)
+++ scripts/bacula-dir-2d.conf.in	(working copy)
@@ -114,7 +114,7 @@
 Catalog {
   Name = MyCatalog
   @libdbi@
-  dbname = regress; user = regress; password = ""
+  dbname = @db_name@; user = @db_user@; password = "@db_password@"
 }
 
 # Reasonable message delivery -- send most everything to email address
Index: scripts/bacula-dir.conf.maxtime.in
===================================================================
--- scripts/bacula-dir.conf.maxtime.in	(revision 7126)
+++ scripts/bacula-dir.conf.maxtime.in	(working copy)
@@ -108,7 +108,7 @@
 Catalog {
   Name = MyCatalog
   @libdbi@
-  dbname = regress; user = regress; password = ""
+  dbname = @db_name@; user = @db_user@; password = "@db_password@"
 }
 
 
Index: scripts/new-test-bacula-dir.conf.in
===================================================================
--- scripts/new-test-bacula-dir.conf.in	(revision 7126)
+++ scripts/new-test-bacula-dir.conf.in	(working copy)
@@ -440,7 +440,7 @@
 Catalog {
   Name = MyCatalog
   @libdbi@
-  dbname = regress; user = regress; password = ""
+  dbname = @db_name@; user = @db_user@; password = "@db_password@"
 }
 
 # Reasonable message delivery -- send most everything to email address
Index: scripts/bacula-dir.conf.errors.in
===================================================================
--- scripts/bacula-dir.conf.errors.in	(revision 7126)
+++ scripts/bacula-dir.conf.errors.in	(working copy)
@@ -205,7 +205,7 @@
 Catalog {
   Name = MyCatalog
   @libdbi@
-  dbname = regress; user = regress; password = ""
+  dbname = @db_name@; user = @db_user@; password = "@db_password@"
 }
 
 
Index: scripts/test-bacula-dir.conf.in
===================================================================
--- scripts/test-bacula-dir.conf.in	(revision 7126)
+++ scripts/test-bacula-dir.conf.in	(working copy)
@@ -261,7 +261,7 @@
 Catalog {
   Name = MyCatalog
   @libdbi@
-  dbname = regress; user = regress; password = ""
+  dbname = @db_name@; user = @db_user@; password = "@db_password@"
 }
 
 # Reasonable message delivery -- send most everything to email address
Index: scripts/bacula-dir-win32-tape.conf.in
===================================================================
--- scripts/bacula-dir-win32-tape.conf.in	(revision 7126)
+++ scripts/bacula-dir-win32-tape.conf.in	(working copy)
@@ -104,7 +104,7 @@
 Catalog {
   Name = MyCatalog
   @libdbi@
-  dbname = regress; user = regress; password = ""
+  dbname = @db_name@; user = @db_user@; password = "@db_password@"
 }
 
 # Reasonable message delivery -- send most everything to email address
Index: scripts/tls-auth-bacula-dir.conf.in
===================================================================
--- scripts/tls-auth-bacula-dir.conf.in	(revision 7126)
+++ scripts/tls-auth-bacula-dir.conf.in	(working copy)
@@ -339,7 +339,7 @@
 Catalog {
   Name = MyCatalog
   @libdbi@
-  dbname = regress; user = regress; password = ""
+  dbname = @db_name@; user = @db_user@; password = "@db_password@"
 }
 
 # Reasonable message delivery -- send most everything to email address
Index: scripts/tls-bacula-dir.conf.in
===================================================================
--- scripts/tls-bacula-dir.conf.in	(revision 7126)
+++ scripts/tls-bacula-dir.conf.in	(working copy)
@@ -336,7 +336,7 @@
 Catalog {
   Name = MyCatalog
   @libdbi@
-  dbname = regress; user = regress; password = ""
+  dbname = @db_name@; user = @db_user@; password = "@db_password@"
 }
 
 # Reasonable message delivery -- send most everything to email address
Index: scripts/do_sed
===================================================================
--- scripts/do_sed	(revision 7126)
+++ scripts/do_sed	(working copy)
@@ -57,7 +57,9 @@
 sed -f ${out} ${cwd}/scripts/bacula-sd-2d.conf.in >${cwd}/scripts/bacula-sd-2d.conf
 sed -f ${out} ${cwd}/scripts/bacula-dir-2d.conf.in >${cwd}/scripts/bacula-dir-2d.conf
 sed -f ${out} ${cwd}/scripts/bconsole-2d.conf.in >${cwd}/scripts/bconsole-2d.conf
+sed -f ${out} ${cwd}/scripts/regress-config.in >${cwd}/scripts/regress-config
 
+
 scripts/config_dart
 
 # These files have no fancy sed stuff, so we just copy them over
Index: scripts/multi-client-bacula-dir.conf.in
===================================================================
--- scripts/multi-client-bacula-dir.conf.in	(revision 7126)
+++ scripts/multi-client-bacula-dir.conf.in	(working copy)
@@ -325,7 +325,7 @@
 Catalog {
   Name = MyCatalog
   @libdbi@
-  dbname = regress; user = regress; password = ""
+  dbname = @db_name@; user = @db_user@; password = "@db_password@"
 }
 
 # Reasonable message delivery -- send most everything to email address
Index: scripts/testb-bacula-dir.conf.in
===================================================================
--- scripts/testb-bacula-dir.conf.in	(revision 7126)
+++ scripts/testb-bacula-dir.conf.in	(working copy)
@@ -107,7 +107,7 @@
 Catalog {
   Name = MyCatalog
   @libdbi@  
-  dbname = regress; user = regress; password = ""
+  dbname = @db_name@; user = @db_user@; password = "@db_password@"
 }
 
 # Reasonable message delivery -- send most everything to email address
Index: prototype.conf
===================================================================
--- prototype.conf	(revision 7126)
+++ prototype.conf	(working copy)
@@ -47,6 +47,11 @@
 #WHICHDB="--with-postgresql"
 WHICHDB="--with-mysql" 
 
+# DB parameters
+db_name="regress"
+db_user="regress"
+db_password=
+
 # Set this if you use libdbi framework
 #LIBDBI="dbdriver = "dbi:postgresql"; dbaddress = 127.0.0.1; dbport = 5432"
 
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Bacula-devel mailing list
Bacula-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/bacula-devel


This mailing list archive is a service of Copilotco.