content
content copied to clipboard
Ensure default value in variables
Description:
During some tests it was found two variables without a default value. Ensure a default value based on existing options.
Rationale:
All variables have a default value.
Start a new ephemeral environment with changes proposed in this pull request:
:robot: A k8s content image for this PR is available at:
ghcr.io/complianceascode/k8scontent:12020
This image was built from commit: 15faa0bac811ad0c526337670884ca1ce6afe888
Click here to see how to deploy it
If you alread have Compliance Operator deployed:
utils/build_ds_container.py -i ghcr.io/complianceascode/k8scontent:12020
Otherwise deploy the content and operator together by checking out ComplianceAsCode/compliance-operator and:
CONTENT_IMAGE=ghcr.io/complianceascode/k8scontent:12020 make deploy-local
Code Climate has analyzed commit 15faa0ba and detected 0 issues on this pull request.
The test coverage on the diff in this pull request is 100.0% (50% is the threshold).
This pull request will bring the total coverage in the repository to 59.4% (0.0% change).
View more on Code Climate.
@marcusburghardt Can we have some test or build-time check that would prevent this situation? For example I think that when the build system loads a variable from YAML file it could check that it contains the "default" key.
@marcusburghardt Can we have some test or build-time check that would prevent this situation? For example I think that when the build system loads a variable from YAML file it could check that it contains the "default" key.
Hi @marcusburghardt , I plan to introduce a test for this after the https://github.com/ComplianceAsCode/content/pull/12019. It is already in my list here but I would prefer to introduce it later in a different PR, ok?