Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.toolbox
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Iliya Manolov
slapos.toolbox
Commits
f629729b
Commit
f629729b
authored
Sep 22, 2014
by
Cédric Le Ninivin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slaprunner: fix test and add safety net
parent
f0f742b6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
slapos/runner/runnertest.py
slapos/runner/runnertest.py
+6
-1
No files found.
slapos/runner/runnertest.py
View file @
f629729b
...
@@ -78,6 +78,9 @@ class SlaprunnerTestCase(unittest.TestCase):
...
@@ -78,6 +78,9 @@ class SlaprunnerTestCase(unittest.TestCase):
#create slaprunner configuration
#create slaprunner configuration
config
=
Config
()
config
=
Config
()
config
.
setConfig
()
config
.
setConfig
()
# We do not run tests if a user is already set (runner being used)
if
os
.
path
.
exists
(
os
.
path
.
join
(
config
.
etc_dir
,
'.users'
)):
self
.
fail
(
msg
=
"A user is already set, can not start tests"
)
workdir
=
os
.
path
.
join
(
config
.
runner_workdir
,
'project'
)
workdir
=
os
.
path
.
join
(
config
.
runner_workdir
,
'project'
)
software_link
=
os
.
path
.
join
(
config
.
runner_workdir
,
'softwareLink'
)
software_link
=
os
.
path
.
join
(
config
.
runner_workdir
,
'softwareLink'
)
views
.
app
.
config
.
update
(
**
config
.
__dict__
)
views
.
app
.
config
.
update
(
**
config
.
__dict__
)
...
@@ -263,6 +266,8 @@ class SlaprunnerTestCase(unittest.TestCase):
...
@@ -263,6 +266,8 @@ class SlaprunnerTestCase(unittest.TestCase):
"""Start scenario 1 for deploying SR: Clone a project from git repository"""
"""Start scenario 1 for deploying SR: Clone a project from git repository"""
self
.
setAccount
()
self
.
setAccount
()
folder
=
'workspace/'
+
self
.
project
folder
=
'workspace/'
+
self
.
project
if
os
.
path
.
exists
(
self
.
app
.
config
[
'workspace'
]
+
'/'
+
self
.
project
):
shutil
.
rmtree
(
self
.
app
.
config
[
'workspace'
]
+
'/'
+
self
.
project
)
data
=
{
data
=
{
'repo'
:
self
.
repo
,
'repo'
:
self
.
repo
,
'user'
:
'Slaprunner test'
,
'user'
:
'Slaprunner test'
,
...
@@ -308,7 +313,7 @@ class SlaprunnerTestCase(unittest.TestCase):
...
@@ -308,7 +313,7 @@ class SlaprunnerTestCase(unittest.TestCase):
def
test_openSR
(
self
):
def
test_openSR
(
self
):
"""Scenario 3: Open software release"""
"""Scenario 3: Open software release"""
self
.
test_cloneProject
()
self
.
test_cloneProject
()
software
=
os
.
path
.
join
(
self
.
software
,
'
drupal
'
)
# Drupal SR must exist in SR folder
software
=
os
.
path
.
join
(
self
.
software
,
'
helloworld
'
)
# Drupal SR must exist in SR folder
response
=
loadJson
(
self
.
app
.
post
(
'/setCurrentProject'
,
response
=
loadJson
(
self
.
app
.
post
(
'/setCurrentProject'
,
data
=
dict
(
path
=
software
),
data
=
dict
(
path
=
software
),
follow_redirects
=
True
))
follow_redirects
=
True
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment