@@ -161,12 +161,10 @@ func TestAccDataSourceLKECluster_controlPlane(t *testing.T) {
161161func TestAccDataSourceLKECluster_enterprise (t * testing.T ) {
162162 t .Parallel ()
163163
164- //enterpriseRegion, err := acceptance.GetRandomRegionWithCaps([]linodego.RegionCapability{"Kubernetes Enterprise", "VPCs"}, "core")
165- //if err != nil {
166- // t.Fatal(err)
167- //}
168- // TODO: Remove hard-coded region and replace with enterpriseRegion once capability filtering works properly
169- enterpriseRegionWithACLP := "us-lax"
164+ enterpriseRegion , err := acceptance .GetRandomRegionWithCaps ([]linodego.RegionCapability {"Kubernetes Enterprise" , "VPCs" }, "core" )
165+ if err != nil {
166+ t .Fatal (err )
167+ }
170168
171169 var k8sVersionEnterprise string
172170
@@ -205,10 +203,10 @@ func TestAccDataSourceLKECluster_enterprise(t *testing.T) {
205203 CheckDestroy : acceptance .CheckLKEClusterDestroy ,
206204 Steps : []resource.TestStep {
207205 {
208- Config : tmpl .DataEnterprise (t , clusterName , k8sVersionEnterprise , enterpriseRegionWithACLP , "on_recycle" , firewall .ID ),
206+ Config : tmpl .DataEnterprise (t , clusterName , k8sVersionEnterprise , enterpriseRegion , "on_recycle" , firewall .ID ),
209207 Check : resource .ComposeTestCheckFunc (
210208 resource .TestCheckResourceAttr (dataSourceClusterName , "label" , clusterName ),
211- resource .TestCheckResourceAttr (dataSourceClusterName , "region" , enterpriseRegionWithACLP ),
209+ resource .TestCheckResourceAttr (dataSourceClusterName , "region" , enterpriseRegion ),
212210 resource .TestCheckResourceAttr (dataSourceClusterName , "k8s_version" , k8sVersionEnterprise ),
213211 resource .TestCheckResourceAttr (dataSourceClusterName , "status" , "ready" ),
214212 resource .TestCheckResourceAttr (dataSourceClusterName , "tier" , "enterprise" ),
0 commit comments