Skip to content

Commit 097dde0

Browse files
modulibgajjala8
authored andcommitted
refact(e2e): Rename credential methods for clarity (#6219)
* refact(e2e): Rename method to usernamepassworddomain * refact(e2e): Rename method to usernamepassword
1 parent d90b374 commit 097dde0

File tree

9 files changed

+13
-13
lines changed

9 files changed

+13
-13
lines changed

testing/internal/e2e/boundary/credential.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -202,10 +202,10 @@ func CreateStaticCredentialPrivateKeyCli(t testing.TB, ctx context.Context, cred
202202
return credentialId, nil
203203
}
204204

205-
// CreateStaticCredentialPasswordCli uses the cli to create a new password credential in the
205+
// CreateStaticCredentialUsernamePasswordCli uses the cli to create a new password credential in the
206206
// provided static credential store.
207207
// Returns the id of the new credential
208-
func CreateStaticCredentialPasswordCli(t testing.TB, ctx context.Context, credentialStoreId string, user string, password string) (string, error) {
208+
func CreateStaticCredentialUsernamePasswordCli(t testing.TB, ctx context.Context, credentialStoreId string, user string, password string) (string, error) {
209209
name, err := base62.Random(16)
210210
if err != nil {
211211
return "", err
@@ -238,10 +238,10 @@ func CreateStaticCredentialPasswordCli(t testing.TB, ctx context.Context, creden
238238
return credentialId, nil
239239
}
240240

241-
// CreateStaticCredentialPasswordDomainCli uses the cli to create a new username password domain credential in the
241+
// CreateStaticCredentialUsernamePasswordDomainCli uses the cli to create a new username password domain credential in the
242242
// provided static credential store.
243243
// Returns the id of the new credential
244-
func CreateStaticCredentialPasswordDomainCli(t testing.TB, ctx context.Context, credentialStoreId string, user string, password string, domain string) (string, error) {
244+
func CreateStaticCredentialUsernamePasswordDomainCli(t testing.TB, ctx context.Context, credentialStoreId string, user string, password string, domain string) (string, error) {
245245
name, err := base62.Random(16)
246246
if err != nil {
247247
return "", err

testing/internal/e2e/tests/base/credential_store_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,11 @@ func TestCliStaticCredentialStore(t *testing.T) {
7777
require.NoError(t, err)
7878
privateKeyCredentialsId, err := boundary.CreateStaticCredentialPrivateKeyCli(t, ctx, storeId, c.TargetSshUser, testPemFile)
7979
require.NoError(t, err)
80-
pwCredentialId, err := boundary.CreateStaticCredentialPasswordCli(t, ctx, storeId, c.TargetSshUser, testPassword)
80+
pwCredentialId, err := boundary.CreateStaticCredentialUsernamePasswordCli(t, ctx, storeId, c.TargetSshUser, testPassword)
8181
require.NoError(t, err)
8282
jsonCredentialId, err := boundary.CreateStaticCredentialJsonCli(t, ctx, storeId, testCredentialsFile)
8383
require.NoError(t, err)
84-
updCredentialId, err := boundary.CreateStaticCredentialPasswordDomainCli(t, ctx, storeId, c.TargetSshUser, testPassword, testDomain)
84+
updCredentialId, err := boundary.CreateStaticCredentialUsernamePasswordDomainCli(t, ctx, storeId, c.TargetSshUser, testPassword, testDomain)
8585
require.NoError(t, err)
8686

8787
// Get credentials for target (expect empty)

testing/internal/e2e/tests/base/paginate_credential_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ func TestCliPaginateCredentials(t *testing.T) {
8888
assert.Empty(t, initialCredentials.ListToken)
8989

9090
// Create a new credential and destroy one of the other credentials
91-
credentialId, err := boundary.CreateStaticCredentialPasswordCli(t, ctx, storeId, "user", "password")
91+
credentialId, err := boundary.CreateStaticCredentialUsernamePasswordCli(t, ctx, storeId, "user", "password")
9292
require.NoError(t, err)
9393
output = e2e.RunCommand(ctx, "boundary",
9494
e2e.WithArgs(

testing/internal/e2e/tests/base/target_tcp_connect_cassandra_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ func TestCliTcpTargetConnectCassandra(t *testing.T) {
8282
storeId, err := boundary.CreateCredentialStoreStaticCli(t, ctx, projectId)
8383
require.NoError(t, err)
8484

85-
credentialId, err := boundary.CreateStaticCredentialPasswordCli(
85+
credentialId, err := boundary.CreateStaticCredentialUsernamePasswordCli(
8686
t,
8787
ctx,
8888
storeId,

testing/internal/e2e/tests/base/target_tcp_connect_mongo_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ func TestCliTcpTargetConnectMongo(t *testing.T) {
8383
storeId, err := boundary.CreateCredentialStoreStaticCli(t, ctx, projectId)
8484
require.NoError(t, err)
8585

86-
credentialId, err := boundary.CreateStaticCredentialPasswordCli(
86+
credentialId, err := boundary.CreateStaticCredentialUsernamePasswordCli(
8787
t,
8888
ctx,
8989
storeId,

testing/internal/e2e/tests/base/target_tcp_connect_mysql_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ func TestCliTcpTargetConnectMysql(t *testing.T) {
8282
storeId, err := boundary.CreateCredentialStoreStaticCli(t, ctx, projectId)
8383
require.NoError(t, err)
8484

85-
credentialId, err := boundary.CreateStaticCredentialPasswordCli(
85+
credentialId, err := boundary.CreateStaticCredentialUsernamePasswordCli(
8686
t,
8787
ctx,
8888
storeId,

testing/internal/e2e/tests/base/target_tcp_connect_redis_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ func TestCliTcpTargetConnectRedis(t *testing.T) {
8484
storeId, err := boundary.CreateCredentialStoreStaticCli(t, ctx, projectId)
8585
require.NoError(t, err)
8686

87-
credentialId, err := boundary.CreateStaticCredentialPasswordCli(
87+
credentialId, err := boundary.CreateStaticCredentialUsernamePasswordCli(
8888
t,
8989
ctx,
9090
storeId,

testing/internal/e2e/tests/base_plus/target_tcp_connect_postgres_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ func TestCliTcpTargetConnectPostgres(t *testing.T) {
4747
require.NoError(t, err)
4848
storeId, err := boundary.CreateCredentialStoreStaticCli(t, ctx, projectId)
4949
require.NoError(t, err)
50-
credentialId, err := boundary.CreateStaticCredentialPasswordCli(
50+
credentialId, err := boundary.CreateStaticCredentialUsernamePasswordCli(
5151
t,
5252
ctx,
5353
storeId,

testing/internal/e2e/tests/database/migration_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ func populateBoundaryDatabase(t testing.TB, ctx context.Context, c *config, te T
268268
// Create static credentials
269269
storeId, err := boundary.CreateCredentialStoreStaticCli(t, ctx, projectId)
270270
require.NoError(t, err)
271-
_, err = boundary.CreateStaticCredentialPasswordCli(t, ctx, storeId, c.TargetSshUser, "password")
271+
_, err = boundary.CreateStaticCredentialUsernamePasswordCli(t, ctx, storeId, c.TargetSshUser, "password")
272272
require.NoError(t, err)
273273
_, err = boundary.CreateStaticCredentialJsonCli(t, ctx, storeId, "testdata/credential.json")
274274
require.NoError(t, err)

0 commit comments

Comments
 (0)