Files
threshold/internal/auth/password/testing_test.go
T
shadowdaoandClaude Sonnet 5.5 962d708fdd Rename Go module paths to repo.anhonesthost.net/CyberCoveLLC/threshold
Rename root, api and sdk module paths (imports, go.mod, go_package,
ldflags, build scripts, buf configs) and regenerate protobuf/gateway
code with the project's pinned toolchain. Wire identifiers unchanged.
api gets a local replace for sdk; root/api/sdk require v0.1.0.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 10:33:41 -07:00

49 lines
1.3 KiB
Go

// Copyright IBM Corp. 2020, 2026
// SPDX-License-Identifier: BUSL-1.1
package password
import (
"testing"
"repo.anhonesthost.net/CyberCoveLLC/threshold/internal/db"
"repo.anhonesthost.net/CyberCoveLLC/threshold/internal/iam"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func Test_TestAuthMethods(t *testing.T) {
assert, require := assert.New(t), require.New(t)
conn, _ := db.TestSetup(t, "postgres")
wrapper := db.TestWrapper(t)
org, _ := iam.TestScopes(t, iam.TestRepo(t, conn, wrapper))
require.NotNil(org)
assert.NotEmpty(org.GetPublicId())
count := 4
ams := TestAuthMethods(t, conn, org.GetPublicId(), count)
assert.Len(ams, count)
for _, am := range ams {
assert.NotEmpty(am.GetPublicId())
}
}
func Test_TestMultipleAccounts(t *testing.T) {
assert, require := assert.New(t), require.New(t)
conn, _ := db.TestSetup(t, "postgres")
wrapper := db.TestWrapper(t)
org, _ := iam.TestScopes(t, iam.TestRepo(t, conn, wrapper))
require.NotNil(org)
assert.NotEmpty(org.GetPublicId())
am := TestAuthMethods(t, conn, org.GetPublicId(), 1)[0]
count := 4
accounts := TestMultipleAccounts(t, conn, am.GetPublicId(), count)
assert.Len(accounts, count)
for _, a := range accounts {
assert.NotEmpty(a.GetPublicId())
}
}