mirror of
https://gitea.com/gitea/tea.git
synced 2026-06-25 22:27:39 +02:00
fix(labels): add org label for ls and pr (#1017)
Fix https://gitea.com/gitea/tea/issues/634, https://gitea.com/gitea/tea/issues/669 Reviewed-on: https://gitea.com/gitea/tea/pulls/1017 Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: Minjie Fang <wingsallen@gmail.com> Co-committed-by: Minjie Fang <wingsallen@gmail.com>
This commit is contained in:
@@ -14,7 +14,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"gitea.dev/sdk"
|
||||
gitea "gitea.dev/sdk"
|
||||
teacmd "gitea.dev/tea/cmd"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
@@ -25,10 +25,10 @@ func TestWikiCommandLifecycle(t *testing.T) {
|
||||
client := login.Client()
|
||||
repoName := fmt.Sprintf("tea-wiki-integration-%d", time.Now().UnixNano())
|
||||
|
||||
_, _, err := client.CreateRepo(context.Background(), gitea.CreateRepoOption{Name: repoName})
|
||||
_, _, err := client.Repositories.CreateRepo(context.Background(), gitea.CreateRepoOption{Name: repoName})
|
||||
require.NoError(t, err)
|
||||
t.Cleanup(func() {
|
||||
if _, delErr := client.DeleteRepo(context.Background(), login.User, repoName); delErr != nil {
|
||||
if _, delErr := client.Repositories.DeleteRepo(context.Background(), login.User, repoName); delErr != nil {
|
||||
t.Logf("failed to delete integration test repo %q: %v", repoName, delErr)
|
||||
}
|
||||
})
|
||||
@@ -60,10 +60,10 @@ func TestWikiCommandLifecycle(t *testing.T) {
|
||||
assert.Contains(t, listOutput, "\"title\": \"Home\"")
|
||||
|
||||
emptyRepoName := fmt.Sprintf("tea-wiki-empty-%d", time.Now().UnixNano())
|
||||
_, _, err = client.CreateRepo(context.Background(), gitea.CreateRepoOption{Name: emptyRepoName})
|
||||
_, _, err = client.Repositories.CreateRepo(context.Background(), gitea.CreateRepoOption{Name: emptyRepoName})
|
||||
require.NoError(t, err)
|
||||
t.Cleanup(func() {
|
||||
if _, delErr := client.DeleteRepo(context.Background(), login.User, emptyRepoName); delErr != nil {
|
||||
if _, delErr := client.Repositories.DeleteRepo(context.Background(), login.User, emptyRepoName); delErr != nil {
|
||||
t.Logf("failed to delete empty wiki repo %q: %v", emptyRepoName, delErr)
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user