Make API not depend on SDK (#18962)

This commit is contained in:
Nick Cabatoff
2023-02-06 09:41:56 -05:00
committed by GitHub
parent b5d7d47ca2
commit 192baa88db
39 changed files with 315 additions and 449 deletions

View File

@@ -19,7 +19,6 @@ import (
"github.com/go-test/deep"
"github.com/hashicorp/go-hclog"
"github.com/hashicorp/vault/sdk/helper/consts"
)
func init() {
@@ -442,7 +441,7 @@ func TestClientDeprecatedEnvSettings(t *testing.T) {
func TestClientEnvNamespace(t *testing.T) {
var seenNamespace string
handler := func(w http.ResponseWriter, req *http.Request) {
seenNamespace = req.Header.Get(consts.NamespaceHeaderName)
seenNamespace = req.Header.Get(NamespaceHeaderName)
}
config, ln := testHTTPServer(t, http.HandlerFunc(handler))
defer ln.Close()
@@ -1267,7 +1266,7 @@ func TestClient_SetCloneToken(t *testing.T) {
func TestClientWithNamespace(t *testing.T) {
var ns string
handler := func(w http.ResponseWriter, req *http.Request) {
ns = req.Header.Get(consts.NamespaceHeaderName)
ns = req.Header.Get(NamespaceHeaderName)
}
config, ln := testHTTPServer(t, http.HandlerFunc(handler))
defer ln.Close()