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 479c55b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ func TestAccProjectInboundDataFilterResource(t *testing.T) {
resource.Test(t, resource.TestCase{
PreCheck: func() { acctest.PreCheck(t) },
ProtoV5ProviderFactories: testAccProtoV5ProviderFactories,
CheckDestroy: testAccCheckTeamMemberDestroy,
Steps: []resource.TestStep{
{
Config: testAccProjectInboundDataFilterConfig(teamSlug, projectSlug, filterId, "active = true"),
Expand Down Expand Up @@ -57,7 +56,6 @@ func TestAccProjectInboundDataFilterResource_LegacyBrowser(t *testing.T) {
resource.Test(t, resource.TestCase{
PreCheck: func() { acctest.PreCheck(t) },
ProtoV5ProviderFactories: testAccProtoV5ProviderFactories,
CheckDestroy: testAccCheckTeamMemberDestroy,
Steps: []resource.TestStep{
{
Config: testAccProjectInboundDataFilterConfig(teamSlug, projectSlug, filterId, "subfilters = [\"ie_pre_9\"]"),
Expand Down
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 479c55b

Please sign in to comment.