@@ -36,7 +36,7 @@ func TestActionsService_ListCaches(t *testing.T) {
36
36
t .Errorf ("Actions.ListCaches returned error: %v" , err )
37
37
}
38
38
39
- want := & ActionsCacheList {TotalCount : 1 , ActionsCaches : []* ActionsCache {{ID : Int64 ( 1 )}}}
39
+ want := & ActionsCacheList {TotalCount : 1 , ActionsCaches : []* ActionsCache {{ID : Ptr ( int64 ( 1 ) )}}}
40
40
if ! cmp .Equal (cacheList , want ) {
41
41
t .Errorf ("Actions.ListCaches returned %+v, want %+v" , cacheList , want )
42
42
}
@@ -106,19 +106,19 @@ func TestActionsService_DeleteCachesByKey(t *testing.T) {
106
106
})
107
107
108
108
ctx := context .Background ()
109
- _ , err := client .Actions .DeleteCachesByKey (ctx , "o" , "r" , "1" , String ("main" ))
109
+ _ , err := client .Actions .DeleteCachesByKey (ctx , "o" , "r" , "1" , Ptr ("main" ))
110
110
if err != nil {
111
111
t .Errorf ("Actions.DeleteCachesByKey return error: %v" , err )
112
112
}
113
113
114
114
const methodName = "DeleteCachesByKey"
115
115
testBadOptions (t , methodName , func () (err error ) {
116
- _ , err = client .Actions .DeleteCachesByKey (ctx , "\n " , "\n " , "\n " , String ("\n " ))
116
+ _ , err = client .Actions .DeleteCachesByKey (ctx , "\n " , "\n " , "\n " , Ptr ("\n " ))
117
117
return err
118
118
})
119
119
120
120
testNewRequestAndDoFailure (t , methodName , client , func () (* Response , error ) {
121
- return client .Actions .DeleteCachesByKey (ctx , "o" , "r" , "1" , String ("main" ))
121
+ return client .Actions .DeleteCachesByKey (ctx , "o" , "r" , "1" , Ptr ("main" ))
122
122
})
123
123
}
124
124
@@ -127,7 +127,7 @@ func TestActionsService_DeleteCachesByKey_invalidOwner(t *testing.T) {
127
127
client , _ , _ := setup (t )
128
128
129
129
ctx := context .Background ()
130
- _ , err := client .Actions .DeleteCachesByKey (ctx , "%" , "r" , "1" , String ("main" ))
130
+ _ , err := client .Actions .DeleteCachesByKey (ctx , "%" , "r" , "1" , Ptr ("main" ))
131
131
testURLParseError (t , err )
132
132
}
133
133
@@ -136,7 +136,7 @@ func TestActionsService_DeleteCachesByKey_invalidRepo(t *testing.T) {
136
136
client , _ , _ := setup (t )
137
137
138
138
ctx := context .Background ()
139
- _ , err := client .Actions .DeleteCachesByKey (ctx , "o" , "%" , "1" , String ("main" ))
139
+ _ , err := client .Actions .DeleteCachesByKey (ctx , "o" , "%" , "1" , Ptr ("main" ))
140
140
testURLParseError (t , err )
141
141
}
142
142
func TestActionsService_DeleteCachesByKey_notFound (t * testing.T ) {
@@ -149,7 +149,7 @@ func TestActionsService_DeleteCachesByKey_notFound(t *testing.T) {
149
149
})
150
150
151
151
ctx := context .Background ()
152
- resp , err := client .Actions .DeleteCachesByKey (ctx , "o" , "r" , "1" , String ("main" ))
152
+ resp , err := client .Actions .DeleteCachesByKey (ctx , "o" , "r" , "1" , Ptr ("main" ))
153
153
if err == nil {
154
154
t .Errorf ("Expected HTTP 404 response" )
155
155
}
@@ -521,13 +521,13 @@ func TestActionsCache_Marshal(t *testing.T) {
521
521
testJSONMarshal (t , & ActionsCache {}, "{}" )
522
522
523
523
u := & ActionsCache {
524
- ID : Int64 ( 1 ),
525
- Ref : String ("refAction" ),
526
- Key : String ("key1" ),
527
- Version : String ("alpha" ),
524
+ ID : Ptr ( int64 ( 1 ) ),
525
+ Ref : Ptr ("refAction" ),
526
+ Key : Ptr ("key1" ),
527
+ Version : Ptr ("alpha" ),
528
528
LastAccessedAt : & Timestamp {referenceTime },
529
529
CreatedAt : & Timestamp {referenceTime },
530
- SizeInBytes : Int64 ( 1 ),
530
+ SizeInBytes : Ptr ( int64 ( 1 ) ),
531
531
}
532
532
533
533
want := `{
@@ -551,19 +551,19 @@ func TestActionsCacheList_Marshal(t *testing.T) {
551
551
TotalCount : 2 ,
552
552
ActionsCaches : []* ActionsCache {
553
553
{
554
- ID : Int64 ( 1 ),
555
- Key : String ("key1" ),
556
- Version : String ("alpha" ),
554
+ ID : Ptr ( int64 ( 1 ) ),
555
+ Key : Ptr ("key1" ),
556
+ Version : Ptr ("alpha" ),
557
557
LastAccessedAt : & Timestamp {referenceTime },
558
558
CreatedAt : & Timestamp {referenceTime },
559
- SizeInBytes : Int64 ( 1 ),
559
+ SizeInBytes : Ptr ( int64 ( 1 ) ),
560
560
},
561
561
{
562
- ID : Int64 ( 2 ),
563
- Ref : String ("refAction" ),
562
+ ID : Ptr ( int64 ( 2 ) ),
563
+ Ref : Ptr ("refAction" ),
564
564
LastAccessedAt : & Timestamp {referenceTime },
565
565
CreatedAt : & Timestamp {referenceTime },
566
- SizeInBytes : Int64 ( 1 ),
566
+ SizeInBytes : Ptr ( int64 ( 1 ) ),
567
567
},
568
568
},
569
569
}
0 commit comments