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

Re-enable CheckoutFromArchive test. #3554

Closed
wants to merge 1 commit into from

Conversation

mitchell-as
Copy link
Contributor

@mitchell-as mitchell-as commented Oct 23, 2024

BugDX-3057 TestCheckoutFromArchive uses bad mock

See comment here about how the test archives were originally constructed: https://activestatef.atlassian.net/browse/DX-3057?focusedCommentId=56035. They were not being mocked. It's real-world data.

Comment on lines +49 to +54
internalIngredients := []*Ingredient{}
if os.Getenv(constants.InstallInternalDependenciesEnvVarName) != "true" {
internalIngredients = sliceutils.Filter(a.Ingredients, func(i *Ingredient) bool {
return i.Namespace == NamespaceInternal
})
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The checkout archive installs a shared/zlib package, which would be excluded by default. In order to keep things small and simple, add an env var override to avoid excluding internal packages.

@mitchell-as mitchell-as requested a review from Naatan October 23, 2024 18:30
@mitchell-as mitchell-as marked this pull request as ready for review October 23, 2024 18:30
Copy link
Member

@Naatan Naatan left a comment

Choose a reason for hiding this comment

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

This doesn't feel appropriate to me. It seems the issue here is that this test was asserting something as installed which as it turns out shouldn't have been installed, that in itself was a bug that it seems we indirectly addressed at one point.

The solution here is to update the test code, we shouldn't need to introduce special logic in the buildplan for this. Can't we update the project we generate data from to use a real dependency that we can then assert?

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