Skip to content
Permalink
Browse files

Merge pull request #329 from bareos/dev/pstorz/master/improved-seleni…

…um-testing

dev/pstorz/master/improved selenium testing
  • Loading branch information...
pstorz committed Nov 8, 2019
2 parents ec7a98e + c006afb commit 9f514ff38358521d63a60c33e063634a06ad2cf6
Showing with 192 additions and 118 deletions.
  1. +156 −100 systemtests/CMakeLists.txt
  2. +2 −0 systemtests/scripts/cleanup
  3. +0 −1 systemtests/tests/{webui-selenium → webui-common}/directors.ini.in
  4. 0 systemtests/tests/{webui-selenium → webui-common}/etc/bareos/bareos-dir.d/catalog/MyCatalog.conf.in
  5. 0 systemtests/tests/{webui-selenium → webui-common}/etc/bareos/bareos-dir.d/client/bareos-fd.conf.in
  6. 0 systemtests/tests/{webui-selenium → webui-common}/etc/bareos/bareos-dir.d/console/admin.conf
  7. 0 systemtests/tests/{webui-selenium → webui-common}/etc/bareos/bareos-dir.d/console/bareos-mon.conf.in
  8. 0 systemtests/tests/{webui-selenium → webui-common}/etc/bareos/bareos-dir.d/console/readonly.conf
  9. 0 ...emtests/tests/{webui-selenium → webui-common}/etc/bareos/bareos-dir.d/director/bareos-dir.conf.in
  10. 0 systemtests/tests/{webui-selenium → webui-common}/etc/bareos/bareos-dir.d/fileset/Catalog.conf
  11. 0 systemtests/tests/{webui-selenium → webui-common}/etc/bareos/bareos-dir.d/fileset/Catalog.conf.in
  12. 0 systemtests/tests/{webui-selenium → webui-common}/etc/bareos/bareos-dir.d/fileset/LinuxAll.conf
  13. 0 systemtests/tests/{webui-selenium → webui-common}/etc/bareos/bareos-dir.d/fileset/LinuxAll.conf.in
  14. 0 systemtests/tests/{webui-selenium → webui-common}/etc/bareos/bareos-dir.d/fileset/SelfTest.conf
  15. 0 systemtests/tests/{webui-selenium → webui-common}/etc/bareos/bareos-dir.d/fileset/SelfTest.conf.in
  16. 0 ...sts/tests/{webui-selenium → webui-common}/etc/bareos/bareos-dir.d/fileset/Windows All Drives.conf
  17. 0 systemtests/tests/{webui-selenium → webui-common}/etc/bareos/bareos-dir.d/job/BackupCatalog.conf.in
  18. 0 systemtests/tests/{webui-selenium → webui-common}/etc/bareos/bareos-dir.d/job/RestoreFiles.conf.in
  19. 0 ...mtests/tests/{webui-selenium → webui-common}/etc/bareos/bareos-dir.d/job/backup-bareos-fd.conf.in
  20. 0 systemtests/tests/{webui-selenium → webui-common}/etc/bareos/bareos-dir.d/jobdefs/DefaultJob.conf.in
  21. 0 systemtests/tests/{webui-selenium → webui-common}/etc/bareos/bareos-dir.d/messages/Daemon.conf.in
  22. 0 systemtests/tests/{webui-selenium → webui-common}/etc/bareos/bareos-dir.d/messages/Standard.conf.in
  23. 0 systemtests/tests/{webui-selenium → webui-common}/etc/bareos/bareos-dir.d/pool/Differential.conf
  24. 0 systemtests/tests/{webui-selenium → webui-common}/etc/bareos/bareos-dir.d/pool/Full.conf
  25. 0 systemtests/tests/{webui-selenium → webui-common}/etc/bareos/bareos-dir.d/pool/Incremental.conf
  26. 0 systemtests/tests/{webui-selenium → webui-common}/etc/bareos/bareos-dir.d/pool/Scratch.conf
  27. 0 systemtests/tests/{webui-selenium → webui-common}/etc/bareos/bareos-dir.d/profile/operator.conf
  28. 0 systemtests/tests/{webui-selenium → webui-common}/etc/bareos/bareos-dir.d/profile/webui-admin.conf
  29. +0 −1 ...emtests/tests/{webui-selenium → webui-common}/etc/bareos/bareos-dir.d/profile/webui-readonly.conf
  30. 0 systemtests/tests/{webui-selenium → webui-common}/etc/bareos/bareos-dir.d/schedule/WeeklyCycle.conf
  31. 0 ...ests/{webui-selenium → webui-common}/etc/bareos/bareos-dir.d/schedule/WeeklyCycleAfterBackup.conf
  32. 0 systemtests/tests/{webui-selenium → webui-common}/etc/bareos/bareos-dir.d/storage/File.conf.in
  33. 0 systemtests/tests/{webui-selenium → webui-common}/etc/bareos/bareos-fd.d/client/myself.conf.in
  34. 0 systemtests/tests/{webui-selenium → webui-common}/etc/bareos/bareos-fd.d/director/bareos-dir.conf.in
  35. 0 systemtests/tests/{webui-selenium → webui-common}/etc/bareos/bareos-fd.d/director/bareos-mon.conf.in
  36. 0 systemtests/tests/{webui-selenium → webui-common}/etc/bareos/bareos-fd.d/messages/Standard.conf
  37. 0 systemtests/tests/{webui-selenium → webui-common}/etc/bareos/bareos-sd.d/device/FileStorage.conf.in
  38. 0 systemtests/tests/{webui-selenium → webui-common}/etc/bareos/bareos-sd.d/director/bareos-dir.conf.in
  39. 0 systemtests/tests/{webui-selenium → webui-common}/etc/bareos/bareos-sd.d/director/bareos-mon.conf.in
  40. 0 systemtests/tests/{webui-selenium → webui-common}/etc/bareos/bareos-sd.d/messages/Standard.conf
  41. 0 systemtests/tests/{webui-selenium → webui-common}/etc/bareos/bareos-sd.d/storage/bareos-sd.conf.in
  42. 0 systemtests/tests/{webui-selenium → webui-common}/etc/bareos/bconsole.conf.in
  43. 0 ...s/tests/{webui-selenium → webui-common}/etc/bareos/tray-monitor.d/client/FileDaemon-local.conf.in
  44. 0 ...s/tests/{webui-selenium → webui-common}/etc/bareos/tray-monitor.d/director/Director-local.conf.in
  45. 0 ...mtests/tests/{webui-selenium → webui-common}/etc/bareos/tray-monitor.d/monitor/bareos-mon.conf.in
  46. 0 ...sts/{webui-selenium → webui-common}/etc/bareos/tray-monitor.d/storage/StorageDaemon-local.conf.in
  47. +4 −12 systemtests/tests/{webui-selenium → webui-common}/testrunner.in
  48. +30 −4 webui/tests/selenium/webui-selenium-test.py
