Skip to content

Commit a73248d

Browse files
committed
fix lint
Signed-off-by: a1012112796 <[email protected]>
1 parent 219f0c5 commit a73248d

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

tests/integration/pull_create_test.go

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,11 @@
44
package integration
55

66
import (
7-
"bytes"
87
"fmt"
98
"net/http"
109
"net/http/httptest"
1110
"net/url"
1211
"path"
13-
"regexp"
1412
"strings"
1513
"testing"
1614

@@ -242,13 +240,8 @@ func TestCreateAgitPullWithReadPermission(t *testing.T) {
242240
t.Run("add commit", doGitAddSomeCommits(dstPath, "master"))
243241

244242
t.Run("do agit pull create", func(t *testing.T) {
245-
stderr := new(bytes.Buffer)
246-
err := git.NewCommand(git.DefaultContext, "push", "origin", "HEAD:refs/for/master", "-o").AddDynamicArguments("topic=" + "test-topic").Run(&git.RunOpts{Dir: dstPath, Stderr: stderr})
243+
err := git.NewCommand(git.DefaultContext, "push", "origin", "HEAD:refs/for/master", "-o").AddDynamicArguments("topic=" + "test-topic").Run(&git.RunOpts{Dir: dstPath})
247244
assert.NoError(t, err)
248-
249-
findPullRe := regexp.MustCompile("http://localhost:3003/user2/repo1/pulls/([1-9])")
250-
pullLink := findPullRe.FindString(stderr.String())
251-
assert.True(t, len(pullLink) > 0)
252245
})
253246
})
254247
}

0 commit comments

Comments
 (0)