Files
threshold/internal/auth/password/private_ids_test.go
T
429247f407 [COMPLIANCE] Update Copyright Headers (#6282)
* [COMPLIANCE] Update Copyright and License Headers

* chore: make gen to generate files with copyright headers

* chore: update missed copyright headers

---------

Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com>
Co-authored-by: Justin Nguyen <justin.nguyen@hashicorp.com>
2026-01-28 11:05:07 -06:00

28 lines
649 B
Go

// Copyright IBM Corp. 2020, 2025
// SPDX-License-Identifier: BUSL-1.1
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+"_"))
})
}