Skip to content

Commit

Permalink
ref: remove testAccCheckTeamMemberDestroy
Browse files Browse the repository at this point in the history
  • Loading branch information
jianyuan committed Dec 9, 2023
1 parent 299b175 commit 0d3c918
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions internal/provider/resource_team_member_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,35 +5,9 @@ import (
"testing"

"github.com/hashicorp/terraform-plugin-testing/helper/resource"
"github.com/hashicorp/terraform-plugin-testing/terraform"
"github.com/jianyuan/terraform-provider-sentry/internal/acctest"
)

func testAccCheckTeamMemberDestroy(s *terraform.State) error {
for _, rs := range s.RootModule().Resources {
if rs.Type != "sentry_team_member" {
continue
}

// ctx := context.Background()
// team, resp, err := acctest.SharedClient.TeamMembers.Get(
// ctx,
// rs.Primary.Attributes["organization"],
// rs.Primary.ID,
// )
// if err == nil {
// if team != nil {
// return errors.New("team member still exists")
// }
// }
// if resp.StatusCode != 404 {
// return err
// }
return nil
}
return nil
}

func TestAccTeamMemberResource(t *testing.T) {
rn := "sentry_team_member.test"
teamSlug := acctest.RandomWithPrefix("tf-team")
Expand All @@ -43,7 +17,6 @@ func TestAccTeamMemberResource(t *testing.T) {
resource.Test(t, resource.TestCase{
PreCheck: func() { acctest.PreCheck(t) },
ProtoV5ProviderFactories: testAccProtoV5ProviderFactories,
CheckDestroy: testAccCheckTeamMemberDestroy,
Steps: []resource.TestStep{
{
Config: testAccTeamMemberConfig(teamSlug, member1Email, member2Email, "sentry_organization_member.test_1", "contributor"),
Expand Down

0 comments on commit 0d3c918

Please sign in to comment.