This is an automated email from the ASF dual-hosted git repository.

bmahler pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit 04cedd2e301afd11d2e5dd282d0af0c015b9a7b9
Author: Benjamin Mahler <[email protected]>
AuthorDate: Thu Feb 1 19:04:01 2018 -0800

    Added a test for validation of UPDATE_QUOTA master::Call.
    
    Review: https://reviews.apache.org/r/65783
---
 src/tests/master_validation_tests.cpp | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/src/tests/master_validation_tests.cpp 
b/src/tests/master_validation_tests.cpp
index ec4fd13..d55278c 100644
--- a/src/tests/master_validation_tests.cpp
+++ b/src/tests/master_validation_tests.cpp
@@ -82,6 +82,24 @@ namespace internal {
 namespace tests {
 
 
+TEST(MasterCallValidationTest, UpdateQuota)
+{
+  Option<Error> error;
+
+  mesos::master::Call updateQuota;
+  updateQuota.set_type(mesos::master::Call::UPDATE_QUOTA);
+
+  // Missing `update_quota` field.
+  error = master::validation::master::call::validate(updateQuota);
+  EXPECT_SOME(error);
+
+  updateQuota.mutable_update_quota();
+
+  error = master::validation::master::call::validate(updateQuota);
+  EXPECT_NONE(error);
+}
+
+
 class ResourceValidationTest : public ::testing::Test
 {
 protected:

Reply via email to