func (s *LocalServer) SetUp(c *C) { srv, err := elbtest.NewServer() c.Assert(err, IsNil) c.Assert(srv, NotNil) s.srv = srv s.region = aws.Region{ELBEndpoint: srv.URL()} }
func (s *S) SetUpSuite(c *gocheck.C) { var err error s.server, err = elbtest.NewServer() c.Assert(err, gocheck.IsNil) config.Set("juju:elb-endpoint", s.server.URL()) config.Set("juju:use-elb", true) region := aws.SAEast region.ELBEndpoint = s.server.URL() s.client = elb.New(aws.Auth{AccessKey: "some", SecretKey: "thing"}, region) c.Assert(err, gocheck.IsNil) config.Set("juju:elb-avail-zones", []interface{}{"my-zone-1a", "my-zone-1b"}) config.Set("aws:access-key-id", "access") config.Set("aws:secret-access-key", "s3cr3t") s.provisioner = testing.NewFakeProvisioner() app.Provisioner = s.provisioner }
func (s *ELBSuite) SetUpSuite(c *gocheck.C) { var err error config.Set("database:url", "127.0.0.1:27017") config.Set("database:name", "juju_elb_tests") s.conn, err = db.Conn() s.server, err = elbtest.NewServer() c.Assert(err, gocheck.IsNil) config.Set("juju:elb-endpoint", s.server.URL()) config.Set("juju:use-elb", true) region := aws.SAEast region.ELBEndpoint = s.server.URL() s.client = elb.New(aws.Auth{AccessKey: "some", SecretKey: "thing"}, region) c.Assert(err, gocheck.IsNil) s.cName = "juju_test_elbs" config.Set("juju:elb-collection", s.cName) config.Set("juju:elb-avail-zones", []interface{}{"my-zone-1a", "my-zone-1b"}) config.Set("aws:access-key-id", "access") config.Set("aws:secret-access-key", "s3cr3t") config.Set("git:host", "git.tsuru.io") config.Set("queue", "fake") config.Set("juju:units-collection", "juju_units_test_elb") s.provisioner = testing.NewFakeProvisioner() app.Provisioner = s.provisioner }