File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -280,7 +280,6 @@ func init() {
280280 inputs .Add ("x509_cert" , func () telegraf.Input {
281281 return & X509Cert {
282282 Sources : []string {},
283- Timeout : internal.Duration {Duration : 5 },
284283 }
285284 })
286285}
Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ package x509_cert
33import (
44 "crypto/tls"
55 "encoding/base64"
6- "errors"
76 "fmt"
87 "io/ioutil"
98 "math/big"
@@ -367,23 +366,6 @@ func TestGatherCertMustNotTimeout(t *testing.T) {
367366 assert .True (t , acc .HasMeasurement ("x509_cert" ))
368367}
369368
370- func TestGatherCertMustTimeoutWithNoDuration (t * testing.T ) {
371- if testing .Short () {
372- t .Skip ("Skipping integration test in short mode" )
373- }
374- m := & X509Cert {
375- Sources : []string {"https://www.influxdata.com:443" },
376- Timeout : internal.Duration {Duration : 5 }, // duration is set to 5 when adding to inputs
377- }
378- m .Init ()
379-
380- var acc testutil.Accumulator
381- err := m .Gather (& acc )
382- require .NoError (t , err )
383- require .Contains (t , acc .Errors , errors .New ("cannot get SSL cert 'https://www.influxdata.com:443': dial tcp: i/o timeout" ))
384- assert .False (t , acc .HasMeasurement ("x509_cert" ))
385- }
386-
387369func TestServerName (t * testing.T ) {
388370 tests := []struct {
389371 name string
You can’t perform that action at this time.
0 commit comments