Skip to content

Commit

Permalink
TestAccEKSAccessEntry_username: Test 'kubernetes_groups'.
Browse files Browse the repository at this point in the history
  • Loading branch information
ewbankkit committed Mar 20, 2024
1 parent b11d60b commit 4c6e09f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions internal/service/eks/access_entry_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,8 @@ func TestAccEKSAccessEntry_username(t *testing.T) {
Config: testAccAccessEntryConfig_username(rName, "user1"),
Check: resource.ComposeTestCheckFunc(
testAccCheckAccessEntryExists(ctx, resourceName, &accessentry),
resource.TestCheckResourceAttr(resourceName, "kubernetes_groups.#", "1"),
resource.TestCheckTypeSetElemAttr(resourceName, "kubernetes_groups.*", "ae-test"),
resource.TestCheckResourceAttr(resourceName, "type", "STANDARD"),
resource.TestCheckResourceAttr(resourceName, "user_name", "user1"),
),
Expand All @@ -249,6 +251,8 @@ func TestAccEKSAccessEntry_username(t *testing.T) {
Config: testAccAccessEntryConfig_username(rName, "user2"),
Check: resource.ComposeTestCheckFunc(
testAccCheckAccessEntryExists(ctx, resourceName, &accessentry),
resource.TestCheckResourceAttr(resourceName, "kubernetes_groups.#", "1"),
resource.TestCheckTypeSetElemAttr(resourceName, "kubernetes_groups.*", "ae-test"),
resource.TestCheckResourceAttr(resourceName, "type", "STANDARD"),
resource.TestCheckResourceAttr(resourceName, "user_name", "user2"),
),
Expand Down Expand Up @@ -528,6 +532,8 @@ resource "aws_eks_access_entry" "test" {
type = "STANDARD"
user_name = %[2]q
kubernetes_groups = ["ae-test"]
}
`, rName, username))
}

0 comments on commit 4c6e09f

Please sign in to comment.