Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
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
Titouan Soulard
slapos
Commits
341fe19c
Commit
341fe19c
authored
Sep 17, 2019
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jupyter/test: use slapos.testing
parent
a4f1b315
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
342 deletions
+9
-342
software/jupyter/test/test.py
software/jupyter/test/test.py
+9
-16
software/jupyter/test/utils.py
software/jupyter/test/utils.py
+0
-326
No files found.
software/jupyter/test/test.py
View file @
341fe19c
...
@@ -25,26 +25,20 @@
...
@@ -25,26 +25,20 @@
#
#
##############################################################################
##############################################################################
import
utils
import
httplib
import
httplib
import
json
import
json
import
os
import
os
import
requests
import
requests
# for development: debugging logs and install Ctrl+C handler
from
slapos.testing.testcase
import
makeModuleSetUpAndTestCaseClass
if
os
.
environ
.
get
(
'SLAPOS_TEST_DEBUG'
):
import
logging
logging
.
basicConfig
(
level
=
logging
.
DEBUG
)
import
unittest
unittest
.
installHandler
()
setUpModule
,
InstanceTestCase
=
makeModuleSetUpAndTestCaseClass
(
os
.
path
.
abspath
(
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'..'
,
'software.cfg'
)))
class
TestJupyter
(
utils
.
SlapOSInstanceTestCase
):
@
classmethod
class
TestJupyter
(
InstanceTestCase
):
def
getSoftwareURLList
(
cls
):
return
(
os
.
path
.
abspath
(
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'..'
,
'software.cfg'
)),)
def
test
(
self
):
def
test
(
self
):
parameter_dict
=
self
.
computer_partition
.
getConnectionParameterDict
()
parameter_dict
=
self
.
computer_partition
.
getConnectionParameterDict
()
...
@@ -54,12 +48,11 @@ class TestJupyter(utils.SlapOSInstanceTestCase):
...
@@ -54,12 +48,11 @@ class TestJupyter(utils.SlapOSInstanceTestCase):
except
Exception
as
e
:
except
Exception
as
e
:
self
.
fail
(
"Can't parse json in %s, error %s"
%
(
parameter_dict
[
'_'
],
e
))
self
.
fail
(
"Can't parse json in %s, error %s"
%
(
parameter_dict
[
'_'
],
e
))
ip
=
os
.
environ
[
'SLAPOS_TEST_IPV6'
]
self
.
assertEqual
(
self
.
assertEqual
(
{
{
'jupyter-classic-url'
:
'https://[%s]:8888/tree'
%
(
ip
,
),
'jupyter-classic-url'
:
'https://[%s]:8888/tree'
%
(
self
.
_ipv6_address
,
),
'jupyterlab-url'
:
'https://[%s]:8888/lab'
%
(
ip
,
),
'jupyterlab-url'
:
'https://[%s]:8888/lab'
%
(
self
.
_ipv6_address
,
),
'url'
:
'https://[%s]:8888/tree'
%
(
ip
,
)
'url'
:
'https://[%s]:8888/tree'
%
(
self
.
_ipv6_address
,
)
},
},
connection_dict
connection_dict
)
)
...
...
software/jupyter/test/utils.py
deleted
100644 → 0
View file @
a4f1b315
This diff is collapsed.
Click to expand it.
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