diff --git a/gitea/doc.go b/gitea/doc.go index 6bd327d..777ad2f 100644 --- a/gitea/doc.go +++ b/gitea/doc.go @@ -2,4 +2,8 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. +// Package gitea implements a client for the Gitea API. +// The version corresponds to the highest supported version +// of the gitea API, but backwards-compatibility is mostly +// given. package gitea // import "code.gitea.io/sdk/gitea" diff --git a/gitea/org_member_test.go b/gitea/org_member_test.go index e017e1d..cdb81a6 100644 --- a/gitea/org_member_test.go +++ b/gitea/org_member_test.go @@ -11,11 +11,10 @@ import ( "github.com/stretchr/testify/assert" ) -/** +/* +* // DeleteOrgMembership remove a member from an organization func (c *Client) DeleteOrgMembership(org, user string) error {} - - */ func TestOrgMembership(t *testing.T) { log.Println("== TestOrgMembership ==") diff --git a/gitea/repo_branch_test.go b/gitea/repo_branch_test.go index c4f3e0d..5d9826c 100644 --- a/gitea/repo_branch_test.go +++ b/gitea/repo_branch_test.go @@ -24,6 +24,8 @@ func TestRepoBranches(t *testing.T) { bl, _, err := c.ListRepoBranches(repo.Owner.UserName, repo.Name, ListRepoBranchesOptions{}) assert.NoError(t, err) assert.Len(t, bl, 3) + + // FIXME: order of returned branches is not deterministic! assert.EqualValues(t, "feature", bl[0].Name) assert.EqualValues(t, "main", bl[1].Name) assert.EqualValues(t, "update", bl[2].Name) diff --git a/gitea/repo_test.go b/gitea/repo_test.go index 3f3ebc8..f32d1fc 100644 --- a/gitea/repo_test.go +++ b/gitea/repo_test.go @@ -57,7 +57,7 @@ func TestRepoMigrateAndLanguages(t *testing.T) { repoG, _, err := c.GetRepo(repoM.Owner.UserName, repoM.Name) assert.NoError(t, err) assert.EqualValues(t, repoM.ID, repoG.ID) - assert.EqualValues(t, "master", repoG.DefaultBranch) + assert.EqualValues(t, "main", repoG.DefaultBranch) assert.True(t, repoG.Mirror) assert.False(t, repoG.Empty) assert.EqualValues(t, 1, repoG.Watchers)