MCPcopy Create free account
hub / github.com/0xUnixIO/pulse / TestSignCSR_InvalidPEM

Function TestSignCSR_InvalidPEM

internal/cert/ca_test.go:141–150  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

139}
140
141func 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
152func TestSignCSR_BadSignature(t *testing.T) {
153 dir := t.TempDir()

Callers

nothing calls this directly

Calls 2

LoadOrCreateNodeCAFunction · 0.85
SignCSRMethod · 0.80

Tested by

no test coverage detected