Skip to content

Commit

Permalink
displaybody should respect new line [main] (#2981)
Browse files Browse the repository at this point in the history
* displaybody should respect new line

* adjust tests
  • Loading branch information
h0nIg authored Dec 16, 2024
1 parent 7c70623 commit 39da175
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion util/ui/request_logger_file_writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func newRequestLoggerFileWriter(ui *UI, lock *sync.Mutex, filePaths []string) *R

func (display *RequestLoggerFileWriter) DisplayBody([]byte) error {
for _, logFile := range display.logFiles {
_, err := logFile.WriteString(RedactedValue)
_, err := logFile.WriteString(fmt.Sprintf("%s\n", RedactedValue))
if err != nil {
return err
}
Expand Down
4 changes: 2 additions & 2 deletions util/ui/request_logger_file_writer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ var _ = Describe("Request Logger File Writer", func() {

contents, err := os.ReadFile(logFile1)
Expect(err).ToNot(HaveOccurred())
Expect(string(contents)).To(Equal(RedactedValue + "\n"))
Expect(string(contents)).To(Equal(RedactedValue + "\n\n"))

contents, err = os.ReadFile(logFile2)
Expect(err).ToNot(HaveOccurred())
Expect(string(contents)).To(Equal(RedactedValue + "\n"))
Expect(string(contents)).To(Equal(RedactedValue + "\n\n"))
})
})

Expand Down

0 comments on commit 39da175

Please sign in to comment.