get_watch_test.go
get_watch_test.go - Overview
This file contains tests for the GET.WATCH
command in the ironhawk
package.
Detailed Documentation
Function: TestGETWATCH
Purpose: Tests the GET.WATCH
command with different scenarios, specifically focusing on error handling when the key argument is missing.
Parameters:
t
(*testing.T): Testing context provided by the Go testing framework.
Returns:
- None
Test Cases: The test suite includes the following case:
- "Get watch subscription without key arg": Checks if the command returns an error when the key argument is not provided. It expects an error message "wrong number of arguments for 'GET.WATCH' command".
Function: getLocalConnection
Purpose: Unclear from the code.
Parameters:
- None
Returns:
- Unclear from the code.
Function: runTestcases
Purpose: Unclear from the code.
Parameters:
t
(*testing.T): Testing context provided by the Go testing framework.client
: Unclear from the code.testCases
: Unclear from the code.
Returns:
- None
Type: TestCase
Purpose: Unclear from the code.
Fields:
name
(string):commands
([]string):expected
([]interface{});