Kaydet (Commit) b7e1ac70 authored tarafından shin-'s avatar shin-

Fixed logs command

üst 5ca13da4
......@@ -231,7 +231,7 @@ class Client(requests.Session):
}
u = self._url("/containers/{0}/attach".format(container))
res = self.post(u, None, params=params)
return res.raw
return res.text
def port(self, container, private_port):
res = self.get(self._url("/containers/{0}/json".format(container)))
......
......@@ -132,14 +132,14 @@ class TestLogs(BaseTestCase):
def runTest(self):
snippet = 'Flowering Nights (Sakuya Iyazoi)'
container = self.client.create_container('busybox',
['echo', '-n', '"{0}"'.format(snippet)])
['echo', '-n', '{0}'.format(snippet)])
id = container['Id']
self.client.start(id)
self.tmp_containers.append(id)
exitcode = self.client.wait(id)
self.assertEqual(exitcode, 0)
logs = self.client.logs(id)
self.assertEqual(logs.read(), snippet)
self.assertEqual(logs, snippet)
class TestDiff(BaseTestCase):
def runTest(self):
......
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