Skip to content

[14631] External locators XML parsing tests#2902

Merged
MiguelCompany merged 11 commits intofeature/external-locators/mainfrom
feature/external-locators/tests/xml-parser
Sep 8, 2022
Merged

[14631] External locators XML parsing tests#2902
MiguelCompany merged 11 commits intofeature/external-locators/mainfrom
feature/external-locators/tests/xml-parser

Conversation

@MiguelCompany
Copy link
Copy Markdown
Member

@MiguelCompany MiguelCompany commented Aug 3, 2022

Description

This PR adds tests related with the XML parsing of the external locators configuration.

Contributor Checklist

  • Commit messages follow the project guidelines.
  • The code follows the style guidelines of this project.
  • Tests that thoroughly check the new feature have been added/Regression tests checking the bug and its fix have been added.
  • N/A Any new/modified methods have been properly documented using Doxygen.
  • Fast DDS test suite has been run locally.
  • Changes are ABI compatible.
  • Changes are API compatible.
  • N/A Documentation builds and tests pass locally.
  • N/A New feature has been added to the versions.md file (if applicable).
  • N/A New feature has been documented/Current behavior is correctly described in the documentation.

Reviewer Checklist

  • Check contributor checklist is correct.
  • Check CI results: changes do not issue any warning.
  • Check CI results: failing tests are unrelated with the changes.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
