選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
 
 
 

32 行
566 B

  1. package testutil
  2. import (
  3. "flag"
  4. "github.com/goamz/goamz/aws"
  5. . "gopkg.in/check.v1"
  6. )
  7. // Amazon must be used by all tested packages to determine whether to
  8. // run functional tests against the real AWS servers.
  9. var Amazon bool
  10. func init() {
  11. flag.BoolVar(&Amazon, "amazon", false, "Enable tests against amazon server")
  12. }
  13. type LiveSuite struct {
  14. auth aws.Auth
  15. }
  16. func (s *LiveSuite) SetUpSuite(c *C) {
  17. if !Amazon {
  18. c.Skip("amazon tests not enabled (-amazon flag)")
  19. }
  20. auth, err := aws.EnvAuth()
  21. if err != nil {
  22. c.Fatal(err.Error())
  23. }
  24. s.auth = auth
  25. }