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

Function newTestCA

internal/serverapi/enroll_test.go:24–32  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

22)
23
24func newTestCA(t *testing.T) *cert.NodeCA {
25 t.Helper()
26 dir := t.TempDir()
27 ca, err := cert.LoadOrCreateNodeCA(filepath.Join(dir, "ca.pem"), filepath.Join(dir, "ca.key"))
28 if err != nil {
29 t.Fatalf("create test CA: %v", err)
30 }
31 return ca
32}
33
34func newTestCSR(t *testing.T, cn string) string {
35 t.Helper()

Callers 7

TestEnrollSuccessFunction · 0.70
TestEnrollTokenNotFoundFunction · 0.70
TestEnrollTokenExpiredFunction · 0.70
TestEnrollNodeIDMismatchFunction · 0.70
TestEnrollInvalidCSRFunction · 0.70
TestEnrollMissingFieldsFunction · 0.70

Calls 1

LoadOrCreateNodeCAFunction · 0.92

Tested by

no test coverage detected