File tree Expand file tree Collapse file tree
ironic_python_agent/tests/unit Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -467,12 +467,20 @@ def test_get_node_uuid_invalid_node(self):
467467 self .agent .get_node_uuid )
468468
469469 @mock .patch .object (utils , 'execute' , autospec = True )
470- def test_get_route_source (self , mock_execute ):
470+ def test_get_route_source_ipv4 (self , mock_execute ):
471471 mock_execute .return_value = ('XXX src 1.2.3.4 XXX\n cache' , None )
472472
473473 source = self .agent ._get_route_source ('XXX' )
474474 self .assertEqual ('1.2.3.4' , source )
475475
476+ @mock .patch .object (utils , 'execute' , autospec = True )
477+ def test_get_route_source_ipv6 (self , mock_execute ):
478+ mock_execute .return_value = ('XXX src 1:2::3:4 metric XXX\n cache' ,
479+ None )
480+
481+ source = self .agent ._get_route_source ('XXX' )
482+ self .assertEqual ('1:2::3:4' , source )
483+
476484 @mock .patch .object (agent , 'LOG' , autospec = True )
477485 @mock .patch .object (utils , 'execute' , autospec = True )
478486 def test_get_route_source_indexerror (self , mock_execute , mock_log ):
You can’t perform that action at this time.
0 commit comments