ldap: Add YANG tests
This commit is contained in:
parent
fd753d8ace
commit
ebb5155ca4
@ -163,6 +163,7 @@ setup(
|
||||
'./yang-models/sonic-system-aaa.yang',
|
||||
'./yang-models/sonic-system-tacacs.yang',
|
||||
'./yang-models/sonic-system-radius.yang',
|
||||
'./yang-models/sonic-system-ldap.yang',
|
||||
'./yang-models/sonic-telemetry.yang',
|
||||
'./yang-models/sonic-telemetry_client.yang',
|
||||
'./yang-models/sonic-gnmi.yang',
|
||||
|
@ -1612,6 +1612,22 @@
|
||||
"timeout": "5"
|
||||
}
|
||||
},
|
||||
"LDAP": {
|
||||
"global": {
|
||||
"bind_dn": "test_bind",
|
||||
"bind_password": "secret",
|
||||
"bind_timeout": "5",
|
||||
"version": "3",
|
||||
"base_dn": "test_base",
|
||||
"port": "389",
|
||||
"timeout": "5"
|
||||
}
|
||||
},
|
||||
"LDAP_SERVER": {
|
||||
"192.168.1.1": {
|
||||
"priority": "5"
|
||||
}
|
||||
},
|
||||
"NAT_BINDINGS": {
|
||||
"bind1": {
|
||||
"nat_pool": "pool1",
|
||||
|
16
src/sonic-yang-models/tests/yang_model_tests/tests/ldap.json
Normal file
16
src/sonic-yang-models/tests/yang_model_tests/tests/ldap.json
Normal file
@ -0,0 +1,16 @@
|
||||
{
|
||||
"LDAP_TABLE": {
|
||||
"desc": "Configure LDAP global fields."
|
||||
},
|
||||
"LDAP_INVALID_TIMEOUT_TEST": {
|
||||
"desc": "LDAP global configuration with invalid timeout value in LDAP table.",
|
||||
"eStr": "LDAP timeout must be 1..60"
|
||||
},
|
||||
"LDAP_SERVER_TEST" : {
|
||||
"desc": "LDAP server configuration in LDAP_SERVER table."
|
||||
},
|
||||
"LDAP_SERVER_INVALID_PRIORITY_TEST": {
|
||||
"desc": "LDAP server configuration with invalid priority value in LDAP_SERVER table.",
|
||||
"eStr": "LDAP server priority must be 1..8"
|
||||
}
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
{
|
||||
"LDAP_TABLE": {
|
||||
"sonic-system-ldap:sonic-system-ldap": {
|
||||
"sonic-system-ldap:LDAP": {
|
||||
"global":{
|
||||
"bind_dn": "test_bind",
|
||||
"bind_password": "secret",
|
||||
"bind_timeout": "5",
|
||||
"version": "3",
|
||||
"base_dn": "test_base",
|
||||
"port": "389",
|
||||
"timeout": "5"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"LDAP_INVALID_TIMEOUT_TEST": {
|
||||
"sonic-system-ldap:sonic-system-ldap": {
|
||||
"sonic-system-ldap:LDAP": {
|
||||
"global": {
|
||||
"bind_dn": "test_bind",
|
||||
"bind_password": "secret",
|
||||
"bind_timeout": "5",
|
||||
"version": "3",
|
||||
"base_dn": "test_base",
|
||||
"port": "389",
|
||||
"timeout": 150
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"LDAP_SERVER_TEST": {
|
||||
"sonic-system-ldap:sonic-system-ldap": {
|
||||
"sonic-system-ldap:LDAP_SERVER": {
|
||||
"LDAP_SERVER_LIST": [
|
||||
{
|
||||
"hostname": "192.168.1.1",
|
||||
"priority": 1
|
||||
},
|
||||
{
|
||||
"hostname": "ldap_server_1",
|
||||
"priority": 2
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"LDAP_SERVER_INVALID_PRIORITY_TEST": {
|
||||
"sonic-system-ldap:sonic-system-ldap": {
|
||||
"sonic-system-ldap:LDAP_SERVER": {
|
||||
"LDAP_SERVER_LIST": [
|
||||
{
|
||||
"hostname": "192.168.1.1",
|
||||
"priority": 70
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user