(t *testing.T)
| 200 | } |
| 201 | |
| 202 | func TestIDFromCert(t *testing.T) { |
| 203 | cert := loadX509Cert(t, testdata.Path("x509/spiffe_cert.pem")) |
| 204 | uri, err := idFromCert(cert) |
| 205 | if err != nil { |
| 206 | t.Fatalf("idFromCert() failed with err: %v", err) |
| 207 | } |
| 208 | if uri != nil && uri.String() != wantURI { |
| 209 | t.Fatalf("ID not expected, got %s, want %s", uri.String(), wantURI) |
| 210 | } |
| 211 | } |
| 212 | |
| 213 | func TestIDFromCertFileFailures(t *testing.T) { |
| 214 | certWithNoURIs := loadX509Cert(t, testdata.Path("spiffe/client_spiffe.pem")) |
nothing calls this directly
no test coverage detected