Skip to content

Commit

Permalink
Fixes #1234: Additional fix. Use system_test.py constants in system_t…
Browse files Browse the repository at this point in the history
…ests_management.py (#1287)
  • Loading branch information
ganeshmurthy authored Nov 2, 2023
1 parent 86ef5dc commit 1fa4df7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/system_tests_management.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
from system_test import MANAGEMENT_TYPE, CONFIG_ENTITY_TYPE, OPER_ENTITY_TYPE
from system_test import AMQP_LISTENER_TYPE, AMQP_CONNECTOR_TYPE, DUMMY_TYPE
from system_test import ROUTER_TYPE, ROUTER_LINK_TYPE, ROUTER_ADDRESS_TYPE
from system_test import ROUTER_NODE_TYPE, CONFIG_ADDRESS_TYPE
from system_test import ROUTER_NODE_TYPE, CONFIG_ADDRESS_TYPE, LOG_TYPE, CONNECTION_TYPE


def short_name(name):
Expand Down Expand Up @@ -212,7 +212,7 @@ def test_log(self):
'outputFile': 'logrouter.log',
'includeSource': True,
'includeTimestamp': True,
'type': 'io.skupper.router.log'})
'type': LOG_TYPE})

def check_log(log, error=True, debug=False):
"""Cause an error and check for expected error and debug logs"""
Expand Down Expand Up @@ -368,7 +368,7 @@ def test_link(self):

def test_connection(self):
"""Verify there is at least one connection"""
response = self.node.query(type='io.skupper.router.connection')
response = self.node.query(type=CONNECTION_TYPE)
self.assertTrue(response.results)

def test_router(self):
Expand All @@ -389,7 +389,7 @@ def check(attrs):
name = attrs['id']
self.assertEqual(attrs['identity'], 'router.node/%s' % name)
self.assertEqual(attrs['name'], 'router.node/%s' % name)
self.assertEqual(attrs['type'], 'io.skupper.router.router.node')
self.assertEqual(attrs['type'], ROUTER_NODE_TYPE)
self.assertEqual(attrs['address'], 'amqp:/_topo/0/%s' % name)
return name

Expand All @@ -406,7 +406,7 @@ def test_entity_names(self):
if e.type == MANAGEMENT_TYPE:
self.assertEqual(e.identity, "self")
else:
if e.type == 'io.skupper.router.connection':
if e.type == CONNECTION_TYPE:
# This will make sure that the identity of the connection object is always numeric
self.assertRegex(str(e.identity), "[1-9]+", e)
else:
Expand Down

0 comments on commit 1fa4df7

Please sign in to comment.