tests: Add test that Samba cannot be started with a backup DB
authorTim Beale <timbeale@catalyst.net.nz>
Wed, 27 Jun 2018 02:06:54 +0000 (14:06 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 28 Jun 2018 01:34:26 +0000 (03:34 +0200)
commit8e58954f2f4a41baaf4007dc09b7cf9349e98077
tree4bf7598f4711bb29d96578835d29b167ea3917ff
parente88d68c253b4398eaed701d1a9bcc1b83882e127
tests: Add test that Samba cannot be started with a backup DB

We don't want users to take a backup file, and then simply untar it and
run Samba (Several modifications to the DB need to be made as part of
the restore process, so users should always run the 'backup restore'
command).

To enforce this, prime_ldb_databases() now refuses to start Samba if the
backupDate marker is present in the DB. This patch adds a test-case that
proves this basic behaviour works.

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
selftest/knownfail.d/start_backup [new file with mode: 0644]
source4/selftest/tests.py
source4/setup/tests/blackbox_start_backup.sh [new file with mode: 0755]