Fix broken CI (#602)

closes #599
"blocks" #598

Co-authored-by: Norwin <git@nroo.de>
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/602
Reviewed-by: techknowlogick <techknowlogick@gitea.io>
Reviewed-by: 6543 <6543@obermui.de>
Co-authored-by: Norwin <noerw@noreply.gitea.io>
Co-committed-by: Norwin <noerw@noreply.gitea.io>
This commit is contained in:
Norwin 2022-09-16 01:47:16 +08:00 committed by 6543
parent 5852fcc4a3
commit e5b5b3447a
4 changed files with 9 additions and 4 deletions

View File

@ -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"

View File

@ -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 ==")

View File

@ -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)

View File

@ -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)