@@ -17,9 +17,9 @@ func resolveOpenIDsTestRuntime(userOpenID string) *RuntimeContext {
1717 return TestNewRuntimeContext (cmd , cfg )
1818}
1919
20- func TestResolveOpenIDs_Empty (t * testing.T ) {
20+ func TestResolveOpenIDsTyped_Empty (t * testing.T ) {
2121 rt := resolveOpenIDsTestRuntime ("ou_self" )
22- out , err := ResolveOpenIDs ("--user-ids" , nil , rt )
22+ out , err := ResolveOpenIDsTyped ("--user-ids" , nil , rt )
2323 if err != nil {
2424 t .Fatalf ("unexpected error: %v" , err )
2525 }
@@ -28,21 +28,9 @@ func TestResolveOpenIDs_Empty(t *testing.T) {
2828 }
2929}
3030
31- func TestResolveOpenIDs_ExpandsMeAndDedups (t * testing.T ) {
31+ func TestResolveOpenIDsTyped_MeIsCaseInsensitive (t * testing.T ) {
3232 rt := resolveOpenIDsTestRuntime ("ou_self" )
33- out , err := ResolveOpenIDs ("--user-ids" , []string {"me" , "ou_a" , "me" , "ou_a" }, rt )
34- if err != nil {
35- t .Fatalf ("unexpected error: %v" , err )
36- }
37- want := []string {"ou_self" , "ou_a" }
38- if len (out ) != len (want ) || out [0 ] != want [0 ] || out [1 ] != want [1 ] {
39- t .Fatalf ("got %v, want %v" , out , want )
40- }
41- }
42-
43- func TestResolveOpenIDs_MeIsCaseInsensitive (t * testing.T ) {
44- rt := resolveOpenIDsTestRuntime ("ou_self" )
45- out , err := ResolveOpenIDs ("--user-ids" , []string {"ou_other" , "me" , "Me" , "ME" }, rt )
33+ out , err := ResolveOpenIDsTyped ("--user-ids" , []string {"ou_other" , "me" , "Me" , "ME" }, rt )
4634 if err != nil {
4735 t .Fatalf ("unexpected error: %v" , err )
4836 }
@@ -52,22 +40,11 @@ func TestResolveOpenIDs_MeIsCaseInsensitive(t *testing.T) {
5240 }
5341}
5442
55- func TestResolveOpenIDs_MeWithoutLogin (t * testing.T ) {
56- rt := resolveOpenIDsTestRuntime ("" )
57- _ , err := ResolveOpenIDs ("--user-ids" , []string {"me" }, rt )
58- if err == nil {
59- t .Fatal ("expected validation error" )
60- }
61- if ! strings .Contains (err .Error (), "--user-ids" ) {
62- t .Fatalf ("error should mention the offending flag name; got: %v" , err )
63- }
64- }
65-
66- func TestResolveOpenIDs_DedupIsCaseInsensitive (t * testing.T ) {
43+ func TestResolveOpenIDsTyped_DedupIsCaseInsensitive (t * testing.T ) {
6744 rt := resolveOpenIDsTestRuntime ("ou_self" )
6845 // Same underlying open_id with three case variants — should collapse to
6946 // one entry, preserving the first-occurrence form.
70- out , err := ResolveOpenIDs ("--user-ids" , []string {"ou_abc123" , "OU_ABC123" , "Ou_Abc123" }, rt )
47+ out , err := ResolveOpenIDsTyped ("--user-ids" , []string {"ou_abc123" , "OU_ABC123" , "Ou_Abc123" }, rt )
7148 if err != nil {
7249 t .Fatalf ("unexpected error: %v" , err )
7350 }
0 commit comments