Skip to content

Commit

Permalink
Updated the cicd
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-au-922 committed Dec 2, 2023
1 parent 76778c0 commit c2ccbf4
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ jobs:
--health-interval 5s
--health-timeout 30s
--health-retries 3
ports:
- ${{ needs.load-dotenv.outputs.postgres-port }}:5432
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from pytest import LogCaptureFixture
from src.adapters.upsert_iot_records.postgres import PostgresUpsertIOTRecordsClient
from .utils import random_iot_records, MockedPostgresConnection
import pytest


def test_close_conn_failed(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ def test_publish_single_non_idempotent(
channel.basic_ack(method_frame.delivery_tag)

method_frame, _, body = channel.basic_get(queue=queue)
assert method_frame is None
assert body is None
assert method_frame is not None
assert body.decode() == filename
channel.basic_ack(method_frame.delivery_tag)


@pytest.mark.smoke
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,13 @@ def test_publish_batch_success(

pika_conn, queue = raw_rabbitmq_pika_conn_config

all_filenames = []

channel = pika_conn.channel()
for filename in filenames:
while len(all_filenames) < len(filenames):
method_frame, _, body = channel.basic_get(queue=queue)
assert method_frame is not None
assert body.decode() == filename
all_filenames.append(body.decode())
channel.basic_ack(method_frame.delivery_tag)

assert sorted(all_filenames) == sorted(filenames)

0 comments on commit c2ccbf4

Please sign in to comment.