Skip to content

Commit

Permalink
bug/typos-and-debug-logs: fix test typos
Browse files Browse the repository at this point in the history
bug/typos-and-debug-logs: remove debug logs
  • Loading branch information
9ssi7 authored and eser committed Aug 19, 2024
1 parent 363f964 commit 6390b65
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 8 deletions.
2 changes: 0 additions & 2 deletions pkg/bliss/httpfx/uris/common-path.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
package uris

import (
"fmt"
"strings"
)

Expand All @@ -29,7 +28,6 @@ func CommonPath(p1, p2 *Pattern) string {
writeSegment(&b, s1)
}
}
fmt.Println(segs1, segs2)

if len(segs1) > 0 {
writeMatchingPath(&b, segs1)
Expand Down
2 changes: 1 addition & 1 deletion pkg/bliss/httpfx/uris/common-path_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func TestCommonPath(t *testing.T) {
expected: "/bar",
},
{
name: "WilcardAndMultipleSegments",
name: "WildcardAndMultipleSegments",
p1: Pattern{Segments: []Segment{{wild: true, s: "foo", multi: true}}},
p2: Pattern{Segments: []Segment{{wild: false, s: "bar"}}},
expected: "/bar",
Expand Down
2 changes: 0 additions & 2 deletions pkg/bliss/logfx/fx-adapter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package logfx_test
import (
"bufio"
"errors"
"fmt"
"log/slog"
"os"
"sync"
Expand Down Expand Up @@ -156,7 +155,6 @@ func TestFxLogger_LogEvent(t *testing.T) {
scanner := bufio.NewScanner(os.Stdin)
for scanner.Scan() {
if scanner.Text() == tt.want {
fmt.Println("Test passed")
} else {
t.Errorf("LogEvent() = %v, want %v", scanner.Text(), tt.want)
}
Expand Down
1 change: 0 additions & 1 deletion pkg/bliss/logfx/handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ func TestHandler_Handle(t *testing.T) {
PrettyMode: true,
})
err := handler.Handle(context.Background(), slog.NewRecord(time.Time{}, slog.LevelInfo, "test", 0))
fmt.Println(err)
assert.EqualError(t, err, "failed to write log: failed to write")
})
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/bliss/logfx/replacer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ func TestTraceLines(t *testing.T) {
return pc[:n]
}

stackGeneratorWithUnkownFunctionAddr := func() []uintptr {
stackGeneratorWithUnknownFunctionAddr := func() []uintptr {
var pc [32]uintptr
n := runtime.Callers(0, pc[:])
pc[0] = 0
Expand Down Expand Up @@ -154,7 +154,7 @@ func TestTraceLines(t *testing.T) {
},
{
name: "Non-Empty Stack with Unknown Function Address",
stack: stackGeneratorWithUnkownFunctionAddr(),
stack: stackGeneratorWithUnknownFunctionAddr(),
expected: []string{
"unknown",
fmt.Sprint("github.com/eser/go-service/pkg/bliss/logfx.TestTraceLines ", pwd(), ":147"),
Expand Down

0 comments on commit 6390b65

Please sign in to comment.