Skip to content

Commit

Permalink
Use ElementsMatch to ignore order
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinv-stripe committed May 24, 2023
1 parent 65b5bdb commit aa75ca1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/smokescreen/metrics/prometheus_metrics_test.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
package metrics

import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"testing"
)

func TestMapKeys(t *testing.T) {
r := require.New(t)
a := assert.New(t)

inputMap := map[string]string{
"firstKey": "firstValue",
Expand All @@ -20,7 +21,7 @@ func TestMapKeys(t *testing.T) {
"thirdKey",
}

r.Equal(expectedKeys, mapKeys(inputMap))
a.ElementsMatch(expectedKeys, mapKeys(inputMap))
}

func TestMergeMaps(t *testing.T) {
Expand Down

0 comments on commit aa75ca1

Please sign in to comment.