Skip to content

Commit cc76497

Browse files
shlomibittonvmittal-msft
authored andcommitted
Add a delay for 'test_ro_user' case 'test_ro_user_banned_command' to allow 'hostcfgd' to start and configure tacas authorization. (sonic-net#3741)
- What is the motivation for this PR? After recent change introduced on this PR's: sonic-net/sonic-buildimage#7965 and sonic-net/sonic-buildimage#8117 'hostcfgd' will be delayed in 90 seconds. If the test will run before the daemon has started, it will fail the test. This is to align with the new change and make sure the test will pass. - How did you do it? Add a delay of 100 seconds before executing authorized commands. - How did you verify/test it? Run the test. Signed-off-by: Shlomi Bitton <shlomibi@nvidia.com>
1 parent b124ed9 commit cc76497

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

tests/tacacs/test_ro_user.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import pytest
2+
import time
23
from tests.common.helpers.assertions import pytest_assert
34

45
pytestmark = [
@@ -151,6 +152,8 @@ def test_ro_user_banned_command(localhost, duthosts, enum_rand_one_per_hwsku_hos
151152
'sudo config'
152153
]
153154

155+
# Wait until hostcfgd started and configured tacas authorization
156+
time.sleep(100)
154157
for command in commands:
155158
banned = ssh_remote_ban_run(localhost, dutip, creds_all_duts[duthost]['tacacs_ro_user'],
156159
creds_all_duts[duthost]['tacacs_ro_user_passwd'], command)

0 commit comments

Comments
 (0)