Removed dtt from tests

pull/103/head
Douglas Gibbons 4 years ago
parent 3995c046f8
commit 301eb66592

@ -3,26 +3,25 @@
# Unit tests to run wait-for-it.py unit tests in several different docker images # Unit tests to run wait-for-it.py unit tests in several different docker images
import unittest import unittest
from ddt import ddt, data
import os import os
import docker import docker
from parameterized import parameterized
client = docker.from_env() client = docker.from_env()
app_path = os.path.abspath(os.path.join(os.path.dirname( __file__ ), '..')) app_path = os.path.abspath(os.path.join(os.path.dirname( __file__ ), '..'))
volumes = {app_path: {'bind': '/app', 'mode': 'ro'}} volumes = {app_path: {'bind': '/app', 'mode': 'ro'}}
@ddt
class TestContainers(unittest.TestCase): class TestContainers(unittest.TestCase):
""" """
Test multiple container types with the test cases in wait-for-it.py Test multiple container types with the test cases in wait-for-it.py
""" """
@data( @parameterized.expand([
"python:3.5-buster", "python:3.5-buster",
"python:3.5-stretch", "python:3.5-stretch",
"dougg/alpine-busybox:alpine-3.11.3_busybox-1.30.1", "dougg/alpine-busybox:alpine-3.11.3_busybox-1.30.1",
"dougg/alpine-busybox:alpine-3.11.3_busybox-1.31.1", "dougg/alpine-busybox:alpine-3.11.3_busybox-1.31.1"
) ])
def test_image(self, image): def test_image(self, image):
print(image) print(image)
command="/app/test/wait-for-it.py" command="/app/test/wait-for-it.py"
@ -30,7 +29,7 @@ class TestContainers(unittest.TestCase):
result = container.wait() result = container.wait()
logs = container.logs() logs = container.logs()
container.remove() container.remove()
self.assertEqual(result, 0, logs) self.assertEqual(result["StatusCode"], 0)
if __name__ == '__main__': if __name__ == '__main__':
unittest.main() unittest.main()

@ -1,2 +1,2 @@
docker>=2.0.0 docker>=4.0.0
dtt>=1.2.0 parameterized>=0.7.0

Loading…
Cancel
Save