@@ -36,7 +36,7 @@ func TestActionsService_ListCaches(t *testing.T) {
3636t .Errorf ("Actions.ListCaches returned error: %v" , err )
3737}
3838
39- want := & ActionsCacheList {TotalCount : 1 , ActionsCaches : []* ActionsCache {{ID : Int64 (1 )}}}
39+ want := & ActionsCacheList {TotalCount : 1 , ActionsCaches : []* ActionsCache {{ID : Ptr (1 )}}}
4040if ! cmp .Equal (cacheList , want ) {
4141t .Errorf ("Actions.ListCaches returned %+v, want %+v" , cacheList , want )
4242}
@@ -106,19 +106,19 @@ func TestActionsService_DeleteCachesByKey(t *testing.T) {
106106})
107107
108108ctx := context .Background ()
109- _ , err := client .Actions .DeleteCachesByKey (ctx , "o" , "r" , "1" , String ("main" ))
109+ _ , err := client .Actions .DeleteCachesByKey (ctx , "o" , "r" , "1" , Ptr ("main" ))
110110if err != nil {
111111t .Errorf ("Actions.DeleteCachesByKey return error: %v" , err )
112112}
113113
114114const methodName = "DeleteCachesByKey"
115115testBadOptions (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 " ))
117117return err
118118})
119119
120120testNewRequestAndDoFailure (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" ))
122122})
123123}
124124
@@ -127,7 +127,7 @@ func TestActionsService_DeleteCachesByKey_invalidOwner(t *testing.T) {
127127client , _ , _ := setup (t )
128128
129129ctx := context .Background ()
130- _ , err := client .Actions .DeleteCachesByKey (ctx , "%" , "r" , "1" , String ("main" ))
130+ _ , err := client .Actions .DeleteCachesByKey (ctx , "%" , "r" , "1" , Ptr ("main" ))
131131testURLParseError (t , err )
132132}
133133
@@ -136,7 +136,7 @@ func TestActionsService_DeleteCachesByKey_invalidRepo(t *testing.T) {
136136client , _ , _ := setup (t )
137137
138138ctx := context .Background ()
139- _ , err := client .Actions .DeleteCachesByKey (ctx , "o" , "%" , "1" , String ("main" ))
139+ _ , err := client .Actions .DeleteCachesByKey (ctx , "o" , "%" , "1" , Ptr ("main" ))
140140testURLParseError (t , err )
141141}
142142func TestActionsService_DeleteCachesByKey_notFound (t * testing.T ) {
@@ -149,7 +149,7 @@ func TestActionsService_DeleteCachesByKey_notFound(t *testing.T) {
149149})
150150
151151ctx := 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" ))
153153if err == nil {
154154t .Errorf ("Expected HTTP 404 response" )
155155}
@@ -521,13 +521,13 @@ func TestActionsCache_Marshal(t *testing.T) {
521521testJSONMarshal (t , & ActionsCache {}, "{}" )
522522
523523u := & ActionsCache {
524- ID : Int64 (1 ),
525- Ref : String ("refAction" ),
526- Key : String ("key1" ),
527- Version : String ("alpha" ),
524+ ID : Ptr (1 ),
525+ Ref : Ptr ("refAction" ),
526+ Key : Ptr ("key1" ),
527+ Version : Ptr ("alpha" ),
528528LastAccessedAt : & Timestamp {referenceTime },
529529CreatedAt : & Timestamp {referenceTime },
530- SizeInBytes : Int64 (1 ),
530+ SizeInBytes : Ptr (1 ),
531531}
532532
533533want := `{
@@ -551,19 +551,19 @@ func TestActionsCacheList_Marshal(t *testing.T) {
551551TotalCount : 2 ,
552552ActionsCaches : []* ActionsCache {
553553{
554- ID : Int64 (1 ),
555- Key : String ("key1" ),
556- Version : String ("alpha" ),
554+ ID : Ptr (1 ),
555+ Key : Ptr ("key1" ),
556+ Version : Ptr ("alpha" ),
557557LastAccessedAt : & Timestamp {referenceTime },
558558CreatedAt : & Timestamp {referenceTime },
559- SizeInBytes : Int64 (1 ),
559+ SizeInBytes : Ptr (1 ),
560560},
561561{
562- ID : Int64 (2 ),
563- Ref : String ("refAction" ),
562+ ID : Ptr (2 ),
563+ Ref : Ptr ("refAction" ),
564564LastAccessedAt : & Timestamp {referenceTime },
565565CreatedAt : & Timestamp {referenceTime },
566- SizeInBytes : Int64 (1 ),
566+ SizeInBytes : Ptr (1 ),
567567},
568568},
569569}
0 commit comments