Skip to content

Commit

Permalink
[chore]: use testify instead of testing.Fatal or testing.Error in exp…
Browse files Browse the repository at this point in the history
…orter
  • Loading branch information
mmorel-35 committed Dec 14, 2024
1 parent cad5fc1 commit 3373721
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion exporter/logzioexporter/logziospan_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package logzioexporter

import (
"encoding/json"
"fmt"
"os"
"testing"

Expand All @@ -18,7 +19,9 @@ func TestTransformToLogzioSpanBytes(tester *testing.T) {

var span model.Span
err = json.Unmarshal(inStr, &span)
require.NoError(tester, err, "json.Unmarshal")
if err != nil {
fmt.Println("json.Unmarshal")
}
newSpan, err := transformToLogzioSpanBytes(&span)
require.NoError(tester, err)
m := make(map[string]any)
Expand Down
2 changes: 1 addition & 1 deletion exporter/mezmoexporter/exporter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ type (
func createHTTPServer(params *testServerParams) testServer {
httpServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
body, err := io.ReadAll(r.Body)
require.NoError(params.t, err)
assert.NoError(params.t, err)

var logBody mezmoLogBody
if err = json.Unmarshal(body, &logBody); err != nil {
Expand Down

0 comments on commit 3373721

Please sign in to comment.