Beispiel #1
0
func TestUpgradedS3Bucket(t *testing.T) {
	if testutil.SkipS3 {
		t.SkipNow()
	}
	b := &TestBucket{
		bucket: testutil.Upgrade(testutil.TempS3Bucket("UpgradedS3Bucket")),
		t:      t,
	}
	b.allTests()
}
Beispiel #2
0
func TestS3Bucket(t *testing.T) {
	if testutil.SkipS3 {
		t.SkipNow()
	}
	b := &TestBucket{
		bucket: testutil.TempS3Bucket("S3Bucket"),
		t:      t,
	}
	b.allTests()
}
Beispiel #3
0
func TestS3Put(t *testing.T) {
	if testutil.SkipS3 {
		t.SkipNow()
	}

	s3Bucket = testutil.Upgrade(testutil.TempS3Bucket("S3PutGet"))

	_, err := Put(s3Bucket, testutil.TempDir, []string{"data"})
	if err != nil {
		t.Fatalf("Put failed: %s", err)
	}
	s3PutOk = true
}
Beispiel #4
0
func BenchmarkS3Put(b *testing.B) {
	if testutil.SkipS3 {
		b.SkipNow()
	}

	benchBucket = testutil.Upgrade(testutil.TempS3Bucket("BenchmarkPutS3"))

	for i := 0; i < b.N; i++ {
		n, err := Put(benchBucket, testutil.TempDir, []string{"data"})
		if err != nil {
			b.Fatalf("Put failed: %s", err)
		}
		b.SetBytes(n)
	}
	benchPutOk = true
}