@@ -22,19 +22,27 @@ project(bareos-systemtests)

cmake_policy(SET CMP0057 NEW) #IF(.. IN_LIST ..)

function(ConfigureFilesToSystemtest srcdir subdirectory globexpression configure_option)
function(ConfigureFilesToSystemtest srcbasedir dirname globexpression configure_option srcdirname)
if (srcdirname STREQUAL "")
set(srcdirname "${dirname}" )
message ("srcdirname empty setting to ${dirname}")
else()
message ("srcdirname given as ${srcdirname}, using it as sourcedir")
endif()
message ("srcdirname is ${srcdirname}")
set(count 1)
file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/${subdirectory})
file(GLOB_RECURSE ALL_FILES "${CMAKE_SOURCE_DIR}/${srcdir}/${subdirectory}/${globexpression}")
file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/${dirname})
file(GLOB_RECURSE ALL_FILES "${CMAKE_SOURCE_DIR}/${srcbasedir}/${srcdirname}/${globexpression}")
MESSAGE(STATUS "globbing in ${CMAKE_SOURCE_DIR}/${srcbasedir}/${srcdirname}/${globexpression}" )
foreach(CURRENT_FILE ${ALL_FILES})
MATH(EXPR COUNT "${COUNT}+1")
string(REPLACE "${CMAKE_SOURCE_DIR}/" "" TARGET_FILE ${CURRENT_FILE})
string(REGEX REPLACE ".in$" "" TARGET_FILE ${TARGET_FILE}) # do not mess with .ini files
#MESSAGE(STATUS "configuring ${TARGET_FILE}" )
string(REPLACE "${srcdir}/${subdirectory}" "" TARGET_FILE ${TARGET_FILE})
configure_file(${CURRENT_FILE} ${PROJECT_BINARY_DIR}/${subdirectory}/${TARGET_FILE} ${configure_option})
string(REPLACE "${srcbasedir}/${srcdirname}" "" TARGET_FILE ${TARGET_FILE})
MESSAGE(STATUS "configuring ${TARGET_FILE}" )
configure_file(${CURRENT_FILE} ${PROJECT_BINARY_DIR}/${dirname}/${TARGET_FILE} ${configure_option})
endforeach()
MESSAGE(STATUS "Configured ${COUNT} files from ${srcdir} to ${subdirectory} with glob ${globexpression} ${configure_option}" )
MESSAGE(STATUS "Configured ${COUNT} files from ${srcbasedir}/${srcdirname} to ${dirname} with glob ${globexpression} ${configure_option}" )
endfunction()

