-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Process an empty YAML when a configuration file isn't provided (#62)
* Process an empty YAML when no YAML file is given Signed-off-by: tempate <[email protected]> * Tests Signed-off-by: tempate <[email protected]> * Fix python linter Signed-off-by: tempate <[email protected]> * Fix errors in tool_topics_dds_no_config test Signed-off-by: tempate <[email protected]> * Include the new tests in XTSAN Signed-off-by: tempate <[email protected]> * Update the year from 2023 to 2024 Signed-off-by: tempate <[email protected]> --------- Signed-off-by: tempate <[email protected]>
- Loading branch information
Showing
7 changed files
with
135 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
fastddsspy_tool/test/application/test_cases/one_shot_topics_dds_no_config.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Copyright 2024 Proyectos y Sistemas de Mantenimiento SL (eProsima). | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
"""Tests for the fastddsspy executable.""" | ||
|
||
import test_class | ||
|
||
|
||
class TestCase_instance (test_class.TestCase): | ||
"""@brief A subclass of `test_class.TestCase` representing a specific test case.""" | ||
|
||
def __init__(self): | ||
""" | ||
@brief Initialize the TestCase_instance object. | ||
Launch this test with: | ||
fastddsspy | ||
AdvancedConfigurationExample publisher | ||
""" | ||
super().__init__( | ||
name='TopicsDDSNoConfigCommand', | ||
one_shot=True, | ||
command=[], | ||
dds=True, | ||
config='', | ||
arguments_dds=[], | ||
arguments_spy=['topics'], | ||
commands_spy=[], | ||
output="""- name: HelloWorldTopic\n\ | ||
type: HelloWorld\n\ | ||
datawriters: 1\n\ | ||
datareaders: 0\n\ | ||
rate: %%rate%%\n""" | ||
) |
50 changes: 50 additions & 0 deletions
50
fastddsspy_tool/test/application/test_cases/tool_topics_dds_no_config.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# Copyright 2024 Proyectos y Sistemas de Mantenimiento SL (eProsima). | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
"""Tests for the fastddsspy executable.""" | ||
|
||
import test_class | ||
|
||
|
||
class TestCase_instance (test_class.TestCase): | ||
"""@brief A subclass of `test_class.TestCase` representing a specific test case.""" | ||
|
||
def __init__(self): | ||
""" | ||
@brief Initialize the TestCase_instance object. | ||
This test is launched with: | ||
fastddsspy | ||
>> topics | ||
AdvancedConfigurationExample publisher | ||
""" | ||
super().__init__( | ||
name='ToolShowTopicDDSCommand', | ||
one_shot=False, | ||
command=[], | ||
dds=True, | ||
config='', | ||
arguments_dds=[], | ||
arguments_spy=[], | ||
commands_spy=['topics'], | ||
output=""">> \x1b[0m- name: HelloWorldTopic\n\ | ||
\n\ | ||
type: HelloWorld\n\ | ||
\n\ | ||
datawriters: 1\n\ | ||
\n\ | ||
datareaders: 0\n\ | ||
\n\ | ||
rate: %%rate%%\n""" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters