juju / amulet

Testing harness and tools for Juju Charms
Other
17 stars 33 forks source link

Honor JUJU_MODEL environment variable. #176

Closed seman closed 7 years ago

seman commented 7 years ago

Not honoring JUJU_MODEL env variable is one of the causes of juju-solutions/bundletester#93 issue. If JUJU_MODEL env is set, Amulet needs to use the controller and model specified by the env variable rather than the output from thejuju switch command. When working with multiple controllers, juju switch might have undesired result.

marcoceppi commented 7 years ago

Seems reasonable. Will test patch locally as travis is unhappy at the moment

johnsca commented 7 years ago

There are other references in the code to JUJU_ENV. Should we normalize all to use the same env var?

johnsca commented 7 years ago

The 2.0 docs mention JUJU_MODEL but bundletester uses JUJU_ENV which is what is documented in the 1.25 docs. I guess we should really support both.

I'm already working on another PR for making the model usage more explicit in the scp / ssh calls, so I'll tackle that there as well.

seman commented 7 years ago

@johnsca I made PR to bundletester to use JUJU_MODEL https://github.com/juju-solutions/bundletester/pull/94