From 6c9cd7050ca7e7609fb59984cda8e0559e95211f Mon Sep 17 00:00:00 2001 From: Mariano Cano Date: Tue, 26 May 2020 11:13:07 -0700 Subject: [PATCH] Add test with query strings. --- kms/uri/uri_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kms/uri/uri_test.go b/kms/uri/uri_test.go index 68746f90..a2b69b65 100644 --- a/kms/uri/uri_test.go +++ b/kms/uri/uri_test.go @@ -99,6 +99,10 @@ func TestParse(t *testing.T) { URL: &url.URL{Scheme: "yubikey", Opaque: "slot-id=9a"}, Values: url.Values{"slot-id": []string{"9a"}}, }, false}, + {"ok query", args{"yubikey:slot-id=9a;foo=bar?pin=123456&foo=bar"}, &URI{ + URL: &url.URL{Scheme: "yubikey", Opaque: "slot-id=9a;foo=bar", RawQuery: "pin=123456&foo=bar"}, + Values: url.Values{"slot-id": []string{"9a"}, "foo": []string{"bar"}}, + }, false}, {"ok file", args{"file:///tmp/ca.cert"}, &URI{ URL: &url.URL{Scheme: "file", Path: "/tmp/ca.cert"}, Values: url.Values{},