----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/41790/#review121134 -----------------------------------------------------------
src/tests/dynamic_weights_tests.cpp (line 345) <https://reviews.apache.org/r/41790/#comment182785> s/Only/only/ src/tests/dynamic_weights_tests.cpp (line 544) <https://reviews.apache.org/r/41790/#comment182786> s/Setup ACLs so that/Set ACLs to be non-permissive by default so that/ src/tests/dynamic_weights_tests.cpp (lines 72 - 73) <https://reviews.apache.org/r/41790/#comment182789> "The dynamic weights tests in this file are split into logical groups:" src/tests/dynamic_weights_tests.cpp (line 84) <https://reviews.apache.org/r/41790/#comment182790> s/with/from/ src/tests/dynamic_weights_tests.cpp (line 89) <https://reviews.apache.org/r/41790/#comment182791> We don't (yet) use `CHECK_GE/LE/GT/LT` anywhere, I think because we want tests themselves to try to be exact. This might be more appropriate as `ASSERT_GE(tokens.size(), 1u)`. Is it really even all that bad if `weightsFlag` was an empty string with no tokens? You'd just return an empty `infos`. - Adam B On March 8, 2016, 9:52 p.m., Yongqiao Wang wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/41790/ > ----------------------------------------------------------- > > (Updated March 8, 2016, 9:52 p.m.) > > > Review request for mesos, Adam B, Neil Conway, and Qian Zhang. > > > Bugs: MESOS-4200 > https://issues.apache.org/jira/browse/MESOS-4200 > > > Repository: mesos > > > Description > ------- > > Add tests for /weights endpoint. > > > Diffs > ----- > > src/Makefile.am a41e95ddeb838fdebf4ced953c4a29181916e261 > src/tests/dynamic_weights_tests.cpp PRE-CREATION > > Diff: https://reviews.apache.org/r/41790/diff/ > > > Testing > ------- > > Make and Make check successfully! > > $ ./src/mesos-tests --gtest_filter=DynamicWeightsTest.* > [==========] Running 11 tests from 1 test case. > [----------] Global test environment set-up. > [----------] 11 tests from DynamicWeightsTest > [ RUN ] DynamicWeightsTest.PutInvalidRequest > [ OK ] DynamicWeightsTest.PutInvalidRequest (87 ms) > [ RUN ] DynamicWeightsTest.ZeroWeight > [ OK ] DynamicWeightsTest.ZeroWeight (44 ms) > [ RUN ] DynamicWeightsTest.NegativeWeight > [ OK ] DynamicWeightsTest.NegativeWeight (42 ms) > [ RUN ] DynamicWeightsTest.NonNumericWeight > [ OK ] DynamicWeightsTest.NonNumericWeight (37 ms) > [ RUN ] DynamicWeightsTest.MissingRole > [ OK ] DynamicWeightsTest.MissingRole (42 ms) > [ RUN ] DynamicWeightsTest.UnknownRole > [ OK ] DynamicWeightsTest.UnknownRole (38 ms) > [ RUN ] DynamicWeightsTest.UpdateWeightsWithExplictRoles > [ OK ] DynamicWeightsTest.UpdateWeightsWithExplictRoles (38 ms) > [ RUN ] DynamicWeightsTest.UnauthenticatedUpdateWeightRequest > [ OK ] DynamicWeightsTest.UnauthenticatedUpdateWeightRequest (35 ms) > [ RUN ] DynamicWeightsTest.AuthorizedWeightUpdateRequest > [ OK ] DynamicWeightsTest.AuthorizedWeightUpdateRequest (45 ms) > [ RUN ] DynamicWeightsTest.AuthorizedUpdateWeightRequestWithoutPrincipal > [ OK ] DynamicWeightsTest.AuthorizedUpdateWeightRequestWithoutPrincipal > (38 ms) > [ RUN ] DynamicWeightsTest.UnauthorizedWeightUpdateRequest > [ OK ] DynamicWeightsTest.UnauthorizedWeightUpdateRequest (35 ms) > [----------] 11 tests from DynamicWeightsTest (482 ms total) > > [----------] Global test environment tear-down > [==========] 11 tests from 1 test case ran. (490 ms total) > [ PASSED ] 11 tests. > > > Thanks, > > Yongqiao Wang > >