diff options
author | Morlinest <morlinest@gmail.com> | 2017-10-26 23:16:13 +0200 |
---|---|---|
committer | Lauris BH <lauris@nix.lv> | 2017-10-27 00:16:13 +0300 |
commit | ddb7f59ef414ffad8dc2485055c246aaea0507d7 (patch) | |
tree | 1e0f10f02b05896a43f609dd91a29d727e1b4a2a /models/fixtures | |
parent | 4d01ecaef350c6df0c27913f05cc0537bed5f7e9 (diff) | |
download | gitea-ddb7f59ef414ffad8dc2485055c246aaea0507d7.tar.gz gitea-ddb7f59ef414ffad8dc2485055c246aaea0507d7.zip |
Add search mode option to /api/repo/search (#2756)
* Add repo type option to /api/repo/search
* Add tests and fix result of collaborative filter in specific condition
* Fix/optimize search & tests
* Improve integration tests
* Fix lint errors
* Fix unit tests
* Change and improve internal implementation of repo search
* Use NonexistentID
* Make search api more general
* Change mirror and fork search behaviour
* Fix tests & typo in comment
Diffstat (limited to 'models/fixtures')
-rw-r--r-- | models/fixtures/access.yml | 14 | ||||
-rw-r--r-- | models/fixtures/org_user.yml | 8 | ||||
-rw-r--r-- | models/fixtures/repository.yml | 94 | ||||
-rw-r--r-- | models/fixtures/team.yml | 11 | ||||
-rw-r--r-- | models/fixtures/team_repo.yml | 14 | ||||
-rw-r--r-- | models/fixtures/team_user.yml | 8 | ||||
-rw-r--r-- | models/fixtures/user.yml | 32 |
7 files changed, 178 insertions, 3 deletions
diff --git a/models/fixtures/access.yml b/models/fixtures/access.yml index 9c149b78d0..af2c8a5293 100644 --- a/models/fixtures/access.yml +++ b/models/fixtures/access.yml @@ -62,4 +62,16 @@ id: 11 user_id: 18 repo_id: 21 - mode: 2 # write
\ No newline at end of file + mode: 2 # write + +- + id: 12 + user_id: 20 + repo_id: 27 + mode: 4 # owner + +- + id: 13 + user_id: 20 + repo_id: 28 + mode: 4 # owner
\ No newline at end of file diff --git a/models/fixtures/org_user.yml b/models/fixtures/org_user.yml index 50d8ef5e68..709a1997b9 100644 --- a/models/fixtures/org_user.yml +++ b/models/fixtures/org_user.yml @@ -44,4 +44,12 @@ org_id: 17 is_public: false is_owner: true + num_teams: 1 + +- + id: 7 + uid: 20 + org_id: 19 + is_public: true + is_owner: true num_teams: 1
\ No newline at end of file diff --git a/models/fixtures/repository.yml b/models/fixtures/repository.yml index eb83dfcff7..91342d076e 100644 --- a/models/fixtures/repository.yml +++ b/models/fixtures/repository.yml @@ -201,6 +201,7 @@ num_closed_pulls: 0 num_watches: 0 is_mirror: false + is_fork: false - id: 18 @@ -213,6 +214,7 @@ num_pulls: 0 num_closed_pulls: 0 is_mirror: false + is_fork: false - id: 19 @@ -225,6 +227,7 @@ num_pulls: 0 num_closed_pulls: 0 is_mirror: false + is_fork: false - id: 20 @@ -237,6 +240,7 @@ num_pulls: 0 num_closed_pulls: 0 is_mirror: false + is_fork: false - id: 21 @@ -249,6 +253,7 @@ num_pulls: 0 num_closed_pulls: 0 is_mirror: false + is_fork: false - id: 22 @@ -261,6 +266,7 @@ num_pulls: 0 num_closed_pulls: 0 is_mirror: false + is_fork: false - id: 23 @@ -273,6 +279,7 @@ num_pulls: 0 num_closed_pulls: 0 is_mirror: false + is_fork: false - id: 24 @@ -285,3 +292,90 @@ num_pulls: 0 num_closed_pulls: 0 is_mirror: false + is_fork: false + +- + id: 25 + owner_id: 20 + lower_name: big_test_public_mirror_5 + name: big_test_public_mirror_5 + is_private: false + num_issues: 0 + num_closed_issues: 0 + num_pulls: 0 + num_closed_pulls: 0 + num_watches: 0 + is_mirror: true + is_fork: false + +- + id: 26 + owner_id: 20 + lower_name: big_test_private_mirror_5 + name: big_test_private_mirror_5 + is_private: true + num_issues: 0 + num_closed_issues: 0 + num_pulls: 0 + num_closed_pulls: 0 + num_watches: 0 + is_mirror: true + is_fork: false + +- + id: 27 + owner_id: 19 + lower_name: big_test_public_mirror_6 + name: big_test_public_mirror_6 + is_private: false + num_issues: 0 + num_closed_issues: 0 + num_pulls: 0 + num_closed_pulls: 0 + num_watches: 0 + is_mirror: true + num_forks: 1 + is_fork: false + +- + id: 28 + owner_id: 19 + lower_name: big_test_private_mirror_6 + name: big_test_private_mirror_6 + is_private: true + num_issues: 0 + num_closed_issues: 0 + num_pulls: 0 + num_closed_pulls: 0 + num_watches: 0 + is_mirror: true + num_forks: 1 + is_fork: false + +- + id: 29 + fork_id: 27 + owner_id: 20 + lower_name: big_test_public_fork_7 + name: big_test_public_fork_7 + is_private: false + num_issues: 0 + num_closed_issues: 0 + num_pulls: 0 + num_closed_pulls: 0 + is_mirror: false + is_fork: true + +- + id: 30 + fork_id: 28 + owner_id: 20 + lower_name: big_test_private_fork_7 + name: big_test_private_fork_7 + is_private: true + num_issues: 0 + num_closed_issues: 0 + num_pulls: 0 + num_closed_pulls: 0 + is_mirror: false + is_fork: true
\ No newline at end of file diff --git a/models/fixtures/team.yml b/models/fixtures/team.yml index 2b2186deae..1d242cb5bb 100644 --- a/models/fixtures/team.yml +++ b/models/fixtures/team.yml @@ -37,6 +37,7 @@ num_repos: 0 num_members: 1 unit_types: '[1,2,3,4,5,6,7]' + - id: 5 org_id: 17 @@ -45,4 +46,14 @@ authorize: 4 # owner num_repos: 2 num_members: 2 + unit_types: '[1,2,3,4,5,6,7]' + +- + id: 6 + org_id: 19 + lower_name: owners + name: Owners + authorize: 4 # owner + num_repos: 2 + num_members: 1 unit_types: '[1,2,3,4,5,6,7]'
\ No newline at end of file diff --git a/models/fixtures/team_repo.yml b/models/fixtures/team_repo.yml index 5154453f7b..9e6d745539 100644 --- a/models/fixtures/team_repo.yml +++ b/models/fixtures/team_repo.yml @@ -26,4 +26,16 @@ id: 5 org_id: 17 team_id: 5 - repo_id: 24
\ No newline at end of file + repo_id: 24 + +- + id: 6 + org_id: 19 + team_id: 6 + repo_id: 27 + +- + id: 7 + org_id: 19 + team_id: 6 + repo_id: 28
\ No newline at end of file diff --git a/models/fixtures/team_user.yml b/models/fixtures/team_user.yml index 56025bb0b7..b1dfcdfdef 100644 --- a/models/fixtures/team_user.yml +++ b/models/fixtures/team_user.yml @@ -38,4 +38,10 @@ id: 7 org_id: 17 team_id: 5 - uid: 18
\ No newline at end of file + uid: 18 + +- + id: 8 + org_id: 19 + team_id: 6 + uid: 20
\ No newline at end of file diff --git a/models/fixtures/user.yml b/models/fixtures/user.yml index 1e06255988..60f5e8405a 100644 --- a/models/fixtures/user.yml +++ b/models/fixtures/user.yml @@ -281,4 +281,36 @@ avatar: avatar18 avatar_email: user18@example.com num_repos: 0 + is_active: true + +- + id: 19 + lower_name: user19 + name: user19 + full_name: User 19 + email: user19@example.com + passwd: 7d93daa0d1e6f2305cc8fa496847d61dc7320bb16262f9c55dd753480207234cdd96a93194e408341971742f4701772a025a # password + type: 1 # organization + salt: ZogKvWdyEx + is_admin: false + avatar: avatar19 + avatar_email: user19@example.com + num_repos: 2 + is_active: true + num_members: 1 + num_teams: 1 + +- + id: 20 + lower_name: user20 + name: user20 + full_name: User 20 + email: user20@example.com + passwd: 7d93daa0d1e6f2305cc8fa496847d61dc7320bb16262f9c55dd753480207234cdd96a93194e408341971742f4701772a025a # password + type: 0 # individual + salt: ZogKvWdyEx + is_admin: false + avatar: avatar20 + avatar_email: user20@example.com + num_repos: 4 is_active: true
\ No newline at end of file |