mirror of
https://github.com/open-policy-agent/opa.git
synced 2026-08-12 19:32:48 -06:00
5226cf3137
add ability for opa inspect to inspect a single file outside of any bundle Signed-off-by: Tyler Schade <tyler.schade@solo.io>
19 lines
368 B
Go
19 lines
368 B
Go
package util
|
|
|
|
import (
|
|
"slices"
|
|
"testing"
|
|
)
|
|
|
|
func TestValues(t *testing.T) {
|
|
testMap := map[string]int{"a": 1, "b": 2, "c": 3}
|
|
values := Values(testMap)
|
|
if len(values) != 3 {
|
|
t.Errorf("Expected 3 values, got %d", len(values))
|
|
}
|
|
slices.Sort(values)
|
|
if values[0] != 1 || values[1] != 2 || values[2] != 3 {
|
|
t.Errorf("Expected [1, 2, 3], got %v", values)
|
|
}
|
|
}
|