Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run the redis test server with enable-debug-command #654

Merged
merged 6 commits into from
Feb 3, 2024

Commits on Oct 10, 2023

  1. Run the redis test server with enable-debug-command

    This is required for Redis >= 7.x, cf.
    https://raw.githubusercontent.com/redis/redis/7.0/00-RELEASENOTES:
    
        * MODULE and DEBUG commands disabled (protected) by default, for
          better security (#9920)
    
    Without this patch, some unit tests fail:
    
    ```
    === RUN   TestLatency
        reply_test.go:256:
                    Error Trace:    /<<PKGBUILDDIR>>/_build/src/github.com/gomodule/redigo/redis/reply_test.go:256
                    Error:          Received unexpected error:
                                    ERR DEBUG command not allowed. If the enable-debug-command option is set to "local", you can run it from a local connection, otherwise you need to set this option in the configuration file, and then restart the server.
                    Test:           TestLatency
    --- FAIL: TestLatency (0.00s)
    === RUN   TestLatencyHistories
        reply_test.go:304:
                    Error Trace:    /<<PKGBUILDDIR>>/_build/src/github.com/gomodule/redigo/redis/reply_test.go:304
                    Error:          Received unexpected error:
                                    ERR DEBUG command not allowed. If the enable-debug-command option is set to "local", you can run it from a local connection, otherwise you need to set this option in the configuration file, and then restart the server.
                    Test:           TestLatencyHistories
    --- FAIL: TestLatencyHistories (0.00s)
    ```
    elboulangero committed Oct 10, 2023
    Configuration menu
    Copy the full SHA
    3d8403e View commit details
    Browse the repository at this point in the history

Commits on Oct 23, 2023

  1. test: Do not export version

    As this not needed outside the package there's no need to export it so lower case the type name.
    
    Also switching to semantic version naming of the parameters.
    
    Co-authored-by: Steven Hartland <stevenmhartland@gmail.com>
    elboulangero and stevenh committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    fe5263a View commit details
    Browse the repository at this point in the history
  2. test: Use regexp, more idiomatic go, wrap errors for context

    This can be improve to the following, notice a few things:
    
     -   It's idiomatic in go to avoid naming things get / set
     -   Wrap errors with fmt.Errorf to provide context to the user
    
    Co-authored-by: Steven Hartland <stevenmhartland@gmail.com>
    elboulangero and stevenh committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    ef2a797 View commit details
    Browse the repository at this point in the history
  3. test: GetRedisVersion -> redisServerVersion

    Co-authored-by: Steven Hartland <stevenmhartland@gmail.com>
    elboulangero and stevenh committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    662e4f5 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    552a569 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    fb03d5b View commit details
    Browse the repository at this point in the history