X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/8b95d2e5cb658d61d68262df278653261bd9791c..2553fde59a3cf872be891a4f689c241055080c35:/services/arv-git-httpd/basic_auth_test.go?ds=sidebyside diff --git a/services/arv-git-httpd/basic_auth_test.go b/services/arv-git-httpd/basic_auth_test.go index 6bc88cb1fb..2bd84dc82e 100644 --- a/services/arv-git-httpd/basic_auth_test.go +++ b/services/arv-git-httpd/basic_auth_test.go @@ -14,15 +14,15 @@ type basicAuthTestCase struct { func TestBasicAuth(t *testing.T) { tests := []basicAuthTestCase{ - basicAuthTestCase{"Basic Zm9vOmJhcg==", "foo", "bar", true}, - basicAuthTestCase{"Bogus Zm9vOmJhcg==", "", "", false}, - basicAuthTestCase{"Zm9vOmJhcg==", "", "", false}, - basicAuthTestCase{"Basic", "", "", false}, - basicAuthTestCase{"", "", "", false}, + {"Basic Zm9vOmJhcg==", "foo", "bar", true}, + {"Bogus Zm9vOmJhcg==", "", "", false}, + {"Zm9vOmJhcg==", "", "", false}, + {"Basic", "", "", false}, + {"", "", "", false}, } for _, test := range tests { if u, p, ok := BasicAuth(&http.Request{Header: map[string][]string{ - "Authorization": []string{test.hdr}, + "Authorization": {test.hdr}, }}); u != test.user || p != test.pass || ok != test.ok { t.Error("got:", u, p, ok, "expected:", test.user, test.pass, test.ok, "from:", test.hdr) }