Commit 8e958049 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent f1f95d3e
...@@ -90,36 +90,34 @@ def test_zurlstable(): ...@@ -90,36 +90,34 @@ def test_zurlstable():
zstor.close() zstor.close()
assert zurl == testzurl assert zurl == testzurl
@func
def test_join(): def test_join():
zurl = testzurl zurl = testzurl
with raises(RuntimeError, match="wcfs: join .*: server not started"): with raises(RuntimeError, match="wcfs: join .*: server not started"):
wcfs.join(zurl, autostart=False) wcfs.join(zurl, autostart=False)
wc = wcfs._start(zurl) wc = wcfs._start(zurl)
defer(wc.close)
assert wc.mountpoint == testmntpt assert wc.mountpoint == testmntpt
assert readfile(wc.mountpoint + "/.wcfs") == zurl assert readfile(wc.mountpoint + "/.wcfs") == zurl
assert os.path.isdir(wc.mountpoint + "/bigfile") assert os.path.isdir(wc.mountpoint + "/bigfile")
wc2 = wcfs.join(zurl, autostart=False) wc2 = wcfs.join(zurl, autostart=False)
defer(wc2.close)
assert wc2.mountpoint == wc.mountpoint assert wc2.mountpoint == wc.mountpoint
wc.close() @func
wc2.close()
def test_join_autostart(): def test_join_autostart():
zurl = testzurl zurl = testzurl
with raises(RuntimeError, match="wcfs: join .*: server not started"): with raises(RuntimeError, match="wcfs: join .*: server not started"):
wcfs.join(zurl, autostart=False) wcfs.join(zurl, autostart=False)
wc = wcfs.join(zurl, autostart=True) wc = wcfs.join(zurl, autostart=True)
defer(wc.close)
assert wc.mountpoint == testmntpt assert wc.mountpoint == testmntpt
assert readfile(wc.mountpoint + "/.wcfs") == zurl assert readfile(wc.mountpoint + "/.wcfs") == zurl
assert os.path.isdir(wc.mountpoint + "/bigfile") assert os.path.isdir(wc.mountpoint + "/bigfile")
wc.close()
# XXX parametrize zblk0, zblk1 # XXX parametrize zblk0, zblk1
# XXX select !wcfs mode so that we prepare data through !wcfs path. # XXX select !wcfs mode so that we prepare data through !wcfs path.
...@@ -178,6 +176,7 @@ def test_bigfile_empty(): ...@@ -178,6 +176,7 @@ def test_bigfile_empty():
tidlast = last._p_serial tidlast = last._p_serial
# XXX force sync of wcfs - how? # XXX force sync of wcfs - how?
wcsync(wc)
fsize = 10*blksize + len(s) # trailing \0 not counted XXX ok? -> XXX not ok fsize = 10*blksize + len(s) # trailing \0 not counted XXX ok? -> XXX not ok
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment