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

Changed Kv.get to always return an array for recursive calls. #51

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Aug 27, 2015

  1. Changed Kv.get to always return an array for recursive calls.

    When executing a recursive Kv.get, and there is only one item to
    return, Diplomat was returning a string instead of an array of
    key/value pairs. This means the caller has no idea what the key
    is for the value returned.
    
    To fix the problem, we've added a call to RestClient.return_value
    that indicates that it whether this is a recurse get.
    
    I added a spec to test the above behavoir.
    
    One worrisome behavoir remains: if you call Kv.get() with :return
    and there is no response, I'm not sure what is the proper response.
    For recursive searches, I pretty sure we're still just returning an
    empty string. And I think that recursive searches should always
    return an array.
    PeterFCaswell committed Aug 27, 2015
    Configuration menu
    Copy the full SHA
    f28ff9f View commit details
    Browse the repository at this point in the history