change selfsigned cert to work with firefox
All checks were successful
Build DBM Service / build (amd64, , linux) (push) Successful in 2m2s
Build DBM Service / build (amd64, .exe, windows) (push) Successful in 1m52s
Build DBM Service / build (arm, 6, , linux) (push) Successful in 1m57s
Build DBM Service / build (arm64, , linux) (push) Successful in 1m52s
All checks were successful
Build DBM Service / build (amd64, , linux) (push) Successful in 2m2s
Build DBM Service / build (amd64, .exe, windows) (push) Successful in 1m52s
Build DBM Service / build (arm, 6, , linux) (push) Successful in 1m57s
Build DBM Service / build (arm64, , linux) (push) Successful in 1m52s
This commit is contained in:
@@ -3,6 +3,7 @@ package test
|
||||
import (
|
||||
"fmt"
|
||||
"math/rand"
|
||||
"os"
|
||||
"runtime"
|
||||
"testing"
|
||||
"time"
|
||||
@@ -146,3 +147,30 @@ func TestServer(t *testing.T) {
|
||||
|
||||
t.Fatal(server.ServeHttp("http://localhost", 8100))
|
||||
}
|
||||
|
||||
func TestCreateCerts(t *testing.T) {
|
||||
certFile := "cert.pem"
|
||||
keyFile := "key.pem"
|
||||
|
||||
defer func() {
|
||||
err := os.Remove(certFile)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
err = os.Remove(keyFile)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}()
|
||||
|
||||
t.Log("test create certificates")
|
||||
cert := cert.Cert{
|
||||
Organization: "tecamino",
|
||||
CertFile: certFile,
|
||||
KeyFile: keyFile,
|
||||
}
|
||||
|
||||
if err := cert.GenerateSelfSignedCert(); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user