mirror of
https://github.com/samba-team/samba.git
synced 2025-01-26 10:04:02 +03:00
ctdb-tests: Make date handling consistent in 00.ctdb tests
This duplicates the filter function but that will be fixed later. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This commit is contained in:
parent
3571345667
commit
e4a4532e5c
@ -8,15 +8,22 @@ setup_ctdb
|
||||
|
||||
FAKE_TDBTOOL_SUPPORTS_CHECK="yes"
|
||||
|
||||
result_filter ()
|
||||
{
|
||||
_date="[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]"
|
||||
_time="[0-9][0-9][0-9][0-9][0-9][0-9]"
|
||||
_nanos="[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]"
|
||||
_date_time="${_date}\.${_time}\.${_nanos}"
|
||||
sed -e "s|\.${_date_time}\.|.DATE.TIME.|"
|
||||
}
|
||||
|
||||
db="${CTDB_DBDIR}/foo.tdb.0"
|
||||
touch "$db"
|
||||
FAKE_TDB_IS_OK="no"
|
||||
|
||||
FAKE_DATE_OUTPUT="19690818.103000.000000001"
|
||||
|
||||
ok <<EOF
|
||||
WARNING: database ${db} is corrupted.
|
||||
Moving to backup ${db}.${FAKE_DATE_OUTPUT}.corrupt for later analysis.
|
||||
Moving to backup ${db}.DATE.TIME.corrupt for later analysis.
|
||||
EOF
|
||||
|
||||
simple_test
|
||||
|
@ -8,18 +8,25 @@ setup_ctdb
|
||||
|
||||
FAKE_TDBTOOL_SUPPORTS_CHECK="no"
|
||||
|
||||
result_filter ()
|
||||
{
|
||||
_date="[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]"
|
||||
_time="[0-9][0-9][0-9][0-9][0-9][0-9]"
|
||||
_nanos="[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]"
|
||||
_date_time="${_date}\.${_time}\.${_nanos}"
|
||||
sed -e "s|\.${_date_time}\.|.DATE.TIME.|"
|
||||
}
|
||||
|
||||
db="${CTDB_DBDIR}/foo.tdb.0"
|
||||
touch "$db"
|
||||
FAKE_TDB_IS_OK="no"
|
||||
|
||||
FAKE_DATE_OUTPUT="19690818.103000.000000001"
|
||||
|
||||
ok <<EOF
|
||||
WARNING: The installed 'tdbtool' does not offer the 'check' subcommand.
|
||||
Using 'tdbdump' for database checks.
|
||||
Consider updating 'tdbtool' for better checks!
|
||||
WARNING: database ${db} is corrupted.
|
||||
Moving to backup ${db}.${FAKE_DATE_OUTPUT}.corrupt for later analysis.
|
||||
Moving to backup ${db}.DATE.TIME.corrupt for later analysis.
|
||||
EOF
|
||||
|
||||
simple_test
|
||||
|
Loading…
x
Reference in New Issue
Block a user