# generic function to probe for a python module
@@ -54,6 +62,79 @@ macro(CheckForEnabledAndDisabledListEntry TEST_NAME_TO_CHECK)
ENDIF()
endmacro()

macro (handle_python_plugin_modules)
IF (EXISTS ${python_plugin_module_src_test_dir})
set(PYMODULES_TO_LINK_TO_SRC
filed/bareos-fd-local-fileset.py
filed/BareosFdPluginLocalFileset.py
filed/BareosFdWrapper.py
filed/BareosFdPluginLDAP.py
filed/bareos-fd-mock-test.py
filed/BareosFdPluginBaseclass.py
filed/bareos_fd_consts.py
filed/bareos-fd-ldap.py
dird/bareos_dir_consts.py
dird/BareosDirPluginBaseclass.py
dird/bareos-dir-class-plugin.py
dird/BareosDirWrapper.py
stored/bareos_sd_consts.py
stored/bareos-sd-class-plugin.py
stored/BareosSdPluginBaseclass.py
stored/BareosSdWrapper.py
)

foreach (PYMODULE_SOURCEPATH ${PYMODULES_TO_LINK_TO_SRC})
get_filename_component(PYMODULE_NAME ${PYMODULE_SOURCEPATH} NAME)
execute_process(COMMAND
${CMAKE_COMMAND} -E create_symlink ${PROJECT_SOURCE_DIR}/../core/src/plugins/${PYMODULE_SOURCEPATH} ${python_plugin_module_src_test_dir}/${PYMODULE_NAME})
endforeach()
ENDIF()
endmacro()

macro (prepare_test)
# base directory for this test
set(current_test_directory ${PROJECT_BINARY_DIR}/tests/${TEST_NAME})
set(basename ${TEST_NAME})

#db parameters
set(db_password "")
#db_name is regress-${TEST_NAME} replacing - by _
string(REPLACE "-" "_" db_name "regress-${TEST_NAME}")
#set(db_name "regress-${TEST_NAME}")
set(db_user "regress")

set(job_email root@localhost)

