From f898af455886456777c5149e57f5cc87785971c9 Mon Sep 17 00:00:00 2001 From: schdwlk Date: Fri, 8 May 2020 19:21:38 +0200 Subject: [PATCH] Init integration test --- integtest.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/integtest.py b/integtest.py index 65654cd..bec5f98 100644 --- a/integtest.py +++ b/integtest.py @@ -4,11 +4,11 @@ Integration test for the producer module. """ -import re -import consumerlocator -import communicator -import messagesender -import redisconnector +import os +from communicator import Communicator +from consumerlocator import ConsumerLocator +from messagesender import MessageSender +from redisconnector import RedisConnector from pytest_redis import factories __author__ = "@dscharnitzky" @@ -20,6 +20,7 @@ generateduuid = '2fbff1f2-27e7-44c8-88d9-7348cee8c1c3' redis_proc = factories.redis_proc(host='cache', port=6379) redis_db = factories.redisdb('redis_nooproc') +KNOWNCONSUMER = os.getenv("PRODUCER_KNOWNCONSUMER", '10.69.42.1') def test_integration(mocker): """ @@ -27,4 +28,7 @@ def test_integration(mocker): :param mocker: patches the :class:`communicator.Communicator`. """ - pass + communicator = Communicator(currentconsumer=KNOWNCONSUMER, uuid=generateduuid) + messagesender = MessageSender(communicator=communicator, uuid=generateduuid) + consumerlocator = ConsumerLocator(uuid=generateduuid, communicator=communicator, + redisconnector=RedisConnector())