Skip to content

Commit

Permalink
Harden lib/apparmortest adminer_delete_database
Browse files Browse the repository at this point in the history
Replacing the send_key_until_needlematch approach with an
assert_and_click to make the tests more robust
  • Loading branch information
DrMullings committed Aug 25, 2020
1 parent a91d7fe commit 05bfdce
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions lib/apparmortest.pm
Expand Up @@ -619,11 +619,10 @@ sub adminer_database_delete {
assert_screen("adminer-save-passwd");
send_key "alt-s";
assert_screen("adminer-select-database");
send_key_until_needlematch("adminer-select-database-test", 'tab', 30, 1);
assert_screen("adminer-select-database-test");
send_key "spc";
send_key_until_needlematch("adminer-database-dropped", 'ret', 10, 1);

assert_and_click("adminer-click-database-test");
assert_and_click("adminer-click-drop-database-test");
# Confirm drop
wait_screen_change { send_key 'spc' }
# Exit x11 and turn to console
send_key "alt-f4";
assert_screen("generic-desktop");
Expand Down

2 comments on commit 05bfdce

@lilyeyes
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for the hardening, but it introduces new fails in SLE I will fix it, see:
poo#70690 - [sle][security][sle15sp3][apparmor] test fails in apache2_changehat: new code change intorduces new fail
https://progress.opensuse.org/issues/70690

@lilyeyes
Copy link
Contributor

Choose a reason for hiding this comment

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

Please sign in to comment.