Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
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
Carlos Ramos Carreño
erp5
Commits
3bb802c6
Commit
3bb802c6
authored
Feb 24, 2020
by
Bryton Lacquement
🚪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slaprunner/test: add support for Python 3
parent
89a2521f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
software/slaprunner/test/test.py
software/slaprunner/test/test.py
+4
-3
No files found.
software/slaprunner/test/test.py
View file @
3bb802c6
...
@@ -42,6 +42,7 @@ import six
...
@@ -42,6 +42,7 @@ import six
from
slapos.recipe.librecipe
import
generateHashFromFiles
from
slapos.recipe.librecipe
import
generateHashFromFiles
from
slapos.testing.testcase
import
makeModuleSetUpAndTestCaseClass
from
slapos.testing.testcase
import
makeModuleSetUpAndTestCaseClass
from
slapos.util
import
bytes2str
setUpModule
,
SlapOSInstanceTestCase
=
makeModuleSetUpAndTestCaseClass
(
setUpModule
,
SlapOSInstanceTestCase
=
makeModuleSetUpAndTestCaseClass
(
os
.
path
.
abspath
(
os
.
path
.
abspath
(
...
@@ -187,7 +188,7 @@ class TestSSH(SlaprunnerTestCase):
...
@@ -187,7 +188,7 @@ class TestSSH(SlaprunnerTestCase):
channel
.
settimeout
(
30
)
channel
.
settimeout
(
30
)
received
=
''
received
=
''
while
True
:
while
True
:
r
=
channel
.
recv
(
1024
)
r
=
bytes2str
(
channel
.
recv
(
1024
)
)
self
.
logger
.
debug
(
"received >%s<"
,
r
)
self
.
logger
.
debug
(
"received >%s<"
,
r
)
if
not
r
:
if
not
r
:
break
break
...
@@ -199,7 +200,7 @@ class TestSSH(SlaprunnerTestCase):
...
@@ -199,7 +200,7 @@ class TestSSH(SlaprunnerTestCase):
# simple commands can also be executed ( this would be like `ssh bash -c 'pwd'` )
# simple commands can also be executed ( this would be like `ssh bash -c 'pwd'` )
self
.
assertEqual
(
self
.
assertEqual
(
self
.
computer_partition_root_path
,
self
.
computer_partition_root_path
,
client
.
exec_command
(
"pwd"
)[
1
].
read
(
1000
).
strip
())
bytes2str
(
client
.
exec_command
(
"pwd"
)[
1
].
read
(
1000
)
).
strip
())
class
TestSlapOS
(
SlaprunnerTestCase
):
class
TestSlapOS
(
SlaprunnerTestCase
):
...
@@ -213,7 +214,7 @@ class TestSlapOS(SlaprunnerTestCase):
...
@@ -213,7 +214,7 @@ class TestSlapOS(SlaprunnerTestCase):
'show'
,
'show'
,
),
),
env
=
{})
env
=
{})
self
.
assertIn
(
'slaprunner'
,
proxy_show_output
)
self
.
assertIn
(
b
'slaprunner'
,
proxy_show_output
)
def
test_shared_part_list
(
self
):
def
test_shared_part_list
(
self
):
# this slapos used shared_part_list
# this slapos used shared_part_list
...
...
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