Skip to content

Commit

Permalink
couple regressions from merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
frodopwns committed Apr 3, 2020
1 parent 08fc998 commit d7fdd8c
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions pkg/resourcemanager/psql/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ func (p *PSQLServerClient) GetOrPrepareSecret(ctx context.Context, instance *azu
name := instance.Name

usernameLength := 8
passwordLength := 16

secret := map[string][]byte{}

Expand All @@ -169,15 +168,8 @@ func (p *PSQLServerClient) GetOrPrepareSecret(ctx context.Context, instance *azu
return stored, nil
}

randomUsername, err := helpers.GenerateRandomUsername(usernameLength, 0)
if err != nil {
return secret, err
}

randomPassword, err := helpers.GenerateRandomPassword(passwordLength)
if err != nil {
return secret, err
}
randomUsername := helpers.GenerateRandomUsername(usernameLength)
randomPassword := helpers.NewPassword()

secret["username"] = []byte(randomUsername)
secret["fullyQualifiedUsername"] = []byte(fmt.Sprintf("%s@%s", randomUsername, name))
Expand Down

0 comments on commit d7fdd8c

Please sign in to comment.