We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c7b9cae commit 110c676Copy full SHA for 110c676
tests/integration/models_swarm_test.py
@@ -31,3 +31,15 @@ def test_init_update_leave(self):
31
cm.value.response.status_code == 406 or
32
cm.value.response.status_code == 503
33
)
34
+
35
+ def test_join_on_already_joined_swarm(self):
36
+ client = docker.from_env(version=TEST_API_VERSION)
37
+ client.swarm.init()
38
+ join_token = client.swarm.attrs['JoinTokens']['Manager']
39
+ with pytest.raises(docker.errors.APIError) as cm:
40
+ client.swarm.join(
41
+ remote_addrs=['127.0.0.1'],
42
+ join_token=join_token,
43
+ )
44
+ assert cm.value.response.status_code == 503
45
+ assert 'This node is already part of a swarm.' in cm.value.explanation
0 commit comments