Skip to content
This repository has been archived by the owner on Sep 27, 2024. It is now read-only.

Commit

Permalink
fix: test router test
Browse files Browse the repository at this point in the history
  • Loading branch information
override-coder committed Jul 18, 2023
1 parent 7e55467 commit 96557f8
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions internal/middleware/router_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package middleware_test

import (
"fmt"
"net/url"
"os"
"reflect"
Expand Down Expand Up @@ -54,19 +53,16 @@ func TestRawHeight(t *testing.T) {
for _, u := range urls {
parsedURL, err := url.Parse(u)
if err != nil {
fmt.Printf("Failed to parse URL: %s\n", err)
t.Logf("Failed to parse URL: %s\n", err)
continue
}
values := parsedURL.Query()
height := values.Get("height")
if height != "" {
fmt.Printf("Height: %s\n", height)
fmt.Println()
}
height2, err := strconv.ParseInt(height, 10, 64)
if err != nil {
t.Fatal(err)
assert.EqualValues(t, "100", height)
continue
}
fmt.Printf("%d\n", height2)
_, err = strconv.ParseInt(height, 10, 64)
assert.Error(t, err)
}
}

0 comments on commit 96557f8

Please sign in to comment.