You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
64 lines
1.2 KiB
64 lines
1.2 KiB
package s3
|
|
|
|
import (
|
|
"github.com/aws/aws-sdk-go/service/s3"
|
|
"testing"
|
|
)
|
|
|
|
func TestS3Client_Storage(t *testing.T) {
|
|
type fields struct {
|
|
S3C *s3.S3
|
|
}
|
|
type args struct {
|
|
data []byte
|
|
bucket string
|
|
key string
|
|
}
|
|
tests := []struct {
|
|
name string
|
|
fields fields
|
|
args args
|
|
wantErr bool
|
|
}{
|
|
// TODO: Add test cases.
|
|
}
|
|
for _, tt := range tests {
|
|
t.Run(tt.name, func(t *testing.T) {
|
|
s := &S3Client{
|
|
S3C: tt.fields.S3C,
|
|
}
|
|
if err := s.Storage(tt.args.data, tt.args.bucket, tt.args.key); (err != nil) != tt.wantErr {
|
|
t.Errorf("Storage() error = %v, wantErr %v", err, tt.wantErr)
|
|
}
|
|
})
|
|
}
|
|
}
|
|
|
|
func TestS3Client_Storage1(t *testing.T) {
|
|
type fields struct {
|
|
S3C *s3.S3
|
|
}
|
|
type args struct {
|
|
data []byte
|
|
bucket string
|
|
key string
|
|
}
|
|
tests := []struct {
|
|
name string
|
|
fields fields
|
|
args args
|
|
wantErr bool
|
|
}{
|
|
// TODO: Add test cases.
|
|
}
|
|
for _, tt := range tests {
|
|
t.Run(tt.name, func(t *testing.T) {
|
|
s := &S3Client{
|
|
S3C: tt.fields.S3C,
|
|
}
|
|
if err := s.Storage(tt.args.data, tt.args.bucket, tt.args.key); (err != nil) != tt.wantErr {
|
|
t.Errorf("Storage() error = %v, wantErr %v", err, tt.wantErr)
|
|
}
|
|
})
|
|
}
|
|
}
|
|
|