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

WIP fix redis cli for validate_script_output('redis-cli get foo', sub { m/(nil)/ }) #15592

Closed
wants to merge 1 commit into from

Conversation

Zaoliang
Copy link
Contributor

need to use svirt remote worker on OSD

[type description here, PLEASE, REMOVE THIS LINE, PLACEHOLDER, BEFORE SUBMITTING THIS PULL REQUEST]

@@ -0,0 +1,17 @@
---
Copy link
Member

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 ;)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, thanks!

@@ -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);
Copy link
Member

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 😄

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

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!

Copy link
Member

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

@Zaoliang Zaoliang changed the title WIP use short yaml schedule for fast debug WIP fix redis cli for validate_script_output('redis-cli get foo', sub { m/(nil)/ }) Sep 30, 2022
tests/console/redis.pm Outdated Show resolved Hide resolved
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
@foursixnine
Copy link
Member

@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

@Zaoliang
Copy link
Contributor Author

Zaoliang commented Oct 4, 2022

close this pr because of #15630, thanks for your feedback and input!

@Zaoliang Zaoliang closed this Oct 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants