diff --git a/pkg/git/libgit2/managed/http_test.go b/pkg/git/libgit2/managed/http_test.go index be47a690..3907e443 100644 --- a/pkg/git/libgit2/managed/http_test.go +++ b/pkg/git/libgit2/managed/http_test.go @@ -105,6 +105,16 @@ func TestHttpAction_CreateClientRequest(t *testing.T) { }, wantedErr: nil, }, + { + name: "incomplete credentials, no basic auth", + action: git2go.SmartServiceActionReceivepackLs, + transport: &http.Transport{}, + authOpts: git.AuthOptions{Username: "user"}, + assertFunc: func(g *WithT, req *http.Request, client *http.Client) { + _, _, ok := req.BasicAuth() + g.Expect(ok).To(BeFalse()) + }, + }, { name: "credentials are correctly configured", action: git2go.SmartServiceActionUploadpack,