Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 

32 righe
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. }