Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
systemtests: devide webui selenium test into several individual tests
- Loading branch information
1 parent
ec7a98e
commit 186b227
Showing
453 changed files
with
5,914 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -79,4 +79,3 @@ dirport = 9101 | |
;cert_file = "" | ||
;cert_file_passphrase = "" | ||
;allowed_cns = "" | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,4 +35,3 @@ Profile { | |
# Allow access to restore to any filesystem location | ||
Where ACL = *all* | ||
} | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
60 changes: 60 additions & 0 deletions
60
systemtests/tests/webui-admin-client-disabling/testrunner.in
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
#!/bin/sh | ||
# | ||
# Run a simple backup | ||
# then restore it. | ||
# | ||
TestName="$(basename "$(pwd)")" | ||
export TestName | ||
|
||
JobName=backup-bareos-fd | ||
. ./environment | ||
. ${scripts}/functions | ||
|
||
${scripts}/cleanup | ||
${scripts}/setup | ||
|
||
|
||
# Directory to backup. | ||
# This directory will be created by setup_data(). | ||
BackupDirectory="${tmp}/data" | ||
|
||
# Use a tgz to setup data to be backed up. | ||
# Data will be placed at "${tmp}/data/". | ||
setup_data | ||
|
||
start_test | ||
|
||
cat <<END_OF_DATA >$tmp/bconcmds | ||
@$out /dev/null | ||
messages | ||
@$out $tmp/log1.out | ||
run job=$JobName yes | ||
wait | ||
messages | ||
quit | ||
END_OF_DATA | ||
|
||
run_bareos | ||
|
||
@PHP@ -S 127.0.0.1:@php_port@ -t @PROJECT_SOURCE_DIR@/../webui/public/ >"$tmp/php.out" 2>&1 & | ||
|
||
PHP_PID=$(echo $!) | ||
|
||
# run tests but stop the test run on the first error or failure | ||
|
||
# | ||
# test with admin profile resource | ||
# | ||
export BAREOS_WEBUI_PROFILE=admin | ||
export BAREOS_WEBUI_TESTNAME=test_client_disabling | ||
echo "test with admin profile:" >"$tmp/selenium.out" 2>&1 | ||
@PYTHON@ @CMAKE_SOURCE_DIR@/webui/tests/selenium/webui-selenium-test.py -v SeleniumTest.test_client_disabling >>"$tmp/selenium.out" 2>&1 | ||
|
||
estat=$? | ||
export estat | ||
|
||
kill "${PHP_PID}" | ||
|
||
stop_bareos | ||
|
||
end_test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
; | ||
; Bareos WebUI Configuration File | ||
; | ||
; File: /usr/local/etc/bareos-webui/directors.ini | ||
; | ||
|
||
;------------------------------------------------------------------------------ | ||
; Section localhost-dir | ||
;------------------------------------------------------------------------------ | ||
[localhost-dir] | ||
|
||
; Enable or disable section. Possible values are "yes" or "no", the default is "yes". | ||
enabled = "yes" | ||
|
||
; Fill in the IP-Address or FQDN of you director. | ||
diraddress = "localhost" | ||
|
||
; Default value is 9101 | ||
dirport = @dir_port@ | ||
|
||
; Set catalog to explicit value if you have multiple catalogs | ||
;catalog = "MyCatalog" | ||
|
||
; Set the console name and password for a dedicated pam console; | ||
; the counterpart console-config in the director must have set | ||
; UsePamAuthentication = yes | ||
;pam_console_name = "admin" | ||
;pam_console_password = "admin" | ||
|
||
; TLS verify peer | ||
; Possible values: true or false | ||
tls_verify_peer = false | ||
|
||
; Server can do TLS | ||
; Possible values: true or false | ||
server_can_do_tls = false | ||
|
||
; Server requires TLS | ||
; Possible values: true or false | ||
server_requires_tls = false | ||
|
||
; Client can do TLS | ||
; Possible values: true or false | ||
client_can_do_tls = false | ||
|
||
; Client requires TLS | ||
; Possible value: true or false | ||
client_requires_tls = false | ||
|
||
; Path to the certificate authority file | ||
; E.g. ca_file = "/usr/local/etc/bareos/tls/BareosCA.crt" | ||
;ca_file = "" | ||
|
||
; Path to the cert file which needs to contain the client certificate and the key in PEM encoding | ||
; E.g. ca_file = "/usr/local/etc/bareos/tls/restricted-named-console.pem" | ||
;cert_file = "" | ||
|
||
; Passphrase needed to unlock the above cert file if set | ||
;cert_file_passphrase = "" | ||
|
||
; Allowed common names | ||
; E.g. allowed_cns = "host1.example.com" | ||
;allowed_cns = "" | ||
|
||
;------------------------------------------------------------------------------ | ||
; Section another-host-dir | ||
;------------------------------------------------------------------------------ | ||
[another-host-dir] | ||
enabled = "no" | ||
diraddress = "192.168.120.1" | ||
dirport = 9101 | ||
;catalog = "MyCatalog" | ||
;tls_verify_peer = false | ||
;server_can_do_tls = false | ||
;server_requires_tls = false | ||
;client_can_do_tls = false | ||
;client_requires_tls = false | ||
;ca_file = "" | ||
;cert_file = "" | ||
;cert_file_passphrase = "" | ||
;allowed_cns = "" |
8 changes: 8 additions & 0 deletions
8
systemtests/tests/webui-admin-rerun-job/etc/bareos/bareos-dir.d/catalog/MyCatalog.conf.in
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Catalog { | ||
Name = MyCatalog | ||
#dbdriver = "@DEFAULT_DB_TYPE@" | ||
dbdriver = "XXX_REPLACE_WITH_DATABASE_DRIVER_XXX" | ||
dbname = "@db_name@" | ||
dbuser = "@db_user@" | ||
dbpassword = "@db_password@" | ||
} |
7 changes: 7 additions & 0 deletions
7
systemtests/tests/webui-admin-rerun-job/etc/bareos/bareos-dir.d/client/bareos-fd.conf.in
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Client { | ||
Name = bareos-fd | ||
Description = "Client resource of the Director itself." | ||
Address = localhost | ||
Password = "@fd_password@" # password for FileDaemon | ||
FD PORT = @fd_port@ | ||
} |
17 changes: 17 additions & 0 deletions
17
systemtests/tests/webui-admin-rerun-job/etc/bareos/bareos-dir.d/console/admin.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# | ||
# Restricted console used by bareos-webui | ||
# | ||
Console { | ||
Name = admin | ||
Password = "admin" | ||
Profile = "webui-admin" | ||
|
||
|
||
# As php does not support TLS-PSK, | ||
# and the director has TLS enabled by default, | ||
# we need to either disable TLS or setup | ||
# TLS with certificates. | ||
# | ||
# For testing purposes we disable it here | ||
TLS Enable = No | ||
} |
7 changes: 7 additions & 0 deletions
7
systemtests/tests/webui-admin-rerun-job/etc/bareos/bareos-dir.d/console/bareos-mon.conf.in
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Console { | ||
Name = bareos-mon | ||
Description = "Restricted console used by tray-monitor to get the status of the director." | ||
Password = "@mon_dir_password@" | ||
CommandACL = status, .status | ||
JobACL = *all* | ||
} |
17 changes: 17 additions & 0 deletions
17
systemtests/tests/webui-admin-rerun-job/etc/bareos/bareos-dir.d/console/readonly.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# | ||
# Restricted console used by bareos-webui | ||
# | ||
Console { | ||
Name = readonly | ||
Password = "readonly" | ||
Profile = "webui-readonly" | ||
|
||
|
||
# As php does not support TLS-PSK, | ||
# and the director has TLS enabled by default, | ||
# we need to either disable TLS or setup | ||
# TLS with certificates. | ||
# | ||
# For testing purposes we disable it here | ||
TLS Enable = No | ||
} |
27 changes: 27 additions & 0 deletions
27
systemtests/tests/webui-admin-rerun-job/etc/bareos/bareos-dir.d/director/bareos-dir.conf.in
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
Director { # define myself | ||
Name = bareos-dir | ||
QueryFile = "@scriptdir@/query.sql" | ||
Maximum Concurrent Jobs = 10 | ||
Password = "@dir_password@" # Console password | ||
Messages = Daemon | ||
Auditing = yes | ||
|
||
# Enable the Heartbeat if you experience connection losses | ||
# (eg. because of your router or firewall configuration). | ||
# Additionally the Heartbeat can be enabled in bareos-sd and bareos-fd. | ||
# | ||
# Heartbeat Interval = 1 min | ||
|
||
# remove comment in next line to load dynamic backends from specified directory | ||
Backend Directory = @backenddir@ | ||
|
||
# remove comment from "Plugin Directory" to load plugins from specified directory. | ||
# if "Plugin Names" is defined, only the specified plugins will be loaded, | ||
# otherwise all director plugins (*-dir.so) from the "Plugin Directory". | ||
# | ||
# Plugin Directory = "@python_plugin_module_src_dir@" | ||
# Plugin Names = "" | ||
Working Directory = "@working_dir@" | ||
Pid Directory = "@piddir@" | ||
DirPort = @dir_port@ | ||
} |
11 changes: 11 additions & 0 deletions
11
systemtests/tests/webui-admin-rerun-job/etc/bareos/bareos-dir.d/fileset/Catalog.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
FileSet { | ||
Name = "Catalog" | ||
Description = "Backup the catalog dump and Bareos configuration files." | ||
Include { | ||
Options { | ||
signature = MD5 | ||
} | ||
File = "/var/lib/bareos/bareos.sql" # database dump | ||
File = "/usr/local/etc/bareos" # configuration | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
systemtests/tests/webui-admin-rerun-job/etc/bareos/bareos-dir.d/fileset/Catalog.conf.in
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
FileSet { | ||
Name = "Catalog" | ||
Description = "Backup the catalog dump and Bareos configuration files." | ||
Include { | ||
Options { | ||
signature = MD5 | ||
} | ||
File = "@working_dir@/@db_name@.sql" # database dump | ||
File = "@confdir@" # configuration | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
systemtests/tests/webui-admin-rerun-job/etc/bareos/bareos-dir.d/fileset/LinuxAll.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
FileSet { | ||
Name = "LinuxAll" | ||
Description = "Backup all regular filesystems, determined by filesystem type." | ||
Include { | ||
Options { | ||
Signature = MD5 # calculate md5 checksum per file | ||
One FS = No # change into other filessytems | ||
FS Type = btrfs | ||
FS Type = ext2 # filesystems of given types will be backed up | ||
FS Type = ext3 # others will be ignored | ||
FS Type = ext4 | ||
FS Type = reiserfs | ||
FS Type = jfs | ||
FS Type = xfs | ||
FS Type = zfs | ||
} | ||
File = / | ||
} | ||
# Things that usually have to be excluded | ||
# You have to exclude /var/lib/bareos/storage | ||
# on your bareos server | ||
Exclude { | ||
File = /var/lib/bareos | ||
File = /var/lib/bareos/storage | ||
File = /proc | ||
File = /tmp | ||
File = /var/tmp | ||
File = /.journal | ||
File = /.fsck | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
systemtests/tests/webui-admin-rerun-job/etc/bareos/bareos-dir.d/fileset/LinuxAll.conf.in
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
FileSet { | ||
Name = "LinuxAll" | ||
Description = "Backup all regular filesystems, determined by filesystem type." | ||
Include { | ||
Options { | ||
Signature = MD5 # calculate md5 checksum per file | ||
One FS = No # change into other filessytems | ||
FS Type = btrfs | ||
FS Type = ext2 # filesystems of given types will be backed up | ||
FS Type = ext3 # others will be ignored | ||
FS Type = ext4 | ||
FS Type = reiserfs | ||
FS Type = jfs | ||
FS Type = xfs | ||
FS Type = zfs | ||
} | ||
File = / | ||
} | ||
# Things that usually have to be excluded | ||
# You have to exclude @archivedir@ | ||
# on your bareos server | ||
Exclude { | ||
File = @working_dir@ | ||
File = @archivedir@ | ||
File = /proc | ||
File = /tmp | ||
File = /var/tmp | ||
File = /.journal | ||
File = /.fsck | ||
} | ||
} |
Oops, something went wrong.