Files
threshold/internal/auth/password/private_ids_test.go
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

27 lines
648 B
Go
Raw Normal View History

2023-02-02 17:15:17 -08:00
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: BUSL-1.1
2023-02-02 17:15:17 -08:00
package password
import (
"context"
"strings"
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func Test_PrivateIds(t *testing.T) {
ctx := context.Background()
t.Run("argon2Config", func(t *testing.T) {
id, err := newArgon2ConfigurationId(ctx)
require.NoError(t, err)
assert.True(t, strings.HasPrefix(id, argon2ConfigurationPrefix+"_"))
})
t.Run("argon2Cred", func(t *testing.T) {
id, err := newArgon2CredentialId(ctx)
require.NoError(t, err)
assert.True(t, strings.HasPrefix(id, argon2CredentialPrefix+"_"))
})
}