keys_test.go
keys_test.go - Overview
This file contains tests for the KEYS
command within the Ironhawk functionality. It verifies that the KEYS
command returns the expected results when used with different patterns and datasets.
Detailed Documentation
TestKEYS
Function
Purpose: Tests the KEYS
command with various patterns, including wildcards and different numbers of matching keys.
Parameters:
t
(*testing.T): The testing object used for running the test.
Returns:
- None
The function defines a series of test cases, each with a name, a list of commands to execute, and the expected results. It then iterates through these test cases, executing the commands and verifying that the actual results match the expected results. The function uses getLocalConnection
to get a client and runTestcases
to execute the test cases.
TestCase
Type
The TestCase
type is not defined in this file.
getLocalConnection
Function
The getLocalConnection
function is not defined in this file.
runTestcases
Function
The runTestcases
function is not defined in this file.