Skip to content

Commit

Permalink
fix: match test
Browse files Browse the repository at this point in the history
  • Loading branch information
natesales committed Dec 21, 2022
1 parent d547b20 commit 0c5db21
Show file tree
Hide file tree
Showing 3 changed files with 173 additions and 3 deletions.
4 changes: 2 additions & 2 deletions cmd/match_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ func TestMatch(t *testing.T) {
asnA uint
asnB uint
}{
{34553, 13335},
{54113, 13335},
{34553, 112},
{112, 44977},
}
for _, tc := range testCases {
rootCmd.SetArgs(append(baseArgs, []string{
Expand Down
2 changes: 1 addition & 1 deletion pkg/match/match_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ package match
import "testing"

func TestCommonIXs(t *testing.T) {
CommonIXs(34553, 13335, false, 10, "")
CommonIXs(34553, 112, false, 10, "")
}
170 changes: 170 additions & 0 deletions tests/peeringdb/netixlan.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,176 @@
"speed": 10000,
"status": "ok",
"updated": "2021-08-01T05:20:55Z"
},
{
"id": 16465,
"net_id": 21511,
"ix_id": 165,
"name": "NWAX: Primary Peering VLAN",
"ixlan_id": 165,
"notes": "",
"speed": 1000,
"asn": 34553,
"ipaddr4": "198.32.195.28",
"ipaddr6": "2620:124:2000::28",
"is_rs_peer": true,
"operational": true,
"created": "2013-12-19T00:00:00Z",
"updated": "2021-03-06T03:04:47Z",
"status": "ok"
},
{
"id": 57950,
"net_id": 21511,
"ix_id": 2163,
"name": "FCIX",
"ixlan_id": 2163,
"notes": "",
"speed": 10000,
"asn": 34553,
"ipaddr4": "206.80.238.77",
"ipaddr6": "2001:504:91::77",
"is_rs_peer": true,
"operational": true,
"created": "2020-05-14T20:23:15Z",
"updated": "2020-05-25T22:40:28Z",
"status": "ok"
},
{
"id": 58213,
"net_id": 21511,
"ix_id": 2741,
"name": "QCIX: Main",
"ixlan_id": 2741,
"notes": "",
"speed": 1000,
"asn": 34553,
"ipaddr4": "206.83.43.27",
"ipaddr6": "2001:504:9b::27",
"is_rs_peer": true,
"operational": true,
"created": "2020-05-27T15:55:22Z",
"updated": "2020-05-27T16:44:09Z",
"status": "ok"
},
{
"id": 58223,
"net_id": 21511,
"ix_id": 2452,
"name": "UNM-Exch Canada-West: Main",
"ixlan_id": 2452,
"notes": "",
"speed": 10000,
"asn": 34553,
"ipaddr4": "192.34.27.18",
"ipaddr6": "2602:ffb1:200:0:192:34:27:18",
"is_rs_peer": true,
"operational": true,
"created": "2020-05-27T23:26:56Z",
"updated": "2020-05-29T00:38:16Z",
"status": "ok"
},
{
"id": 58368,
"net_id": 21511,
"ix_id": 249,
"name": "KCIX",
"ixlan_id": 249,
"notes": "",
"speed": 1000,
"asn": 34553,
"ipaddr4": "206.51.7.39",
"ipaddr6": "2001:504:1b:1::39",
"is_rs_peer": true,
"operational": true,
"created": "2020-06-03T17:34:53Z",
"updated": "2021-10-19T01:22:38Z",
"status": "ok"
},
{
"id": 58376,
"net_id": 21511,
"ix_id": 13,
"name": "SIX Seattle: MTU 1500",
"ixlan_id": 13,
"notes": "",
"speed": 1000,
"asn": 34553,
"ipaddr4": "206.81.80.97",
"ipaddr6": "2001:504:16::86f9",
"is_rs_peer": true,
"operational": true,
"created": "2020-06-03T18:06:49Z",
"updated": "2020-06-03T18:06:49Z",
"status": "ok"
},
{
"id": 58420,
"net_id": 21511,
"ix_id": 2783,
"name": "Gig IX Ashburn: Peering",
"ixlan_id": 2783,
"notes": "",
"speed": 1000,
"asn": 34553,
"ipaddr4": "206.83.8.199",
"ipaddr6": "2602:fed2:ff1::199",
"is_rs_peer": true,
"operational": true,
"created": "2020-06-05T04:34:49Z",
"updated": "2020-06-05T04:34:49Z",
"status": "ok"
},
{
"id": 58435,
"net_id": 21511,
"ix_id": 1285,
"name": "SIX Seattle (Jumbo): MTU 9000",
"ixlan_id": 1285,
"notes": "",
"speed": 1000,
"asn": 34553,
"ipaddr4": "206.81.82.97",
"ipaddr6": "2001:504:16:1::86f9",
"is_rs_peer": true,
"operational": true,
"created": "2020-06-05T17:12:22Z",
"updated": "2020-06-05T18:21:48Z",
"status": "ok"
},
{
"id": 60114,
"net_id": 21511,
"ix_id": 3069,
"name": "ARIX: Primary",
"ixlan_id": 3069,
"notes": "",
"speed": 40000,
"asn": 34553,
"ipaddr4": "44.190.42.3",
"ipaddr6": "2602:801:30ff::3",
"is_rs_peer": true,
"operational": true,
"created": "2020-08-10T19:27:56Z",
"updated": "2022-06-29T08:50:20Z",
"status": "ok"
},
{
"id": 60450,
"net_id": 21511,
"ix_id": 3157,
"name": "FSIX",
"ixlan_id": 3157,
"notes": "",
"speed": 1000,
"asn": 34553,
"ipaddr4": "185.1.174.15",
"ipaddr6": "2001:7f8:f7:0:185:1:174:15",
"is_rs_peer": true,
"operational": true,
"created": "2020-08-20T23:14:46Z",
"updated": "2020-08-20T23:14:46Z",
"status": "ok"
}
],
"meta": {}
Expand Down

0 comments on commit 0c5db21

Please sign in to comment.