cerman updated
This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
||||
"certmanager/internal/config"
|
||||
"certmanager/internal/database"
|
||||
"certmanager/internal/descriptor"
|
||||
"certmanager/pkg/auxid"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
yaml "gopkg.in/yaml.v3"
|
||||
@@ -29,13 +30,15 @@ func XXTestDatabaseIssuer(t *testing.T) {
|
||||
|
||||
ctx, _ := context.WithTimeout(context.Background(), 1*time.Second)
|
||||
|
||||
issuerID := auxid.GenID()
|
||||
issuer := &descriptor.Issuer{
|
||||
ID: issuerID,
|
||||
Name: "foo.bar",
|
||||
Cert: "ASDFF",
|
||||
Key: "QWERT",
|
||||
Revoked: true,
|
||||
}
|
||||
issuerID, err := db.InsertIssuer(ctx, issuer)
|
||||
err = db.InsertIssuer(ctx, issuer)
|
||||
require.NoError(t, err)
|
||||
fmt.Printf("issuerId: %d\n", issuerID)
|
||||
|
||||
@@ -80,14 +83,16 @@ func XXXTestDatabaseService(t *testing.T) {
|
||||
|
||||
ctx, _ := context.WithTimeout(context.Background(), 1*time.Second)
|
||||
|
||||
serviceID := auxid.GenID()
|
||||
service := &descriptor.Service{
|
||||
ID: serviceID,
|
||||
Name: "foo.bar",
|
||||
IssuerID: 123456,
|
||||
Cert: "ASDFF",
|
||||
Key: "QWERT",
|
||||
Revoked: true,
|
||||
}
|
||||
serviceID, err := db.InsertService(ctx, service)
|
||||
err = db.InsertService(ctx, service)
|
||||
require.NoError(t, err)
|
||||
fmt.Printf("serviceId: %d\n", serviceID)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user