Esempio n. 1
0
func (s *EnvironmentCommandSuite) TestGetDefaultEnvironmentBothSet(c *gc.C) {
	os.Setenv(osenv.JujuEnvEnvKey, "magic")
	err := envcmd.WriteCurrentEnvironment("fubar")
	c.Assert(err, gc.IsNil)
	env := envcmd.GetDefaultEnvironment()
	c.Assert(env, gc.Equals, "magic")
}
Esempio n. 2
0
func (s *EnvironmentCommandSuite) TestGetDefaultEnvironmentCurrentEnvironmentSet(c *gc.C) {
	err := envcmd.WriteCurrentEnvironment("fubar")
	c.Assert(err, gc.IsNil)
	env := envcmd.GetDefaultEnvironment()
	c.Assert(env, gc.Equals, "fubar")
}
Esempio n. 3
0
func (s *EnvironmentCommandSuite) TestGetDefaultEnvironmentJujuEnvSet(c *gc.C) {
	os.Setenv(osenv.JujuEnvEnvKey, "magic")
	env := envcmd.GetDefaultEnvironment()
	c.Assert(env, gc.Equals, "magic")
}
Esempio n. 4
0
func (s *EnvironmentCommandSuite) TestGetDefaultEnvironmentNothingSet(c *gc.C) {
	env := envcmd.GetDefaultEnvironment()
	c.Assert(env, gc.Equals, "")
}