Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1103)

Delta Between Two Patch Sets: src/pkg/http/serve_test.go

Issue 5262041: code review 5262041: crypto/tls: fetch root certificates using Mac OS API (Closed)
Left Patch Set: diff -r 988a7f023895 https://go.googlecode.com/hg/ Created 12 years, 5 months ago
Right Patch Set: diff -r 988a7f023895 https://go.googlecode.com/hg/ Created 12 years, 5 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « src/pkg/crypto/tls/root_unix.go ('k') | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 // Copyright 2010 The Go Authors. All rights reserved. 1 // Copyright 2010 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style 2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file. 3 // license that can be found in the LICENSE file.
4 4
5 // End-to-end serving tests 5 // End-to-end serving tests
6 6
7 package http_test 7 package http_test
8 8
9 import ( 9 import (
10 "bufio" 10 "bufio"
(...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after
579 t.Fatalf("Dial: %v", err) 579 t.Fatalf("Dial: %v", err)
580 } 580 }
581 defer idleConn.Close() 581 defer idleConn.Close()
582 goTimeout(t, 10e9, func() { 582 goTimeout(t, 10e9, func() {
583 if !strings.HasPrefix(ts.URL, "https://") { 583 if !strings.HasPrefix(ts.URL, "https://") {
584 t.Errorf("expected test TLS server to start with https:/ /, got %q", ts.URL) 584 t.Errorf("expected test TLS server to start with https:/ /, got %q", ts.URL)
585 return 585 return
586 } 586 }
587 noVerifyTransport := &Transport{ 587 noVerifyTransport := &Transport{
588 TLSClientConfig: &tls.Config{ 588 TLSClientConfig: &tls.Config{
589 » » » » SkipVerification: true, 589 » » » » InsecureSkipVerify: true,
590 }, 590 },
591 } 591 }
592 client := &Client{Transport: noVerifyTransport} 592 client := &Client{Transport: noVerifyTransport}
593 res, err := client.Get(ts.URL) 593 res, err := client.Get(ts.URL)
594 if err != nil { 594 if err != nil {
595 t.Error(err) 595 t.Error(err)
596 return 596 return
597 } 597 }
598 if res == nil { 598 if res == nil {
599 t.Errorf("got nil Response") 599 t.Errorf("got nil Response")
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after
1097 panic("ReadAll: " + err.String()) 1097 panic("ReadAll: " + err.String())
1098 } 1098 }
1099 body := string(all) 1099 body := string(all)
1100 if body != "Hello world.\n" { 1100 if body != "Hello world.\n" {
1101 panic("Got body: " + body) 1101 panic("Got body: " + body)
1102 } 1102 }
1103 } 1103 }
1104 1104
1105 b.StopTimer() 1105 b.StopTimer()
1106 } 1106 }
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b