etcdv3-ruby icon indicating copy to clipboard operation
etcdv3-ruby copied to clipboard

fix: range_end is string

Open mimuret opened this issue 2 years ago • 2 comments

The default value of range_end is defined as an empty string in Etcdv3::Namespace::KV.del. However, nil is assumed in Etcdv3::Namespace::KV::Requests.del_request, creating an inconsistency. Therefore, if range_end is not specified, namespace is assigned to range_end and del will not work correctly.

mimuret avatar Dec 07 '23 09:12 mimuret

Looks like we need to move the tests to github actions. In any case, would you mind adding a test to cover this?

davissp14 avatar Dec 07 '23 14:12 davissp14

Test added. test results on local before fix below,

  1) Etcdv3 Insecure connection without Auth namespace #del no range was deleted
     Failure/Error: expect(resp.deleted).to eq(1)
     
       expected: 1
            got: 0
     
       (compared using ==)
     # ./spec/etcdv3_spec.rb:583:in `block (6 levels) in <top (required)>'

mimuret avatar Dec 08 '23 01:12 mimuret