Create a custom client that sends a custom User-Agent.
This commit is contained in:
parent
f0eb12372b
commit
d2b1f1547f
2 changed files with 62 additions and 20 deletions
|
@ -156,8 +156,8 @@ func TestBootstrap(t *testing.T) {
|
|||
if !reflect.DeepEqual(got.endpoint, tt.want.endpoint) {
|
||||
t.Errorf("Bootstrap() endpoint = %v, want %v", got.endpoint, tt.want.endpoint)
|
||||
}
|
||||
gotTR := got.client.Transport.(*http.Transport)
|
||||
wantTR := tt.want.client.Transport.(*http.Transport)
|
||||
gotTR := got.client.GetTransport().(*http.Transport)
|
||||
wantTR := tt.want.client.GetTransport().(*http.Transport)
|
||||
if !reflect.DeepEqual(gotTR.TLSClientConfig.RootCAs, wantTR.TLSClientConfig.RootCAs) {
|
||||
t.Errorf("Bootstrap() certPool = %v, want %v", gotTR.TLSClientConfig.RootCAs, wantTR.TLSClientConfig.RootCAs)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue