* Add argon2 credentials * Verify oplog in tests * Refactor: rename field * Update internal/auth/password/repository_account.go Co-authored-by: Todd Knight <T.Alan.Knight@gmail.com> * Add inline comments to SQL query to doc mapping to structure * Refactor: move authentication query to query.go file * Replace immutable_create_time_func with immutable_columns Co-authored-by: Todd Knight <T.Alan.Knight@gmail.com>
23 lines
531 B
Go
23 lines
531 B
Go
package password
|
|
|
|
import (
|
|
"strings"
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func Test_PrivateIds(t *testing.T) {
|
|
t.Run("argon2Config", func(t *testing.T) {
|
|
id, err := newArgon2ConfigurationId()
|
|
require.NoError(t, err)
|
|
assert.True(t, strings.HasPrefix(id, argon2ConfigurationPrefix+"_"))
|
|
})
|
|
t.Run("argon2Cred", func(t *testing.T) {
|
|
id, err := newArgon2CredentialId()
|
|
require.NoError(t, err)
|
|
assert.True(t, strings.HasPrefix(id, argon2CredentialPrefix+"_"))
|
|
})
|
|
}
|