11use crate :: packaging_tool_versions:: PackagingToolVersions ;
2- use crate :: tests:: { builder, DEFAULT_PYTHON_VERSION } ;
2+ use crate :: tests:: { builder, default_build_config , DEFAULT_PYTHON_VERSION } ;
33use indoc:: { formatdoc, indoc} ;
4- use libcnb_test:: {
5- assert_contains, assert_empty, BuildConfig , BuildpackReference , PackResult , TestRunner ,
6- } ;
4+ use libcnb_test:: { assert_contains, assert_empty, BuildpackReference , PackResult , TestRunner } ;
75
86#[ test]
97#[ ignore = "integration test" ]
@@ -14,7 +12,7 @@ fn pip_basic_install_and_cache_reuse() {
1412 wheel_version,
1513 } = PackagingToolVersions :: default ( ) ;
1614
17- let config = BuildConfig :: new ( builder ( ) , "tests/fixtures/pip_basic" ) ;
15+ let config = default_build_config ( "tests/fixtures/pip_basic" ) ;
1816
1917 TestRunner :: default ( ) . build ( & config, |context| {
2018 assert_empty ! ( context. pack_stderr) ;
@@ -97,8 +95,9 @@ fn pip_basic_install_and_cache_reuse() {
9795#[ test]
9896#[ ignore = "integration test" ]
9997fn pip_cache_invalidation_with_compatible_metadata ( ) {
100- // TODO: Re-enable this test after the next buildpack release, at which point there will
101- // be a historic buildpack version with compatible cache metadata that we can use.
98+ // TODO: Re-enable this test the next time the default-Python/pip/setuptools/wheel versions
99+ // change, at which point there will be a historic buildpack version that has both compatible
100+ // metadata, and that is also compatible with Ubuntu 24.04.
102101 #![ allow( unreachable_code) ]
103102 return ;
104103
@@ -108,7 +107,7 @@ fn pip_cache_invalidation_with_compatible_metadata() {
108107 wheel_version,
109108 } = PackagingToolVersions :: default ( ) ;
110109
111- let config = BuildConfig :: new ( builder ( ) , "tests/fixtures/pip_basic" ) ;
110+ let config = default_build_config ( "tests/fixtures/pip_basic" ) ;
112111
113112 TestRunner :: default ( ) . build (
114113 config. clone ( ) . buildpacks ( [ BuildpackReference :: Other (
@@ -154,13 +153,19 @@ fn pip_cache_invalidation_with_compatible_metadata() {
154153#[ test]
155154#[ ignore = "integration test" ]
156155fn pip_cache_invalidation_with_incompatible_metadata ( ) {
156+ // TODO: Enable this test on Heroku-24 the next time there is an incompatible metadata change,
157+ // meaning we can bump the historic buildpack version to one that also supports Ubuntu 24.04.
158+ if builder ( ) == "heroku/builder:24" {
159+ return ;
160+ }
161+
157162 let PackagingToolVersions {
158163 pip_version,
159164 setuptools_version,
160165 wheel_version,
161166 } = PackagingToolVersions :: default ( ) ;
162167
163- let config = BuildConfig :: new ( builder ( ) , "tests/fixtures/pip_basic" ) ;
168+ let config = default_build_config ( "tests/fixtures/pip_basic" ) ;
164169
165170 TestRunner :: default ( ) . build (
166171 config. clone ( ) . buildpacks ( [ BuildpackReference :: Other (
@@ -206,7 +211,7 @@ fn pip_cache_invalidation_with_incompatible_metadata() {
206211#[ ignore = "integration test" ]
207212fn pip_editable_git_compiled ( ) {
208213 TestRunner :: default ( ) . build (
209- BuildConfig :: new ( builder ( ) , "tests/fixtures/pip_editable_git_compiled" )
214+ default_build_config ( "tests/fixtures/pip_editable_git_compiled" )
210215 . env ( "WHEEL_PACKAGE_URL" , "https://github.com/pypa/wheel" ) ,
211216 |context| {
212217 assert_contains ! (
@@ -221,7 +226,7 @@ fn pip_editable_git_compiled() {
221226#[ ignore = "integration test" ]
222227fn pip_install_error ( ) {
223228 TestRunner :: default ( ) . build (
224- BuildConfig :: new ( builder ( ) , "tests/fixtures/pip_invalid_requirement" )
229+ default_build_config ( "tests/fixtures/pip_invalid_requirement" )
225230 . expected_pack_result ( PackResult :: Failure ) ,
226231 |context| {
227232 // Ideally we could test a combined stdout/stderr, however libcnb-test doesn't support this:
0 commit comments