Add password generation UI profile workflow

This commit is contained in:
Joe Julian
2026-03-29 11:21:10 -07:00
parent bd9674a1f5
commit 16dc1de3c8
8 changed files with 186 additions and 77 deletions
+13
View File
@@ -483,6 +483,19 @@ func TestVaultServiceGeneratesPasswordsForAuthorizedClients(t *testing.T) {
}
}
func TestVaultServiceGeneratePasswordRejectsUnknownProfiles(t *testing.T) {
t.Parallel()
client, _, cleanup := newTestClient(t)
defer cleanup()
ctx := metadata.AppendToOutgoingContext(context.Background(), "authorization", "Bearer test-token")
_, err := client.GeneratePassword(ctx, &keepassgov1.GeneratePasswordRequest{Profile: "invalid"})
if status.Code(err) != codes.InvalidArgument {
t.Fatalf("GeneratePassword() code = %v, want %v", status.Code(err), codes.InvalidArgument)
}
}
func TestVaultServiceCopiesEntryFieldsForAuthorizedClients(t *testing.T) {
t.Parallel()