…ests.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
@MiguelCompany MiguelCompany added no-test Skip CI tests if PR marked with this label no-aarch Skip build & test for aarch64 labels Aug 3, 2022
@MiguelCompany MiguelCompany added this to the v2.8.0 milestone Aug 3, 2022
@MiguelCompany MiguelCompany changed the title External locators XML parsing tests [14631] External locators XML parsing tests Aug 3, 2022
xmlparser::XMLP_ret::XML_ERROR
},
{
"participant_complete_wrong_loc_no_addr",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to this test. What would happen if I set two <address> or <port> tags accidentally in my locator? Should it fail?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should. I will add a test for it.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in fe7ce52

Signed-off-by: JLBuenoLopez-eProsima <joseluisbueno@eprosima.com>
@MiguelCompany
Copy link
Copy Markdown
Member Author

@jsantiago-eProsima This is ready for another review

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Little typo: ignore

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed on d2141cc

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
@MiguelCompany MiguelCompany force-pushed the feature/external-locators/tests/xml-parser branch from d3026b7 to d2141cc Compare September 8, 2022 13:27
@MiguelCompany MiguelCompany merged this pull request into feature/external-locators/main Sep 8, 2022
@MiguelCompany MiguelCompany deleted the feature/external-locators/tests/xml-parser branch September 8, 2022 14:36
MiguelCompany added a commit that referenced this pull request Sep 8, 2022
* Refs #14631. Use StrictMock for log_mock on XMLProfileParserTests.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #14631. Adding basic structure for new test on XMLProfileParserTests.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #14631. Adding participant positive cases.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #14631. Adding participant negative cases.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #14631. Adding data_writer positive cases.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #14631. Adding data_reader positive cases.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #14631. Adding external locators to XMLParserParticipant test.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #14631. Adding external locators to XMLParserPublisher test.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #14631. Adding external locators to XMLParserSubscriber test.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #14631: apply review suggestion

Signed-off-by: JLBuenoLopez-eProsima <joseluisbueno@eprosima.com>

* Refs #14631. Added more negative cases.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
Signed-off-by: JLBuenoLopez-eProsima <joseluisbueno@eprosima.com>
Co-authored-by: JLBuenoLopez-eProsima <joseluisbueno@eprosima.com>
MiguelCompany added a commit that referenced this pull request Sep 28, 2022
* Refs #14631. Use StrictMock for log_mock on XMLProfileParserTests.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #14631. Adding basic structure for new test on XMLProfileParserTests.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #14631. Adding participant positive cases.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #14631. Adding participant negative cases.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #14631. Adding data_writer positive cases.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #14631. Adding data_reader positive cases.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #14631. Adding external locators to XMLParserParticipant test.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #14631. Adding external locators to XMLParserPublisher test.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #14631. Adding external locators to XMLParserSubscriber test.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #14631: apply review suggestion

Signed-off-by: JLBuenoLopez-eProsima <joseluisbueno@eprosima.com>

* Refs #14631. Added more negative cases.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
Signed-off-by: JLBuenoLopez-eProsima <joseluisbueno@eprosima.com>
Co-authored-by: JLBuenoLopez-eProsima <joseluisbueno@eprosima.com>
MiguelCompany added a commit that referenced this pull request Sep 29, 2022
* Refs #14631. Use StrictMock for log_mock on XMLProfileParserTests.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #14631. Adding basic structure for new test on XMLProfileParserTests.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #14631. Adding participant positive cases.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #14631. Adding participant negative cases.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #14631. Adding data_writer positive cases.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #14631. Adding data_reader positive cases.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #14631. Adding external locators to XMLParserParticipant test.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #14631. Adding external locators to XMLParserPublisher test.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #14631. Adding external locators to XMLParserSubscriber test.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #14631: apply review suggestion

Signed-off-by: JLBuenoLopez-eProsima <joseluisbueno@eprosima.com>

* Refs #14631. Added more negative cases.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
Signed-off-by: JLBuenoLopez-eProsima <joseluisbueno@eprosima.com>
Co-authored-by: JLBuenoLopez-eProsima <joseluisbueno@eprosima.com>
EduPonz pushed a commit that referenced this pull request Sep 29, 2022
* Refs #14631. Use StrictMock for log_mock on XMLProfileParserTests.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #14631. Adding basic structure for new test on XMLProfileParserTests.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #14631. Adding participant positive cases.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #14631. Adding participant negative cases.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #14631. Adding data_writer positive cases.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #14631. Adding data_reader positive cases.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #14631. Adding external locators to XMLParserParticipant test.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #14631. Adding external locators to XMLParserPublisher test.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #14631. Adding external locators to XMLParserSubscriber test.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #14631: apply review suggestion

Signed-off-by: JLBuenoLopez-eProsima <joseluisbueno@eprosima.com>

* Refs #14631. Added more negative cases.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
Signed-off-by: JLBuenoLopez-eProsima <joseluisbueno@eprosima.com>
Co-authored-by: JLBuenoLopez-eProsima <joseluisbueno@eprosima.com>
MiguelCompany added a commit that referenced this pull request Sep 29, 2022
* Refs #14631. Use StrictMock for log_mock on XMLProfileParserTests.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #14631. Adding basic structure for new test on XMLProfileParserTests.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #14631. Adding participant positive cases.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #14631. Adding participant negative cases.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #14631. Adding data_writer positive cases.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #14631. Adding data_reader positive cases.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #14631. Adding external locators to XMLParserParticipant test.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #14631. Adding external locators to XMLParserPublisher test.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #14631. Adding external locators to XMLParserSubscriber test.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #14631: apply review suggestion

Signed-off-by: JLBuenoLopez-eProsima <joseluisbueno@eprosima.com>

* Refs #14631. Added more negative cases.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
Signed-off-by: JLBuenoLopez-eProsima <joseluisbueno@eprosima.com>
Co-authored-by: JLBuenoLopez-eProsima <joseluisbueno@eprosima.com>
MiguelCompany added a commit that referenced this pull request Sep 29, 2022
* Adding empty implementation for ExternalLocatorsProcessor (#2815)

* Refs #15017. ExternalLocatorsProcessor declaration.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #15017. ExternalLocatorsProcessor empty definitions.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #15017. Apply suggestions from code review.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

Co-authored-by: Ricardo González <ricardo@richiware.dev>

Co-authored-by: Ricardo González <ricardo@richiware.dev>

* External locators XML parsing tests (#2902)

* Refs #14631. Use StrictMock for log_mock on XMLProfileParserTests.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #14631. Adding basic structure for new test on XMLProfileParserTests.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #14631. Adding participant positive cases.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #14631. Adding participant negative cases.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #14631. Adding data_writer positive cases.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #14631. Adding data_reader positive cases.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #14631. Adding external locators to XMLParserParticipant test.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #14631. Adding external locators to XMLParserPublisher test.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #14631. Adding external locators to XMLParserSubscriber test.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #14631: apply review suggestion

Signed-off-by: JLBuenoLopez-eProsima <joseluisbueno@eprosima.com>

* Refs #14631. Added more negative cases.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
Signed-off-by: JLBuenoLopez-eProsima <joseluisbueno@eprosima.com>
Co-authored-by: JLBuenoLopez-eProsima <joseluisbueno@eprosima.com>

* Unit tests for ExternalLocatorsProcessor (#2974)

* Refs #14631. Adding new empty test on unittest/rtps/network.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #14631. Add source files to CMakeLists.txt

Signed-off-by: JLBuenoLopez-eProsima <joseluisbueno@eprosima.com>
Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #14631. Add default_locators to mock of ParticipantProxyData.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #14631. Test for add_external_locators_participant.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #14631. Test for add_external_locators on reader and writer.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #14631. Additional participant tests.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #14631. Additional endpoint tests.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #14631. Add separation comments.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #14631. Fixed locators string format.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #14631. Fixed order of arguments in add_external_locators_participant.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #14631. Reduce number of loops.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #14631. Matching locators scenario.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #14631. Data structures representing the scenario.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #14631. Added test matching_locators_scenario.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #14631. Increased cases on matching_locators_scenario.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #14631. Adding test for filtering a LocatorSelectorEntry.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #14631. Adding test for IP mask matching behavior.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #14631. Uncrustify.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
Signed-off-by: JLBuenoLopez-eProsima <joseluisbueno@eprosima.com>
Co-authored-by: JLBuenoLopez-eProsima <joseluisbueno@eprosima.com>

* External locators implementation (#2822)

* Refs #15017. Added mock for ExternalLocatorsProcessor.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #15017. Processing new fields on wire_protocol QoS.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #15017. Processing new fields on DataWriterQos.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #15017. Processing new fields on DataReaderQos.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #15017. Adding new elements to XSD.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #15017. Processing external locator list XML element.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #15017. XML parsing update of BuiltinAttributes.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #15017. XML parsing update of ParticipantAttributes.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #15017. XML parsing update of PublisherAttributes and SubscriberAttributes.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #15017. Added participant interactions.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #15017. Added reader creation interactions.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #15017. Added writer creation interactions.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #15017. Filter locators of discovered participant.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #15017. Filter locators of discovered reader.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #15017. Filter locators of discovered writer.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #15017. Added implementation for ExternalLocatorsProcessor::add_external_locators.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #15017. Added implementation for ExternalLocatorsProcessor::set_listening_locators.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #15017. Implementations for ExternalLocatorsProcessor::filter_remote_locators delegate into internal function.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #15017. Add function to check if two addresses match.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #15017. Add function to check if two locators match.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #15017. Implement filtering algorithm by sorting and then discarding.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #15017. Setup external locators on builtin endpoints.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #15017. Avoid duplicated tags inside <rtps>.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #15017. Avoid duplicated tags inside <builtin>.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #15017. Avoid duplicated tags inside publisher profiles.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #15017. Avoid duplicated tags inside subscriber profiles.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #15017. Avoid duplicated tags inside locator elements.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #15745. Updated versions.md

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
Signed-off-by: JLBuenoLopez-eProsima <joseluisbueno@eprosima.com>
Co-authored-by: Ricardo González <ricardo@richiware.dev>
Co-authored-by: JLBuenoLopez-eProsima <joseluisbueno@eprosima.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-aarch Skip build & test for aarch64 no-test Skip CI tests if PR marked with this label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants