Expand fixtures (#2571)

* Add more repo search tests

* Add and fix /api/repo/search integration tests

* Add owner to access table for organization repositories

* Remove tests
This commit is contained in:
Morlinest 2017-09-22 12:51:16 +02:00 committed by Lauris BH
parent b4b0280e33
commit ca68a75b5b
8 changed files with 204 additions and 1 deletions

View File

@ -15,3 +15,27 @@
user_id: 4
repo_id: 3
mode: 2 # write
-
id: 4
user_id: 15
repo_id: 22
mode: 2 # write
-
id: 5
user_id: 15
repo_id: 21
mode: 2 # write
-
id: 6
user_id: 15
repo_id: 23
mode: 4 # owner
-
id: 7
user_id: 15
repo_id: 24
mode: 4 # owner

View File

@ -29,3 +29,11 @@
is_public: false
is_owner: true
num_teams: 1
-
id: 5
uid: 15
org_id: 17
is_public: true
is_owner: true
num_teams: 1

View File

@ -188,3 +188,100 @@
num_pulls: 0
num_closed_pulls: 0
num_watches: 0
-
id: 17
owner_id: 15
lower_name: big_test_public_1
name: big_test_public_1
is_private: false
num_issues: 0
num_closed_issues: 0
num_pulls: 0
num_closed_pulls: 0
num_watches: 0
is_mirror: false
-
id: 18
owner_id: 15
lower_name: big_test_public_2
name: big_test_public_2
is_private: false
num_issues: 0
num_closed_issues: 0
num_pulls: 0
num_closed_pulls: 0
is_mirror: false
-
id: 19
owner_id: 15
lower_name: big_test_private_1
name: big_test_private_1
is_private: true
num_issues: 0
num_closed_issues: 0
num_pulls: 0
num_closed_pulls: 0
is_mirror: false
-
id: 20
owner_id: 15
lower_name: big_test_private_2
name: big_test_private_2
is_private: true
num_issues: 0
num_closed_issues: 0
num_pulls: 0
num_closed_pulls: 0
is_mirror: false
-
id: 21
owner_id: 16
lower_name: big_test_public_3
name: big_test_public_3
is_private: false
num_issues: 0
num_closed_issues: 0
num_pulls: 0
num_closed_pulls: 0
is_mirror: false
-
id: 22
owner_id: 16
lower_name: big_test_private_3
name: big_test_private_3
is_private: true
num_issues: 0
num_closed_issues: 0
num_pulls: 0
num_closed_pulls: 0
is_mirror: false
-
id: 23
owner_id: 17
lower_name: big_test_public_4
name: big_test_public_4
is_private: false
num_issues: 0
num_closed_issues: 0
num_pulls: 0
num_closed_pulls: 0
is_mirror: false
-
id: 24
owner_id: 17
lower_name: big_test_private_4
name: big_test_private_4
is_private: true
num_issues: 0
num_closed_issues: 0
num_pulls: 0
num_closed_pulls: 0
is_mirror: false

View File

@ -37,3 +37,12 @@
num_repos: 0
num_members: 1
unit_types: '[1,2,3,4,5,6,7]'
-
id: 5
org_id: 17
lower_name: owners
name: Owners
authorize: 4 # owner
num_repos: 2
num_members: 1
unit_types: '[1,2,3,4,5,6,7]'

View File

@ -15,3 +15,15 @@
org_id: 3
team_id: 1
repo_id: 5
-
id: 4
org_id: 17
team_id: 5
repo_id: 23
-
id: 5
org_id: 17
team_id: 5
repo_id: 24

View File

@ -27,3 +27,9 @@
org_id: 7
team_id: 4
uid: 5
-
id: 6
org_id: 17
team_id: 5
uid: 15

View File

@ -218,3 +218,50 @@
avatar_email: user13@example.com
num_repos: 3
is_active: true
-
id: 15
lower_name: user15
name: user15
full_name: User 15
email: user15@example.com
passwd: 7d93daa0d1e6f2305cc8fa496847d61dc7320bb16262f9c55dd753480207234cdd96a93194e408341971742f4701772a025a # password
type: 0 # individual
salt: ZogKvWdyEx
is_admin: false
avatar: avatar15
avatar_email: user15@example.com
num_repos: 4
is_active: true
-
id: 16
lower_name: user16
name: user16
full_name: User 16
email: user16@example.com
passwd: 7d93daa0d1e6f2305cc8fa496847d61dc7320bb16262f9c55dd753480207234cdd96a93194e408341971742f4701772a025a # password
type: 0 # individual
salt: ZogKvWdyEx
is_admin: false
avatar: avatar16
avatar_email: user16@example.com
num_repos: 2
is_active: true
-
id: 17
lower_name: user17
name: user17
full_name: User 17
email: user17@example.com
passwd: 7d93daa0d1e6f2305cc8fa496847d61dc7320bb16262f9c55dd753480207234cdd96a93194e408341971742f4701772a025a # password
type: 1 # organization
salt: ZogKvWdyEx
is_admin: false
avatar: avatar17
avatar_email: user17@example.com
num_repos: 2
is_active: true
num_members: 1
num_teams: 1

View File

@ -252,7 +252,7 @@ func TestOrganizations(t *testing.T) {
[]int64{3, 6})
testSuccess(&SearchUserOptions{OrderBy: "id ASC", Page: 2, PageSize: 2},
[]int64{7})
[]int64{7, 17})
testSuccess(&SearchUserOptions{Page: 3, PageSize: 2},
[]int64{})