Skip to content

Commit

Permalink
systemtests: enable only the used database for dbcopy
Browse files Browse the repository at this point in the history
  • Loading branch information
franku authored and pstorz committed Jan 31, 2020
1 parent 3507252 commit 3e19684
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 13 deletions.

This file was deleted.

Expand Up @@ -4,5 +4,4 @@ Client {
Address = localhost
Password = "@fd_password@" # password for FileDaemon
FD PORT = @fd_port@
catalog = "postgresql"
}
14 changes: 10 additions & 4 deletions systemtests/tests/dbcopy-mysql-postgresql-test/testrunner
Expand Up @@ -29,6 +29,9 @@ setup_data

start_test

#enable only mysql (disable postgresql)
mv "${conf}"/bareos-dir.d/catalog/postgresql.conf "${conf}"/bareos-dir.d/catalog/postgresql.conf.disabled

cat <<END_OF_DATA >$tmp/bconcmds
@$out /dev/null
messages
Expand All @@ -46,13 +49,18 @@ messages
list files jobid=1
END_OF_DATA

cp "${conf}"/bareos-dir.d/client/bareos-mysql-fd.conf.test "${conf}"/bareos-dir.d/client/bareos-fd.conf

run_bareos
stop_bareos

#enable mysql and postgresql
mv "${conf}"/bareos-dir.d/catalog/postgresql.conf.disabled "${conf}"/bareos-dir.d/catalog/postgresql.conf

#do the database copy
"${sbin}"/bareos-dbcopy -d -c ${current_test_directory}/etc/bareos mysql postgresql

#enable only postgresql (disable mysql)
mv "${conf}"/bareos-dir.d/catalog/mysql.conf "${conf}"/bareos-dir.d/catalog/mysql.conf.disabled

cat <<END_OF_DATA >$tmp/bconcmds
@#
@# now do a restore on the postgresql database
Expand All @@ -68,8 +76,6 @@ messages
list files jobid=1
END_OF_DATA

cp "${conf}"/bareos-dir.d/client/bareos-postgresql-fd.conf.test "${conf}"/bareos-dir.d/client/bareos-fd.conf

run_bareos
check_for_zombie_jobs storage=File client=bareos-fd
stop_bareos
Expand Down

0 comments on commit 3e19684

Please sign in to comment.