vault icon indicating copy to clipboard operation
vault copied to clipboard

unknown field 'TakesArbitraryInput' in struct literal of type framework.Path

Open theory opened this issue 3 years ago • 0 comments

Source:

import (
	"fmt"
	"net"
	"testing"

	"github.com/hashicorp/vault/http"
	"github.com/hashicorp/vault/vault"
)

func TestVaultStuff(t *testing.T) {
	ln, addr, token := createTestVault(t)
	defer ln.Close()

	fmt.Println(addr)
	fmt.Println(token)
}

func createTestVault(t *testing.T) (net.Listener, string, string) {
	t.Helper()

	// Create an in-memory, unsealed core (the "backend", if you will).
	core, keyShares, rootToken := vault.TestCoreUnsealed(t)
	_ = keyShares

	// Start an HTTP server for the core.
	ln, addr := http.TestServer(t, core)

	return ln, addr, rootToken
}

Output:

$ go test ./internal/keyring -v
# github.com/shirou/gopsutil/disk
iostat_darwin.c:28:2: warning: 'IOMasterPort' is deprecated: first deprecated in macOS 12.0 [-Wdeprecated-declarations]
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:132:1: note: 'IOMasterPort' has been explicitly marked deprecated here
# github.com/shirou/gopsutil/host
smc_darwin.c:75:41: warning: 'kIOMasterPortDefault' is deprecated: first deprecated in macOS 12.0 [-Wdeprecated-declarations]
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:123:19: note: 'kIOMasterPortDefault' has been explicitly marked deprecated here
# github.com/hashicorp/vault/vault
../../../go/pkg/mod/github.com/hashicorp/[email protected]/vault/logical_system_paths.go:1793:4: unknown field 'TakesArbitraryInput' in struct literal of type framework.Path
FAIL	github.com/nytimes/id-identity/internal/keyring [build failed]
FAIL

Versions:

$ uname -a
Darwin A12364.local 21.6.0 Darwin Kernel Version 21.6.0: Wed Aug 10 14:28:23 PDT 2022; root:xnu-8020.141.5~2/RELEASE_ARM64_T6000 arm64
$ go version
go version go1.19 darwin/arm64

theory avatar Sep 13 '22 14:09 theory