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
Léo-Paul Géneau
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
Changes
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