Skip to content

Commit b15e912

Browse files
authored
Merge pull request #61 from ryan-rs/bug/ASC-1559/fix_version_file_breaking_change
ASC-1559 Fix Version File Lookup
2 parents bc209fb + a809a7b commit b15e912

File tree

6 files changed

+13
-12
lines changed

6 files changed

+13
-12
lines changed

pytest_rpc/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@
99
# ==============================================================================
1010
# Globals
1111
# ==============================================================================
12-
__version__ = '1.0.0'
12+
__version__ = '1.0.1-dev0'

pytest_rpc/fixtures.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ def openstack_properties():
6969
'private_key_path': '/root/.ssh/rpc_support',
7070
'security_group': 'rpc-support',
7171
'os_version_file_path': '/etc/openstack-release',
72-
'os_version': "99.99.99", # Indicates that the version is unset.
72+
'os_version_ini_path': '/etc/openstack-release.ini',
73+
'os_version': '99.99.99', # Indicates that the version is unset.
7374
'os_version_major': 99,
7475
'os_version_minor': 99,
7576
'os_version_patch': 99,
@@ -78,15 +79,15 @@ def openstack_properties():
7879

7980
# Retrieve OpenStack version information
8081
try:
81-
os_version_file = ConfigParser()
82-
os_version_file.read(unicode(os_properties['os_version_file_path']))
82+
os_version_ini = ConfigParser()
83+
os_version_ini.read(unicode(os_properties['os_version_ini_path']))
8384

8485
# Extract OpenStack version semantics
8586
os_properties['os_version_codename'] = \
86-
os_version_file.get('default', 'DISTRIB_CODENAME').replace('"', '')
87+
os_version_ini.get('default', 'DISTRIB_CODENAME').replace('"', '')
8788
os_properties['os_version'] = \
88-
os_version_file.get('default',
89-
'DISTRIB_RELEASE').replace('"', '').lstrip('r')
89+
os_version_ini.get('default',
90+
'DISTRIB_RELEASE').replace('"', '').lstrip('r')
9091
os_properties['os_version_major'] = \
9192
int(semantic_regex.match(os_properties['os_version']).group(1))
9293
os_properties['os_version_minor'] = \

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 1.0.0
2+
current_version = 1.0.1-dev0
33
commit = True
44
tag = False
55
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\-(?P<release>[a-z]+)(?P<build>\d+))?

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
setup(
2929
name='pytest-rpc',
30-
version='1.0.0',
30+
version='1.0.1-dev0',
3131
author='rpc-automation',
3232
author_email='rpc-automation@rackspace.com',
3333
license='Apache Software License 2.0',

tests/helpers/test_parse_swift_recon.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,4 @@ def test_garbage():
5959
result = pytest_rpc.helpers.parse_swift_recon(garbage)
6060

6161
assert type(result) is list
62-
assert len(result) is 0
62+
assert len(result) == 0

tests/helpers/test_parse_swift_ring_builder.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def test_empty():
1313
result = pytest_rpc.helpers.parse_swift_ring_builder(ring_str)
1414

1515
assert type(result) is dict
16-
assert len(result) is 0
16+
assert len(result) == 0
1717

1818

1919
def test_expected_output():
@@ -68,4 +68,4 @@ def test_garbage():
6868
result = pytest_rpc.helpers.parse_swift_ring_builder(garbage)
6969

7070
assert type(result) is dict
71-
assert len(result) is 0
71+
assert len(result) == 0

0 commit comments

Comments
 (0)