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 tests to accounts_password template #9743

Merged
merged 1 commit into from
Nov 1, 2022

Conversation

Xeicker
Copy link
Contributor

@Xeicker Xeicker commented Oct 27, 2022

Description:

  • Add tests to accounts_password template
  • Also removed tests that resulted duplicated because of this

Rationale:

  • This template didn't have tests. so many of the rules using the template didn't have them

Review Hints:

  • As this is only an update on tests, the automatus run should be sufficient, and look at the logic in the introduced tests

@openshift-ci openshift-ci bot added the needs-ok-to-test Used by openshift-ci bot. label Oct 27, 2022
@openshift-ci
Copy link

openshift-ci bot commented Oct 27, 2022

Hi @Xeicker. Thanks for your PR.

I'm waiting for a ComplianceAsCode member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@github-actions
Copy link

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

Fedora Environment
Open in Gitpod

Oracle Linux 8 Environment
Open in Gitpod

@jan-cerny jan-cerny self-assigned this Oct 31, 2022
#!/bin/bash
# variables = var_password_pam_{{{ VARIABLE }}}={{{ TEST_VAR_VALUE }}}
{{% if ZERO_COMPARISON_OPERATION is none %}}
# platform = multi_platform_example
Copy link
Collaborator

Choose a reason for hiding this comment

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

This multi_platform_example doesn't exist. What is it good for?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed to more descriptive platform "Not Applicable". This is to mark the test as not applicable when required, so it doesn't raise any false alarms

@@ -0,0 +1,10 @@
#!/bin/bash
# platform = Oracle Linux 8
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why is the test for OL 8 only? Adding a comment here would be helpful.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Also removed tests that resulted duplicated because of this

Signed-off-by: Edgar Aguilar <edgar.aguilar@oracle.com>
@codeclimate
Copy link

codeclimate bot commented Oct 31, 2022

Code Climate has analyzed commit fa7d2ca and detected 4 issues on this pull request.

Here's the issue category breakdown:

Category Count
Complexity 2
Duplication 2

Note: there is 1 critical issue.

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.5% (0.0% change).

View more on Code Climate.

@jan-cerny jan-cerny added this to the 0.1.65 milestone Nov 1, 2022
@jan-cerny jan-cerny added the Test Suite Update in Test Suite. label Nov 1, 2022
Copy link
Collaborator

@jan-cerny jan-cerny left a comment

Choose a reason for hiding this comment

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

I have run multiple rules in the rule mode on both Ansible and Bash remediation and everything has given the expected results. Thanks for this PR!

@jan-cerny jan-cerny merged commit 96ca950 into ComplianceAsCode:master Nov 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-ok-to-test Used by openshift-ci bot. Test Suite Update in Test Suite.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants