----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/48968/#review139289 -----------------------------------------------------------
src/tests/persistent_volume_endpoints_tests.cpp (line 527) <https://reviews.apache.org/r/48968/#comment204453> Why are we doing `create-volumes` twice but not testing `destroy-volumes`? Note that when we add a test for `destroy-volumes`, we should be sure to ensure that the test would fail if we removed the newly added validation code. i.e., you'll probably want to create a volume that *would* have been destroyed by the improperly validated / mangled `destroy-volumes` call. src/tests/reservation_endpoints_tests.cpp (line 819) <https://reviews.apache.org/r/48968/#comment204454> and unreserve. src/tests/reservation_endpoints_tests.cpp (line 863) <https://reviews.apache.org/r/48968/#comment204455> Seems like this would fail regardless, no? i.e., we want to ensure the unreserve request would succeed (=> test would fail) without the newly added validation logic. - Neil Conway On June 23, 2016, 5:06 p.m., Greg Mann wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/48968/ > ----------------------------------------------------------- > > (Updated June 23, 2016, 5:06 p.m.) > > > Review request for mesos, Anand Mazumdar, Neil Conway, and Vinod Kone. > > > Bugs: MESOS-5664 > https://issues.apache.org/jira/browse/MESOS-5664 > > > Repository: mesos > > > Description > ------- > > This patch fixes a bug in which invalid resources supplied > to the master's '/reserve', '/unreserve', '/create-volumes', > and '/destroy-volumes' HTTP endpoints were silently > ignored, without returning an error as expected. > > > Diffs > ----- > > src/master/http.cpp 70f084b84db90fde20c05d2354be190f28e72996 > src/tests/persistent_volume_endpoints_tests.cpp > b66c337808af673b6f98bbc9807d5bd1cb34731e > src/tests/reservation_endpoints_tests.cpp > e029f4e1b1da434fd6eb267675528ab97370be24 > > Diff: https://reviews.apache.org/r/48968/diff/ > > > Testing > ------- > > New tests were added - `PersistentVolumeEndpointsTest.InvalidVolume` and > `ReservationEndpointsTest.InvalidResource` - to check that requests to the > affected endpoints will fail correctly when invalid resources are supplied. I > checked that these tests failed before the fix, and passed after. > > `make check` on OSX was used to test as well. > > > Thanks, > > Greg Mann > >
