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
Labels
Merge Requests
106
Merge Requests
106
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
slapos
Commits
8a2f83cb
Commit
8a2f83cb
authored
Oct 01, 2024
by
Xavier Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
software/slapos-testing: Fix slapos-testing/test
parent
88e48430
Pipeline
#37165
failed with stage
in 0 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
4 deletions
+17
-4
software/slapos-testing/test/test.py
software/slapos-testing/test/test.py
+17
-4
No files found.
software/slapos-testing/test/test.py
View file @
8a2f83cb
...
...
@@ -51,17 +51,30 @@ def setUpModule():
)
class
SlaposTestingTestCase
(
SlapOSInstanceTestCase
):
@
classmethod
def
requestDefaultInstance
(
cls
,
state
=
'started'
):
# This method is called for requesting and destroying (state='destroyed').
for
name
,
url
in
zip
(
software_files
,
software_urls
):
cls
.
slap
.
request
(
c
omputer_partition
=
c
ls
.
slap
.
request
(
software_release
=
url
,
software_type
=
None
,
# default
partition_reference
=
'Instance_of_'
+
name
,
partition_parameter_kw
=
cls
.
_instance_parameter_dict
,
state
=
state
,
)
# one of the requested computer partitions
# to satisfy slapos.testing.testcase (slapos.core < 1.13.0)
# and to make it call waitForInstance (slapos.core >= 1.13.0).
return
computer_partition
def
test
():
# Just test that each version of the software compiled and instantiates.
pass
def
test
(
self
):
# Just test that each version of the software compiles and instantiates.
# Check that all expected instances have been requested.
cp
=
self
.
slap
.
computer
.
getComputerPartitionList
()
requested
=
{
p
.
getSoftwareRelease
().
_software_release
:
p
.
getConnectionParameterDict
()
for
p
in
self
.
slap
.
computer
.
getComputerPartitionList
()
if
p
.
getState
()
==
'started'
}
self
.
assertEqual
(
set
(
requested
.
keys
()),
set
(
software_urls
))
self
.
assertTrue
(
all
(
'environment-script'
in
d
for
d
in
requested
.
values
()))
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