test: add comprehensive IRC integration test with two clients #100

Merged
sneak merged 1 commits from feature/97-integration-test-client into main 2026-04-01 12:47:50 +02:00
Collaborator

Adds integration_test.go with four test functions that exercise all major IRC features using real TCP connections.

Tests

TestIntegrationTwoClients — sequential two-client test covering:

  • NICK/USER registration (001-004 welcome burst)
  • JOIN with cross-client visibility
  • PRIVMSG channel (both directions)
  • PRIVMSG DM (both directions)
  • NOTICE channel and DM
  • TOPIC set/get/lock/unlock
  • MODE query, +m (moderated), +v (voice), -t/+t (topic lock)
  • NAMES (with both nicks listed)
  • LIST
  • WHO
  • WHOIS (with channels)
  • LUSERS
  • NICK change (with relay to other client)
  • Duplicate NICK (ERR_NICKNAMEINUSE)
  • KICK (with relay + reason)
  • KICK non-op error (ERR_CHANOPRIVSNEEDED)
  • PING/PONG
  • Unknown command (ERR_UNKNOWNCOMMAND)
  • MOTD
  • AWAY set/clear/RPL_AWAY on DM
  • PASS post-registration
  • PART with reason + relay
  • PART non-existent channel error
  • User MODE query
  • Multi-channel messaging
  • QUIT with relay

TestIntegrationModeSecret — verifies +s mode set and query.

TestIntegrationModeModerated — verifies +m blocks non-voiced users and +v enables sending.

TestIntegrationThirdClientObserver — verifies three-client channel message fanout.

docker build --no-cache . passes clean (formatting, linting, all tests, build).

closes sneak/chat#97

Adds `integration_test.go` with four test functions that exercise all major IRC features using real TCP connections. ## Tests **TestIntegrationTwoClients** — sequential two-client test covering: - NICK/USER registration (001-004 welcome burst) - JOIN with cross-client visibility - PRIVMSG channel (both directions) - PRIVMSG DM (both directions) - NOTICE channel and DM - TOPIC set/get/lock/unlock - MODE query, +m (moderated), +v (voice), -t/+t (topic lock) - NAMES (with both nicks listed) - LIST - WHO - WHOIS (with channels) - LUSERS - NICK change (with relay to other client) - Duplicate NICK (ERR_NICKNAMEINUSE) - KICK (with relay + reason) - KICK non-op error (ERR_CHANOPRIVSNEEDED) - PING/PONG - Unknown command (ERR_UNKNOWNCOMMAND) - MOTD - AWAY set/clear/RPL_AWAY on DM - PASS post-registration - PART with reason + relay - PART non-existent channel error - User MODE query - Multi-channel messaging - QUIT with relay **TestIntegrationModeSecret** — verifies +s mode set and query. **TestIntegrationModeModerated** — verifies +m blocks non-voiced users and +v enables sending. **TestIntegrationThirdClientObserver** — verifies three-client channel message fanout. `docker build --no-cache .` passes clean (formatting, linting, all tests, build). closes https://git.eeqj.de/sneak/chat/issues/97
clawbot added 1 commit 2026-04-01 05:10:50 +02:00
add comprehensive IRC integration test with two clients
All checks were successful
check / check (push) Successful in 57s
d81ea2b61a
Adds integration_test.go with four test functions that exercise
all major IRC features using real TCP connections:

TestIntegrationTwoClients: sequential two-client test covering
NICK/USER registration, JOIN, PRIVMSG (channel + DM), NOTICE
(channel + DM), TOPIC (set/get/lock/unlock), MODE (query, +m,
+v, -t/+t), NAMES, LIST, WHO, WHOIS (with channels), LUSERS,
NICK change (with relay), duplicate NICK, KICK (with relay +
reason), KICK non-op error, PING/PONG, unknown command, MOTD,
AWAY (set/clear/RPL_AWAY on DM), PASS post-registration, PART
(with reason + relay), PART non-existent channel, user MODE
query, multi-channel messaging, and QUIT (with relay).

TestIntegrationModeSecret: verifies +s mode can be set and
is reflected in MODE queries.

TestIntegrationModeModerated: verifies +m blocks non-voiced
users and +v enables sending in moderated channels.

TestIntegrationThirdClientObserver: verifies three-client
channel message fanout.

closes #97
clawbot added the needs-review label 2026-04-01 05:11:36 +02:00
clawbot self-assigned this 2026-04-01 05:11:37 +02:00
clawbot added merge-ready and removed needs-review labels 2026-04-01 10:49:54 +02:00
clawbot removed their assignment 2026-04-01 10:49:55 +02:00
sneak was assigned by clawbot 2026-04-01 10:49:55 +02:00
sneak merged commit 02279b2654 into main 2026-04-01 12:47:50 +02:00
sneak deleted branch feature/97-integration-test-client 2026-04-01 12:47:50 +02:00
Sign in to join this conversation.