Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(39)

Side by Side Diff: ipsec_manager_test.cc

Issue 6713058: vpn-manager: Fix l2tp/ipsec connections to Windows RRAS server (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/vpn-manager.git@master
Patch Set: Add comment, fix wording. Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ipsec_manager.cc ('k') | l2tp_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium OS Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/file_util.h" 6 #include "base/file_util.h"
7 #include "chromeos/process_mock.h" 7 #include "chromeos/process_mock.h"
8 #include "chromeos/syslog_logging.h" 8 #include "chromeos/syslog_logging.h"
9 #include "chromeos/test_helpers.h" 9 #include "chromeos/test_helpers.h"
10 #include "gflags/gflags.h" 10 #include "gflags/gflags.h"
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 SetStartStarterExpectations(true); 213 SetStartStarterExpectations(true);
214 EXPECT_TRUE(ipsec_.StartStarter()); 214 EXPECT_TRUE(ipsec_.StartStarter());
215 EXPECT_EQ(kMockFd, ipsec_.output_fd()); 215 EXPECT_EQ(kMockFd, ipsec_.output_fd());
216 EXPECT_EQ("ipsec[10001]: ", ipsec_.ipsec_prefix_); 216 EXPECT_EQ("ipsec[10001]: ", ipsec_.ipsec_prefix_);
217 } 217 }
218 218
219 void IpsecManagerTestIkeV1Psk::CheckStarter(const std::string& actual) { 219 void IpsecManagerTestIkeV1Psk::CheckStarter(const std::string& actual) {
220 const char kExpected[] = 220 const char kExpected[] =
221 "config setup\n" 221 "config setup\n"
222 "\tcharonstart=no\n" 222 "\tcharonstart=no\n"
223 "\tnat_traversal=yes\n"
223 "conn managed\n" 224 "conn managed\n"
225 "\tike=3des-sha1-modp1024\n"
224 "\tkeyexchange=ikev1\n" 226 "\tkeyexchange=ikev1\n"
225 "\tauthby=psk\n" 227 "\tauthby=psk\n"
226 "\tpfs=no\n" 228 "\tpfs=no\n"
227 "\trekey=no\n" 229 "\trekey=no\n"
228 "\tleft=%defaultroute\n" 230 "\tleft=%defaultroute\n"
229 "\tleftprotoport=17/1701\n" 231 "\tleftprotoport=17/1701\n"
230 "\tleftupdown=/usr/libexec/l2tpipsec_vpn/pluto_updown\n" 232 "\tleftupdown=/usr/libexec/l2tpipsec_vpn/pluto_updown\n"
231 "\tright=1.2.3.4\n" 233 "\tright=1.2.3.4\n"
232 "\trightprotoport=17/1701\n" 234 "\trightprotoport=17/1701\n"
235 "\ttype=transport\n"
233 "\tauto=start\n"; 236 "\tauto=start\n";
234 EXPECT_EQ(kExpected, actual); 237 EXPECT_EQ(kExpected, actual);
235 } 238 }
236 239
237 TEST_F(IpsecManagerTestIkeV1Psk, FormatStarterConfigFile) { 240 TEST_F(IpsecManagerTestIkeV1Psk, FormatStarterConfigFile) {
238 CheckStarter(ipsec_.FormatStarterConfigFile()); 241 CheckStarter(ipsec_.FormatStarterConfigFile());
239 } 242 }
240 243
241 TEST_F(IpsecManagerTestIkeV1Psk, Start) { 244 TEST_F(IpsecManagerTestIkeV1Psk, Start) {
242 InSequence unused; 245 InSequence unused;
(...skipping 22 matching lines...) Expand all
265 268
266 TEST_F(IpsecManagerTestIkeV1Certs, Initialize) { 269 TEST_F(IpsecManagerTestIkeV1Certs, Initialize) {
267 DoInitialize(1, false); 270 DoInitialize(1, false);
268 } 271 }
269 272
270 273
271 int main(int argc, char** argv) { 274 int main(int argc, char** argv) {
272 SetUpTests(&argc, argv, true); 275 SetUpTests(&argc, argv, true);
273 return RUN_ALL_TESTS(); 276 return RUN_ALL_TESTS();
274 } 277 }
OLDNEW
« no previous file with comments | « ipsec_manager.cc ('k') | l2tp_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698