Skip to content

Commit

Permalink
add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Philip-Carneiro-KX committed Feb 23, 2024
1 parent 0b4aa22 commit 398c78d
Show file tree
Hide file tree
Showing 4 changed files with 208 additions and 260 deletions.
4 changes: 2 additions & 2 deletions src/commands/serverCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ export async function addAuthConnection(
serverKey: string,
username: string,
password: string,
): void {
): Promise<void> {
const validUsername = validateServerUsername(username);
if (validUsername) {
window.showErrorMessage(validUsername);
Expand Down Expand Up @@ -201,7 +201,7 @@ export async function enableTLS(serverKey: string): Promise<void> {
export async function addKdbConnection(
kdbData: ServerDetails,
isLocal?: boolean,
): void {
): Promise<void> {
const aliasValidation = validateServerAlias(kdbData.serverAlias, isLocal!);
const hostnameValidation = validateServerName(kdbData.serverName);
const portValidation = validateServerPort(kdbData.serverPort);
Expand Down
2 changes: 1 addition & 1 deletion src/validators/kdbValidator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export function validateServerAlias(
return "Input value using restricted keywords of Insights Enterprise";
}

if (!isLocal && input === "Local") {
if (!isLocal && input.toLowerCase() === "local") {
return "Input value using restricted keywords of Local for Bundle q Server";
}
}
Expand Down
Loading

0 comments on commit 398c78d

Please sign in to comment.