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:
Paul Meyer 2022-08-17 13:50:43 +02:00 committed by GitHub
parent 397c9013ea
commit 0969ff4ac3
9 changed files with 28 additions and 21 deletions

View file

@ -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) {