Skip to content

Commit

Permalink
fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
netramali committed Sep 5, 2023
1 parent a5d440e commit 8695677
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 2 additions & 4 deletions internal/provider/data_source_policy_set.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,8 @@ func dataSourceTFEPolicySetRead(d *schema.ResourceData, meta interface{}) error
d.Set("workspace_ids", workspaceIDs)

var excludedWorkspaceIDs []interface{}
if !policySet.Global {
for _, excludedWorkspace := range policySet.WorkspaceExclusions {
excludedWorkspaceIDs = append(excludedWorkspaceIDs, excludedWorkspace.ID)
}
for _, excludedWorkspace := range policySet.WorkspaceExclusions {
excludedWorkspaceIDs = append(excludedWorkspaceIDs, excludedWorkspace.ID)
}
d.Set("excluded_workspace_ids", excludedWorkspaceIDs)

Expand Down
4 changes: 2 additions & 2 deletions internal/provider/data_source_policy_set_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ resource "tfe_project_policy_set" "foobar" {
project_id = tfe_project.foobar.id
}
resource "tfe_workspace_policy_set_exclusion" {
resource "tfe_workspace_policy_set_exclusion" "foobar" {
policy_set_id = tfe_policy_set.foobar.id
workspace_id = tfe_workspace.foobar.id
}
Expand Down Expand Up @@ -258,7 +258,7 @@ resource "tfe_project_policy_set" "foobar" {
project_id = tfe_project.foobar.id
}
resource "tfe_workspace_policy_set_exclusion" {
resource "tfe_workspace_policy_set_exclusion" "foobar" {
policy_set_id = tfe_policy_set.foobar.id
workspace_id = tfe_workspace.foobar.id
}
Expand Down

0 comments on commit 8695677

Please sign in to comment.