set(dir_password dir_password)
set(fd_password fd_password)
set(mon_dir_password mon_dir_password)
set(mon_fd_password mon_fd_password)
set(mon_sd_password mon_sd_password)
set(sd_password sd_password)

math(EXPR dir_port "${BASEPORT} + 0")
math(EXPR fd_port "${BASEPORT} + 1")
math(EXPR sd_port "${BASEPORT} + 2")
math(EXPR sd2_port "${BASEPORT} + 3")
math(EXPR php_port "${BASEPORT} + 4")

# set(DEFAULT_DB_TYPE )
set(archivedir ${current_test_directory}/storage)
set(confdir ${current_test_directory}/etc/bareos)

set(logdir ${current_test_directory}/log)
set(tmpdir ${current_test_directory}/tmp)
set(tmp ${tmpdir})
set(working_dir ${current_test_directory}/working)
set(python_plugin_module_src_test_dir ${current_test_directory}/python-modules)

file(MAKE_DIRECTORY ${archivedir})
file(MAKE_DIRECTORY ${confdir})
file(MAKE_DIRECTORY ${logdir})
file(MAKE_DIRECTORY ${tmpdir})
file(MAKE_DIRECTORY ${working_dir})
endmacro()

# extract db version from cats.h
file(STRINGS ${CMAKE_SOURCE_DIR}/core/src/cats/cats.h DB_VERSION_STRING REGEX .*BDB_VERSION.*)
string(REGEX MATCH [0-9]+ BDB_VERSION ${DB_VERSION_STRING})
@@ -136,26 +217,26 @@ set(DB_USER @DB_USER@)
set(DB_PASS @DB_PASS@)
set(DB_VERSION @DB_VERSION@)

ConfigureFilesToSystemtest("systemtests" "data" "*.tgz" COPYONLY)
ConfigureFilesToSystemtest("systemtests" "data" "*.tgz" COPYONLY "")

ConfigureFilesToSystemtest("systemtests" "scripts" "functions" @ONLY)
ConfigureFilesToSystemtest("systemtests" "scripts" "cleanup" @ONLY)
ConfigureFilesToSystemtest("systemtests" "scripts" "setup" @ONLY)
ConfigureFilesToSystemtest("systemtests" "scripts" "check_for_zombie_jobs" @ONLY)
ConfigureFilesToSystemtest("systemtests" "scripts" "diff.pl.in" @ONLY)
ConfigureFilesToSystemtest("systemtests" "scripts" "functions" @ONLY "")
ConfigureFilesToSystemtest("systemtests" "scripts" "cleanup" @ONLY "")
ConfigureFilesToSystemtest("systemtests" "scripts" "setup" @ONLY "")
ConfigureFilesToSystemtest("systemtests" "scripts" "check_for_zombie_jobs" @ONLY "")
ConfigureFilesToSystemtest("systemtests" "scripts" "diff.pl.in" @ONLY "")

ConfigureFilesToSystemtest("core/src" "defaultconfigs" "*.conf" @ONLY)
ConfigureFilesToSystemtest("core/src" "defaultconfigs" "*.in" @ONLY)
ConfigureFilesToSystemtest("core/src" "defaultconfigs" "*.conf" @ONLY "")
ConfigureFilesToSystemtest("core/src" "defaultconfigs" "*.in" @ONLY "")

ConfigureFilesToSystemtest("core" "scripts" "*.in" @ONLY)
ConfigureFilesToSystemtest("core" "scripts" "bareos-ctl-funcs" @ONLY)
ConfigureFilesToSystemtest("core" "scripts" "btraceback.gdb" @ONLY)
ConfigureFilesToSystemtest("core" "scripts" "*.in" @ONLY "")
ConfigureFilesToSystemtest("core" "scripts" "bareos-ctl-funcs" @ONLY "")
ConfigureFilesToSystemtest("core" "scripts" "btraceback.gdb" @ONLY "")

