internal/awscloud: use AWS.Upload() from osbuild/images
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
This commit is contained in:
parent
4595339774
commit
13ba870fc6
2 changed files with 0 additions and 36 deletions
|
|
@ -1,8 +1,6 @@
|
|||
package awscloud_test
|
||||
|
||||
import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
|
@ -17,16 +15,6 @@ func TestS3MarkObjectAsPublic(t *testing.T) {
|
|||
require.NoError(t, aws.MarkS3ObjectAsPublic("bucket", "object-key"))
|
||||
}
|
||||
|
||||
func TestS3Upload(t *testing.T) {
|
||||
tmpDir := t.TempDir()
|
||||
require.NoError(t, os.WriteFile(filepath.Join(tmpDir, "file"), []byte("imanimage"), 0600))
|
||||
|
||||
aws := awscloud.NewForTest(nil, nil, nil, &s3upldrmock{t, "imanimage", "bucket", "object-key"}, nil)
|
||||
require.NotNil(t, aws)
|
||||
_, err := aws.Upload(filepath.Join(tmpDir, "file"), "bucket", "object-key")
|
||||
require.NoError(t, err)
|
||||
}
|
||||
|
||||
func TestS3ObjectPresignedURL(t *testing.T) {
|
||||
aws := awscloud.NewForTest(nil, nil, nil, nil, &s3signmock{t, "bucket", "object-key"})
|
||||
require.NotNil(t, aws)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue