Remote Gitea drop basic auth support (#365)

you now have to set **gitea-client** and **gitea-secret**.
This commit is contained in:
6543
2021-09-27 08:11:11 +02:00
committed by GitHub
parent 0fa271f465
commit 06d83c7b0e
5 changed files with 422 additions and 807 deletions

View File

@@ -50,13 +50,13 @@ func Test_gitea(t *testing.T) {
SkipVerify: true,
PrivateMode: true,
})
g.Assert(remote.(*client).URL).Equal("http://localhost:8080")
g.Assert(remote.(*client).Context).Equal("continuous-integration/test")
g.Assert(remote.(*client).Machine).Equal("localhost")
g.Assert(remote.(*client).Username).Equal("someuser")
g.Assert(remote.(*client).Password).Equal("password")
g.Assert(remote.(*client).SkipVerify).Equal(true)
g.Assert(remote.(*client).PrivateMode).Equal(true)
g.Assert(remote.(*Gitea).URL).Equal("http://localhost:8080")
g.Assert(remote.(*Gitea).Context).Equal("continuous-integration/test")
g.Assert(remote.(*Gitea).Machine).Equal("localhost")
g.Assert(remote.(*Gitea).Username).Equal("someuser")
g.Assert(remote.(*Gitea).Password).Equal("password")
g.Assert(remote.(*Gitea).SkipVerify).Equal(true)
g.Assert(remote.(*Gitea).PrivateMode).Equal(true)
})
g.It("Should handle malformed url", func() {
_, err := New(Opts{URL: "%gh&%ij"})