ConfigureFilesToSystemtest("core/src/cats" "ddl" "${DEFAULT_DB_TYPE}*" @ONLY)
ConfigureFilesToSystemtest("core/src" "cats" "*.in" @ONLY)
ConfigureFilesToSystemtest("core/src" "cats" "*_bareos_*" @ONLY)
ConfigureFilesToSystemtest("core/src/cats" "ddl" "${DEFAULT_DB_TYPE}*" @ONLY "")
ConfigureFilesToSystemtest("core/src" "cats" "*.in" @ONLY "")
ConfigureFilesToSystemtest("core/src" "cats" "*_bareos_*" @ONLY "")

ConfigureFilesToSystemtest("core/src" "console" "*.in" @ONLY)
ConfigureFilesToSystemtest("core/src" "console" "*.in" @ONLY "")


file(MAKE_DIRECTORY ${subsysdir})
@@ -266,67 +347,32 @@ MESSAGE(STATUS "PYTHON_FOUND: " ${PYTHON_FOUND})
MESSAGE(STATUS "PYTHON_SELENIUM_FOUND: " ${PYTHON_SELENIUM_FOUND})
MESSAGE(STATUS "CHROMEDRIVER_FOUND: " ${CHROMEDRIVER_FOUND})


IF(ENABLE_WEBUI_SELENIUM_TEST)
list(APPEND SYSTEM_TESTS "webui-selenium")
set(WEBUI_SELENIUM_TESTS
"admin-client_disabling"
"admin-rerun_job"
"admin-restore"
"admin-run_configured_job"
"admin-run_default_job"
"readonly-client_disabling"
"readonly-rerun_job"
"readonly-restore"
"readonly-run_configured_job"
"readonly-run_default_job"
)
ELSE()
list(APPEND SYSTEM_TESTS_DISABLED "webui-selenium")
set(WEBUI_SELENIUM_TESTS
)
ENDIF()

set(BASEPORT 42001)

foreach(TEST_NAME ${SYSTEM_TESTS})
# base directory for this test
set(current_test_directory ${PROJECT_BINARY_DIR}/tests/${TEST_NAME})
set(basename ${TEST_NAME})

#db parameters
set(db_password "")
#db_name is regress-${TEST_NAME} replacing - by _
string(REPLACE "-" "_" db_name "regress-${TEST_NAME}")
#set(db_name "regress-${TEST_NAME}")
set(db_user "regress")

set(job_email root@localhost)

set(dir_password dir_password)
set(fd_password fd_password)
set(mon_dir_password mon_dir_password)
set(mon_fd_password mon_fd_password)
set(mon_sd_password mon_sd_password)
set(sd_password sd_password)

math(EXPR dir_port "${BASEPORT} + 0")
math(EXPR fd_port "${BASEPORT} + 1")
math(EXPR sd_port "${BASEPORT} + 2")
math(EXPR sd2_port "${BASEPORT} + 3")
math(EXPR php_port "${BASEPORT} + 4")

# set(DEFAULT_DB_TYPE )
set(archivedir ${current_test_directory}/storage)
set(confdir ${current_test_directory}/etc/bareos)

set(logdir ${current_test_directory}/log)
set(python_plugin_module_src_test_dir ${current_test_directory}/python-modules)
set(tmpdir ${current_test_directory}/tmp)
set(tmp ${tmpdir})
set(working_dir ${current_test_directory}/working)

file(MAKE_DIRECTORY ${archivedir})
file(MAKE_DIRECTORY ${confdir})
file(MAKE_DIRECTORY ${logdir})
file(MAKE_DIRECTORY ${tmpdir})
file(MAKE_DIRECTORY ${working_dir})

