This is an automated email from the git hooks/post-receive script.
nsoffer pushed a commit to branch master in repository sanlock.
commit 23e23a0b4f0d7801bb4b87baaea72eea1273f8f5 Author: Amit Bawer abawer@redhat.com AuthorDate: Sun May 19 15:41:42 2019 +0300
tests: Add test calls for sanlock.get_lockspaces()
We expect to get acquired/added lockspaces details on list.
Applies to both Py2 and Py3. --- tests/python_test.py | 12 ++++++++++++ 1 file changed, 12 insertions(+)
diff --git a/tests/python_test.py b/tests/python_test.py index cfbdf9c..2d50537 100644 --- a/tests/python_test.py +++ b/tests/python_test.py @@ -305,6 +305,15 @@ def test_add_rem_lockspace(tmpdir, sanlock_daemon, size, offset): "ls_name", 1, path, offset=offset, wait=False) assert acquired is True
+ lockspaces = sanlock.get_lockspaces() + assert lockspaces == [{ + 'flags': 0, + 'host_id': 1, + 'lockspace': b'ls_name', + 'offset': offset, + 'path': path + }] + sanlock.rem_lockspace("ls_name", 1, path, offset=offset)
# Once the lockspace is released, we exepect to get False. @@ -312,6 +321,9 @@ def test_add_rem_lockspace(tmpdir, sanlock_daemon, size, offset): "ls_name", 1, path, offset=offset, wait=False) assert acquired is False
+ lockspaces = sanlock.get_lockspaces() + assert lockspaces == [] +
def test_add_rem_lockspace_async(tmpdir, sanlock_daemon): path = str(tmpdir.join("ls_name"))
sanlock-devel@lists.fedorahosted.org