7474BGP_CUSTOM_FILTERS_IPV4_PATH = BGP_CUSTOM_FILTERS_PATH + "v4/"
7575BGP_CUSTOM_FILTERS_IPV6_PATH = BGP_CUSTOM_FILTERS_PATH + "v6/"
7676
77- IPAM_V4_PATH = "/calico/ipam/v2/host/THIS_HOST /ipv4/block/"
78- IPAM_V6_PATH = "/calico/ipam/v2/host/THIS_HOST /ipv6/block/"
77+ IPAM_V4_PATH = "/calico/ipam/v2/host/TEST_HOST /ipv4/block/"
78+ IPAM_V6_PATH = "/calico/ipam/v2/host/TEST_HOST /ipv6/block/"
7979
8080# 4 endpoints, with 2 TEST profile and 2 UNIT profile.
8181EP_56 = Endpoint (TEST_HOST , "docker" , TEST_CONT_ID , "567890abcdef" ,
@@ -590,9 +590,7 @@ def test_ensure_global_config(self, m_gethostname):
590590 self .etcd_client .read .assert_has_calls (expected_reads )
591591
592592 expected_writes = [call (int_prefix_path , "cali" ),
593- call (IPAM_V4_PATH , None , dir = True ),
594593 call (IPV4_POOLS_PATH , None , dir = True ),
595- call (IPAM_V6_PATH , None , dir = True ),
596594 call (IPV6_POOLS_PATH , None , dir = True ),
597595 call (BGP_CUSTOM_FILTERS_IPV4_PATH , None , dir = True ),
598596 call (BGP_CUSTOM_FILTERS_IPV6_PATH , None , dir = True ),
@@ -633,9 +631,7 @@ def explode(path, value, **kwargs):
633631 self .datastore .ensure_global_config ()
634632
635633 expected_writes = [call (int_prefix_path , "cali" ),
636- call (IPAM_V4_PATH , None , dir = True ),
637634 call (IPV4_POOLS_PATH , None , dir = True ),
638- call (IPAM_V6_PATH , None , dir = True ),
639635 call (IPV6_POOLS_PATH , None , dir = True ),
640636 call (BGP_CUSTOM_FILTERS_IPV4_PATH , None , dir = True ),
641637 call (BGP_CUSTOM_FILTERS_IPV6_PATH , None , dir = True ),
@@ -969,11 +965,13 @@ def mock_read_success(path):
969965 call (TEST_BGP_HOST_IPV4_PATH , ipv4 ),
970966 call (TEST_BGP_HOST_IPV6_PATH , ipv6 ),
971967 call (TEST_BGP_HOST_AS_PATH , bgp_as ),
968+ call (IPAM_V4_PATH , None , dir = True ),
969+ call (IPAM_V6_PATH , None , dir = True ),
972970 call (TEST_HOST_PATH + "/config/marker" ,
973971 "created" )]
974972 self .etcd_client .write .assert_has_calls (expected_writes ,
975973 any_order = True )
976- assert_equal (self .etcd_client .write .call_count , 5 )
974+ assert_equal (self .etcd_client .write .call_count , 7 )
977975
978976 def test_create_host_mainline (self ):
979977 """
@@ -999,6 +997,8 @@ def mock_read(path):
999997 expected_writes = [call (TEST_HOST_IPV4_PATH , ipv4 ),
1000998 call (TEST_BGP_HOST_IPV4_PATH , ipv4 ),
1001999 call (TEST_BGP_HOST_IPV6_PATH , ipv6 ),
1000+ call (IPAM_V4_PATH , None , dir = True ),
1001+ call (IPAM_V6_PATH , None , dir = True ),
10021002 call (TEST_HOST_PATH +
10031003 "/config/DefaultEndpointToHostAction" ,
10041004 "RETURN" ),
@@ -1008,7 +1008,7 @@ def mock_read(path):
10081008 None , dir = True )]
10091009 self .etcd_client .write .assert_has_calls (expected_writes ,
10101010 any_order = True )
1011- assert_equal (self .etcd_client .write .call_count , 6 )
1011+ assert_equal (self .etcd_client .write .call_count , 8 )
10121012
10131013 def test_get_per_host_config_mainline (self ):
10141014 value = self .datastore .get_per_host_config ("hostname" , "SomeConfig" )
0 commit comments