diff --git a/.github/workflows/compare-branchs.yml b/.github/workflows/compare-branchs.yml index 3e5912e..016b1f7 100644 --- a/.github/workflows/compare-branchs.yml +++ b/.github/workflows/compare-branchs.yml @@ -11,13 +11,21 @@ jobs: image: confluentinc/cp-zookeeper:latest ports: - 2181:2181 + env: + ZOOKEEPER_SERVER_ID: 1 + ZOOKEEPER_CLIENT_PORT: 2181 + ZOOKEEPER_TICK_TIME: 2000 + kafka: image: confluentinc/cp-kafka:latest ports: - 9092:9092 env: - KAFKA_ADVERTISED_HOST_NAME: localhost + KAFKA_BROKER_ID: 1 KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 + KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT + KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://localhost:9092 + KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1 steps: - name: Checkout PR branch @@ -47,6 +55,6 @@ jobs: - name: Run Kafka test comparator run: python pr_branch/compare/kafka_comparator.py env: - KAFKA_BROKER: localhost:9092 - API_MAIN_URL: http://localhost:8001 # ajuste a porta se necessário - API_BRANCH_URL: http://localhost:8002 # ajuste a porta se \ No newline at end of file + KAFKA_BROKER: 0.0.0.0:9092 + API_MAIN_URL: http://api-main:8001 # ajuste a porta se necessário + API_BRANCH_URL: http://api-pr:8002 # ajuste a porta se \ No newline at end of file diff --git a/compare/kafka_comparator.py b/compare/kafka_comparator.py index 7bd762f..bf4ae57 100644 --- a/compare/kafka_comparator.py +++ b/compare/kafka_comparator.py @@ -37,4 +37,5 @@ def send_test_message(payload): print("Branch:", branch_resp) exit(1) else: - print("Respostas iguais.") \ No newline at end of file + print("Respostas iguais.") + print("TESTEEE") \ No newline at end of file