1
0
mirror of https://github.com/golang/go synced 2024-09-30 22:18:32 -06:00

crypto/tls: pretty-print SignatureScheme in tests

When running crypto/tls tests with GOEXPERIMENT=boringcrypto, some
tests are embedded with unreadable hexadecimal values:

  === RUN   TestBoringServerSignatureAndHash/5053...3536

This corresponds to a string representation of SignatureScheme as it
implements fmt.Stringer.  With this change, the above will be printed
as:

  === RUN   TestBoringServerSignatureAndHash/PSSWithSHA256

Signed-off-by: Daiki Ueno <dueno@redhat.com>
This commit is contained in:
Daiki Ueno 2023-09-23 17:24:22 +09:00
parent 54f78cf8f1
commit 19700d53a8

View File

@ -200,7 +200,7 @@ func TestBoringServerSignatureAndHash(t *testing.T) {
}()
for _, sigHash := range defaultSupportedSignatureAlgorithms {
t.Run(fmt.Sprintf("%#x", sigHash), func(t *testing.T) {
t.Run(fmt.Sprintf("%v", sigHash), func(t *testing.T) {
serverConfig := testConfig.Clone()
serverConfig.Certificates = make([]Certificate, 1)