Skip to content

Commit 443872c

Browse files
committed
fixup! fixup! fix: fall back to the original behaviour if timeout is disabled
Signed-off-by: Oleksii Kurinnyi <[email protected]>
1 parent 2813408 commit 443872c

File tree

4 files changed

+13
-38
lines changed

4 files changed

+13
-38
lines changed

pkg/library/lifecycle/testdata/postStart/adds_all_postStart_commands.yaml

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,8 @@ output:
3737
- -c
3838
- |
3939
{
40-
# This script block ensures its exit code is preserved
41-
# while its stdout and stderr are tee'd.
42-
_script_to_run() {
43-
echo 'hello world 1' # This will be replaced by scriptWithTimeout
44-
}
45-
_script_to_run
46-
} 1> >(tee -a "/tmp/poststart-stdout.txt") 2> >(tee -a "/tmp/poststart-stderr.txt" >&2)
40+
echo 'hello world 1'
41+
} 1>/tmp/poststart-stdout.txt 2>/tmp/poststart-stderr.txt
4742
- name: test-component-2
4843
image: test-img
4944
lifecycle:
@@ -54,13 +49,8 @@ output:
5449
- -c
5550
- |
5651
{
57-
# This script block ensures its exit code is preserved
58-
# while its stdout and stderr are tee'd.
59-
_script_to_run() {
60-
cd /tmp/test-dir
61-
echo 'hello world 2' # This will be replaced by scriptWithTimeout
62-
}
63-
_script_to_run
64-
} 1> >(tee -a "/tmp/poststart-stdout.txt") 2> >(tee -a "/tmp/poststart-stderr.txt" >&2)
52+
cd /tmp/test-dir
53+
echo 'hello world 2'
54+
} 1>/tmp/poststart-stdout.txt 2>/tmp/poststart-stderr.txt
6555
- name: test-component-3
6656
image: test-img

pkg/library/lifecycle/testdata/postStart/basic_postStart.yaml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,5 @@ output:
2626
- -c
2727
- |
2828
{
29-
# This script block ensures its exit code is preserved
30-
# while its stdout and stderr are tee'd.
31-
_script_to_run() {
32-
echo 'hello world' # This will be replaced by scriptWithTimeout
33-
}
34-
_script_to_run
35-
} 1> >(tee -a "/tmp/poststart-stdout.txt") 2> >(tee -a "/tmp/poststart-stderr.txt" >&2)
29+
echo 'hello world'
30+
} 1>/tmp/poststart-stdout.txt 2>/tmp/poststart-stderr.txt

pkg/library/lifecycle/testdata/postStart/multiple_poststart_commands.yaml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,6 @@ output:
3131
- -c
3232
- |
3333
{
34-
# This script block ensures its exit code is preserved
35-
# while its stdout and stderr are tee'd.
36-
_script_to_run() {
37-
echo 'hello world 1'
38-
echo 'hello world 2' # This will be replaced by scriptWithTimeout
39-
}
40-
_script_to_run
41-
} 1> >(tee -a "/tmp/poststart-stdout.txt") 2> >(tee -a "/tmp/poststart-stderr.txt" >&2)
34+
echo 'hello world 1'
35+
echo 'hello world 2'
36+
} 1>/tmp/poststart-stdout.txt 2>/tmp/poststart-stderr.txt

pkg/library/lifecycle/testdata/postStart/workingDir_postStart.yaml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,6 @@ output:
2727
- -c
2828
- |
2929
{
30-
# This script block ensures its exit code is preserved
31-
# while its stdout and stderr are tee'd.
32-
_script_to_run() {
33-
cd /tmp/test-dir
34-
echo 'hello world' # This will be replaced by scriptWithTimeout
35-
}
36-
_script_to_run
37-
} 1> >(tee -a "/tmp/poststart-stdout.txt") 2> >(tee -a "/tmp/poststart-stderr.txt" >&2)
30+
cd /tmp/test-dir
31+
echo 'hello world'
32+
} 1>/tmp/poststart-stdout.txt 2>/tmp/poststart-stderr.txt

0 commit comments

Comments
 (0)