Skip to content

Commit

Permalink
Remove ID splitting logic as ID is project ID
Browse files Browse the repository at this point in the history
  • Loading branch information
b-per committed Sep 26, 2024
1 parent eb0aa2e commit 9eef3d4
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions pkg/sdkv2/resources/project_artefacts_acceptance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"testing"

"github.com/dbt-labs/terraform-provider-dbtcloud/pkg/framework/acctest_helper"
"github.com/dbt-labs/terraform-provider-dbtcloud/pkg/helper"
"github.com/hashicorp/terraform-plugin-testing/helper/acctest"
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
"github.com/hashicorp/terraform-plugin-testing/terraform"
Expand Down Expand Up @@ -120,13 +119,7 @@ func testAccCheckDbtCloudProjectArtefactsExists(resource string) resource.TestCh
if err != nil {
return fmt.Errorf("Issue getting the client")
}
projectId, _, err := helper.SplitIDToStrings(
rs.Primary.ID,
"dbtcloud_project_artefacts",
)
if err != nil {
return err
}
projectId := rs.Primary.ID
project, err := apiClient.GetProject(projectId)
if err != nil {
return fmt.Errorf("Can't get project")
Expand Down Expand Up @@ -178,13 +171,7 @@ func testAccCheckDbtCloudProjectArtefactsDestroy(s *terraform.State) error {
if rs.Type != "dbtcloud_project_artefacts" {
continue
}
projectId, _, err := helper.SplitIDToStrings(
rs.Primary.ID,
"dbtcloud_project_artefacts",
)
if err != nil {
return err
}
projectId := rs.Primary.ID
project, err := apiClient.GetProject(projectId)
if project != nil {
return fmt.Errorf("Project still exists")
Expand Down

0 comments on commit 9eef3d4

Please sign in to comment.