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 onidle chain element into cmd-nse-icmp-responder and cover it by docker tests #188

Closed
d-uzlov opened this issue May 13, 2021 · 1 comment · Fixed by #189
Closed

Add onidle chain element into cmd-nse-icmp-responder and cover it by docker tests #188

d-uzlov opened this issue May 13, 2021 · 1 comment · Fixed by #189
Assignees
Labels
enhancement New feature or request planning Related to SOW item

Comments

@d-uzlov
Copy link
Contributor

d-uzlov commented May 13, 2021

Overview

We need to test the new onidle chain element.

Implementation details

  1. Add onidle element into responder endpoint chain, and configure it to stop the server on callback.
  2. Add timeout parameter to server config.
    Timeout should be defined as a pointer in the config to allow to determine whether the corresponding environment variable is set. If env variable was not set, then we shouldn't add the element.
  3. Add a test that checks that the server successfully dies on specified timeout.

References

networkservicemesh/sdk#892

@denis-tingaikin denis-tingaikin changed the title Add test for onidle element Add onidle chain element into cmd-nse-icmp-responder and cover it by docker tests May 13, 2021
@denis-tingaikin denis-tingaikin added enhancement New feature or request planning Related to SOW item labels May 13, 2021
@denis-tingaikin denis-tingaikin self-assigned this May 13, 2021
@edwarnicke
Copy link
Member

It seems like the simplest way here is to simply have onidle.NewServer interpret a timeout of 0 as 'no timeout' and return null.NewServer ... that way we can set an NSM_ONIDLE_TIMEOUT env variable with default 0 and things work as normal unless its set, and if it is set, we get the onidle behavior. Thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request planning Related to SOW item
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants