@@ -15,7 +15,7 @@ const podToSelect = process.env.POD_TO_SELECT;
15
15
* - Send traffic to the pod
16
16
* - Tests successfully exit if "GET: Request completed" is found in the terminal
17
17
*/
18
- describe ( "mirrord sample flow test" , function ( ) {
18
+ describe ( "mirrord sample flow test" , function ( ) {
19
19
20
20
this . timeout ( "6 minutes" ) ; // --> mocha tests timeout
21
21
this . bail ( true ) ; // --> stop tests on first failure
@@ -26,7 +26,7 @@ describe("mirrord sample flow test", function () {
26
26
const fileName = "app_flask.py" ;
27
27
const defaultTimeout = 10000 ; // = 10 seconds
28
28
29
- before ( async function ( ) {
29
+ before ( async function ( ) {
30
30
console . log ( "podToSelect: " + podToSelect ) ;
31
31
console . log ( "kubeService: " + kubeService ) ;
32
32
@@ -48,7 +48,7 @@ describe("mirrord sample flow test", function () {
48
48
await ew . openEditor ( 'app_flask.py' ) ;
49
49
} ) ;
50
50
51
- it ( "enable mirrord button" , async function ( ) {
51
+ it ( "enable mirrord button" , async function ( ) {
52
52
const statusBar = new StatusBar ( ) ;
53
53
54
54
await browser . driver . wait ( async ( ) => {
@@ -80,7 +80,7 @@ describe("mirrord sample flow test", function () {
80
80
} , defaultTimeout , "mirrord `enable` button not found -- timed out" ) ;
81
81
} ) ;
82
82
83
- it ( "select pod from quickpick" , async function ( ) {
83
+ it ( "select pod from quickpick" , async function ( ) {
84
84
await startDebugging ( ) ;
85
85
const inputBox = await InputBox . create ( defaultTimeout * 2 ) ;
86
86
// assertion that podToSelect is not undefined is done in "before" block
@@ -108,38 +108,28 @@ describe("mirrord sample flow test", function () {
108
108
await inputBox . selectQuickPick ( podToSelect ! ) ;
109
109
} ) ;
110
110
111
- it ( "wait for process to write to terminal" , async function ( ) {
111
+ it ( "wait for process to write to terminal" , async function ( ) {
112
112
const debugToolbar = await DebugToolbar . create ( 2 * defaultTimeout ) ;
113
- console . log ( "waiting for debug toolbar1" ) ;
114
113
const panel = new BottomBarPanel ( ) ;
115
- let terminal = await panel . openTerminalView ( ) ;
116
- console . log ( "waiting for debug toolbar2" ) ;
117
114
await browser . driver . wait ( async ( ) => {
118
- return await debugToolbar . isDisplayed ( ) && await panel . isDisplayed ( ) ;
115
+ return await debugToolbar . isDisplayed ( ) ;
119
116
} , 2 * defaultTimeout , "debug toolbar not found -- timed out" ) ;
120
117
121
- console . log ( "debug toolbar found" ) ;
122
-
123
118
124
- console . log ( " terminal opened" ) ;
119
+ let terminal = await panel . openTerminalView ( ) ;
125
120
126
121
await browser . driver . wait ( async ( ) => {
127
122
const text = await terminal . getText ( ) ;
128
123
return await terminal . isDisplayed ( ) && text . includes ( "Press CTRL+C to quit" ) ;
129
124
} , 2 * defaultTimeout , "terminal text not found -- timed out" ) ;
130
125
131
- console . log ( "terminal text found" ) ;
132
126
await sendTrafficToPod ( ) ;
133
127
134
- console . log ( "traffic sent to pod" ) ;
135
-
136
128
await browser . driver . wait ( async ( ) => {
137
129
const text = await terminal . getText ( ) ;
138
130
return text . includes ( "GET: Request completed" ) ;
139
131
} , defaultTimeout , "terminal text not found -- timed out" ) ;
140
132
141
- console . log ( "terminal text found - traffic sent to pod" ) ;
142
-
143
133
} ) ;
144
134
} ) ;
145
135
0 commit comments