diff options
author | John Olheiser <42128690+jolheiser@users.noreply.github.com> | 2019-11-11 09:15:29 -0600 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2019-11-11 23:15:29 +0800 |
commit | 74a6add4d90beb8133bcbf8ca6b43de35e0aa983 (patch) | |
tree | 868e452d41d71094c5b2cccce67f4211fd14e77b /integrations/api_repo_test.go | |
parent | 74bb292fe3f4c02fc1dc5f32622c74d820cadd78 (diff) | |
download | gitea-74a6add4d90beb8133bcbf8ca6b43de35e0aa983.tar.gz gitea-74a6add4d90beb8133bcbf8ca6b43de35e0aa983.zip |
Template Repositories (#8768)
* Start work on templates
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Continue work
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Fix IsTemplate vs IsGenerated
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Fix tabs vs spaces
* Tabs vs Spaces
* Add templates to API & start adding tests
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Fix integration tests
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Remove unused User
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Move template tests to existing repos
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Minor re-check updates and cleanup
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* make fmt
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Test cleanup
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Fix optionalbool
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* make fmt
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Test fixes and icon change
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Add new user and repo for tests
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Fix tests (finally)
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Update meta repo with env variables
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Move generation to create page
Combine with repo create template
Modify API search to prioritize owner for repo
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Fix tests and coverage
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Fix swagger and JS lint
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Fix API searching for own private repos
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Change wording
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Fix repo search test. User had a private repo that didn't show up
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Another search test fix
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Clarify git content
Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>
* Feedback updates
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Add topics WIP
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Finish adding topics
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Update locale
Signed-off-by: jolheiser <john.olheiser@gmail.com>
Diffstat (limited to 'integrations/api_repo_test.go')
-rw-r--r-- | integrations/api_repo_test.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/integrations/api_repo_test.go b/integrations/api_repo_test.go index a2683d4af4..1682f386d3 100644 --- a/integrations/api_repo_test.go +++ b/integrations/api_repo_test.go @@ -70,9 +70,9 @@ func TestAPISearchRepo(t *testing.T) { expectedResults }{ {name: "RepositoriesMax50", requestURL: "/api/v1/repos/search?limit=50&private=false", expectedResults: expectedResults{ - nil: {count: 22}, - user: {count: 22}, - user2: {count: 22}}, + nil: {count: 24}, + user: {count: 24}, + user2: {count: 24}}, }, {name: "RepositoriesMax10", requestURL: "/api/v1/repos/search?limit=10&private=false", expectedResults: expectedResults{ nil: {count: 10}, @@ -92,7 +92,7 @@ func TestAPISearchRepo(t *testing.T) { {name: "RepositoriesAccessibleAndRelatedToUser", requestURL: fmt.Sprintf("/api/v1/repos/search?uid=%d", user.ID), expectedResults: expectedResults{ nil: {count: 5}, user: {count: 9, includesPrivate: true}, - user2: {count: 5, includesPrivate: true}}, + user2: {count: 6, includesPrivate: true}}, }, {name: "RepositoriesAccessibleAndRelatedToUser2", requestURL: fmt.Sprintf("/api/v1/repos/search?uid=%d", user2.ID), expectedResults: expectedResults{ nil: {count: 1}, @@ -103,7 +103,7 @@ func TestAPISearchRepo(t *testing.T) { {name: "RepositoriesAccessibleAndRelatedToUser3", requestURL: fmt.Sprintf("/api/v1/repos/search?uid=%d", user3.ID), expectedResults: expectedResults{ nil: {count: 1}, user: {count: 4, includesPrivate: true}, - user2: {count: 2, includesPrivate: true}, + user2: {count: 3, includesPrivate: true}, user3: {count: 4, includesPrivate: true}}, }, {name: "RepositoriesOwnedByOrganization", requestURL: fmt.Sprintf("/api/v1/repos/search?uid=%d", orgUser.ID), expectedResults: expectedResults{ |