@@ -32,10 +32,10 @@ func TestAdmin_Build_Update_200(t *testing.T) {
3232 _ = json .Unmarshal (data , & want )
3333
3434 req := api.Build {
35- Number : Int64 ( 1 ),
36- Parent : Int64 ( 1 ),
37- Event : String ("push" ),
38- Status : String ("running" ),
35+ Number : new ( int64 ( 1 ) ),
36+ Parent : new ( int64 ( 1 ) ),
37+ Event : new ("push "),
38+ Status : new ("running "),
3939 }
4040
4141 // run test
@@ -63,7 +63,7 @@ func TestAdmin_Clean_200(t *testing.T) {
6363 want := server .CleanResourcesResp
6464
6565 req := api.Error {
66- Message : String ("msg" ),
66+ Message : new ("msg "),
6767 }
6868
6969 // run test
@@ -89,7 +89,7 @@ func TestAdmin_Clean_Error(t *testing.T) {
8989 c , _ := NewClient (s .URL , "" , nil )
9090
9191 req := api.Error {
92- Message : String ("msg" ),
92+ Message : new ("msg "),
9393 }
9494
9595 opt500 := CleanOptions {
@@ -128,11 +128,11 @@ func TestAdmin_Deployment_Update_200(t *testing.T) {
128128 _ = json .Unmarshal (data , & want )
129129
130130 req := api.Deployment {
131- Commit : String ("48afb5bdc41ad69bf22588491333f7cf71135163" ),
132- Ref : String ("refs/heads/main" ),
133- Task : String ("vela-deploy" ),
134- Target : String ("production" ),
135- Description : String ("Deployment request from Vela" ),
131+ Commit : new ("48 afb5bdc41ad69bf22588491333f7cf71135163 "),
132+ Ref : new ("refs / heads / main "),
133+ Task : new ("vela - deploy "),
134+ Target : new ("production "),
135+ Description : new ("Deployment request from Vela "),
136136 }
137137
138138 // run test
@@ -164,9 +164,9 @@ func TestAdmin_Hook_Update_200(t *testing.T) {
164164 _ = json .Unmarshal (data , & want )
165165
166166 req := api.Hook {
167- Number : Int64 ( 1 ),
168- Event : String ("push" ),
169- Status : String ("success" ),
167+ Number : new ( int64 ( 1 ) ),
168+ Event : new ("push "),
169+ Status : new ("success "),
170170 }
171171
172172 // run test
@@ -198,31 +198,31 @@ func TestAdmin_Repo_Update_200(t *testing.T) {
198198 _ = json .Unmarshal (data , & want )
199199
200200 req := api.Repo {
201- Private : Bool (true ),
202- Trusted : Bool (true ),
203- Active : Bool (true ),
201+ Private : new (true ),
202+ Trusted : new (true ),
203+ Active : new (true ),
204204 AllowEvents : & api.Events {
205205 Push : & actions.Push {
206- Branch : Bool (true ),
207- Tag : Bool (true ),
208- DeleteBranch : Bool (true ),
209- DeleteTag : Bool (true ),
206+ Branch : new (true ),
207+ Tag : new (true ),
208+ DeleteBranch : new (true ),
209+ DeleteTag : new (true ),
210210 },
211211 PullRequest : & actions.Pull {
212- Opened : Bool (true ),
213- Edited : Bool (true ),
214- Synchronize : Bool (true ),
215- Reopened : Bool (true ),
212+ Opened : new (true ),
213+ Edited : new (true ),
214+ Synchronize : new (true ),
215+ Reopened : new (true ),
216216 },
217217 Deployment : & actions.Deploy {
218- Created : Bool (true ),
218+ Created : new (true ),
219219 },
220220 Comment : & actions.Comment {
221- Created : Bool (true ),
222- Edited : Bool (true ),
221+ Created : new (true ),
222+ Edited : new (true ),
223223 },
224224 Schedule : & actions.Schedule {
225- Run : Bool (true ),
225+ Run : new (true ),
226226 },
227227 },
228228 }
@@ -256,8 +256,8 @@ func TestAdmin_Secret_Update_200(t *testing.T) {
256256 _ = json .Unmarshal (data , & want )
257257
258258 req := api.Secret {
259- Name : String ("foo" ),
260- Value : String ("bar" ),
259+ Name : new ("foo "),
260+ Value : new ("bar "),
261261 AllowEvents : testEvents (),
262262 }
263263
@@ -290,10 +290,10 @@ func TestAdmin_Service_Update_200(t *testing.T) {
290290 _ = json .Unmarshal (data , & want )
291291
292292 req := api.Service {
293- Number : Int32 ( 1 ),
294- Status : String ("finished" ),
295- Started : Int64 ( 1563475419 ),
296- Finished : Int64 ( 1563475419 ),
293+ Number : new ( int32 ( 1 ) ),
294+ Status : new ("finished "),
295+ Started : new ( int64 ( 1563475419 ) ),
296+ Finished : new ( int64 ( 1563475419 ) ),
297297 }
298298
299299 // run test
@@ -325,10 +325,10 @@ func TestAdmin_Step_Update_200(t *testing.T) {
325325 _ = json .Unmarshal (data , & want )
326326
327327 req := api.Step {
328- Number : Int32 ( 1 ),
329- Status : String ("finished" ),
330- Started : Int64 ( 1563475419 ),
331- Finished : Int64 ( 1563475419 ),
328+ Number : new ( int32 ( 1 ) ),
329+ Status : new ("finished "),
330+ Started : new ( int64 ( 1563475419 ) ),
331+ Finished : new ( int64 ( 1563475419 ) ),
332332 }
333333
334334 // run test
@@ -360,7 +360,7 @@ func TestAdmin_User_Update_200(t *testing.T) {
360360 _ = json .Unmarshal (data , & want )
361361
362362 req := api.User {
363- Name : String ("octocat" ),
363+ Name : new ("octocat "),
364364 }
365365
366366 // run test
0 commit comments