diff --git a/nomad/acl_testutil_test.go b/nomad/acl_testutil_test.go index 4cf5a9627..705290126 100644 --- a/nomad/acl_testutil_test.go +++ b/nomad/acl_testutil_test.go @@ -24,6 +24,11 @@ func NamespacePolicy(namespace string, policy string, capabilities []string) str return policyHCL } +// NodePolicy is a helper for generating the hcl for a given node policy. +func NodePolicy(policy string) string { + return fmt.Sprintf("node {\n\tpolicy = %q\n}\n", policy) +} + // CreatePolicy creates a policy with the given name and rule. func CreatePolicy(t *testing.T, state *state.StateStore, index uint64, name, rule string) { t.Helper()