Skip to content

Commit

Permalink
Improve test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
liuh-80 committed Apr 29, 2024
1 parent 008092a commit 3f3dcbf
Show file tree
Hide file tree
Showing 7 changed files with 79 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"AAA|accounting": {
"login": "tacacs+,local"
},
"TACPLUS|global": {
"auth_type": "login",
"passkey": "testpasskey"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"AAA|accounting": {
"login": "tacacs+,local"
},
"AAA|authentication": {
"login": "tacacs+"
},
"TACPLUS|global": {
"auth_type": "login",
"passkey": "testpasskey"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"AAA": {
"accounting": {
"login": "tacacs+,local"
},
"authentication": {
"login": "tacacs+"
},
"authorization": {
"login": "tacacs+"
}
},
"TACPLUS": {
"global": {
"auth_type": "login",
"passkey": "testpasskey"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"AAA|authentication": {
"login": "tacacs+"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"AAA|accounting": {
"login": "tacacs+,local"
},
"AAA|authentication": {
"login": "tacacs+"
},
"TACPLUS|global": {
"auth_type": "login",
"passkey": "testpasskey"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"AAA": {
"accounting": {
"login": "tacacs+,local"
},
"authentication": {
"login": "tacacs+"
},
"authorization": {
"login": "tacacs+"
}
},
"TACPLUS": {
"global": {
"auth_type": "login",
"passkey": "testpasskey"
}
}
}
4 changes: 3 additions & 1 deletion tests/db_migrator_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -971,7 +971,9 @@ def load_golden_config(self, dbmgtr, test_json):
@pytest.mark.parametrize('test_json', ['per_command_aaa_enable',
'per_command_aaa_no_passkey',
'per_command_aaa_disable',
'per_command_aaa_no_change'])
'per_command_aaa_no_change',
'per_command_aaa_no_tacplus',
'per_command_aaa_no_authentication'])
def test_per_command_aaa(self, test_json):
dbconnector.dedicated_dbs['CONFIG_DB'] = os.path.join(mock_db_path, 'config_db', test_json)
import db_migrator
Expand Down

0 comments on commit 3f3dcbf

Please sign in to comment.