You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by jo...@apache.org on 2015/10/28 21:18:55 UTC

[4/5] mesos git commit: SSLTest refactor: Added SSLTemporaryDirectoryTest alias for non-SSL.

SSLTest refactor: Added SSLTemporaryDirectoryTest alias for non-SSL.

When `--enable-ssl` is not present, the body of the
`SSLTemporaryDirectoryTest` is #ifdef'd out, such that
`SSLTemporaryDirectoryTest` is an empty wrapper around
`TemporaryDirectoryTest`.

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


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

Branch: refs/heads/master
Commit: f78de5b4a34adc414b2c361c587063852da7d997
Parents: b58afdd
Author: Joseph Wu <jo...@mesosphere.io>
Authored: Wed Oct 28 14:40:16 2015 -0500
Committer: Joris Van Remoortere <jo...@gmail.com>
Committed: Wed Oct 28 15:08:22 2015 -0500

----------------------------------------------------------------------
 3rdparty/libprocess/include/process/ssl/gtest.hpp | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/f78de5b4/3rdparty/libprocess/include/process/ssl/gtest.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/include/process/ssl/gtest.hpp b/3rdparty/libprocess/include/process/ssl/gtest.hpp
index 1f6c04f..54885ec 100644
--- a/3rdparty/libprocess/include/process/ssl/gtest.hpp
+++ b/3rdparty/libprocess/include/process/ssl/gtest.hpp
@@ -20,7 +20,6 @@
 #define __PROCESS_SSL_TEST_HPP__
 
 #ifdef USE_SSL_SOCKET
-
 #include <string>
 
 #include <openssl/rsa.h>
@@ -29,7 +28,9 @@
 #include <openssl/x509v3.h>
 
 #include <process/io.hpp>
+#include <process/process.hpp>
 #include <process/socket.hpp>
+#include <process/subprocess.hpp>
 
 #include <process/ssl/utilities.hpp>
 
@@ -37,9 +38,11 @@
 #include <stout/option.hpp>
 #include <stout/try.hpp>
 #include <stout/result.hpp>
+#endif // USE_SSL_SOCKET
 
 #include <stout/tests/utils.hpp>
 
+#ifdef USE_SSL_SOCKET
 namespace process {
 namespace network {
 namespace openssl {
@@ -51,8 +54,14 @@ void reinitialize();
 } // namespace openssl {
 } // namespace network {
 } // namespace process {
+#endif // USE_SSL_SOCKET
 
-
+// When SSL is not compiled in, we want the `SSLTemporaryDirectoryTest` class
+// to exist, so that other tests can inherit it; this class is equivalent
+// to the `TemporaryDirectoryTest` under that condition.
+#ifndef USE_SSL_SOCKET
+class SSLTemporaryDirectoryTest : public TemporaryDirectoryTest {};
+#else
 /**
  * A Test fixture that contains helpers for setting up SSL keys
  * and certificates, as well as cleaning them up afterwards.