Example #1
0
func TestKeyIsComplete(t *testing.T) {
	s3file := models.NewS3FileWithName("buckey-dent", "file-in-a-cake.xml")
	assert.False(t, s3file.KeyIsComplete())
	s3file.Key.Size = 4800
	s3file.Key.ETag = "aec157cfbc1a34d52"
	assert.True(t, s3file.KeyIsComplete())
}
Example #2
0
func TestNewS3FileWithName(t *testing.T) {
	s3File := models.NewS3FileWithName("bucket1", "Key Wee")
	assert.Equal(t, "bucket1", s3File.BucketName)
	assert.Equal(t, "Key Wee", s3File.Key.Key)
}