Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
ca-store
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ansible
ca-store
Commits
47de1c24
Commit
47de1c24
authored
8 years ago
by
nimrod
Browse files
Options
Downloads
Patches
Plain Diff
- Corrected privilege escalation in tests for newer versions of Molecule.
parent
f8b8607e
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/test_ca_store.py
+8
-6
8 additions, 6 deletions
tests/test_ca_store.py
with
8 additions
and
6 deletions
tests/test_ca_store.py
+
8
−
6
View file @
47de1c24
...
...
@@ -28,7 +28,7 @@ def test_concat_cert(File, Command):
'
grep BEGIN /usr/share/ca-certificates/*.crt | wc -l
'
).
stdout
def
test_update_ca_certificates
(
File
,
Ansible
,
Command
):
def
test_update_ca_certificates
(
File
,
Ansible
,
Command
,
Sudo
):
ansible_os_family
=
Ansible
(
'
setup
'
)[
'
ansible_facts
'
][
'
ansible_os_family
'
]
if
ansible_os_family
==
'
OpenBSD
'
:
filename
=
'
/usr/local/sbin/update-ca-certificates
'
...
...
@@ -37,7 +37,8 @@ def test_update_ca_certificates(File, Ansible, Command):
update_ca_certificates
=
File
(
filename
)
assert
update_ca_certificates
.
is_file
assert
update_ca_certificates
.
mode
==
0o0755
assert
Command
(
filename
).
rc
==
0
with
Sudo
():
assert
Command
(
filename
).
rc
==
0
def
test_dh_params
(
File
,
Ansible
):
...
...
@@ -50,8 +51,9 @@ def test_snakeoil_cert(File):
assert
File
(
'
/etc/ssl/certs/ssl-cert-snakeoil.pem
'
).
is_file
def
test_snakeoil_key
(
File
):
def
test_snakeoil_key
(
File
,
Sudo
):
snakeoil_key
=
File
(
'
/etc/ssl/private/ssl-cert-snakeoil.key
'
)
assert
snakeoil_key
.
is_file
assert
snakeoil_key
.
group
==
'
ssl-cert
'
assert
snakeoil_key
.
mode
==
0o0640
with
Sudo
():
assert
snakeoil_key
.
is_file
assert
snakeoil_key
.
group
==
'
ssl-cert
'
assert
snakeoil_key
.
mode
==
0o0640
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment