Merge pull request #9441 from ThomasWaldmann/relax-recreate-cmd-test-master
Some checks failed
Lint / lint (push) Has been cancelled
CI / lint (push) Has been cancelled
CI / security (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled
CI / asan_ubsan (push) Has been cancelled
CI / native_tests (push) Has been cancelled
CI / vm_tests (Haiku, false, haiku, r1beta5) (push) Has been cancelled
CI / vm_tests (NetBSD, false, netbsd, 10.1) (push) Has been cancelled
CI / vm_tests (OmniOS, false, omnios, r151056) (push) Has been cancelled
CI / vm_tests (OpenBSD, false, openbsd, 7.7) (push) Has been cancelled
CI / vm_tests (borg-freebsd-14-x86_64-gh, FreeBSD, true, freebsd, 14.3) (push) Has been cancelled
CI / windows_tests (push) Has been cancelled

recreate_cmd_test: relax timestamp matching
This commit is contained in:
TW 2026-03-05 23:29:32 +01:00 committed by GitHub
commit 45c63ff084
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -215,7 +215,7 @@ def test_recreate_with_given_timestamp(archivers, request):
assert any([re.search(r"Time \(nominal\).+ %s" % s_time, item) for item in info])
# start/end time are just from the recreate operation
dtime = datetime.now().astimezone() # current local time
s_time = dtime.strftime("%Y-%m-%d %H:%M:.. %z").replace("+", r"\+")
s_time = dtime.strftime("%Y-%m-%d %H:..:.. %z").replace("+", r"\+")
assert any([re.search(r"Time \(end\).+ %s" % s_time, item) for item in info])
assert any([re.search(r"Time \(start\).+ %s" % s_time, item) for item in info])