Skip to content

Commit 9e20dfd

Browse files
author
infiniteregrets
committed
Tests
1 parent f4f60c6 commit 9e20dfd

File tree

1 file changed

+7
-17
lines changed

1 file changed

+7
-17
lines changed

src/tests/e2e.ts

+7-17
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const podToSelect = process.env.POD_TO_SELECT;
1515
* - Send traffic to the pod
1616
* - Tests successfully exit if "GET: Request completed" is found in the terminal
1717
*/
18-
describe("mirrord sample flow test", function () {
18+
describe("mirrord sample flow test", function() {
1919

2020
this.timeout("6 minutes"); // --> mocha tests timeout
2121
this.bail(true); // --> stop tests on first failure
@@ -26,7 +26,7 @@ describe("mirrord sample flow test", function () {
2626
const fileName = "app_flask.py";
2727
const defaultTimeout = 10000; // = 10 seconds
2828

29-
before(async function () {
29+
before(async function() {
3030
console.log("podToSelect: " + podToSelect);
3131
console.log("kubeService: " + kubeService);
3232

@@ -48,7 +48,7 @@ describe("mirrord sample flow test", function () {
4848
await ew.openEditor('app_flask.py');
4949
});
5050

51-
it("enable mirrord button", async function () {
51+
it("enable mirrord button", async function() {
5252
const statusBar = new StatusBar();
5353

5454
await browser.driver.wait(async () => {
@@ -80,7 +80,7 @@ describe("mirrord sample flow test", function () {
8080
}, defaultTimeout, "mirrord `enable` button not found -- timed out");
8181
});
8282

83-
it("select pod from quickpick", async function () {
83+
it("select pod from quickpick", async function() {
8484
await startDebugging();
8585
const inputBox = await InputBox.create(defaultTimeout * 2);
8686
// assertion that podToSelect is not undefined is done in "before" block
@@ -108,38 +108,28 @@ describe("mirrord sample flow test", function () {
108108
await inputBox.selectQuickPick(podToSelect!);
109109
});
110110

111-
it("wait for process to write to terminal", async function () {
111+
it("wait for process to write to terminal", async function() {
112112
const debugToolbar = await DebugToolbar.create(2 * defaultTimeout);
113-
console.log("waiting for debug toolbar1");
114113
const panel = new BottomBarPanel();
115-
let terminal = await panel.openTerminalView();
116-
console.log("waiting for debug toolbar2");
117114
await browser.driver.wait(async () => {
118-
return await debugToolbar.isDisplayed() && await panel.isDisplayed();
115+
return await debugToolbar.isDisplayed();
119116
}, 2 * defaultTimeout, "debug toolbar not found -- timed out");
120117

121-
console.log("debug toolbar found");
122-
123118

124-
console.log("terminal opened");
119+
let terminal = await panel.openTerminalView();
125120

126121
await browser.driver.wait(async () => {
127122
const text = await terminal.getText();
128123
return await terminal.isDisplayed() && text.includes("Press CTRL+C to quit");
129124
}, 2 * defaultTimeout, "terminal text not found -- timed out");
130125

131-
console.log("terminal text found");
132126
await sendTrafficToPod();
133127

134-
console.log("traffic sent to pod");
135-
136128
await browser.driver.wait(async () => {
137129
const text = await terminal.getText();
138130
return text.includes("GET: Request completed");
139131
}, defaultTimeout, "terminal text not found -- timed out");
140132

141-
console.log("terminal text found - traffic sent to pod");
142-
143133
});
144134
});
145135

0 commit comments

Comments
 (0)