Skip to content

Commit

Permalink
crypto/tls: pretty-print SignatureScheme in tests
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
ueno committed Sep 23, 2023
1 parent 54f78cf commit 19700d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/crypto/tls/boring_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 19700d5

Please sign in to comment.