(t *testing.T)
| 109 | } |
| 110 | |
| 111 | func TestEnrollTokenNotFound(t *testing.T) { |
| 112 | ca := newTestCA(t) |
| 113 | store := enrolltokens.NewMemoryStore() |
| 114 | mux := http.NewServeMux() |
| 115 | RegisterEnrollEndpoint(mux, ca, store, "https://x") |
| 116 | |
| 117 | w := doEnroll(t, mux, enrollRequest{NodeID: "n", CSRPem: newTestCSR(t, "n"), Token: "missing"}) |
| 118 | if w.Code != http.StatusUnauthorized { |
| 119 | t.Fatalf("status=%d", w.Code) |
| 120 | } |
| 121 | } |
| 122 | |
| 123 | func TestEnrollTokenAlreadyConsumed(t *testing.T) { |
| 124 | ca := newTestCA(t) |
nothing calls this directly
no test coverage detected