Introduce a plain foreman flavor#511
Conversation
This sets up a directory structure where an entire directory gets a feature mark. This makes it easy to skip entire feature tests.
This guards it behind the feature flag, allowing the tests to be skipped if the feature is disabled. For example, on a standalone foreman-proxy.
This moves Candlepin and Pulp behind the feature flags. Candlepin is only deployed on Foreman with Katello servers while Pulp is deployed on Katello enabled servers.
48a7446 to
6aad15c
Compare
|
|
||
|
|
||
| def test_postgresql_users(database): | ||
| def test_postgresql_users(features, database): |
There was a problem hiding this comment.
Here why are we using features instead of enabled_features? features will bring all the features(available + enabled)
There was a problem hiding this comment.
Good catch. Left over from an older version where features was what is now enabled_features.
|
Our CI is currently not designed to run flavor specific tests https://github.com/theforeman/foremanctl/blob/master/.github/workflows/test.yml#L54, it adds all features but surely that won't make sense, as we want to only add relevent features for a flavor(ex: add bmc to plain foreman does not make any sense), Thinking out loud:- |
If you're talking about a GitHub Actions workflow: I think that does make sense. We probably can't test all combinations, but finding a good set is exactly what I think we should do. |
yes,and i think without flavor specific workflows we might end up with a single tests workflow which adds all available features(as of today) and will keep CI red |
Why are you introducing these changes? (Problem description, related links)
Today Foreman can be deployed without Katello on both RPM and Debian installations and this allows users to mirror that.
What are the changes introduced in this pull request?
The flavor itself is rather trivial, but there are some changes made to only deploy certain roles depending on the features enabled. That is likely incomplete. In particular, Apache is not yet modified to only deploy the required services. In the future when a plain foreman-proxy role is introduced then that will need adjustment.
There are also heavy testing changes, heavily based on #509 which in turn is based on #508. I'm wondering how much of those commits already belong there.
Right now the test suite fails because the
foremanfeature is only set in the flavor and not in the parameters.It's also important to look at how this will play into #431.
How to test this pull request
Steps to reproduce:
foremanctl deploy --flavor foremanChecklist