deis / workflow-e2e

End-to-end tests for Deis Workflow
MIT License
12 stars 18 forks source link

Make test code print an informational error message if it doesn't find 'DEIS_CONTROLLER_URL' in the environment #163

Open arschles opened 8 years ago

arschles commented 8 years ago

After https://github.com/deis/workflow-e2e/pull/157, the tests look for DEIS_CONTROLLER_URL in the environment to determine what server to talk to in order to run tests. This variable can be set to a variety of different values, and the test should explain the options:

arschles commented 8 years ago

cc/ @krancour

krancour commented 8 years ago

If you're inside a Kubernetes pod inside a namespace with a full Deis install, set the value to the internal router address: DEIS_CONTROLLER_URL=${DEIS_ROUTER_SERVICE_HOST}:${DEIS_ROUTER_SERVICE_PORT}

In this case, you shouldn't have to worry about the value of DEIS_CONTROLLER_URL at all. If unset, it's already derived automatically (in the Makefile) from the value of DEIS_ROUTER_SERVICE_HOST, which is automatically set by k8s when Workflow is installed.

If you're not inside a Kubernets pod, set the value to the external router address. This value depends on what kind of ingress server you have set up. It might be a cloud load balancer or otherwise. Assuming you have a public IP for the router: DEIS_CONTROLLER_URL=deis.${EXTERNAL_ROUTER_IP}.xip.io (or you can use .nip.io, or your own domain if you've configured one...)

The Makefile already offers this explanation if DEIS_CONTROLLER_URL is unset and cannot be derived from DEIS_ROUTER_SERVICE_HOST:

DEIS_CONTROLLER_URL is not exported. You must export this variable to proceed.
Its value should match the Deis Controller URL you would ordinarily use with
the `deis register` or `deis login` commands.

I would suggest that the only real problem we have on this front is that if someone executes ginkgo directly (instead of via the provided make target), then none of what I just said applies. We should transplant that logic from the Makefile to the tests themselves.

arschles commented 8 years ago

As far as I can tell, the remaining work in here is to transplant the makefile logic to translate some Makefile logic into tests themselves.

arschles commented 8 years ago

Punting to beta4

arschles commented 8 years ago

@krancour does it make sense to leave this open? Regardless, moving to RC1

Cryptophobia commented 6 years ago

This issue was moved to teamhephy/workflow-e2e#13