Skip to content

Commit

Permalink
provisional: Attachments now uses base64 padding not raw mode (#629)
Browse files Browse the repository at this point in the history
* corrected base64 encoding of attachments to use padding as that's what cuke JVM does
  • Loading branch information
Johnlon committed May 31, 2024
1 parent 9558224 commit 3abb346
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion internal/formatters/fmt_cucumber.go
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ func (f *Cuke) buildCukeStep(pickle *messages.Pickle, stepResult models.PickleSt
for _, a := range stepResult.Attachments {
attachments = append(attachments, cukeEmbedding{
Name: a.Name,
Data: base64.RawStdEncoding.EncodeToString(a.Data),
Data: base64.StdEncoding.EncodeToString(a.Data),
MimeType: a.MimeType,
})
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@
{
"name": "TheFilename1",
"mime_type": "text/plain",
"data": "VGhlRGF0YTE"
"data": "VGhlRGF0YTE="
},
{
"name": "TheFilename2",
"mime_type": "text/plain",
"data": "VGhlRGF0YTI"
"data": "VGhlRGF0YTI="
}
]
},
Expand All @@ -54,12 +54,12 @@
{
"name": "TheFilename1",
"mime_type": "text/plain",
"data": "VGhlRGF0YTE"
"data": "VGhlRGF0YTE="
},
{
"name": "TheFilename2",
"mime_type": "text/plain",
"data": "VGhlRGF0YTI"
"data": "VGhlRGF0YTI="
}
]
}
Expand Down

0 comments on commit 3abb346

Please sign in to comment.