MCPcopy
hub / github.com/puma/puma-dev / generateLivePumaDevCertIfNotExist

Function generateLivePumaDevCertIfNotExist

dev/setup_darwin_test.go:104–116  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

102}
103
104func generateLivePumaDevCertIfNotExist(t *testing.T) {
105 liveSupportPath := homedir.MustExpand(SupportDir)
106 liveCertPath := filepath.Join(liveSupportPath, "cert.pem")
107 liveKeyPath := filepath.Join(liveSupportPath, "key.pem")
108
109 if !FileExists(liveCertPath) || !FileExists(liveKeyPath) {
110 MakeDirectoryOrFail(t, liveSupportPath)
111
112 if err := GeneratePumaDevCertificateAuthority(liveCertPath, liveKeyPath); err != nil {
113 assert.FailNow(t, err.Error())
114 }
115 }
116}

Callers 1

installIntoTestContextFunction · 0.70

Calls 4

MustExpandFunction · 0.92
FileExistsFunction · 0.85
MakeDirectoryOrFailFunction · 0.85

Tested by

no test coverage detected