# webui-selenium
IF(${TEST_NAME} STREQUAL "webui-selenium")
set(WEBUICONFDIR ${current_test_directory}/etc/bareos-webui) #used for testenvironment settings
file(MAKE_DIRECTORY ${WEBUICONFDIR})
configure_file("${CMAKE_SOURCE_DIR}/webui/config/autoload/global.php.in" "${current_test_directory}/webui/config/autoload/global.php" @ONLY)
configure_file("${CMAKE_SOURCE_DIR}/systemtests/tests/webui-selenium/directors.ini.in" "${current_test_directory}/etc/bareos-webui/directors.ini" @ONLY)
file(COPY "${CMAKE_SOURCE_DIR}/webui/install/configuration.ini" DESTINATION "${current_test_directory}/etc/bareos-webui/")
ENDIF()
prepare_test()

ConfigureFilesToSystemtest("systemtests" "tests/${TEST_NAME}" "*" @ONLY)
ConfigureFilesToSystemtest("systemtests" "tests/${TEST_NAME}" "*" @ONLY "")

configure_file("environment.in" "tests/${TEST_NAME}/environment" @ONLY)
# create a bin/bareos and bin/bconsole script
@@ -335,32 +381,6 @@ foreach(TEST_NAME ${SYSTEM_TESTS})
configure_file("bin/bconsole" "tests/${TEST_NAME}/bin/bconsole" COPYONLY)
configure_file("bin/bareos" "tests/${TEST_NAME}/bin/bareos" COPYONLY)

IF (EXISTS ${python_plugin_module_src_test_dir})
set(PYMODULES_TO_LINK_TO_SRC
filed/bareos-fd-local-fileset.py
filed/BareosFdPluginLocalFileset.py
filed/BareosFdWrapper.py
filed/BareosFdPluginLDAP.py
filed/bareos-fd-mock-test.py
filed/BareosFdPluginBaseclass.py
filed/bareos_fd_consts.py
filed/bareos-fd-ldap.py
dird/bareos_dir_consts.py
dird/BareosDirPluginBaseclass.py
dird/bareos-dir-class-plugin.py
dird/BareosDirWrapper.py
stored/bareos_sd_consts.py
stored/bareos-sd-class-plugin.py
stored/BareosSdPluginBaseclass.py
stored/BareosSdWrapper.py
)

foreach (PYMODULE_SOURCEPATH ${PYMODULES_TO_LINK_TO_SRC})
get_filename_component(PYMODULE_NAME ${PYMODULE_SOURCEPATH} NAME)
execute_process(COMMAND
${CMAKE_COMMAND} -E create_symlink ${PROJECT_SOURCE_DIR}/../core/src/plugins/${PYMODULE_SOURCEPATH} ${python_plugin_module_src_test_dir}/${PYMODULE_NAME})
endforeach()
ENDIF()

CheckForEnabledAndDisabledListEntry(${TEST_NAME})

@@ -372,6 +392,42 @@ foreach(TEST_NAME ${SYSTEM_TESTS})

endforeach()

# webui specific settings
IF(ENABLE_WEBUI_SELENIUM_TEST)
foreach(TEST_NAME ${WEBUI_SELENIUM_TESTS})

prepare_test()
handle_python_plugin_modules()
# split WEBUI_TEST_NAME into PROFILE and TESTNAME
string(REPLACE "-" ";" SELENIUM_TESTCOMPONENTS ${TEST_NAME})
#"webui-admin-restore"
list(GET SELENIUM_TESTCOMPONENTS 0 BAREOS_WEBUI_PROFILE)
list(GET SELENIUM_TESTCOMPONENTS 1 BAREOS_WEBUI_TESTNAME)

