Skip to content

Commit 7654d13

Browse files
committed
fix test blindspot
1 parent 9d36396 commit 7654d13

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

test/run

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Default Python Versions
44
# shellcheck source=bin/default_pythons
5-
source "$BIN_DIR/default_pythons"
5+
source "bin/default_pythons"
66

77
testAirflow() {
88
export SLUGIFY_USES_TEXT_UNIDECODE="yes"
@@ -98,14 +98,19 @@ testPylibmc() {
9898
}
9999

100100
testPythonDefault() {
101+
updateVersion "pythonDefault" $DEFAULT_PYTHON_VERSION
101102
compile "pythonDefault"
102103
assertCaptured $DEFAULT_PYTHON_VERSION
104+
assertNotCaptured "security update"
103105
assertCapturedSuccess
104106
}
105107

106108
testPython2() {
109+
updateVersion "python2" $LATEST_27
110+
echo $LATEST_27 > "runtime.txt"
107111
compile "python2"
108112
assertCaptured $LATEST_27
113+
assertNotCaptured "security update"
109114
assertCapturedSuccess
110115
}
111116

@@ -123,8 +128,10 @@ testPython2_fail() {
123128
}
124129

125130
testPython3_4() {
131+
updateVersion "python3_4" $LATEST_34
126132
compile "python3_4"
127133
assertCaptured $LATEST_34
134+
assertNotCaptured "security update"
128135
assertCapturedSuccess
129136
}
130137

@@ -146,8 +153,10 @@ testPython3_4_fail() {
146153
}
147154

148155
testPython3_5() {
156+
updateVersion "python3_5" $LATEST_35
149157
compile "python3_5"
150158
assertCaptured $LATEST_35
159+
assertNotCaptured "security update"
151160
assertCapturedSuccess
152161
}
153162

@@ -169,8 +178,10 @@ testPython3_5_fail() {
169178
}
170179

171180
testPython3_6() {
181+
updateVersion "python3_6" $LATEST_36
172182
compile "python3_6"
173183
assertCaptured $LATEST_36
184+
assertNotCaptured "security update"
174185
assertCapturedSuccess
175186
}
176187

@@ -188,10 +199,12 @@ testPython3_6_fail() {
188199
}
189200

190201
testPython3_7() {
202+
updateVersion "python3_7" $LATEST_37
191203
compile "python3_7"
192204
if [[ $STACK = "cedar-14" ]]; then
193205
assertCapturedError
194206
else
207+
assertNotCaptured "security update"
195208
assertCaptured $LATEST_37
196209
assertCapturedSuccess
197210
fi

test/utils

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,11 @@ release()
7171
capture ${BUILDPACK_HOME}/bin/release ${BUILD_DIR}
7272
}
7373

74+
updateVersion()
75+
{
76+
echo "$2" > "test/fixtures/${1}/runtime.txt"
77+
}
78+
7479
assertCapturedEquals()
7580
{
7681
assertEquals "$@" "$(cat ${STD_OUT})"

0 commit comments

Comments
 (0)