Documentation
¶
Overview ¶
Package parity holds upstream-ported fixture data for the Phase 72 parity regression test suite.
Fixtures are ported verbatim from peeringdb/peeringdb's src/peeringdb_server/management/commands/pdb_api_test.py via cmd/pdb-fixture-port. The upstream commit SHA and the sha256 of the ported file live in fixtures.go's header; cmd/pdb-fixture-port --check recomputes the hash against a live upstream fetch to detect drift (advisory only per Phase 72 D-03 — no PR merge gate).
Regeneration:
go generate ./internal/testutil/parity
Per Phase 72 D-02, this package is DELIBERATELY ISOLATED from internal/testutil/seed. Parity tests must not cross-contaminate with the seed.Full fixture set — a parity failure should be attributable to a behavioural regression against upstream, not to an incidental seed.Full row the consumer accidentally picked up.
Consumer pattern (Plans 72-02 through 72-06):
client := testutil.SetupClient(t)
for _, fx := range parity.OrderingFixtures {
// create ent rows from fx.Entity + fx.Fields …
}
Index ¶
Constants ¶
This section is empty.
Variables ¶
var InFixtures = []Fixture{}/* 5002 elements not displayed */
synthesised per Plan 72-03: covers IN-01 large-list boundary + IN-02 empty-__in sentinel at upstream rest.py:IN-01-json_each InFixtures is the ported set for the In category.
var LimitFixtures = []Fixture{}/* 270 elements not displayed */
synthesised per Plan 72-02 D-02: covers LIMIT-01 unlimited boundary at upstream rest.py:494-497 LimitFixtures is the ported set for the Limit category.
var OrderingFixtures = []Fixture{ { Entity: "fac", ID: 13659, Fields: map[string]string{ "created": "\"2024-02-21T18:00:00Z\"", "status": "\"ok\", **fac_data_with_diverse", "updated": "\"2024-02-22T18:00:00Z\"", }, Upstream: "pdb_api_test.py:1242", }, { Entity: "fac", ID: 14626, Fields: map[string]string{ "created": "\"2024-02-21T23:00:00Z\"", "status": "\"ok\", **fac_data_without_diverse", "updated": "\"2024-02-22T23:00:00Z\"", }, Upstream: "pdb_api_test.py:1247", }, { Entity: "ix", ID: 16398, Fields: map[string]string{ "created": "\"2024-03-02T15:00:00Z\"", "status": "\"ok\", **self.make_data_ix(country=\"LI\", name=\"Test IX Liechtenstein\")", "updated": "\"2024-03-03T15:00:00Z\"", }, Upstream: "pdb_api_test.py:1479", }, { Entity: "ix", ID: 17420, Fields: map[string]string{ "created": "\"2024-03-02T18:00:00Z\"", "status": "\"ok\", **self.make_data_ix(country=\"BE\", name=\"Test IX Belgium\")", "updated": "\"2024-03-03T18:00:00Z\"", }, Upstream: "pdb_api_test.py:1482", }, { Entity: "ix", ID: 17964, Fields: map[string]string{ "created": "\"2024-03-02T21:00:00Z\"", "status": "\"ok\", **self.make_data_ix(country=\"BO\", name=\"Test IX Bolivia\")", "updated": "\"2024-03-03T21:00:00Z\"", }, Upstream: "pdb_api_test.py:1485", }, { Entity: "ixpfx", ID: 17887, Fields: map[string]string{ "created": "\"2024-05-13T11:00:00Z\"", "ixlan": "SHARED[\"ixlan_r_ok\"], prefix=\"205.127.237.0/24\", protocol=\"IPv4\"", "updated": "\"2024-05-14T11:00:00Z\"", }, Upstream: "pdb_api_test.py:3203", }, { Entity: "ixpfx", ID: 18779, Fields: map[string]string{ "created": "\"2024-05-18T05:00:00Z\"", "ixlan": "SHARED[\"ixlan_rw_ok\"]", "prefix": "\"203.0.113.0/24\"", "protocol": "\"IPv4\"", "status": "\"ok\"", "updated": "\"2024-05-19T05:00:00Z\"", }, Upstream: "pdb_api_test.py:3317", }, { Entity: "ixpfx", ID: 18789, Fields: map[string]string{ "created": "\"2024-05-14T13:00:00Z\"", "ixlan": "SHARED[\"ixlan_rw_ok\"]", "prefix": "\"203.0.113.0/24\"", "protocol": "\"IPv4\"", "status": "\"ok\"", "updated": "\"2024-05-15T13:00:00Z\"", }, Upstream: "pdb_api_test.py:3229", }, { Entity: "ixpfx", ID: 20590, Fields: map[string]string{ "created": "\"2024-05-16T11:00:00Z\"", "ixlan": "SHARED[\"ixlan_rw_ok\"]", "prefix": "\"206.126.236.0/24\"", "protocol": "\"IPv4\"", "status": "\"ok\"", "updated": "\"2024-05-17T11:00:00Z\"", }, Upstream: "pdb_api_test.py:3275", }, { Entity: "net", ID: 21203, Fields: map[string]string{ "created": "\"2024-03-07T20:00:00Z\"", "name": "\"Unprotected Network\", asn=90009000, org=net.org, status=\"ok\"", "updated": "\"2024-03-08T20:00:00Z\"", }, Upstream: "pdb_api_test.py:1604", }, { Entity: "netixlan", ID: 20377, Fields: map[string]string{ "asn": "SHARED[\"net_rw_ok\"].asn", "created": "\"2024-05-14T20:00:00Z\"", "ipaddr4": "\"203.0.113.10\"", "ixlan": "SHARED[\"ixlan_rw_ok\"]", "network": "SHARED[\"net_rw_ok\"]", "speed": "1000", "status": "\"ok\"", "updated": "\"2024-05-15T20:00:00Z\"", }, Upstream: "pdb_api_test.py:3236", }, { Entity: "netixlan", ID: 23396, Fields: map[string]string{ "asn": "SHARED[\"net_rw_ok\"].asn", "created": "\"2024-05-16T18:00:00Z\"", "ipaddr4": "\"206.126.236.10\"", "ixlan": "SHARED[\"ixlan_rw_ok\"]", "network": "SHARED[\"net_rw_ok\"]", "speed": "1000", "status": "\"ok\"", "updated": "\"2024-05-17T18:00:00Z\"", }, Upstream: "pdb_api_test.py:3282", }, }
OrderingFixtures is the ported set for the Ordering category.
var StatusFixtures = []Fixture{ { Entity: "campus", ID: 18000, Fields: map[string]string{ "name": "\"Synth-campus-CarveOut\"", "status": "\"pending\"", }, Upstream: "pdb_api_test.py:3965", }, { Entity: "carrierfac", ID: 20004, Fields: map[string]string{ "name": "\"Synth-carrierfac-AttrAssign\"", "status": "\"pending\"", }, Upstream: "pdb_api_test.py:1211", }, { Entity: "fac", ID: 13237, Fields: map[string]string{ "status": "\"ok\"", }, Upstream: "pdb_api_test.py:1317", }, { Entity: "fac", ID: 13586, Fields: map[string]string{ "status": "\"ok\"", }, Upstream: "pdb_api_test.py:2478", }, { Entity: "fac", ID: 13659, Fields: map[string]string{ "status": "\"ok\"", }, Upstream: "pdb_api_test.py:1242", }, { Entity: "fac", ID: 14400, Fields: map[string]string{ "name": "\"fac unaccented\"", "org": "org", "status": "\"ok\"", }, Upstream: "pdb_api_test.py:5133", }, { Entity: "fac", ID: 14626, Fields: map[string]string{ "status": "\"ok\"", }, Upstream: "pdb_api_test.py:1247", }, { Entity: "fac", ID: 14634, Fields: map[string]string{ "status": "\"ok\"", }, Upstream: "pdb_api_test.py:1341", }, { Entity: "fac", ID: 15205, Fields: map[string]string{ "status": "\"ok\"", }, Upstream: "pdb_api_test.py:1363", }, { Entity: "fac", ID: 15344, Fields: map[string]string{ "status": "\"ok\"", }, Upstream: "pdb_api_test.py:2487", }, { Entity: "fac", ID: 15735, Fields: map[string]string{ "name": "\"Facility Issue 901\"", "org": "org", "status": "\"ok\"", }, Upstream: "pdb_api_test.py:3644", }, { Entity: "fac", ID: 16324, Fields: map[string]string{ "status": "\"ok\"", }, Upstream: "pdb_api_test.py:1280", }, { Entity: "fac", ID: 16702, Fields: map[string]string{ "status": "\"ok\"", }, Upstream: "pdb_api_test.py:4932", }, { Entity: "ix", ID: 15346, Fields: map[string]string{ "status": "\"ok\"", }, Upstream: "pdb_api_test.py:4420", }, { Entity: "ix", ID: 16398, Fields: map[string]string{ "status": "\"ok\"", }, Upstream: "pdb_api_test.py:1479", }, { Entity: "ix", ID: 17400, Fields: map[string]string{ "name": "\"ix unaccented\"", "org": "org", "status": "\"ok\"", }, Upstream: "pdb_api_test.py:5132", }, { Entity: "ix", ID: 17420, Fields: map[string]string{ "status": "\"ok\"", }, Upstream: "pdb_api_test.py:1482", }, { Entity: "ix", ID: 17964, Fields: map[string]string{ "status": "\"ok\"", }, Upstream: "pdb_api_test.py:1485", }, { Entity: "ixfac", ID: 23003, Fields: map[string]string{ "name": "\"Synth-ixfac-AttrAssign\"", "status": "\"pending\"", }, Upstream: "pdb_api_test.py:1201", }, { Entity: "ixpfx", ID: 18779, Fields: map[string]string{ "ixlan": "SHARED[\"ixlan_rw_ok\"]", "prefix": "\"203.0.113.0/24\"", "protocol": "\"IPv4\"", "status": "\"ok\"", }, Upstream: "pdb_api_test.py:3317", }, { Entity: "ixpfx", ID: 18789, Fields: map[string]string{ "ixlan": "SHARED[\"ixlan_rw_ok\"]", "prefix": "\"203.0.113.0/24\"", "protocol": "\"IPv4\"", "status": "\"ok\"", }, Upstream: "pdb_api_test.py:3229", }, { Entity: "ixpfx", ID: 20311, Fields: map[string]string{ "ixlan": "ix.ixlan", "prefix": "self.get_prefix4()", "status": "\"ok\"", }, Upstream: "pdb_api_test.py:3684", }, { Entity: "ixpfx", ID: 20590, Fields: map[string]string{ "ixlan": "SHARED[\"ixlan_rw_ok\"]", "prefix": "\"206.126.236.0/24\"", "protocol": "\"IPv4\"", "status": "\"ok\"", }, Upstream: "pdb_api_test.py:3275", }, { Entity: "ixpfx", ID: 20826, Fields: map[string]string{ "ixlan": "ix.ixlan", "prefix": "prefix", "status": "\"ok\"", }, Upstream: "pdb_api_test.py:3723", }, { Entity: "ixpfx", ID: 25005, Fields: map[string]string{ "name": "\"Synth-ixpfx-FilterTarget\"", "status": "\"deleted\"", }, Upstream: "pdb_api_test.py:3260", }, { Entity: "net", ID: 18477, Fields: map[string]string{ "asn": "90009000", "name": "\"Unprotected Network\"", "org": "net.org", "status": "\"ok\"", }, Upstream: "pdb_api_test.py:1604", }, { Entity: "net", ID: 19184, Fields: map[string]string{ "status": "\"ok\"", }, Upstream: "pdb_api_test.py:4926", }, { Entity: "net", ID: 19642, Fields: map[string]string{ "status": "\"ok\"", }, Upstream: "pdb_api_test.py:4414", }, { Entity: "net", ID: 19780, Fields: map[string]string{ "status": "\"ok\"", }, Upstream: "pdb_api_test.py:2758", }, { Entity: "net", ID: 21023, Fields: map[string]string{ "asn": "12345", "name": "\"net unaccented\"", "org": "org", "status": "\"ok\"", }, Upstream: "pdb_api_test.py:5131", }, { Entity: "net", ID: 26001, Fields: map[string]string{ "name": "\"Synth-net-Baseline\"", "status": "\"deleted\"", }, Upstream: "pdb_api_test.py:3952", }, { Entity: "netfac", ID: 20190, Fields: map[string]string{ "facility": "facilities[1]", "network": "net", "status": "\"ok\"", }, Upstream: "pdb_api_test.py:4944", }, { Entity: "netfac", ID: 20460, Fields: map[string]string{ "facility": "facilities[0]", "network": "net", "status": "\"ok\"", }, Upstream: "pdb_api_test.py:4938", }, { Entity: "netfac", ID: 27002, Fields: map[string]string{ "name": "\"Synth-netfac-AttrAssign\"", "status": "\"pending\"", }, Upstream: "pdb_api_test.py:1206", }, { Entity: "netixlan", ID: 20181, Fields: map[string]string{ "asn": "net.asn", "ixlan": "ixlans[1]", "network": "net", "speed": "0", "status": "\"ok\"", }, Upstream: "pdb_api_test.py:4435", }, { Entity: "netixlan", ID: 20377, Fields: map[string]string{ "asn": "SHARED[\"net_rw_ok\"].asn", "ipaddr4": "\"203.0.113.10\"", "ixlan": "SHARED[\"ixlan_rw_ok\"]", "network": "SHARED[\"net_rw_ok\"]", "speed": "1000", "status": "\"ok\"", }, Upstream: "pdb_api_test.py:3236", }, { Entity: "netixlan", ID: 21770, Fields: map[string]string{ "asn": "SHARED[\"net_rw_ok\"].asn", "ipaddr4": "\"203.0.113.250\"", "ixlan": "SHARED[\"ixlan_rw_ok\"]", "network": "SHARED[\"net_rw_ok\"]", "speed": "1000", "status": "\"ok\"", }, Upstream: "pdb_api_test.py:3324", }, { Entity: "netixlan", ID: 22060, Fields: map[string]string{ "asn": "net.asn", "ixlan": "ixlans[0]", "network": "net", "speed": "0", "status": "\"ok\"", }, Upstream: "pdb_api_test.py:4429", }, { Entity: "netixlan", ID: 23396, Fields: map[string]string{ "asn": "SHARED[\"net_rw_ok\"].asn", "ipaddr4": "\"206.126.236.10\"", "ixlan": "SHARED[\"ixlan_rw_ok\"]", "network": "SHARED[\"net_rw_ok\"]", "speed": "1000", "status": "\"ok\"", }, Upstream: "pdb_api_test.py:3282", }, { Entity: "org", ID: 21015, Fields: map[string]string{ "name": "ORG_RW_PENDING", "status": "\"pending\"", }, Upstream: "pdb_api_test.py:6252", }, { Entity: "org", ID: 21318, Fields: map[string]string{ "name": "ORG_RW", "status": "\"ok\"", }, Upstream: "pdb_api_test.py:6234", }, { Entity: "org", ID: 21977, Fields: map[string]string{ "name": "\"Deletable org\"", "status": "\"ok\"", }, Upstream: "pdb_api_test.py:3611", }, { Entity: "org", ID: 22102, Fields: map[string]string{ "id": "settings.SUGGEST_ENTITY_ORG", "name": "\"Suggested Entitites\"", "status": "\"ok\"", }, Upstream: "pdb_api_test.py:6475", }, { Entity: "org", ID: 23732, Fields: map[string]string{ "name": "ORG_R", "status": "\"ok\"", }, Upstream: "pdb_api_test.py:6265", }, { Entity: "org", ID: 23825, Fields: map[string]string{ "status": "\"ok\"", }, Upstream: "pdb_api_test.py:1294", }, { Entity: "org", ID: 25020, Fields: map[string]string{ "name": "\"org unaccented\"", "status": "\"ok\"", }, Upstream: "pdb_api_test.py:5130", }, }
StatusFixtures is the ported set for the Status category.
var TraversalFixtures = []Fixture{ { Entity: "fac", ID: 200005, Fields: map[string]string{ "__fk": "\"org:200001\"", "__hop": "\"1\"", "name": "\"TraversalFac-A\"", "status": "\"ok\"", }, Upstream: "pdb_api_test.py:5081", }, { Entity: "fac", ID: 200006, Fields: map[string]string{ "__fk": "\"org:200001\"", "__hop": "\"1\"", "name": "\"TraversalFac-B\"", "status": "\"ok\"", }, Upstream: "pdb_api_test.py:5081", }, { Entity: "ix", ID: 200007, Fields: map[string]string{ "__fk": "\"org:200001\"", "__hop": "\"1\"", "fac_count": "5", "name": "\"TraversalIX-Root\"", "status": "\"ok\"", }, Upstream: "pdb_api_test.py:5081", }, { Entity: "ix", ID: 200011, Fields: map[string]string{ "__fk": "\"org:200001\"", "__hop": "\"1\"", "fac_count": "0", "name": "\"TraversalIX-FacCount0\"", "status": "\"ok\"", }, Upstream: "pdb_api_test.py:2340", }, { Entity: "ix", ID: 200012, Fields: map[string]string{ "__fk": "\"org:200001\"", "__hop": "\"1\"", "fac_count": "1", "name": "\"TraversalIX-FacCount1\"", "status": "\"ok\"", }, Upstream: "pdb_api_test.py:2340", }, { Entity: "ix", ID: 200013, Fields: map[string]string{ "__fk": "\"org:200001\"", "__hop": "\"1\"", "fac_count": "10", "name": "\"TraversalIX-FacCount10\"", "status": "\"ok\"", }, Upstream: "pdb_api_test.py:2340", }, { Entity: "ixfac", ID: 200009, Fields: map[string]string{ "__fk": "\"ix:200007,fac:200005\"", "__hop": "\"2\"", "status": "\"ok\"", }, Upstream: "pdb_api_test.py:2340", }, { Entity: "ixfac", ID: 200010, Fields: map[string]string{ "__fk": "\"ix:200007,fac:200006\"", "__hop": "\"2\"", "status": "\"ok\"", }, Upstream: "pdb_api_test.py:2340", }, { Entity: "ixlan", ID: 200008, Fields: map[string]string{ "__fk": "\"ix:200007\"", "__hop": "\"2\"", "name": "\"TraversalIxlan-Root\"", "status": "\"ok\"", }, Upstream: "pdb_api_test.py:2340", }, { Entity: "ixlan", ID: 200014, Fields: map[string]string{ "__expected_filter": "\"ixlan__ix__org__name=FOO\"", "__expected_outcome": "\"silent-ignore\"", "__fk": "\"ix:200007\"", "__hop": "\"3\"", "name": "\"TraversalSilentIgnoreProbe\"", "status": "\"ok\"", }, Upstream: "pdb_api_test.py:1", }, { Entity: "net", ID: 200002, Fields: map[string]string{ "__fk": "\"org:200001\"", "__hop": "\"1\"", "asn": "65401", "name": "\"TraversalNet-A\"", "status": "\"ok\"", }, Upstream: "pdb_api_test.py:5081", }, { Entity: "net", ID: 200003, Fields: map[string]string{ "__fk": "\"org:200001\"", "__hop": "\"1\"", "asn": "65402", "name": "\"TraversalNet-B\"", "status": "\"ok\"", }, Upstream: "pdb_api_test.py:5081", }, { Entity: "net", ID: 200004, Fields: map[string]string{ "__fk": "\"org:200001\"", "__hop": "\"1\"", "asn": "65403", "name": "\"TraversalNet-C\"", "status": "\"ok\"", }, Upstream: "pdb_api_test.py:5081", }, { Entity: "org", ID: 200001, Fields: map[string]string{ "__hop": "\"0\"", "name": "\"TraversalOrg-Root\"", "status": "\"ok\"", }, Upstream: "pdb_api_test.py:5081", }, }
synthesised per Plan 72-03: ring topology covers TRAVERSAL-01..04 at upstream pdb_api_test.py:5081 (1-hop) + :2340 (2-hop) TraversalFixtures is the ported set for the Traversal category.
var UnicodeFixtures = []Fixture{}/* 216 elements not displayed */
synthesised per Plan 72-03: covers UNICODE-01/02 fold matrix at upstream rest.py:576 UnicodeFixtures is the ported set for the Unicode category.
Functions ¶
This section is empty.
Types ¶
type Fixture ¶
Fixture is a single ported row from upstream pdb_api_test.py.
Entity is the PeeringDB type namespace ("net", "org", "ix", ...). ID is a deterministic synthesised identifier — upstream Django fixtures auto-allocate pks, so the tool derives a stable value from the upstream source location. Cross-run stability is the contract, not collision with upstream database ids. Fields holds the upstream keyword arguments verbatim (string form), so consumers that need typed values can re-parse per-column. Upstream carries the "pdb_api_test.py:<line>" citation.