[prev in list] [next in list] [prev in thread] [next in thread] 

List:       bacula-commits
Subject:    [Bacula-commits] [bacula.org] Bacula Community source branch
From:       git () bacula ! org
Date:       2011-02-28 16:02:47
Message-ID: 20110228160248.0BDD11CD4AA () bacula ! bacula ! org
[Download RAW message or body]

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Bacula Community source".

The branch, Branch-5.1 has been updated
       via  984d1bc6350cb31d6a9285d90559229e225091be (commit)
       via  f19a2746b8f98b9280ac7120f4fae224f79d24c6 (commit)
       via  87af39dcd72318017cad7c3c6a9b705af579620d (commit)
       via  c16d77fb8ef8c922a5e5223af974b06f06a71e02 (commit)
       via  87fab9f540fe23e0551019e05f83a31b86bd0b49 (commit)
       via  e0759004ac57d81971623ded985585009f6a8f38 (commit)
       via  9454aa83791e77de0b681e90a32160b3544beb50 (commit)
      from  becbd653a0605e45cb7804cbd41149ac8a8cc396 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 984d1bc6350cb31d6a9285d90559229e225091be
Author: Eric Bollengier <eric@eb.homelinux.org>
Date:   Mon Feb 28 16:53:43 2011 +0100

    regress: more work on remote-fd test

commit f19a2746b8f98b9280ac7120f4fae224f79d24c6
Author: Eric Bollengier <eric@eb.homelinux.org>
Date:   Mon Feb 28 16:08:47 2011 +0100

    regress: tweak bweb regression tests

commit 87af39dcd72318017cad7c3c6a9b705af579620d
Author: Eric Bollengier <eric@eb.homelinux.org>
Date:   Mon Feb 28 10:02:41 2011 +0100

    regress: tweak remote-fd-test

commit c16d77fb8ef8c922a5e5223af974b06f06a71e02
Author: Eric Bollengier <eric@eb.homelinux.org>
Date:   Sun Feb 27 15:45:52 2011 +0100

    regress: Add remote fd test

commit 87fab9f540fe23e0551019e05f83a31b86bd0b49
Author: Eric Bollengier <eric@eb.homelinux.org>
Date:   Sun Feb 27 15:45:30 2011 +0100

    regress: Add variables in prototype.conf for remote test

commit e0759004ac57d81971623ded985585009f6a8f38
Author: Eric Bollengier <eric@eb.homelinux.org>
Date:   Sun Feb 27 15:44:17 2011 +0100

    regress: add remote control functions

commit 9454aa83791e77de0b681e90a32160b3544beb50
Author: Kern Sibbald <kern@sibbald.com>
Date:   Sat Feb 26 20:30:54 2011 +0100

    Fix Windows build entrypoints

-----------------------------------------------------------------------

Summary of changes:
diff --git a/bacula/src/win32/lib/bacula32.def b/bacula/src/win32/lib/bacula32.def
index 1d6f122..afd5a32 100644
--- a/bacula/src/win32/lib/bacula32.def
+++ b/bacula/src/win32/lib/bacula32.def
@@ -15,6 +15,7 @@ _Z12UTF8_2_wcharPPcPKc
 _Z12gettimeofdayP7timevalP8timezone
 _Z12init_signalsPFviE
 _Z12wchar_2_UTF8PcPKwi
+_Z12wchar_2_UTF8PPcPKw
 _Z12win32_getcwdPci
 _Z12win32_unlinkPKc
 _Z15init_stack_dumpv
@@ -451,7 +452,7 @@ _Z11edit_uint64yPc
 _Z11is_a_numberPKc
 _Z12str_to_int64Pc
 _Z13is_an_integerPKc
-_Z13is_name_validPcPS_
+_Z13is_name_validPKcPPc
 _Z13str_to_uint64Pc
 _Z14size_to_uint64PciPy
 _Z15speed_to_uint64PciPy
@@ -476,7 +477,7 @@ _Z8hmac_md5PhiS_iS_
 _ZN6htable11hash_mallocEi
 _ZN6htable10grow_tableEv
 _ZN6htable10hash_indexEPc
-_ZN6htable4initEPvS0_i
+_ZN6htable4initEPvS0_ii
 _ZN6htable4nextEv
 _ZN6htable4sizeEv
 _ZN6htable5firstEv
