Fix types in tests.

This commit is contained in:
Mariano Cano 2019-03-07 15:58:56 -08:00
parent a97ea87caa
commit b07fe546fd
2 changed files with 4 additions and 3 deletions

View file

@ -20,6 +20,7 @@ import (
"github.com/smallstep/assert" "github.com/smallstep/assert"
"github.com/smallstep/certificates/api" "github.com/smallstep/certificates/api"
"github.com/smallstep/certificates/authority" "github.com/smallstep/certificates/authority"
"github.com/smallstep/certificates/authority/provisioner"
"github.com/smallstep/cli/crypto/keys" "github.com/smallstep/cli/crypto/keys"
"github.com/smallstep/cli/crypto/pemutil" "github.com/smallstep/cli/crypto/pemutil"
"github.com/smallstep/cli/crypto/randutil" "github.com/smallstep/cli/crypto/randutil"
@ -389,7 +390,7 @@ func TestCAProvisionerEncryptedKey(t *testing.T) {
} }
}, },
"ok": func(t *testing.T) *ekt { "ok": func(t *testing.T) *ekt {
p := config.AuthorityConfig.Provisioners[2] p := config.AuthorityConfig.Provisioners[2].(*provisioner.JWK)
return &ekt{ return &ekt{
ca: ca, ca: ca,
kid: p.Key.KeyID, kid: p.Key.KeyID,

View file

@ -14,7 +14,7 @@ import (
"time" "time"
"github.com/smallstep/certificates/api" "github.com/smallstep/certificates/api"
"github.com/smallstep/certificates/authority" "github.com/smallstep/certificates/authority/provisioner"
) )
const ( const (
@ -391,7 +391,7 @@ func TestClient_Renew(t *testing.T) {
func TestClient_Provisioners(t *testing.T) { func TestClient_Provisioners(t *testing.T) {
ok := &api.ProvisionersResponse{ ok := &api.ProvisionersResponse{
Provisioners: []*authority.Provisioner{}, Provisioners: provisioner.List{},
} }
internalServerError := api.InternalServerError(fmt.Errorf("Internal Server Error")) internalServerError := api.InternalServerError(fmt.Errorf("Internal Server Error"))