Skip to content

Commit

Permalink
[test plan] Macsec docker restart (#9527)
Browse files Browse the repository at this point in the history
* Initial commit for MACsec_Docker_Restart
* Update MACsec-test-plan.md
  • Loading branch information
parmarkj authored Oct 9, 2024
1 parent 6c6f6fd commit db35ec7
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/testplan/MACsec-test-plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
- [Config reload done on DUT with macsec configuration](#config-reload-done-on-dut-with-macsec-configuration)
- [Everflow, port mirroring on macsec enabled interfaces](#everflow-port-mirroring-on-macsec-enabled-interfaces)
- [Testcase : Macsec scenario's for multi-asic, multi-dut](#testcase--macsec-scenarios-for-multi-asic-multi-dut)
- [Testcase : Macsec docker restart](#testcase--macsec-docker-restart)
- [Testcase : Scale tests](#testcase--scale-tests)
- [Large number of interfaces having macsec enabled on the DUT/linecard](#large-number-of-interfaces-having-macsec-enabled-on-the-dutlinecard)
- [Simultaneous rekeying in all macsec sessions](#simultaneous-rekeying-in-all-macsec-sessions)
Expand Down Expand Up @@ -488,6 +489,11 @@ The switch should only react encrypted PFC frames, send encrypted PFC frames.
- Verify macsec packet flow where the Ingress and Egress ports are on different Linecards.
- TODO add expected behavior

### Testcase : Macsec docker restart

- Verify that macsec sessions are restored when macsec docker containers are restarted


### Testcase : Scale tests

#### Large number of interfaces having macsec enabled on the DUT/linecard
Expand Down
22 changes: 22 additions & 0 deletions tests/macsec/test_docker_restart.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import pytest
import logging

from tests.common.utilities import wait_until
from .macsec_helper import check_appl_db

logger = logging.getLogger(__name__)

pytestmark = [
pytest.mark.macsec_required,
pytest.mark.topology('t2')
]


def test_restart_macsec_docker(duthosts, ctrl_links, policy, cipher_suite, send_sci,
enum_rand_one_per_hwsku_frontend_hostname):
duthost = duthosts[enum_rand_one_per_hwsku_frontend_hostname]

logger.info(duthost.shell(cmd="docker ps", module_ignore_errors=True)['stdout'])
duthost.restart_service("macsec")
logger.info(duthost.shell(cmd="docker ps", module_ignore_errors=True)['stdout'])
assert wait_until(300, 6, 12, check_appl_db, duthost, ctrl_links, policy, cipher_suite, send_sci)

0 comments on commit db35ec7

Please sign in to comment.