(t *testing.T)
| 139 | } |
| 140 | |
| 141 | func TestSignCSR_InvalidPEM(t *testing.T) { |
| 142 | dir := t.TempDir() |
| 143 | ca, err := LoadOrCreateNodeCA(filepath.Join(dir, "c.pem"), filepath.Join(dir, "k.pem")) |
| 144 | if err != nil { |
| 145 | t.Fatalf("create CA: %v", err) |
| 146 | } |
| 147 | if _, err := ca.SignCSR([]byte("not a pem"), "node-1", time.Hour); err == nil { |
| 148 | t.Fatalf("expected error for bad PEM") |
| 149 | } |
| 150 | } |
| 151 | |
| 152 | func TestSignCSR_BadSignature(t *testing.T) { |
| 153 | dir := t.TempDir() |
nothing calls this directly
no test coverage detected