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

Add unit tests for warnings and sub elements #9637

Merged
merged 1 commit into from
Oct 21, 2022

Conversation

jan-cerny
Copy link
Collaborator

This commit adds some unit tests for these functions from the ssg.build_yaml module:

  • add_sub_element()
  • add_warning_elements()
  • check_warnings()

@jan-cerny jan-cerny added the Infrastructure Our content build system label Oct 5, 2022
@jan-cerny jan-cerny added this to the 0.1.65 milestone Oct 5, 2022
@github-actions
Copy link

github-actions bot commented Oct 5, 2022

Start a new ephemeral environment with changes proposed in this pull request:

Fedora Environment
Open in Gitpod

Oracle Linux 8 Environment
Open in Gitpod

@Mab879
Copy link
Member

Mab879 commented Oct 20, 2022

This PR needs a rebase, would it be possible to use XMLDiff on these tests as well?

@openshift-merge-robot openshift-merge-robot added the needs-rebase Used by openshift-ci bot. label Oct 20, 2022
This commit adds some unit tests for these functions from the
ssg.build_yaml module:
- add_sub_element()
- add_warning_elements()
- check_warnings()
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Used by openshift-ci bot. label Oct 21, 2022
@jan-cerny
Copy link
Collaborator Author

I have rebased the PR on the top of latest master.

would it be possible to use XMLDiff on these tests as well?

It's possible because they work with XML, but I don't plan to use it because I find the tests simple enough in the current form.

@codeclimate
Copy link

codeclimate bot commented Oct 21, 2022

Code Climate has analyzed commit 7987881 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 46.2% (0.1% change).

View more on Code Climate.

@matejak matejak self-assigned this Oct 21, 2022
Copy link
Member

@matejak matejak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thank you for the PR!

@matejak matejak merged commit f7dd7d0 into ComplianceAsCode:master Oct 21, 2022
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Infrastructure Our content build system XCCDF12
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants