Skip to content

Commit

Permalink
chore: add server list checking
Browse files Browse the repository at this point in the history
  • Loading branch information
r3inbowari committed Feb 23, 2024
1 parent b606404 commit 349763f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions speedtest/server_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package speedtest

import (
"errors"
"math"
"math/rand"
"testing"
Expand Down Expand Up @@ -156,6 +157,10 @@ func TestFetchServerByID(t *testing.T) {
t.Fatal(err)
}

if remoteList.Len() < 1 {
t.Fatal(errors.New("server not found"))
}

testData := map[string]bool{
remoteList[0].ID: true,
"-99999999": false,
Expand Down

0 comments on commit 349763f

Please sign in to comment.