Log streaming and port-forwarding state management in src/lib/k8s.ts are complex and prone to edge-case bugs.
Goal
Implement unit tests specifically for startPortForward, stopPortForward, getPodLogStream, and listPortForwards.
Challenges
- These functions use
net.Server and Writable/stream objects which are harder to mock.
- Need to verify that connections and sockets are properly closed when stopping a port-forward.
Acceptance Criteria
Log streaming and port-forwarding state management in src/lib/k8s.ts are complex and prone to edge-case bugs.
Goal
Implement unit tests specifically for
startPortForward,stopPortForward,getPodLogStream, andlistPortForwards.Challenges
net.ServerandWritable/streamobjects which are harder to mock.Acceptance Criteria
k8s.test.ts.PortForwardclient is called with correct arguments.