0affe226ad
This requires bumping https://github.com/mitchellh/go-testing-interface. For this new version, we have to create a wrapper to convert the stdlib `testing.TB` interface to the `mitchellh/go-testing-interface` `T` interface, since it uses `Parallel()` now, which is not supported by `testing.TB`. This had to be added to a new package, `benchhelpers`, to avoid a circular dependency in `testhelpers`. We also have to *unbump* https://github.com/armon/go-metrics since updating it breaks our usage of https://github.com/google/go-metrics-stackdriver I verified that the new `pkiCert` template function works with agent injection using annotations like: ```yaml vault.hashicorp.com/agent-inject-secret-sample.crt: "pki/issue/example-dot-com" vault.hashicorp.com/agent-inject-template-sample.crt: | {{ pkiCert "pki/issue/example-dot-com" "common_name=foo.example.com" "ttl=1h" }} ```
20 lines
263 B
Go
20 lines
263 B
Go
package benchhelpers
|
|
|
|
import (
|
|
"testing"
|
|
|
|
testinginterface "github.com/mitchellh/go-testing-interface"
|
|
)
|
|
|
|
type tbWrapper struct {
|
|
testing.TB
|
|
}
|
|
|
|
func (b tbWrapper) Parallel() {
|
|
// no-op
|
|
}
|
|
|
|
func TBtoT(tb testing.TB) testinginterface.T {
|
|
return tbWrapper{tb}
|
|
}
|