@@ -484,8 +485,8 @@ _ZN6htable5statsEv
 _ZN6htable6insertEPcPv
 _ZN6htable6lookupEPc
 _ZN6htable7destroyEv
-_ZN6htableC1EPvS0_i
-_ZN6htableC2EPvS0_i
+_ZN6htableC1EPvS0_ii
+_ZN6htableC2EPvS0_ii
     
  
 ; jcr.o
@@ -502,7 +503,6 @@ _Z16get_jcr_from_tsdv
 _Z18get_jobid_from_tsdv
 _Z18get_jcr_by_sessionjj
 _Z18init_jcr_subsystemv
-_Z18set_jcr_job_statusP3JCRi
 _ZN3JCR12setJobStatusEi
 _Z19init_last_jobs_listv
 _Z19lock_last_jobs_listv
@@ -570,6 +570,8 @@ _ZN8POOL_MEM6strcpyEPKc
 _ZN8POOL_MEM8max_sizeEv
  
 ; message.o
+_Z10get_hangupv
+_Z10set_hangupi
 _Z10my_name_isiPPcPKc
 _Z12add_msg_destP4MSGSiiPcS1_
 _Z12rem_msg_destP4MSGSiiPc
@@ -597,6 +599,9 @@ _Z9close_msgP3JCR
 _Z9get_tracev
 _Z9set_tracei
 
+; mkpath.o
+_Z8makepathP4ATTRPKcttjji
+
 ; priv.o
 _Z4dropPcS_b
 
diff --git a/bacula/src/win32/lib/bacula64.def b/bacula/src/win32/lib/bacula64.def
index 70cab5a..3591f46 100644
--- a/bacula/src/win32/lib/bacula64.def
+++ b/bacula/src/win32/lib/bacula64.def
@@ -15,6 +15,7 @@ _Z12UTF8_2_wcharPPcPKc
 _Z12gettimeofdayP7timevalP8timezone
 _Z12init_signalsPFviE
 _Z12wchar_2_UTF8PcPKwi
+_Z12wchar_2_UTF8PPcPKw
 _Z12win32_getcwdPci
 _Z12win32_unlinkPKc
 _Z15init_stack_dumpv
@@ -130,10 +131,10 @@ _Z22get_win32_drivelettersP6FF_PKTPc
 _Z25set_find_changed_functionP6FF_PKTPFbP3JCRS0_E
  
 ; find_one.o
-_Z13check_changesP3JCRP6FF_PKT
 _Z13find_one_fileP3JCRP6FF_PKTPFiS0_S2_bEPcjb
 _Z13term_find_oneP6FF_PKT
 _Z16has_file_changedP3JCRP6FF_PKT
+_Z13check_changesP3JCRP6FF_PKT
  
 ; fstype.o
 _Z6fstypePKcPci
@@ -444,7 +445,7 @@ _Z11edit_uint64yPc
 _Z11is_a_numberPKc
 _Z12str_to_int64Pc
 _Z13is_an_integerPKc
-_Z13is_name_validPcPS_
+_Z13is_name_validPKcPPc
 _Z13str_to_uint64Pc
 _Z14size_to_uint64PciPy
 _Z15speed_to_uint64PciPy
@@ -469,7 +470,7 @@ _Z8hmac_md5PhiS_iS_
 _ZN6htable11hash_mallocEi
 _ZN6htable10grow_tableEv
 _ZN6htable10hash_indexEPc
-_ZN6htable4initEPvS0_i
+_ZN6htable4initEPvS0_ii
 _ZN6htable4nextEv
 _ZN6htable4sizeEv
 _ZN6htable5firstEv
@@ -477,8 +478,8 @@ _ZN6htable5statsEv
 _ZN6htable6insertEPcPv
 _ZN6htable6lookupEPc
 _ZN6htable7destroyEv
-_ZN6htableC1EPvS0_i
-_ZN6htableC2EPvS0_i
+_ZN6htableC1EPvS0_ii
+_ZN6htableC2EPvS0_ii
     
  
 ; jcr.o
@@ -495,7 +496,6 @@ _Z16get_jcr_from_tsdv
 _Z18get_jobid_from_tsdv
 _Z18get_jcr_by_sessionjj
 _Z18init_jcr_subsystemv
-_Z18set_jcr_job_statusP3JCRi
 _ZN3JCR12setJobStatusEi
 _Z19init_last_jobs_listv
 _Z19lock_last_jobs_listv
