MCPcopy Create free account
hub / github.com/gogs/gogs / Test_parseRemoteUpdateOutput

Function Test_parseRemoteUpdateOutput

internal/database/mirror_test.go:9–33  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

7)
8
9func Test_parseRemoteUpdateOutput(t *testing.T) {
10 tests := []struct {
11 output string
12 expResults []*mirrorSyncResult
13 }{
14 {
15 `
16From https://try.gogs.io/unknwon/upsteam
17 * [new branch] develop -> develop
18 b0bb24f..1d85a4f master -> master
19 - [deleted] (none) -> bugfix
20`,
21 []*mirrorSyncResult{
22 {"develop", gitShortEmptyID, ""},
23 {"master", "b0bb24f", "1d85a4f"},
24 {"bugfix", "", gitShortEmptyID},
25 },
26 },
27 }
28 for _, test := range tests {
29 t.Run("", func(t *testing.T) {
30 assert.Equal(t, test.expResults, parseRemoteUpdateOutput(test.output))
31 })
32 }
33}

Callers

nothing calls this directly

Calls 1

parseRemoteUpdateOutputFunction · 0.85

Tested by

no test coverage detected