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

Refs #37102 - Read real webpack manifest in test #10045

Merged
merged 1 commit into from
Feb 14, 2024

Conversation

ekohl
Copy link
Member

@ekohl ekohl commented Feb 12, 2024

The system tests rely on this actually working.

This is to investigate the failures seen in theforeman/foreman_ansible#693 and theforeman/foreman_ansible#693. They also happen with current Foreman develop.

@ekohl
Copy link
Member Author

ekohl commented Feb 12, 2024

It makes theforeman/foreman_discovery#622 pass where it previously failed.

@MariaAga could you have a look?

Edit: I know this breaks the functional tests. But perhaps we should deal with that in a different way? Like mocking/stubbing.

@MariaAga
Copy link
Member

Edit: I know this breaks the functional tests. But perhaps we should deal with that in a different way? Like mocking/stubbing.

I couldnt get it to work with any mock/stub I tried

@ekohl
Copy link
Member Author

ekohl commented Feb 13, 2024

I think I'll update the stubbed implementation to read if it exists and otherwise use the current implementation. Writing out a file to disk in tests is also ugly and likely to cause problems.

In some test cases (like controller tests) the real manifest isn't
needed, but in integration tests they are.

Rails has deprecated controller tests in favor of integration tests, but
Foreman still has them. This modifies the fake read_webpack_manifest to
read the manifest if available, otherwise pretend it's there.
@ekohl ekohl force-pushed the remove-webpack-manifest-hack branch from 2ac9cbf to d48eb54 Compare February 13, 2024 15:30
@ekohl ekohl changed the title Drop read_webpack_manifest hack in test Refs #37102 - Read real webpack manifest in test Feb 13, 2024
@ekohl ekohl marked this pull request as ready for review February 13, 2024 19:53
@ekohl
Copy link
Member Author

ekohl commented Feb 13, 2024

Verified that theforeman/foreman_discovery#622 passes with this.

@MariaAga MariaAga merged commit d62da16 into theforeman:develop Feb 14, 2024
23 of 25 checks passed
@ekohl ekohl deleted the remove-webpack-manifest-hack branch February 14, 2024 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants