Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests using localhost, when WEB_SERVICE_URL is set #9

Open
mdjasper opened this issue Feb 28, 2020 · 2 comments
Open

tests using localhost, when WEB_SERVICE_URL is set #9

mdjasper opened this issue Feb 28, 2020 · 2 comments

Comments

@mdjasper
Copy link

mdjasper commented Feb 28, 2020

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform Version

0.12.20

Terraform Configuration Files

The tf configuration run during tests

Debug Output

https://gist.github.com/mdjasper/cd9de1c24132827cacb8498fc4a81f3f

Panic Output

Expected Behavior

I see that in initTestWebServiceURL the tests are looking for the env var WEB_SERVICE_URL. However, even when that is set, the tests are still trying to use the localhost default (see gist)
When make testacc

Actual Behavior

Tests tried to connect to default localhost WEB_SERVICE_URL

Steps to Reproduce

  • cloned repo
  • go installed dependencies
  • local pulsar running in docker using docker-compose and dinghy
  • run make testacc
@mdjasper
Copy link
Author

I feel like there must be some configuration or setup step or something that I am missing.

When I run the tests like this WEB_SERVICE_URL=http://pulsar.pulsar.docker:8080 make testacc they still all try to use http://localhost:8080 for the tests.

@mdjasper
Copy link
Author

As some extra debugging help, the tests run correctly if I just pass in the url hardcoded, for example file resource_pulsar_cluster_test

var (
	testPulsarCluster = fmt.Sprintf(`
provider "pulsar" {
  web_service_url = "%s"
}

resource "pulsar_cluster" "test" {
  cluster = "eternals"

  cluster_data {
    web_service_url    = "http://pulsar.pulsar.docker:8080"
    broker_service_url = "http://pulsar.pulsar.docker:6050"
    peer_clusters      = ["skrulls", "krees"]
  }
}`, "http://pulsar.pulsar.docker:8080")  //formerly testWebServiceURL
)
15:48:29 › pulsar-admin --admin-url http://pulsar.pulsar.docker:8080 tenants list
public
sample
thanos

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants