From c19486832f5a9d3f503eea3987e4b97caf75bebd Mon Sep 17 00:00:00 2001 From: Ed Morley <501702+edmorley@users.noreply.github.com> Date: Thu, 21 Sep 2023 12:45:52 +0000 Subject: [PATCH] Use a consistent approach for organising test fixture files (#681) Previously test fixtures were located under a mixture of: * `/fixtures/` * `/test-fixtures/` Now for consistency they are all located under: `/tests/fixtures/` This matches the pattern already used by the Python CNB, Procfile CNB etc. GUS-W-14161083. --- .gitignore | 12 ++-- .../fixtures}/empty-app/.gitkeep | 0 examples/execd/tests/integration_test.rs | 2 +- .../fixtures}/simple-ruby-app/Gemfile | 0 .../fixtures}/simple-ruby-app/Gemfile.lock | 0 .../fixtures}/simple-ruby-app/app.rb | 0 .../ruby-sample/tests/integration_test.rs | 4 +- .../fixtures/multiple_buildpacks/Cargo.toml | 0 .../buildpacks/not_libcnb/bin/build | 0 .../buildpacks/not_libcnb/bin/detect | 0 .../buildpacks/not_libcnb/buildpack.toml | 0 .../buildpacks/one/Cargo.toml | 0 .../buildpacks/one/buildpack.toml | 0 .../buildpacks/one/src/main.rs | 0 .../buildpacks/two/Cargo.toml | 0 .../buildpacks/two/buildpack.toml | 0 .../buildpacks/two/src/main.rs | 0 .../meta-buildpacks/meta-one/buildpack.toml | 0 .../meta-buildpacks/meta-one/package.toml | 0 .../fixtures/no_buildpacks/Cargo.toml | 0 .../no_buildpacks/not_a_buildpack/Cargo.toml | 0 .../no_buildpacks/not_a_buildpack/src/main.rs | 0 .../fixtures/single_buildpack/Cargo.toml | 0 .../fixtures/single_buildpack/buildpack.toml | 0 .../fixtures/single_buildpack/src/main.rs | 0 libcnb-cargo/tests/integration_test.rs | 2 +- libcnb-test/README.md | 16 +++--- libcnb-test/src/build_config.rs | 20 +++---- libcnb-test/src/container_config.rs | 14 ++--- libcnb-test/src/container_context.rs | 8 +-- libcnb-test/src/test_context.rs | 10 ++-- libcnb-test/src/test_runner.rs | 4 +- .../buildpacks/libcnb-test-a/Cargo.toml | 0 .../buildpacks/libcnb-test-a/buildpack.toml | 0 .../buildpacks/libcnb-test-a/src/main.rs | 0 .../buildpacks/libcnb-test-b/Cargo.toml | 0 .../buildpacks/libcnb-test-b/buildpack.toml | 0 .../buildpacks/libcnb-test-b/src/main.rs | 0 .../libcnb-test-meta/buildpack.toml | 0 .../buildpacks/libcnb-test-meta/package.toml | 0 .../fixtures}/empty/.gitkeep | 0 .../fixtures}/nested_dirs/file1.txt | 0 .../fixtures}/nested_dirs/subdir1/file2.txt | 0 .../subdir1/subdir2/subdir3/file3.txt | 0 .../fixtures}/procfile/Procfile | 0 libcnb-test/tests/integration_test.rs | 56 +++++++++---------- 46 files changed, 75 insertions(+), 73 deletions(-) rename examples/execd/{test-fixtures => tests/fixtures}/empty-app/.gitkeep (100%) rename examples/ruby-sample/{test-fixtures => tests/fixtures}/simple-ruby-app/Gemfile (100%) rename examples/ruby-sample/{test-fixtures => tests/fixtures}/simple-ruby-app/Gemfile.lock (100%) rename examples/ruby-sample/{test-fixtures => tests/fixtures}/simple-ruby-app/app.rb (100%) rename libcnb-cargo/{ => tests}/fixtures/multiple_buildpacks/Cargo.toml (100%) rename libcnb-cargo/{ => tests}/fixtures/multiple_buildpacks/buildpacks/not_libcnb/bin/build (100%) rename libcnb-cargo/{ => tests}/fixtures/multiple_buildpacks/buildpacks/not_libcnb/bin/detect (100%) rename libcnb-cargo/{ => tests}/fixtures/multiple_buildpacks/buildpacks/not_libcnb/buildpack.toml (100%) rename libcnb-cargo/{ => tests}/fixtures/multiple_buildpacks/buildpacks/one/Cargo.toml (100%) rename libcnb-cargo/{ => tests}/fixtures/multiple_buildpacks/buildpacks/one/buildpack.toml (100%) rename libcnb-cargo/{ => tests}/fixtures/multiple_buildpacks/buildpacks/one/src/main.rs (100%) rename libcnb-cargo/{ => tests}/fixtures/multiple_buildpacks/buildpacks/two/Cargo.toml (100%) rename libcnb-cargo/{ => tests}/fixtures/multiple_buildpacks/buildpacks/two/buildpack.toml (100%) rename libcnb-cargo/{ => tests}/fixtures/multiple_buildpacks/buildpacks/two/src/main.rs (100%) rename libcnb-cargo/{ => tests}/fixtures/multiple_buildpacks/meta-buildpacks/meta-one/buildpack.toml (100%) rename libcnb-cargo/{ => tests}/fixtures/multiple_buildpacks/meta-buildpacks/meta-one/package.toml (100%) rename libcnb-cargo/{ => tests}/fixtures/no_buildpacks/Cargo.toml (100%) rename libcnb-cargo/{ => tests}/fixtures/no_buildpacks/not_a_buildpack/Cargo.toml (100%) rename libcnb-cargo/{ => tests}/fixtures/no_buildpacks/not_a_buildpack/src/main.rs (100%) rename libcnb-cargo/{ => tests}/fixtures/single_buildpack/Cargo.toml (100%) rename libcnb-cargo/{ => tests}/fixtures/single_buildpack/buildpack.toml (100%) rename libcnb-cargo/{ => tests}/fixtures/single_buildpack/src/main.rs (100%) rename libcnb-test/{test-fixtures => tests/fixtures}/buildpacks/libcnb-test-a/Cargo.toml (100%) rename libcnb-test/{test-fixtures => tests/fixtures}/buildpacks/libcnb-test-a/buildpack.toml (100%) rename libcnb-test/{test-fixtures => tests/fixtures}/buildpacks/libcnb-test-a/src/main.rs (100%) rename libcnb-test/{test-fixtures => tests/fixtures}/buildpacks/libcnb-test-b/Cargo.toml (100%) rename libcnb-test/{test-fixtures => tests/fixtures}/buildpacks/libcnb-test-b/buildpack.toml (100%) rename libcnb-test/{test-fixtures => tests/fixtures}/buildpacks/libcnb-test-b/src/main.rs (100%) rename libcnb-test/{test-fixtures => tests/fixtures}/buildpacks/libcnb-test-meta/buildpack.toml (100%) rename libcnb-test/{test-fixtures => tests/fixtures}/buildpacks/libcnb-test-meta/package.toml (100%) rename libcnb-test/{test-fixtures => tests/fixtures}/empty/.gitkeep (100%) rename libcnb-test/{test-fixtures => tests/fixtures}/nested_dirs/file1.txt (100%) rename libcnb-test/{test-fixtures => tests/fixtures}/nested_dirs/subdir1/file2.txt (100%) rename libcnb-test/{test-fixtures => tests/fixtures}/nested_dirs/subdir1/subdir2/subdir3/file3.txt (100%) rename libcnb-test/{test-fixtures => tests/fixtures}/procfile/Procfile (100%) diff --git a/.gitignore b/.gitignore index 8f9e1c79..c496243c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,10 @@ -/target/ -/packaged/ +target/ .DS_Store .idea + +# Since libcnb.rs is a library, we don't commit the lockfile so that CI tests the latest +# in-range dependencies, which is what users will use when installing from scratch. Cargo.lock -**/fixtures/*/target/ -**/fixtures/*/packaged/ -**/test-fixtures/buildpacks/*/target/ + +# The default output directory of `cargo libcnb package`. +packaged/ diff --git a/examples/execd/test-fixtures/empty-app/.gitkeep b/examples/execd/tests/fixtures/empty-app/.gitkeep similarity index 100% rename from examples/execd/test-fixtures/empty-app/.gitkeep rename to examples/execd/tests/fixtures/empty-app/.gitkeep diff --git a/examples/execd/tests/integration_test.rs b/examples/execd/tests/integration_test.rs index f6e94fed..7d0e80ef 100644 --- a/examples/execd/tests/integration_test.rs +++ b/examples/execd/tests/integration_test.rs @@ -13,7 +13,7 @@ use libcnb_test::{assert_contains, assert_empty, BuildConfig, TestRunner}; #[ignore = "integration test"] fn basic() { TestRunner::default().build( - BuildConfig::new("heroku/builder:22", "test-fixtures/empty-app"), + BuildConfig::new("heroku/builder:22", "tests/fixtures/empty-app"), |context| { let command_output = context.run_shell_command("env"); assert_empty!(command_output.stderr); diff --git a/examples/ruby-sample/test-fixtures/simple-ruby-app/Gemfile b/examples/ruby-sample/tests/fixtures/simple-ruby-app/Gemfile similarity index 100% rename from examples/ruby-sample/test-fixtures/simple-ruby-app/Gemfile rename to examples/ruby-sample/tests/fixtures/simple-ruby-app/Gemfile diff --git a/examples/ruby-sample/test-fixtures/simple-ruby-app/Gemfile.lock b/examples/ruby-sample/tests/fixtures/simple-ruby-app/Gemfile.lock similarity index 100% rename from examples/ruby-sample/test-fixtures/simple-ruby-app/Gemfile.lock rename to examples/ruby-sample/tests/fixtures/simple-ruby-app/Gemfile.lock diff --git a/examples/ruby-sample/test-fixtures/simple-ruby-app/app.rb b/examples/ruby-sample/tests/fixtures/simple-ruby-app/app.rb similarity index 100% rename from examples/ruby-sample/test-fixtures/simple-ruby-app/app.rb rename to examples/ruby-sample/tests/fixtures/simple-ruby-app/app.rb diff --git a/examples/ruby-sample/tests/integration_test.rs b/examples/ruby-sample/tests/integration_test.rs index d9146de0..6296c724 100644 --- a/examples/ruby-sample/tests/integration_test.rs +++ b/examples/ruby-sample/tests/integration_test.rs @@ -19,7 +19,7 @@ use std::{fs, io}; #[test] #[ignore = "integration test"] fn basic() { - let config = BuildConfig::new("heroku/buildpacks:20", "test-fixtures/simple-ruby-app"); + let config = BuildConfig::new("heroku/buildpacks:20", "tests/fixtures/simple-ruby-app"); TestRunner::default().build(&config, |context| { assert_contains!(context.pack_stdout, "---> Ruby Buildpack"); @@ -60,7 +60,7 @@ fn basic() { #[ignore = "integration test"] fn missing_gemfile_lock() { TestRunner::default().build( - BuildConfig::new("heroku/buildpacks:20", "test-fixtures/simple-ruby-app") + BuildConfig::new("heroku/buildpacks:20", "tests/fixtures/simple-ruby-app") .app_dir_preprocessor(|path| fs::remove_file(path.join("Gemfile.lock")).unwrap()) .expected_pack_result(PackResult::Failure), |context| { diff --git a/libcnb-cargo/fixtures/multiple_buildpacks/Cargo.toml b/libcnb-cargo/tests/fixtures/multiple_buildpacks/Cargo.toml similarity index 100% rename from libcnb-cargo/fixtures/multiple_buildpacks/Cargo.toml rename to libcnb-cargo/tests/fixtures/multiple_buildpacks/Cargo.toml diff --git a/libcnb-cargo/fixtures/multiple_buildpacks/buildpacks/not_libcnb/bin/build b/libcnb-cargo/tests/fixtures/multiple_buildpacks/buildpacks/not_libcnb/bin/build similarity index 100% rename from libcnb-cargo/fixtures/multiple_buildpacks/buildpacks/not_libcnb/bin/build rename to libcnb-cargo/tests/fixtures/multiple_buildpacks/buildpacks/not_libcnb/bin/build diff --git a/libcnb-cargo/fixtures/multiple_buildpacks/buildpacks/not_libcnb/bin/detect b/libcnb-cargo/tests/fixtures/multiple_buildpacks/buildpacks/not_libcnb/bin/detect similarity index 100% rename from libcnb-cargo/fixtures/multiple_buildpacks/buildpacks/not_libcnb/bin/detect rename to libcnb-cargo/tests/fixtures/multiple_buildpacks/buildpacks/not_libcnb/bin/detect diff --git a/libcnb-cargo/fixtures/multiple_buildpacks/buildpacks/not_libcnb/buildpack.toml b/libcnb-cargo/tests/fixtures/multiple_buildpacks/buildpacks/not_libcnb/buildpack.toml similarity index 100% rename from libcnb-cargo/fixtures/multiple_buildpacks/buildpacks/not_libcnb/buildpack.toml rename to libcnb-cargo/tests/fixtures/multiple_buildpacks/buildpacks/not_libcnb/buildpack.toml diff --git a/libcnb-cargo/fixtures/multiple_buildpacks/buildpacks/one/Cargo.toml b/libcnb-cargo/tests/fixtures/multiple_buildpacks/buildpacks/one/Cargo.toml similarity index 100% rename from libcnb-cargo/fixtures/multiple_buildpacks/buildpacks/one/Cargo.toml rename to libcnb-cargo/tests/fixtures/multiple_buildpacks/buildpacks/one/Cargo.toml diff --git a/libcnb-cargo/fixtures/multiple_buildpacks/buildpacks/one/buildpack.toml b/libcnb-cargo/tests/fixtures/multiple_buildpacks/buildpacks/one/buildpack.toml similarity index 100% rename from libcnb-cargo/fixtures/multiple_buildpacks/buildpacks/one/buildpack.toml rename to libcnb-cargo/tests/fixtures/multiple_buildpacks/buildpacks/one/buildpack.toml diff --git a/libcnb-cargo/fixtures/multiple_buildpacks/buildpacks/one/src/main.rs b/libcnb-cargo/tests/fixtures/multiple_buildpacks/buildpacks/one/src/main.rs similarity index 100% rename from libcnb-cargo/fixtures/multiple_buildpacks/buildpacks/one/src/main.rs rename to libcnb-cargo/tests/fixtures/multiple_buildpacks/buildpacks/one/src/main.rs diff --git a/libcnb-cargo/fixtures/multiple_buildpacks/buildpacks/two/Cargo.toml b/libcnb-cargo/tests/fixtures/multiple_buildpacks/buildpacks/two/Cargo.toml similarity index 100% rename from libcnb-cargo/fixtures/multiple_buildpacks/buildpacks/two/Cargo.toml rename to libcnb-cargo/tests/fixtures/multiple_buildpacks/buildpacks/two/Cargo.toml diff --git a/libcnb-cargo/fixtures/multiple_buildpacks/buildpacks/two/buildpack.toml b/libcnb-cargo/tests/fixtures/multiple_buildpacks/buildpacks/two/buildpack.toml similarity index 100% rename from libcnb-cargo/fixtures/multiple_buildpacks/buildpacks/two/buildpack.toml rename to libcnb-cargo/tests/fixtures/multiple_buildpacks/buildpacks/two/buildpack.toml diff --git a/libcnb-cargo/fixtures/multiple_buildpacks/buildpacks/two/src/main.rs b/libcnb-cargo/tests/fixtures/multiple_buildpacks/buildpacks/two/src/main.rs similarity index 100% rename from libcnb-cargo/fixtures/multiple_buildpacks/buildpacks/two/src/main.rs rename to libcnb-cargo/tests/fixtures/multiple_buildpacks/buildpacks/two/src/main.rs diff --git a/libcnb-cargo/fixtures/multiple_buildpacks/meta-buildpacks/meta-one/buildpack.toml b/libcnb-cargo/tests/fixtures/multiple_buildpacks/meta-buildpacks/meta-one/buildpack.toml similarity index 100% rename from libcnb-cargo/fixtures/multiple_buildpacks/meta-buildpacks/meta-one/buildpack.toml rename to libcnb-cargo/tests/fixtures/multiple_buildpacks/meta-buildpacks/meta-one/buildpack.toml diff --git a/libcnb-cargo/fixtures/multiple_buildpacks/meta-buildpacks/meta-one/package.toml b/libcnb-cargo/tests/fixtures/multiple_buildpacks/meta-buildpacks/meta-one/package.toml similarity index 100% rename from libcnb-cargo/fixtures/multiple_buildpacks/meta-buildpacks/meta-one/package.toml rename to libcnb-cargo/tests/fixtures/multiple_buildpacks/meta-buildpacks/meta-one/package.toml diff --git a/libcnb-cargo/fixtures/no_buildpacks/Cargo.toml b/libcnb-cargo/tests/fixtures/no_buildpacks/Cargo.toml similarity index 100% rename from libcnb-cargo/fixtures/no_buildpacks/Cargo.toml rename to libcnb-cargo/tests/fixtures/no_buildpacks/Cargo.toml diff --git a/libcnb-cargo/fixtures/no_buildpacks/not_a_buildpack/Cargo.toml b/libcnb-cargo/tests/fixtures/no_buildpacks/not_a_buildpack/Cargo.toml similarity index 100% rename from libcnb-cargo/fixtures/no_buildpacks/not_a_buildpack/Cargo.toml rename to libcnb-cargo/tests/fixtures/no_buildpacks/not_a_buildpack/Cargo.toml diff --git a/libcnb-cargo/fixtures/no_buildpacks/not_a_buildpack/src/main.rs b/libcnb-cargo/tests/fixtures/no_buildpacks/not_a_buildpack/src/main.rs similarity index 100% rename from libcnb-cargo/fixtures/no_buildpacks/not_a_buildpack/src/main.rs rename to libcnb-cargo/tests/fixtures/no_buildpacks/not_a_buildpack/src/main.rs diff --git a/libcnb-cargo/fixtures/single_buildpack/Cargo.toml b/libcnb-cargo/tests/fixtures/single_buildpack/Cargo.toml similarity index 100% rename from libcnb-cargo/fixtures/single_buildpack/Cargo.toml rename to libcnb-cargo/tests/fixtures/single_buildpack/Cargo.toml diff --git a/libcnb-cargo/fixtures/single_buildpack/buildpack.toml b/libcnb-cargo/tests/fixtures/single_buildpack/buildpack.toml similarity index 100% rename from libcnb-cargo/fixtures/single_buildpack/buildpack.toml rename to libcnb-cargo/tests/fixtures/single_buildpack/buildpack.toml diff --git a/libcnb-cargo/fixtures/single_buildpack/src/main.rs b/libcnb-cargo/tests/fixtures/single_buildpack/src/main.rs similarity index 100% rename from libcnb-cargo/fixtures/single_buildpack/src/main.rs rename to libcnb-cargo/tests/fixtures/single_buildpack/src/main.rs diff --git a/libcnb-cargo/tests/integration_test.rs b/libcnb-cargo/tests/integration_test.rs index 093b07f4..680933a7 100644 --- a/libcnb-cargo/tests/integration_test.rs +++ b/libcnb-cargo/tests/integration_test.rs @@ -307,7 +307,7 @@ fn validate_packaged_meta_buildpack( fn copy_fixture_to_temp_dir(name: &str) -> Result { let fixture_dir = PathBuf::from(env!("CARGO_MANIFEST_DIR")) - .join("fixtures") + .join("tests/fixtures") .join(name); // Instead of using `tempfile::tempdir` directly, we get the temporary directory ourselves and diff --git a/libcnb-test/README.md b/libcnb-test/README.md index db5bb0bc..69562282 100644 --- a/libcnb-test/README.md +++ b/libcnb-test/README.md @@ -37,7 +37,7 @@ use libcnb_test::{assert_contains, assert_empty, BuildConfig, TestRunner}; // #[test] fn basic() { TestRunner::default().build( - BuildConfig::new("heroku/builder:22", "test-fixtures/app"), + BuildConfig::new("heroku/builder:22", "tests/fixtures/app"), |context| { assert_empty!(context.pack_stderr); assert_contains!(context.pack_stdout, "Expected build output"); @@ -54,7 +54,7 @@ use libcnb_test::{assert_contains, BuildConfig, TestRunner}; // #[test] fn rebuild() { TestRunner::default().build( - BuildConfig::new("heroku/builder:22", "test-fixtures/app"), + BuildConfig::new("heroku/builder:22", "tests/fixtures/app"), |context| { assert_contains!(context.pack_stdout, "Installing dependencies"); @@ -75,7 +75,7 @@ use libcnb_test::{assert_contains, BuildConfig, PackResult, TestRunner}; // #[test] fn expected_pack_failure() { TestRunner::default().build( - BuildConfig::new("heroku/builder:22", "test-fixtures/invalid-app") + BuildConfig::new("heroku/builder:22", "tests/fixtures/invalid-app") .expected_pack_result(PackResult::Failure), |context| { assert_contains!(context.pack_stderr, "ERROR: Invalid Procfile!"); @@ -92,7 +92,7 @@ use libcnb_test::{assert_empty, BuildConfig, TestRunner}; // #[test] fn run_shell_command() { TestRunner::default().build( - BuildConfig::new("heroku/builder:22", "test-fixtures/app"), + BuildConfig::new("heroku/builder:22", "tests/fixtures/app"), |context| { // ... let command_output = context.run_shell_command("python --version"); @@ -115,7 +115,7 @@ const TEST_PORT: u16 = 12345; // #[test] fn starting_web_server_container() { TestRunner::default().build( - BuildConfig::new("heroku/builder:22", "test-fixtures/app"), + BuildConfig::new("heroku/builder:22", "tests/fixtures/app"), |context| { // ... context.start_container( @@ -154,7 +154,7 @@ use libcnb_test::{assert_contains, BuildConfig, ContainerConfig, TestRunner}; // #[test] fn shell_exec() { TestRunner::default().build( - BuildConfig::new("heroku/builder:22", "test-fixtures/app"), + BuildConfig::new("heroku/builder:22", "tests/fixtures/app"), |context| { // ... context.start_container(ContainerConfig::new(), |container| { @@ -176,7 +176,7 @@ use std::fs; // #[test] fn dynamic_fixture() { TestRunner::default().build( - BuildConfig::new("heroku/builder:22", "test-fixtures/app").app_dir_preprocessor( + BuildConfig::new("heroku/builder:22", "tests/fixtures/app").app_dir_preprocessor( |app_dir| { fs::write(app_dir.join("runtime.txt"), "python-3.10").unwrap(); }, @@ -197,7 +197,7 @@ use libcnb_test::{BuildConfig, BuildpackReference, TestRunner}; // #[test] fn additional_buildpacks() { TestRunner::default().build( - BuildConfig::new("heroku/builder:22", "test-fixtures/app").buildpacks([ + BuildConfig::new("heroku/builder:22", "tests/fixtures/app").buildpacks([ BuildpackReference::CurrentCrate, BuildpackReference::WorkspaceBuildpack(buildpack_id!("my-project/buildpack")), BuildpackReference::Other(String::from("heroku/another-buildpack")), diff --git a/libcnb-test/src/build_config.rs b/libcnb-test/src/build_config.rs index 8a98d234..aa404d91 100644 --- a/libcnb-test/src/build_config.rs +++ b/libcnb-test/src/build_config.rs @@ -30,7 +30,7 @@ impl BuildConfig { /// use libcnb_test::{BuildConfig, TestRunner}; /// /// TestRunner::default().build( - /// BuildConfig::new("heroku/builder:22", "test-fixtures/app"), + /// BuildConfig::new("heroku/builder:22", "tests/fixtures/app"), /// |context| { /// // ... /// }, @@ -59,7 +59,7 @@ impl BuildConfig { /// use libcnb_test::{BuildConfig, BuildpackReference, TestRunner}; /// /// TestRunner::default().build( - /// BuildConfig::new("heroku/builder:22", "test-fixtures/app").buildpacks([ + /// BuildConfig::new("heroku/builder:22", "tests/fixtures/app").buildpacks([ /// BuildpackReference::CurrentCrate, /// BuildpackReference::WorkspaceBuildpack(buildpack_id!("my-project/buildpack")), /// BuildpackReference::Other(String::from("heroku/another-buildpack")), @@ -83,7 +83,7 @@ impl BuildConfig { /// use libcnb_test::{BuildConfig, CargoProfile, TestRunner}; /// /// TestRunner::default().build( - /// BuildConfig::new("heroku/builder:22", "test-fixtures/app") + /// BuildConfig::new("heroku/builder:22", "tests/fixtures/app") /// .cargo_profile(CargoProfile::Release), /// |context| { /// // ... @@ -104,7 +104,7 @@ impl BuildConfig { /// use libcnb_test::{BuildConfig, TestRunner}; /// /// TestRunner::default().build( - /// BuildConfig::new("heroku/builder:22", "test-fixtures/app") + /// BuildConfig::new("heroku/builder:22", "tests/fixtures/app") /// .target_triple("x86_64-unknown-linux-musl"), /// |context| { /// // ... @@ -126,7 +126,7 @@ impl BuildConfig { /// use libcnb_test::{BuildConfig, TestRunner}; /// /// TestRunner::default().build( - /// BuildConfig::new("heroku/builder:22", "test-fixtures/app") + /// BuildConfig::new("heroku/builder:22", "tests/fixtures/app") /// .env("ENV_VAR_ONE", "VALUE ONE") /// .env("ENV_VAR_TWO", "SOME OTHER VALUE"), /// |context| { @@ -149,7 +149,7 @@ impl BuildConfig { /// use libcnb_test::{BuildConfig, TestRunner}; /// /// TestRunner::default().build( - /// BuildConfig::new("heroku/builder:22", "test-fixtures/app").envs([ + /// BuildConfig::new("heroku/builder:22", "tests/fixtures/app").envs([ /// ("ENV_VAR_ONE", "VALUE ONE"), /// ("ENV_VAR_TWO", "SOME OTHER VALUE"), /// ]), @@ -182,7 +182,7 @@ impl BuildConfig { /// use libcnb_test::{BuildConfig, TestRunner}; /// /// TestRunner::default().build( - /// BuildConfig::new("heroku/builder:22", "test-fixtures/app").app_dir_preprocessor( + /// BuildConfig::new("heroku/builder:22", "tests/fixtures/app").app_dir_preprocessor( /// |app_dir| { /// std::fs::remove_file(app_dir.join("Procfile")).unwrap(); /// }, @@ -208,11 +208,11 @@ impl BuildConfig { /// use libcnb_test::{BuildConfig, TestRunner}; /// /// fn default_config() -> BuildConfig { - /// BuildConfig::new("heroku/builder:22", "test-fixtures/app") + /// BuildConfig::new("heroku/builder:22", "tests/fixtures/app") /// } /// /// TestRunner::default().build( - /// default_config().app_dir("test-fixtures/a-different-app"), + /// default_config().app_dir("tests/fixtures/a-different-app"), /// |context| { /// // ... /// }, @@ -236,7 +236,7 @@ impl BuildConfig { /// use libcnb_test::{assert_contains, BuildConfig, PackResult, TestRunner}; /// /// TestRunner::default().build( - /// BuildConfig::new("heroku/builder:22", "test-fixtures/app") + /// BuildConfig::new("heroku/builder:22", "tests/fixtures/app") /// .expected_pack_result(PackResult::Failure), /// |context| { /// assert_contains!(context.pack_stderr, "ERROR: Invalid Procfile!"); diff --git a/libcnb-test/src/container_config.rs b/libcnb-test/src/container_config.rs index 6a7b9249..979e1f7c 100644 --- a/libcnb-test/src/container_config.rs +++ b/libcnb-test/src/container_config.rs @@ -11,7 +11,7 @@ use std::collections::{HashMap, HashSet}; /// use libcnb_test::{BuildConfig, ContainerConfig, TestRunner}; /// /// TestRunner::default().build( -/// BuildConfig::new("heroku/builder:22", "test-fixtures/app"), +/// BuildConfig::new("heroku/builder:22", "tests/fixtures/app"), /// |context| { /// // ... /// context.start_container( @@ -45,7 +45,7 @@ impl ContainerConfig { /// use libcnb_test::{BuildConfig, ContainerConfig, TestRunner}; /// /// TestRunner::default().build( - /// BuildConfig::new("heroku/builder:22", "test-fixtures/app"), + /// BuildConfig::new("heroku/builder:22", "tests/fixtures/app"), /// |context| { /// // ... /// context.start_container( @@ -73,7 +73,7 @@ impl ContainerConfig { /// use libcnb_test::{BuildConfig, ContainerConfig, TestRunner}; /// /// TestRunner::default().build( - /// BuildConfig::new("heroku/builder:22", "test-fixtures/app"), + /// BuildConfig::new("heroku/builder:22", "tests/fixtures/app"), /// |context| { /// // ... /// context.start_container(ContainerConfig::new().entrypoint("worker"), |container| { @@ -96,7 +96,7 @@ impl ContainerConfig { /// use libcnb_test::{BuildConfig, ContainerConfig, TestRunner}; /// /// TestRunner::default().build( - /// BuildConfig::new("heroku/builder:22", "test-fixtures/app"), + /// BuildConfig::new("heroku/builder:22", "tests/fixtures/app"), /// |context| { /// // ... /// context.start_container( @@ -123,7 +123,7 @@ impl ContainerConfig { /// use libcnb_test::{BuildConfig, ContainerConfig, TestRunner}; /// /// TestRunner::default().build( - /// BuildConfig::new("heroku/builder:22", "test-fixtures/app"), + /// BuildConfig::new("heroku/builder:22", "tests/fixtures/app"), /// |context| { /// // ... /// context.start_container( @@ -150,7 +150,7 @@ impl ContainerConfig { /// use libcnb_test::{BuildConfig, ContainerConfig, TestRunner}; /// /// TestRunner::default().build( - /// BuildConfig::new("heroku/builder:22", "test-fixtures/app"), + /// BuildConfig::new("heroku/builder:22", "tests/fixtures/app"), /// |context| { /// // ... /// context.start_container( @@ -176,7 +176,7 @@ impl ContainerConfig { /// use libcnb_test::{BuildConfig, ContainerConfig, TestRunner}; /// /// TestRunner::default().build( - /// BuildConfig::new("heroku/builder:22", "test-fixtures/app"), + /// BuildConfig::new("heroku/builder:22", "tests/fixtures/app"), /// |context| { /// // ... /// context.start_container( diff --git a/libcnb-test/src/container_context.rs b/libcnb-test/src/container_context.rs index 5fa2146f..d6d91094 100644 --- a/libcnb-test/src/container_context.rs +++ b/libcnb-test/src/container_context.rs @@ -27,7 +27,7 @@ impl ContainerContext { /// use libcnb_test::{assert_contains, assert_empty, BuildConfig, ContainerConfig, TestRunner}; /// /// TestRunner::default().build( - /// BuildConfig::new("heroku/builder:22", "test-fixtures/app"), + /// BuildConfig::new("heroku/builder:22", "tests/fixtures/app"), /// |context| { /// // ... /// context.start_container(ContainerConfig::new(), |container| { @@ -61,7 +61,7 @@ impl ContainerContext { /// use libcnb_test::{assert_contains, assert_empty, BuildConfig, ContainerConfig, TestRunner}; /// /// TestRunner::default().build( - /// BuildConfig::new("heroku/builder:22", "test-fixtures/app"), + /// BuildConfig::new("heroku/builder:22", "tests/fixtures/app"), /// |context| { /// // ... /// context.start_container(ContainerConfig::new(), |container| { @@ -91,7 +91,7 @@ impl ContainerContext { /// use libcnb_test::{BuildConfig, ContainerConfig, TestRunner}; /// /// TestRunner::default().build( - /// BuildConfig::new("heroku/builder:22", "test-fixtures/app"), + /// BuildConfig::new("heroku/builder:22", "tests/fixtures/app"), /// |context| { /// // ... /// context.start_container( @@ -146,7 +146,7 @@ impl ContainerContext { /// use libcnb_test::{assert_contains, BuildConfig, ContainerConfig, TestRunner}; /// /// TestRunner::default().build( - /// BuildConfig::new("heroku/builder:22", "test-fixtures/app"), + /// BuildConfig::new("heroku/builder:22", "tests/fixtures/app"), /// |context| { /// // ... /// context.start_container(ContainerConfig::new(), |container| { diff --git a/libcnb-test/src/test_context.rs b/libcnb-test/src/test_context.rs index bc08deb6..77bdaf7b 100644 --- a/libcnb-test/src/test_context.rs +++ b/libcnb-test/src/test_context.rs @@ -32,7 +32,7 @@ impl<'a> TestContext<'a> { /// use libcnb_test::{BuildConfig, ContainerConfig, TestRunner}; /// /// TestRunner::default().build( - /// BuildConfig::new("heroku/builder:22", "test-fixtures/app"), + /// BuildConfig::new("heroku/builder:22", "tests/fixtures/app"), /// |context| { /// // Start the container using the default process-type: /// // https://buildpacks.io/docs/app-developer-guide/run-an-app/#default-process-type @@ -126,7 +126,7 @@ impl<'a> TestContext<'a> { /// use libcnb_test::{BuildConfig, ContainerConfig, TestRunner}; /// /// TestRunner::default().build( - /// BuildConfig::new("heroku/builder:22", "test-fixtures/app"), + /// BuildConfig::new("heroku/builder:22", "tests/fixtures/app"), /// |context| { /// // ... /// let command_output = @@ -141,7 +141,7 @@ impl<'a> TestContext<'a> { /// use libcnb_test::{BuildConfig, ContainerConfig, TestRunner}; /// /// TestRunner::default().build( - /// BuildConfig::new("heroku/builder:22", "test-fixtures/app"), + /// BuildConfig::new("heroku/builder:22", "tests/fixtures/app"), /// |context| { /// // ... /// context.start_container( @@ -203,7 +203,7 @@ impl<'a> TestContext<'a> { /// use libcnb_test::{BuildConfig, ContainerConfig, SbomType, TestRunner}; /// /// TestRunner::default().build( - /// BuildConfig::new("heroku/builder:22", "test-fixtures/app"), + /// BuildConfig::new("heroku/builder:22", "tests/fixtures/app"), /// |context| { /// context.download_sbom_files(|sbom_files| { /// assert!(sbom_files @@ -254,7 +254,7 @@ impl<'a> TestContext<'a> { /// use libcnb_test::{assert_contains, BuildConfig, TestRunner}; /// /// TestRunner::default().build( - /// BuildConfig::new("heroku/builder:22", "test-fixtures/app"), + /// BuildConfig::new("heroku/builder:22", "tests/fixtures/app"), /// |context| { /// assert_contains!(context.pack_stdout, "---> Installing dependencies"); /// diff --git a/libcnb-test/src/test_runner.rs b/libcnb-test/src/test_runner.rs index ef5eccfe..eb3a1974 100644 --- a/libcnb-test/src/test_runner.rs +++ b/libcnb-test/src/test_runner.rs @@ -14,7 +14,7 @@ use tempfile::tempdir; /// use libcnb_test::{assert_contains, assert_empty, BuildConfig, TestRunner}; /// /// TestRunner::default().build( -/// BuildConfig::new("heroku/builder:22", "test-fixtures/app"), +/// BuildConfig::new("heroku/builder:22", "tests/fixtures/app"), /// |context| { /// assert_empty!(context.pack_stderr); /// assert_contains!(context.pack_stdout, "Expected build output"); @@ -40,7 +40,7 @@ impl TestRunner { /// use libcnb_test::{assert_contains, assert_empty, BuildConfig, TestRunner}; /// /// TestRunner::default().build( - /// BuildConfig::new("heroku/builder:22", "test-fixtures/app"), + /// BuildConfig::new("heroku/builder:22", "tests/fixtures/app"), /// |context| { /// assert_empty!(context.pack_stderr); /// assert_contains!(context.pack_stdout, "Expected build output"); diff --git a/libcnb-test/test-fixtures/buildpacks/libcnb-test-a/Cargo.toml b/libcnb-test/tests/fixtures/buildpacks/libcnb-test-a/Cargo.toml similarity index 100% rename from libcnb-test/test-fixtures/buildpacks/libcnb-test-a/Cargo.toml rename to libcnb-test/tests/fixtures/buildpacks/libcnb-test-a/Cargo.toml diff --git a/libcnb-test/test-fixtures/buildpacks/libcnb-test-a/buildpack.toml b/libcnb-test/tests/fixtures/buildpacks/libcnb-test-a/buildpack.toml similarity index 100% rename from libcnb-test/test-fixtures/buildpacks/libcnb-test-a/buildpack.toml rename to libcnb-test/tests/fixtures/buildpacks/libcnb-test-a/buildpack.toml diff --git a/libcnb-test/test-fixtures/buildpacks/libcnb-test-a/src/main.rs b/libcnb-test/tests/fixtures/buildpacks/libcnb-test-a/src/main.rs similarity index 100% rename from libcnb-test/test-fixtures/buildpacks/libcnb-test-a/src/main.rs rename to libcnb-test/tests/fixtures/buildpacks/libcnb-test-a/src/main.rs diff --git a/libcnb-test/test-fixtures/buildpacks/libcnb-test-b/Cargo.toml b/libcnb-test/tests/fixtures/buildpacks/libcnb-test-b/Cargo.toml similarity index 100% rename from libcnb-test/test-fixtures/buildpacks/libcnb-test-b/Cargo.toml rename to libcnb-test/tests/fixtures/buildpacks/libcnb-test-b/Cargo.toml diff --git a/libcnb-test/test-fixtures/buildpacks/libcnb-test-b/buildpack.toml b/libcnb-test/tests/fixtures/buildpacks/libcnb-test-b/buildpack.toml similarity index 100% rename from libcnb-test/test-fixtures/buildpacks/libcnb-test-b/buildpack.toml rename to libcnb-test/tests/fixtures/buildpacks/libcnb-test-b/buildpack.toml diff --git a/libcnb-test/test-fixtures/buildpacks/libcnb-test-b/src/main.rs b/libcnb-test/tests/fixtures/buildpacks/libcnb-test-b/src/main.rs similarity index 100% rename from libcnb-test/test-fixtures/buildpacks/libcnb-test-b/src/main.rs rename to libcnb-test/tests/fixtures/buildpacks/libcnb-test-b/src/main.rs diff --git a/libcnb-test/test-fixtures/buildpacks/libcnb-test-meta/buildpack.toml b/libcnb-test/tests/fixtures/buildpacks/libcnb-test-meta/buildpack.toml similarity index 100% rename from libcnb-test/test-fixtures/buildpacks/libcnb-test-meta/buildpack.toml rename to libcnb-test/tests/fixtures/buildpacks/libcnb-test-meta/buildpack.toml diff --git a/libcnb-test/test-fixtures/buildpacks/libcnb-test-meta/package.toml b/libcnb-test/tests/fixtures/buildpacks/libcnb-test-meta/package.toml similarity index 100% rename from libcnb-test/test-fixtures/buildpacks/libcnb-test-meta/package.toml rename to libcnb-test/tests/fixtures/buildpacks/libcnb-test-meta/package.toml diff --git a/libcnb-test/test-fixtures/empty/.gitkeep b/libcnb-test/tests/fixtures/empty/.gitkeep similarity index 100% rename from libcnb-test/test-fixtures/empty/.gitkeep rename to libcnb-test/tests/fixtures/empty/.gitkeep diff --git a/libcnb-test/test-fixtures/nested_dirs/file1.txt b/libcnb-test/tests/fixtures/nested_dirs/file1.txt similarity index 100% rename from libcnb-test/test-fixtures/nested_dirs/file1.txt rename to libcnb-test/tests/fixtures/nested_dirs/file1.txt diff --git a/libcnb-test/test-fixtures/nested_dirs/subdir1/file2.txt b/libcnb-test/tests/fixtures/nested_dirs/subdir1/file2.txt similarity index 100% rename from libcnb-test/test-fixtures/nested_dirs/subdir1/file2.txt rename to libcnb-test/tests/fixtures/nested_dirs/subdir1/file2.txt diff --git a/libcnb-test/test-fixtures/nested_dirs/subdir1/subdir2/subdir3/file3.txt b/libcnb-test/tests/fixtures/nested_dirs/subdir1/subdir2/subdir3/file3.txt similarity index 100% rename from libcnb-test/test-fixtures/nested_dirs/subdir1/subdir2/subdir3/file3.txt rename to libcnb-test/tests/fixtures/nested_dirs/subdir1/subdir2/subdir3/file3.txt diff --git a/libcnb-test/test-fixtures/procfile/Procfile b/libcnb-test/tests/fixtures/procfile/Procfile similarity index 100% rename from libcnb-test/test-fixtures/procfile/Procfile rename to libcnb-test/tests/fixtures/procfile/Procfile diff --git a/libcnb-test/tests/integration_test.rs b/libcnb-test/tests/integration_test.rs index 6b6ad434..043ac1d6 100644 --- a/libcnb-test/tests/integration_test.rs +++ b/libcnb-test/tests/integration_test.rs @@ -28,7 +28,7 @@ const TEST_PORT: u16 = 12345; #[ignore = "integration test"] fn basic_build() { TestRunner::default().build( - BuildConfig::new("heroku/builder:22", "test-fixtures/procfile") + BuildConfig::new("heroku/builder:22", "tests/fixtures/procfile") .buildpacks([BuildpackReference::Other(String::from(PROCFILE_URL))]), |context| { assert_empty!(context.pack_stderr); @@ -47,7 +47,7 @@ fn basic_build() { #[ignore = "integration test"] fn rebuild() { TestRunner::default().build( - BuildConfig::new("heroku/builder:22", "test-fixtures/procfile") + BuildConfig::new("heroku/builder:22", "tests/fixtures/procfile") .buildpacks([BuildpackReference::Other(String::from(PROCFILE_URL))]), |context| { assert_empty!(context.pack_stderr); @@ -66,7 +66,7 @@ fn rebuild() { #[ignore = "integration test"] fn buildpack_packaging_failure() { let err = std::panic::catch_unwind(|| { - TestRunner::default().build(BuildConfig::new("invalid!", "test-fixtures/empty"), |_| { + TestRunner::default().build(BuildConfig::new("invalid!", "tests/fixtures/empty"), |_| { unreachable!("The test should panic prior to the TestContext being invoked."); }); }) @@ -92,7 +92,7 @@ pack command failed with exit code 1! ERROR: failed to build: invalid builder 'invalid!'")] fn unexpected_pack_failure() { TestRunner::default().build( - BuildConfig::new("invalid!", "test-fixtures/empty").buildpacks(Vec::new()), + BuildConfig::new("invalid!", "tests/fixtures/empty").buildpacks(Vec::new()), |_| { unreachable!("The test should panic prior to the TestContext being invoked."); }, @@ -112,7 +112,7 @@ fn unexpected_pack_failure() { ")] fn unexpected_pack_success() { TestRunner::default().build( - BuildConfig::new("heroku/builder:22", "test-fixtures/procfile") + BuildConfig::new("heroku/builder:22", "tests/fixtures/procfile") .buildpacks([BuildpackReference::Other(String::from(PROCFILE_URL))]) .expected_pack_result(PackResult::Failure), |_| { @@ -125,7 +125,7 @@ fn unexpected_pack_success() { #[ignore = "integration test"] fn expected_pack_failure() { TestRunner::default().build( - BuildConfig::new("invalid!", "test-fixtures/empty") + BuildConfig::new("invalid!", "tests/fixtures/empty") .buildpacks(Vec::new()) .expected_pack_result(PackResult::Failure), |context| { @@ -143,7 +143,7 @@ fn expected_pack_failure() { fn expected_pack_failure_still_panics_for_non_pack_failure() { let err = std::panic::catch_unwind(|| { TestRunner::default().build( - BuildConfig::new("invalid!", "test-fixtures/empty") + BuildConfig::new("invalid!", "tests/fixtures/empty") .expected_pack_result(PackResult::Failure), |_| { unreachable!("The test should panic prior to the TestContext being invoked."); @@ -165,7 +165,7 @@ fn expected_pack_failure_still_panics_for_non_pack_failure() { #[ignore = "integration test"] fn app_dir_preprocessor() { TestRunner::default().build( - BuildConfig::new("heroku/builder:22", "test-fixtures/nested_dirs") + BuildConfig::new("heroku/builder:22", "tests/fixtures/nested_dirs") .buildpacks([BuildpackReference::Other(String::from(PROCFILE_URL))]) .app_dir_preprocessor(|app_dir| { assert!(app_dir.join("file1.txt").exists()); @@ -202,7 +202,7 @@ fn app_dir_preprocessor() { let fixture_dir = env::var("CARGO_MANIFEST_DIR") .map(PathBuf::from) .unwrap() - .join("test-fixtures/nested_dirs"); + .join("tests/fixtures/nested_dirs"); assert!(fixture_dir.join("file1.txt").exists()); assert!(!fixture_dir.join("Procfile").exists()); } @@ -213,7 +213,7 @@ fn app_dir_absolute_path() { let absolute_app_dir = env::var("CARGO_MANIFEST_DIR") .map(PathBuf::from) .unwrap() - .join("test-fixtures/procfile") + .join("tests/fixtures/procfile") .canonicalize() .unwrap(); @@ -227,7 +227,7 @@ fn app_dir_absolute_path() { #[test] #[ignore = "integration test"] // The full panic message looks like this: -// `"App dir is not a valid directory: /.../libcnb-test/test-fixtures/non-existent-fixture"` +// `"App dir is not a valid directory: /.../libcnb-test/tests/fixtures/non-existent-fixture"` // It's intentionally an absolute path to make debugging failures easier when a relative path has been // passed (the common case). However, since the absolute path is system/environment dependent, we would // need to either construct the expected string dynamically in `should_panic` (but cannot due to @@ -235,10 +235,10 @@ fn app_dir_absolute_path() { // As such we test the most important part, the fact that the error message lists the non-existent // fixture directory path. We intentionally include the `libcnb-test/` crate directory prefix, since // that only appears in the absolute path, not the relative path passed to `BuildConfig::new`. -#[should_panic(expected = "libcnb-test/test-fixtures/non-existent-fixture")] +#[should_panic(expected = "libcnb-test/tests/fixtures/non-existent-fixture")] fn app_dir_invalid_path() { TestRunner::default().build( - BuildConfig::new("heroku/builder:22", "test-fixtures/non-existent-fixture") + BuildConfig::new("heroku/builder:22", "tests/fixtures/non-existent-fixture") .buildpacks(Vec::new()), |_| {}, ); @@ -247,12 +247,12 @@ fn app_dir_invalid_path() { #[test] #[ignore = "integration test"] // The full panic message looks like this: -// `"App dir is not a valid directory: /.../libcnb-test/test-fixtures/non-existent-fixture"` +// `"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/test-fixtures/non-existent-fixture")] +#[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", "test-fixtures/non-existent-fixture") + BuildConfig::new("heroku/builder:22", "tests/fixtures/non-existent-fixture") .buildpacks(Vec::new()) .app_dir_preprocessor(|_| { unreachable!("The app dir should be validated before the preprocessor is run."); @@ -272,7 +272,7 @@ pack command failed with exit code 1! ERROR: image 'libcnbtest_")] fn download_sbom_files_failure() { TestRunner::default().build( - BuildConfig::new("heroku/builder:22", "test-fixtures/empty") + BuildConfig::new("heroku/builder:22", "tests/fixtures/empty") .buildpacks(Vec::new()) .expected_pack_result(PackResult::Failure), |context| { @@ -285,7 +285,7 @@ fn download_sbom_files_failure() { #[ignore = "integration test"] fn starting_containers() { TestRunner::default().build( - BuildConfig::new("heroku/builder:22", "test-fixtures/procfile") + BuildConfig::new("heroku/builder:22", "tests/fixtures/procfile") .buildpacks([BuildpackReference::Other(String::from(PROCFILE_URL))]), |context| { // Using the default entrypoint and command. @@ -364,7 +364,7 @@ docker command failed with exit code 127! docker: Error response from daemon:")] fn start_container_spawn_failure() { TestRunner::default().build( - BuildConfig::new("heroku/builder:22", "test-fixtures/procfile") + BuildConfig::new("heroku/builder:22", "tests/fixtures/procfile") .buildpacks([BuildpackReference::Other(String::from(PROCFILE_URL))]), |context| { context.start_container( @@ -388,7 +388,7 @@ docker command failed with exit code 1! Error response from daemon:")] fn shell_exec_when_container_has_crashed() { TestRunner::default().build( - BuildConfig::new("heroku/builder:22", "test-fixtures/procfile") + BuildConfig::new("heroku/builder:22", "tests/fixtures/procfile") .buildpacks([BuildpackReference::Other(String::from(PROCFILE_URL))]), |context| { context.start_container( @@ -420,7 +420,7 @@ some stdout ")] fn shell_exec_nonzero_exit_status() { TestRunner::default().build( - BuildConfig::new("heroku/builder:22", "test-fixtures/procfile") + BuildConfig::new("heroku/builder:22", "tests/fixtures/procfile") .buildpacks([BuildpackReference::Other(String::from(PROCFILE_URL))]), |context| { context.start_container(ContainerConfig::new(), |container| { @@ -447,7 +447,7 @@ some stdout ")] fn run_shell_command_nonzero_exit_status() { TestRunner::default().build( - BuildConfig::new("heroku/builder:22", "test-fixtures/procfile") + BuildConfig::new("heroku/builder:22", "tests/fixtures/procfile") .buildpacks([BuildpackReference::Other(String::from(PROCFILE_URL))]), |context| { context.run_shell_command("echo 'some stdout'; echo 'some stderr' >&2; exit 1"); @@ -459,7 +459,7 @@ fn run_shell_command_nonzero_exit_status() { #[ignore = "integration test"] fn logs_work_after_container_crashed() { TestRunner::default().build( - BuildConfig::new("heroku/builder:22", "test-fixtures/procfile") + BuildConfig::new("heroku/builder:22", "tests/fixtures/procfile") .buildpacks([BuildpackReference::Other(String::from(PROCFILE_URL))]), |context| { context.start_container( @@ -482,7 +482,7 @@ fn logs_work_after_container_crashed() { #[should_panic(expected = "Port `0' not valid")] fn expose_port_invalid_port() { TestRunner::default().build( - BuildConfig::new("heroku/builder:22", "test-fixtures/procfile") + BuildConfig::new("heroku/builder:22", "tests/fixtures/procfile") .buildpacks([BuildpackReference::Other(String::from(PROCFILE_URL))]), |context| { context.start_container(ContainerConfig::new().expose_port(0), |_| { @@ -499,7 +499,7 @@ fn expose_port_invalid_port() { )] fn address_for_port_when_port_not_exposed() { TestRunner::default().build( - BuildConfig::new("heroku/builder:22", "test-fixtures/procfile") + BuildConfig::new("heroku/builder:22", "tests/fixtures/procfile") .buildpacks([BuildpackReference::Other(String::from(PROCFILE_URL))]), |context| { context.start_container(ContainerConfig::new(), |container| { @@ -524,7 +524,7 @@ some stdout ")] fn address_for_port_when_container_crashed() { TestRunner::default().build( - BuildConfig::new("heroku/builder:22", "test-fixtures/procfile") + BuildConfig::new("heroku/builder:22", "tests/fixtures/procfile") .buildpacks([BuildpackReference::Other(String::from(PROCFILE_URL))]), |context| { context.start_container( @@ -546,7 +546,7 @@ fn address_for_port_when_container_crashed() { #[ignore = "integration test"] fn basic_build_with_libcnb_reference_to_single_buildpack() { TestRunner::default().build( - BuildConfig::new("heroku/builder:22", "test-fixtures/empty").buildpacks([ + BuildConfig::new("heroku/builder:22", "tests/fixtures/empty").buildpacks([ BuildpackReference::WorkspaceBuildpack(buildpack_id!("libcnb-test/a")), ]), |context| { @@ -565,7 +565,7 @@ fn basic_build_with_libcnb_reference_to_single_buildpack() { #[ignore = "integration test"] fn basic_build_with_libcnb_reference_to_meta_buildpack() { TestRunner::default().build( - BuildConfig::new("heroku/builder:22", "test-fixtures/empty").buildpacks([ + BuildConfig::new("heroku/builder:22", "tests/fixtures/empty").buildpacks([ BuildpackReference::WorkspaceBuildpack(buildpack_id!("libcnb-test/meta")), ]), |context| {