Skip to content

Commit 2c47da6

Browse files
committed
Update test to use agent pool in stack
1 parent 8e4e90b commit 2c47da6

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

internal/provider/resource_tfe_stack_test.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ func TestAccTFEStackResource_basic(t *testing.T) {
2727
Check: resource.ComposeAggregateTestCheckFunc(
2828
resource.TestCheckResourceAttrSet("tfe_stack.foobar", "id"),
2929
resource.TestCheckResourceAttrSet("tfe_stack.foobar", "project_id"),
30+
resource.TestCheckResourceAttrSet("tfe_stack.foobar", "agent_pool_id"),
3031
resource.TestCheckResourceAttr("tfe_stack.foobar", "name", "example-stack"),
3132
resource.TestCheckResourceAttr("tfe_stack.foobar", "description", "Just an ordinary stack"),
3233
resource.TestCheckResourceAttr("tfe_stack.foobar", "vcs_repo.identifier", "brandonc/pet-nulls-stack"),
@@ -51,6 +52,11 @@ resource "tfe_organization" "foobar" {
5152
5253
}
5354
55+
resource "tfe_agent_pool" "foobar" {
56+
name = "agent-pool-test-example"
57+
organization = tfe_organization.foobar.name
58+
}
59+
5460
resource "tfe_project" "example" {
5561
name = "example"
5662
organization = tfe_organization.foobar.name
@@ -68,6 +74,7 @@ resource "tfe_stack" "foobar" {
6874
name = "example-stack"
6975
description = "Just an ordinary stack"
7076
project_id = tfe_project.example.id
77+
agent_pool_id = tfe_agent_pool.foobar.id
7178
7279
vcs_repo {
7380
identifier = "%s"
@@ -85,7 +92,7 @@ func TestAccTFEStackResource_withAgentPool(t *testing.T) {
8592

8693
resource.Test(t, resource.TestCase{
8794
PreCheck: func() { testAccPreCheck(t) },
88-
ProtoV5ProviderFactories: testAccMuxedProviders,
95+
ProtoV6ProviderFactories: testAccMuxedProviders,
8996
Steps: []resource.TestStep{
9097
{
9198
Config: testAccTFEStackResourceConfigWithAgentPool(orgName),

0 commit comments

Comments
 (0)