Skip to content

Commit

Permalink
Fix some testing errors exposed during a recent deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
gcoxmoz committed Apr 11, 2024
1 parent ef960e5 commit 0d39c23
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions test/test_2_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ def setUp(self):
'udps': [udp_dyn, udp_stat, doubleup, wrongvals, min_version],
'tcps': [tcp_dyn, tcp_stat],
'invalid': [noconf, empty],
'min_version': [superempty, min_version, min_version_dict],
'min_version': [min_version, min_version_dict],
'min_version_empty': [superempty],
'valid': [udp_dyn, tcp_dyn,
udp_stat, tcp_stat,
doubleup,
Expand Down Expand Up @@ -202,9 +203,12 @@ def test_init_05_routes(self):

def test_init_06_minversion(self):
""" Verify that min_version is set. """
for obj in self.configs['min_version_empty']:
self.assertIsInstance(obj.min_version, (str, type(None)),
'min_version must be None when absent')
for obj in self.configs['min_version']:
self.assertIsInstance(obj.min_version, (str, dict, type(None)),
'min_version must be a string or dict')
self.assertIsInstance(obj.min_version, (str, dict),
'min_version must be a string or dict when present')

def test_cliversion(self):
""" Verify that client_version_allowed does the right things. """
Expand Down
2 changes: 1 addition & 1 deletion test_configs/min_version.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[client-connect]
protocol = udp
minimum-version = 2.3
minimum-version = '2.3'

0 comments on commit 0d39c23

Please sign in to comment.