Fix range check for NFS used ratio
The nfs_used_ratio configuration parameter is supposed to be
greater than zero and less than or equal to one. However,
current configuration checks actually allow values greater
than one because of a logic error. Unit tests fail to detect
this issue because they find the exception that they expect
to find, but it is actually being thrown for another reason.
This commit fixes the logic error in the nfs driver code.
It also reworks all the unit tests for the do_setup method since
they suffer from the same issue that led to failure to detect
this error in the first place - they fail to do proper mocks of
submethods, and when these run the expected exception gets triggered
for the wrong reason. We have moved these tests into their own test
class, where mock is used rather than mox. Over time it is likely
that new tests will be implemented, or old tests reworked, with mock
instead of mox. These can go in the new test class, which can be
renamed if that is appropriate.
Change-Id: I19ab396057fb6f60ad8e7d10944384db7e95ece6
Fixes-bug:
1445786