@@ -563,6 +563,8 @@ _ZN8POOL_MEM6strcpyEPKc
 _ZN8POOL_MEM8max_sizeEv
  
 ; message.o
+_Z10get_hangupv
+_Z10set_hangupi
 _Z10my_name_isiPPcPKc
 _Z12add_msg_destP4MSGSiiPcS1_
 _Z12rem_msg_destP4MSGSiiPc
@@ -589,7 +591,13 @@ _Z8term_msgv
 _Z9close_msgP3JCR
 _Z9get_tracev
 _Z9set_tracei
- 
+
+; mkpath.o
+_Z13path_list_addP3JCRjPc
+_Z14free_path_listP3JCR
+_Z16path_list_lookupP3JCRPc
+_Z8makepathP4ATTRPKcttjji
+
 ; priv.o
 _Z4dropPcS_b
 
diff --git a/regress/prototype.conf b/regress/prototype.conf
index f734fac..f6d659d 100644
--- a/regress/prototype.conf
+++ b/regress/prototype.conf
@@ -115,3 +115,26 @@ WIN32_PORT=9102
 WIN32_PASSWORD="zzzzz"
 # Where the win32 client will have to contact the SD
 WIN32_STORE_ADDR="zzzz"
+# To setup autologon and regress-win32.pl start
+# User name
+WIN32_USER=Administrator
+# Admin password
+WIN32_PASS=PasswordWin
+
+#
+# Testing remote FD
+#
+
+# Client name. Note, it must be configured to accept your regress director
+REMOTE_CLIENT="yyyy"
+# Client FQDN or IP address
+REMOTE_ADDR="yyyy"
+# File or Directory to backup.  This is put in the "File" directive 
+#   in the FileSet
+REMOTE_FILE="/tmp"
+# Port of Win32 client
+REMOTE_PORT=9102
+# Win32 Client password
+REMOTE_PASSWORD="zzzzz"
+# Where the win32 client will have to contact the SD
+REMOTE_STORE_ADDR="zzzz"
diff --git a/regress/scripts/functions.pm b/regress/scripts/functions.pm
index 46f0a69..a9774a5 100644
--- a/regress/scripts/functions.pm
+++ b/regress/scripts/functions.pm
@@ -3,7 +3,7 @@ use strict;
 
 =head1 LICENSE
 
-   Bacula ® - The Network Backup Solution
+   Bacula® - The Network Backup Solution
 
    Copyright (C) 2000-2009 Free Software Foundation Europe e.V.
 
@@ -25,7 +25,7 @@ use strict;
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   Bacula ® is a registered trademark of Kern Sibbald.
+   Bacula® is a registered trademark of Kern Sibbald.
    The licensor of Bacula is the Free Software Foundation Europe
    (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zurich,
    Switzerland, email:ftf@fsfeurope.org.
@@ -44,17 +44,21 @@ our @EXPORT = qw(update_some_files create_many_files \
                check_multiple_copies
                   stop_bacula get_resource set_maximum_concurrent_jobs get_time
                   add_attribute check_prune_list check_min_volume_size
                   check_max_volume_size $estat $bstat $rstat $zstat $cwd $bin
-                  $scripts $conf $rscripts $tmp $working extract_resource
-                  $db_name $db_user $db_password $src $tmpsrc);
+                  $scripts $conf $rscripts $tmp $working $dstat extract_resource
+                  $db_name $db_user $db_password $src $tmpsrc
+                  remote_init remote_config remote_stop remote_diff );
 
 
 use File::Copy qw/copy/;
 
