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>
This commit is contained in:
parent
b7a5d3bba8
commit
743e60a4c9
|
|
@ -32,9 +32,16 @@ jobs:
|
||||||
- image: cimg/go:1.20
|
- image: cimg/go:1.20
|
||||||
steps: *simple_job_steps
|
steps: *simple_job_steps
|
||||||
|
|
||||||
|
build-1-21:
|
||||||
|
working_directory: ~/repo
|
||||||
|
docker:
|
||||||
|
- image: cimg/go:1.21
|
||||||
|
steps: *simple_job_steps
|
||||||
|
|
||||||
workflows:
|
workflows:
|
||||||
pr-build-test:
|
pr-build-test:
|
||||||
jobs:
|
jobs:
|
||||||
- build-1-18
|
- build-1-18
|
||||||
- build-1-19
|
- build-1-19
|
||||||
- build-1-20
|
- build-1-20
|
||||||
|
- build-1-21
|
||||||
|
|
|
||||||
|
|
@ -213,7 +213,7 @@ func TestBrokenTLS_ClientHasExpiredCert(t *testing.T) {
|
||||||
e.Close()
|
e.Close()
|
||||||
t.Fatal("expecting TLS failure setting up server and client")
|
t.Fatal("expecting TLS failure setting up server and client")
|
||||||
}
|
}
|
||||||
if !strings.Contains(err.Error(), "bad certificate") {
|
if !strings.Contains(err.Error(), "certificate") {
|
||||||
t.Fatalf("expecting TLS certificate error, got: %v", err)
|
t.Fatalf("expecting TLS certificate error, got: %v", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue