Move renewer to internal package so tests don't barf

This commit is contained in:
Jeff Mitchell 2019-09-09 16:09:53 -04:00
parent 00982988bb
commit f843c09dd1
3 changed files with 6 additions and 6 deletions

View File

@ -1,4 +1,4 @@
package agent
package agentint
import (
"errors"

View File

@ -7,7 +7,7 @@ import (
hclog "github.com/hashicorp/go-hclog"
"github.com/hashicorp/vault/api"
"github.com/hashicorp/vault/command/agent"
"github.com/hashicorp/vault/command/agent/agentint"
"github.com/hashicorp/vault/sdk/helper/jsonutil"
)
@ -100,7 +100,7 @@ func (ah *AuthHandler) Run(ctx context.Context, am AuthMethod) {
credCh = make(chan struct{})
}
var renewer *agent.Renewer
var renewer *agentint.Renewer
for {
select {
@ -197,7 +197,7 @@ func (ah *AuthHandler) Run(ctx context.Context, am AuthMethod) {
renewer.Stop()
}
renewer, err = agent.NewRenewer(ah.client, &agent.RenewerInput{
renewer, err = agentint.NewRenewer(ah.client, &agentint.RenewerInput{
Secret: secret,
})
if err != nil {

View File

@ -18,7 +18,7 @@ import (
"github.com/hashicorp/errwrap"
hclog "github.com/hashicorp/go-hclog"
"github.com/hashicorp/vault/api"
"github.com/hashicorp/vault/command/agent"
"github.com/hashicorp/vault/command/agent/agentint"
cachememdb "github.com/hashicorp/vault/command/agent/cache/cachememdb"
"github.com/hashicorp/vault/helper/namespace"
nshelper "github.com/hashicorp/vault/helper/namespace"
@ -395,7 +395,7 @@ func (c *LeaseCache) startRenewing(ctx context.Context, index *cachememdb.Index,
client.SetToken(req.Token)
client.SetHeaders(req.Request.Header)
renewer, err := agent.NewRenewer(client, &agent.RenewerInput{
renewer, err := agentint.NewRenewer(client, &agentint.RenewerInput{
Secret: secret,
})
if err != nil {