Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DOML Model Checker
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
PIACERE
public
The Platform
DOML Model Checker
Commits
877742a2
Unverified
Commit
877742a2
authored
2 years ago
by
Andrea Franchini
Browse files
Options
Downloads
Patches
Plain Diff
Fix mc_openapi tests
parent
53216da0
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
mc_openapi/doml_mc/common_reqs.py
+2
-2
2 additions, 2 deletions
mc_openapi/doml_mc/common_reqs.py
mc_openapi/handlers.py
+2
-1
2 additions, 1 deletion
mc_openapi/handlers.py
tests/test_mc_openapi.py
+3
-3
3 additions, 3 deletions
tests/test_mc_openapi.py
with
7 additions
and
6 deletions
mc_openapi/doml_mc/common_reqs.py
+
2
−
2
View file @
877742a2
...
...
@@ -554,9 +554,9 @@ def ed_vm_iface(solver: Solver, smtsorts: SMTSorts, intermediate_model: Intermed
vm_name
=
get_user_friendly_name
(
intermediate_model
,
solver
.
model
(),
vm
)
if
vm_name
:
return
f
"
Virtual machine
{
vm_name
}
is connected to
no
network interface.
"
return
f
"
Virtual machine
{
vm_name
}
is
not
connected to
any
network interface.
"
except
:
return
"
A virtual machine is connected to
no
network interface.
"
return
"
A virtual machine is
not
connected to
any
network interface.
"
def
ed_software_package_iface_net
(
solver
:
Solver
,
smtsorts
:
SMTSorts
,
intermediate_model
:
IntermediateModel
)
->
str
:
...
...
This diff is collapsed.
Click to expand it.
mc_openapi/handlers.py
+
2
−
1
View file @
877742a2
...
...
@@ -36,7 +36,8 @@ def post(body, version=None):
user_req_str_consts
=
[]
# Add support for Requirements in DOML
if
dmc
.
doml_version
==
DOMLVersion
.
V2_2
:
if
(
dmc
.
doml_version
==
DOMLVersion
.
V2_2
or
dmc
.
doml_version
==
DOMLVersion
.
V2_2_1
):
domlr_parser
=
Parser
(
DOMLRTransformer
)
model
=
get_pyecore_model
(
doml_xmi
,
DOMLVersion
.
V2_2
)
func_reqs
=
model
.
functionalRequirements
.
items
...
...
This diff is collapsed.
Click to expand it.
tests/test_mc_openapi.py
+
3
−
3
View file @
877742a2
...
...
@@ -28,12 +28,12 @@ def test_post_faas_unsat_V2_0():
def
test_post_common_reqs_V2_0
():
check_strings
=
[
"
is connected to
no
network interface.
"
,
"
is
not
connected to
any
network interface.
"
,
"
but they are deployed to nodes that cannot communicate through a common network.
"
,
"
share the same IP address.
"
,
"
is not deployed to any abstract infrastructure node.
"
,
"
ha
s not
been
mapped to any element in the active concretization.
"
,
"
is mapped to
no
abstract infrastructure element.
"
"
i
s not mapped to any element in the active concretization.
"
,
"
is
not
mapped to
any
abstract infrastructure element.
"
]
for
req
,
err_desc
in
zip
(
CommonRequirements
[
DOMLVersion
.
V2_0
].
get_all_requirements
(),
check_strings
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment