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

test: remove common.getServiceName() #6709

Closed
wants to merge 1 commit into from
Closed

Commits on May 12, 2016

  1. test: remove common.getServiceName()

    Replace lightly-used services file parsing in favor of
    confirming one of a small number of allowable values in service name
    lookup tests.
    
    In nodejs/node-v0.x-archive#8047, it was
    decided that this sort of service file parsing was superior to
    hardcoding acceptable values, but I'm not convinced:
    
    * No guarantee that the host uses /etc/services before, e.g., nscd.
    * Increases complexity of tests without guaranteeing robustness.
    
    I think that simply checking against a small set of expected values
    may be a better solution. Ideally, there would also be a unit test that
    used a test double for the appropriate `cares` function and confirms
    that it is called with the correct parameters, but now we're getting way
    ahead of ourselves.
    Trott committed May 12, 2016
    Configuration menu
    Copy the full SHA
    3b651fc View commit details
    Browse the repository at this point in the history