24 lines
395 B
Go
24 lines
395 B
Go
package fastlyxff
|
|
|
|
import "testing"
|
|
|
|
func TestFastlyIPRanges(t *testing.T) {
|
|
|
|
fastlyxff, err := New("fastly.json")
|
|
if err != nil {
|
|
t.Fatalf("could not load test data: %s", err)
|
|
}
|
|
|
|
data, err := fastlyxff.EchoTrustOption()
|
|
|
|
if err != nil {
|
|
t.Fatalf("could not parse test data: %s", err)
|
|
}
|
|
|
|
if len(data) < 10 {
|
|
t.Logf("only got %d prefixes, expected more", len(data))
|
|
t.Fail()
|
|
}
|
|
|
|
}
|