Unit tests for zfssa driver don't actually check anything

Bug #1404339 reported by John Griffith on 2014-12-19
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Undecided
abhiram moturi

Bug Description

Noticing a number of submissions lately where unit tests were just calling a driver method, but never actually checking results or behaviors; in other words "I sent the call and it didn't blow up so I must be ok", hardly a good unit test IMO.

So I started looking around and found there are some unit tests that we let in that do this very thing. The zfssa test is one example; this should be fixed up to have proper unit testing and we should be a bit more careful about this sort of thing in our reviews (myself included obviously).

Juan Zuluaga (juan-c-zuluaga) wrote :

Definitely this has to be improved.
Nevertheless, not all zfssa unit tests don't check anything.

Changed in cinder:
assignee: nobody → Juan Zuluaga (juan-c-zuluaga)
status: New → In Progress
Changed in cinder:
assignee: Juan Zuluaga (juan-c-zuluaga) → abhiram moturi (abhiram-moturi)
Erlon R. Cruz (sombrafam) wrote :

Also, it should there be an acceptable coverage of the function. A test can check a simple condition while all other flows still untouched.

tags: added: zfssa

Fix proposed to branch: master
Review: https://review.openstack.org/203895

Change abandoned by Mike Perez (<email address hidden>) on branch: master
Review: https://review.openstack.org/152676
Reason: Over a month with no update.

Reviewed: https://review.openstack.org/203895
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=af3a73e720a970ff080cd4f77caebe06216b1f3a
Submitter: Jenkins
Branch: master

commit af3a73e720a970ff080cd4f77caebe06216b1f3a
Author: Abhiram Moturi <email address hidden>
Date: Tue Jul 21 00:58:23 2015 +0000

    Enhance unit tests for zfssa drivers

    This fix improves the unit tests for the zfssa drivers
    and increases the test coverage.

    Change-Id: I5a143b7ca4bf8e6560c7e389e1fd9b0e23e4ea16
    Closes-Bug: #1404339

Changed in cinder:
status: In Progress → Fix Committed
Thierry Carrez (ttx) on 2015-09-03
Changed in cinder:
milestone: none → liberty-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2015-10-15
Changed in cinder:
milestone: liberty-3 → 7.0.0
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers