dikhan / terraform-provider-openapi

OpenAPI Terraform Provider that configures itself at runtime with the resources exposed by the service provider (defined in a swagger file)
Apache License 2.0
275 stars 48 forks source link

make test-all target failing #334

Closed dikhan closed 2 years ago

dikhan commented 2 years ago

Describe the bug

One of the integration tests has stopped working because the domain used (real one) now happens to resolve to something resulting into the expected assertion to fail.

To Reproduce

A clear and concise description on how does it work now and what's the current behaviour.

Steps to reproduce the behavior:

  1. make test-all
  2. The following error will be thrown:
[INFO] Executing unit tests for terraform-provider-openapi
../../../go/pkg/mod/github.com/hashicorp/hc-install@v0.3.1/internal/releasesjson/checksum_downloader.go:14:2: missing go.sum entry for module providing package golang.org/x/crypto/openpgp (imported by github.com/hashicorp/hc-install/internal/releasesjson); to add:
        go get github.com/hashicorp/hc-install/internal/releasesjson@v0.3.1
make: *** [unittest] Error 1
  1. In addition, after fising the above bu downloading the missing dependency, the following int tests will fail:
=== RUN   TestAccCDN_Create_EndPointOverride
    resource_cdns_test.go:208: Step 1/1, expected an error with pattern, no match on: Error running apply: exit status 1

        Error: request POST https://www.endpoint-that-does-not-exist.com/v1/cdns HTTP/1.1 failed. Response Error: 'Post "https://www.endpoint-that-does-not-exist.com/v1/cdns": dial tcp: lookup www.endpoint-that-does-not-exist.com: no such host'

          with openapi_cdn_v1.my_cdn,
          on terraform_plugin_test.tf line 9, in resource "openapi_cdn_v1" "my_cdn":
           9: resource "openapi_cdn_v1" "my_cdn" {

Expected behaviour

A clear and concise description of what you expected to happen.

Scenario: make test-all works again
Given the dependencies for the project are all sorted out
When the `make test-all` target is executed
Then the result should be successful and all the tests should pass

```gherkin
Scenario: TestAccCDN_Create_EndPointOverride works again
Given a totally random non existing overide host 
When the TestAccCDN_Create_EndPointOverride is executed
Then the test should pass

Additional context

Add any other context about the problem here.

Checklist (for admin only)

Don't forget to go through the checklist to make sure the issue is created properly: