Skip to content

confdgnmi - restructure robot test suites - #103

Merged
jomiklos merged 8 commits into
testcasesfrom
testcases-restructured
Mar 10, 2023
Merged

confdgnmi - restructure robot test suites#103
jomiklos merged 8 commits into
testcasesfrom
testcases-restructured

Conversation

@jomiklos

@jomiklos jomiklos commented Mar 7, 2023

Copy link
Copy Markdown
Contributor

No description provided.

Signed-off-by: Jozef Miklos <jomiklos@cisco.com>
@jomiklos
jomiklos requested review from martin-volf and micnovak March 7, 2023 12:27
Comment thread confdgnmi/testtool/OpenConfig/01__interfaces.robot Outdated
Comment thread confdgnmi/testtool/OpenConfig/01__interfaces.robot Outdated
Comment thread confdgnmi/testtool/OpenConfig/01__interfaces.robot
Comment thread confdgnmi/testtool/OpenConfig/01__interfaces.robot
Comment thread confdgnmi/testtool/OpenConfig/01__interfaces.robot
Comment thread confdgnmi/testtool/OpenConfig/interfaces.resource
Comment thread confdgnmi/testtool/OpenConfig/openconfig.resource Outdated
if updates is None:
return False
trace(updates)
return any(text in update.value for update in updates)

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.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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...

jomiklos added 2 commits March 9, 2023 13:30
Signed-off-by: Jozef Miklos <jomiklos@cisco.com>
Signed-off-by: Jozef Miklos <jomiklos@cisco.com>
Comment thread confdgnmi/src/confd_gnmi_common.py Outdated
Comment thread confdgnmi/src/confd_gnmi_common.py Outdated
Comment thread confdgnmi/testtool/gNMI_Interface/01__Capabilities.robot Outdated

Supported encodings should have some JSON
@{encodings}= List supported encodings
Should contain ${encodings} JSON_IETF

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.

Is JSON_IETF mandatory in our tests? And why?

@jomiklos jomiklos Mar 9, 2023

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

good question 😉 @martin-volf - as initial author of this test case can chime in?

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.

Because that is the only encoding that really makes sense. All other ones are underspecified and device specific.

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.

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?)

Comment thread confdgnmi/testtool/OpenConfig/01__interfaces.robot Outdated
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.

@micnovak micnovak Mar 9, 2023

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.

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.

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.

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.

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.

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?

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.

Too much device specific

Comment thread confdgnmi/testtool/gNMI_Interface/GetLibrary.py
jomiklos added 3 commits March 9, 2023 16:46
Signed-off-by: Jozef Miklos <jomiklos@cisco.com>
Signed-off-by: Jozef Miklos <jomiklos@cisco.com>
@martin-volf martin-volf mentioned this pull request Mar 9, 2023
Signed-off-by: Jozef Miklos <jomiklos@cisco.com>
Signed-off-by: Jozef Miklos <jomiklos@cisco.com>
@jomiklos
jomiklos merged commit 5d9f407 into testcases Mar 10, 2023
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.

3 participants