Skip to content

Commit 89885a4

Browse files
authored
Merge pull request #860 from heroku/test-staged-binaries
Test staged binaries
2 parents 0c66cea + 3c193bd commit 89885a4

File tree

6 files changed

+37
-27
lines changed

6 files changed

+37
-27
lines changed

.travis.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ before_script:
1010

1111
script:
1212
- docker build --pull --tag travis-build-cedar-14 --file $(pwd)/builds/cedar-14.Dockerfile .
13-
- docker run --rm -e "STACK=cedar-14" travis-build-cedar-14 bash $TESTFOLDER
13+
- docker run --rm -e "STACK=cedar-14" -e "USE_STAGING_BINARIES=$USE_STAGING_BINARIES" travis-build-cedar-14 bash $TESTFOLDER
1414
- docker build --pull --tag travis-build-heroku-16 --file $(pwd)/builds/heroku-16.Dockerfile .
15-
- docker run --rm -e "STACK=heroku-16" travis-build-heroku-16 bash $TESTFOLDER
15+
- docker run --rm -e "STACK=heroku-16" -e "USE_STAGING_BINARIES=$USE_STAGING_BINARIES" travis-build-heroku-16 bash $TESTFOLDER
1616
- docker build --pull --tag travis-build-heroku-18 --file $(pwd)/builds/heroku-18.Dockerfile .
17-
- docker run --rm -e "STACK=heroku-18" travis-build-heroku-18 bash $TESTFOLDER
17+
- docker run --rm -e "STACK=heroku-18" -e "USE_STAGING_BINARIES=$USE_STAGING_BINARIES" travis-build-heroku-18 bash $TESTFOLDER
1818

1919
jobs:
2020
include:
@@ -28,8 +28,11 @@ jobs:
2828
env:
2929
matrix:
3030
- TESTFOLDER=test/run-deps
31+
- TESTFOLDER=test/run-deps USE_STAGING_BINARIES=https://lang-python.s3.amazonaws.com/staging
3132
- TESTFOLDER=test/run-versions
33+
- TESTFOLDER=test/run-versions USE_STAGING_BINARIES=https://lang-python.s3.amazonaws.com/staging
3234
- TESTFOLDER=test/run-features
35+
- TESTFOLDER=test/run-features USE_STAGING_BINARIES=https://lang-python.s3.amazonaws.com/staging
3336
global:
3437
- HATCHET_RETRIES=3
3538
- IS_RUNNING_ON_CI=true

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
# Master
44

5+
- Test staged binaries on Travis
6+
57
--------------------------------------------------------------------------------
68

79
# 160 (2019-10-23)

test/fixtures/python3_4/runtime.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
python-3.4.9
1+
python-3.4.10

test/fixtures/python3_5/runtime.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
python-3.5.6
1+
python-3.5.7
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
python-3.5.3
1+
python-3.5.6

test/run-versions

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,17 @@ testPython2_fail() {
3838
}
3939

4040
testPython3_4() {
41-
if [[ $STACK != "cedar-14" ]]; then
42-
updateVersion "python3_4" $LATEST_34
43-
compile "python3_4"
44-
assertCaptured $LATEST_34
45-
assertNotCaptured "security update"
41+
compile "python3_4"
42+
assertCaptured $LATEST_34
43+
assertNotCaptured "security update"
44+
# if cedar 14 and legacy binaries, fail. if cedar 14 and staging, succeed.
45+
if [[ ! -n $USE_STAGING_BINARIES ]] && [[ $STACK == "cedar-14" ]]; then
46+
assertCapturedError
47+
# if heroku 18 and legacy binaries, succeed. if heroku 18 and staging, fail.
48+
elif [[ -n $USE_STAGING_BINARIES ]] && [[ $STACK == "heroku-18" ]]; then
49+
assertCapturedError
50+
else
51+
# all else succeed
4652
assertCapturedSuccess
4753
fi
4854
}
@@ -51,7 +57,13 @@ testPython3_4_warn() {
5157
compile "python3_4_warn"
5258
assertCaptured "python-3.4.9"
5359
assertCaptured "security update!"
54-
assertCapturedSuccess
60+
# if heroku 18 and legacy binaries, succeed. if heroku 18 and staging, fail.
61+
if [[ -n $USE_STAGING_BINARIES ]] && [[ $STACK == "heroku-18" ]]; then
62+
assertCapturedError
63+
else
64+
# all else succeed
65+
assertCapturedSuccess
66+
fi
5567
}
5668

5769
testPython3_4_fail() {
@@ -61,25 +73,18 @@ testPython3_4_fail() {
6173
}
6274

6375
testPython3_5() {
64-
if [[ $STACK != "cedar-14" ]]; then
65-
updateVersion "python3_5" $LATEST_35
66-
compile "python3_5"
67-
assertCaptured $LATEST_35
68-
assertNotCaptured "security update"
69-
assertCaptured "Installing SQLite3"
70-
assertCapturedSuccess
71-
fi
76+
compile "python3_5"
77+
assertCaptured $LATEST_35
78+
assertNotCaptured "security update"
79+
assertCaptured "Installing SQLite3"
80+
assertCapturedSuccess
7281
}
7382

7483
testPython3_5_warn() {
7584
compile "python3_5_warn"
76-
if [[ $STACK = "cedar-14" ]]; then
77-
assertCaptured "python-3.5.3"
78-
assertCaptured "security update!"
79-
assertCapturedError
80-
else
81-
assertCapturedError
82-
fi
85+
assertCaptured "python-3.5.6"
86+
assertCaptured "security update!"
87+
assertCapturedSuccess
8388
}
8489

8590
testPython3_5_fail() {

0 commit comments

Comments
 (0)