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

Add more integration tests to libcnb-test #717

Merged
merged 1 commit into from
Nov 2, 2023

Conversation

edmorley
Copy link
Member

@edmorley edmorley commented Nov 2, 2023

Improves the integration test coverage in preparation for fixing #704, so as to (a) reduce the size of that PR, (b) make it easier to see the before/after of the error output.

The one testing scenario not added by this PR is the testing of the "cross-compile tools are missing" case, since it's going to be more complex to test (as the tools have to be installed for all of the other tests to pass) - so I'm saving it for another PR so we can discuss the possible approaches separately.

GUS-W-14416222.

Improves the integration test coverage in preparation for fixing #666,
so as to (a) reduce the size of that PR, (b) make it easier to see the
before/after of the error output.
@edmorley edmorley self-assigned this Nov 2, 2023
@edmorley edmorley marked this pull request as ready for review November 2, 2023 17:41
@edmorley edmorley requested a review from a team as a code owner November 2, 2023 17:41
Copy link
Contributor

@colincasey colincasey left a comment

Choose a reason for hiding this comment

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

👍 lots of good tests added here

@edmorley edmorley merged commit a6e6db2 into main Nov 2, 2023
6 checks passed
@edmorley edmorley deleted the edmorley/libcnb-test-more-tests branch November 2, 2023 19:51
edmorley added a commit that referenced this pull request Nov 7, 2023
After #666, incorrect error messages were shown for failures that
occurred during buildpack compilation packaging, since the
handling in `TestRunner::build_internal` used the wrong message
text, plus didn't include the error struct in the `panic!` string.

These have been fixed, plus display representations added to
all of the new error variants.

In addition, the usages of `assert!` and `.unwrap()` in functions that
return `Result` have been replaced with new error enum variants.

The change in output can be seen in the new tests added by #717.

There is one last scenario that doesn't yet have a test - the testing
of the cross-compilation output itself. However, I'll add that separately,
since it's going to be more complex to test / there are a few different
options that we'll need to choose between.

Fixes #704.
Fixes #709.
Fixes #710.
GUS-W-14395170.
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.

None yet

2 participants