p5-RedisDB / RedisDB

Perl extension to access Redis
22 stars 11 forks source link

ERR DEBUG command not allowed #45

Open eserte opened 1 year ago

eserte commented 1 year ago

t/redis_commands.t fails on some of my smoker systems (freebsd 12, freebsd 13):

    #   Failed test 'DEBUG ERROR'
    #   at t/redis_commands.t line 333.
    # expecting: Regexp ((?^:Boo!))
    # found: RedisDB::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.)
    # Looks like you failed 1 test of 18.

#   Failed test 'Server info commands'
#   at t/redis_commands.t line 18.
# Looks like you failed 1 test of 10.
t/redis_commands.t ......... 
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/10 subtests 
    (less 1 skipped subtest: 8 okay)
Tux commented 3 months ago

Same here

t/redis_commands.t ......... 1/?
    #   Failed test 'DEBUG ERROR'
    #   at t/redis_commands.t line 333.
    # expecting: Regexp ((?^:Boo!))
    # found: RedisDB::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.)
    # Looks like you failed 1 test of 18.

#   Failed test 'Server info commands'
#   at t/redis_commands.t line 18.
# Looks like you failed 1 test of 10.
t/redis_commands.t ......... Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/10 subtests
        (less 1 skipped subtest: 8 okay)
Linux 6.9.3-1-default [openSUSE Tumbleweed 20240610]
This is perl 5, version 40, subversion 0 (v5.40.0) built for x86_64-linux-thread-multi-quadmath
redis-7.2.5-1.1.x86_64
Tux commented 3 months ago
    if ( $redis->version gt 2.008008 ) {
        throws_ok {
            $redis->debug_error("Boo!");
        }
        qr/Boo!/, "DEBUG ERROR";
    }
    else {
        diag "Skipped tests for redis >= 2.8.8";
    }

is misleading either in warning or in test. I would expect based on the warning

    if ( $redis->version lt 2.008008 ) {
        throws_ok {
            $redis->debug_error("Boo!");
        }
        qr/Boo!/, "DEBUG ERROR";
    }
    else {
        diag "Skipped tests for redis >= 2.8.8";
    }

with gtlt all tests PASS