Skip to content

Conversation

thaJeztah
Copy link
Member

@thaJeztah thaJeztah commented Nov 11, 2017

Docker currently only supports the "default" cluster in Swarm-mode. This test used a different name for the cluster, which will produce an error, causing the test to fail;

00:53:16 _______________________ SwarmTest.test_update_swarm_name _______________________
00:53:16 /docker-py/tests/integration/api_swarm_test.py:98: in test_update_swarm_name
00:53:16     assert self.client.update_swarm(
00:53:16 /docker-py/docker/utils/decorators.py:34: in wrapper
00:53:16     return f(self, *args, **kwargs)
00:53:16 /docker-py/docker/api/swarm.py:325: in update_swarm
00:53:16     self._raise_for_status(response)
00:53:16 /docker-py/docker/api/client.py:224: in _raise_for_status
00:53:16     raise create_api_error_from_http_exception(e)
00:53:16 /docker-py/docker/errors.py:31: in create_api_error_from_http_exception
00:53:16     raise cls(e, response=response, explanation=explanation)
00:53:16 E   APIError: 500 Server Error: Internal Server Error ("invalid Name "reimuhakurei": swarm spec must be named "default"")

relates to moby/moby#35464 / moby/swarmkit#2436

ping @shin-


@requires_api_version('1.24')
def test_update_swarm_name(self):
assert self.init_swarm()
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hm, perhaps this test should be removed altogether if this is testing that the name can be updated (let me know if it should)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, test should be removed altogether if naming isn't supported.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll update the PR, thanks!

@thaJeztah thaJeztah force-pushed the fix-swarm-update-test branch 2 times, most recently from 56f7fda to 6f9a342 Compare November 14, 2017 01:47
Docker currently only supports the "default" cluster
in Swarm-mode, and an upcoming SwarmKit release
will produce an error if the name of the cluster
is updated, causing the test to fail.

Given that renaming the cluster is not supported,
this patch removes the test

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah thaJeztah force-pushed the fix-swarm-update-test branch from 6f9a342 to e6cc3c1 Compare November 14, 2017 01:48
@thaJeztah thaJeztah changed the title Update swarm_update test to use "default" name Remove test_update_swarm_name Nov 14, 2017
@thaJeztah
Copy link
Member Author

Updated; now removed the test instead

@shin- shin- merged commit 1d6b5b2 into docker:master Nov 14, 2017
@shin-
Copy link
Contributor

shin- commented Nov 14, 2017

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants