Documentation ¶
Overview ¶
Package acl provides end-to-end tests for Nomads ACL system.
In order to run this test suite only, from the e2e directory you can trigger go test -v -run '^TestACL$' ./acl
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cleanup ¶
type Cleanup struct {
// contains filtered or unexported fields
}
Cleanup stores Nomad resources that have been created by a test which will need to be deleted once the test exits. This ensures other tests can run in a clean environment and reduces the potential for conflicts.
func NewCleanup ¶
func NewCleanup() *Cleanup
NewCleanup generates an initialized Cleanup object for immediate use.
func (*Cleanup) Add ¶
func (c *Cleanup) Add(id string, resourceType TestResourceType)
Add the resource identifier to the resource tracker. It will be removed by the Cleanup function once it is triggered.
func (*Cleanup) Remove ¶
func (c *Cleanup) Remove(id string, resourceType TestResourceType)
Remove the resource identifier from the resource tracker, indicating it is no longer existing on the cluster and does not need to be cleaned.
type TestResourceType ¶
type TestResourceType int
TestResourceType indicates what the resource is so the Cleanup process can use the correct API.
const ( NamespaceTestResourceType TestResourceType = iota ACLPolicyTestResourceType ACLRoleTestResourceType ACLTokenTestResourceType )