Skip to content

Commit

Permalink
Remove test function that doesn't work
Browse files Browse the repository at this point in the history
  • Loading branch information
jefferai committed Sep 13, 2024
1 parent d1b1480 commit 18cfa1c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 22 deletions.
19 changes: 0 additions & 19 deletions internal/auth/ldap/testing.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import (
"testing"
"time"

"github.com/hashicorp/boundary/internal/auth/oidc/store"
"github.com/hashicorp/boundary/internal/db"
wrapping "github.com/hashicorp/go-kms-wrapping/v2"
"github.com/stretchr/testify/require"
Expand Down Expand Up @@ -194,24 +193,6 @@ func TestManagedGroup(t testing.TB, conn *db.DB, am *AuthMethod, grpNames []stri
return mg
}

// TestManagedGroupMember adds given account IDs to a managed group
func TestManagedGroupMember(t testing.TB, conn *db.DB, managedGroupId, memberId string, opt ...Option) *ManagedGroupMemberAccount {
t.Helper()
require := require.New(t)
rw := db.New(conn)
ctx := context.Background()

mg := &ManagedGroupMemberAccount{
ManagedGroupMemberAccount: &store.ManagedGroupMemberAccount{
ManagedGroupId: managedGroupId,
MemberId: memberId,
},
}

require.NoError(rw.Create(ctx, mg))
return mg
}

// TestGenerateCA will generate a test x509 CA cert, along with it encoded in a
// PEM format.
func TestGenerateCA(t testing.TB, hosts ...string) (*x509.Certificate, string) {
Expand Down
6 changes: 3 additions & 3 deletions internal/iam/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ const (
from auth_oidc_managed_group_member_account
where member_id in (select id from user_accounts)
),
user_ldap_managed_groups (id) as (
user_ldap_managed_groups (id) as (
select managed_group_id
from auth_ldap_managed_group_member_account
where member_id in (select id from user_accounts)
Expand All @@ -143,7 +143,7 @@ const (
select distinct role_id
from iam_managed_group_role
where principal_id in (select id from user_oidc_managed_groups)
or principal_id in (select id from user_ldap_managed_groups)
or principal_id in (select id from user_ldap_managed_groups)
),
group_roles (role_id) as (
select role_id
Expand Down Expand Up @@ -196,7 +196,7 @@ const (
select
roles.role_id as role_id,
roles.role_scope_id as role_scope_id,
roles.role_parent_scope_id as role_parent_scope_id,
roles.role_parent_scope_id as role_parent_scope_id,
grant_scopes.grant_scope_ids as grant_scope_ids,
grants.grants as grants
from roles
Expand Down

0 comments on commit 18cfa1c

Please sign in to comment.