Skip to content

Commit b191529

Browse files
committed
test: fix logic errors in restart helper tests
Signed-off-by: Russell Centanni <[email protected]>
1 parent a8d535a commit b191529

File tree

5 files changed

+11
-21
lines changed

5 files changed

+11
-21
lines changed

e2e/tests/restarthelper/restarthelper.go

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,6 @@ var _ = DevSpaceDescribe("restarthelper", func() {
109109
}
110110
}
111111

112-
if waitSeen && !hasWaitingMessage {
113-
break
114-
}
115-
116112
if waitCount > waitMax {
117113
break
118114
}
@@ -172,7 +168,7 @@ var _ = DevSpaceDescribe("restarthelper", func() {
172168
waitCount := 0
173169
waitMax := 3
174170
waitingMessage := "(Still waiting...)"
175-
startedMessage := "Started with restart helper"
171+
startedMessage := "Started with dev command entrypoint"
176172
startedSeen := false
177173

178174
for scanner.Scan() {
@@ -194,10 +190,6 @@ var _ = DevSpaceDescribe("restarthelper", func() {
194190
}
195191
}
196192

197-
if waitSeen && !hasWaitingMessage {
198-
break
199-
}
200-
201193
if waitCount > waitMax {
202194
break
203195
}
@@ -257,9 +249,9 @@ var _ = DevSpaceDescribe("restarthelper", func() {
257249
waitCount := 0
258250
waitMax := 3
259251
waitingMessage := "(Still waiting...)"
260-
startedMessage := "Started with restart helper"
252+
startedMessage := "Started with dev command entrypoint"
261253
startedSeen := false
262-
legacyStartedMessage := "Started with restart helper"
254+
legacyStartedMessage := "Started with legacy restart helper"
263255
legacyStartedSeen := false
264256

265257
for scanner.Scan() {
@@ -287,10 +279,6 @@ var _ = DevSpaceDescribe("restarthelper", func() {
287279
}
288280
}
289281

290-
if waitSeen && !hasWaitingMessage {
291-
break
292-
}
293-
294282
if waitCount > waitMax {
295283
break
296284
}
@@ -373,10 +361,6 @@ var _ = DevSpaceDescribe("restarthelper", func() {
373361
}
374362
}
375363

376-
if waitSeen && !hasWaitingMessage {
377-
break
378-
}
379-
380364
if waitCount > waitMax {
381365
break
382366
}

e2e/tests/restarthelper/testdata/v5/devspace.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ images:
44
restart-helper:
55
image: john/devbackend
66
injectRestartHelper: true
7+
build:
8+
docker:
9+
skipPush: true
710

811
deployments:
912
- name: restart-helper

e2e/tests/restarthelper/testdata/v6-inject-restart-helper/devspace.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ images:
44
restart-helper:
55
image: john/devbackend
66
injectRestartHelper: true
7+
skipPush: true
78

89
deployments:
910
restart-helper:
@@ -19,7 +20,7 @@ dev:
1920
command:
2021
- sh
2122
- -c
22-
- echo 'Started with restart helper' && tail -f /dev/null
23+
- echo 'Started with dev command entrypoint' && tail -f /dev/null
2324
ports:
2425
- port: 8080
2526
sync:

e2e/tests/restarthelper/testdata/v6-manual-start/devspace.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ images:
44
restart-helper:
55
image: john/devbackend
66
injectRestartHelper: true
7+
skipPush: true
78

89
deployments:
910
restart-helper:

e2e/tests/restarthelper/testdata/v6/devspace.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ version: v2beta1
33
images:
44
restart-helper:
55
image: john/devbackend
6+
skipPush: true
67

78
deployments:
89
restart-helper:
@@ -18,7 +19,7 @@ dev:
1819
command:
1920
- sh
2021
- -c
21-
- echo 'Started with restart helper' && tail -f /dev/null
22+
- echo 'Started with dev command entrypoint' && tail -f /dev/null
2223
ports:
2324
- port: 8080
2425
sync:

0 commit comments

Comments
 (0)