mirror of
https://gitea.com/gitea/tea.git
synced 2026-10-26 11:01:25 +01:00
style: fix lint findings from the review fixes
Signed-off-by: bircni <bircni@icloud.com>
This commit is contained in:
3 files changed
+8
-5
No files matched your search
@@ -134,11 +134,14 @@ func TestCheckoutNamesTheBranchAfterTheHead(t *testing.T) {
|
||||
{"deleted head", services.Pull{Number: 7, Head: "feature", HeadRemoteDeleted: true}, nil, "pr/7"},
|
||||
{"fork branch at the head without upstream", fork, map[string]string{"rev-parse --verify refs/heads/feature^{commit}": "abc123"}, "feature"},
|
||||
{"fork default branch tracking origin", services.Pull{Number: 7, Head: "main", HeadSHA: "abc123", HeadRepo: "bob/project"}, map[string]string{
|
||||
"rev-parse --verify refs/heads/main^{commit}": "abc123", "config --get branch.main.remote": "origin"}, "bob/main"},
|
||||
"rev-parse --verify refs/heads/main^{commit}": "abc123", "config --get branch.main.remote": "origin",
|
||||
}, "bob/main"},
|
||||
{"branch above the head name", services.Pull{Number: 7, Head: "feature/login", HeadSHA: "abc123", HeadRepo: "alice/project"}, map[string]string{
|
||||
"rev-parse --verify refs/heads/feature^{commit}": "other"}, "pr/7"},
|
||||
"rev-parse --verify refs/heads/feature^{commit}": "other",
|
||||
}, "pr/7"},
|
||||
{"branches below the head name", same, map[string]string{
|
||||
"for-each-ref --count=1 --format=%(refname) refs/heads/feature/": "refs/heads/feature/login"}, "pr/7"},
|
||||
"for-each-ref --count=1 --format=%(refname) refs/heads/feature/": "refs/heads/feature/login",
|
||||
}, "pr/7"},
|
||||
} {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
deps, _, _ := testDeps(t)
|
||||
|
||||
@@ -333,7 +333,7 @@ func TestBodyEditorTypesInlineWithoutAnEditor(t *testing.T) {
|
||||
require.Equal(t, []string{terminal.BodyTitle + " ## Steps"}, prompt.texts)
|
||||
// The typed body is kept like an editor draft: reported when the command fails, removed when it succeeds.
|
||||
requireDraft(t, draft.Path, true)
|
||||
var failed error = errors.New("create failed")
|
||||
failed := errors.New("create failed")
|
||||
finishDraft(&draft, &failed)
|
||||
require.ErrorContains(t, failed, "draft saved at "+draft.Path)
|
||||
requireDraft(t, draft.Path, true)
|
||||
|
||||
Reference in new issue
Block a user