Commit 72ec8d3f authored by Matthew Slipper's avatar Matthew Slipper Committed by GitHub

ctb: Fix flake in TestExtractTestNames (#13177)

Golang map iteration order is random, so we need to sort first.
parent cbfb97ed
......@@ -2,6 +2,7 @@ package main
import (
"reflect"
"slices"
"testing"
"github.com/ethereum-optimism/optimism/op-chain-ops/solc"
......@@ -272,6 +273,8 @@ func TestExtractTestNames(t *testing.T) {
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
got := extractTestNames(tt.artifact)
slices.Sort(got)
slices.Sort(tt.want)
if !reflect.DeepEqual(got, tt.want) {
t.Errorf("extractTestNames() = %v, want %v", got, tt.want)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment