Esempio n. 1
0
func (s *EnvironCapabilitySuite) TestSupportsUnitPlacementNoPolicy(c *gc.C) {
	s.policy.getEnvironCapability = func(*config.Config) (state.EnvironCapability, error) {
		c.Errorf("should not have been invoked")
		return nil, nil
	}
	state.SetPolicy(s.State, nil)
	_, err := s.addOneMachine(c)
	c.Assert(err, gc.IsNil)
}
Esempio n. 2
0
func (s *PrecheckerSuite) TestPrecheckNoPolicy(c *gc.C) {
	s.policy.getPrechecker = func(*config.Config) (state.Prechecker, error) {
		c.Errorf("should not have been invoked")
		return nil, nil
	}
	state.SetPolicy(s.State, nil)
	_, err := s.addOneMachine(c, constraints.Value{}, "placement")
	c.Assert(err, gc.IsNil)
}
Esempio n. 3
0
func (s *ConfigValidatorSuite) TestConfigValidateNoPolicy(c *gc.C) {
	s.policy.getConfigValidator = func(providerType string) (state.ConfigValidator, error) {
		c.Errorf("should not have been invoked")
		return nil, nil
	}

	state.SetPolicy(s.State, nil)
	err := s.updateEnvironConfig(c)
	c.Assert(err, gc.IsNil)
}