* Add base SQL and protobuf files * Add options and public Ids * Add AuthMethod and Account resources * Add repository * Add CreateAuthMethod to repository * Add CreateAccount method to repository * Remove redundant foreign keys * Document relationships between iam and auth tables * Document relationships between auth and auth_password tables * Add documentation for subtype triggers * Use wt_scope_id domain type for scope_id * Refactor: move test helper function * Remove check from SetTableName * Remove check from another SetTableName * Use org scope in tests * Remove handling of CreateTime and UpdateTime from docs
23 lines
489 B
Go
23 lines
489 B
Go
package password
|
|
|
|
import (
|
|
"strings"
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func Test_PublicIds(t *testing.T) {
|
|
t.Run("authMethod", func(t *testing.T) {
|
|
id, err := newAuthMethodId()
|
|
require.NoError(t, err)
|
|
assert.True(t, strings.HasPrefix(id, AuthMethodPrefix+"_"))
|
|
})
|
|
t.Run("account", func(t *testing.T) {
|
|
id, err := newAccountId()
|
|
require.NoError(t, err)
|
|
assert.True(t, strings.HasPrefix(id, AccountPrefix+"_"))
|
|
})
|
|
}
|