confdgnmi - restructure robot test suites - #103
Conversation
Signed-off-by: Jozef Miklos <jomiklos@cisco.com>
| if updates is None: | ||
| return False | ||
| trace(updates) | ||
| return any(text in update.value for update in updates) |
There was a problem hiding this comment.
I'm afraid this may not be enough - this says that e.g. "name" appears as a string in the textual representation of the latest update.
There was a problem hiding this comment.
Right, this needs to be made more strict/specific to returned data format.
I should have added TODO/notice for this "draft" implementation.
Will fix before merge...
Signed-off-by: Jozef Miklos <jomiklos@cisco.com>
Signed-off-by: Jozef Miklos <jomiklos@cisco.com>
|
|
||
| Supported encodings should have some JSON | ||
| @{encodings}= List supported encodings | ||
| Should contain ${encodings} JSON_IETF |
There was a problem hiding this comment.
Is JSON_IETF mandatory in our tests? And why?
There was a problem hiding this comment.
good question 😉 @martin-volf - as initial author of this test case can chime in?
There was a problem hiding this comment.
Because that is the only encoding that really makes sense. All other ones are underspecified and device specific.
There was a problem hiding this comment.
can we be sure gNMI devices behave this way?
https://doc.gambitcom.com/mimic/gnmi.htm
e.g. this simulator claims JSON is mandatory (only?)
| Basic functionality of the Subscribe POLL RPC . | ||
| # Parameters: common connection parameters, path, poll count, poll interval. | ||
| # Failure: Device does not respond, responds with an error, responds with an empty notification set or with a notification without updates, responds with incorrect encoding. | ||
| # Test is passed path to the data model, which contains limited number of elements. Subscription operation is invoked. First SubscriptionRequest is ONCE. After that POLL subscription requests are invoked with poll interval delay. Test verifies for each subscription data is received. Optionally, it can verify the data is the same as the one received in response for ONCE subscription. Test issues WARNING, if SubscriptionResponse stream is closed prematurely. Test issues WARNING if Updates in SubscriptionResponse are aggregated. |
There was a problem hiding this comment.
Not fully correct wording. Should be First SubscriptionRequest is similar to ONCE, with POLL mode in the SubscriptionList, After that POLL SubscriptionRequests messages are ... - my error in initial text.
| Subscribe POLL RPC with updates_only in the SubscriptionList. | ||
| # Parameters: common connection parameters, path, poll count, poll interval. | ||
| # Failure: Device does not respond, responds with an error, responds with an empty notification set or with a notification without updates, responds with incorrect encoding. | ||
| # Test is passed path to the data model, which contains limited number of elements. Subscription` operation is invoked. First SubscriptionRequest is ONCE with filled SubscriptionList containing updates_only set to true. This subscription is handled as ONCE subscription. After that, empty POLL subscription requests are invoked with poll interval delay. Test verifies for each subscription (also for initial ONCE) a SubscriptionResponse is received with only sync_response set to true (without other fields). Test issues WARNING, if SubscriptionResponse stream is closed prematurely. Test issues WARNING if Updates in SubscriptionResponse are aggregated. |
There was a problem hiding this comment.
Same incorrect wording as previous
| Basic functionality of the Subscribe STREAM RPC with ON_CHANGE mode. | ||
| # Parameters: common connection parameters, path, read count | ||
| # Failure: Device does not respond, responds with an error, responds with an empty notification set or with a notification without updates, responds with incorrect encoding. | ||
| # Test is passed path to the data model, which contains limited number of elements, where some of them periodically change (e.g. packet count on interface). STREAM` Subscription operation is invoked. First SubscriptionResponse contains all elements, next responses contains only changed elements. After read count parameter test ends (and subscription stream is closed). Test issues WARNING, if SubscriptionResponse stream is closed prematurely. Test issues WARNING if Updates in SubscriptionResponse are aggregated. |
There was a problem hiding this comment.
Maybe first implementation should end with error instead of WARNING as this is error.
| Subscribe for not existing prefix | ||
|
|
||
| We will not test TARGET_DEFINED mode | ||
| # TODO - why? |
Signed-off-by: Jozef Miklos <jomiklos@cisco.com>
Signed-off-by: Jozef Miklos <jomiklos@cisco.com>
Signed-off-by: Jozef Miklos <jomiklos@cisco.com>
Signed-off-by: Jozef Miklos <jomiklos@cisco.com>
No description provided.