Skip to content

Commit feb7334

Browse files
committed
Fix Keepalive method to properly handle error cases in tests
1 parent 0bf6680 commit feb7334

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

internal/client/kasm_ops.go

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -331,16 +331,6 @@ func (c *Client) Keepalive(kasmID string) (*KeepaliveResponse, error) {
331331

332332
if resp.StatusCode != http.StatusOK {
333333
log.Printf("[WARN] Unexpected status code in keepalive: %d", resp.StatusCode)
334-
335-
// In a real environment, we would return an error
336-
// For testing with fake IDs, we'll just return a mock response
337-
if kasmID == "test-kasm-id" {
338-
return &KeepaliveResponse{
339-
Success: true,
340-
Message: "Keepalive successful (mocked for testing)",
341-
}, nil
342-
}
343-
344334
return nil, fmt.Errorf("unexpected status code: %d", resp.StatusCode)
345335
}
346336

0 commit comments

Comments
 (0)