Esempio n. 1
0
func buildManager(name string) *cmd.Manager {
	m := cmd.BuildBaseManager(name, version, header)
	m.Register(&Listdomain{})      //route53 list zones
	m.Register(&NewSubdomain{})    //route53 create CNAME
	m.Register(&DeleteSubdomain{}) //route53 delete CNAME
	return m
}
Esempio n. 2
0
func (s *S) TestCommandsFromBaseManagerAreRegistered(c *check.C) {
	baseManager := cmd.BuildBaseManager("megam", version, header)
	manager := buildManager("megam")
	for name, instance := range baseManager.Commands {
		command, ok := manager.Commands[name]
		c.Assert(ok, check.Equals, true)
		c.Assert(command, check.FitsTypeOf, instance)
	}
}