Skip to content

Commit

Permalink
Merge pull request #276 from roidelapluie/go116
Browse files Browse the repository at this point in the history
Support go 1.16
  • Loading branch information
roidelapluie committed Feb 24, 2021
2 parents 517c52c + 10e1378 commit 716b189
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 63 deletions.
3 changes: 3 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,8 @@ workflows:
- test:
name: go-1-15
go_version: "1.15"
- test:
name: go-1-16
go_version: "1.16"
# Style is only checked against the latest supported Go version.
run_style: true
15 changes: 0 additions & 15 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Common
[![Build Status](https://travis-ci.org/prometheus/common.svg)](https://travis-ci.org/prometheus/common)
[![circleci](https://circleci.com/gh/prometheus/common/tree/master.svg?style=shield)][circleci]

This repository contains Go libraries that are shared across Prometheus
components and libraries. They are considered internal to Prometheus, without
Expand Down
11 changes: 10 additions & 1 deletion config/http_config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -513,8 +513,17 @@ func TestTLSConfig(t *testing.T) {
t.Fatalf("Unexpected client certificate result: \n\n%+v\n expected\n\n%+v", cert, clientCertificate)
}

// non-nil functions are never equal.
// tlsConfig.rootCAs.LazyCerts contains functions getCert() in go 1.16, which are
// never equal. Compare the Subjects instead.
if !reflect.DeepEqual(tlsConfig.RootCAs.Subjects(), expectedTLSConfig.RootCAs.Subjects()) {
t.Fatalf("Unexpected RootCAs result: \n\n%+v\n expected\n\n%+v", tlsConfig.RootCAs.Subjects(), expectedTLSConfig.RootCAs.Subjects())
}
tlsConfig.RootCAs = nil
expectedTLSConfig.RootCAs = nil

// Non-nil functions are never equal.
tlsConfig.GetClientCertificate = nil

if !reflect.DeepEqual(tlsConfig, expectedTLSConfig) {
t.Fatalf("Unexpected TLS Config result: \n\n%+v\n expected\n\n%+v", tlsConfig, expectedTLSConfig)
}
Expand Down
Loading

0 comments on commit 716b189

Please sign in to comment.