-our ($cwd, $bin, $scripts, $conf, $rscripts, $tmp, $working, $estat, $bstat, $zstat, \
$rstat, +our ($cwd, $bin, $scripts, $conf, $rscripts, $tmp, $working, $estat, $dstat,
+     $bstat, $zstat, $rstat, $debug,
+     $REMOTE_CLIENT, $REMOTE_ADDR, $REMOTE_FILE, $REMOTE_PORT, $REMOTE_PASSWORD,
+     $REMOTE_STORE_ADDR, $REGRESS_DEBUG,
      $db_name, $db_user, $db_password, $src, $tmpsrc, $HOST, $BASEPORT);
 
 END {
-    if ($estat || $rstat || $zstat || $bstat) {
+    if ($estat || $rstat || $zstat || $bstat || $dstat) {
         exit 1;
     }
 }
@@ -66,19 +70,22 @@ BEGIN {
         die "Could not find ./config file\n";
     }
     # load the ./config file in a subshell doesn't allow to use "env" to display all \
                variable
-    open(IN, ". ./config; env |") or die "Could not run shell: $!\n";
+    open(IN, ". ./config; set |") or die "Could not run shell: $!\n";
     while ( my $l = <IN> ) {
         chomp ($l);
-        ($envar,$enval) = split (/=/,$l,2);
-        $ENV{$envar} = $enval;
+        if ($l =~ /^([\w\d]+)=(.+)/) {
+            next if ($1 eq 'SHELLOPTS'); # is in read-only
+            ($envar,$enval) = ($1, $2);
+            $ENV{$envar} = $enval;
+        }
     }
     close(IN);
     $cwd = `pwd`; 
     chomp($cwd);
 
     # set internal variable name and update environment variable
-    $ENV{db_name} = $db_name = $ENV{db_name} || 'regress';
-    $ENV{db_user} = $db_user = $ENV{db_user} || 'regress';
+    $ENV{db_name}     = $db_name     = $ENV{db_name}     || 'regress';
+    $ENV{db_user}     = $db_user     = $ENV{db_user}     || 'regress';
     $ENV{db_password} = $db_password = $ENV{db_password} || '';
 
     $ENV{bin}      = $bin      =  $ENV{bin}      || "$cwd/bin";
@@ -91,7 +98,14 @@ BEGIN {
     $ENV{rscripts} = $rscripts =  $ENV{rscripts} || "$cwd/scripts";
     $ENV{HOST}     = $HOST     =  $ENV{HOST}     || "localhost";
     $ENV{BASEPORT} = $BASEPORT =  $ENV{BASEPORT} || "8101";
-
+    $ENV{REGRESS_DEBUG} = $debug         = $ENV{REGRESS_DEBUG} || 0;
+    $ENV{REMOTE_CLIENT} = $REMOTE_CLIENT = $ENV{REMOTE_CLIENT} || 'remote-fd';
+    $ENV{REMOTE_ADDR}   = $REMOTE_ADDR   = $ENV{REMOTE_ADDR}   || undef;
+    $ENV{REMOTE_FILE}   = $REMOTE_FILE   = $ENV{REMOTE_FILE}   || "/tmp";
+    $ENV{REMOTE_PORT}   = $REMOTE_PORT   = $ENV{REMOTE_PORT}   || 9102;
+    $ENV{REMOTE_PASSWORD} = $REMOTE_PASSWORD = $ENV{REMOTE_PASSWORD} || "xxx";
+    $ENV{REMOTE_STORE_ADDR}=$REMOTE_STORE_ADDR=$ENV{REMOTE_STORE_ADDR} || undef;
+    
     $estat = $rstat = $bstat = $zstat = 0;
 }
 
@@ -365,7 +379,6 @@ sub set_maximum_concurrent_jobs
     add_attribute($file, "Maximum Concurrent Jobs", $nb, $obj, $name);
 }
 
-
 # You can add option to a resource
 #  add_attribute('$conf/bacula-dir.conf', 'FDTimeout', 1600, 'Director');
 #  add_attribute('$conf/bacula-dir.conf', 'FDTimeout', 1600, 'Storage', \
'FileStorage'); @@ -548,4 +561,107 @@ sub get_time
     print strftime('%F %T', localtime(time+$sec)), "\n";
 }
 
