refact(e2e): Rename credential methods for clarity (#6219)

* refact(e2e): Rename method to usernamepassworddomain

* refact(e2e): Rename method to usernamepassword
pull/6221/head
Michael Li 4 months ago committed by GitHub
parent 31277e0b23
commit 06d69f699e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -202,10 +202,10 @@ func CreateStaticCredentialPrivateKeyCli(t testing.TB, ctx context.Context, cred
return credentialId, nil
}
// CreateStaticCredentialPasswordCli uses the cli to create a new password credential in the
// CreateStaticCredentialUsernamePasswordCli uses the cli to create a new password credential in the
// provided static credential store.
// Returns the id of the new credential
func CreateStaticCredentialPasswordCli(t testing.TB, ctx context.Context, credentialStoreId string, user string, password string) (string, error) {
func CreateStaticCredentialUsernamePasswordCli(t testing.TB, ctx context.Context, credentialStoreId string, user string, password string) (string, error) {
name, err := base62.Random(16)
if err != nil {
return "", err
@ -238,10 +238,10 @@ func CreateStaticCredentialPasswordCli(t testing.TB, ctx context.Context, creden
return credentialId, nil
}
// CreateStaticCredentialPasswordDomainCli uses the cli to create a new username password domain credential in the
// CreateStaticCredentialUsernamePasswordDomainCli uses the cli to create a new username password domain credential in the
// provided static credential store.
// Returns the id of the new credential
func CreateStaticCredentialPasswordDomainCli(t testing.TB, ctx context.Context, credentialStoreId string, user string, password string, domain string) (string, error) {
func CreateStaticCredentialUsernamePasswordDomainCli(t testing.TB, ctx context.Context, credentialStoreId string, user string, password string, domain string) (string, error) {
name, err := base62.Random(16)
if err != nil {
return "", err

@ -77,11 +77,11 @@ func TestCliStaticCredentialStore(t *testing.T) {
require.NoError(t, err)
privateKeyCredentialsId, err := boundary.CreateStaticCredentialPrivateKeyCli(t, ctx, storeId, c.TargetSshUser, testPemFile)
require.NoError(t, err)
pwCredentialId, err := boundary.CreateStaticCredentialPasswordCli(t, ctx, storeId, c.TargetSshUser, testPassword)
pwCredentialId, err := boundary.CreateStaticCredentialUsernamePasswordCli(t, ctx, storeId, c.TargetSshUser, testPassword)
require.NoError(t, err)
jsonCredentialId, err := boundary.CreateStaticCredentialJsonCli(t, ctx, storeId, testCredentialsFile)
require.NoError(t, err)
updCredentialId, err := boundary.CreateStaticCredentialPasswordDomainCli(t, ctx, storeId, c.TargetSshUser, testPassword, testDomain)
updCredentialId, err := boundary.CreateStaticCredentialUsernamePasswordDomainCli(t, ctx, storeId, c.TargetSshUser, testPassword, testDomain)
require.NoError(t, err)
// Get credentials for target (expect empty)

@ -88,7 +88,7 @@ func TestCliPaginateCredentials(t *testing.T) {
assert.Empty(t, initialCredentials.ListToken)
// Create a new credential and destroy one of the other credentials
credentialId, err := boundary.CreateStaticCredentialPasswordCli(t, ctx, storeId, "user", "password")
credentialId, err := boundary.CreateStaticCredentialUsernamePasswordCli(t, ctx, storeId, "user", "password")
require.NoError(t, err)
output = e2e.RunCommand(ctx, "boundary",
e2e.WithArgs(

@ -82,7 +82,7 @@ func TestCliTcpTargetConnectCassandra(t *testing.T) {
storeId, err := boundary.CreateCredentialStoreStaticCli(t, ctx, projectId)
require.NoError(t, err)
credentialId, err := boundary.CreateStaticCredentialPasswordCli(
credentialId, err := boundary.CreateStaticCredentialUsernamePasswordCli(
t,
ctx,
storeId,

@ -83,7 +83,7 @@ func TestCliTcpTargetConnectMongo(t *testing.T) {
storeId, err := boundary.CreateCredentialStoreStaticCli(t, ctx, projectId)
require.NoError(t, err)
credentialId, err := boundary.CreateStaticCredentialPasswordCli(
credentialId, err := boundary.CreateStaticCredentialUsernamePasswordCli(
t,
ctx,
storeId,

@ -82,7 +82,7 @@ func TestCliTcpTargetConnectMysql(t *testing.T) {
storeId, err := boundary.CreateCredentialStoreStaticCli(t, ctx, projectId)
require.NoError(t, err)
credentialId, err := boundary.CreateStaticCredentialPasswordCli(
credentialId, err := boundary.CreateStaticCredentialUsernamePasswordCli(
t,
ctx,
storeId,

@ -84,7 +84,7 @@ func TestCliTcpTargetConnectRedis(t *testing.T) {
storeId, err := boundary.CreateCredentialStoreStaticCli(t, ctx, projectId)
require.NoError(t, err)
credentialId, err := boundary.CreateStaticCredentialPasswordCli(
credentialId, err := boundary.CreateStaticCredentialUsernamePasswordCli(
t,
ctx,
storeId,

@ -47,7 +47,7 @@ func TestCliTcpTargetConnectPostgres(t *testing.T) {
require.NoError(t, err)
storeId, err := boundary.CreateCredentialStoreStaticCli(t, ctx, projectId)
require.NoError(t, err)
credentialId, err := boundary.CreateStaticCredentialPasswordCli(
credentialId, err := boundary.CreateStaticCredentialUsernamePasswordCli(
t,
ctx,
storeId,

@ -268,7 +268,7 @@ func populateBoundaryDatabase(t testing.TB, ctx context.Context, c *config, te T
// Create static credentials
storeId, err := boundary.CreateCredentialStoreStaticCli(t, ctx, projectId)
require.NoError(t, err)
_, err = boundary.CreateStaticCredentialPasswordCli(t, ctx, storeId, c.TargetSshUser, "password")
_, err = boundary.CreateStaticCredentialUsernamePasswordCli(t, ctx, storeId, c.TargetSshUser, "password")
require.NoError(t, err)
_, err = boundary.CreateStaticCredentialJsonCli(t, ctx, storeId, "testdata/credential.json")
require.NoError(t, err)

Loading…
Cancel
Save