github.com/hernad/nomad@v1.6.112/e2e/acl/acl_test.go (about)

     1  // Copyright (c) HashiCorp, Inc.
     2  // SPDX-License-Identifier: MPL-2.0
     3  
     4  package acl
     5  
     6  import (
     7  	"testing"
     8  
     9  	"github.com/hernad/nomad/e2e/e2eutil"
    10  )
    11  
    12  func TestACL(t *testing.T) {
    13  
    14  	// Wait until we have a usable cluster before running the tests. While the
    15  	// test does not run client workload, some do perform listings of nodes. It
    16  	// is therefore better to wait until we have a node, so these tests can
    17  	// check for a non-empty node list response object.
    18  	nomadClient := e2eutil.NomadClient(t)
    19  	e2eutil.WaitForLeader(t, nomadClient)
    20  	e2eutil.WaitForNodesReady(t, nomadClient, 1)
    21  
    22  	// Run our test cases.
    23  	t.Run("TestACL_Role", testACLRole)
    24  	t.Run("TestACL_TokenExpiration", testACLTokenExpiration)
    25  	t.Run("TestACL_TokenRolePolicyAssignment", testACLTokenRolePolicyAssignment)
    26  }