foreman icon indicating copy to clipboard operation
foreman copied to clipboard

Fixes #35817 - Avoid using fixtures for test settings

Open ekohl opened this issue 2 years ago • 6 comments

When running rake snapshots:generate it doesn't load the fixtures. This normally happens in the test setup code, but snapshot generation doesn't use this. This patch uses the settings DSL to set a different default depending on the environment. An additional benefit is that the code is more localized.

ekohl avatar Dec 02 '22 14:12 ekohl

Issues: #35817

theforeman-bot avatar Dec 02 '22 14:12 theforeman-bot

Both of the failures are about the setting table being empty IMHO. One of them easily fixable by just creating the setting tho I'm not sure how to fix the uniqueness test.

ezr-ondrej avatar Dec 03 '22 14:12 ezr-ondrej

This mixes test code with production code, which I'm generally against, but the benefits you're describing are outweighing the cons here so :+1:

ezr-ondrej avatar Dec 03 '22 14:12 ezr-ondrej

Thank you for your contribution, @ekohl! This PR has been inactive for 3 months, closing for now. Feel free to reopen when you return to it. This is an automated process.

theforeman-bot avatar Mar 14 '23 01:03 theforeman-bot

Reopening the PR, I'm still having the problem on the develop branch. @ekohl can you please rebase the PR?

stejskalleos avatar Feb 26 '24 07:02 stejskalleos

I think I've got work blocked waiting for this PR

jcpunk avatar Mar 26 '24 18:03 jcpunk

Thank you for your contribution! This PR has been inactive for 3 months, closing for now. Feel free to reopen when you return to it. This is an automated process.

github-actions[bot] avatar Jul 02 '24 01:07 github-actions[bot]