Skip to main content

command_list_test.go

command_list_test.go - Overview

This file contains tests for the COMMAND LIST functionality of the DiceDB client. It verifies that the command list is not empty and benchmarks the retrieval of the command list.

Detailed Documentation

TestCommandList

Purpose: Tests that the command list retrieved from the DiceDB server is not empty.

Parameters:

  • t (*testing.T): Testing object for running the test.

Returns: None

getCommandList

Purpose: Retrieves the command list from the DiceDB server.

Parameters:

  • client (*dicedb.Client): The DiceDB client used to communicate with the server.

Returns:

  • []string: A slice of strings, where each string represents a command. Returns nil if the response is nil.

BenchmarkCommandList

Purpose: Benchmarks the performance of retrieving the command list from the DiceDB server.

Parameters:

  • b (*testing.B): Benchmark object for running the benchmark.

Returns: None

Getting Started Relevance