You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by vi...@apache.org on 2017/04/21 17:46:02 UTC

[8/8] mesos git commit: Enabled authorization in default executor check tests.

Enabled authorization in default executor check tests.

This patch enables authorization in the check and health check
tests which use the default executor. Simple permissive ACLs are
set, forcing the local authorizer to be loaded which allows us
to test the implicit executor authorization code for agent
operator API calls.

Review: https://reviews.apache.org/r/58458/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/3f5b2c90
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/3f5b2c90
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/3f5b2c90

Branch: refs/heads/master
Commit: 3f5b2c90c2f6825148662db8e1e88be08f37f3b5
Parents: 0124cbf
Author: Greg Mann <gr...@mesosphere.io>
Authored: Fri Apr 21 10:45:41 2017 -0700
Committer: Vinod Kone <vi...@gmail.com>
Committed: Fri Apr 21 10:45:41 2017 -0700

----------------------------------------------------------------------
 src/tests/check_tests.cpp        | 7 +++++++
 src/tests/health_check_tests.cpp | 7 +++++++
 2 files changed, 14 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/3f5b2c90/src/tests/check_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/check_tests.cpp b/src/tests/check_tests.cpp
index 79ba5eb..72fa64c 100644
--- a/src/tests/check_tests.cpp
+++ b/src/tests/check_tests.cpp
@@ -891,6 +891,13 @@ protected:
     // executors to authenticate with the agent operator API if Mesos was not
     // built with SSL support.
     flags.authenticate_http_readwrite = false;
+
+    // Set permissive ACLs in the agent so that the local authorizer will be
+    // loaded and implicit executor authorization will be tested.
+    ACLs acls;
+    acls.set_permissive(true);
+
+    flags.acls = acls;
 #endif // USE_SSL_SOCKET
 
     return flags;

http://git-wip-us.apache.org/repos/asf/mesos/blob/3f5b2c90/src/tests/health_check_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/health_check_tests.cpp b/src/tests/health_check_tests.cpp
index 3bba1bb..f5375ac 100644
--- a/src/tests/health_check_tests.cpp
+++ b/src/tests/health_check_tests.cpp
@@ -2153,6 +2153,13 @@ TEST_F_TEMP_DISABLED_ON_WINDOWS(
   // executors to authenticate with the agent operator API if Mesos was not
   // built with SSL support.
   flags.authenticate_http_readwrite = false;
+
+  // Set permissive ACLs in the agent so that the local authorizer will be
+  // loaded and implicit executor authorization will be tested.
+  ACLs acls;
+  acls.set_permissive(true);
+
+  flags.acls = acls;
 #endif // USE_SSL_SOCKET
 
   Fetcher fetcher;