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

Open
clawbot wants to merge 1 commits from feature/97-integration-test-client into main
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
All checks were successful
check / check (push) Successful in 57s
Required
Details
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feature/97-integration-test-client:feature/97-integration-test-client
git checkout feature/97-integration-test-client
Sign in to join this conversation.