Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
ics-ans-role-conda
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue 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
Alex Thibault-Ferial
ics-ans-role-conda
Commits
09e60000
Commit
09e60000
authored
7 years ago
by
Benjamin Bertrand
Browse files
Options
Downloads
Patches
Plain Diff
Switch to the testinfra host fixture
parent
d6bb30af
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tests/test_conda.py
+6
-6
6 additions, 6 deletions
tests/test_conda.py
tests/test_conda_uid.py
+2
-2
2 additions, 2 deletions
tests/test_conda_uid.py
with
8 additions
and
8 deletions
tests/test_conda.py
+
6
−
6
View file @
09e60000
...
@@ -4,8 +4,8 @@ testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
...
@@ -4,8 +4,8 @@ testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
'
.molecule/ansible_inventory
'
).
get_hosts
(
'
all
'
)
'
.molecule/ansible_inventory
'
).
get_hosts
(
'
all
'
)
def
test_conda_user
(
User
):
def
test_conda_user
(
host
):
user
=
U
ser
(
'
conda
'
)
user
=
host
.
u
ser
(
'
conda
'
)
assert
user
.
exists
assert
user
.
exists
assert
user
.
group
==
'
users
'
assert
user
.
group
==
'
users
'
assert
user
.
home
==
'
/home/conda
'
assert
user
.
home
==
'
/home/conda
'
...
@@ -13,12 +13,12 @@ def test_conda_user(User):
...
@@ -13,12 +13,12 @@ def test_conda_user(User):
assert
user
.
expiration_date
is
None
assert
user
.
expiration_date
is
None
def
test_conda_version
(
Command
):
def
test_conda_version
(
host
):
cmd
=
Command
(
'
/opt/conda/bin/conda --version 2>&1
'
)
cmd
=
host
.
run
(
'
/opt/conda/bin/conda --version 2>&1
'
)
assert
cmd
.
rc
==
0
assert
cmd
.
rc
==
0
assert
cmd
.
stdout
.
strip
()
==
'
conda 4.3.14
'
assert
cmd
.
stdout
.
strip
()
==
'
conda 4.3.14
'
def
test_conda_path
(
Command
):
def
test_conda_path
(
host
):
cmd
=
Command
(
'
su -l -c
"
echo \$PATH
"
conda
'
)
cmd
=
host
.
run
(
'
su -l -c
"
echo \$PATH
"
conda
'
)
assert
cmd
.
stdout
.
startswith
(
'
/opt/conda/bin:
'
)
assert
cmd
.
stdout
.
startswith
(
'
/opt/conda/bin:
'
)
This diff is collapsed.
Click to expand it.
tests/test_conda_uid.py
+
2
−
2
View file @
09e60000
...
@@ -5,8 +5,8 @@ testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
...
@@ -5,8 +5,8 @@ testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
'
.molecule/ansible_inventory
'
).
get_hosts
(
'
set_uid
'
)
'
.molecule/ansible_inventory
'
).
get_hosts
(
'
set_uid
'
)
def
test_conda_uid
(
User
):
def
test_conda_uid
(
host
):
user
=
U
ser
(
'
conda
'
)
user
=
host
.
u
ser
(
'
conda
'
)
assert
user
.
uid
==
48
assert
user
.
uid
==
48
...
...
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