testSigner returns the signer, as well as its armored public key, from pkg/jsonsign/testdata/test-secring.gpg
()
| 126 | // testSigner returns the signer, as well as its armored public key, from |
| 127 | // pkg/jsonsign/testdata/test-secring.gpg |
| 128 | func testSigner() *schema.Signer { |
| 129 | srcRoot, err := osutil.PkSourceRoot() |
| 130 | if err != nil { |
| 131 | panic(fmt.Sprintf("source root folder not found: %v", err)) |
| 132 | } |
| 133 | ent, err := jsonsign.EntityFromSecring(indextest.KeyID, filepath.Join(srcRoot, "pkg", "jsonsign", "testdata", "test-secring.gpg")) |
| 134 | if err != nil { |
| 135 | panic(err) |
| 136 | } |
| 137 | sig, err := schema.NewSigner(owner.BlobRef(), strings.NewReader(ownerRef.Contents), ent) |
| 138 | if err != nil { |
| 139 | panic(err) |
| 140 | } |
| 141 | return sig |
| 142 | } |
| 143 | |
| 144 | // fetcherIndex groups addBlob, addClaim, and addPermanode, that are all methods |
| 145 | // to write both to the Fetcher and the Index. |
no test coverage detected