From 7b7af98a180ef235563b61b68641f802d6b7ffcb Mon Sep 17 00:00:00 2001 From: Ed Morley <501702+edmorley@users.noreply.github.com> Date: Thu, 2 Nov 2023 13:14:10 +0000 Subject: [PATCH] Combine tests for handling of invalid app fixture directories (#714) The tests `app_dir_invalid_path_checked_before_applying_preprocessor` and `app_dir_invalid_path` were virtually identical, and both can easily be tested in the same test, by adding the `.app_dir_preprocessor()` usage to the main test. --- libcnb-test/tests/integration_test.rs | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/libcnb-test/tests/integration_test.rs b/libcnb-test/tests/integration_test.rs index bc620086..1a5b128e 100644 --- a/libcnb-test/tests/integration_test.rs +++ b/libcnb-test/tests/integration_test.rs @@ -235,20 +235,6 @@ fn app_dir_absolute_path() { // that only appears in the absolute path, not the relative path passed to `BuildConfig::new`. #[should_panic(expected = "libcnb-test/tests/fixtures/non-existent-fixture")] fn app_dir_invalid_path() { - TestRunner::default().build( - BuildConfig::new("heroku/builder:22", "tests/fixtures/non-existent-fixture") - .buildpacks(Vec::new()), - |_| {}, - ); -} - -#[test] -#[ignore = "integration test"] -// The full panic message looks like this: -// `"App dir is not a valid directory: /.../libcnb-test/tests/fixtures/non-existent-fixture"` -// See above for why we only test this substring. -#[should_panic(expected = "libcnb-test/tests/fixtures/non-existent-fixture")] -fn app_dir_invalid_path_checked_before_applying_preprocessor() { TestRunner::default().build( BuildConfig::new("heroku/builder:22", "tests/fixtures/non-existent-fixture") .buildpacks(Vec::new())