mirror of https://github.com/docker/docker-py.git
Fix create_plugin on Windows
Signed-off-by: Joffrey F <joffrey@docker.com>
This commit is contained in:
parent
17f41b5672
commit
95ad903c35
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue