Skip to content

Commit 743e60a

Browse files
sigvdragonsinth
andauthored
Run tests on Go 1.21 (#408)
* Run tests on Go 1.21 For the most part, there are no breaking changes. However, the expired certificate is now showing "expired certificate" although previously it showed a simpler "bad certificate" which was hard-coded into the TLS settings test scenario. * Simplify condition for certificate error Instead of two `expired certificate` and `bad certificate` comparisons, we can just check for `certificate` in error output. This satisfies us when checking there is something wrong with the certificate. Co-authored-by: Scott Blum <dragonsinth@gmail.com> --------- Co-authored-by: Scott Blum <dragonsinth@gmail.com>
1 parent b7a5d3b commit 743e60a

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

.circleci/config.yml

+7
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,16 @@ jobs:
3232
- image: cimg/go:1.20
3333
steps: *simple_job_steps
3434

35+
build-1-21:
36+
working_directory: ~/repo
37+
docker:
38+
- image: cimg/go:1.21
39+
steps: *simple_job_steps
40+
3541
workflows:
3642
pr-build-test:
3743
jobs:
3844
- build-1-18
3945
- build-1-19
4046
- build-1-20
47+
- build-1-21

tls_settings_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ func TestBrokenTLS_ClientHasExpiredCert(t *testing.T) {
213213
e.Close()
214214
t.Fatal("expecting TLS failure setting up server and client")
215215
}
216-
if !strings.Contains(err.Error(), "bad certificate") {
216+
if !strings.Contains(err.Error(), "certificate") {
217217
t.Fatalf("expecting TLS certificate error, got: %v", err)
218218
}
219219
}

0 commit comments

Comments
 (0)