Skip to content

Commit

Permalink
fix: peeringdb url
Browse files Browse the repository at this point in the history
  • Loading branch information
natesales committed Jun 11, 2023
1 parent 5c2e738 commit f4624d0
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 11 deletions.
13 changes: 2 additions & 11 deletions pkg/peeringdb/peeringdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package peeringdb
import (
"encoding/json"
"errors"
"flag"
"fmt"
"io"
"net/http"
Expand All @@ -17,16 +16,8 @@ import (
"github.com/natesales/pathvector/pkg/irr"
)

func endpoint() string {
if flag.Lookup("test.v") == nil {
return "https://www.peeringdb.com/api"
} else {
return "http://localhost:5000/api"
}
}

// Endpoint is a public value to allow overwriting to a cache server
var Endpoint = endpoint()
// Endpoint is a public value to allow setting to a cache server
var Endpoint = ""

type IxLanResponse struct {
Data []IxLanData `json:"data"`
Expand Down
1 change: 1 addition & 0 deletions tests/generate-complex.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ prefixes:
web-ui-file: test-cache/ui.html
cache-directory: test-cache
blackhole-bogon-asns: true
peeringdb-url: http://localhost:5000/api

origin-communities:
- 34553:10
Expand Down
1 change: 1 addition & 0 deletions tests/generate-simple.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ prefixes:
- 2001:db8::/48
web-ui-file: test-cache/ui.html
cache-directory: test-cache
peeringdb-url: http://localhost:5000/api

peers:
Example:
Expand Down
1 change: 1 addition & 0 deletions tests/probe-simple.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ prefixes:
- 192.0.2.0/24
- 2001:db8::/48
cache-directory: test-cache
peeringdb-url: http://localhost:5000/api

optimizer:
probe-udp: true
Expand Down

0 comments on commit f4624d0

Please sign in to comment.