You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by me...@apache.org on 2014/11/04 00:16:01 UTC
[5/5] git commit: Integrated CRAM-MD5 Authenticator module into tests.
Integrated CRAM-MD5 Authenticator module into tests.
The CRAM-MD5 authenticator module is now usable via mesos-tests.sh
Example usage:
bin/mesos-tests.sh \
--authenticators=org_apache_mesos_TestCRAMMD5Authenticator \
--modules="{\"libraries\": [{\"file\": \
\"src/.libs/libtestauthenticator.so\",\"modules\": [{\"name\": \
\"org_apache_mesos_TestCRAMMD5Authenticator\"}]}]}"
Review: https://reviews.apache.org/r/26860
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/0756d185
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/0756d185
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/0756d185
Branch: refs/heads/master
Commit: 0756d185ab095d88d7313305417939260067a17f
Parents: 9ca757f
Author: Till Toenshoff <to...@me.com>
Authored: Mon Nov 3 14:56:43 2014 -0800
Committer: Adam B <ad...@mesosphere.io>
Committed: Mon Nov 3 14:57:09 2014 -0800
----------------------------------------------------------------------
src/tests/flags.hpp | 12 ++++++++++++
src/tests/mesos.cpp | 2 ++
2 files changed, 14 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/0756d185/src/tests/flags.hpp
----------------------------------------------------------------------
diff --git a/src/tests/flags.hpp b/src/tests/flags.hpp
index 2886e89..e988b6f 100644
--- a/src/tests/flags.hpp
+++ b/src/tests/flags.hpp
@@ -28,6 +28,7 @@
#include "common/parse.hpp"
#include "common/type_utils.hpp"
#include "logging/logging.hpp"
+#include "master/constants.hpp"
#include "messages/messages.hpp"
namespace mesos {
@@ -130,6 +131,16 @@ public:
"'cgroups/cpu,cgroups/mem', or network/port_mapping\n"
"(configure with flag: --with-network-isolator to enable),\n"
"or 'external'.");
+
+ // This help message is duplicated from master/flags.hpp and
+ // should always be kept in sync with that.
+ add(&Flags::authenticators,
+ "authenticators",
+ "Authenticator implementation to use when authenticating frameworks\n"
+ "and/or slaves. "
+ "Use the default '" + master::DEFAULT_AUTHENTICATOR + "', or\n"
+ "load an alternate authenticator module using --modules.",
+ master::DEFAULT_AUTHENTICATOR);
}
bool verbose;
@@ -139,6 +150,7 @@ public:
std::string docker;
Option<Modules> modules;
Option<std::string> isolation;
+ std::string authenticators;
};
// Global flags for running the tests.
http://git-wip-us.apache.org/repos/asf/mesos/blob/0756d185/src/tests/mesos.cpp
----------------------------------------------------------------------
diff --git a/src/tests/mesos.cpp b/src/tests/mesos.cpp
index 2e8e39a..3b98c69 100644
--- a/src/tests/mesos.cpp
+++ b/src/tests/mesos.cpp
@@ -123,6 +123,8 @@ master::Flags MesosTest::CreateMasterFlags()
// On many test VMs, this default is too small.
flags.registry_store_timeout = flags.registry_store_timeout * 5;
+ flags.authenticators = tests::flags.authenticators;
+
return flags;
}