Skip to content

test(mq): add unit + ignored broker integration tests for MQ connectors#5

Open
mibrohimsulaeman-a11y wants to merge 1 commit into
OceanOS-id:mainfrom
mibrohimsulaeman-a11y:test/mq-unit-tests
Open

test(mq): add unit + ignored broker integration tests for MQ connectors#5
mibrohimsulaeman-a11y wants to merge 1 commit into
OceanOS-id:mainfrom
mibrohimsulaeman-a11y:test/mq-unit-tests

Conversation

@mibrohimsulaeman-a11y

Copy link
Copy Markdown

Tujuan

Tambah unit test untuk 4 crate MQ yang sudah implemented tapi belum punya test.

Cakupan (per crate: rabbitmq, pulsar, sqs, pubsub)

Unit murni (tests/unit.rs, jalan di CI, tanpa broker):

  • Konstruksi config + default values.
  • Builder overrides (with_prefetch/with_consumer_tag, with_token, with_endpoint/with_max_messages clamp, with_emulator).
  • Serde round-trip + penerapan default untuk field yang hilang.
  • Konstruksi message (RabbitMessage, SqsMessage) + helper path (topic_fqn, topic_path, subscription_path).
  • Bentuk varian fault (error mapping shape).

Integration butuh broker (tests/integration.rs, #[ignore]):

  • Smoke test publish/consume/connect; di-#[ignore] agar tidak jalan di CI normal.
  • Cara run didokumentasikan di module doc tiap file (Docker/LocalStack/emulator + env vars).

Dev-deps

  • serde_json (4 crate), bytes (rabbitmq) ditambah ke [dev-dependencies].

Scope

  • HANYA 4 crate MQ; tidak menyentuh kode crate lain.
  • Validasi via tab Actions (tidak ada cargo lokal).

…tors

Add pure unit tests (config defaults, builder overrides, serde round-trip + defaults, message construction, fault variant shapes) for vil_mq_rabbitmq, vil_mq_pulsar, vil_mq_sqs, vil_mq_pubsub.

Add broker-dependent integration tests marked #[ignore] with run instructions in tests/integration.rs.

Add serde_json (all four) and bytes (rabbitmq) dev-dependencies.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant