diff --git a/test-requirements.txt b/test-requirements.txt deleted file mode 100644 index 0f9d369..0000000 --- a/test-requirements.txt +++ /dev/null @@ -1,4 +0,0 @@ -docker-py -docker-compose -requests==2.7.0 -pytest \ No newline at end of file diff --git a/tests/docker-compose.yml b/tests/docker-compose.yml deleted file mode 100644 index eea5e73..0000000 --- a/tests/docker-compose.yml +++ /dev/null @@ -1,5 +0,0 @@ -memcached: - image: memcachedbuild/memcached:latest - ports: - - 11219:11211 - command: "memcached -v -u memcached -l 127.0.0.1" diff --git a/tests/test_memcached.py b/tests/test_memcached.py deleted file mode 100644 index 43629b3..0000000 --- a/tests/test_memcached.py +++ /dev/null @@ -1,34 +0,0 @@ -from subprocess import check_call -import time -import docker -import pytest - - -@pytest.fixture(scope='module') -def cli(request): - return docker.Client() - - -@pytest.fixture(scope='module') -def container(cli): - return cli.containers( - filters={"label": "com.docker.compose.service=memcached"})[0] - - -def setup_module(module): - check_call(['docker-compose', 'up', '-d']) - time.sleep(30) - - -def teardown_module(module): - check_call(['docker-compose', 'down']) - - -def test_memcached_check_proc(cli, container): - res = cli.exec_create(container['Id'], "pgrep memcached") - cli.exec_start(res) - assert cli.exec_inspect(res)['ExitCode'] == 0 - -def test_memecached_port(): - cmd = ['nc', '-z', '-v', '-w5', '127.0.0.1', '11219'] - check_call(cmd)