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
6
Merge Requests
6
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
slapos.toolbox
Commits
152c075b
Commit
152c075b
authored
Mar 23, 2023
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tests: skip some tests on python2
These are only supposed to be used in python3 software releases.
parent
a721147c
Pipeline
#27375
passed with stage
in 0 seconds
Changes
9
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
57 additions
and
13 deletions
+57
-13
slapos/test/promise/plugin/test_check_baseband_latency.py
slapos/test/promise/plugin/test_check_baseband_latency.py
+6
-1
slapos/test/promise/plugin/test_check_cpu_temperature.py
slapos/test/promise/plugin/test_check_cpu_temperature.py
+5
-0
slapos/test/promise/plugin/test_check_free_disk_space.py
slapos/test/promise/plugin/test_check_free_disk_space.py
+7
-2
slapos/test/promise/plugin/test_check_lopcomm_lof.py
slapos/test/promise/plugin/test_check_lopcomm_lof.py
+7
-2
slapos/test/promise/plugin/test_check_lopcomm_rssi.py
slapos/test/promise/plugin/test_check_lopcomm_rssi.py
+7
-2
slapos/test/promise/plugin/test_check_lopcomm_vswr.py
slapos/test/promise/plugin/test_check_lopcomm_vswr.py
+7
-2
slapos/test/promise/plugin/test_check_network_transit.py
slapos/test/promise/plugin/test_check_network_transit.py
+6
-2
slapos/test/promise/plugin/test_check_ram_usage.py
slapos/test/promise/plugin/test_check_ram_usage.py
+6
-2
slapos/test/promise/plugin/test_check_surykatka_json.py
slapos/test/promise/plugin/test_check_surykatka_json.py
+6
-0
No files found.
slapos/test/promise/plugin/test_check_baseband_latency.py
View file @
152c075b
...
...
@@ -25,14 +25,19 @@
#
##############################################################################
import
os
from
datetime
import
datetime
from
datetime
import
timedelta
import
os
import
unittest
import
six
from
slapos.grid.promise
import
PromiseError
from
slapos.promise.plugin.check_baseband_latency
import
RunPromise
from
.
import
TestPromisePluginMixin
@
unittest
.
skipIf
(
six
.
PY2
,
'Python3 only'
)
class
TestCheckBasebandLatency
(
TestPromisePluginMixin
):
promise_name
=
"check-baseband-latency.py"
...
...
slapos/test/promise/plugin/test_check_cpu_temperature.py
View file @
152c075b
...
...
@@ -27,11 +27,16 @@
import
mock
import
time
import
unittest
import
six
from
slapos.grid.promise
import
PromiseError
from
slapos.promise.plugin.check_cpu_temperature
import
RunPromise
from
.
import
TestPromisePluginMixin
@
unittest
.
skipIf
(
six
.
PY2
,
'Python3 only'
)
class
TestCheckCpuTemperature
(
TestPromisePluginMixin
):
promise_name
=
"monitor-cpu-temperature.py"
...
...
slapos/test/promise/plugin/test_check_free_disk_space.py
View file @
152c075b
...
...
@@ -25,12 +25,16 @@
#
##############################################################################
from
slapos.test.promise.plugin
import
TestPromisePluginMixin
from
slapos.grid.promise
import
PromiseError
import
os
import
sqlite3
import
unittest
import
six
from
slapos.test.promise.plugin
import
TestPromisePluginMixin
from
slapos.grid.promise
import
PromiseError
class
TestCheckFreeDiskSpace
(
TestPromisePluginMixin
):
def
setUp
(
self
):
...
...
@@ -130,6 +134,7 @@ extra_config_dict = {
"The partition slappart1 uses 20.87 G (date checked: 2017-10-02 09:17:00)."
self
.
assertIn
(
message
,
result
[
'result'
][
'message'
])
@
unittest
.
skipIf
(
six
.
PY2
,
'Python3 only'
)
def
test_display_prediction
(
self
):
content
=
"""from slapos.promise.plugin.check_free_disk_space import RunPromise
...
...
slapos/test/promise/plugin/test_check_lopcomm_lof.py
View file @
152c075b
...
...
@@ -25,15 +25,20 @@
#
##############################################################################
import
os
import
time
from
datetime
import
datetime
from
datetime
import
timedelta
import
os
import
time
import
unittest
import
six
from
slapos.grid.promise
import
PromiseError
from
slapos.promise.plugin.check_lopcomm_lof
import
RunPromise
from
.
import
TestPromisePluginMixin
@
unittest
.
skipIf
(
six
.
PY2
,
'Python3 only'
)
class
TestCheckLopcommLOFSuccess
(
TestPromisePluginMixin
):
promise_name
=
"check-lopcomm-lof.py"
...
...
slapos/test/promise/plugin/test_check_lopcomm_rssi.py
View file @
152c075b
...
...
@@ -25,15 +25,20 @@
#
##############################################################################
import
os
import
time
from
datetime
import
datetime
from
datetime
import
timedelta
import
os
import
time
import
unittest
import
six
from
slapos.grid.promise
import
PromiseError
from
slapos.promise.plugin.check_lopcomm_rssi
import
RunPromise
from
.
import
TestPromisePluginMixin
@
unittest
.
skipIf
(
six
.
PY2
,
'Python3 only'
)
class
TestCheckLopcommRSSISuccess
(
TestPromisePluginMixin
):
promise_name
=
"check-lopcomm-rssi.py"
...
...
slapos/test/promise/plugin/test_check_lopcomm_vswr.py
View file @
152c075b
...
...
@@ -25,15 +25,20 @@
#
##############################################################################
import
os
import
time
from
datetime
import
datetime
from
datetime
import
timedelta
import
os
import
time
import
unittest
import
six
from
slapos.grid.promise
import
PromiseError
from
slapos.promise.plugin.check_lopcomm_vswr
import
RunPromise
from
.
import
TestPromisePluginMixin
@
unittest
.
skipIf
(
six
.
PY2
,
'Python3 only'
)
class
TestCheckLopcommVSWRSuccess
(
TestPromisePluginMixin
):
promise_name
=
"check-lopcomm-vswr.py"
...
...
slapos/test/promise/plugin/test_check_network_transit.py
View file @
152c075b
...
...
@@ -25,16 +25,20 @@
#
##############################################################################
import
mock
from
collections
import
namedtuple
import
os
import
time
import
unittest
import
mock
import
six
from
collections
import
namedtuple
from
slapos.grid.promise
import
PromiseError
from
slapos.promise.plugin.check_network_transit
import
RunPromise
from
.
import
TestPromisePluginMixin
@
unittest
.
skipIf
(
six
.
PY2
,
'Python3 only'
)
class
TestCheckNetworkTransit
(
TestPromisePluginMixin
):
promise_name
=
"monitor-network-transit.py"
...
...
slapos/test/promise/plugin/test_check_ram_usage.py
View file @
152c075b
...
...
@@ -25,16 +25,20 @@
#
##############################################################################
import
mock
from
collections
import
namedtuple
import
os
import
time
import
unittest
import
mock
import
six
from
collections
import
namedtuple
from
slapos.grid.promise
import
PromiseError
from
slapos.promise.plugin.check_ram_usage
import
RunPromise
from
.
import
TestPromisePluginMixin
@
unittest
.
skipIf
(
six
.
PY2
,
'Python3 only'
)
class
TestCheckRamUsage
(
TestPromisePluginMixin
):
promise_name
=
"monitor-ram-usage.py"
...
...
slapos/test/promise/plugin/test_check_surykatka_json.py
View file @
152c075b
...
...
@@ -7,8 +7,11 @@ import os
import
shutil
import
tempfile
import
time
import
unittest
import
six
@
unittest
.
skipIf
(
six
.
PY2
,
"Python 3 only"
)
class
CheckSurykatkaJSONMixin
(
TestPromisePluginMixin
):
maxDiff
=
None
# show full diffs for test readability
promise_name
=
'check-surykatka-json.py'
...
...
@@ -63,6 +66,7 @@ class CheckSurykatkaJSONMixin(TestPromisePluginMixin):
message
)
@
unittest
.
skipIf
(
six
.
PY2
,
"Python 3 only"
)
class
TestCheckSurykatkaJSONBase
(
CheckSurykatkaJSONMixin
):
def
test_no_config
(
self
):
self
.
writeSurykatkaPromise
()
...
...
@@ -108,6 +112,7 @@ class TestCheckSurykatkaJSONBase(CheckSurykatkaJSONMixin):
"ERROR Report 'NOT_EXISTING_ENTRY' is not supported"
)
@
unittest
.
skipIf
(
six
.
PY2
,
"Python 3 only"
)
class
TestCheckSurykatkaJSONBotStatus
(
CheckSurykatkaJSONMixin
):
def
test
(
self
):
self
.
writeSurykatkaPromise
(
...
...
@@ -220,6 +225,7 @@ class TestCheckSurykatkaJSONBotStatus(CheckSurykatkaJSONMixin):
"bot_status: ERROR 'bot_status' empty in '%s'"
%
(
self
.
json_file
,))
@
unittest
.
skipIf
(
six
.
PY2
,
"Python 3 only"
)
class
TestCheckSurykatkaJSONHttpQuery
(
CheckSurykatkaJSONMixin
):
def
setUp
(
self
):
super
().
setUp
()
...
...
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