refactor(netxlite): restructure dialer tests (#486)

While there, add one more test checking for whether the internal
CA bundle we use can actually be loaded.

Part of https://github.com/ooni/probe/issues/1591
This commit is contained in:
Simone Basso 2021-09-08 00:00:53 +02:00 committed by GitHub
commit 6d39118b26
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 297 additions and 239 deletions

View file

@ -73,7 +73,7 @@ func TLSCipherSuiteString(value uint16) string {
func NewDefaultCertPool() *x509.CertPool {
pool := x509.NewCertPool()
// Assumption: AppendCertsFromPEM cannot fail because we
// run this function already in the generate.go file
// have a test in certify_test.go that guarantees that
pool.AppendCertsFromPEM([]byte(pemcerts))
return pool
}