[cli-sessions] Implement tests for serial-console model,

update tests for ssh-server model
This commit is contained in:
Ivan Davydenko 2023-11-07 23:17:38 +02:00 committed by Ivan Davydenko
parent 1cafc7da17
commit 9e2bdcffcb
4 changed files with 72 additions and 2 deletions

View File

@ -0,0 +1,13 @@
{
"SERIAL_CONSOLE": {
"desc": "SERIAL_CONSOLE configuration in the Config DB table."
},
"SERIAL_CONSOLE_INVALID_INACTIVITY_TIMEOUT": {
"desc": "SERIAL_CONSOLE attribute 'inactivity_timeout' set to invalid value (out of allowed range of [0, 35000] minutes).",
"eStr": "does not satisfy the constraint \"0..35000\""
},
"SERIAL_CONSOLE_INVALID_SYSRQ" : {
"desc": "SERIAL_CONSOLE attribute 'sysrq' set to invalid value",
"eStr": "Invalid value"
}
}

View File

@ -22,5 +22,13 @@
"SSH_SERVER_INVALID_PORTS_2": {
"desc": "Configure invalid port value in SSH_SERVER.",
"eStr": "Invalid port numbers value"
},
"SSH_SERVER_INVALID_INACTIVITY_TIMEOUT": {
"desc": "Configure invalid inactivity_timeout value in SSH_SERVER.",
"eStr": "does not satisfy the constraint \"0..35000\""
},
"SSH_SERVER_INVALID_MAX_SESSIONS": {
"desc": "Configure invalid max_sessions value in SSH_SERVER.",
"eStr": "does not satisfy the constraint \"0..100\""
}
}
}

View File

@ -0,0 +1,31 @@
{
"SERIAL_CONSOLE": {
"sonic-serial-console:sonic-serial-console": {
"sonic-serial-console:SERIAL_CONSOLE": {
"POLICIES": {
"inactivity_timeout": 900,
"sysrq_capabilities": "disabled"
}
}
}
},
"SERIAL_CONSOLE_INVALID_INACTIVITY_TIMEOUT": {
"sonic-serial-console:sonic-serial-console": {
"sonic-serial-console:SERIAL_CONSOLE": {
"POLICIES": {
"inactivity_timeout": -500
}
}
}
},
"SERIAL_CONSOLE_INVALID_SYSRQ" : {
"sonic-serial-console:sonic-serial-console": {
"sonic-serial-console:SERIAL_CONSOLE": {
"POLICIES": {
"sysrq_capabilities": "negative"
}
}
}
}
}

View File

@ -56,5 +56,23 @@
}
}
}
},
"SSH_SERVER_INVALID_INACTIVITY_TIMEOUT": {
"sonic-ssh-server:sonic-ssh-server": {
"sonic-ssh-server:SSH_SERVER": {
"POLICIES":{
"inactivity_timeout": 500000
}
}
}
},
"SSH_SERVER_INVALID_MAX_SESSIONS": {
"sonic-ssh-server:sonic-ssh-server": {
"sonic-ssh-server:SSH_SERVER": {
"POLICIES":{
"max_sessions": 222
}
}
}
}
}
}