+sub debug
+{
+    if ($debug) {
+        print join("\n", @_), "\n";
+    }
+}
+
+sub remote_config
+{
+    open(FP, ">$REMOTE_FILE/bacula-fd.conf") or 
+        die "ERROR: Can't open $REMOTE_FILE/bacula-fd.conf $?";
+    print FP "
+Director {
+  Name = $HOST-dir
+  Password = \"$REMOTE_PASSWORD\"
+}
+FileDaemon {
+  Name = remote-fd
+  FDport = $REMOTE_PORT
+  WorkingDirectory = $REMOTE_FILE/working
+  Pid Directory = $REMOTE_FILE/working
+  Maximum Concurrent Jobs = 20
+}
+Messages {
+  Name = Standard
+  director = $HOST-dir = all, !skipped, !restored
+}
+";  
+    close(FP);
+    system("mkdir -p '$REMOTE_FILE/working' '$REMOTE_FILE/save'");
+    system("rm -rf '$REMOTE_FILE/restore'");
+    my $pid = fork();
+    if (!$pid) {
+        close(STDIN);  open(STDIN, "/dev/null");
+        close(STDOUT); open(STDOUT, ">/dev/null");
+        close(STDERR); open(STDERR, ">/dev/null");        
+        exec("/opt/bacula/bin/bacula-fd -c $REMOTE_FILE/bacula-fd.conf");
+        exit 1;
+    }
+    sleep(2);
+    $pid = `cat $REMOTE_FILE/working/bacula-fd.$REMOTE_PORT.pid`;
+    chomp($pid);
+
+    # create files and tweak rights
+    create_many_files("$REMOTE_FILE/save", 5000);
+    chdir("$REMOTE_FILE/save");
+    my $d = 'A';
+    my $r = 0700;
+    for my $g ( split(' ', $( )) {
+        chmod $r++, $d;
+        chown $<, $g, $d++;
+    }
+
+    # create a simple script to execute
+    open(FP, ">test.sh") or die "Can't open test.sh $!";
+    print FP "#!/bin/sh\n";
+    print FP "echo this is a script";
+    close(FP);
+    chmod 0755, "test.sh";
+
+    # create a hardlink
+    link("test.sh", "link-test.sh");
+
+    # create long filename
+    mkdir("b" x 255) or print "can't create long dir $!\n";
+    copy("test.sh", ("b" x 255) . '/' . ("a" x 255)) or print "can't create long dir \
$!\n"; +
+    # play with some symlinks
+    symlink("test.sh", "sym-test.sh");
+    symlink("$REMOTE_FILE/save/test.sh", "sym-abs-test.sh");
+
+    if ($pid) {
+        system("ps $pid");
+        $estat = ($? != 0);
+    } else {
+        $estat = 1;
+    }
+}
+
+sub remote_diff
+{
+    debug("Doing diff between save and restore");
+    system("ssh $REMOTE_ADDR " . 
+     "$REMOTE_FILE/scripts/diff.pl -s $REMOTE_FILE/save -d \
$REMOTE_FILE/restore/$REMOTE_FILE/save"); +    $dstat = ($? != 0);
+}
+
+sub remote_stop
+{
+    debug("Kill remote bacula-fd");
+    system("ssh $REMOTE_ADDR " . 
+             "'test -f $REMOTE_FILE/working/bacula-fd.$REMOTE_PORT.pid && " . 
+              "kill `cat $REMOTE_FILE/working/bacula-fd.$REMOTE_PORT.pid`'");
+}
+
+sub remote_init
+{
+    system("ssh $REMOTE_ADDR mkdir -p '$REMOTE_FILE/scripts/'");
+    system("scp -q scripts/functions.pm scripts/diff.pl \
$REMOTE_ADDR:$REMOTE_FILE/scripts/"); +    system("scp -q config \
$REMOTE_ADDR:$REMOTE_FILE/"); +    debug("INFO: Configuring remote client");
+    system("ssh $REMOTE_ADDR 'cd $REMOTE_FILE && perl -Mscripts::functions -e \
remote_config'"); +}
 1;
diff --git a/regress/tests/bweb-test.pl b/regress/tests/bweb-test.pl
index 36c73ab..6020b17 100755
--- a/regress/tests/bweb-test.pl
+++ b/regress/tests/bweb-test.pl
@@ -223,7 +223,7 @@ if ($part{media}) {
     $sel->wait_for_page_to_load_ok("30000");
     $sel->is_text_present_ok("The current Volume retention period");
 
-    $sel->back();
+    $sel->go_back_ok();
     $sel->is_text_present_ok("Volume Infos");
     $sel->click_ok("//button[\@name='action' and \@value='purge']");
     $sel->wait_for_page_to_load_ok("30000");
@@ -407,7 +407,9 @@ if ($part{group}) {
     $sel->wait_for_page_to_load_ok("30000");
 
     ok(not $sel->is_checked("//input[\@name='client_group' and \@value='Empty']"));
-    $sel->click_ok("link=Group Statistics");
+
+    # click on Statistics -> Groups
+    $sel->click_ok("//ul[\@id='menu']/li[6]/ul/li[3]/a");
     $sel->wait_for_page_to_load_ok("30000");
 
     $sel->is_text_present_ok("All");
@@ -572,12 +574,10 @@ if ($part{config}) {
     $sel->open_ok("/cgi-bin/bweb/bweb.pl");
     $sel->click_ok("link=Configuration");
     $sel->wait_for_page_to_load_ok("30000");
-    $sel->is_text_present_ok("Main Configuration");
+    $sel->is_text_present_ok("SQL Connection");
 
-    $sel->click_ok("//button[\@name='action' and \@value='edit_main_conf']");
+    $sel->click_ok("//button[\@name='action' and \@value='edit_conf']");
     $sel->wait_for_page_to_load_ok("30000");
-    $sel->is_text_present_ok("Main Configuration");
-    
     $dbi = $sel->get_value("dbi");
     $user = $sel->get_value("user");
     $pass = $sel->get_value("password");
@@ -592,7 +592,7 @@ if ($part{config}) {
     $sel->click_ok("//button[\@name='action' and \@value='apply_conf']");
     $sel->wait_for_page_to_load_ok("30000");
 
-    $sel->click_ok("//button[\@name='action' and \@value='edit_main_conf']");
+    $sel->click_ok("//button[\@name='action' and \@value='edit_conf']");
     $sel->wait_for_page_to_load_ok("30000");
 
     is($sel->get_value("dbi"), "dbi:Pg:database=dbi1", "verify dbi");
@@ -605,80 +605,82 @@ if ($part{config}) {
     $sel->click_ok("//button[\@name='action' and \@value='apply_conf']");
     $sel->wait_for_page_to_load_ok("30000");
 
-    $sel->is_text_present_ok("Main Configuration");
+    $sel->is_text_present_ok("SQL Connection");
 
+    if(0) {                     # not used for now
     # test create conf
-    $sel->click_ok("//button[\@name='action' and \@value='add_conf']");
-    $sel->wait_for_page_to_load_ok("30000");
-    $sel->is_text_present_ok("Unnamed");
-
-    $sel->type_ok("name", "MyBweb2");
-    $sel->type_ok("new_dir", "bweb2-dir");
- 
-    $sel->type_ok("dbi", $dbi);
-    $sel->type_ok("user", $user);
-    $sel->type_ok("password", $pass);
- 
-    $sel->type_ok("stat_job_table", "JobHisto");
-    $sel->click_ok("//button[\@name='action' and \@value='apply_conf']");
-    $sel->wait_for_page_to_load_ok("30000");
-    $sel->is_text_present_ok("MyBweb2");
-    $sel->is_text_present_ok("bweb2-dir");
-
-    # test create other conf
-    $sel->click_ok("//button[\@name='action' and \@value='view_main_conf']");
-    $sel->wait_for_page_to_load_ok("30000");
-    $sel->is_text_present_ok("Main Configuration");
-
-    $sel->click_ok("//button[\@name='action' and \@value='add_conf']");
-    $sel->wait_for_page_to_load_ok("30000");
-    $sel->is_text_present_ok("Unnamed");
-
-    $sel->type_ok("name", "MyBweb3");
-    $sel->type_ok("new_dir", "bweb3-dir");
-    $sel->type_ok("user", "test");
-
-    $sel->click_ok("//button[\@name='action' and \@value='apply_conf']");
-    $sel->wait_for_page_to_load_ok("30000");
-    $sel->is_text_present_ok("MyBweb3");
-
-    $sel->click_ok("//button[\@name='action' and \@value='view_main_conf']");
-    $sel->wait_for_page_to_load_ok("30000");
-    $sel->is_text_present_ok("Main Configuration");
-    $sel->is_text_present_ok("MyBweb3");
-    $sel->is_text_present_ok("MyBweb2");
-
-    # test rename
-    $sel->click_ok("//input[\@name='dir' and \@value='bweb2-dir']");
-    $sel->click_ok("//button[\@name='action' and \@value='view_conf']");
-    $sel->wait_for_page_to_load_ok("30000");
-    $sel->is_text_present_ok("MyBweb2");
-    $sel->click_ok("//button[\@name='action' and \@value='edit_conf']");
-    $sel->wait_for_page_to_load_ok("30000");
-    $sel->is_text_present_ok("MyBweb2");
-    $sel->type_ok("new_dir", "bweb-dir");
-    $sel->click_ok("//button[\@name='action' and \@value='apply_conf']");
-    $sel->wait_for_page_to_load_ok("30000");
-    $sel->is_text_present_ok("MyBweb2");
-    $sel->is_text_present_ok("bweb-dir");
-    
-    # test delete
-    $sel->click_ok("//button[\@name='action' and \@value='view_main_conf']");
-    $sel->wait_for_page_to_load_ok("30000");
-    $sel->is_text_present_ok("MyBweb3");
-
-    $sel->click_ok("//input[\@name='dir' and \@value='bweb3-dir']");
-    $sel->click_ok("//button[\@name='action' and \@value='del_conf']");
-    ok($sel->get_confirmation() =~ /^Do you really want to remove this \
                Director[\s\S]$/);
-    $sel->wait_for_page_to_load_ok("30000");
-    $sel->body_text_isnt("MyBweb3");
-    $sel->is_text_present_ok("MyBweb2");
-
-    $sel->click_ok("//input[\@name='dir' and \@value='bweb-dir']");
+        $sel->click_ok("//button[\@name='action' and \@value='add_conf']");
+        $sel->wait_for_page_to_load_ok("30000");
+        $sel->is_text_present_ok("Unnamed");
+        
+        $sel->type_ok("name", "MyBweb2");
+        $sel->type_ok("new_dir", "bweb2-dir");
+        
+        $sel->type_ok("dbi", $dbi);
+        $sel->type_ok("user", $user);
+        $sel->type_ok("password", $pass);
+        
+        $sel->type_ok("stat_job_table", "JobHisto");
+        $sel->click_ok("//button[\@name='action' and \@value='apply_conf']");
+        $sel->wait_for_page_to_load_ok("30000");
+        $sel->is_text_present_ok("MyBweb2");
+        $sel->is_text_present_ok("bweb2-dir");
+        
+        # test create other conf
+        $sel->click_ok("//button[\@name='action' and \@value='view_main_conf']");
+        $sel->wait_for_page_to_load_ok("30000");
+        $sel->is_text_present_ok("Main Configuration");
+        
+        $sel->click_ok("//button[\@name='action' and \@value='add_conf']");
+        $sel->wait_for_page_to_load_ok("30000");
+        $sel->is_text_present_ok("Unnamed");
+        
+        $sel->type_ok("name", "MyBweb3");
+        $sel->type_ok("new_dir", "bweb3-dir");
+        $sel->type_ok("user", "test");
+        
+        $sel->click_ok("//button[\@name='action' and \@value='apply_conf']");
+        $sel->wait_for_page_to_load_ok("30000");
+        $sel->is_text_present_ok("MyBweb3");
+        
+        $sel->click_ok("//button[\@name='action' and \@value='view_main_conf']");
+        $sel->wait_for_page_to_load_ok("30000");
+        $sel->is_text_present_ok("Main Configuration");
+        $sel->is_text_present_ok("MyBweb3");
+        $sel->is_text_present_ok("MyBweb2");
+        
+        # test rename
+        $sel->click_ok("//input[\@name='dir' and \@value='bweb2-dir']");
+        $sel->click_ok("//button[\@name='action' and \@value='view_conf']");
+        $sel->wait_for_page_to_load_ok("30000");
+        $sel->is_text_present_ok("MyBweb2");
+        $sel->click_ok("//button[\@name='action' and \@value='edit_conf']");
+        $sel->wait_for_page_to_load_ok("30000");
+        $sel->is_text_present_ok("MyBweb2");
+        $sel->type_ok("new_dir", "bweb-dir");
+        $sel->click_ok("//button[\@name='action' and \@value='apply_conf']");
+        $sel->wait_for_page_to_load_ok("30000");
+        $sel->is_text_present_ok("MyBweb2");
+        $sel->is_text_present_ok("bweb-dir");
+        
+        # test delete
+        $sel->click_ok("//button[\@name='action' and \@value='view_main_conf']");
+        $sel->wait_for_page_to_load_ok("30000");
+        $sel->is_text_present_ok("MyBweb3");
+        
+        $sel->click_ok("//input[\@name='dir' and \@value='bweb3-dir']");
     $sel->click_ok("//button[\@name='action' and \@value='del_conf']");
-    ok($sel->get_confirmation() =~ /^Do you really want to remove this \
                Director[\s\S]$/);
-    $sel->wait_for_page_to_load_ok("30000");
-    $sel->body_text_isnt("MyBweb2");
+        ok($sel->get_confirmation() =~ /^Do you really want to remove this \
Director[\s\S]$/); +    $sel->wait_for_page_to_load_ok("30000");
+        $sel->body_text_isnt("MyBweb3");
+        $sel->is_text_present_ok("MyBweb2");
+        
+        $sel->click_ok("//input[\@name='dir' and \@value='bweb-dir']");
+        $sel->click_ok("//button[\@name='action' and \@value='del_conf']");
+        ok($sel->get_confirmation() =~ /^Do you really want to remove this \
Director[\s\S]$/); +        $sel->wait_for_page_to_load_ok("30000");
+        $sel->body_text_isnt("MyBweb2");
+    }
 }
 
 if ($part{multidir}) {
diff --git a/regress/tests/remote-fd-test b/regress/tests/remote-fd-test
new file mode 100755
index 0000000..f99703c
--- /dev/null
+++ b/regress/tests/remote-fd-test
@@ -0,0 +1,116 @@
+#!/bin/sh
+#
+# What to test
+# ------------
+# - Normal backup
+# - Weird backup
+# - Restore
+# - Accurate backup
+# - Compression
+# - Checksum
+# - TLS/Encryption
+# - compare files
+# - runscript
+#
+# How to use this test
+# --------------------
+#
+#
+TestName="remote-fd-test"
+JobName=backup
+. scripts/functions
+
+scripts/cleanup
+scripts/copy-test-confs
+
+change_jobname NightlySave $JobName
+change_jobname MonsterSave AccurateTest
+
+start_test
+
+echo $REMOTE_FILE/save > $tmp/file-list
+
+ssh $REMOTE_ADDR test -x /opt/bacula/bin/bacula-fd
+if [ $? != 0 ]; then
+    print_debug "ERROR: Need to install bacula on $REMOTE_ADDR"
+    echo "ERROR: Need to install bacula on $REMOTE_ADDR"
+    exit 1
+fi
+
+$bperl -e remote_stop
+$bperl -e remote_init
+$bperl -e remote_config
+cfg=$conf/bacula-dir.conf
+$bperl -e "add_attribute('$cfg', 'clientrunbeforejob', '$REMOTE_FILE/save/test.sh', \
'Job', 'CompressedTest')" +$bperl -e "add_attribute('$cfg', 'accurate', 'yes', 'Job', \
'AccurateTest')" +$bperl -e "add_attribute('$cfg', 'address', '$REMOTE_ADDR', \
'Client')" +$bperl -e "add_attribute('$cfg', 'password', '$REMOTE_PASSWORD', \
'Client')" +$bperl -e "add_attribute('$cfg', 'address', '$REMOTE_STORE_ADDR', \
'Storage')" +
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
+@output
+messages
+@$out ${cwd}/tmp/log4.out
+status client
+@$out ${cwd}/tmp/log1.out
+label storage=File volume=TestVolume001
+run job=$JobName storage=File yes
+wait
+messages
+@# 
+@# now do a restore
+@#
+@$out ${cwd}/tmp/log2.out
+restore where=$REMOTE_FILE/restore select all done storage=File
+yes
+wait
+messages
+@$out ${cwd}/tmp/log3.out
+@#
+@# make some runscript tests
+@#
+run job=CompressedTest storage=File yes
+wait
+messages
+@$out ${cwd}/tmp/log1.out
+@#
+@# make some accurate tests
+@#
+run job=AccurateTest storage=File yes
+wait
+messages
+run job=AccurateTest storage=File yes
+wait
+messages
+@output
+quit
+END_OF_DATA
+
+run_bacula
+check_for_zombie_jobs storage=File
+stop_bacula
+
+check_two_logs
+
+version=`$bin/bacula-dir -? | awk '/Version:/ { print $2 }'`
+version_fd=`awk '/Version:/ { print $3 }' $tmp/log4.out`
+ 
+if [ "$version" != "$version_fd" ]; then
+    print_debug "ERROR: client version doesn't match $version ($version_fd)"
+    estat=1
+fi
+
+grep 'this is a script' $tmp/log3.out > /dev/null
+if [ $? != 0 ]; then
+    print_debug "ERROR: Can't find runscript output"
+    bstat=1
+fi
+
+$bperl -e remote_diff
+if [ $? != 0 ]; then
+    dstat=1
+fi
+
+$bperl -e remote_stop
+
+end_test


hooks/post-receive
-- 
Bacula Community source



------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 

_______________________________________________
Bacula-commits mailing list
Bacula-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-commits


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic