Repository navigation
feat(tck): add host command testing with the generic application - #71
Merged
Merged
Conversation
Add a tck-host example built on the generic application's AppClient. It subscribes to the TCK console prompts and publishes the requested NCMD and DCMD messages. The edge rebirth uses publish_node_rebirth, which omits the metric datatype as recommended by the specification, so the TCK's ncmd-rebirth-value assertion is documented as not executed.\n\nAdd PublishMetric::with_datatype as an explicit opt-in for command metrics that need a datatype. Export the runner's test parameters to node processes via SRAD_* environment variables so examples follow the configured host, group, node, device and broker.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
tck-hostexample built on the generic application'sAppClient. It subscribes toSPARKPLUG_TCK/CONSOLE_PROMPTand publishes the NCMD/DCMD messages requested byhost:SendCommandTest.PublishMetric::with_datatypeas an explicit opt-in for command metrics that need a datatype.publish_node_rebirthkeeps omitting the datatype, as recommended by the specification.--node-cmdprocesses asSRAD_HOST_APP_ID,SRAD_GROUP_ID,SRAD_NODE_ID,SRAD_DEVICE_ID,SRAD_CLIENT_ID,SRAD_BROKER_HOSTandSRAD_BROKER_PORT, so examples follow the configured IDs and broker.TCK result
host:SendCommandTestreportsPASS but INCOMPLETE(36 passed, 1 not executed). The not-executed assertion isoperational-behavior-data-commands-ncmd-rebirth-value: the example uses the spec-correctpublish_node_rebirthfor the edge rebirth, which omits the metric datatype, while the TCK only sets that assertion for a Boolean datatype. This is documented intck/CONFORMANCE.md, along with the explicitwith_datatypeworkaround.The full host suite passes:
SessionEstablishmentTestSessionTerminationTestSendCommandTestEdgeSessionTerminationTestMessageOrderingTestMultipleBrokerTestVerification
cargo test --workspacecargo clippyfor the touched cratestck-runner --suite host ... --node-cmd ./target/debug/examples/tck-hosthost:SendCommandTestwith non-default host/group/node/device/client IDs to verify the environment-based configuration