redhat-qe-security / SCAutolib

Library for automation of smart card testing

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Test should not pass if run_cmd hit time out while sending PIN/password.

mahavrila opened this issue · comments

I passwd argument is specified, run_cmd waits for "PIN for" or "Password" string. If it times out while waiting for pin/passwd the test should fail.

EDIT: this seems to cause fail in dev branch, while when kerberos-integration branch is used, it just pass.

run_cmd has to be replaced with a more general run function

run_cmd has to be replaced with a more general run function

general run command as implemented in V2 is wrapper for subprocess, while run_cmd is wrapper around pexpect specifically designed for testing logins. Tests relies on this functionality so I don't think it can be easily replaced by general run command.

run_cmd now has bad implementation, it wouldn't even do what the user (me) would expect from it. So, this function needs very strict revisioning if we would still want to use it because even with the old version of the library, we implemented in tests the fixture that does most of what run_cmd do, but from my perspective in a more clear way. So, ok, maybe simple replacing with the run command is not a very good idea, but run_cmd curtenly need an upgrade and can't stay as it it

I completely agree, run_cmd should be improved and maybe also renamed or moved to fixture. My only concern was to minimize rewriting of existing tests.