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

Function TestLoadOrCreateNodeCA_PartialFilesError

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

Source from the content-addressed store, hash-verified

68}
69
70func TestLoadOrCreateNodeCA_PartialFilesError(t *testing.T) {
71 dir := t.TempDir()
72 certPath := filepath.Join(dir, "node_ca_cert.pem")
73 keyPath := filepath.Join(dir, "node_ca_key.pem")
74
75 if _, err := LoadOrCreateNodeCA(certPath, keyPath); err != nil {
76 t.Fatalf("create: %v", err)
77 }
78 // remove cert only
79 if err := os.Remove(certPath); err != nil {
80 t.Fatalf("remove: %v", err)
81 }
82 if _, err := LoadOrCreateNodeCA(certPath, keyPath); err == nil {
83 t.Fatalf("expected error when only key exists")
84 }
85}
86
87func TestSignCSR_Success(t *testing.T) {
88 dir := t.TempDir()

Callers

nothing calls this directly

Calls 1

LoadOrCreateNodeCAFunction · 0.85

Tested by

no test coverage detected