set(WEBUICONFDIR ${current_test_directory}/etc/bareos-webui) # used for testenvironment settings
file(MAKE_DIRECTORY ${WEBUICONFDIR})
configure_file("${CMAKE_SOURCE_DIR}/webui/config/autoload/global.php.in" "${current_test_directory}/webui/config/autoload/global.php" @ONLY)
configure_file("${CMAKE_SOURCE_DIR}/systemtests/tests/webui-common/directors.ini.in" "${current_test_directory}/etc/bareos-webui/directors.ini" @ONLY)
file(COPY "${CMAKE_SOURCE_DIR}/webui/install/configuration.ini" DESTINATION "${current_test_directory}/etc/bareos-webui/")
configure_file("${CMAKE_SOURCE_DIR}/systemtests/tests/webui-common/testrunner.in" "${current_test_directory}/testrunner" @ONLY)
ConfigureFilesToSystemtest("systemtests" "tests/${TEST_NAME}" "*" @ONLY "tests/webui-common")
configure_file("environment.in" "tests/${TEST_NAME}/environment" @ONLY)
# create a bin/bareos and bin/bconsole script
# in every testdir for start/stop and bconsole
#file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/tests/${TEST_NAME}/bin")
configure_file("bin/bconsole" "tests/${TEST_NAME}/bin/bconsole" COPYONLY)
configure_file("bin/bareos" "tests/${TEST_NAME}/bin/bareos" COPYONLY)

CheckForEnabledAndDisabledListEntry(${TEST_NAME})

add_test(NAME "webui:${TEST_NAME}" COMMAND ${tests_dir}/${TEST_NAME}/testrunner WORKING_DIRECTORY ${tests_dir}/${TEST_NAME})
math(EXPR BASEPORT "${BASEPORT} + 10")
endforeach()
ENDIF()




foreach(TEST_NAME_DISABLED ${SYSTEM_TESTS_DISABLED})
CheckForEnabledAndDisabledListEntry(${TEST_NAME_DISABLED})
add_test(NAME system:${TEST_NAME_DISABLED} COMMAND empty_command)
@@ -25,6 +25,8 @@ find . -name "gigaslam.gif" -exec rm -f {} \;
#rm -rf ${conf}/bareos-dir-export/
#rm -rf ${conf}/tls/

# cleanup chrome user data (selenium tests)
rm -rf /tmp/chrome-user-data-*

#if [ -f ${scripts}/bareos ]; then
# ${scripts}/bareos stop 2>&1 >/dev/null
@@ -79,4 +79,3 @@ dirport = 9101
;cert_file = ""
;cert_file_passphrase = ""
;allowed_cns = ""

@@ -35,4 +35,3 @@ Profile {
# Allow access to restore to any filesystem location
Where ACL = *all*
}

@@ -45,18 +45,10 @@ PHP_PID=$(echo $!)
#
# test with admin profile resource
#
export BAREOS_WEBUI_PROFILE=admin
echo "test with admin profile:" >"$tmp/selenium.out" 2>&1
@PYTHON@ @CMAKE_SOURCE_DIR@/webui/tests/selenium/webui-selenium-test.py --fail >>"$tmp/selenium.out" 2>&1

#
# test with readonly profile resource
#
export BAREOS_WEBUI_USERNAME=readonly
export BAREOS_WEBUI_PASSWORD=readonly
export BAREOS_WEBUI_PROFILE=readonly
echo "test with readonly profile:" >>"$tmp/selenium.out" 2>&1
@PYTHON@ @CMAKE_SOURCE_DIR@/webui/tests/selenium/webui-selenium-test.py --fail >>"$tmp/selenium.out" 2>&1
export BAREOS_WEBUI_PROFILE=@BAREOS_WEBUI_PROFILE@
export BAREOS_WEBUI_TESTNAME=@BAREOS_WEBUI_TESTNAME@
echo "test with ${BAREOS_WEBUI_PROFILE} profile:" >"$tmp/selenium.out" 2>&1
@PYTHON@ @CMAKE_SOURCE_DIR@/webui/tests/selenium/webui-selenium-test.py -v "SeleniumTest.test_${BAREOS_WEBUI_TESTNAME}" | tee "$tmp/selenium.out" 2>&1

estat=$?
export estat

0 comments on commit 9f514ff

Please sign in to comment.
You can’t perform that action at this time.