I tried using what seemed to be the standard pattern (despite having to modify it slightly for ginkgo/gomeage world by using globals):
package store_test
import (
"github.com/hashicorp/vault/http"
"github.com/hashicorp/vault/vault"
"testing"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
var VaultAddr string
var VaultToken string
func TestStore(t *testing.T) {
RegisterFailHandler(Fail)
core, _, token := vault.TestCoreUnsealed(t)
ln, addr := http.TestServer(t, core)
defer ln.Close()
http.TestServerAuth(t, addr, token)
VaultAddr = addr
VaultToken = token
RunSpecs(t, "Store Suite")
}
```
But when running tests I continuously get this error:
```
Failed to compile store:
# github.com/hashicorp/vault/audit
../go/pkg/mod/github.com/hashicorp/va...@v1.0.2/audit/format.go:485:26: wt.Claims().JWTID undefined (type jwt.Claims has no field or method JWTID)
```
I've poked around a little without much progress and was wondering if anyone else had run into this and how they went about configuring the in
memory test vault to prevent it. I don't mind using exec to spin up a "real" dev Vault for these tests but thought the in memory approach would
be nice if I could get it working.
I worry I'm kinda down the rabbit hole here but hoping someone might know the way out.