Exemplo n.º 1
0
func init() {
	route53Key = os.Getenv("AWS_ACCESS_KEY_ID")
	route53Secret = os.Getenv("AWS_SECRET_ACCESS_KEY")
	awsCredentialFile = os.Getenv("AWS_CREDENTIAL_FILE")
	homeDir = os.Getenv("HOME")
	testServer = testutil.NewHTTPServer()
	testServer.Start()
}
Exemplo n.º 2
0
	. "launchpad.net/gocheck"
	"strings"
	"testing"
)

func Test(t *testing.T) {
	TestingT(t)
}

type S struct {
	iam *iam.IAM
}

var _ = Suite(&S{})

var testServer = testutil.NewHTTPServer()

func (s *S) SetUpSuite(c *C) {
	testServer.Start()
	auth := aws.Auth{"abc", "123", ""}
	s.iam = iam.New(auth, aws.Region{IAMEndpoint: testServer.URL})
}

func (s *S) TearDownTest(c *C) {
	testServer.Flush()
}

func (s *S) TestCreateUser(c *C) {
	testServer.Response(200, nil, CreateUserExample)
	resp, err := s.iam.CreateUser("Bob", "/division_abc/subdivision_xyz/")
	values := testServer.WaitRequest().URL.Query()
Exemplo n.º 3
0
func init() {
	route53Key = os.Getenv("AWS_ACCESS_KEY_ID")
	route53Secret = os.Getenv("AWS_SECRET_ACCESS_KEY")
	testServer = testutil.NewHTTPServer()
	testServer.Start()
}
Exemplo n.º 4
0
func init() {
	testServer = testutil.NewHTTPServer()
	testServer.Start()
}