shill: vpn: Basic class for OpenVPN management server support.
The server will be initialized and started by OpenVPNDriver before spawning
openvpn. Moved to a separate class mostly for testability reasons.
BUG=chromium-os:26994
TEST=unit tests
Change-Id: I5a310a7243d1e8a7f94ec36a9d0f8416c08ab8bb
Reviewed-on: https://gerrit.chromium.org/gerrit/18826
Commit-Ready: Darin Petkov <petkov@chromium.org>
Reviewed-by: Darin Petkov <petkov@chromium.org>
Tested-by: Darin Petkov <petkov@chromium.org>
diff --git a/openvpn_management_server_unittest.cc b/openvpn_management_server_unittest.cc
new file mode 100644
index 0000000..0081c95
--- /dev/null
+++ b/openvpn_management_server_unittest.cc
@@ -0,0 +1,32 @@
+// Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "shill/openvpn_management_server.h"
+
+#include <gtest/gtest.h>
+
+#include "shill/key_value_store.h"
+#include "shill/mock_openvpn_driver.h"
+
+namespace shill {
+
+class OpenVPNManagementServerTest : public testing::Test {
+ public:
+ OpenVPNManagementServerTest()
+ : driver_(args_),
+ server_(&driver_) {}
+
+ virtual ~OpenVPNManagementServerTest() {}
+
+ protected:
+ KeyValueStore args_;
+ MockOpenVPNDriver driver_;
+ OpenVPNManagementServer server_;
+};
+
+TEST_F(OpenVPNManagementServerTest, Init) {
+ EXPECT_FALSE(server_.Init());
+}
+
+} // namespace shill