BIND 10 #2395: introduce a simpler way of using waked data source from auth tests
BIND 10 Development
do-not-reply at isc.org
Mon Oct 22 18:55:19 UTC 2012
#2395: introduce a simpler way of using waked data source from auth tests
---------------------------------+-----------------------------------------
Reporter: jinmei | Owner:
Type: defect | Status: new
Priority: medium | Milestone: New Tasks
Component: b10-auth | Keywords:
Sensitive: 0 | Defect Severity: N/A
Sub-Project: DNS | Feature Depending on Ticket:
Estimated Difficulty: 0 | Add Hours to Ticket: 0
Total Hours: 0 | Internal?: 0
---------------------------------+-----------------------------------------
Some of the current tests in auth_srv_unittest tweaks existing
data source clients by bruteforcing its contents (using the
`getDataSources()` interface and directly rewrites the internal).
IMO it relies too much on the internal of data source clients and
makes both the class and tests fragile. For tests of client-list
itself it might be considered a necessary evil, but for tests of their
users I think it goes too far.
This also one major reason we currently need (in #2211, hopefully soon
in master) the `swapDataSrcClientLists`, which also makes the
`DataSrcClientsMgr` integrity weaker. It's also the reason why we
need to return a shared pointer from
`DataSrcClientsMgr::Holder.findClientList()` (because this test
internally destroys the original due to the brutteforce replacement)
even though it could return a bare pointer based on its nature.
What we actually need is, IMO, a cleaner way for tests like
`AuthSrvTest` to use some faked data source clients (e.. one that
throws on `findZone()`, instead of relying on the low level internal
details of the client list implementation.
This task is to design such a way and implement it.
--
Ticket URL: <http://bind10.isc.org/ticket/2395>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list