Skip to content

Commit f136543

Browse files
committed
Tweak the PR a little...
1 parent fd3f0d2 commit f136543

File tree

3 files changed

+153
-160
lines changed

3 files changed

+153
-160
lines changed

fixtures_test.go

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const (
3232
"id": 6,
3333
"is_shared": false,
3434
"runner_type": "project_type",
35-
"contacted_at": "2016-01-25T16:39:48.066Z",
35+
"contacted_at": "2016-01-25T16:39:48.166Z",
3636
"name": null,
3737
"online": true,
3838
"status": "online",
@@ -64,36 +64,7 @@ const (
6464
// exampleEventUserUsername provides a ficture for the event username.
6565
exampleEventUserUsername = "jsmith"
6666

67-
// exampleProjectName provides a fixture for a project name.
68-
exampleProjectName = "example-project"
69-
70-
// exampleProjectStatusChecks provides a fixture for a project status checks.
71-
exampleProjectStatusChecks = `[
72-
{
73-
"id": 1,
74-
"name": "Compliance Check",
75-
"project_id": 6,
76-
"external_url": "https://gitlab.com/example/test.json",
77-
"protected_branches": [
78-
{
79-
"id": 14,
80-
"project_id": 6,
81-
"name": "master",
82-
"created_at": "2020-10-12T14:04:50.787Z",
83-
"updated_at": "2020-10-12T14:04:50.787Z",
84-
"code_owner_approval_required": false
85-
}
86-
]
87-
}
88-
]`
89-
90-
// exampleRegisterNewRunner provides fixture for Runners tests.
91-
exampleRegisterNewRunner = `{
92-
"id": 12345,
93-
"token": "6337ff461c94fd3fa32ba3b1ff4125"
94-
}`
95-
96-
// exampleRunnerJob provides fixture for ListRunnerJobs test
67+
// exampleRunnerJob provides fixture for the list runner jobs test.
9768
exampleListRunnerJobs = `
9869
[
9970
{
@@ -134,18 +105,18 @@ const (
134105
"commit": {
135106
"id": "6c016b801a88f4bd31f927fc045b5c746a6f823e",
136107
"short_id": "6c016b80",
137-
"created_at": "2018-03-21T14:41:00.000+01:00",
108+
"created_at": "2018-03-21T14:41:00.000Z",
138109
"parent_ids": [
139110
"6008b4902d40799ab11688e502d9f1f27f6d2e18"
140111
],
141112
"title": "Update env for specific runner",
142113
"message": "Update env for specific runner\n",
143114
"author_name": "John SMITH",
144115
"author_email": "[email protected]",
145-
"authored_date": "2018-03-21T14:41:00.000+01:00",
116+
"authored_date": "2018-03-21T14:41:00.000Z",
146117
"committer_name": "John SMITH",
147118
"committer_email": "[email protected]",
148-
"committed_date": "2018-03-21T14:41:00.000+01:00",
119+
"committed_date": "2018-03-21T14:41:00.000Z",
149120
"trailers": {},
150121
"web_url": "https://gitlab.example.com/awesome/packages/common/-/commit/6c016b801a88f4bd31f927fc045b5c746a6f823e"
151122
},
@@ -173,6 +144,35 @@ const (
173144
}
174145
]`
175146

147+
// exampleProjectName provides a fixture for a project name.
148+
exampleProjectName = "example-project"
149+
150+
// exampleProjectStatusChecks provides a fixture for a project status checks.
151+
exampleProjectStatusChecks = `[
152+
{
153+
"id": 1,
154+
"name": "Compliance Check",
155+
"project_id": 6,
156+
"external_url": "https://gitlab.com/example/test.json",
157+
"protected_branches": [
158+
{
159+
"id": 14,
160+
"project_id": 6,
161+
"name": "master",
162+
"created_at": "2020-10-12T14:04:50.787Z",
163+
"updated_at": "2020-10-12T14:04:50.787Z",
164+
"code_owner_approval_required": false
165+
}
166+
]
167+
}
168+
]`
169+
170+
// exampleRegisterNewRunner provides fixture for Runners tests.
171+
exampleRegisterNewRunner = `{
172+
"id": 12345,
173+
"token": "6337ff461c94fd3fa32ba3b1ff4125"
174+
}`
175+
176176
// exampleReleaseLink provides fixture for Release Links tests.
177177
exampleReleaseLink = `{
178178
"id":1,

jobs.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ type Job struct {
7575
Status string `json:"status"`
7676
Tag bool `json:"tag"`
7777
WebURL string `json:"web_url"`
78-
User *User `json:"user"`
7978
Project *Project `json:"project"`
79+
User *User `json:"user"`
8080
}
8181

8282
// Bridge represents a pipeline bridge.

0 commit comments

Comments
 (0)