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
Kirill Smelkov
slapos.toolbox
Commits
5d15d62a
Commit
5d15d62a
authored
Apr 14, 2017
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
runnertest: fix tests
Pin version of setuptools as >=34 don't work
parent
e19eda2e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
5 deletions
+17
-5
slapos/runner/runnertest.py
slapos/runner/runnertest.py
+17
-5
No files found.
slapos/runner/runnertest.py
View file @
5d15d62a
...
...
@@ -19,7 +19,7 @@ import json
import
os
import
shutil
import
sup_process
import
StringIO
from
StringIO
import
StringIO
import
ssl
import
time
import
unittest
...
...
@@ -143,7 +143,7 @@ class SlaprunnerTestCase(unittest.TestCase):
"""Initialize slapos webrunner here"""
self
.
users
=
[
self
.
init_user
,
self
.
init_password
,
"slaprunner@nexedi.com"
,
"SlapOS web runner"
]
self
.
updateUser
=
[
"newslapuser"
,
"newslappwd"
,
"slaprunner@nexedi.com"
,
"SlapOS web runner"
]
self
.
repo
=
'https://lab.nexedi.com/
nexedi/slapos
.git'
self
.
repo
=
'https://lab.nexedi.com/
rafael/slapos-workarround
.git'
self
.
software
=
"workspace/slapos/software/"
# relative directory fo SR
self
.
project
=
'slapos'
# Default project name
self
.
template
=
'template.cfg'
...
...
@@ -231,6 +231,10 @@ class SlaprunnerTestCase(unittest.TestCase):
sr
+=
"[networkcache]
\
n
download-cache-url = http://www.shacache.org/shacache"
sr
+=
"
\
n
download-dir-url = http://www.shacache.org/shadir
\
n
\
n
"
sr
+=
"[command]
\
n
recipe = zc.recipe.egg
\
n
eggs = plone.recipe.command
\
n
zc.buildout
\
n
\
n
"
sr
+=
"""
[versions]
setuptools = 33.1.1
"""
os
.
mkdir
(
testSoftware
)
open
(
os
.
path
.
join
(
testSoftware
,
self
.
app
.
config
[
'software_profile'
]),
'w'
).
write
(
sr
)
...
...
@@ -341,9 +345,10 @@ class SlaprunnerTestCase(unittest.TestCase):
softwareRelease
=
"[buildout]
\
n
\
n
parts =
\
n
test-application
\
n
"
softwareRelease
+=
"#Test download git web repos éè@: utf-8 caracters
\
n
"
softwareRelease
+=
"[test-application]
\
n
recipe = hexagonit.recipe.download
\
n
"
softwareRelease
+=
"url = https://lab.nexedi.com/
nexedi/slapos.git
\
n
"
softwareRelease
+=
"url = https://lab.nexedi.com/
rafael/slapos-workarround.git
\
n
"
softwareRelease
+=
"filename = slapos.git
\
n
"
softwareRelease
+=
"download-only = true
\
n
"
softwareRelease
+=
"[versions]
\
n
setuptools = 33.1.1"
response
=
loadJson
(
self
.
app
.
post
(
'/saveFileContent'
,
data
=
dict
(
file
=
newSoftware
,
content
=
softwareRelease
),
...
...
@@ -406,7 +411,7 @@ class SlaprunnerTestCase(unittest.TestCase):
def
test_requestInstance
(
self
):
"""Scenario
n
6: request software instance"""
"""Scenario 6: request software instance"""
self
.
test_updateInstanceParameter
()
#run Software profile
response
=
loadJson
(
self
.
app
.
post
(
'/runSoftwareProfile'
,
...
...
@@ -479,9 +484,16 @@ class SlaprunnerTestCase(unittest.TestCase):
self
.
test_createSR
()
newSoftware
=
self
.
getCurrentSR
()
softwareRelease
=
"[buildout]
\
n
\
n
parts =
\
n
test-application
\
n
"
softwareRelease
+=
"find-links += http://www.nexedi.org/static/packages/source/slapos.buildout/
\
n
\
n
"
softwareRelease
+=
"[networkcache]
\
n
download-cache-url = http://www.shacache.org/shacache"
softwareRelease
+=
"
\
n
download-dir-url = http://www.shacache.org/shadir
\
n
\
n
"
softwareRelease
+=
"#Test download git web repos éè@: utf-8 caracters
\
n
"
softwareRelease
+=
"[test-application]
\
n
recipe = slapos.cookbook:mkdirectory
\
n
"
softwareRelease
+=
"test = /root/test
\
n
"
softwareRelease
+=
"""
[versions]
setuptools = 33.1.1
"""
response
=
loadJson
(
self
.
app
.
post
(
'/saveFileContent'
,
data
=
dict
(
file
=
newSoftware
,
content
=
softwareRelease
),
...
...
@@ -591,7 +603,7 @@ class SlaprunnerTestCase(unittest.TestCase):
os
.
environ
[
'RUNNER_CONFIG'
]
=
runner_config_old
class
PrintStringIO
(
StringIO
.
StringIO
):
class
PrintStringIO
(
StringIO
):
def
write
(
self
,
data
):
StringIO
.
write
(
self
,
data
)
print
data
...
...
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