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

SV-204632 Redundant if statements #185

Open
karikarshivani opened this issue Apr 6, 2023 · 0 comments
Open

SV-204632 Redundant if statements #185

karikarshivani opened this issue Apr 6, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@karikarshivani
Copy link

describe.one do
  if package('sssd').installed?
    describe parse_config_file(file) do
      its('services') { should include 'pam' }
    end
  end
  if package('sssd').installed?
    describe command("grep -i -E 'services(\s)*=(\s)*(.+*)pam' #{file}") do
      its('stdout.strip') { should include 'pam' }
    end
  end
end

Was one of the if statement conditions supposed to have ! to check for negative logic? If not, the if statement should be moved outside of describe.one

@karikarshivani karikarshivani self-assigned this Apr 6, 2023
@karikarshivani karikarshivani added the enhancement New feature or request label Apr 19, 2023
@em-c-rod em-c-rod added bug Something isn't working and removed enhancement New feature or request labels May 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants