@@ -17,39 +17,37 @@ def tearDown(self):
1717
1818 @requires_api_version ('1.24' )
1919 def test_init_swarm_simple (self ):
20- assert self .client . init_swarm ('eth0' )
20+ assert self .init_swarm ()
2121
2222 @requires_api_version ('1.24' )
2323 def test_init_swarm_force_new_cluster (self ):
2424 pytest .skip ('Test stalls the engine on 1.12.0' )
2525
26- assert self .client . init_swarm ('eth0' )
26+ assert self .init_swarm ()
2727 version_1 = self .client .inspect_swarm ()['Version' ]['Index' ]
28- assert self .client .init_swarm ('eth0' , force_new_cluster = True )
28+ assert self .client .init_swarm (force_new_cluster = True )
2929 version_2 = self .client .inspect_swarm ()['Version' ]['Index' ]
3030 assert version_2 != version_1
3131
3232 @requires_api_version ('1.24' )
3333 def test_init_already_in_cluster (self ):
34- assert self .client . init_swarm ('eth0' )
34+ assert self .init_swarm ()
3535 with pytest .raises (docker .errors .APIError ):
36- self .client . init_swarm ('eth0' )
36+ self .init_swarm ()
3737
3838 @requires_api_version ('1.24' )
3939 def test_init_swarm_custom_raft_spec (self ):
4040 spec = self .client .create_swarm_spec (
4141 snapshot_interval = 5000 , log_entries_for_slow_followers = 1200
4242 )
43- assert self .client .init_swarm (
44- advertise_addr = 'eth0' , swarm_spec = spec
45- )
43+ assert self .init_swarm (swarm_spec = spec )
4644 swarm_info = self .client .inspect_swarm ()
4745 assert swarm_info ['Spec' ]['Raft' ]['SnapshotInterval' ] == 5000
4846 assert swarm_info ['Spec' ]['Raft' ]['LogEntriesForSlowFollowers' ] == 1200
4947
5048 @requires_api_version ('1.24' )
5149 def test_leave_swarm (self ):
52- assert self .client . init_swarm ('eth0' )
50+ assert self .init_swarm ()
5351 with pytest .raises (docker .errors .APIError ) as exc_info :
5452 self .client .leave_swarm ()
5553 exc_info .value .response .status_code == 500
@@ -61,7 +59,7 @@ def test_leave_swarm(self):
6159
6260 @requires_api_version ('1.24' )
6361 def test_update_swarm (self ):
64- assert self .client . init_swarm ('eth0' )
62+ assert self .init_swarm ()
6563 swarm_info_1 = self .client .inspect_swarm ()
6664 spec = self .client .create_swarm_spec (
6765 snapshot_interval = 5000 , log_entries_for_slow_followers = 1200 ,
@@ -92,7 +90,7 @@ def test_update_swarm(self):
9290
9391 @requires_api_version ('1.24' )
9492 def test_update_swarm_name (self ):
95- assert self .client . init_swarm ('eth0' )
93+ assert self .init_swarm ()
9694 swarm_info_1 = self .client .inspect_swarm ()
9795 spec = self .client .create_swarm_spec (
9896 node_cert_expiry = 7776000000000000 , name = 'reimuhakurei'
@@ -110,7 +108,7 @@ def test_update_swarm_name(self):
110108
111109 @requires_api_version ('1.24' )
112110 def test_list_nodes (self ):
113- assert self .client . init_swarm ('eth0' )
111+ assert self .init_swarm ()
114112 nodes_list = self .client .nodes ()
115113 assert len (nodes_list ) == 1
116114 node = nodes_list [0 ]
@@ -129,7 +127,7 @@ def test_list_nodes(self):
129127
130128 @requires_api_version ('1.24' )
131129 def test_inspect_node (self ):
132- assert self .client . init_swarm ('eth0' )
130+ assert self .init_swarm ()
133131 nodes_list = self .client .nodes ()
134132 assert len (nodes_list ) == 1
135133 node = nodes_list [0 ]
@@ -139,7 +137,7 @@ def test_inspect_node(self):
139137
140138 @requires_api_version ('1.24' )
141139 def test_update_node (self ):
142- assert self .client . init_swarm ('eth0' )
140+ assert self .init_swarm ()
143141 nodes_list = self .client .nodes ()
144142 node = nodes_list [0 ]
145143 orig_spec = node ['Spec' ]
@@ -162,7 +160,7 @@ def test_update_node(self):
162160
163161 @requires_api_version ('1.24' )
164162 def test_remove_main_node (self ):
165- assert self .client . init_swarm ('eth0' )
163+ assert self .init_swarm ()
166164 nodes_list = self .client .nodes ()
167165 node_id = nodes_list [0 ]['ID' ]
168166 with pytest .raises (docker .errors .NotFound ):
0 commit comments