@@ -24,7 +24,7 @@ import (
24
24
"google.golang.org/protobuf/types/known/wrapperspb"
25
25
)
26
26
27
- func toProtoJson (m protoreflect.ProtoMessage ) io.Reader {
27
+ func toProtoJSON (m protoreflect.ProtoMessage ) io.Reader {
28
28
resp , _ := protojson .Marshal (m )
29
29
buf := bytes.Buffer {}
30
30
buf .Write (resp )
@@ -38,7 +38,7 @@ func TestActionsArtifactV4UploadSingleFile(t *testing.T) {
38
38
assert .NoError (t , err )
39
39
40
40
// acquire artifact upload url
41
- req := NewRequestWithBody (t , "POST" , "/twirp/github.actions.results.api.v1.ArtifactService/CreateArtifact" , toProtoJson (& actions.CreateArtifactRequest {
41
+ req := NewRequestWithBody (t , "POST" , "/twirp/github.actions.results.api.v1.ArtifactService/CreateArtifact" , toProtoJSON (& actions.CreateArtifactRequest {
42
42
Version : 4 ,
43
43
Name : "artifact" ,
44
44
WorkflowRunBackendId : "792" ,
@@ -64,7 +64,7 @@ func TestActionsArtifactV4UploadSingleFile(t *testing.T) {
64
64
sha := sha256 .Sum256 ([]byte (body ))
65
65
66
66
// confirm artifact upload
67
- req = NewRequestWithBody (t , "POST" , "/twirp/github.actions.results.api.v1.ArtifactService/FinalizeArtifact" , toProtoJson (& actions.FinalizeArtifactRequest {
67
+ req = NewRequestWithBody (t , "POST" , "/twirp/github.actions.results.api.v1.ArtifactService/FinalizeArtifact" , toProtoJSON (& actions.FinalizeArtifactRequest {
68
68
Name : "artifact" ,
69
69
Size : 1024 ,
70
70
Hash : wrapperspb .String ("sha256:" + hex .EncodeToString (sha [:])),
@@ -85,7 +85,7 @@ func TestActionsArtifactV4UploadSingleFileWithRetentionDays(t *testing.T) {
85
85
assert .NoError (t , err )
86
86
87
87
// acquire artifact upload url
88
- req := NewRequestWithBody (t , "POST" , "/twirp/github.actions.results.api.v1.ArtifactService/CreateArtifact" , toProtoJson (& actions.CreateArtifactRequest {
88
+ req := NewRequestWithBody (t , "POST" , "/twirp/github.actions.results.api.v1.ArtifactService/CreateArtifact" , toProtoJSON (& actions.CreateArtifactRequest {
89
89
Version : 4 ,
90
90
ExpiresAt : timestamppb .New (time .Now ().Add (5 * 24 * time .Hour )),
91
91
Name : "artifactWithRetentionDays" ,
@@ -112,7 +112,7 @@ func TestActionsArtifactV4UploadSingleFileWithRetentionDays(t *testing.T) {
112
112
sha := sha256 .Sum256 ([]byte (body ))
113
113
114
114
// confirm artifact upload
115
- req = NewRequestWithBody (t , "POST" , "/twirp/github.actions.results.api.v1.ArtifactService/FinalizeArtifact" , toProtoJson (& actions.FinalizeArtifactRequest {
115
+ req = NewRequestWithBody (t , "POST" , "/twirp/github.actions.results.api.v1.ArtifactService/FinalizeArtifact" , toProtoJSON (& actions.FinalizeArtifactRequest {
116
116
Name : "artifactWithRetentionDays" ,
117
117
Size : 1024 ,
118
118
Hash : wrapperspb .String ("sha256:" + hex .EncodeToString (sha [:])),
@@ -133,7 +133,7 @@ func TestActionsArtifactV4DownloadSingle(t *testing.T) {
133
133
assert .NoError (t , err )
134
134
135
135
// acquire artifact upload url
136
- req := NewRequestWithBody (t , "POST" , "/twirp/github.actions.results.api.v1.ArtifactService/ListArtifacts" , toProtoJson (& actions.ListArtifactsRequest {
136
+ req := NewRequestWithBody (t , "POST" , "/twirp/github.actions.results.api.v1.ArtifactService/ListArtifacts" , toProtoJSON (& actions.ListArtifactsRequest {
137
137
NameFilter : wrapperspb .String ("artifact" ),
138
138
WorkflowRunBackendId : "792" ,
139
139
WorkflowJobRunBackendId : "193" ,
@@ -144,7 +144,7 @@ func TestActionsArtifactV4DownloadSingle(t *testing.T) {
144
144
assert .Len (t , listResp .Artifacts , 1 )
145
145
146
146
// confirm artifact upload
147
- req = NewRequestWithBody (t , "POST" , "/twirp/github.actions.results.api.v1.ArtifactService/GetSignedArtifactURL" , toProtoJson (& actions.GetSignedArtifactURLRequest {
147
+ req = NewRequestWithBody (t , "POST" , "/twirp/github.actions.results.api.v1.ArtifactService/GetSignedArtifactURL" , toProtoJSON (& actions.GetSignedArtifactURLRequest {
148
148
Name : "artifact" ,
149
149
WorkflowRunBackendId : "792" ,
150
150
WorkflowJobRunBackendId : "193" ,
0 commit comments