Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor libcnb-cargo integration tests #637

Merged
merged 2 commits into from
Aug 17, 2023

Conversation

Malax
Copy link
Member

@Malax Malax commented Aug 17, 2023

The current tests are quite rigid, hard to work with and tricky to extend. I noticed this when the tests became the major blocker to get #583 off the ground. This PR refactors the tests to fix the issues mentioned.

Some extra improvements have landed as well:

  • Removed fs_extra
  • Pedantic lints are now enabled (and passing)

Ref: GUS-W-13966683

@Malax Malax force-pushed the malax/refactor-libcnb-cargo-tests branch from abe0a16 to 44c20f2 Compare August 17, 2023 14:42
@Malax Malax force-pushed the malax/refactor-libcnb-cargo-tests branch from 44c20f2 to 4934fe4 Compare August 17, 2023 14:54
@Malax Malax force-pushed the malax/refactor-libcnb-cargo-tests branch from 4934fe4 to dabd95a Compare August 17, 2023 14:59
@Malax Malax marked this pull request as ready for review August 17, 2023 15:01
@Malax Malax requested a review from a team as a code owner August 17, 2023 15:01
Copy link
Member

@edmorley edmorley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

libcnb-cargo/tests/test.rs Show resolved Hide resolved
libcnb-cargo/tests/test.rs Show resolved Hide resolved
libcnb-cargo/tests/test.rs Outdated Show resolved Hide resolved
@Malax
Copy link
Member Author

Malax commented Aug 17, 2023

@edmorley, re: #637 (comment) (dunno why I cannot reply inline :()

Yeah, the constant will change in the next PR - not the value is temporary. Sorry for the confusion. The new name is
DEFAULT_PACKAGE_DIR_NAME since "package dir" is the new name for the directory packaged buildpack will be written to (CLI arguments, code comments and variables all use this new name, see #583)

I'll skip renaming here.

@Malax Malax merged commit e3a3da8 into main Aug 17, 2023
4 checks passed
@Malax Malax deleted the malax/refactor-libcnb-cargo-tests branch August 17, 2023 16:27
colincasey added a commit that referenced this pull request Aug 18, 2023
* main:
  Bump buildpacks/github-actions from 5.3.1 to 5.4.0 (#647)
  Prepare release v0.14.0 (#646)
  Pin intra-libcnb* crate dependencies to exact versions (#644)
  Rename libcnb-cargo integration test file (#645)
  Add version links in the changelog (#643)
  Update Quick Start Guide (#640)
  Run `cargo upgrade` as part of preparing libcnb releases (#641)
  Move packaged buildpack directory out of `target/` (#583)
  Refactor libcnb-cargo integration tests (#637)
  libcnb-test: Improve error messages for `address_for_port` (#636)
  libcnb-test: Implement `fmt::Display` for `LogOutput` (#635)

# Conflicts:
#	CHANGELOG.md
#	libcnb-cargo/src/package/command.rs
colincasey added a commit that referenced this pull request Aug 18, 2023
…cator

* main:
  Bump buildpacks/github-actions from 5.3.1 to 5.4.0 (#647)
  Prepare release v0.14.0 (#646)
  Pin intra-libcnb* crate dependencies to exact versions (#644)
  Rename libcnb-cargo integration test file (#645)
  Add version links in the changelog (#643)
  Update Quick Start Guide (#640)
  Run `cargo upgrade` as part of preparing libcnb releases (#641)
  Move packaged buildpack directory out of `target/` (#583)
  Refactor libcnb-cargo integration tests (#637)
  libcnb-test: Improve error messages for `address_for_port` (#636)
  libcnb-test: Implement `fmt::Display` for `LogOutput` (#635)

# Conflicts:
#	CHANGELOG.md
#	libcnb-cargo/src/package/command.rs
#	libcnb-cargo/src/package/error.rs
#	libcnb-cargo/tests/test.rs
#	libcnb-package/src/lib.rs
colincasey added a commit that referenced this pull request Aug 18, 2023
… libcnb-package/assembling_buildpack_directories

* libcnb-package/buildpack_output_directory_locator:
  Bump buildpacks/github-actions from 5.3.1 to 5.4.0 (#647)
  Prepare release v0.14.0 (#646)
  Pin intra-libcnb* crate dependencies to exact versions (#644)
  Rename libcnb-cargo integration test file (#645)
  Add version links in the changelog (#643)
  Update Quick Start Guide (#640)
  Run `cargo upgrade` as part of preparing libcnb releases (#641)
  Move packaged buildpack directory out of `target/` (#583)
  Refactor libcnb-cargo integration tests (#637)
  libcnb-test: Improve error messages for `address_for_port` (#636)
  libcnb-test: Implement `fmt::Display` for `LogOutput` (#635)

# Conflicts:
#	CHANGELOG.md
#	libcnb-cargo/src/package/command.rs
#	libcnb-package/src/output.rs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants