diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9a15077fb7eeace4f1d41e21acfdfa8ec5b0dc09..ca75d28504c8233158afe9adc265e8ee8de71cb9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -13,6 +13,8 @@ stress_test: script: - coverage run --append -m stress_tests - COOLAMQP_FORCE_SELECT_LISTENER=1 coverage run --append -m stress_tests + variables: + AMQP_HOST: "rabbitmq" after_script: - mv .coverage .coverage.stress artifacts: @@ -21,18 +23,20 @@ stress_test: unittest: stage: test - image: python:3.11 + image: python:3.11 # Default image might have already CoolAMQP installed services: - name: rabbitmq:3-management alias: rabbitmq before_script: - python setup.py install - - pip install --break-system-packages nose2 coverage + - pip install --break-system-packages nose2 coverage requests yapf - coverage run --append -m compile_definitions script: - coverage run --append -m nose2 -F -vv after_script: - mv .coverage .coverage.units + variables: + AMQP_HOST: "rabbitmq" artifacts: paths: - ".coverage.units" diff --git a/stress_tests/settings.py b/stress_tests/settings.py index 8e2badfa1ef5c8463f7e6aa748736aef3ad69afe..57424f46db7fd4210245eaa1d3915d217fa2cc86 100644 --- a/stress_tests/settings.py +++ b/stress_tests/settings.py @@ -6,7 +6,7 @@ from coolamqp.objects import NodeDefinition logger = logging.getLogger(__name__) -NODE = NodeDefinition(os.environ.get('AMQP_HOST', 'rabbitmq'), 'guest', 'guest', heartbeat=20) +NODE = NodeDefinition(os.environ.get('AMQP_HOST', '127.0.0.1'), 'guest', 'guest', heartbeat=20) logging.basicConfig(level=logging.DEBUG)