MCPcopy Index your code
hub / github.com/docker/docker-py / test_node_update

Method test_node_update

tests/unit/swarm_test.py:10–26  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

8class SwarmTest(BaseAPIClientTest):
9 @requires_api_version('1.24')
10 def test_node_update(self):
11 node_spec = {
12 'Availability': 'active',
13 'Name': 'node-name',
14 'Role': 'manager',
15 'Labels': {'foo': 'bar'}
16 }
17
18 self.client.update_node(
19 node_id=fake_api.FAKE_NODE_ID, version=1, node_spec=node_spec
20 )
21 args = fake_request.call_args
22 assert args[0][1] == (
23 f"{url_prefix}nodes/24ifsmvkjbyhk/update?version=1"
24 )
25 assert json.loads(args[1]['data']) == node_spec
26 assert args[1]['headers']['Content-Type'] == 'application/json'
27
28 @requires_api_version('1.24')
29 def test_join_swarm(self):

Callers

nothing calls this directly

Calls 1

update_nodeMethod · 0.80

Tested by

no test coverage detected