diff --git a/examples/resources/catalog_entity_openapi/resource.tf b/examples/resources/catalog_entity_openapi/resource.tf index 915fd41..bd8df54 100644 --- a/examples/resources/catalog_entity_openapi/resource.tf +++ b/examples/resources/catalog_entity_openapi/resource.tf @@ -7,7 +7,7 @@ terraform { } provider "cortex" { - token = "access-token-here" + token = "access-token-here" # or set CORTEX_API_TOKEN env var } resource "cortex_catalog_entity_openapi" "test_service_oas1" { diff --git a/go.mod b/go.mod index 4331af7..6f2f0e3 100644 --- a/go.mod +++ b/go.mod @@ -4,6 +4,7 @@ go 1.24.1 require ( github.com/dghubble/sling v1.4.1 + github.com/google/go-cmp v0.5.9 github.com/hashicorp/terraform-plugin-docs v0.16.0 github.com/hashicorp/terraform-plugin-framework v1.4.1 github.com/hashicorp/terraform-plugin-framework-validators v0.12.0 @@ -29,7 +30,6 @@ require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/fatih/color v1.15.0 // indirect github.com/golang/protobuf v1.5.3 // indirect - github.com/google/go-cmp v0.5.9 // indirect github.com/google/go-querystring v1.1.0 // indirect github.com/google/uuid v1.3.0 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect diff --git a/internal/provider/catalog_entity_openapi_resource_test.go b/internal/provider/catalog_entity_openapi_resource_test.go index a6d5475..baadb46 100644 --- a/internal/provider/catalog_entity_openapi_resource_test.go +++ b/internal/provider/catalog_entity_openapi_resource_test.go @@ -9,28 +9,9 @@ import ( func TestAccCatalogEntityOpenAPIResource(t *testing.T) { entityTag := "test-service" - spec := `openapi: 3.0.0 -info: - title: Test API - version: 1.0.0 -paths: - /test: - get: - responses: - '200': - description: OK` - - updatedSpec := `openapi: 3.0.0 -info: - title: Updated Test API - version: 1.0.1 -paths: - /test: - get: - responses: - '200': - description: OK` + spec := `{"info":{"title":"Test API","version":"1.0.0"},"paths":{"/test":{"get":{"responses":{"200":{"description":"OK"}}}}},"openapi":"3.0.0","servers":[{"url":"/"}]}` + updatedSpec := `{"info":{"title":"UpdatedTest API","version":"1.0.1"},"paths":{"/test":{"get":{"responses":{"200":{"description":"OK"}}}}},"openapi":"3.0.0","servers":[{"url":"/"}]}` resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, ProtoV6ProviderFactories: testAccProtoV6ProviderFactories,