Skip to content

Commit 17a34b3

Browse files
committed
Added unit tests for DBConnetionTab module
Change-Id: I122b726bec4f8cd631ccdf244f0529f28fd93623
1 parent 9cf6047 commit 17a34b3

File tree

4 files changed

+4328
-69
lines changed

4 files changed

+4328
-69
lines changed

MySQLShellPluginDevelopment.code-workspace

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// cSpell:ignore dbaeumer pylance antlr4 debugpy orta
12
{
23
"folders": [
34
{
@@ -47,7 +48,7 @@
4748
"${workspaceFolder}\\plugins\\rds_plugin"
4849
],
4950
"liveServer.settings.multiRootWorkspaceName": "MySQL REST Service Plugin",
50-
"jest.autoRun": "off",
51+
"jest.runMode": "on-demand",
5152
"jest.disabledWorkspaceFolders": [
5253
"MySQL REST Service Plugin",
5354
"Shell GUI Backend",
@@ -71,7 +72,7 @@
7172
"configurations": [
7273
{
7374
"name": "Python: Attach to Port",
74-
"type": "python",
75+
"type": "debugpy",
7576
"request": "attach",
7677
"connect": {
7778
"host": "localhost",
@@ -80,7 +81,7 @@
8081
},
8182
{
8283
"name": "Python: Attach using Process Id",
83-
"type": "python",
84+
"type": "debugpy",
8485
"request": "attach",
8586
"processId": "${command:pickProcess}"
8687
}
@@ -91,7 +92,6 @@
9192
"tasks": []
9293
},
9394
"extensions": {
94-
// cSpell:ignore dbaeumer pylance
9595
"recommendations": [
9696
"streetsidesoftware.code-spell-checker",
9797
"dbaeumer.vscode-eslint",

gui/frontend/src/modules/db-editor/DBConnectionTab.tsx

+5-5
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,7 @@ Execute \\help or \\? for help;`;
603603
await requisitions.execute("sqlTransactionChanged", undefined);
604604

605605
void requisitions.execute("showInfo", "Commit successful.");
606-
} catch (reason) {
606+
} catch (reason) /* istanbul ignore next */ {
607607
const message = reason instanceof Error ? reason.message : String(reason);
608608
await requisitions.execute("showError", "Error while committing changes: " + message);
609609
}
@@ -716,7 +716,7 @@ Execute \\help or \\? for help;`;
716716
} else if (this.scriptRef.current) {
717717
this.scriptRef.current.insertScriptText(data.language, content);
718718
}
719-
} catch (reason) {
719+
} catch (reason) /* istanbul ignore next */ {
720720
const message = reason instanceof ResponseError ? reason.message : String(reason);
721721
await requisitions.execute("showError", "Cannot load scripts content: " + message);
722722

@@ -822,7 +822,7 @@ Execute \\help or \\? for help;`;
822822

823823
return Promise.resolve(true);
824824
}
825-
} else {
825+
} else /* istanbul ignore next */ {
826826
if (payload.contextId) {
827827
this.addContextResultMessage(payload.contextId, `\nAuthentication cancelled.`);
828828
}
@@ -3053,7 +3053,7 @@ Execute \\help or \\? for help;`;
30533053

30543054
void requisitions.execute("showInfo",
30553055
`The HeatWave options have been saved successfully to ${fileResult.path[0]}`);
3056-
} catch (reason) {
3056+
} catch (reason) /* istanbul ignore next */ {
30573057
let content: string;
30583058

30593059
if (reason instanceof ResponseError) {
@@ -3087,7 +3087,7 @@ Execute \\help or \\? for help;`;
30873087
void requisitions.execute("showInfo",
30883088
`The HeatWave options have been loaded successfully from ${fileResult.path[0]}`);
30893089
}
3090-
} catch (reason) {
3090+
} catch (reason) /* istanbul ignore next */ {
30913091
let content: string;
30923092

30933093
if (reason instanceof ResponseError) {

0 commit comments

Comments
 (0)