Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Rafael Monnerat
slapos.core
Commits
ac647933
Commit
ac647933
authored
Dec 05, 2024
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_crm: testwip
parent
ac424d91
Pipeline
#38417
failed with stage
in 0 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
4 deletions
+37
-4
master/bt5/slapos_crm/TestTemplateItem/portal_components/test.erp5.testSlapOSCRMMonitoringAlarm.py
...rtal_components/test.erp5.testSlapOSCRMMonitoringAlarm.py
+32
-3
master/bt5/slapos_crm/TestTemplateItem/portal_components/test.erp5.testSlapOSCRMMonitoringAlarm.xml
...tal_components/test.erp5.testSlapOSCRMMonitoringAlarm.xml
+5
-1
No files found.
master/bt5/slapos_crm/TestTemplateItem/portal_components/test.erp5.testSlapOSCRMMonitoringAlarm.py
View file @
ac647933
...
...
@@ -77,7 +77,7 @@ class TestSlapOSCrmCheckProjectAllocationConsistencyState(TestSlapOSCrmMonitorin
launch_caucase
=
1
##########################################################################
# slapos_crm_project_allocation_consistency > ComputeNode_check
Monitoring
State
# slapos_crm_project_allocation_consistency > ComputeNode_check
ProjectAllocationConsistency
State
##########################################################################
def
test_ComputeNode_checkProjectAllocationConsistencyState_alarm_remoteNode
(
self
):
compute_node
,
_
=
self
.
addComputeNodeAndPartition
(
self
.
addProject
(),
...
...
@@ -148,6 +148,35 @@ class TestSlapOSCrmCheckProjectAllocationConsistencyState(TestSlapOSCrmMonitorin
self
.
assertIn
(
'Visited by %s'
%
script_name
,
[
content_a
,
content_b
])
class
TestSlapOSCrmMonitoringCheckAllocationConsistencyState
(
TestSlapOSCrmMonitoringMixin
):
launch_caucase
=
1
#############################################################################
# ComputeNode_checkProjectAllocationConsistencyState > ComputeNode_checkAllocationConsistencyState
#############################################################################
@
simulate
(
'Project_isSupportRequestCreationClosed'
,
'*args, **kwargs'
,
'return 0'
)
def
test_ComputeNode_checkAllocationConsistencyState_script_noAllocationCell
(
self
):
with
PinnedDateTime
(
self
,
DateTime
()
-
1.1
):
software_product
,
\
release_variation
,
\
type_variation
,
\
compute_node
,
\
partition
,
\
instance_tree
=
self
.
bootstrapAllocableInstanceTree
(
allocation_state
=
'allocated'
)
self
.
tic
()
error_dict
=
partition
.
ComputePartition_checkAllocationConsistencyState
()
self
.
assertNotEqual
({},
error_dict
)
self
.
assertEqual
(
1
,
len
(
error_dict
))
self
.
assertEqual
([
release_variation
.
getUrlString
()],
error_dict
.
keys
())
self
.
assertEqual
([
type_variation
.
getReference
()],
error_dict
[
release_variation
.
getUrlString
()].
keys
())
self
.
assertEqual
(
partition
.
getAggregateRelatedValue
().
getUid
(),
error_dict
[
release_variation
.
getUrlString
()][
type_variation
.
getReference
()][
0
].
getUid
())
self
.
assertEqual
(
partition
.
getUid
(),
error_dict
[
release_variation
.
getUrlString
()][
type_variation
.
getReference
()][
1
].
getUid
())
class
TestSlapOSCrmMonitoringCheckComputeNodeProjectState
(
TestSlapOSCrmMonitoringMixin
):
launch_caucase
=
1
...
...
@@ -533,7 +562,7 @@ class TestSlapOSCrmMonitoringCheckComputeNodeState(TestSlapOSCrmMonitoringMixin)
project
=
self
.
addProject
()
compute_node
,
_
=
self
.
_makeComputeNode
(
project
)
self
.
_makeComplexComputeNode
(
project
)
compute_node
=
self
.
compute_node
compute_node
=
self
.
compute_node
self
.
start_requested_software_installation
.
setAccessStatus
(
""
)
# Computer and instances are accessed
...
...
@@ -997,7 +1026,7 @@ class TestSlapOSCrmSoftwareInstance_checkInstanceTreeMonitoringState(TestSlapOSC
def
test_SoftwareInstance_checkInstanceTreeMonitoringState_script_slaveWithoutSoftwareInstance
(
self
):
with
PinnedDateTime
(
self
,
DateTime
()
-
1.1
):
# without instance='node', the slave is allocated w/o software instance
# which emulates post unallocation state after the destruction of
# which emulates post unallocation state after the destruction of
# the software instance.
_
,
_
,
_
,
_
,
_
,
instance_tree
=
self
.
bootstrapAllocableInstanceTree
(
allocation_state
=
'allocated'
,
shared
=
True
)
...
...
master/bt5/slapos_crm/TestTemplateItem/portal_components/test.erp5.testSlapOSCRMMonitoringAlarm.xml
View file @
ac647933
...
...
@@ -45,7 +45,11 @@
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<tuple/>
<tuple>
<string>
W:163, 8: Unused variable \'compute_node\' (unused-variable)
</string>
<string>
W:160, 6: Unused variable \'software_product\' (unused-variable)
</string>
<string>
W:165, 8: Unused variable \'instance_tree\' (unused-variable)
</string>
</tuple>
</value>
</item>
<item>
...
...
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