Skip to content

Commit

Permalink
Switch tests from heroku/buildpacks:20 to heroku/builder:20
Browse files Browse the repository at this point in the history
Since the `heroku/buildpacks:20` image is about to be deprecated,
and has been replaced by the newly added `heroku/builder:20` for
those that need to use a Heroku-20 based builder.

The build and run images used by `heroku/builder:20` are the same as
those used by `heroku/buildpacks:20` - the only differences between the
builders are the included buildpacks (which is somewhat irrelevant for
these integration tests, since the buildpack under test will be injected instead).

The smoke tests in the `heroku/builder` GitHub repo are still testing
against all image variants (until such time as we make the legacy images
error with an EOL message), so we still have test coverage against them.

See:
heroku/cnb-builder-images#394
https://salesforce.quip.com/0JtbAYiWZYk6

GUS-W-14186015.
  • Loading branch information
edmorley committed Sep 26, 2023
1 parent 7488c20 commit 575c3a0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
strategy:
fail-fast: false
matrix:
builder: ["builder:22", "buildpacks:20"]
builder: ["builder:22", "builder:20"]
env:
INTEGRATION_TEST_CNB_BUILDER: heroku/${{ matrix.builder }}
steps:
Expand Down
6 changes: 3 additions & 3 deletions tests/python_version_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ fn python_3_7() {
// Python 3.7 is only available on Heroku-20 and older.
let fixture = "tests/fixtures/python_3.7";
match builder().as_str() {
"heroku/buildpacks:20" => builds_with_python_version(fixture, LATEST_PYTHON_3_7),
"heroku/builder:20" => builds_with_python_version(fixture, LATEST_PYTHON_3_7),
_ => rejects_non_existent_python_version(fixture, LATEST_PYTHON_3_7),
};
}
Expand All @@ -45,7 +45,7 @@ fn python_3_8() {
// Python 3.8 is only available on Heroku-20 and older.
let fixture = "tests/fixtures/python_3.8";
match builder().as_str() {
"heroku/buildpacks:20" => builds_with_python_version(fixture, LATEST_PYTHON_3_8),
"heroku/builder:20" => builds_with_python_version(fixture, LATEST_PYTHON_3_8),
_ => rejects_non_existent_python_version(fixture, LATEST_PYTHON_3_8),
};
}
Expand Down Expand Up @@ -187,7 +187,7 @@ fn rejects_non_existent_python_version(fixture_path: &str, python_version: &str)
BuildConfig::new(&builder, fixture_path).expected_pack_result(PackResult::Failure),
|context| {
let expected_stack = match builder.as_str() {
"heroku/buildpacks:20" => "heroku-20",
"heroku/builder:20" => "heroku-20",
"heroku/builder:22" => "heroku-22",
_ => unimplemented!("Unknown builder!"),
};
Expand Down

0 comments on commit 575c3a0

Please sign in to comment.