Skip to content

Commit

Permalink
feat(security-email): remove tests which run the delete function
Browse files Browse the repository at this point in the history
Signed-off-by: Michal Wasilewski <[email protected]>
  • Loading branch information
mwasilew2 committed Jan 22, 2024
1 parent 748a40e commit 741fd88
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 40 deletions.
4 changes: 2 additions & 2 deletions spacelift/resource_security_email.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"

"github.com/spacelift-io/terraform-provider-spacelift/spacelift/internal"
"github.com/spacelift-io/terraform-provider-spacelift/spacelift/internal/structs"
)

// There are no tests for this resource because terraform sdk tests run delete function after each test: https://github.com/hashicorp/terraform-plugin-sdk/blob/bb132acb576c8a4b61ee2b5f86f6d9ec51c0e538/helper/resource/testing_new.go#L79
func resourceSecurityEmail() *schema.Resource {
return &schema.Resource{
Description: "" +
Expand Down Expand Up @@ -53,7 +53,7 @@ func resourceSecurityEmailCreate(ctx context.Context, data *schema.ResourceData,

func resourceSecurityEmailRead(ctx context.Context, data *schema.ResourceData, i interface{}) diag.Diagnostics {
var query struct {
SecurityEmail *structs.SecurityEmail `graphql:"securityEmail"`
SecurityEmail *string `graphql:"securityEmail"`
}
if err := i.(*internal.Client).Query(ctx, "SecurityEmail", &query, nil); err != nil {
return diag.Errorf("could not query for security email: %v", err)
Expand Down
38 changes: 0 additions & 38 deletions spacelift/resource_security_email_test.go

This file was deleted.

0 comments on commit 741fd88

Please sign in to comment.