-
Notifications
You must be signed in to change notification settings - Fork 266
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
WIP fix redis cli for validate_script_output('redis-cli get foo', sub { m/(nil)/ }) #15592
Conversation
ac67632
to
139e30f
Compare
schedule/functional/redis.yaml
Outdated
@@ -0,0 +1,17 @@ | |||
--- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not necessary. Just use INCLUDE_MODULES=bootloader_start,boot_to_desktop,redis
when you're running your verifications ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, thanks!
tests/console/redis.pm
Outdated
@@ -37,7 +38,7 @@ sub run { | |||
validate_script_output('redis-cli get foo', sub { m/bar/ }); | |||
validate_script_output('redis-cli pfselftest', sub { m/OK/ }); | |||
validate_script_output('redis-cli flushdb', sub { m/OK/ }); | |||
validate_script_output('redis-cli get foo', sub { m/(nil)/ }); | |||
validate_script_output('redis-cli get foo', sub { m/(nil)/ }) if (!is_svirt); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not needed. The output is just not nil
but \n
so it can be done better with some perl magic 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this can help: https://perlmaven.com/check-if-string-is-empty-or-has-only-spaces-in-perl
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still don't understand this, this is working on qemu_x86_64. Do you mean to use sub { m/(nil) \n/ } ?
thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something like that. In qemu backend it is (null)
but in svirt
it's probably \n
8b73be6
to
9ba9db0
Compare
found changes about 2 weeks ago: os-autoinst@e839895 breaks the test on svirt backend. use chomp to remove the last trailing newline from the input string see poo#116773 for details
@Zaoliang you can close this one now. Happens that flushdb was deleting all keys, so just checking that the key didn't exist in the store, was good enough |
close this pr because of #15630, thanks for your feedback and input! |
need to use svirt remote worker on OSD
[type description here, PLEASE, REMOVE THIS LINE, PLACEHOLDER, BEFORE SUBMITTING THIS PULL REQUEST]