]> Cypherpunks repositories - gostls13.git/commit
net/http/httptest: add Client and Certificate methods to Server
authorJohan Brandhorst <johan.brandhorst@gmail.com>
Wed, 21 Dec 2016 13:49:04 +0000 (13:49 +0000)
committerBrad Fitzpatrick <bradfitz@golang.org>
Fri, 3 Mar 2017 21:02:17 +0000 (21:02 +0000)
commitfbf4dd91b9762eeb038c141b21712534310795f1
tree0fc405660a54afc7ee7f20e3cce85f6f978c0c19
parent02e36f8c87901fde841cb5e82e0409b7914572b8
net/http/httptest: add Client and Certificate methods to Server

Adds a function for easily accessing the x509.Certificate
of a Server, if there is one. Also adds a helper function
for getting a http.Client suitable for use with the server.

This makes the steps required to test a httptest
TLS server simpler.

Fixes #18411

Change-Id: I2e78fe1e54e31bed9c641be2d9a099f698c7bbde
Reviewed-on: https://go-review.googlesource.com/34639
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/go/build/deps_test.go
src/net/http/httptest/example_test.go
src/net/http/httptest/server.go
src/net/http/httptest/server_test.go