Merge pull request #796 from fluxcd/libgit2-req-incomplete-auth-test
libgit2/managed/http: test for incomplete creds
This commit is contained in:
commit
60cf11a0d1
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue