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

Missing references test #6849

Merged
merged 1 commit into from
Apr 22, 2021
Merged

Conversation

mildas
Copy link
Contributor

@mildas mildas commented Apr 15, 2021

Description:

Add test for checking missing references in profiles.

Usage:
$ tests/missing_refs.sh python3 build/ssg-rhel8-xccdf.xml ospp stig hipaa

$1 - python executable (for cmake, ${PYTHON_EXECUTABLE})
$2 - product xccdf
$3+ - list of profiles

Rationale:

Test that will be added to gating.

@mildas
Copy link
Contributor Author

mildas commented Apr 16, 2021

I will split this PR into two PRs - this one will add only the test and the new PR will add it to SSGCommon.cmake

@jan-cerny
Copy link
Collaborator

Have you considered making this an CMake macro instead of a bash script to avoid having multiple abstraction levels?

tests/missing_refs.sh Outdated Show resolved Hide resolved
@mildas
Copy link
Contributor Author

mildas commented Apr 19, 2021

@jan-cerny No. Actually, I didn't think about CMake macro approach at all because it didn't occur to me.
With the macro, we could avoid multiple abstraction levels, but do you think it will be readable? I mean, if implementing this in CMake macro won't be unnecessarily complicated when it can be easily done in Bash script + other tests are in a form of standalone script and this one will be as a macro.

@jan-cerny
Copy link
Collaborator

I think it would be readable

other tests are in a form of standalone script and this one will be as a macro.

That's a good argument against it.

@mildas
Copy link
Contributor Author

mildas commented Apr 20, 2021

@jan-cerny What do you think? Should I implement it as CMake macro or are you fine with current approach?

@jan-cerny jan-cerny self-assigned this Apr 21, 2021
@jan-cerny
Copy link
Collaborator

@mildas I'm fine with either way.

@openshift-ci
Copy link

openshift-ci bot commented Apr 22, 2021

@mildas: The following test failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
ci/prow/e2e-aws-rhcos4-e8 9351f85 link /test e2e-aws-rhcos4-e8

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@mildas
Copy link
Contributor Author

mildas commented Apr 22, 2021

@jan-cerny PR is updated. Bash script will be better because the script will be also used in daily Jenkins job to check all profiles.

@jan-cerny jan-cerny added this to the 0.1.56 milestone Apr 22, 2021
@jan-cerny jan-cerny merged commit 52f870a into ComplianceAsCode:master Apr 22, 2021
This pull request was closed.
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.

3 participants