Always use variable substition for command
Can't do a sudo inside an expect so we run the expect inside the sudo.
This commit is contained in:
parent
5919ba6c6a
commit
62401b72d0
5 changed files with 18 additions and 11 deletions
|
|
@ -164,7 +164,9 @@ if [ -n "$(type expect 2> /dev/null)" ]; then
|
|||
testrun_start "/es:audit-logs/es:audit-log"
|
||||
|
||||
new "CLI scroll test using expect"
|
||||
expect ./test_pagination_expect.exp "$cfg" "$xpath" bob3 bob4
|
||||
sudo="sudo -g ${CLICON_USER}" ## cheat
|
||||
clixon_cli_="${clixon_cli##$sudo }"
|
||||
clixon_cli="$clixon_cli_" $sudo --preserve-env=clixon_cli expect ./test_pagination_expect.exp "$cfg" "$xpath" bob3 bob4
|
||||
if [ $? -ne 0 ]; then
|
||||
err1 "Failed: CLI show paginate state scroll using expect"
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue