(t *testing.T, ver version.Version)
| 35 | } |
| 36 | |
| 37 | func createTestBundle(t *testing.T, ver version.Version) *Bundle { |
| 38 | bundle := &Bundle{ |
| 39 | Version: ver, |
| 40 | Exchanges: []*Exchange{ |
| 41 | &Exchange{ |
| 42 | Request{ |
| 43 | URL: urlMustParse("https://bundle.example.com/"), |
| 44 | }, |
| 45 | Response{ |
| 46 | Status: 200, |
| 47 | Header: http.Header{"Content-Type": []string{"text/html"}}, |
| 48 | Body: []byte("hello, world!"), |
| 49 | }, |
| 50 | }, |
| 51 | }, |
| 52 | Signatures: &Signatures{ |
| 53 | Authorities: createTestCerts(t), |
| 54 | VouchedSubsets: []*VouchedSubset{ |
| 55 | &VouchedSubset{Authority: 0, Sig: []byte("sig"), Signed: []byte("sig")}, |
| 56 | }, |
| 57 | }, |
| 58 | } |
| 59 | bundle.PrimaryURL = urlMustParse("https://bundle.example.com/") |
| 60 | return bundle |
| 61 | } |
| 62 | |
| 63 | func createTestBundleWithVariants(ver version.Version) *Bundle { |
| 64 | primaryURL := urlMustParse("https://variants.example.com/") |
no test coverage detected