summaryrefslogtreecommitdiffstats
path: root/src/python
diff options
context:
space:
mode:
authorPavel Březina <pbrezina@redhat.com>2016-11-22 15:50:47 +0100
committerLukas Slebodnik <lslebodn@redhat.com>2016-12-19 23:28:55 +0100
commit8d5292227a8d1ab9c6aa5b88d8ac8655cd1223e5 (patch)
treed44beccd9eaaa79b89af40f9f78ea91a69e39d65 /src/python
parent4049b63f8c67ada17b453463b0451ca6be3d5de4 (diff)
downloadsssd-8d5292227a8d1ab9c6aa5b88d8ac8655cd1223e5.tar.gz
sssd-8d5292227a8d1ab9c6aa5b88d8ac8655cd1223e5.tar.xz
sssd-8d5292227a8d1ab9c6aa5b88d8ac8655cd1223e5.zip
nss: make nss responder tests work with new code
There were few type of changes that were require for tests to work: 1) When calling "get by name" commands, a name is parsed with sss_parse_inp. Returned value is now mocked. 2) When calling "get by upn" commands, a name is parsed with sss_parse_inp and negative cache is not hit in the first run since cache_req knows it may be upn since it is not equal to any known domain. Returned value of sss_parse_inp is now mocked to return ERR_DOMAIN_NOT_FOUND and negative cache hits are checked to be 0. 3) Lookups by certificate or sid do not require name parsing so those have separate mock functions. 4) Sometime the test fail since different number of mocked functions is called due to changes in the code. Where possible, will_return_always() is used, otherwise number of mocked values was fixed. 5) In SID by name lookups, we set nss_test_ctx->tctx->done to false on the beggining of for cycle, since the code now contains tevent calls and withough it only a first request proceed into tevent_loop in test_ev_loop() because the first finished request sets it to true. Resolves: https://fedorahosted.org/sssd/ticket/3151 Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
Diffstat (limited to 'src/python')
0 files changed, 0 insertions, 0 deletions