Skip to content

Commit

Permalink
[cli-sessions] Implement tests for serial-console model,
Browse files Browse the repository at this point in the history
 update tests for ssh-server model
  • Loading branch information
i-davydenko committed Jan 10, 2024
1 parent 1cafc7d commit 9e2bdcf
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -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"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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\""
}
}
}
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
}
}
}
}

0 comments on commit 9e2bdcf

Please sign in to comment.