[sanlock] 03/03: spec: Keep sanlock-python on centos/rhel
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
teigland pushed a commit to branch master
in repository sanlock.
commit 5992a89f2e538be3010e435994f37671861fddd3
Author: Nir Soffer <nirsof(a)gmail.com>
AuthorDate: Sat Apr 13 18:32:36 2019 +0300
spec: Keep sanlock-python on centos/rhel
On fedora we switched to python2-sanlock as part of python 3 porting but
on rhel we still build the package as sanlock-python. Change the spec so
we keep the name used by the distribution.
Signed-off-by: Nir Soffer <nsoffer(a)redhat.com>
---
sanlock.spec.in | 25 ++++++++++++++++++-------
1 file changed, 18 insertions(+), 7 deletions(-)
diff --git a/sanlock.spec.in b/sanlock.spec.in
index 8bc80aa..c31599d 100644
--- a/sanlock.spec.in
+++ b/sanlock.spec.in
@@ -25,6 +25,15 @@ Requires(preun): systemd-units
Requires(postun): systemd-units
Source0: https://releases.pagure.org/sanlock/%{name}-%{version}.tar.gz
+# On Fedora we switched sanlock-python to python2-sanlock, as part of python 3
+# porting. This change was not done yet for RHEL.
+# TODO: remove when RHEL switches to pythonN-sanlock.
+%if 0%{?fedora}
+%global python_package python2-%{name}
+%else # centos/rhel
+%global python_package %{name}-python
+%endif
+
%description
The sanlock daemon manages leases for applications on hosts using shared storage.
@@ -127,21 +136,23 @@ access to the shared disks.
%{_libdir}/libsanlock_client.so.*
%{_libdir}/libwdmd.so.*
-%package -n python2-sanlock
-%{?python_provide:%python_provide python2-sanlock}
+%package -n %{python_package}
+Summary: Python bindings for the sanlock library
+Requires: %{name}-lib = %{version}-%{release}
+%if 0%{?fedora}
+%{?python_provide:%python_provide python2-%{name}}
# Remove before F30
Provides: %{name}-python = %{version}-%{release}
Provides: %{name}-python%{?_isa} = %{version}-%{release}
Obsoletes: %{name}-python < %{version}-%{release}
-Summary: Python bindings for the sanlock library
-Requires: %{name}-lib = %{version}-%{release}
+%endif # fedora
-%description -n python2-sanlock
-The %{name}-python package contains a module that permits applications
+%description -n %{python_package}
+The %{python_package} package contains a module that permits applications
written in the Python programming language to use the interface
supplied by the sanlock library.
-%files -n python2-sanlock
+%files -n %{python_package}
%{python2_sitearch}/sanlock_python-*.egg-info
%{python2_sitearch}/sanlock.so
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
5 years
[sanlock] 02/03: spec: Clean up the spec
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
teigland pushed a commit to branch master
in repository sanlock.
commit e0ff0080409de79299b5b823c6b134601e03ca05
Author: Nir Soffer <nirsof(a)gmail.com>
AuthorDate: Sat Apr 13 18:32:35 2019 +0300
spec: Clean up the spec
- Add note about using this spec only for development
- Remove irrelevant changelog entries. This spec started when we imported
it from Fedora.
Signed-off-by: Nir Soffer <nsoffer(a)redhat.com>
---
sanlock.spec.in | 116 ++++++--------------------------------------------------
1 file changed, 11 insertions(+), 105 deletions(-)
diff --git a/sanlock.spec.in b/sanlock.spec.in
index 0bd9e34..8bc80aa 100644
--- a/sanlock.spec.in
+++ b/sanlock.spec.in
@@ -1,3 +1,11 @@
+# NOTE: this spec should be used only for developmemnt.
+#
+# To find the real sanlock spec use:
+# - Fedora: fedpkg clone sanlock
+# - RHEL: rhpkg clone sanlock
+#
+# This spec was created from Fedora spec and modified to work on CentOS.
+
Name: sanlock
Version: @VERSION@
Release: @RELEASE@%{?dist}
@@ -178,108 +186,6 @@ common sanlock lockspace.
%changelog
-* Wed Mar 20 2019 Nir Soffer <nsoffer(a)redhat.com> - 3.7.0-1
-- remove unneeded with_systemd macro
-- update to sanlock 3.7.0
-
-* Sat Feb 2 2019 Nir Soffer <nsoffer(a)redhat.com> - 3.6.0-8
-- fix build on Fedora rawhide
-
-* Thu Jan 24 2019 David Teigland <teigland(a)redhat.com> - 3.6.0-7
-- lockfile ownership
-
-* Sat Jul 14 2018 Fedora Release Engineering <releng(a)fedoraproject.org> - 3.6.0-6
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
-
-* Thu Apr 12 2018 Iryna Shcherbina <shcherbina.iryna(a)gmail.com> - 3.6.0-5
-- Update Python 2 dependency declarations to new packaging standards
- (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
-
-* Wed Mar 14 2018 David Teigland <teigland(a)redhat.com> - 3.6.0-4
-- change makefile flags
-
-* Wed Mar 14 2018 David Teigland <teigland(a)redhat.com> - 3.6.0-3
-- rebuild with set_build_flags
-
-* Fri Feb 09 2018 Fedora Release Engineering <releng(a)fedoraproject.org> - 3.6.0-2
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
-
-* Tue Dec 12 2017 David Teigland <teigland(a)redhat.com> - 3.6.0-1
-- Update to sanlock-3.6.0, drop fence_sanlock
-
-* Sun Aug 20 2017 Zbigniew Jędrzejewski-Szmek <zbyszek(a)in.waw.pl> - 3.5.0-6
-- Add Provides for the old name without %%_isa
-
-* Sun Aug 20 2017 Zbigniew Jędrzejewski-Szmek <zbyszek(a)in.waw.pl> - 3.5.0-5
-- Add Provides for the old name without %%_isa
-
-* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek <zbyszek(a)in.waw.pl> - 3.5.0-4
-- Python 2 binary package renamed to python2-sanlock
- See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
-
-* Thu Aug 03 2017 Fedora Release Engineering <releng(a)fedoraproject.org> - 3.5.0-3
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
-
-* Thu Jul 27 2017 Fedora Release Engineering <releng(a)fedoraproject.org> - 3.5.0-2
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
-
-* Mon May 01 2017 David Teigland <teigland(a)redhat.com> - 3.5.0-1
-- Update to sanlock-3.5.0
-
-* Sat Feb 11 2017 Fedora Release Engineering <releng(a)fedoraproject.org> - 3.4.0-3
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
-
-* Tue Jul 19 2016 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 3.4.0-2
-- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_...
-
-* Fri Jun 10 2016 David Teigland <teigland(a)redhat.com> - 3.4.0-1
-- Update to sanlock-3.4.0
-
-* Tue Feb 23 2016 David Teigland <teigland(a)redhat.com> - 3.3.0-2
-- remove exclusive arch
-
-* Mon Feb 22 2016 David Teigland <teigland(a)redhat.com> - 3.3.0-1
-- Update to sanlock-3.3.0
-
-* Tue Dec 01 2015 David Teigland <teigland(a)redhat.com> - 3.2.4-2
-- wdmd: prevent probe while watchdog is used
-
-* Fri Jun 19 2015 David Teigland <teigland(a)redhat.com> - 3.2.4-1
-- Update to sanlock-3.2.4
-
-* Fri May 22 2015 David Teigland <teigland(a)redhat.com> - 3.2.3-2
-- add pkgconfig files
-
-* Wed May 20 2015 David Teigland <teigland(a)redhat.com> - 3.2.3-1
-- Update to sanlock-3.2.3
-
-* Thu Oct 30 2014 David Teigland <teigland(a)redhat.com> - 3.2.2-2
-- checksum endian fix
-
-* Mon Sep 29 2014 David Teigland <teigland(a)redhat.com> - 3.2.2-1
-- Update to sanlock-3.2.2
-
-* Thu Aug 21 2014 David Teigland <teigland(a)redhat.com> - 3.2.1-1
-- Update to sanlock-3.2.1
-
-* Mon Aug 18 2014 David Teigland <teigland(a)redhat.com> - 3.2.0-1
-- Update to sanlock-3.2.0
-
-* Wed Jan 29 2014 David Teigland <teigland(a)redhat.com> - 3.1.0-2
-- version interface
-
-* Tue Jan 07 2014 David Teigland <teigland(a)redhat.com> - 3.1.0-1
-- Update to sanlock-3.1.0
-
-* Fri Dec 27 2013 Daniel Mach <dmach(a)redhat.com> - 3.0.1-3
-- Mass rebuild 2013-12-27
-
-* Thu Aug 01 2013 David Teigland <teigland(a)redhat.com> - 3.0.1-2
-- use /usr/lib instead of /lib
-
-* Wed Jul 31 2013 David Teigland <teigland(a)redhat.com> - 3.0.1-1
-- Update to sanlock-3.0.1
-
-* Wed Jul 24 2013 David Teigland <teigland(a)redhat.com> - 3.0.0-1
-- Update to sanlock-3.0.0
-
+* Mon Mar 25 2019 Nir Soffer <nsoffer(a)redhat.com> - 3.7.0-1
+- Import spec from Fedora master branch (371e11a)
+- Fix spec to work on CentOS (20efe91)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
5 years
[sanlock] 01/03: travis: Remove GCC 8 requirement
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
teigland pushed a commit to branch master
in repository sanlock.
commit eb37638d9f0446af882098921e2ffd7a72f6c7c7
Author: Nir Soffer <nirsof(a)gmail.com>
AuthorDate: Sat Apr 13 16:07:39 2019 +0300
travis: Remove GCC 8 requirement
Now that we have runtime check for -fstack-clash-protection we don't
need GCC 8 and we can save the time to download and install it on every
build, and simplify the build configuration.
While removing gcc-8, switch the dependencies to declarative style using
the apt addon.
Signed-off-by: Nir Soffer <nsoffer(a)redhat.com>
---
.travis.yml | 14 ++++----------
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index 37643f4..7c1749c 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -4,17 +4,11 @@ python: 2.7
addons:
apt:
- sources:
- - ubuntu-toolchain-r-test
packages:
- - gcc-8
-
-before_install:
- - sudo apt-get -qq update
- - sudo apt-get install -y make gcc libaio-dev libblkid-dev
-
-env:
- - CC="gcc-8"
+ - gcc
+ - libaio-dev
+ - libblkid-dev
+ - make
script:
- make BUILDARGS="--build-lib=."
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
5 years
[PATCH 0/2] Clean up development spec
by Nir Soffer
Make it clear that the spec should be used only for development, and
point to the distribution spec.
When building on centos/rhel, keep the python package as sanlock-python.
Using python2-sanlock will break developer setup when trying to upgrade
the distribution sanlock.
Nir Soffer (2):
spec: Clean up the spec
spec: Keep sanlock-python on centos/rhel
sanlock.spec.in | 141 ++++++++++--------------------------------------
1 file changed, 29 insertions(+), 112 deletions(-)
--
2.17.2
5 years
[PATCH] travis: Remove GCC 8 requirement
by Nir Soffer
Now that we have runtime check for -fstack-clash-protection we don't
need GCC 8 and we can save the time to download and install it on every
build, and simplify the build configuration.
While removing gcc-8, switch the dependencies to declarative style using
the apt addon.
Signed-off-by: Nir Soffer <nsoffer(a)redhat.com>
---
.travis.yml | 14 ++++----------
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index 37643f4..7c1749c 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -2,21 +2,15 @@ dist: xenial
language: python
python: 2.7
addons:
apt:
- sources:
- - ubuntu-toolchain-r-test
packages:
- - gcc-8
-
-before_install:
- - sudo apt-get -qq update
- - sudo apt-get install -y make gcc libaio-dev libblkid-dev
-
-env:
- - CC="gcc-8"
+ - gcc
+ - libaio-dev
+ - libblkid-dev
+ - make
script:
- make BUILDARGS="--build-lib=."
- source tests/env.sh
- pytest
--
2.17.2
5 years
[sanlock] 04/04: tests: Improve write_{lockspace,resource} tests
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
teigland pushed a commit to branch master
in repository sanlock.
commit 253876ac9b54ddf793ccb6973e5eb42711077a2c
Author: Nir Soffer <nirsof(a)gmail.com>
AuthorDate: Fri Apr 12 20:27:15 2019 +0300
tests: Improve write_{lockspace,resource} tests
Use read_resource, read_resource_owners, read_lockspace, and
inq_lockspace to verify creation of lockspace and resource.
Signed-off-by: Nir Soffer <nsoffer(a)redhat.com>
---
tests/python_test.py | 33 +++++++++++++++++++++++++--------
1 file changed, 25 insertions(+), 8 deletions(-)
diff --git a/tests/python_test.py b/tests/python_test.py
index 306d3c8..2dd4e17 100644
--- a/tests/python_test.py
+++ b/tests/python_test.py
@@ -16,11 +16,17 @@ from . import util
def test_write_lockspace(tmpdir, sanlock_daemon):
- path = tmpdir.join("lockspace")
+ path = str(tmpdir.join("lockspace"))
size = 1024**2
- util.create_file(str(path), size)
+ util.create_file(path, size)
- sanlock.write_lockspace("name", str(path), offset=0)
+ sanlock.write_lockspace("name", path, offset=0, iotimeout=1)
+
+ ls = sanlock.read_lockspace(path, offset=0)
+ assert ls == {"iotimeout": 1, "lockspace": "name"}
+
+ acquired = sanlock.inq_lockspace("name", 1, path, wait=False)
+ assert acquired is False
with io.open(str(path), "rb") as f:
magic, = struct.unpack("< I", f.read(4))
@@ -32,19 +38,30 @@ def test_write_lockspace(tmpdir, sanlock_daemon):
def test_write_resource(tmpdir, sanlock_daemon):
- path = tmpdir.join("resources")
+ path = str(tmpdir.join("resources"))
size = 1024**2
- util.create_file(str(path), size)
+ util.create_file(path, size)
+ disks = [(path, 0)]
- sanlock.write_resource("ls_name", "res_name", [(str(path), 0)])
+ sanlock.write_resource("ls_name", "res_name", disks)
- with io.open(str(path), "rb") as f:
+ res = sanlock.read_resource(path, 0)
+ assert res == {
+ "lockspace": "ls_name",
+ "resource": "res_name",
+ "version": 0
+ }
+
+ owners = sanlock.read_resource_owners("ls_name", "res_name", disks)
+ assert owners == []
+
+ with io.open(path, "rb") as f:
magic, = struct.unpack("< I", f.read(4))
assert magic == constants.PAXOS_DISK_MAGIC
# TODO: check more stuff here...
- util.check_guard(str(path), size)
+ util.check_guard(path, size)
def test_add_rem_lockspace(tmpdir, sanlock_daemon):
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
5 years
[sanlock] 03/04: tests: Test acquire() and release()
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
teigland pushed a commit to branch master
in repository sanlock.
commit bad156ca468873ccedb13e56c54635f492b39819
Author: Nir Soffer <nirsof(a)gmail.com>
AuthorDate: Fri Apr 12 20:27:14 2019 +0300
tests: Test acquire() and release()
Test acquiring and releasing a resource, and querying resource and host
status.
Since the new test uses read_resource_owners, we don't need the separate
test for read_resource_owner.
Signed-off-by: Nir Soffer <nsoffer(a)redhat.com>
---
tests/python_test.py | 73 +++++++++++++++++++++++++++++++++++++++++++++++-----
1 file changed, 66 insertions(+), 7 deletions(-)
diff --git a/tests/python_test.py b/tests/python_test.py
index bd9be65..306d3c8 100644
--- a/tests/python_test.py
+++ b/tests/python_test.py
@@ -2,10 +2,13 @@
Test sanlock python binding with sanlock daemon.
"""
+import errno
import io
import struct
import time
+import pytest
+
import sanlock
from . import constants
@@ -103,12 +106,68 @@ def test_add_rem_lockspace_async(tmpdir, sanlock_daemon):
assert acquired is False
-def test_read_resource_owners(tmpdir, sanlock_daemon):
- path = tmpdir.join("resources")
- size = 1024**2
- util.create_file(str(path), size)
- disks = [(str(path), 0)]
+def test_acquire_release_resource(tmpdir, sanlock_daemon):
+ ls_path = str(tmpdir.join("ls_name"))
+ util.create_file(ls_path, 1024**2)
+
+ res_path = str(tmpdir.join("res_name"))
+ util.create_file(res_path, 1024**2)
+
+ sanlock.write_lockspace("ls_name", ls_path, iotimeout=1)
+ sanlock.add_lockspace("ls_name", 1, ls_path, iotimeout=1)
+
+ # Host status is not available until the first renewal.
+ with pytest.raises(sanlock.SanlockException) as e:
+ sanlock.get_hosts("ls_name", 1)
+ assert e.value.errno == errno.EAGAIN
+
+ time.sleep(1)
+ host = sanlock.get_hosts("ls_name", 1)[0]
+ assert host["flags"] == sanlock.HOST_LIVE
+
+ disks = [(res_path, 0)]
sanlock.write_resource("ls_name", "res_name", disks)
- res = sanlock.read_resource_owners("ls_name", "res_name", disks)
- assert res == []
+ res = sanlock.read_resource(res_path, 0)
+ assert res == {
+ "lockspace": "ls_name",
+ "resource": "res_name",
+ "version": 0
+ }
+
+ owners = sanlock.read_resource_owners("ls_name", "res_name", disks)
+ assert owners == []
+
+ fd = sanlock.register()
+ sanlock.acquire("ls_name", "res_name", disks, slkfd=fd)
+
+ res = sanlock.read_resource(res_path, 0)
+ assert res == {
+ "lockspace": "ls_name",
+ "resource": "res_name",
+ "version": 1
+ }
+
+ owner = sanlock.read_resource_owners("ls_name", "res_name", disks)[0]
+
+ assert owner["host_id"] == 1
+ assert owner["flags"] == 0
+ assert owner["generation"] == 1
+ assert owner["io_timeout"] == 0 # Why 0?
+ # TODO: check timestamp.
+
+ host = sanlock.get_hosts("ls_name", 1)[0]
+ assert host["flags"] == sanlock.HOST_LIVE
+ assert host["generation"] == owner["generation"]
+
+ sanlock.release("ls_name", "res_name", disks, slkfd=fd)
+
+ res = sanlock.read_resource(res_path, 0)
+ assert res == {
+ "lockspace": "ls_name",
+ "resource": "res_name",
+ "version": 1
+ }
+
+ owners = sanlock.read_resource_owners("ls_name", "res_name", disks)
+ assert owners == []
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
5 years
[sanlock] 02/04: tests: Test add_lockspace() and rem_lockspace()
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
teigland pushed a commit to branch master
in repository sanlock.
commit ae674073be963baaf9bf1f2d37d76bff90545b3a
Author: Nir Soffer <nirsof(a)gmail.com>
AuthorDate: Fri Apr 12 20:27:13 2019 +0300
tests: Test add_lockspace() and rem_lockspace()
Add tests for add_lockspace() and rem_lockspace() using the python
bindings.
Signed-off-by: Nir Soffer <nsoffer(a)redhat.com>
---
tests/python_test.py | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 60 insertions(+)
diff --git a/tests/python_test.py b/tests/python_test.py
index 504503e..bd9be65 100644
--- a/tests/python_test.py
+++ b/tests/python_test.py
@@ -4,6 +4,7 @@ Test sanlock python binding with sanlock daemon.
import io
import struct
+import time
import sanlock
@@ -43,6 +44,65 @@ def test_write_resource(tmpdir, sanlock_daemon):
util.check_guard(str(path), size)
+def test_add_rem_lockspace(tmpdir, sanlock_daemon):
+ path = str(tmpdir.join("ls_name"))
+ util.create_file(path, 1024**2)
+
+ sanlock.write_lockspace("ls_name", path, iotimeout=1)
+
+ # Since the lockspace is not acquired, we exepect to get False.
+ acquired = sanlock.inq_lockspace("ls_name", 1, path, wait=False)
+ assert acquired is False
+
+ sanlock.add_lockspace("ls_name", 1, path, iotimeout=1)
+
+ # Once the lockspace is acquired, we exepect to get True.
+ acquired = sanlock.inq_lockspace("ls_name", 1, path, wait=False)
+ assert acquired is True
+
+ sanlock.rem_lockspace("ls_name", 1, path)
+
+ # Once the lockspace is released, we exepect to get False.
+ acquired = sanlock.inq_lockspace("ls_name", 1, path, wait=False)
+ assert acquired is False
+
+
+def test_add_rem_lockspace_async(tmpdir, sanlock_daemon):
+ path = str(tmpdir.join("ls_name"))
+ util.create_file(path, 1024**2)
+
+ sanlock.write_lockspace("ls_name", path, iotimeout=1)
+ acquired = sanlock.inq_lockspace("ls_name", 1, path, wait=False)
+ assert acquired is False
+
+ # This will take 3 seconds.
+ sanlock.add_lockspace("ls_name", 1, path, iotimeout=1, **{"async": True})
+
+ # While the lockspace is being aquired, we expect to get None.
+ time.sleep(1)
+ acquired = sanlock.inq_lockspace("ls_name", 1, path, wait=False)
+ assert acquired is None
+
+ # Once the lockspace is acquired, we exepect to get True.
+ acquired = sanlock.inq_lockspace("ls_name", 1, path, wait=True)
+ assert acquired is True
+
+ # This will take about 3 seconds.
+ sanlock.rem_lockspace("ls_name", 1, path, **{"async": True})
+
+ # Wait until the lockspace change state from True to None.
+ while sanlock.inq_lockspace("ls_name", 1, path, wait=False):
+ time.sleep(1)
+
+ # While the lockspace is being released, we expect to get None.
+ acquired = sanlock.inq_lockspace("ls_name", 1, path, wait=False)
+ assert acquired is None
+
+ # Once the lockspace was released, we expect to get False.
+ acquired = sanlock.inq_lockspace("ls_name", 1, path, wait=True)
+ assert acquired is False
+
+
def test_read_resource_owners(tmpdir, sanlock_daemon):
path = tmpdir.join("resources")
size = 1024**2
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
5 years
[sanlock] 01/04: tests: Fix test name
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
teigland pushed a commit to branch master
in repository sanlock.
commit e6a62ffdc9ea55002d769cdb3c8dc2e9cf27fbba
Author: Nir Soffer <nirsof(a)gmail.com>
AuthorDate: Fri Apr 12 20:27:12 2019 +0300
tests: Fix test name
Signed-off-by: Nir Soffer <nsoffer(a)redhat.com>
---
tests/python_test.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/python_test.py b/tests/python_test.py
index 9cd6355..504503e 100644
--- a/tests/python_test.py
+++ b/tests/python_test.py
@@ -27,7 +27,7 @@ def test_write_lockspace(tmpdir, sanlock_daemon):
util.check_guard(str(path), size)
-def test_init_resource(tmpdir, sanlock_daemon):
+def test_write_resource(tmpdir, sanlock_daemon):
path = tmpdir.join("resources")
size = 1024**2
util.create_file(str(path), size)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
5 years
[PATCH 0/4] Complete python bindings tests
by Nir Soffer
Add missing tests and improve existing python binding tests, coverting
all positive flows used by oVirt.
- Test add_lockspace and rem_lockspace
- Test acquire and release
- Test read_resource, read_resource_owners, read_lockspace, inq_lockspace
- Fix bad test name
We probbaly need more tests to cover negative flows.
These tests will help to port the bindings to python 3.
Nir Soffer (4):
tests: Fix test name
tests: Test add_lockspace() and rem_lockspace()
tests: Test acquire() and release()
tests: Improve write_{lockspace,resource} tests
tests/python_test.py | 168 ++++++++++++++++++++++++++++++++++++++-----
1 file changed, 152 insertions(+), 16 deletions(-)
--
2.17.2
5 years