Skip to content

Commit

Permalink
test: status
Browse files Browse the repository at this point in the history
  • Loading branch information
caarlos0 committed Aug 11, 2024
1 parent 9340467 commit b34648e
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion internal/proxy/stats_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ func TestCompareServerStats(t *testing.T) {
Avg: time.Second,
Degraded: false,
Initialized: true,
ErrorRate: 10,
},
{
Name: "2",
Expand All @@ -46,9 +47,16 @@ func TestCompareServerStats(t *testing.T) {
Avg: 0,
Degraded: true,
Initialized: true,
ErrorRate: 15,
},
}
t.Log(names(v))
sort.Sort(serverStats(v))
require.Equal(t, []string{"4", "1", "5", "2", "3"}, names(v))
require.Equal(t, []string{
"4",
"1",
"2",
"5",
"3",
}, names(v))
}

0 comments on commit b34648e

Please sign in to comment.