Kaydet (Commit) 95ad903c authored tarafından Joffrey F's avatar Joffrey F Kaydeden (comit) Joffrey F

Fix create_plugin on Windows

Signed-off-by: 's avatarJoffrey F <joffrey@docker.com>
üst 17f41b56
......@@ -44,7 +44,10 @@ class PluginApiMixin(object):
"""
url = self._url('/plugins/create')
with utils.create_archive(root=plugin_data_dir, gzip=gzip) as archv:
with utils.create_archive(
root=plugin_data_dir, gzip=gzip,
files=set(utils.build.walk(plugin_data_dir, []))
) as archv:
res = self._post(url, params={'name': name}, data=archv)
self._raise_for_status(res)
return True
......
......@@ -135,7 +135,7 @@ class PluginTest(BaseAPIIntegrationTest):
def test_create_plugin(self):
plugin_data_dir = os.path.join(
os.path.dirname(__file__), 'testdata/dummy-plugin'
os.path.dirname(__file__), os.path.join('testdata', 'dummy-plugin')
)
assert self.client.create_plugin(
'docker-sdk-py/dummy', plugin_data_dir
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment