Switch to using the dep tool and update all the dependencies
This commit is contained in:
parent
5135ff73cb
commit
98c2d2c41b
5321 changed files with 4483201 additions and 5922 deletions
44
vendor/github.com/aws/aws-sdk-go/awstesting/integration/integration.go
generated
vendored
Normal file
44
vendor/github.com/aws/aws-sdk-go/awstesting/integration/integration.go
generated
vendored
Normal file
|
@ -0,0 +1,44 @@
|
|||
// +build integration
|
||||
|
||||
// Package integration performs initialization and validation for integration
|
||||
// tests.
|
||||
package integration
|
||||
|
||||
import (
|
||||
"crypto/rand"
|
||||
"fmt"
|
||||
"io"
|
||||
"os"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/session"
|
||||
)
|
||||
|
||||
// Session is a shared session for all integration tests to use.
|
||||
var Session = session.Must(session.NewSession())
|
||||
|
||||
func init() {
|
||||
logLevel := Session.Config.LogLevel
|
||||
if os.Getenv("DEBUG") != "" {
|
||||
logLevel = aws.LogLevel(aws.LogDebug)
|
||||
}
|
||||
if os.Getenv("DEBUG_SIGNING") != "" {
|
||||
logLevel = aws.LogLevel(aws.LogDebugWithSigning)
|
||||
}
|
||||
if os.Getenv("DEBUG_BODY") != "" {
|
||||
logLevel = aws.LogLevel(aws.LogDebugWithSigning | aws.LogDebugWithHTTPBody)
|
||||
}
|
||||
Session.Config.LogLevel = logLevel
|
||||
|
||||
if aws.StringValue(Session.Config.Region) == "" {
|
||||
panic("AWS_REGION must be configured to run integration tests")
|
||||
}
|
||||
}
|
||||
|
||||
// UniqueID returns a unique UUID-like identifier for use in generating
|
||||
// resources for integration tests.
|
||||
func UniqueID() string {
|
||||
uuid := make([]byte, 16)
|
||||
io.ReadFull(rand.Reader, uuid)
|
||||
return fmt.Sprintf("%x", uuid)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue