Skip to content

Commit

Permalink
Combine tests for handling of invalid app fixture directories (#714)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
edmorley authored Nov 2, 2023
1 parent b810ff0 commit 7b7af98
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions libcnb-test/tests/integration_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit 7b7af98

Please sign in to comment.