mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-02-18 17:00:24 +00:00
integration test for #2882
This commit is contained in:
parent
1171bf13af
commit
4f1735586d
@ -1,8 +1,8 @@
|
||||
import sys
|
||||
import time
|
||||
import shutil
|
||||
from os import mkdir, unlink, listdir
|
||||
from os.path import join, exists
|
||||
from os import mkdir, unlink, listdir, utime
|
||||
from os.path import join, exists, getmtime
|
||||
|
||||
import util
|
||||
|
||||
@ -23,6 +23,22 @@ def test_alice_writes_bob_receives(magic_folder):
|
||||
return
|
||||
|
||||
|
||||
def test_alice_writes_bob_receives_old_timestamp(magic_folder):
|
||||
alice_dir, bob_dir = magic_folder
|
||||
fname = join(alice_dir, "ts_file")
|
||||
ts = time.time() - (60 * 60 * 36) # 36 hours ago
|
||||
|
||||
with open(fname, "w") as f:
|
||||
f.write("alice wrote this")
|
||||
utime(fname, (time.time(), ts))
|
||||
|
||||
fname = join(bob_dir, "ts_file")
|
||||
util.await_file_contents(fname, "alice wrote this")
|
||||
# make sure the timestamp is correct
|
||||
assert int(getmtime(fname)) == int(ts)
|
||||
return
|
||||
|
||||
|
||||
def test_bob_writes_alice_receives(magic_folder):
|
||||
alice_dir, bob_dir = magic_folder
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user