Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
controller
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TFS
controller
Commits
39436a6b
Commit
39436a6b
authored
2 years ago
by
Lluis Gifre Renom
Browse files
Options
Downloads
Patches
Plain Diff
Device component:
- testing CI pipeline, added log messages
parent
2799209f
No related branches found
No related tags found
2 merge requests
!54
Release 2.0.0
,
!43
CI pipeline and multiple module fixes
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/device/tests/test_unitary_emulated.py
+4
-4
4 additions, 4 deletions
src/device/tests/test_unitary_emulated.py
with
4 additions
and
4 deletions
src/device/tests/test_unitary_emulated.py
+
4
−
4
View file @
39436a6b
...
@@ -156,8 +156,8 @@ def test_device_emulated_configure(
...
@@ -156,8 +156,8 @@ def test_device_emulated_configure(
for
config_rule
in
device_data
.
device_config
.
config_rules
for
config_rule
in
device_data
.
device_config
.
config_rules
if
config_rule
.
WhichOneof
(
'
config_rule
'
)
==
'
custom
'
if
config_rule
.
WhichOneof
(
'
config_rule
'
)
==
'
custom
'
]
]
#
LOGGER.info('device_data.device_config.config_rules = \n{:s}'.format(
LOGGER
.
info
(
'
device_data.device_config.config_rules =
\n
{:s}
'
.
format
(
#
'\n'.join(['{:s} {:s} = {:s}'.format(*config_rule) for config_rule in config_rules])))
'
\n
'
.
join
([
'
{:s} {:s} = {:s}
'
.
format
(
*
config_rule
)
for
config_rule
in
config_rules
])))
RESULTING_CONFIG_ENDPOINTS
=
{
cr
[
'
custom
'
][
'
resource_key
'
]:
cr
for
cr
in
copy
.
deepcopy
(
DEVICE_EMU_CONFIG_ENDPOINTS
)}
RESULTING_CONFIG_ENDPOINTS
=
{
cr
[
'
custom
'
][
'
resource_key
'
]:
cr
for
cr
in
copy
.
deepcopy
(
DEVICE_EMU_CONFIG_ENDPOINTS
)}
for
endpoint_cooked
in
DEVICE_EMU_ENDPOINTS_COOKED
:
for
endpoint_cooked
in
DEVICE_EMU_ENDPOINTS_COOKED
:
values
=
json
.
loads
(
RESULTING_CONFIG_ENDPOINTS
[
endpoint_cooked
[
0
]][
'
custom
'
][
'
resource_value
'
])
values
=
json
.
loads
(
RESULTING_CONFIG_ENDPOINTS
[
endpoint_cooked
[
0
]][
'
custom
'
][
'
resource_value
'
])
...
@@ -168,14 +168,14 @@ def test_device_emulated_configure(
...
@@ -168,14 +168,14 @@ def test_device_emulated_configure(
config_rule
=
(
config_rule
=
(
ConfigActionEnum
.
Name
(
config_rule
[
'
action
'
]),
config_rule
[
'
custom
'
][
'
resource_key
'
],
ConfigActionEnum
.
Name
(
config_rule
[
'
action
'
]),
config_rule
[
'
custom
'
][
'
resource_key
'
],
json
.
loads
(
json
.
dumps
(
config_rule
[
'
custom
'
][
'
resource_value
'
])))
json
.
loads
(
json
.
dumps
(
config_rule
[
'
custom
'
][
'
resource_value
'
])))
#
LOGGER.info('config_rule: {:s} {:s} = {:s}'.format(*config_rule))
LOGGER
.
info
(
'
A
config_rule: {:s} {:s} = {:s}
'
.
format
(
*
config_rule
))
assert
config_rule
in
config_rules
assert
config_rule
in
config_rules
for
config_rule
in
DEVICE_EMU_CONFIG_ADDRESSES
:
for
config_rule
in
DEVICE_EMU_CONFIG_ADDRESSES
:
assert
'
custom
'
in
config_rule
assert
'
custom
'
in
config_rule
config_rule
=
(
config_rule
=
(
ConfigActionEnum
.
Name
(
config_rule
[
'
action
'
]),
config_rule
[
'
custom
'
][
'
resource_key
'
],
ConfigActionEnum
.
Name
(
config_rule
[
'
action
'
]),
config_rule
[
'
custom
'
][
'
resource_key
'
],
json
.
loads
(
json
.
dumps
(
config_rule
[
'
custom
'
][
'
resource_value
'
])))
json
.
loads
(
json
.
dumps
(
config_rule
[
'
custom
'
][
'
resource_value
'
])))
#
LOGGER.info('config_rule: {:s} {:s} = {:s}'.format(*config_rule))
LOGGER
.
info
(
'
B
config_rule: {:s} {:s} = {:s}
'
.
format
(
*
config_rule
))
assert
config_rule
in
config_rules
assert
config_rule
in
config_rules
# Try to reconfigure...
# Try to reconfigure...
...
...
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