1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2025-06-12 21:47:35 +02:00

Rename struct field and add new types into server/model's (#523)

Resolve some todos in server/model:
 * Move persistent queue into its own package
 * Create Types: StatusValue, SCMKind, RepoVisibly
 * Rename struct Repo fields: SCMKind, IsSCMPrivate
This commit is contained in:
6543
2021-11-22 12:55:13 +01:00
committed by GitHub
parent d02dfe993f
commit 51617e7f86
40 changed files with 267 additions and 271 deletions

View File

@ -116,10 +116,10 @@ func Test_coding(t *testing.T) {
g.Assert(repo.FullName).Equal(fakeRepo.FullName)
g.Assert(repo.Avatar).Equal(s.URL + fakeRepo.Avatar)
g.Assert(repo.Link).Equal(s.URL + fakeRepo.Link)
g.Assert(repo.Kind).Equal(fakeRepo.Kind)
g.Assert(repo.SCMKind).Equal(fakeRepo.SCMKind)
g.Assert(repo.Clone).Equal(fakeRepo.Clone)
g.Assert(repo.Branch).Equal(fakeRepo.Branch)
g.Assert(repo.IsPrivate).Equal(fakeRepo.IsPrivate)
g.Assert(repo.IsSCMPrivate).Equal(fakeRepo.IsSCMPrivate)
})
g.It("Should handle not found errors", func() {
_, err := c.Repo(ctx, fakeUser, fakeRepoNotFound.Owner, fakeRepoNotFound.Name)
@ -257,15 +257,15 @@ var (
}
fakeRepo = &model.Repo{
Owner: "demo1",
Name: "test1",
FullName: "demo1/test1",
Avatar: "/static/project_icon/scenery-5.png",
Link: "/u/gilala/p/abp/git",
Kind: model.RepoGit,
Clone: "https://git.coding.net/demo1/test1.git",
Branch: "master",
IsPrivate: true,
Owner: "demo1",
Name: "test1",
FullName: "demo1/test1",
Avatar: "/static/project_icon/scenery-5.png",
Link: "/u/gilala/p/abp/git",
SCMKind: model.RepoGit,
Clone: "https://git.coding.net/demo1/test1.git",
Branch: "master",
IsSCMPrivate: true,
}
fakeRepoNotFound = &model.Repo{