test(e2e): Refactor vault setup method (#3724)

* refact(e2e): Pass in boundary-controller-policy to method

This allows any boundary-enterprise specific test packages to point to their own testdata directory

* test(e2e): Fix assertion statement

* refact(e2e): Move method call for clarity
This commit is contained in:
Michael Li authored and GitHub committed 2023-09-14 14:12:09 -04:00
1 parent e3e848d847
commit 94dd9e84fe
8 files changed
+21 -19

No files matched your search

+2 -2
View File
@@ -25,9 +25,9 @@ type CreateTokenResponse struct {
// Setup verifies if appropriate credentials are set and adds the boundary controller
// policy to vault. Returns the vault address.
func Setup(t testing.TB) (boundaryPolicyName string, kvPolicyFilePath string) {
func Setup(t testing.TB, boundaryControllerFilePath string) (boundaryPolicyName string, kvPolicyFilePath string) {
// Set up boundary policy
boundaryPolicyFilePath, err := filepath.Abs("testdata/boundary-controller-policy.hcl")
boundaryPolicyFilePath, err := filepath.Abs(boundaryControllerFilePath)
require.NoError(t, err)
boundaryPolicyName = WritePolicy(t, context.Background(), boundaryPolicyFilePath)