Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add a discovery event example from a bacnet scan #370

Merged
merged 1 commit into from
Jun 22, 2022

Conversation

gnmerritt
Copy link
Contributor

We'd like to ensure that the discovery events our scanner is emitting our valid UDMI, so we're checking an example into the tests directory. This example is constructed from a live building controller and includes some of its quirks and field naming conventions

@noursaidi
Copy link
Collaborator

Hi Nathan,

You can run these tests locally on your machine by using bin/test_schema, and then looking at the .out file which in this example would be tests/event_discovery.tests/from_bacnet.out. If the file is blank then there are no errors

@gnmerritt
Copy link
Contributor Author

Yep, ran locally before putting the PR up.

Also maybe I'm missing something but it looks to me like the test runner actually compares the .out file with the actual output to make sure they match (rather than writing to it). So that's why e.g. https://github.com/faucetsdn/udmi/blob/master/tests/event_discovery.tests/errors.out is checked in, to make sure that the validator produces those same messages. Is that right?

@grafnu
Copy link
Collaborator

grafnu commented Jun 22, 2022

Nathan, yes -- that is correct. Some .out files are not empty because they are specifically testing that errors are handled correctly -- but in your case it's good/appropriate that it's empty!

Note that given some of the other changes I'm proposing this will likely need to be adjusted, but that'll come out when I put that PR together.

@grafnu grafnu merged commit eafa07b into faucetsdn:master Jun 22, 2022
@gnmerritt gnmerritt deleted the bacnet-discovery-event branch June 22, 2022 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants