diff --git a/tests/unit/modules/network/nxos/fixtures/nxos_feature/show_feature.txt b/tests/unit/modules/network/nxos/fixtures/nxos_feature/show_feature.txt index e27c595cf..3e1acb670 100644 --- a/tests/unit/modules/network/nxos/fixtures/nxos_feature/show_feature.txt +++ b/tests/unit/modules/network/nxos/fixtures/nxos_feature/show_feature.txt @@ -2,3 +2,4 @@ Feature Name Instance State -------------------- -------- ----- nve 1 disabled ospf 1 enabled +eth-port-sec 1 enabled \ No newline at end of file diff --git a/tests/unit/modules/network/nxos/test_nxos_feature.py b/tests/unit/modules/network/nxos/test_nxos_feature.py index e98fbce1e..87aaaf6a5 100644 --- a/tests/unit/modules/network/nxos/test_nxos_feature.py +++ b/tests/unit/modules/network/nxos/test_nxos_feature.py @@ -93,6 +93,10 @@ def test_nxos_feature_disable(self): result = self.execute_module(changed=True) self.assertEqual(result["commands"], ["terminal dont-ask", "no feature ospf"]) + def test_nxos_feature_port_security_disable(self): + set_module_args(dict(feature="port-security", state="disabled")) + result = self.execute_module(changed=True) + self.assertEqual(result["commands"], ["terminal dont-ask", "no feature port-security"]) class TestNxosFeatureModuleMDS(TestNxosModule): module = nxos_feature @@ -171,3 +175,8 @@ def test_nxos_feature_disable_already_disabled(self): set_module_args(dict(feature="sftp-server", state="disabled")) result = self.execute_module(changed=False) self.assertEqual(result["commands"], []) + + def test_nxos_feature_port_security_enable(self): + set_module_args(dict(feature="port-security", state="enabled")) + result = self.execute_module(changed=True) + self.assertEqual(result["commands"], ["terminal dont-ask", "feature port-security"]) \ No newline at end of file