Skip to content

Commit 62cb8fe

Browse files
committed
feat: add TrustlessGatewayCAROptional
1 parent f133e5b commit 62cb8fe

File tree

2 files changed

+18
-17
lines changed

2 files changed

+18
-17
lines changed

tests/trustless_gateway_car_test.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -788,8 +788,7 @@ func TestTrustlessCarOrderAndDuplicates(t *testing.T) {
788788
},
789789
}
790790

791-
// TODO: add sub-specification for these tests.
792-
RunWithSpecs(t, tests, specs.TrustlessGatewayCAR)
791+
RunWithSpecs(t, tests, specs.TrustlessGatewayCAROptional)
793792
}
794793

795794
func flattenStrings(t *testing.T, values ...interface{}) []string {

tooling/specs/specs.go

+17-15
Original file line numberDiff line numberDiff line change
@@ -105,27 +105,29 @@ func (c Collection) Disable() {
105105
}
106106

107107
var (
108-
TrustlessGatewayRaw = Leaf{"trustless-block-gateway", stable}
109-
TrustlessGatewayCAR = Leaf{"trustless-car-gateway", stable}
110-
TrustlessGatewayIPNS = Leaf{"trustless-ipns-gateway", stable}
111-
TrustlessGateway = Collection{"trustless-gateway", []Spec{TrustlessGatewayRaw, TrustlessGatewayCAR, TrustlessGatewayIPNS}}
112-
PathGatewayUnixFS = Leaf{"path-unixfs-gateway", stable}
113-
PathGatewayIPNS = Leaf{"path-ipns-gateway", stable}
114-
PathGatewayTAR = Leaf{"path-tar-gateway", stable}
115-
PathGatewayDAG = Leaf{"path-dag-gateway", stable}
116-
PathGatewayRaw = Leaf{"path-raw-gateway", stable}
117-
PathGateway = Collection{"path-gateway", []Spec{PathGatewayUnixFS, PathGatewayIPNS, PathGatewayTAR, PathGatewayDAG, PathGatewayRaw}}
118-
SubdomainGatewayIPFS = Leaf{"subdomain-ipfs-gateway", stable}
119-
SubdomainGatewayIPNS = Leaf{"subdomain-ipns-gateway", stable}
120-
SubdomainGateway = Collection{"subdomain-gateway", []Spec{SubdomainGatewayIPFS, SubdomainGatewayIPNS}}
121-
DNSLinkGateway = Leaf{"dnslink-gateway", stable}
122-
RedirectsFile = Leaf{"redirects-file", stable}
108+
TrustlessGatewayRaw = Leaf{"trustless-block-gateway", stable}
109+
TrustlessGatewayCAR = Leaf{"trustless-car-gateway", stable}
110+
TrustlessGatewayCAROptional = Leaf{"trustless-car-gateway-optional", stable}
111+
TrustlessGatewayIPNS = Leaf{"trustless-ipns-gateway", stable}
112+
TrustlessGateway = Collection{"trustless-gateway", []Spec{TrustlessGatewayRaw, TrustlessGatewayCAR, TrustlessGatewayCAROptional, TrustlessGatewayIPNS}}
113+
PathGatewayUnixFS = Leaf{"path-unixfs-gateway", stable}
114+
PathGatewayIPNS = Leaf{"path-ipns-gateway", stable}
115+
PathGatewayTAR = Leaf{"path-tar-gateway", stable}
116+
PathGatewayDAG = Leaf{"path-dag-gateway", stable}
117+
PathGatewayRaw = Leaf{"path-raw-gateway", stable}
118+
PathGateway = Collection{"path-gateway", []Spec{PathGatewayUnixFS, PathGatewayIPNS, PathGatewayTAR, PathGatewayDAG, PathGatewayRaw}}
119+
SubdomainGatewayIPFS = Leaf{"subdomain-ipfs-gateway", stable}
120+
SubdomainGatewayIPNS = Leaf{"subdomain-ipns-gateway", stable}
121+
SubdomainGateway = Collection{"subdomain-gateway", []Spec{SubdomainGatewayIPFS, SubdomainGatewayIPNS}}
122+
DNSLinkGateway = Leaf{"dnslink-gateway", stable}
123+
RedirectsFile = Leaf{"redirects-file", stable}
123124
)
124125

125126
// All specs MUST be listed here.
126127
var specs = []Spec{
127128
TrustlessGatewayRaw,
128129
TrustlessGatewayCAR,
130+
TrustlessGatewayCAROptional,
129131
TrustlessGatewayIPNS,
130132
TrustlessGateway,
131133
PathGatewayUnixFS,

0 commit comments

Comments
 (0)