Skip to content

Commit

Permalink
Fix some timing issues in resourceserver, and add terraform version t…
Browse files Browse the repository at this point in the history
…o server logs
  • Loading branch information
acwest committed Sep 26, 2024
1 parent a9e2872 commit 93a9116
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 974 deletions.
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ test-acc: ## Run acceptance tests with http recordings. To run a specific test,
@terraform version; \
AUTH0_HTTP_RECORDINGS=on \
AUTH0_DOMAIN=terraform-provider-auth0-dev.eu.auth0.com \
TF_LOG=DEBUG \
TF_ACC=1 \
go test \
-v \
Expand Down
2 changes: 1 addition & 1 deletion internal/acctest/acctest.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
"gopkg.in/dnaeon/go-vcr.v3/recorder"

"github.com/auth0/terraform-provider-auth0/internal/config"
"github.com/auth0/terraform-provider-auth0/internal/go-vcr.v3/recorder"
"github.com/auth0/terraform-provider-auth0/internal/provider"
)

Expand Down
5 changes: 2 additions & 3 deletions internal/acctest/http_recorder.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@ import (
"github.com/auth0/go-auth0"
"github.com/auth0/go-auth0/management"
"github.com/stretchr/testify/require"

"github.com/auth0/terraform-provider-auth0/internal/go-vcr.v3/cassette"
"github.com/auth0/terraform-provider-auth0/internal/go-vcr.v3/recorder"
"gopkg.in/dnaeon/go-vcr.v3/cassette"
"gopkg.in/dnaeon/go-vcr.v3/recorder"
)

const (
Expand Down
4 changes: 0 additions & 4 deletions internal/auth0/resourceserver/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,6 @@ func NewResource() *schema.Resource {
}

func createResourceServer(ctx context.Context, data *schema.ResourceData, meta interface{}) diag.Diagnostics {
fmt.Printf("DEBUG: CRAIG: createResourceServer\n")
api := meta.(*config.Config).GetAPI()

resourceServer := expandResourceServer(data)
Expand All @@ -278,7 +277,6 @@ func createResourceServer(ctx context.Context, data *schema.ResourceData, meta i
}

func updateResourceServer(ctx context.Context, data *schema.ResourceData, meta interface{}) diag.Diagnostics {
fmt.Printf("DEBUG: CRAIG: updateResourceServer\n")
api := meta.(*config.Config).GetAPI()

resourceServer := expandResourceServer(data)
Expand Down Expand Up @@ -410,7 +408,6 @@ func fixNullableAttributes(ctx context.Context, data *schema.ResourceData, api *
}

func readResourceServer(ctx context.Context, data *schema.ResourceData, meta interface{}) diag.Diagnostics {
fmt.Printf("DEBUG: CRAIG: readResourceServer\n")
api := meta.(*config.Config).GetAPI()

resourceServer, err := api.ResourceServer.Read(ctx, data.Id())
Expand All @@ -426,7 +423,6 @@ func readResourceServer(ctx context.Context, data *schema.ResourceData, meta int
}

func deleteResourceServer(ctx context.Context, data *schema.ResourceData, meta interface{}) diag.Diagnostics {
fmt.Printf("DEBUG: CRAIG: deleteResourceServer\n")
if resourceServerIsAuth0ManagementAPI(data.GetRawState()) {
return nil
}
Expand Down
24 changes: 0 additions & 24 deletions internal/go-vcr.v3/LICENSE

This file was deleted.

Loading

0 comments on commit 93a9116

Please sign in to comment.