mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-06-24 14:10:49 -04:00
Fix tests and linting (#370)
* Fix license integration test * Fix build tags in lint config * Fix missing error checks * Fix use of MarkNodeAsInitialized * Fix attestation tests * Add license integration test to cmake list
This commit is contained in:
parent
397c9013ea
commit
0969ff4ac3
9 changed files with 28 additions and 21 deletions
|
@ -106,16 +106,17 @@ func cleanUpBucket(ctx context.Context, require *require.Assertions, bucketID st
|
|||
objects = append(objects, *output.Contents[i].Key)
|
||||
}
|
||||
// Delete all objects of the bucket
|
||||
cleanUpObjects(ctx, client, bucketID, objects)
|
||||
require.NoError(cleanUpObjects(ctx, client, bucketID, objects))
|
||||
|
||||
// Delete the bucket
|
||||
deleteBucketInput := &s3.DeleteBucketInput{
|
||||
Bucket: &bucketID,
|
||||
}
|
||||
client.DeleteBucket(ctx, deleteBucketInput)
|
||||
_, err = client.DeleteBucket(ctx, deleteBucketInput)
|
||||
require.NoError(err)
|
||||
}
|
||||
|
||||
func cleanUpObjects(ctx context.Context, client *s3.Client, bucketID string, objectsToDelete []string) {
|
||||
func cleanUpObjects(ctx context.Context, client *s3.Client, bucketID string, objectsToDelete []string) error {
|
||||
var objectsIdentifier []types.ObjectIdentifier
|
||||
for _, object := range objectsToDelete {
|
||||
objectsIdentifier = append(objectsIdentifier, types.ObjectIdentifier{Key: aws.String(object)})
|
||||
|
@ -124,7 +125,8 @@ func cleanUpObjects(ctx context.Context, client *s3.Client, bucketID string, obj
|
|||
Bucket: &bucketID,
|
||||
Delete: &types.Delete{Objects: objectsIdentifier},
|
||||
}
|
||||
client.DeleteObjects(ctx, deleteObjectsInput)
|
||||
_, err := client.DeleteObjects(ctx, deleteObjectsInput)
|
||||
return err
|
||||
}
|
||||
|
||||
func TestAwsKms(t *testing.T) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue