From 2045da8be4e57ca51e26e7c2aca6c03a42288bab Mon Sep 17 00:00:00 2001 From: smilkuri Date: Wed, 3 Dec 2025 16:46:49 +0000 Subject: [PATCH] chore: convert bdd tests to e2e tests --- clients/client-acm/package.json | 2 + .../client-acm/test/acm-features.e2e.spec.ts | 39 +++++ clients/client-acm/vitest.config.e2e.mts | 10 ++ clients/client-api-gateway/package.json | 2 + .../test/apigateway-features.e2e.spec.ts | 39 +++++ .../client-api-gateway/vitest.config.e2e.mts | 10 ++ clients/client-cloudformation/package.json | 2 + .../test/cloudformation-features.e2e.spec.ts | 62 +++++++ .../vitest.config.e2e.mts | 10 ++ clients/client-cloudfront/package.json | 2 + .../test/cloudfront-features.e2e.spec.ts | 159 ++++++++++++++++++ .../client-cloudfront/vitest.config.e2e.mts | 10 ++ clients/client-cloudtrail/package.json | 2 + .../test/cloudtrail-features.e2e.spec.ts | 41 +++++ .../client-cloudtrail/vitest.config.e2e.mts | 10 ++ clients/client-cloudwatch-events/package.json | 2 + .../cloudwatch-events-features.e2e.spec.ts | 36 ++++ .../vitest.config.e2e.mts | 10 ++ .../test/cloudwatch-logs-features.e2e.spec.ts | 60 +++++++ .../test/e2e/cloudwatch-features.e2e.spec.ts | 69 ++++++++ clients/client-codecommit/package.json | 2 + .../test/codecommit-features.e2e.spec.ts | 32 ++++ .../client-codecommit/vitest.config.e2e.mts | 10 ++ clients/client-codedeploy/package.json | 2 + .../test/codedeploy-features.e2e.spec.ts | 39 +++++ .../client-codedeploy/vitest.config.e2e.mts | 10 ++ clients/client-codepipeline/package.json | 2 + .../test/codepipeline-features.e2e.spec.ts | 39 +++++ .../client-codepipeline/vitest.config.e2e.mts | 10 ++ .../e2e/cognitoidentity-features.e2e.spec.ts | 64 +++++++ clients/client-cognito-sync/package.json | 2 + .../test/cognitosync-features.e2e.spec.ts | 41 +++++ .../client-cognito-sync/vitest.config.e2e.mts | 8 + clients/client-config-service/package.json | 2 + .../test/configservice-features.e2e.spec.ts | 40 +++++ .../vitest.config.e2e.mts | 10 ++ clients/client-data-pipeline/package.json | 2 + .../test/datapipeline-features.e2e.spec.ts | 42 +++++ .../vitest.config.e2e.mts | 10 ++ .../package.json | 2 + .../test/dms-features.e2e.spec.ts | 41 +++++ .../vitest.config.e2e.mts | 10 ++ clients/client-device-farm/package.json | 2 + .../test/devicefarm-features.e2e.spec.ts | 40 +++++ .../client-device-farm/vitest.config.e2e.mts | 10 ++ clients/client-direct-connect/package.json | 2 + .../test/directconnect-features.e2e.spec.ts | 42 +++++ .../vitest.config.e2e.mts | 10 ++ clients/client-directory-service/package.json | 2 + .../directoryservice-features.e2e.spec.ts | 42 +++++ .../vitest.config.e2e.mts | 10 ++ clients/client-dynamodb-streams/package.json | 2 + .../test/dynamodbstreams-features.e2e.spec.ts | 40 +++++ .../vitest.config.e2e.mts | 10 ++ clients/client-ecr/package.json | 2 + .../client-ecr/test/ecr-features.e2e.spec.ts | 40 +++++ clients/client-ecr/vitest.config.e2e.mts | 10 ++ clients/client-ecs/package.json | 2 + .../client-ecs/test/ecs-features.e2e.spec.ts | 42 +++++ clients/client-ecs/vitest.config.e2e.mts | 10 ++ clients/client-efs/package.json | 2 + .../client-efs/test/efs-features.e2e.spec.ts | 40 +++++ clients/client-efs/vitest.config.e2e.mts | 10 ++ clients/client-elastic-beanstalk/package.json | 2 + .../elasticbeanstalk-features.e2e.spec.ts | 75 +++++++++ .../vitest.config.e2e.mts | 10 ++ .../package.json | 2 + .../test/elbv2-features.e2e.spec.ts | 40 +++++ .../vitest.config.e2e.mts | 10 ++ .../package.json | 2 + .../test/elb-features.e2e.spec.ts | 50 ++++++ .../vitest.config.e2e.mts | 10 ++ clients/client-elasticache/package.json | 2 + .../test/elasticache-features.e2e.spec.ts | 65 +++++++ .../client-elasticache/vitest.config.e2e.mts | 10 ++ .../client-elasticsearch-service/package.json | 2 + .../test/es-features.e2e.spec.ts | 40 +++++ .../vitest.config.e2e.mts | 10 ++ clients/client-emr/package.json | 2 + .../client-emr/test/emr-features.e2e.spec.ts | 41 +++++ clients/client-emr/vitest.config.e2e.mts | 10 ++ clients/client-gamelift/package.json | 2 + .../test/gamelift-features.e2e.spec.ts | 40 +++++ clients/client-gamelift/vitest.config.e2e.mts | 10 ++ clients/client-iam/package.json | 2 + .../client-iam/test/iam-features.e2e.spec.ts | 67 ++++++++ clients/client-iam/vitest.config.e2e.mts | 10 ++ clients/client-iot/package.json | 2 + .../client-iot/test/iot-features.e2e.spec.ts | 40 +++++ clients/client-iot/vitest.config.e2e.mts | 10 ++ .../test/kinesis-features.e2e.spec.ts | 31 ++++ clients/client-kinesis/vitest.config.e2e.mts | 2 + clients/client-kms/package.json | 2 + .../client-kms/test/kms-features.e2e.spec.ts | 41 +++++ clients/client-kms/vitest.config.e2e.mts | 10 ++ clients/client-lambda/package.json | 2 + .../test/lambda-features.e2e.spec.ts | 40 +++++ clients/client-lambda/vitest.config.e2e.mts | 10 ++ clients/client-redshift/package.json | 2 + .../test/redshift-features.e2e.spec.ts | 41 +++++ clients/client-redshift/vitest.config.e2e.mts | 10 ++ clients/client-route-53-domains/package.json | 2 + .../test/route53domains-features.e2e.spec.ts | 54 ++++++ .../vitest.config.e2e.mts | 10 ++ clients/client-route-53/package.json | 2 + .../test/route53-features.e2e.spec.ts | 40 +++++ clients/client-route-53/vitest.config.e2e.mts | 10 ++ clients/client-sagemaker/package.json | 2 + .../test/sagemaker-features.e2e.spec.ts | 40 +++++ .../client-sagemaker/vitest.config.e2e.mts | 10 ++ clients/client-ses/package.json | 2 + .../client-ses/test/ses-features.e2e.spec.ts | 52 ++++++ clients/client-ses/vitest.config.e2e.mts | 10 ++ clients/client-sns/package.json | 2 + .../client-sns/test/sns-features.e2e.spec.ts | 49 ++++++ clients/client-sns/vitest.config.e2e.mts | 10 ++ features/acm/acm.feature | 17 -- features/acm/step_definitions/acm.js | 7 - features/apigateway/apigateway.feature | 17 -- .../apigateway/step_definitions/apigateway.js | 7 - .../cloudformation/cloudformation.feature | 20 --- .../step_definitions/cloudformation.js | 18 -- features/cloudfront/cloudfront.feature | 20 --- .../cloudfront/step_definitions/cloudfront.js | 71 -------- features/cloudtrail/cloudtrail.feature | 17 -- .../cloudtrail/step_definitions/cloudtrail.js | 15 -- features/cloudwatch/cloudwatch.feature | 14 -- .../cloudwatch/step_definitions/cloudwatch.js | 43 ----- .../cloudwatchevents/cloudwatchevents.feature | 17 -- .../step_definitions/cloudwatchevents.js | 7 - .../cloudwatchlogs/cloudwatchlogs.feature | 14 -- .../step_definitions/cloudwatchlogs.js | 30 ---- features/codecommit/codecommit.feature | 17 -- .../codecommit/step_definitions/codecommit.js | 7 - features/codedeploy/codedeploy.feature | 17 -- .../codedeploy/step_definitions/codedeploy.js | 7 - features/codepipeline/codepipeline.feature | 17 -- .../step_definitions/codepipeline.js | 7 - .../cognitoidentity/cognitoidentity.feature | 14 -- .../step_definitions/cognitoidentity.js | 29 ---- features/cognitosync/cognitosync.feature | 16 -- .../step_definitions/cognitosync.js | 19 --- features/configservice/configservice.feature | 17 -- .../step_definitions/configservice.js | 7 - features/datapipeline/datapipeline.feature | 18 -- .../step_definitions/datapipeline.js | 15 -- features/devicefarm/devicefarm.feature | 17 -- .../devicefarm/step_definitions/devicefarm.js | 7 - features/directconnect/directconnect.feature | 14 -- .../step_definitions/directconnect.js | 16 -- .../directoryservice/directoryservice.feature | 17 -- .../step_definitions/directoryservice.js | 7 - features/dms/dms.feature | 17 -- features/dms/step_definitions/dms.js | 7 - .../dynamodbstreams/dynamodbstreams.feature | 17 -- .../step_definitions/dynamodbstreams.js | 7 - features/ecr/ecr.feature | 17 -- features/ecr/step_definitions/ecr.js | 7 - features/ecs/ecs.feature | 17 -- features/ecs/step_definitions/ecs.js | 7 - features/efs/efs.feature | 17 -- features/efs/step_definitions/efs.js | 7 - features/elasticache/elasticache.feature | 20 --- .../step_definitions/elasticache.js | 46 ----- .../elasticbeanstalk/elasticbeanstalk.feature | 21 --- .../step_definitions/elasticbeanstalk.js | 44 ----- features/elb/elb.feature | 14 -- features/elb/step_definitions/elb.js | 48 ------ features/elbv2/elbv2.feature | 17 -- features/elbv2/step_definitions/elbv2.js | 7 - features/emr/emr.feature | 14 -- features/emr/step_definitions/emr.js | 14 -- features/es/es.feature | 17 -- features/es/step_definitions/es.js | 7 - features/gamelift/gamelift.feature | 17 -- .../gamelift/step_definitions/gamelift.js | 7 - features/iam/iam.feature | 20 --- features/iam/step_definitions/iam.js | 57 ------- features/iot/iot.feature | 17 -- features/iot/step_definitions/iot.js | 7 - features/kinesis/kinesis.feature | 9 - features/kinesis/step_definitions/kinesis.js | 11 -- features/kms/kms.feature | 17 -- features/kms/step_definitions/kms.js | 7 - features/lambda/lambda.feature | 17 -- features/lambda/step_definitions/lambda.js | 7 - features/pinpoint/pinpoint.feature | 35 ---- .../pinpoint/step_definitions/pinpoint.js | 47 ------ features/redshift/redshift.feature | 18 -- .../redshift/step_definitions/redshift.js | 17 -- features/route53/route53.feature | 17 -- features/route53/step_definitions/route53.js | 123 -------------- .../route53domains/route53domains.feature | 14 -- .../step_definitions/route53domains.js | 22 --- features/sagemaker/sagemaker.feature | 17 -- .../sagemaker/step_definitions/sagemaker.js | 7 - features/ses/ses.feature | 20 --- features/ses/step_definitions/ses.js | 31 ---- features/sns/sns.feature | 14 -- features/sns/step_definitions/sns.js | 38 ----- 200 files changed, 2419 insertions(+), 1621 deletions(-) create mode 100644 clients/client-acm/test/acm-features.e2e.spec.ts create mode 100644 clients/client-acm/vitest.config.e2e.mts create mode 100644 clients/client-api-gateway/test/apigateway-features.e2e.spec.ts create mode 100644 clients/client-api-gateway/vitest.config.e2e.mts create mode 100644 clients/client-cloudformation/test/cloudformation-features.e2e.spec.ts create mode 100644 clients/client-cloudformation/vitest.config.e2e.mts create mode 100644 clients/client-cloudfront/test/cloudfront-features.e2e.spec.ts create mode 100644 clients/client-cloudfront/vitest.config.e2e.mts create mode 100644 clients/client-cloudtrail/test/cloudtrail-features.e2e.spec.ts create mode 100644 clients/client-cloudtrail/vitest.config.e2e.mts create mode 100644 clients/client-cloudwatch-events/test/cloudwatch-events-features.e2e.spec.ts create mode 100644 clients/client-cloudwatch-events/vitest.config.e2e.mts create mode 100644 clients/client-cloudwatch-logs/test/cloudwatch-logs-features.e2e.spec.ts create mode 100644 clients/client-cloudwatch/test/e2e/cloudwatch-features.e2e.spec.ts create mode 100644 clients/client-codecommit/test/codecommit-features.e2e.spec.ts create mode 100644 clients/client-codecommit/vitest.config.e2e.mts create mode 100644 clients/client-codedeploy/test/codedeploy-features.e2e.spec.ts create mode 100644 clients/client-codedeploy/vitest.config.e2e.mts create mode 100644 clients/client-codepipeline/test/codepipeline-features.e2e.spec.ts create mode 100644 clients/client-codepipeline/vitest.config.e2e.mts create mode 100644 clients/client-cognito-identity/test/e2e/cognitoidentity-features.e2e.spec.ts create mode 100644 clients/client-cognito-sync/test/cognitosync-features.e2e.spec.ts create mode 100644 clients/client-cognito-sync/vitest.config.e2e.mts create mode 100644 clients/client-config-service/test/configservice-features.e2e.spec.ts create mode 100644 clients/client-config-service/vitest.config.e2e.mts create mode 100644 clients/client-data-pipeline/test/datapipeline-features.e2e.spec.ts create mode 100644 clients/client-data-pipeline/vitest.config.e2e.mts create mode 100644 clients/client-database-migration-service/test/dms-features.e2e.spec.ts create mode 100644 clients/client-database-migration-service/vitest.config.e2e.mts create mode 100644 clients/client-device-farm/test/devicefarm-features.e2e.spec.ts create mode 100644 clients/client-device-farm/vitest.config.e2e.mts create mode 100644 clients/client-direct-connect/test/directconnect-features.e2e.spec.ts create mode 100644 clients/client-direct-connect/vitest.config.e2e.mts create mode 100644 clients/client-directory-service/test/directoryservice-features.e2e.spec.ts create mode 100644 clients/client-directory-service/vitest.config.e2e.mts create mode 100644 clients/client-dynamodb-streams/test/dynamodbstreams-features.e2e.spec.ts create mode 100644 clients/client-dynamodb-streams/vitest.config.e2e.mts create mode 100644 clients/client-ecr/test/ecr-features.e2e.spec.ts create mode 100644 clients/client-ecr/vitest.config.e2e.mts create mode 100644 clients/client-ecs/test/ecs-features.e2e.spec.ts create mode 100644 clients/client-ecs/vitest.config.e2e.mts create mode 100644 clients/client-efs/test/efs-features.e2e.spec.ts create mode 100644 clients/client-efs/vitest.config.e2e.mts create mode 100644 clients/client-elastic-beanstalk/test/elasticbeanstalk-features.e2e.spec.ts create mode 100644 clients/client-elastic-beanstalk/vitest.config.e2e.mts create mode 100644 clients/client-elastic-load-balancing-v2/test/elbv2-features.e2e.spec.ts create mode 100644 clients/client-elastic-load-balancing-v2/vitest.config.e2e.mts create mode 100644 clients/client-elastic-load-balancing/test/elb-features.e2e.spec.ts create mode 100644 clients/client-elastic-load-balancing/vitest.config.e2e.mts create mode 100644 clients/client-elasticache/test/elasticache-features.e2e.spec.ts create mode 100644 clients/client-elasticache/vitest.config.e2e.mts create mode 100644 clients/client-elasticsearch-service/test/es-features.e2e.spec.ts create mode 100644 clients/client-elasticsearch-service/vitest.config.e2e.mts create mode 100644 clients/client-emr/test/emr-features.e2e.spec.ts create mode 100644 clients/client-emr/vitest.config.e2e.mts create mode 100644 clients/client-gamelift/test/gamelift-features.e2e.spec.ts create mode 100644 clients/client-gamelift/vitest.config.e2e.mts create mode 100644 clients/client-iam/test/iam-features.e2e.spec.ts create mode 100644 clients/client-iam/vitest.config.e2e.mts create mode 100644 clients/client-iot/test/iot-features.e2e.spec.ts create mode 100644 clients/client-iot/vitest.config.e2e.mts create mode 100644 clients/client-kinesis/test/kinesis-features.e2e.spec.ts create mode 100644 clients/client-kms/test/kms-features.e2e.spec.ts create mode 100644 clients/client-kms/vitest.config.e2e.mts create mode 100644 clients/client-lambda/test/lambda-features.e2e.spec.ts create mode 100644 clients/client-lambda/vitest.config.e2e.mts create mode 100644 clients/client-redshift/test/redshift-features.e2e.spec.ts create mode 100644 clients/client-redshift/vitest.config.e2e.mts create mode 100644 clients/client-route-53-domains/test/route53domains-features.e2e.spec.ts create mode 100644 clients/client-route-53-domains/vitest.config.e2e.mts create mode 100644 clients/client-route-53/test/route53-features.e2e.spec.ts create mode 100644 clients/client-route-53/vitest.config.e2e.mts create mode 100644 clients/client-sagemaker/test/sagemaker-features.e2e.spec.ts create mode 100644 clients/client-sagemaker/vitest.config.e2e.mts create mode 100644 clients/client-ses/test/ses-features.e2e.spec.ts create mode 100644 clients/client-ses/vitest.config.e2e.mts create mode 100644 clients/client-sns/test/sns-features.e2e.spec.ts create mode 100644 clients/client-sns/vitest.config.e2e.mts delete mode 100644 features/acm/acm.feature delete mode 100644 features/acm/step_definitions/acm.js delete mode 100644 features/apigateway/apigateway.feature delete mode 100644 features/apigateway/step_definitions/apigateway.js delete mode 100644 features/cloudformation/cloudformation.feature delete mode 100644 features/cloudformation/step_definitions/cloudformation.js delete mode 100644 features/cloudfront/cloudfront.feature delete mode 100644 features/cloudfront/step_definitions/cloudfront.js delete mode 100644 features/cloudtrail/cloudtrail.feature delete mode 100644 features/cloudtrail/step_definitions/cloudtrail.js delete mode 100644 features/cloudwatch/cloudwatch.feature delete mode 100644 features/cloudwatch/step_definitions/cloudwatch.js delete mode 100644 features/cloudwatchevents/cloudwatchevents.feature delete mode 100644 features/cloudwatchevents/step_definitions/cloudwatchevents.js delete mode 100644 features/cloudwatchlogs/cloudwatchlogs.feature delete mode 100644 features/cloudwatchlogs/step_definitions/cloudwatchlogs.js delete mode 100644 features/codecommit/codecommit.feature delete mode 100644 features/codecommit/step_definitions/codecommit.js delete mode 100644 features/codedeploy/codedeploy.feature delete mode 100644 features/codedeploy/step_definitions/codedeploy.js delete mode 100644 features/codepipeline/codepipeline.feature delete mode 100644 features/codepipeline/step_definitions/codepipeline.js delete mode 100644 features/cognitoidentity/cognitoidentity.feature delete mode 100644 features/cognitoidentity/step_definitions/cognitoidentity.js delete mode 100644 features/cognitosync/cognitosync.feature delete mode 100644 features/cognitosync/step_definitions/cognitosync.js delete mode 100644 features/configservice/configservice.feature delete mode 100644 features/configservice/step_definitions/configservice.js delete mode 100644 features/datapipeline/datapipeline.feature delete mode 100644 features/datapipeline/step_definitions/datapipeline.js delete mode 100644 features/devicefarm/devicefarm.feature delete mode 100644 features/devicefarm/step_definitions/devicefarm.js delete mode 100644 features/directconnect/directconnect.feature delete mode 100644 features/directconnect/step_definitions/directconnect.js delete mode 100644 features/directoryservice/directoryservice.feature delete mode 100644 features/directoryservice/step_definitions/directoryservice.js delete mode 100644 features/dms/dms.feature delete mode 100644 features/dms/step_definitions/dms.js delete mode 100644 features/dynamodbstreams/dynamodbstreams.feature delete mode 100644 features/dynamodbstreams/step_definitions/dynamodbstreams.js delete mode 100644 features/ecr/ecr.feature delete mode 100644 features/ecr/step_definitions/ecr.js delete mode 100644 features/ecs/ecs.feature delete mode 100644 features/ecs/step_definitions/ecs.js delete mode 100644 features/efs/efs.feature delete mode 100644 features/efs/step_definitions/efs.js delete mode 100644 features/elasticache/elasticache.feature delete mode 100644 features/elasticache/step_definitions/elasticache.js delete mode 100644 features/elasticbeanstalk/elasticbeanstalk.feature delete mode 100644 features/elasticbeanstalk/step_definitions/elasticbeanstalk.js delete mode 100644 features/elb/elb.feature delete mode 100644 features/elb/step_definitions/elb.js delete mode 100644 features/elbv2/elbv2.feature delete mode 100644 features/elbv2/step_definitions/elbv2.js delete mode 100644 features/emr/emr.feature delete mode 100644 features/emr/step_definitions/emr.js delete mode 100644 features/es/es.feature delete mode 100644 features/es/step_definitions/es.js delete mode 100644 features/gamelift/gamelift.feature delete mode 100644 features/gamelift/step_definitions/gamelift.js delete mode 100644 features/iam/iam.feature delete mode 100644 features/iam/step_definitions/iam.js delete mode 100644 features/iot/iot.feature delete mode 100644 features/iot/step_definitions/iot.js delete mode 100644 features/kinesis/kinesis.feature delete mode 100644 features/kinesis/step_definitions/kinesis.js delete mode 100644 features/kms/kms.feature delete mode 100644 features/kms/step_definitions/kms.js delete mode 100644 features/lambda/lambda.feature delete mode 100644 features/lambda/step_definitions/lambda.js delete mode 100644 features/pinpoint/pinpoint.feature delete mode 100644 features/pinpoint/step_definitions/pinpoint.js delete mode 100644 features/redshift/redshift.feature delete mode 100644 features/redshift/step_definitions/redshift.js delete mode 100644 features/route53/route53.feature delete mode 100644 features/route53/step_definitions/route53.js delete mode 100644 features/route53domains/route53domains.feature delete mode 100644 features/route53domains/step_definitions/route53domains.js delete mode 100644 features/sagemaker/sagemaker.feature delete mode 100644 features/sagemaker/step_definitions/sagemaker.js delete mode 100644 features/ses/ses.feature delete mode 100644 features/ses/step_definitions/ses.js delete mode 100644 features/sns/sns.feature delete mode 100644 features/sns/step_definitions/sns.js diff --git a/clients/client-acm/package.json b/clients/client-acm/package.json index 8f32e9fd2882..df13090feb4b 100644 --- a/clients/client-acm/package.json +++ b/clients/client-acm/package.json @@ -12,6 +12,8 @@ "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo", "extract:docs": "api-extractor run --local", "generate:client": "node ../../scripts/generate-clients/single-service --solo acm", + "test:e2e": "yarn g:vitest run -c vitest.config.e2e.mts", + "test:e2e:watch": "yarn g:vitest watch -c vitest.config.e2e.mts", "test:index": "tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs" }, "main": "./dist-cjs/index.js", diff --git a/clients/client-acm/test/acm-features.e2e.spec.ts b/clients/client-acm/test/acm-features.e2e.spec.ts new file mode 100644 index 000000000000..e066b1ca90d7 --- /dev/null +++ b/clients/client-acm/test/acm-features.e2e.spec.ts @@ -0,0 +1,39 @@ +import { getE2eTestResources } from "@aws-sdk/aws-util-test/src"; +import { ACM } from "@aws-sdk/client-acm"; +import { beforeAll, describe, expect, test as it } from "vitest"; + +describe("@aws-sdk/client-acm", () => { + let client: ACM; + let region: string; + + beforeAll(async () => { + const e2eTestResourcesEnv = await getE2eTestResources(); + Object.assign(process.env, e2eTestResourcesEnv); + + region = process?.env?.AWS_SMOKE_TEST_REGION as string; + + client = new ACM({ region }); + }); + + describe("Making a request to ACM service", () => { + it("should successfully list certificates", async () => { + const result = await client.listCertificates({}); + + expect(Array.isArray(result.CertificateSummaryList)).toBe(true); + }); + }); + + describe("Error handling", () => { + it("should handle ValidationException for invalid certificate ARN", async () => { + await expect( + client.describeCertificate({ + CertificateArn: "fake_arn", + }) + ).rejects.toThrow( + expect.objectContaining({ + name: "ValidationException", + }) + ); + }); + }); +}); diff --git a/clients/client-acm/vitest.config.e2e.mts b/clients/client-acm/vitest.config.e2e.mts new file mode 100644 index 000000000000..ccea26a45905 --- /dev/null +++ b/clients/client-acm/vitest.config.e2e.mts @@ -0,0 +1,10 @@ +import { defineConfig } from "vitest/config"; + +export default defineConfig({ + test: { + exclude: ["**/*.browser.e2e.spec.ts"], + include: ["**/*.e2e.spec.ts"], + environment: "node", + }, + mode: "development", +}); diff --git a/clients/client-api-gateway/package.json b/clients/client-api-gateway/package.json index dd448114507a..31fb172b758c 100644 --- a/clients/client-api-gateway/package.json +++ b/clients/client-api-gateway/package.json @@ -12,6 +12,8 @@ "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo", "extract:docs": "api-extractor run --local", "generate:client": "node ../../scripts/generate-clients/single-service --solo api-gateway", + "test:e2e": "yarn g:vitest run -c vitest.config.e2e.mts", + "test:e2e:watch": "yarn g:vitest watch -c vitest.config.e2e.mts", "test:index": "tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs" }, "main": "./dist-cjs/index.js", diff --git a/clients/client-api-gateway/test/apigateway-features.e2e.spec.ts b/clients/client-api-gateway/test/apigateway-features.e2e.spec.ts new file mode 100644 index 000000000000..1f63811a3091 --- /dev/null +++ b/clients/client-api-gateway/test/apigateway-features.e2e.spec.ts @@ -0,0 +1,39 @@ +import { getE2eTestResources } from "@aws-sdk/aws-util-test/src"; +import { APIGateway } from "@aws-sdk/client-api-gateway"; +import { beforeAll, describe, expect, test as it } from "vitest"; + +describe("@aws-sdk/client-api-gateway", () => { + let client: APIGateway; + let region: string; + + beforeAll(async () => { + const e2eTestResourcesEnv = await getE2eTestResources(); + Object.assign(process.env, e2eTestResourcesEnv); + + region = process?.env?.AWS_SMOKE_TEST_REGION as string; + + client = new APIGateway({ region }); + }); + + describe("Making a request", () => { + it("should successfully get REST APIs", async () => { + const result = await client.getRestApis({}); + + expect(Array.isArray(result.items)).toBe(true); + }); + }); + + describe("Error handling", () => { + it("should handle NotFoundException for invalid REST API ID", async () => { + await expect( + client.getRestApi({ + restApiId: "fake_id", + }) + ).rejects.toThrow( + expect.objectContaining({ + name: "NotFoundException", + }) + ); + }); + }); +}); diff --git a/clients/client-api-gateway/vitest.config.e2e.mts b/clients/client-api-gateway/vitest.config.e2e.mts new file mode 100644 index 000000000000..ccea26a45905 --- /dev/null +++ b/clients/client-api-gateway/vitest.config.e2e.mts @@ -0,0 +1,10 @@ +import { defineConfig } from "vitest/config"; + +export default defineConfig({ + test: { + exclude: ["**/*.browser.e2e.spec.ts"], + include: ["**/*.e2e.spec.ts"], + environment: "node", + }, + mode: "development", +}); diff --git a/clients/client-cloudformation/package.json b/clients/client-cloudformation/package.json index c662d2079d42..2003ab5427f2 100644 --- a/clients/client-cloudformation/package.json +++ b/clients/client-cloudformation/package.json @@ -12,6 +12,8 @@ "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo", "extract:docs": "api-extractor run --local", "generate:client": "node ../../scripts/generate-clients/single-service --solo cloudformation", + "test:e2e": "yarn g:vitest run -c vitest.config.e2e.mts", + "test:e2e:watch": "yarn g:vitest watch -c vitest.config.e2e.mts", "test:index": "tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs" }, "main": "./dist-cjs/index.js", diff --git a/clients/client-cloudformation/test/cloudformation-features.e2e.spec.ts b/clients/client-cloudformation/test/cloudformation-features.e2e.spec.ts new file mode 100644 index 000000000000..7b223cab841a --- /dev/null +++ b/clients/client-cloudformation/test/cloudformation-features.e2e.spec.ts @@ -0,0 +1,62 @@ +import { getE2eTestResources } from "@aws-sdk/aws-util-test/src"; +import { CloudFormation, paginateListStacks } from "@aws-sdk/client-cloudformation"; +import { beforeAll, describe, expect, test as it } from "vitest"; + +describe("@aws-sdk/client-cloudformation", () => { + let client: CloudFormation; + let region: string; + + beforeAll(async () => { + const e2eTestResourcesEnv = await getE2eTestResources(); + Object.assign(process.env, e2eTestResourcesEnv); + + region = process?.env?.AWS_SMOKE_TEST_REGION as string; + + client = new CloudFormation({ region }); + }); + + describe("Describing stacks", () => { + it("should return stacks list when describe stacks is called", async () => { + const result = await client.describeStacks({}); + + expect(result).toBeDefined(); + expect(result.Stacks).toBeDefined(); + expect(Array.isArray(result.Stacks)).toBe(true); + }); + }); + + describe("Error handling", () => { + it("should handle ValidationError for invalid stack creation", async () => { + const templateBody = '{"Resources":{"member":{"Type":"AWS::SQS::Queue"}}}'; + + await expect( + client.createStack({ + TemplateBody: templateBody, + StackName: "", // Empty name should cause ValidationError + }) + ).rejects.toThrow( + expect.objectContaining({ + name: "ValidationError", + }) + ); + }); + }); + + describe("Paginating responses", () => { + it("should paginate listStacks operation", async () => { + const paginator = paginateListStacks({ client }, {}); + + let pageCount = 0; + let lastPage; + + for await (const page of paginator) { + pageCount++; + lastPage = page; + } + + expect(pageCount).toBeGreaterThanOrEqual(1); + expect(lastPage).toBeDefined(); + expect(lastPage?.NextToken).toBeUndefined(); // The last page must not contain a marker + }); + }); +}); diff --git a/clients/client-cloudformation/vitest.config.e2e.mts b/clients/client-cloudformation/vitest.config.e2e.mts new file mode 100644 index 000000000000..ccea26a45905 --- /dev/null +++ b/clients/client-cloudformation/vitest.config.e2e.mts @@ -0,0 +1,10 @@ +import { defineConfig } from "vitest/config"; + +export default defineConfig({ + test: { + exclude: ["**/*.browser.e2e.spec.ts"], + include: ["**/*.e2e.spec.ts"], + environment: "node", + }, + mode: "development", +}); diff --git a/clients/client-cloudfront/package.json b/clients/client-cloudfront/package.json index 21af8131eabc..d5011a518eee 100644 --- a/clients/client-cloudfront/package.json +++ b/clients/client-cloudfront/package.json @@ -12,6 +12,8 @@ "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo", "extract:docs": "api-extractor run --local", "generate:client": "node ../../scripts/generate-clients/single-service --solo cloudfront", + "test:e2e": "yarn g:vitest run -c vitest.config.e2e.mts", + "test:e2e:watch": "yarn g:vitest watch -c vitest.config.e2e.mts", "test:index": "tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs" }, "main": "./dist-cjs/index.js", diff --git a/clients/client-cloudfront/test/cloudfront-features.e2e.spec.ts b/clients/client-cloudfront/test/cloudfront-features.e2e.spec.ts new file mode 100644 index 000000000000..1f070a6500fa --- /dev/null +++ b/clients/client-cloudfront/test/cloudfront-features.e2e.spec.ts @@ -0,0 +1,159 @@ +import { getE2eTestResources } from "@aws-sdk/aws-util-test/src"; +import { CloudFront } from "@aws-sdk/client-cloudfront"; +import { beforeAll, describe, expect, test as it } from "vitest"; + +describe("@aws-sdk/client-cloudfront", () => { + let client: CloudFront; + let region: string; + + beforeAll(async () => { + const e2eTestResourcesEnv = await getE2eTestResources(); + Object.assign(process.env, e2eTestResourcesEnv); + + region = process?.env?.AWS_SMOKE_TEST_REGION as string; + + client = new CloudFront({ region }); + }, 60_000); + + describe("List distributions", () => { + it("should return distribution list with quantity property", async () => { + const result = await client.listDistributions({}); + + expect(typeof result.DistributionList?.Quantity).toBe("number"); + }); + }); + + describe("Create a distribution", () => { + it("should handle NoSuchOrigin error for invalid origin", async () => { + const uniqueRef = `aws-js-sdk-${Date.now()}-${process.pid}-${Math.random().toString(36).substr(2, 9)}`; + const distributionConfig = { + CallerReference: uniqueRef, + Aliases: { + Quantity: 0, + }, + DefaultRootObject: "", + Origins: { + Items: [ + { + Id: "InvalidOrigin", + DomainName: "example.com", + CustomOriginConfig: { + HTTPPort: 80, + HTTPSPort: 443, + OriginProtocolPolicy: "match-viewer" as const, + }, + }, + ], + Quantity: 1, + }, + DefaultCacheBehavior: { + TargetOriginId: "NonExistentOrigin", + ForwardedValues: { + QueryString: false, + Cookies: { + Forward: "all" as const, + }, + }, + TrustedSigners: { + Items: [], + Enabled: false, + Quantity: 0, + }, + ViewerProtocolPolicy: "allow-all" as const, + MinTTL: 0, + }, + CacheBehaviors: { + Items: [], + Quantity: 0, + }, + Comment: "", + Logging: { + Enabled: false, + Bucket: "invalidbucket.s3.amazonaws.com", + Prefix: "prefix", + IncludeCookies: false, + }, + PriceClass: "PriceClass_All" as const, + Enabled: false, + }; + + await expect( + client.createDistribution({ + DistributionConfig: distributionConfig, + }) + ).rejects.toThrow( + expect.objectContaining({ + name: "NoSuchOrigin", + $metadata: expect.objectContaining({ + httpStatusCode: 404, + }), + }) + ); + }); + }); + + describe("Error handling", () => { + it("should handle InvalidArgument for empty name prefix", async () => { + const distributionConfig = { + CallerReference: "", + Aliases: { + Quantity: 0, + }, + DefaultRootObject: "", + Origins: { + Items: [ + { + Id: "origin", + DomainName: "example.com", + CustomOriginConfig: { + HTTPPort: 80, + HTTPSPort: 443, + OriginProtocolPolicy: "match-viewer" as const, + }, + }, + ], + Quantity: 1, + }, + DefaultCacheBehavior: { + TargetOriginId: "origin", + ForwardedValues: { + QueryString: false, + Cookies: { + Forward: "all" as const, + }, + }, + TrustedSigners: { + Items: [], + Enabled: false, + Quantity: 0, + }, + ViewerProtocolPolicy: "allow-all" as const, + MinTTL: 0, + }, + CacheBehaviors: { + Items: [], + Quantity: 0, + }, + Comment: "", + Logging: { + Enabled: false, + Bucket: "invalidbucket.s3.amazonaws.com", + Prefix: "prefix", + IncludeCookies: false, + }, + PriceClass: "PriceClass_All" as const, + Enabled: false, + }; + + await expect( + client.createDistribution({ + DistributionConfig: distributionConfig, + }) + ).rejects.toThrow( + expect.objectContaining({ + name: "InvalidArgument", + }) + ); + }); + }); +}, 60_000); diff --git a/clients/client-cloudfront/vitest.config.e2e.mts b/clients/client-cloudfront/vitest.config.e2e.mts new file mode 100644 index 000000000000..ccea26a45905 --- /dev/null +++ b/clients/client-cloudfront/vitest.config.e2e.mts @@ -0,0 +1,10 @@ +import { defineConfig } from "vitest/config"; + +export default defineConfig({ + test: { + exclude: ["**/*.browser.e2e.spec.ts"], + include: ["**/*.e2e.spec.ts"], + environment: "node", + }, + mode: "development", +}); diff --git a/clients/client-cloudtrail/package.json b/clients/client-cloudtrail/package.json index 3020c961341e..c7a7384c2e9c 100644 --- a/clients/client-cloudtrail/package.json +++ b/clients/client-cloudtrail/package.json @@ -12,6 +12,8 @@ "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo", "extract:docs": "api-extractor run --local", "generate:client": "node ../../scripts/generate-clients/single-service --solo cloudtrail", + "test:e2e": "yarn g:vitest run -c vitest.config.e2e.mts", + "test:e2e:watch": "yarn g:vitest watch -c vitest.config.e2e.mts", "test:index": "tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs" }, "main": "./dist-cjs/index.js", diff --git a/clients/client-cloudtrail/test/cloudtrail-features.e2e.spec.ts b/clients/client-cloudtrail/test/cloudtrail-features.e2e.spec.ts new file mode 100644 index 000000000000..9ca5c7706dc6 --- /dev/null +++ b/clients/client-cloudtrail/test/cloudtrail-features.e2e.spec.ts @@ -0,0 +1,41 @@ +import { getE2eTestResources } from "@aws-sdk/aws-util-test/src"; +import { CloudTrail } from "@aws-sdk/client-cloudtrail"; +import { beforeAll, describe, expect, test as it } from "vitest"; + +describe("@aws-sdk/client-cloudtrail", () => { + let client: CloudTrail; + let region: string; + + beforeAll(async () => { + const e2eTestResourcesEnv = await getE2eTestResources(); + Object.assign(process.env, e2eTestResourcesEnv); + + region = process?.env?.AWS_SMOKE_TEST_REGION as string; + + client = new CloudTrail({ region }); + }); + + describe("Describe trails", () => { + it("should return trails list when describe trails is called", async () => { + const result = await client.describeTrails({}); + + expect(result.$metadata?.httpStatusCode).toBe(200); + }); + }); + + describe("Error handling", () => { + it("should handle InvalidTrailNameException for invalid trail name", async () => { + await expect( + client.createTrail({ + Name: "", // Empty name should cause InvalidTrailNameException + S3BucketName: "test-bucket", + }) + ).rejects.toThrow( + expect.objectContaining({ + name: "InvalidTrailNameException", + message: expect.stringContaining("cannot be blank"), + }) + ); + }); + }); +}); diff --git a/clients/client-cloudtrail/vitest.config.e2e.mts b/clients/client-cloudtrail/vitest.config.e2e.mts new file mode 100644 index 000000000000..ccea26a45905 --- /dev/null +++ b/clients/client-cloudtrail/vitest.config.e2e.mts @@ -0,0 +1,10 @@ +import { defineConfig } from "vitest/config"; + +export default defineConfig({ + test: { + exclude: ["**/*.browser.e2e.spec.ts"], + include: ["**/*.e2e.spec.ts"], + environment: "node", + }, + mode: "development", +}); diff --git a/clients/client-cloudwatch-events/package.json b/clients/client-cloudwatch-events/package.json index 5dc241792b33..c1e152a0ae53 100644 --- a/clients/client-cloudwatch-events/package.json +++ b/clients/client-cloudwatch-events/package.json @@ -12,6 +12,8 @@ "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo", "extract:docs": "api-extractor run --local", "generate:client": "node ../../scripts/generate-clients/single-service --solo cloudwatch-events", + "test:e2e": "yarn g:vitest run -c vitest.config.e2e.mts", + "test:e2e:watch": "yarn g:vitest watch -c vitest.config.e2e.mts", "test:index": "tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs" }, "main": "./dist-cjs/index.js", diff --git a/clients/client-cloudwatch-events/test/cloudwatch-events-features.e2e.spec.ts b/clients/client-cloudwatch-events/test/cloudwatch-events-features.e2e.spec.ts new file mode 100644 index 000000000000..e458da31e6e8 --- /dev/null +++ b/clients/client-cloudwatch-events/test/cloudwatch-events-features.e2e.spec.ts @@ -0,0 +1,36 @@ +import { getE2eTestResources } from "@aws-sdk/aws-util-test/src"; +import { CloudWatchEvents } from "@aws-sdk/client-cloudwatch-events"; +import { beforeAll, describe, expect, test as it } from "vitest"; + +describe("@aws-sdk/client-cloudwatch-events", () => { + let client: CloudWatchEvents; + let region: string; + + beforeAll(async () => { + const e2eTestResourcesEnv = await getE2eTestResources(); + Object.assign(process.env, e2eTestResourcesEnv); + + region = process?.env?.AWS_SMOKE_TEST_REGION as string; + + client = new CloudWatchEvents({ region }); + }); + + describe("Making a request", () => { + it("should successfully list rules and return Rules as a list", async () => { + const result = await client.listRules({}); + + expect(result.$metadata?.httpStatusCode).toBe(200); + expect(Array.isArray(result.Rules)).toBe(true); + }); + }); + + describe("Error handling", () => { + it("should handle ResourceNotFoundException for fake rule", async () => { + await expect(client.describeRule({ Name: "fake_rule" })).rejects.toThrow( + expect.objectContaining({ + name: "ResourceNotFoundException", + }) + ); + }); + }); +}); diff --git a/clients/client-cloudwatch-events/vitest.config.e2e.mts b/clients/client-cloudwatch-events/vitest.config.e2e.mts new file mode 100644 index 000000000000..ccea26a45905 --- /dev/null +++ b/clients/client-cloudwatch-events/vitest.config.e2e.mts @@ -0,0 +1,10 @@ +import { defineConfig } from "vitest/config"; + +export default defineConfig({ + test: { + exclude: ["**/*.browser.e2e.spec.ts"], + include: ["**/*.e2e.spec.ts"], + environment: "node", + }, + mode: "development", +}); diff --git a/clients/client-cloudwatch-logs/test/cloudwatch-logs-features.e2e.spec.ts b/clients/client-cloudwatch-logs/test/cloudwatch-logs-features.e2e.spec.ts new file mode 100644 index 000000000000..da4e30b7c69b --- /dev/null +++ b/clients/client-cloudwatch-logs/test/cloudwatch-logs-features.e2e.spec.ts @@ -0,0 +1,60 @@ +import { getE2eTestResources } from "@aws-sdk/aws-util-test/src"; +import { CloudWatchLogs, InvalidParameterException } from "@aws-sdk/client-cloudwatch-logs"; +import { afterAll, beforeAll, describe, expect, test as it } from "vitest"; + +describe("CloudWatch Logs Features", () => { + let client: CloudWatchLogs; + let region: string; + const createdLogGroups: string[] = []; + + beforeAll(async () => { + const e2eTestResourcesEnv = await getE2eTestResources(); + Object.assign(process.env, e2eTestResourcesEnv); + + region = process?.env?.AWS_SMOKE_TEST_REGION as string; + + client = new CloudWatchLogs({ region }); + }); + + const generateLogGroupName = (prefix: string) => { + const timestamp = Date.now(); + const random = Math.random().toString(36).substring(7); + return prefix ? `${prefix}-${timestamp}-${random}` : ""; + }; + + afterAll(async () => { + // Cleanup created log groups + for (const logGroupName of createdLogGroups) { + try { + await client.deleteLogGroup({ logGroupName }); + } catch (error) { + console.warn(`Failed to cleanup log group ${logGroupName}:`, error); + } + } + }); + + describe("Log Groups", () => { + it("should create a log group and list it", async () => { + // Given I create a CloudWatch logGroup with prefix "aws-js-sdk" + const logGroupName = generateLogGroupName("aws-js-sdk"); + createdLogGroups.push(logGroupName); + + await client.createLogGroup({ logGroupName }); + + // And I list the CloudWatch logGroups + const response = await client.describeLogGroups({ + logGroupNamePrefix: logGroupName, + }); + + // Then the list should contain the CloudWatch logGroup + expect(response.logGroups?.some((group) => group.logGroupName === logGroupName)).toBe(true); + }); + }); + + describe("Error handling", () => { + it("should throw InvalidParameterException for empty prefix", async () => { + const logGroupName = generateLogGroupName(""); + await expect(client.createLogGroup({ logGroupName })).rejects.toThrow(InvalidParameterException); + }); + }); +}); diff --git a/clients/client-cloudwatch/test/e2e/cloudwatch-features.e2e.spec.ts b/clients/client-cloudwatch/test/e2e/cloudwatch-features.e2e.spec.ts new file mode 100644 index 000000000000..bc6cf654b693 --- /dev/null +++ b/clients/client-cloudwatch/test/e2e/cloudwatch-features.e2e.spec.ts @@ -0,0 +1,69 @@ +import { getE2eTestResources } from "@aws-sdk/aws-util-test/src"; +import { CloudWatch } from "@aws-sdk/client-cloudwatch"; +import { beforeAll, describe, expect, test as it } from "vitest"; + +describe("@aws-sdk/client-cloudwatch", () => { + let client: CloudWatch; + let region: string; + + beforeAll(async () => { + const e2eTestResourcesEnv = await getE2eTestResources(); + Object.assign(process.env, e2eTestResourcesEnv); + + region = process?.env?.AWS_SMOKE_TEST_REGION as string; + + client = new CloudWatch({ region }); + }); + + describe("Alarms", () => { + it("should create, list, and find CloudWatch alarm", async () => { + const alarmName = `aws-js-sdk-alarm-${Date.now()}`; + + // Create alarm + await client.putMetricAlarm({ + AlarmName: alarmName, + ComparisonOperator: "GreaterThanThreshold", + EvaluationPeriods: 1, + AlarmDescription: "Test alarm for SDK", + MetricName: "CPUUtilization", + Namespace: "AWS/EC2", + Statistic: "Average", + Threshold: 80, + Period: 300, + }); + + // List alarms + const result = await client.describeAlarms({}); + + expect(Array.isArray(result.MetricAlarms)).toBe(true); + + // Check if our alarm is in the list + const foundAlarm = result.MetricAlarms?.find((alarm) => alarm.AlarmName === alarmName); + expect(foundAlarm?.AlarmName).toBe(alarmName); + + // Cleanup + await client.deleteAlarms({ AlarmNames: [alarmName] }); + }); + }); + + describe("Error handling", () => { + it("should handle ValidationError for empty alarm name", async () => { + await expect( + client.putMetricAlarm({ + AlarmName: "", // Empty name should cause ValidationError + ComparisonOperator: "GreaterThanThreshold", + EvaluationPeriods: 1, + MetricName: "CPUUtilization", + Namespace: "AWS/EC2", + Statistic: "Average", + Threshold: 80, + Period: 300, + }) + ).rejects.toThrow( + expect.objectContaining({ + name: "ValidationError", + }) + ); + }); + }); +}); diff --git a/clients/client-codecommit/package.json b/clients/client-codecommit/package.json index e67829873f91..41a3f28083be 100644 --- a/clients/client-codecommit/package.json +++ b/clients/client-codecommit/package.json @@ -12,6 +12,8 @@ "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo", "extract:docs": "api-extractor run --local", "generate:client": "node ../../scripts/generate-clients/single-service --solo codecommit", + "test:e2e": "yarn g:vitest run -c vitest.config.e2e.mts", + "test:e2e:watch": "yarn g:vitest watch -c vitest.config.e2e.mts", "test:index": "tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs" }, "main": "./dist-cjs/index.js", diff --git a/clients/client-codecommit/test/codecommit-features.e2e.spec.ts b/clients/client-codecommit/test/codecommit-features.e2e.spec.ts new file mode 100644 index 000000000000..b0aa28dbd9cf --- /dev/null +++ b/clients/client-codecommit/test/codecommit-features.e2e.spec.ts @@ -0,0 +1,32 @@ +import { getE2eTestResources } from "@aws-sdk/aws-util-test/src"; +import { CodeCommit, RepositoryDoesNotExistException } from "@aws-sdk/client-codecommit"; +import { beforeAll, describe, expect, test as it } from "vitest"; + +describe("AWS CodeCommit Features", () => { + let client: CodeCommit; + let region: string; + + beforeAll(async () => { + const e2eTestResourcesEnv = await getE2eTestResources(); + Object.assign(process.env, e2eTestResourcesEnv); + + region = process?.env?.AWS_SMOKE_TEST_REGION as string; + + client = new CodeCommit({ region }); + }); + + describe("List repositories", () => { + it("should successfully list repositories", async () => { + const result = await client.listRepositories({}); + expect(Array.isArray(result.repositories)).toBe(true); + }); + }); + + describe("Error handling", () => { + it("should throw RepositoryDoesNotExistException for fake repository", async () => { + await expect(client.listBranches({ repositoryName: "fake-repo" })).rejects.toThrow( + RepositoryDoesNotExistException + ); + }); + }); +}); diff --git a/clients/client-codecommit/vitest.config.e2e.mts b/clients/client-codecommit/vitest.config.e2e.mts new file mode 100644 index 000000000000..ccea26a45905 --- /dev/null +++ b/clients/client-codecommit/vitest.config.e2e.mts @@ -0,0 +1,10 @@ +import { defineConfig } from "vitest/config"; + +export default defineConfig({ + test: { + exclude: ["**/*.browser.e2e.spec.ts"], + include: ["**/*.e2e.spec.ts"], + environment: "node", + }, + mode: "development", +}); diff --git a/clients/client-codedeploy/package.json b/clients/client-codedeploy/package.json index 11bbe5e0a416..3d553ee1ccce 100644 --- a/clients/client-codedeploy/package.json +++ b/clients/client-codedeploy/package.json @@ -12,6 +12,8 @@ "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo", "extract:docs": "api-extractor run --local", "generate:client": "node ../../scripts/generate-clients/single-service --solo codedeploy", + "test:e2e": "yarn g:vitest run -c vitest.config.e2e.mts", + "test:e2e:watch": "yarn g:vitest watch -c vitest.config.e2e.mts", "test:index": "tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs" }, "main": "./dist-cjs/index.js", diff --git a/clients/client-codedeploy/test/codedeploy-features.e2e.spec.ts b/clients/client-codedeploy/test/codedeploy-features.e2e.spec.ts new file mode 100644 index 000000000000..a14331fd7891 --- /dev/null +++ b/clients/client-codedeploy/test/codedeploy-features.e2e.spec.ts @@ -0,0 +1,39 @@ +import { getE2eTestResources } from "@aws-sdk/aws-util-test/src"; +import { CodeDeploy } from "@aws-sdk/client-codedeploy"; +import { beforeAll, describe, expect, test as it } from "vitest"; + +describe("@aws-sdk/client-codedeploy", () => { + let client: CodeDeploy; + let region: string; + + beforeAll(async () => { + const e2eTestResourcesEnv = await getE2eTestResources(); + Object.assign(process.env, e2eTestResourcesEnv); + + region = process?.env?.AWS_SMOKE_TEST_REGION as string; + + client = new CodeDeploy({ region }); + }); + + describe("Listing Applications", () => { + it("should return applications list when listApplications is called", async () => { + const result = await client.listApplications({}); + + expect(Array.isArray(result.applications)).toBe(true); + }); + }); + + describe("Error handling", () => { + it("should handle ApplicationNameRequiredException for empty application name", async () => { + await expect( + client.createApplication({ + applicationName: "", // Empty name should cause ApplicationNameRequiredException + }) + ).rejects.toThrow( + expect.objectContaining({ + name: "ApplicationNameRequiredException", + }) + ); + }); + }); +}); diff --git a/clients/client-codedeploy/vitest.config.e2e.mts b/clients/client-codedeploy/vitest.config.e2e.mts new file mode 100644 index 000000000000..ccea26a45905 --- /dev/null +++ b/clients/client-codedeploy/vitest.config.e2e.mts @@ -0,0 +1,10 @@ +import { defineConfig } from "vitest/config"; + +export default defineConfig({ + test: { + exclude: ["**/*.browser.e2e.spec.ts"], + include: ["**/*.e2e.spec.ts"], + environment: "node", + }, + mode: "development", +}); diff --git a/clients/client-codepipeline/package.json b/clients/client-codepipeline/package.json index fb72811edb0c..91d41c489c20 100644 --- a/clients/client-codepipeline/package.json +++ b/clients/client-codepipeline/package.json @@ -12,6 +12,8 @@ "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo", "extract:docs": "api-extractor run --local", "generate:client": "node ../../scripts/generate-clients/single-service --solo codepipeline", + "test:e2e": "yarn g:vitest run -c vitest.config.e2e.mts", + "test:e2e:watch": "yarn g:vitest watch -c vitest.config.e2e.mts", "test:index": "tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs" }, "main": "./dist-cjs/index.js", diff --git a/clients/client-codepipeline/test/codepipeline-features.e2e.spec.ts b/clients/client-codepipeline/test/codepipeline-features.e2e.spec.ts new file mode 100644 index 000000000000..8c0374844482 --- /dev/null +++ b/clients/client-codepipeline/test/codepipeline-features.e2e.spec.ts @@ -0,0 +1,39 @@ +import { getE2eTestResources } from "@aws-sdk/aws-util-test/src"; +import { CodePipeline } from "@aws-sdk/client-codepipeline"; +import { beforeAll, describe, expect, test as it } from "vitest"; + +describe("@aws-sdk/client-codepipeline", () => { + let client: CodePipeline; + let region: string; + + beforeAll(async () => { + const e2eTestResourcesEnv = await getE2eTestResources(); + Object.assign(process.env, e2eTestResourcesEnv); + + region = process?.env?.AWS_SMOKE_TEST_REGION as string; + + client = new CodePipeline({ region }); + }); + + describe("Listing Pipelines", () => { + it("should return pipelines list when listPipelines is called", async () => { + const result = await client.listPipelines({}); + + expect(Array.isArray(result.pipelines)).toBe(true); + }); + }); + + describe("Error handling", () => { + it("should handle PipelineNotFoundException for fake pipeline", async () => { + await expect( + client.getPipeline({ + name: "fake-pipeline", // Non-existent pipeline should cause PipelineNotFoundException + }) + ).rejects.toThrow( + expect.objectContaining({ + name: "PipelineNotFoundException", + }) + ); + }); + }); +}); diff --git a/clients/client-codepipeline/vitest.config.e2e.mts b/clients/client-codepipeline/vitest.config.e2e.mts new file mode 100644 index 000000000000..ccea26a45905 --- /dev/null +++ b/clients/client-codepipeline/vitest.config.e2e.mts @@ -0,0 +1,10 @@ +import { defineConfig } from "vitest/config"; + +export default defineConfig({ + test: { + exclude: ["**/*.browser.e2e.spec.ts"], + include: ["**/*.e2e.spec.ts"], + environment: "node", + }, + mode: "development", +}); diff --git a/clients/client-cognito-identity/test/e2e/cognitoidentity-features.e2e.spec.ts b/clients/client-cognito-identity/test/e2e/cognitoidentity-features.e2e.spec.ts new file mode 100644 index 000000000000..cac165689e09 --- /dev/null +++ b/clients/client-cognito-identity/test/e2e/cognitoidentity-features.e2e.spec.ts @@ -0,0 +1,64 @@ +import { getE2eTestResources } from "@aws-sdk/aws-util-test/src"; +import { CognitoIdentity } from "@aws-sdk/client-cognito-identity"; +import { afterAll, beforeAll, describe, expect, test as it } from "vitest"; + +describe("@aws-sdk/client-cognito-identity", () => { + let client: CognitoIdentity; + let region: string; + let createdIdentityPoolId: string; + + beforeAll(async () => { + const e2eTestResourcesEnv = await getE2eTestResources(); + Object.assign(process.env, e2eTestResourcesEnv); + + region = process?.env?.AWS_SMOKE_TEST_REGION as string; + + client = new CognitoIdentity({ region }); + }); + + afterAll(async () => { + if (createdIdentityPoolId) { + try { + await client.deleteIdentityPool({ IdentityPoolId: createdIdentityPoolId }); + } catch (error) { + console.warn("Failed to clean up identity pool:", error); + } + } + }); + + describe("Identity Pools", () => { + it("should create and describe a Cognito identity pool", async () => { + // Create identity pool + const createResult = await client.createIdentityPool({ + IdentityPoolName: `awssdkjs-test-${Date.now()}`, + AllowUnauthenticatedIdentities: true, + }); + + expect(createResult.IdentityPoolId).toBeDefined(); + createdIdentityPoolId = createResult.IdentityPoolId!; + + // Describe the identity pool + const describeResult = await client.describeIdentityPool({ + IdentityPoolId: createdIdentityPoolId, + }); + + expect(describeResult).toBeDefined(); + expect(describeResult.IdentityPoolId).toBe(createdIdentityPoolId); + }); + }); + + describe("Error handling", () => { + it("should handle ValidationException for empty identity pool name", async () => { + await expect( + client.createIdentityPool({ + IdentityPoolName: "", // Empty name should cause ValidationException + AllowUnauthenticatedIdentities: true, + }) + ).rejects.toThrow( + expect.objectContaining({ + name: "ValidationException", + }) + ); + }); + }); +}); diff --git a/clients/client-cognito-sync/package.json b/clients/client-cognito-sync/package.json index f6de0e563978..17ea66f30738 100644 --- a/clients/client-cognito-sync/package.json +++ b/clients/client-cognito-sync/package.json @@ -12,6 +12,8 @@ "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo", "extract:docs": "api-extractor run --local", "generate:client": "node ../../scripts/generate-clients/single-service --solo cognito-sync", + "test:e2e": "yarn g:vitest run -c vitest.config.e2e.mts --mode development", + "test:e2e:watch": "yarn g:vitest watch -c vitest.config.e2e.mts", "test:index": "tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs" }, "main": "./dist-cjs/index.js", diff --git a/clients/client-cognito-sync/test/cognitosync-features.e2e.spec.ts b/clients/client-cognito-sync/test/cognitosync-features.e2e.spec.ts new file mode 100644 index 000000000000..5ef943883ff2 --- /dev/null +++ b/clients/client-cognito-sync/test/cognitosync-features.e2e.spec.ts @@ -0,0 +1,41 @@ +import { getE2eTestResources } from "@aws-sdk/aws-util-test/src"; +import { CognitoSync } from "@aws-sdk/client-cognito-sync"; +import { beforeAll, describe, expect, test as it } from "vitest"; + +describe("Amazon Cognito Sync Features", () => { + let client: CognitoSync; + let region: string; + + beforeAll(async () => { + const e2eTestResourcesEnv = await getE2eTestResources(); + Object.assign(process.env, e2eTestResourcesEnv); + + region = process?.env?.AWS_SMOKE_TEST_REGION as string; + + client = new CognitoSync({ region }); + }); + + describe("Identity Pool Usage", () => { + it("should successfully list identity pool usage", async () => { + const result = await client.listIdentityPoolUsage({}); + + expect(result.$metadata?.httpStatusCode).toBe(200); + expect(result.IdentityPoolUsages).toBeDefined(); + }); + }); + + describe("Error handling", () => { + it("should contain validation error for invalid parameters", async () => { + await expect( + client.listDatasets({ + IdentityPoolId: "INVALID", + IdentityId: "A:B:C", + }) + ).rejects.toThrow( + expect.objectContaining({ + message: expect.stringContaining("validation errors detected"), + }) + ); + }); + }); +}); diff --git a/clients/client-cognito-sync/vitest.config.e2e.mts b/clients/client-cognito-sync/vitest.config.e2e.mts new file mode 100644 index 000000000000..a08a0dfa31c3 --- /dev/null +++ b/clients/client-cognito-sync/vitest.config.e2e.mts @@ -0,0 +1,8 @@ +import { defineConfig } from "vitest/config"; + +export default defineConfig({ + test: { + include: ["**/*.e2e.spec.ts"], + environment: "happy-dom", + }, +}); diff --git a/clients/client-config-service/package.json b/clients/client-config-service/package.json index e0927700df95..2449a7d9296b 100644 --- a/clients/client-config-service/package.json +++ b/clients/client-config-service/package.json @@ -12,6 +12,8 @@ "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo", "extract:docs": "api-extractor run --local", "generate:client": "node ../../scripts/generate-clients/single-service --solo config-service", + "test:e2e": "yarn g:vitest run -c vitest.config.e2e.mts --mode development", + "test:e2e:watch": "yarn g:vitest watch -c vitest.config.e2e.mts", "test:index": "tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs" }, "main": "./dist-cjs/index.js", diff --git a/clients/client-config-service/test/configservice-features.e2e.spec.ts b/clients/client-config-service/test/configservice-features.e2e.spec.ts new file mode 100644 index 000000000000..db7c34da2710 --- /dev/null +++ b/clients/client-config-service/test/configservice-features.e2e.spec.ts @@ -0,0 +1,40 @@ +import { getE2eTestResources } from "@aws-sdk/aws-util-test/src"; +import { ConfigService } from "@aws-sdk/client-config-service"; +import { beforeAll, describe, expect, test as it } from "vitest"; + +describe("AWS Config Features", () => { + let client: ConfigService; + let region: string; + + beforeAll(async () => { + const e2eTestResourcesEnv = await getE2eTestResources(); + Object.assign(process.env, e2eTestResourcesEnv); + + region = process?.env?.AWS_SMOKE_TEST_REGION as string; + + client = new ConfigService({ region }); + }); + + describe("Listing delivery channels", () => { + it("should successfully describe delivery channels", async () => { + const result = await client.describeDeliveryChannels({}); + + expect(result.$metadata?.httpStatusCode).toBe(200); + expect(Array.isArray(result.DeliveryChannels)).toBe(true); + }); + }); + + describe("Error handling", () => { + it("should contain validation error for invalid parameters", async () => { + await expect( + client.putDeliveryChannel({ + DeliveryChannel: { name: "" }, + }) + ).rejects.toThrow( + expect.objectContaining({ + name: "ValidationException", + }) + ); + }); + }); +}); diff --git a/clients/client-config-service/vitest.config.e2e.mts b/clients/client-config-service/vitest.config.e2e.mts new file mode 100644 index 000000000000..ccea26a45905 --- /dev/null +++ b/clients/client-config-service/vitest.config.e2e.mts @@ -0,0 +1,10 @@ +import { defineConfig } from "vitest/config"; + +export default defineConfig({ + test: { + exclude: ["**/*.browser.e2e.spec.ts"], + include: ["**/*.e2e.spec.ts"], + environment: "node", + }, + mode: "development", +}); diff --git a/clients/client-data-pipeline/package.json b/clients/client-data-pipeline/package.json index fd3a84b377e2..ea16f30f4d00 100644 --- a/clients/client-data-pipeline/package.json +++ b/clients/client-data-pipeline/package.json @@ -12,6 +12,8 @@ "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo", "extract:docs": "api-extractor run --local", "generate:client": "node ../../scripts/generate-clients/single-service --solo data-pipeline", + "test:e2e": "yarn g:vitest run -c vitest.config.e2e.mts --mode development", + "test:e2e:watch": "yarn g:vitest watch -c vitest.config.e2e.mts", "test:index": "tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs" }, "main": "./dist-cjs/index.js", diff --git a/clients/client-data-pipeline/test/datapipeline-features.e2e.spec.ts b/clients/client-data-pipeline/test/datapipeline-features.e2e.spec.ts new file mode 100644 index 000000000000..6ff766ecd120 --- /dev/null +++ b/clients/client-data-pipeline/test/datapipeline-features.e2e.spec.ts @@ -0,0 +1,42 @@ +import { getE2eTestResources } from "@aws-sdk/aws-util-test/src"; +import { DataPipeline } from "@aws-sdk/client-data-pipeline"; +import { beforeAll, describe, expect, test as it } from "vitest"; + +describe("AWS Data Pipeline Features", () => { + let client: DataPipeline; + let region: string; + + beforeAll(async () => { + const e2eTestResourcesEnv = await getE2eTestResources(); + Object.assign(process.env, e2eTestResourcesEnv); + + region = process?.env?.AWS_SMOKE_TEST_REGION as string; + + client = new DataPipeline({ region }); + }); + + describe("Listing pipelines", () => { + it("should successfully list pipelines", async () => { + const result = await client.listPipelines({}); + + expect(result.$metadata?.httpStatusCode).toBe(200); + expect(Array.isArray(result.pipelineIdList)).toBe(true); + }); + }); + + describe("Error handling", () => { + it("should contain validation error for empty name prefix", async () => { + await expect( + client.createPipeline({ + name: "", + uniqueId: "test-unique-id-" + Date.now(), + }) + ).rejects.toThrow( + expect.objectContaining({ + name: "ValidationException", + message: expect.stringContaining("Member must have length greater than or equal to 1"), + }) + ); + }); + }); +}); diff --git a/clients/client-data-pipeline/vitest.config.e2e.mts b/clients/client-data-pipeline/vitest.config.e2e.mts new file mode 100644 index 000000000000..ccea26a45905 --- /dev/null +++ b/clients/client-data-pipeline/vitest.config.e2e.mts @@ -0,0 +1,10 @@ +import { defineConfig } from "vitest/config"; + +export default defineConfig({ + test: { + exclude: ["**/*.browser.e2e.spec.ts"], + include: ["**/*.e2e.spec.ts"], + environment: "node", + }, + mode: "development", +}); diff --git a/clients/client-database-migration-service/package.json b/clients/client-database-migration-service/package.json index 833c59c3be4d..f572b975e2de 100644 --- a/clients/client-database-migration-service/package.json +++ b/clients/client-database-migration-service/package.json @@ -12,6 +12,8 @@ "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo", "extract:docs": "api-extractor run --local", "generate:client": "node ../../scripts/generate-clients/single-service --solo database-migration-service", + "test:e2e": "yarn g:vitest run -c vitest.config.e2e.mts --mode development", + "test:e2e:watch": "yarn g:vitest watch -c vitest.config.e2e.mts", "test:index": "tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs" }, "main": "./dist-cjs/index.js", diff --git a/clients/client-database-migration-service/test/dms-features.e2e.spec.ts b/clients/client-database-migration-service/test/dms-features.e2e.spec.ts new file mode 100644 index 000000000000..a8ed993b0e1b --- /dev/null +++ b/clients/client-database-migration-service/test/dms-features.e2e.spec.ts @@ -0,0 +1,41 @@ +import { getE2eTestResources } from "@aws-sdk/aws-util-test/src"; +import { DatabaseMigrationService } from "@aws-sdk/client-database-migration-service"; +import { beforeAll, describe, expect, test as it } from "vitest"; + +describe("AWS Database Migration Service Features", () => { + let client: DatabaseMigrationService; + let region: string; + + beforeAll(async () => { + const e2eTestResourcesEnv = await getE2eTestResources(); + Object.assign(process.env, e2eTestResourcesEnv); + + region = process?.env?.AWS_SMOKE_TEST_REGION as string; + + client = new DatabaseMigrationService({ region }); + }); + + describe("Making a request", () => { + it("should successfully describe endpoints", async () => { + const result = await client.describeEndpoints({}); + + expect(result.$metadata?.httpStatusCode).toBe(200); + expect(Array.isArray(result.Endpoints)).toBe(true); + }); + }); + + describe("Error handling", () => { + it("should contain invalid parameter error for fake ARN", async () => { + await expect( + client.startReplicationTask({ + ReplicationTaskArn: "fake-arn", + StartReplicationTaskType: "start-replication", + }) + ).rejects.toThrow( + expect.objectContaining({ + name: "InvalidParameterValueException", + }) + ); + }); + }); +}); diff --git a/clients/client-database-migration-service/vitest.config.e2e.mts b/clients/client-database-migration-service/vitest.config.e2e.mts new file mode 100644 index 000000000000..ccea26a45905 --- /dev/null +++ b/clients/client-database-migration-service/vitest.config.e2e.mts @@ -0,0 +1,10 @@ +import { defineConfig } from "vitest/config"; + +export default defineConfig({ + test: { + exclude: ["**/*.browser.e2e.spec.ts"], + include: ["**/*.e2e.spec.ts"], + environment: "node", + }, + mode: "development", +}); diff --git a/clients/client-device-farm/package.json b/clients/client-device-farm/package.json index 9815f81cfc4a..a2c49025c04c 100644 --- a/clients/client-device-farm/package.json +++ b/clients/client-device-farm/package.json @@ -12,6 +12,8 @@ "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo", "extract:docs": "api-extractor run --local", "generate:client": "node ../../scripts/generate-clients/single-service --solo device-farm", + "test:e2e": "yarn g:vitest run -c vitest.config.e2e.mts --mode development", + "test:e2e:watch": "yarn g:vitest watch -c vitest.config.e2e.mts", "test:index": "tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs" }, "main": "./dist-cjs/index.js", diff --git a/clients/client-device-farm/test/devicefarm-features.e2e.spec.ts b/clients/client-device-farm/test/devicefarm-features.e2e.spec.ts new file mode 100644 index 000000000000..8f3a16331063 --- /dev/null +++ b/clients/client-device-farm/test/devicefarm-features.e2e.spec.ts @@ -0,0 +1,40 @@ +import { getE2eTestResources } from "@aws-sdk/aws-util-test/src"; +import { DeviceFarm } from "@aws-sdk/client-device-farm"; +import { beforeAll, describe, expect, test as it } from "vitest"; + +describe("AWS Device Farm", () => { + let client: DeviceFarm; + let region: string; + + beforeAll(async () => { + const e2eTestResourcesEnv = await getE2eTestResources(); + Object.assign(process.env, e2eTestResourcesEnv); + + region = process?.env?.AWS_SMOKE_TEST_REGION as string; + + client = new DeviceFarm({ region }); + }); + + describe("Listing devices", () => { + it("should successfully list devices", async () => { + const result = await client.listDevices({}); + + expect(result.$metadata?.httpStatusCode).toBe(200); + expect(Array.isArray(result.devices)).toBe(true); + }); + }); + + describe("Error handling", () => { + it("should contain not found error for invalid device ARN", async () => { + await expect( + client.getDevice({ + arn: "arn:aws:devicefarm:us-west-2::device:00000000000000000000000000000000", + }) + ).rejects.toThrow( + expect.objectContaining({ + name: "NotFoundException", + }) + ); + }); + }); +}); diff --git a/clients/client-device-farm/vitest.config.e2e.mts b/clients/client-device-farm/vitest.config.e2e.mts new file mode 100644 index 000000000000..ccea26a45905 --- /dev/null +++ b/clients/client-device-farm/vitest.config.e2e.mts @@ -0,0 +1,10 @@ +import { defineConfig } from "vitest/config"; + +export default defineConfig({ + test: { + exclude: ["**/*.browser.e2e.spec.ts"], + include: ["**/*.e2e.spec.ts"], + environment: "node", + }, + mode: "development", +}); diff --git a/clients/client-direct-connect/package.json b/clients/client-direct-connect/package.json index 26066fd59d8c..d7007a24e180 100644 --- a/clients/client-direct-connect/package.json +++ b/clients/client-direct-connect/package.json @@ -12,6 +12,8 @@ "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo", "extract:docs": "api-extractor run --local", "generate:client": "node ../../scripts/generate-clients/single-service --solo direct-connect", + "test:e2e": "yarn g:vitest run -c vitest.config.e2e.mts --mode development", + "test:e2e:watch": "yarn g:vitest watch -c vitest.config.e2e.mts", "test:index": "tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs" }, "main": "./dist-cjs/index.js", diff --git a/clients/client-direct-connect/test/directconnect-features.e2e.spec.ts b/clients/client-direct-connect/test/directconnect-features.e2e.spec.ts new file mode 100644 index 000000000000..297db2fd962f --- /dev/null +++ b/clients/client-direct-connect/test/directconnect-features.e2e.spec.ts @@ -0,0 +1,42 @@ +import { getE2eTestResources } from "@aws-sdk/aws-util-test/src"; +import { DirectConnect } from "@aws-sdk/client-direct-connect"; +import { beforeAll, describe, expect, test as it } from "vitest"; + +describe("AWS Direct Connect", () => { + let client: DirectConnect; + let region: string; + + beforeAll(async () => { + const e2eTestResourcesEnv = await getE2eTestResources(); + Object.assign(process.env, e2eTestResourcesEnv); + + region = process?.env?.AWS_SMOKE_TEST_REGION as string; + + client = new DirectConnect({ region }); + }); + + describe("describe connections", () => { + it("should successfully describe connections", async () => { + const result = await client.describeConnections({}); + + expect(result.$metadata?.httpStatusCode).toBe(200); + expect(Array.isArray(result.connections)).toBe(true); + }); + }); + + describe("Error handling", () => { + it("should contain client exception for invalid location", async () => { + await expect( + client.createConnection({ + location: "invalid-location", + bandwidth: "1Gbps", + connectionName: "test-connection", + }) + ).rejects.toThrow( + expect.objectContaining({ + name: "DirectConnectClientException", + }) + ); + }); + }); +}); diff --git a/clients/client-direct-connect/vitest.config.e2e.mts b/clients/client-direct-connect/vitest.config.e2e.mts new file mode 100644 index 000000000000..ccea26a45905 --- /dev/null +++ b/clients/client-direct-connect/vitest.config.e2e.mts @@ -0,0 +1,10 @@ +import { defineConfig } from "vitest/config"; + +export default defineConfig({ + test: { + exclude: ["**/*.browser.e2e.spec.ts"], + include: ["**/*.e2e.spec.ts"], + environment: "node", + }, + mode: "development", +}); diff --git a/clients/client-directory-service/package.json b/clients/client-directory-service/package.json index 47859c7f93c4..2b13112d41ce 100644 --- a/clients/client-directory-service/package.json +++ b/clients/client-directory-service/package.json @@ -12,6 +12,8 @@ "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo", "extract:docs": "api-extractor run --local", "generate:client": "node ../../scripts/generate-clients/single-service --solo directory-service", + "test:e2e": "yarn g:vitest run -c vitest.config.e2e.mts --mode development", + "test:e2e:watch": "yarn g:vitest watch -c vitest.config.e2e.mts", "test:index": "tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs" }, "main": "./dist-cjs/index.js", diff --git a/clients/client-directory-service/test/directoryservice-features.e2e.spec.ts b/clients/client-directory-service/test/directoryservice-features.e2e.spec.ts new file mode 100644 index 000000000000..0cef7aeb5990 --- /dev/null +++ b/clients/client-directory-service/test/directoryservice-features.e2e.spec.ts @@ -0,0 +1,42 @@ +import { getE2eTestResources } from "@aws-sdk/aws-util-test/src"; +import { DirectoryService } from "@aws-sdk/client-directory-service"; +import { beforeAll, describe, expect, test as it } from "vitest"; + +describe("AWS Directory Service Features", () => { + let client: DirectoryService; + let region: string; + + beforeAll(async () => { + const e2eTestResourcesEnv = await getE2eTestResources(); + Object.assign(process.env, e2eTestResourcesEnv); + + region = process?.env?.AWS_SMOKE_TEST_REGION as string; + + client = new DirectoryService({ region }); + }); + + describe("Listing directories", () => { + it("should successfully describe directories", async () => { + const result = await client.describeDirectories({}); + + expect(result.$metadata?.httpStatusCode).toBe(200); + expect(Array.isArray(result.DirectoryDescriptions)).toBe(true); + }); + }); + + describe("Error handling", () => { + it("should contain validation error for invalid parameters", async () => { + await expect( + client.createDirectory({ + Name: "", + Password: "", + Size: "" as any, + }) + ).rejects.toThrow( + expect.objectContaining({ + name: "ValidationException", + }) + ); + }); + }); +}); diff --git a/clients/client-directory-service/vitest.config.e2e.mts b/clients/client-directory-service/vitest.config.e2e.mts new file mode 100644 index 000000000000..ccea26a45905 --- /dev/null +++ b/clients/client-directory-service/vitest.config.e2e.mts @@ -0,0 +1,10 @@ +import { defineConfig } from "vitest/config"; + +export default defineConfig({ + test: { + exclude: ["**/*.browser.e2e.spec.ts"], + include: ["**/*.e2e.spec.ts"], + environment: "node", + }, + mode: "development", +}); diff --git a/clients/client-dynamodb-streams/package.json b/clients/client-dynamodb-streams/package.json index c6071130565d..db7cdc542781 100644 --- a/clients/client-dynamodb-streams/package.json +++ b/clients/client-dynamodb-streams/package.json @@ -12,6 +12,8 @@ "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo", "extract:docs": "api-extractor run --local", "generate:client": "node ../../scripts/generate-clients/single-service --solo dynamodb-streams", + "test:e2e": "yarn g:vitest run -c vitest.config.e2e.mts --mode development", + "test:e2e:watch": "yarn g:vitest watch -c vitest.config.e2e.mts", "test:index": "tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs" }, "main": "./dist-cjs/index.js", diff --git a/clients/client-dynamodb-streams/test/dynamodbstreams-features.e2e.spec.ts b/clients/client-dynamodb-streams/test/dynamodbstreams-features.e2e.spec.ts new file mode 100644 index 000000000000..1aeb622fb8ed --- /dev/null +++ b/clients/client-dynamodb-streams/test/dynamodbstreams-features.e2e.spec.ts @@ -0,0 +1,40 @@ +import { getE2eTestResources } from "@aws-sdk/aws-util-test/src"; +import { DynamoDBStreams } from "@aws-sdk/client-dynamodb-streams"; +import { beforeAll, describe, expect, test as it } from "vitest"; + +describe("Amazon DynamoDB Streams Features", () => { + let client: DynamoDBStreams; + let region: string; + + beforeAll(async () => { + const e2eTestResourcesEnv = await getE2eTestResources(); + Object.assign(process.env, e2eTestResourcesEnv); + + region = process?.env?.AWS_SMOKE_TEST_REGION as string; + + client = new DynamoDBStreams({ region }); + }); + + describe("Listing streams", () => { + it("should successfully list streams", async () => { + const result = await client.listStreams({}); + + expect(result.$metadata?.httpStatusCode).toBe(200); + expect(Array.isArray(result.Streams)).toBe(true); + }); + }); + + describe("Error handling", () => { + it("should contain validation error for invalid stream ARN", async () => { + await expect( + client.describeStream({ + StreamArn: "fake-stream", + }) + ).rejects.toThrow( + expect.objectContaining({ + name: "ValidationException", + }) + ); + }); + }); +}); diff --git a/clients/client-dynamodb-streams/vitest.config.e2e.mts b/clients/client-dynamodb-streams/vitest.config.e2e.mts new file mode 100644 index 000000000000..ccea26a45905 --- /dev/null +++ b/clients/client-dynamodb-streams/vitest.config.e2e.mts @@ -0,0 +1,10 @@ +import { defineConfig } from "vitest/config"; + +export default defineConfig({ + test: { + exclude: ["**/*.browser.e2e.spec.ts"], + include: ["**/*.e2e.spec.ts"], + environment: "node", + }, + mode: "development", +}); diff --git a/clients/client-ecr/package.json b/clients/client-ecr/package.json index 10623517f3d1..310ca28564c4 100644 --- a/clients/client-ecr/package.json +++ b/clients/client-ecr/package.json @@ -12,6 +12,8 @@ "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo", "extract:docs": "api-extractor run --local", "generate:client": "node ../../scripts/generate-clients/single-service --solo ecr", + "test:e2e": "yarn g:vitest run -c vitest.config.e2e.mts --mode development", + "test:e2e:watch": "yarn g:vitest watch -c vitest.config.e2e.mts", "test:index": "tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs" }, "main": "./dist-cjs/index.js", diff --git a/clients/client-ecr/test/ecr-features.e2e.spec.ts b/clients/client-ecr/test/ecr-features.e2e.spec.ts new file mode 100644 index 000000000000..ffce3911c36b --- /dev/null +++ b/clients/client-ecr/test/ecr-features.e2e.spec.ts @@ -0,0 +1,40 @@ +import { getE2eTestResources } from "@aws-sdk/aws-util-test/src"; +import { ECR } from "@aws-sdk/client-ecr"; +import { beforeAll, describe, expect, test as it } from "vitest"; + +describe("Amazon EC2 Container Registry Features", () => { + let client: ECR; + let region: string; + + beforeAll(async () => { + const e2eTestResourcesEnv = await getE2eTestResources(); + Object.assign(process.env, e2eTestResourcesEnv); + + region = process?.env?.AWS_SMOKE_TEST_REGION as string; + + client = new ECR({ region }); + }); + + describe("Making a request", () => { + it("should successfully describe repositories", async () => { + const result = await client.describeRepositories({}); + + expect(result.$metadata?.httpStatusCode).toBe(200); + expect(Array.isArray(result.repositories)).toBe(true); + }); + }); + + describe("Error handling", () => { + it("should contain repository not found error for fake repository name", async () => { + await expect( + client.listImages({ + repositoryName: "fake_name", + }) + ).rejects.toThrow( + expect.objectContaining({ + name: "RepositoryNotFoundException", + }) + ); + }); + }); +}); diff --git a/clients/client-ecr/vitest.config.e2e.mts b/clients/client-ecr/vitest.config.e2e.mts new file mode 100644 index 000000000000..ccea26a45905 --- /dev/null +++ b/clients/client-ecr/vitest.config.e2e.mts @@ -0,0 +1,10 @@ +import { defineConfig } from "vitest/config"; + +export default defineConfig({ + test: { + exclude: ["**/*.browser.e2e.spec.ts"], + include: ["**/*.e2e.spec.ts"], + environment: "node", + }, + mode: "development", +}); diff --git a/clients/client-ecs/package.json b/clients/client-ecs/package.json index deac7d07a1bf..9366f94ff6e6 100644 --- a/clients/client-ecs/package.json +++ b/clients/client-ecs/package.json @@ -12,6 +12,8 @@ "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo", "extract:docs": "api-extractor run --local", "generate:client": "node ../../scripts/generate-clients/single-service --solo ecs", + "test:e2e": "yarn g:vitest run -c vitest.config.e2e.mts --mode development", + "test:e2e:watch": "yarn g:vitest watch -c vitest.config.e2e.mts", "test:index": "tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs" }, "main": "./dist-cjs/index.js", diff --git a/clients/client-ecs/test/ecs-features.e2e.spec.ts b/clients/client-ecs/test/ecs-features.e2e.spec.ts new file mode 100644 index 000000000000..a5383149249d --- /dev/null +++ b/clients/client-ecs/test/ecs-features.e2e.spec.ts @@ -0,0 +1,42 @@ +import { getE2eTestResources } from "@aws-sdk/aws-util-test/src"; +import { ECS } from "@aws-sdk/client-ecs"; +import { beforeAll, describe, expect, test as it } from "vitest"; + +describe("Amazon ECS Features", () => { + let client: ECS; + let region: string; + + beforeAll(async () => { + const e2eTestResourcesEnv = await getE2eTestResources(); + Object.assign(process.env, e2eTestResourcesEnv); + + region = process?.env?.AWS_SMOKE_TEST_REGION as string; + + client = new ECS({ region }); + }); + + describe("Listing clusters", () => { + it("should successfully list clusters", async () => { + const result = await client.listClusters({}); + + expect(result.$metadata?.httpStatusCode).toBe(200); + expect(Array.isArray(result.clusterArns)).toBe(true); + }); + }); + + describe("Error handling", () => { + it("should return 400 status code for invalid task", async () => { + await expect( + client.stopTask({ + task: "xxxxxxxxxxx-xxxxxxxxxxxx-xxxxxxxxxxx", + }) + ).rejects.toThrow( + expect.objectContaining({ + $metadata: expect.objectContaining({ + httpStatusCode: 400, + }), + }) + ); + }); + }); +}); diff --git a/clients/client-ecs/vitest.config.e2e.mts b/clients/client-ecs/vitest.config.e2e.mts new file mode 100644 index 000000000000..ccea26a45905 --- /dev/null +++ b/clients/client-ecs/vitest.config.e2e.mts @@ -0,0 +1,10 @@ +import { defineConfig } from "vitest/config"; + +export default defineConfig({ + test: { + exclude: ["**/*.browser.e2e.spec.ts"], + include: ["**/*.e2e.spec.ts"], + environment: "node", + }, + mode: "development", +}); diff --git a/clients/client-efs/package.json b/clients/client-efs/package.json index 02503c84cd66..4499abe6ff47 100644 --- a/clients/client-efs/package.json +++ b/clients/client-efs/package.json @@ -12,6 +12,8 @@ "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo", "extract:docs": "api-extractor run --local", "generate:client": "node ../../scripts/generate-clients/single-service --solo efs", + "test:e2e": "yarn g:vitest run -c vitest.config.e2e.mts --mode development", + "test:e2e:watch": "yarn g:vitest watch -c vitest.config.e2e.mts", "test:index": "tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs" }, "main": "./dist-cjs/index.js", diff --git a/clients/client-efs/test/efs-features.e2e.spec.ts b/clients/client-efs/test/efs-features.e2e.spec.ts new file mode 100644 index 000000000000..a517b2d13179 --- /dev/null +++ b/clients/client-efs/test/efs-features.e2e.spec.ts @@ -0,0 +1,40 @@ +import { getE2eTestResources } from "@aws-sdk/aws-util-test/src"; +import { EFS } from "@aws-sdk/client-efs"; +import { beforeAll, describe, expect, test as it } from "vitest"; + +describe("Amazon Elastic File System Features", () => { + let client: EFS; + let region: string; + + beforeAll(async () => { + const e2eTestResourcesEnv = await getE2eTestResources(); + Object.assign(process.env, e2eTestResourcesEnv); + + region = process?.env?.AWS_SMOKE_TEST_REGION as string; + + client = new EFS({ region }); + }); + + describe("Listing file systems", () => { + it("should successfully describe file systems", async () => { + const result = await client.describeFileSystems({}); + + expect(result.$metadata?.httpStatusCode).toBe(200); + expect(Array.isArray(result.FileSystems)).toBe(true); + }); + }); + + describe("Error handling", () => { + it("should contain validation error for fake file system ID", async () => { + await expect( + client.deleteFileSystem({ + FileSystemId: "fake-id", + }) + ).rejects.toThrow( + expect.objectContaining({ + name: "ValidationException", + }) + ); + }); + }); +}); diff --git a/clients/client-efs/vitest.config.e2e.mts b/clients/client-efs/vitest.config.e2e.mts new file mode 100644 index 000000000000..ccea26a45905 --- /dev/null +++ b/clients/client-efs/vitest.config.e2e.mts @@ -0,0 +1,10 @@ +import { defineConfig } from "vitest/config"; + +export default defineConfig({ + test: { + exclude: ["**/*.browser.e2e.spec.ts"], + include: ["**/*.e2e.spec.ts"], + environment: "node", + }, + mode: "development", +}); diff --git a/clients/client-elastic-beanstalk/package.json b/clients/client-elastic-beanstalk/package.json index aa797f624026..9c47a96bc5c3 100644 --- a/clients/client-elastic-beanstalk/package.json +++ b/clients/client-elastic-beanstalk/package.json @@ -12,6 +12,8 @@ "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo", "extract:docs": "api-extractor run --local", "generate:client": "node ../../scripts/generate-clients/single-service --solo elastic-beanstalk", + "test:e2e": "yarn g:vitest run -c vitest.config.e2e.mts --mode development", + "test:e2e:watch": "yarn g:vitest watch -c vitest.config.e2e.mts", "test:index": "tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs" }, "main": "./dist-cjs/index.js", diff --git a/clients/client-elastic-beanstalk/test/elasticbeanstalk-features.e2e.spec.ts b/clients/client-elastic-beanstalk/test/elasticbeanstalk-features.e2e.spec.ts new file mode 100644 index 000000000000..a99b100b2592 --- /dev/null +++ b/clients/client-elastic-beanstalk/test/elasticbeanstalk-features.e2e.spec.ts @@ -0,0 +1,75 @@ +import { getE2eTestResources } from "@aws-sdk/aws-util-test/src"; +import { ElasticBeanstalk } from "@aws-sdk/client-elastic-beanstalk"; +import { beforeAll, describe, expect, test as it } from "vitest"; + +describe("AWS Elastic Beanstalk Features", () => { + let client: ElasticBeanstalk; + let region: string; + let applicationName: string; + + beforeAll(async () => { + const e2eTestResourcesEnv = await getE2eTestResources(); + Object.assign(process.env, e2eTestResourcesEnv); + + region = process?.env?.AWS_SMOKE_TEST_REGION as string; + + client = new ElasticBeanstalk({ region }); + }); + + describe("Creating applications and application versions", () => { + it("should create application, version, and describe them", async () => { + applicationName = `aws-js-sdk-${Date.now()}`; + + // Create Elastic Beanstalk application + const createAppResult = await client.createApplication({ + ApplicationName: applicationName, + Description: "Test application for SDK", + }); + + expect(createAppResult.Application?.ApplicationName).toBe(applicationName); + + // Create application version + const createVersionResult = await client.createApplicationVersion({ + ApplicationName: applicationName, + VersionLabel: "1.0.0", + Description: "Test version for SDK", + }); + + expect(createVersionResult.ApplicationVersion?.VersionLabel).toBe("1.0.0"); + + // Describe the application + const describeResult = await client.describeApplications({ + ApplicationNames: [applicationName], + }); + + // The result should contain the Elastic Beanstalk application name and version + expect(describeResult.Applications?.[0]?.ApplicationName).toBe(applicationName); + expect(describeResult.Applications?.[0]?.Versions).toContain("1.0.0"); + + // Cleanup - delete application version and application + await client.deleteApplicationVersion({ + ApplicationName: applicationName, + VersionLabel: "1.0.0", + }); + + await client.deleteApplication({ + ApplicationName: applicationName, + }); + }); + }); + + describe("Error handling", () => { + it("should contain validation error for empty application name", async () => { + await expect( + client.createApplication({ + ApplicationName: "", + Description: "Test application", + }) + ).rejects.toThrow( + expect.objectContaining({ + name: "ValidationError", + }) + ); + }); + }); +}); diff --git a/clients/client-elastic-beanstalk/vitest.config.e2e.mts b/clients/client-elastic-beanstalk/vitest.config.e2e.mts new file mode 100644 index 000000000000..ccea26a45905 --- /dev/null +++ b/clients/client-elastic-beanstalk/vitest.config.e2e.mts @@ -0,0 +1,10 @@ +import { defineConfig } from "vitest/config"; + +export default defineConfig({ + test: { + exclude: ["**/*.browser.e2e.spec.ts"], + include: ["**/*.e2e.spec.ts"], + environment: "node", + }, + mode: "development", +}); diff --git a/clients/client-elastic-load-balancing-v2/package.json b/clients/client-elastic-load-balancing-v2/package.json index b50bf8b5f145..426de778ff65 100644 --- a/clients/client-elastic-load-balancing-v2/package.json +++ b/clients/client-elastic-load-balancing-v2/package.json @@ -12,6 +12,8 @@ "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo", "extract:docs": "api-extractor run --local", "generate:client": "node ../../scripts/generate-clients/single-service --solo elastic-load-balancing-v2", + "test:e2e": "yarn g:vitest run -c vitest.config.e2e.mts --mode development", + "test:e2e:watch": "yarn g:vitest watch -c vitest.config.e2e.mts", "test:index": "tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs" }, "main": "./dist-cjs/index.js", diff --git a/clients/client-elastic-load-balancing-v2/test/elbv2-features.e2e.spec.ts b/clients/client-elastic-load-balancing-v2/test/elbv2-features.e2e.spec.ts new file mode 100644 index 000000000000..d4e43bef4eef --- /dev/null +++ b/clients/client-elastic-load-balancing-v2/test/elbv2-features.e2e.spec.ts @@ -0,0 +1,40 @@ +import { getE2eTestResources } from "@aws-sdk/aws-util-test/src"; +import { ElasticLoadBalancingV2 } from "@aws-sdk/client-elastic-load-balancing-v2"; +import { beforeAll, describe, expect, test as it } from "vitest"; + +describe("Elastic Load Balancing v2 Features", () => { + let client: ElasticLoadBalancingV2; + let region: string; + + beforeAll(async () => { + const e2eTestResourcesEnv = await getE2eTestResources(); + Object.assign(process.env, e2eTestResourcesEnv); + + region = process?.env?.AWS_SMOKE_TEST_REGION as string; + + client = new ElasticLoadBalancingV2({ region }); + }); + + describe("Making a request", () => { + it("should successfully describe target groups", async () => { + const result = await client.describeTargetGroups({}); + + expect(result.$metadata?.httpStatusCode).toBe(200); + expect(Array.isArray(result.TargetGroups)).toBe(true); + }); + }); + + describe("Error handling", () => { + it("should contain validation error for fake ARN", async () => { + await expect( + client.describeTags({ + ResourceArns: ["fake_arn"], + }) + ).rejects.toThrow( + expect.objectContaining({ + name: "ValidationError", + }) + ); + }); + }); +}); diff --git a/clients/client-elastic-load-balancing-v2/vitest.config.e2e.mts b/clients/client-elastic-load-balancing-v2/vitest.config.e2e.mts new file mode 100644 index 000000000000..ccea26a45905 --- /dev/null +++ b/clients/client-elastic-load-balancing-v2/vitest.config.e2e.mts @@ -0,0 +1,10 @@ +import { defineConfig } from "vitest/config"; + +export default defineConfig({ + test: { + exclude: ["**/*.browser.e2e.spec.ts"], + include: ["**/*.e2e.spec.ts"], + environment: "node", + }, + mode: "development", +}); diff --git a/clients/client-elastic-load-balancing/package.json b/clients/client-elastic-load-balancing/package.json index a8b73dbf9524..d44821edf299 100644 --- a/clients/client-elastic-load-balancing/package.json +++ b/clients/client-elastic-load-balancing/package.json @@ -12,6 +12,8 @@ "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo", "extract:docs": "api-extractor run --local", "generate:client": "node ../../scripts/generate-clients/single-service --solo elastic-load-balancing", + "test:e2e": "yarn g:vitest run -c vitest.config.e2e.mts --mode development", + "test:e2e:watch": "yarn g:vitest watch -c vitest.config.e2e.mts", "test:index": "tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs" }, "main": "./dist-cjs/index.js", diff --git a/clients/client-elastic-load-balancing/test/elb-features.e2e.spec.ts b/clients/client-elastic-load-balancing/test/elb-features.e2e.spec.ts new file mode 100644 index 000000000000..5305a1be78ba --- /dev/null +++ b/clients/client-elastic-load-balancing/test/elb-features.e2e.spec.ts @@ -0,0 +1,50 @@ +import { getE2eTestResources } from "@aws-sdk/aws-util-test/src"; +import { ElasticLoadBalancing } from "@aws-sdk/client-elastic-load-balancing"; +import { beforeAll, describe, expect, test as it } from "vitest"; + +describe("Elastic Load Balancing Features", () => { + let client: ElasticLoadBalancing; + let region: string; + + beforeAll(async () => { + const e2eTestResourcesEnv = await getE2eTestResources(); + Object.assign(process.env, e2eTestResourcesEnv); + + region = process?.env?.AWS_SMOKE_TEST_REGION as string; + + client = new ElasticLoadBalancing({ region }); + }); + + describe("Making a request", () => { + it("should successfully describe load balancers", async () => { + const result = await client.describeLoadBalancers({}); + + expect(result.$metadata?.httpStatusCode).toBe(200); + }); + }); + + describe("Error handling", () => { + it("should contain validation error for very long load balancer name", async () => { + await expect( + client.createLoadBalancer({ + LoadBalancerName: "verylongelasticloadbalancername", + Listeners: [ + { + Protocol: "HTTP", + LoadBalancerPort: 80, + InstancePort: 80, + }, + ], + AvailabilityZones: ["us-east-1a"], + }) + ).rejects.toThrow( + expect.objectContaining({ + name: "ValidationError", + $metadata: expect.objectContaining({ + httpStatusCode: 400, + }), + }) + ); + }); + }); +}); diff --git a/clients/client-elastic-load-balancing/vitest.config.e2e.mts b/clients/client-elastic-load-balancing/vitest.config.e2e.mts new file mode 100644 index 000000000000..ccea26a45905 --- /dev/null +++ b/clients/client-elastic-load-balancing/vitest.config.e2e.mts @@ -0,0 +1,10 @@ +import { defineConfig } from "vitest/config"; + +export default defineConfig({ + test: { + exclude: ["**/*.browser.e2e.spec.ts"], + include: ["**/*.e2e.spec.ts"], + environment: "node", + }, + mode: "development", +}); diff --git a/clients/client-elasticache/package.json b/clients/client-elasticache/package.json index bf265b978311..104d7c6b2d2b 100644 --- a/clients/client-elasticache/package.json +++ b/clients/client-elasticache/package.json @@ -12,6 +12,8 @@ "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo", "extract:docs": "api-extractor run --local", "generate:client": "node ../../scripts/generate-clients/single-service --solo elasticache", + "test:e2e": "yarn g:vitest run -c vitest.config.e2e.mts --mode development", + "test:e2e:watch": "yarn g:vitest watch -c vitest.config.e2e.mts", "test:index": "tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs" }, "main": "./dist-cjs/index.js", diff --git a/clients/client-elasticache/test/elasticache-features.e2e.spec.ts b/clients/client-elasticache/test/elasticache-features.e2e.spec.ts new file mode 100644 index 000000000000..e91525026938 --- /dev/null +++ b/clients/client-elasticache/test/elasticache-features.e2e.spec.ts @@ -0,0 +1,65 @@ +import { getE2eTestResources } from "@aws-sdk/aws-util-test/src"; +import { ElastiCache } from "@aws-sdk/client-elasticache"; +import { beforeAll, describe, expect, test as it } from "vitest"; + +describe("Amazon ElastiCache Features", () => { + let client: ElastiCache; + let region: string; + let cacheParameterGroupName: string; + + beforeAll(async () => { + const e2eTestResourcesEnv = await getE2eTestResources(); + Object.assign(process.env, e2eTestResourcesEnv); + + region = process?.env?.AWS_SMOKE_TEST_REGION as string; + + client = new ElastiCache({ region }); + }); + + describe("Creating and deleting cache parameter groups", () => { + it("should create, describe, and delete cache parameter group", async () => { + cacheParameterGroupName = `aws-js-sdk-${Date.now()}`; + + // Create cache parameter group + const createResult = await client.createCacheParameterGroup({ + CacheParameterGroupName: cacheParameterGroupName, + CacheParameterGroupFamily: "redis7", + Description: "Test parameter group for SDK", + }); + + expect(createResult.CacheParameterGroup?.CacheParameterGroupName).toBe(cacheParameterGroupName); + + // Describe cache parameter groups + const describeResult = await client.describeCacheParameterGroups({}); + + expect(Array.isArray(describeResult.CacheParameterGroups)).toBe(true); + + // Check if parameter group is in the list + const foundGroup = describeResult.CacheParameterGroups?.find( + (group) => group.CacheParameterGroupName === cacheParameterGroupName + ); + expect(foundGroup?.CacheParameterGroupName).toBe(cacheParameterGroupName); + + // Cleanup - delete the parameter group + await client.deleteCacheParameterGroup({ + CacheParameterGroupName: cacheParameterGroupName, + }); + }); + }); + + describe("Error handling", () => { + it("should contain invalid parameter error for empty parameter group name", async () => { + await expect( + client.createCacheParameterGroup({ + CacheParameterGroupName: "", + CacheParameterGroupFamily: "redis7", + Description: "Test parameter group", + }) + ).rejects.toThrow( + expect.objectContaining({ + name: "InvalidParameterValueException", + }) + ); + }); + }); +}); diff --git a/clients/client-elasticache/vitest.config.e2e.mts b/clients/client-elasticache/vitest.config.e2e.mts new file mode 100644 index 000000000000..ccea26a45905 --- /dev/null +++ b/clients/client-elasticache/vitest.config.e2e.mts @@ -0,0 +1,10 @@ +import { defineConfig } from "vitest/config"; + +export default defineConfig({ + test: { + exclude: ["**/*.browser.e2e.spec.ts"], + include: ["**/*.e2e.spec.ts"], + environment: "node", + }, + mode: "development", +}); diff --git a/clients/client-elasticsearch-service/package.json b/clients/client-elasticsearch-service/package.json index 7dfaea5b81e5..40f88a8b1ec6 100644 --- a/clients/client-elasticsearch-service/package.json +++ b/clients/client-elasticsearch-service/package.json @@ -12,6 +12,8 @@ "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo", "extract:docs": "api-extractor run --local", "generate:client": "node ../../scripts/generate-clients/single-service --solo elasticsearch-service", + "test:e2e": "yarn g:vitest run -c vitest.config.e2e.mts --mode development", + "test:e2e:watch": "yarn g:vitest watch -c vitest.config.e2e.mts", "test:index": "tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs" }, "main": "./dist-cjs/index.js", diff --git a/clients/client-elasticsearch-service/test/es-features.e2e.spec.ts b/clients/client-elasticsearch-service/test/es-features.e2e.spec.ts new file mode 100644 index 000000000000..c8dce88b3e88 --- /dev/null +++ b/clients/client-elasticsearch-service/test/es-features.e2e.spec.ts @@ -0,0 +1,40 @@ +import { getE2eTestResources } from "@aws-sdk/aws-util-test/src"; +import { ElasticsearchService } from "@aws-sdk/client-elasticsearch-service"; +import { beforeAll, describe, expect, test as it } from "vitest"; + +describe("Amazon ES Features", () => { + let client: ElasticsearchService; + let region: string; + + beforeAll(async () => { + const e2eTestResourcesEnv = await getE2eTestResources(); + Object.assign(process.env, e2eTestResourcesEnv); + + region = process?.env?.AWS_SMOKE_TEST_REGION as string; + + client = new ElasticsearchService({ region }); + }); + + describe("Making a request", () => { + it("should successfully list domain names", async () => { + const result = await client.listDomainNames({}); + + expect(result.$metadata?.httpStatusCode).toBe(200); + expect(Array.isArray(result.DomainNames)).toBe(true); + }); + }); + + describe("Error handling", () => { + it("should contain resource not found error for non-existent domain", async () => { + await expect( + client.describeElasticsearchDomain({ + DomainName: "not-a-domain", + }) + ).rejects.toThrow( + expect.objectContaining({ + name: "ResourceNotFoundException", + }) + ); + }); + }); +}); diff --git a/clients/client-elasticsearch-service/vitest.config.e2e.mts b/clients/client-elasticsearch-service/vitest.config.e2e.mts new file mode 100644 index 000000000000..ccea26a45905 --- /dev/null +++ b/clients/client-elasticsearch-service/vitest.config.e2e.mts @@ -0,0 +1,10 @@ +import { defineConfig } from "vitest/config"; + +export default defineConfig({ + test: { + exclude: ["**/*.browser.e2e.spec.ts"], + include: ["**/*.e2e.spec.ts"], + environment: "node", + }, + mode: "development", +}); diff --git a/clients/client-emr/package.json b/clients/client-emr/package.json index d3df309b3eaa..1e9a7bc5109b 100644 --- a/clients/client-emr/package.json +++ b/clients/client-emr/package.json @@ -12,6 +12,8 @@ "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo", "extract:docs": "api-extractor run --local", "generate:client": "node ../../scripts/generate-clients/single-service --solo emr", + "test:e2e": "yarn g:vitest run -c vitest.config.e2e.mts --mode development", + "test:e2e:watch": "yarn g:vitest watch -c vitest.config.e2e.mts", "test:index": "tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs" }, "main": "./dist-cjs/index.js", diff --git a/clients/client-emr/test/emr-features.e2e.spec.ts b/clients/client-emr/test/emr-features.e2e.spec.ts new file mode 100644 index 000000000000..2b4ef525c007 --- /dev/null +++ b/clients/client-emr/test/emr-features.e2e.spec.ts @@ -0,0 +1,41 @@ +import { getE2eTestResources } from "@aws-sdk/aws-util-test/src"; +import { EMR } from "@aws-sdk/client-emr"; +import { beforeAll, describe, expect, test as it } from "vitest"; + +describe("Amazon Elastic MapReduce Features", () => { + let client: EMR; + let region: string; + + beforeAll(async () => { + const e2eTestResourcesEnv = await getE2eTestResources(); + Object.assign(process.env, e2eTestResourcesEnv); + + region = process?.env?.AWS_SMOKE_TEST_REGION as string; + + client = new EMR({ region }); + }); + + describe("Making a request", () => { + it("should successfully list clusters", async () => { + const result = await client.listClusters({}); + + expect(result.$metadata?.httpStatusCode).toBe(200); + expect(Array.isArray(result.Clusters)).toBe(true); + }); + }); + + describe("Error handling", () => { + it("should contain validation error for invalid parameters", async () => { + await expect( + client.runJobFlow({ + Name: "", // Empty name should cause ValidationException + Instances: {}, // Empty instances config + }) + ).rejects.toThrow( + expect.objectContaining({ + name: "ValidationException", + }) + ); + }); + }); +}); diff --git a/clients/client-emr/vitest.config.e2e.mts b/clients/client-emr/vitest.config.e2e.mts new file mode 100644 index 000000000000..ccea26a45905 --- /dev/null +++ b/clients/client-emr/vitest.config.e2e.mts @@ -0,0 +1,10 @@ +import { defineConfig } from "vitest/config"; + +export default defineConfig({ + test: { + exclude: ["**/*.browser.e2e.spec.ts"], + include: ["**/*.e2e.spec.ts"], + environment: "node", + }, + mode: "development", +}); diff --git a/clients/client-gamelift/package.json b/clients/client-gamelift/package.json index 50afe4560697..bd85fba7424b 100644 --- a/clients/client-gamelift/package.json +++ b/clients/client-gamelift/package.json @@ -12,6 +12,8 @@ "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo", "extract:docs": "api-extractor run --local", "generate:client": "node ../../scripts/generate-clients/single-service --solo gamelift", + "test:e2e": "yarn g:vitest run -c vitest.config.e2e.mts --mode development", + "test:e2e:watch": "yarn g:vitest watch -c vitest.config.e2e.mts", "test:index": "tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs" }, "main": "./dist-cjs/index.js", diff --git a/clients/client-gamelift/test/gamelift-features.e2e.spec.ts b/clients/client-gamelift/test/gamelift-features.e2e.spec.ts new file mode 100644 index 000000000000..002cf38747db --- /dev/null +++ b/clients/client-gamelift/test/gamelift-features.e2e.spec.ts @@ -0,0 +1,40 @@ +import { getE2eTestResources } from "@aws-sdk/aws-util-test/src"; +import { GameLift } from "@aws-sdk/client-gamelift"; +import { beforeAll, describe, expect, test as it } from "vitest"; + +describe("Amazon GameLift Features", () => { + let client: GameLift; + let region: string; + + beforeAll(async () => { + const e2eTestResourcesEnv = await getE2eTestResources(); + Object.assign(process.env, e2eTestResourcesEnv); + + region = process?.env?.AWS_SMOKE_TEST_REGION as string; + + client = new GameLift({ region }); + }); + + describe("Making a request", () => { + it("should successfully list builds", async () => { + const result = await client.listBuilds({}); + + expect(result.$metadata?.httpStatusCode).toBe(200); + expect(Array.isArray(result.Builds)).toBe(true); + }); + }); + + describe("Error handling", () => { + it("should contain invalid request eexception for fake alias ID", async () => { + await expect( + client.describeAlias({ + AliasId: "fake_id", + }) + ).rejects.toThrow( + expect.objectContaining({ + name: "InvalidRequestException", + }) + ); + }); + }); +}); diff --git a/clients/client-gamelift/vitest.config.e2e.mts b/clients/client-gamelift/vitest.config.e2e.mts new file mode 100644 index 000000000000..ccea26a45905 --- /dev/null +++ b/clients/client-gamelift/vitest.config.e2e.mts @@ -0,0 +1,10 @@ +import { defineConfig } from "vitest/config"; + +export default defineConfig({ + test: { + exclude: ["**/*.browser.e2e.spec.ts"], + include: ["**/*.e2e.spec.ts"], + environment: "node", + }, + mode: "development", +}); diff --git a/clients/client-iam/package.json b/clients/client-iam/package.json index 00d15126cdd9..9ae2420fcdb3 100644 --- a/clients/client-iam/package.json +++ b/clients/client-iam/package.json @@ -12,6 +12,8 @@ "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo", "extract:docs": "api-extractor run --local", "generate:client": "node ../../scripts/generate-clients/single-service --solo iam", + "test:e2e": "yarn g:vitest run -c vitest.config.e2e.mts --mode development", + "test:e2e:watch": "yarn g:vitest watch -c vitest.config.e2e.mts", "test:index": "tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs" }, "main": "./dist-cjs/index.js", diff --git a/clients/client-iam/test/iam-features.e2e.spec.ts b/clients/client-iam/test/iam-features.e2e.spec.ts new file mode 100644 index 000000000000..92110c64c9e1 --- /dev/null +++ b/clients/client-iam/test/iam-features.e2e.spec.ts @@ -0,0 +1,67 @@ +import { getE2eTestResources } from "@aws-sdk/aws-util-test/src"; +import { IAM } from "@aws-sdk/client-iam"; +import { beforeAll, describe, expect, test as it } from "vitest"; + +describe("IAM Features", () => { + let client: IAM; + let region: string; + + beforeAll(async () => { + const e2eTestResourcesEnv = await getE2eTestResources(); + Object.assign(process.env, e2eTestResourcesEnv); + + region = process?.env?.AWS_SMOKE_TEST_REGION as string; + + client = new IAM({ region }); + }); + + describe("Users", () => { + it("should create IAM user", async () => { + const username = `js-test-${Date.now()}`; + + const result = await client.createUser({ + UserName: username, + }); + + expect(result.User?.UserName).toBe(username); + + await client.deleteUser({ UserName: username }); + }); + }); + + describe("Roles", () => { + it("should create IAM role", async () => { + const roleName = `aws-sdk-js-${Date.now()}`; + + const result = await client.createRole({ + RoleName: roleName, + AssumeRolePolicyDocument: JSON.stringify({ + Version: "2012-10-17", + Statement: [{ Effect: "Allow", Principal: { Service: "ec2.amazonaws.com" }, Action: "sts:AssumeRole" }], + }), + }); + + expect(result.Role?.RoleName).toBe(roleName); + + await client.deleteRole({ RoleName: roleName }); + }); + }); + + describe("Error handling", () => { + it("should contain entity already exists error for duplicate user", async () => { + const username = `js-test-dupe-${Date.now()}`; + + await client.createUser({ UserName: username }); + + try { + await expect(client.createUser({ UserName: username })).rejects.toThrow( + expect.objectContaining({ + name: "EntityAlreadyExistsException", + }) + ); + } finally { + await client.deleteUser({ UserName: username }); + } + }); + }); +}); diff --git a/clients/client-iam/vitest.config.e2e.mts b/clients/client-iam/vitest.config.e2e.mts new file mode 100644 index 000000000000..ccea26a45905 --- /dev/null +++ b/clients/client-iam/vitest.config.e2e.mts @@ -0,0 +1,10 @@ +import { defineConfig } from "vitest/config"; + +export default defineConfig({ + test: { + exclude: ["**/*.browser.e2e.spec.ts"], + include: ["**/*.e2e.spec.ts"], + environment: "node", + }, + mode: "development", +}); diff --git a/clients/client-iot/package.json b/clients/client-iot/package.json index 691b8496ed9f..bf0f2eb17cca 100644 --- a/clients/client-iot/package.json +++ b/clients/client-iot/package.json @@ -12,6 +12,8 @@ "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo", "extract:docs": "api-extractor run --local", "generate:client": "node ../../scripts/generate-clients/single-service --solo iot", + "test:e2e": "yarn g:vitest run -c vitest.config.e2e.mts --mode development", + "test:e2e:watch": "yarn g:vitest watch -c vitest.config.e2e.mts", "test:index": "tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs" }, "main": "./dist-cjs/index.js", diff --git a/clients/client-iot/test/iot-features.e2e.spec.ts b/clients/client-iot/test/iot-features.e2e.spec.ts new file mode 100644 index 000000000000..8dc9d049307e --- /dev/null +++ b/clients/client-iot/test/iot-features.e2e.spec.ts @@ -0,0 +1,40 @@ +import { getE2eTestResources } from "@aws-sdk/aws-util-test/src"; +import { IoT } from "@aws-sdk/client-iot"; +import { beforeAll, describe, expect, test as it } from "vitest"; + +describe("AWS IoT Features", () => { + let client: IoT; + let region: string; + + beforeAll(async () => { + const e2eTestResourcesEnv = await getE2eTestResources(); + Object.assign(process.env, e2eTestResourcesEnv); + + region = process?.env?.AWS_SMOKE_TEST_REGION as string; + + client = new IoT({ region }); + }); + + describe("Making a request", () => { + it("should successfully list policies", async () => { + const result = await client.listPolicies({}); + + expect(result.$metadata?.httpStatusCode).toBe(200); + expect(Array.isArray(result.policies)).toBe(true); + }); + }); + + describe("Error handling", () => { + it("should contain invalid request exception for fake certificate ID", async () => { + await expect( + client.describeCertificate({ + certificateId: "fake_id", + }) + ).rejects.toThrow( + expect.objectContaining({ + name: "InvalidRequestException", + }) + ); + }); + }); +}); diff --git a/clients/client-iot/vitest.config.e2e.mts b/clients/client-iot/vitest.config.e2e.mts new file mode 100644 index 000000000000..ccea26a45905 --- /dev/null +++ b/clients/client-iot/vitest.config.e2e.mts @@ -0,0 +1,10 @@ +import { defineConfig } from "vitest/config"; + +export default defineConfig({ + test: { + exclude: ["**/*.browser.e2e.spec.ts"], + include: ["**/*.e2e.spec.ts"], + environment: "node", + }, + mode: "development", +}); diff --git a/clients/client-kinesis/test/kinesis-features.e2e.spec.ts b/clients/client-kinesis/test/kinesis-features.e2e.spec.ts new file mode 100644 index 000000000000..2bd5211e7193 --- /dev/null +++ b/clients/client-kinesis/test/kinesis-features.e2e.spec.ts @@ -0,0 +1,31 @@ +import { getE2eTestResources } from "@aws-sdk/aws-util-test/src"; +import { Kinesis } from "@aws-sdk/client-kinesis"; +import { beforeAll, describe, expect, test as it } from "vitest"; + +describe("Amazon Kinesis Features", () => { + let client: Kinesis; + let region: string; + + beforeAll(async () => { + const e2eTestResourcesEnv = await getE2eTestResources(); + Object.assign(process.env, e2eTestResourcesEnv); + + region = process?.env?.AWS_SMOKE_TEST_REGION as string; + + client = new Kinesis({ region }); + }); + + describe("Error handling", () => { + it("should contain resource not found error for non-existent stream", async () => { + await expect( + client.describeStream({ + StreamName: "non-existent-stream", + }) + ).rejects.toThrow( + expect.objectContaining({ + name: "ResourceNotFoundException", + }) + ); + }); + }); +}); diff --git a/clients/client-kinesis/vitest.config.e2e.mts b/clients/client-kinesis/vitest.config.e2e.mts index 92073c6cfcf0..ccea26a45905 100644 --- a/clients/client-kinesis/vitest.config.e2e.mts +++ b/clients/client-kinesis/vitest.config.e2e.mts @@ -2,7 +2,9 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + exclude: ["**/*.browser.e2e.spec.ts"], include: ["**/*.e2e.spec.ts"], environment: "node", }, + mode: "development", }); diff --git a/clients/client-kms/package.json b/clients/client-kms/package.json index f70874be6141..b201b8914a4a 100644 --- a/clients/client-kms/package.json +++ b/clients/client-kms/package.json @@ -12,6 +12,8 @@ "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo", "extract:docs": "api-extractor run --local", "generate:client": "node ../../scripts/generate-clients/single-service --solo kms", + "test:e2e": "yarn g:vitest run -c vitest.config.e2e.mts --mode development", + "test:e2e:watch": "yarn g:vitest watch -c vitest.config.e2e.mts", "test:index": "tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs" }, "main": "./dist-cjs/index.js", diff --git a/clients/client-kms/test/kms-features.e2e.spec.ts b/clients/client-kms/test/kms-features.e2e.spec.ts new file mode 100644 index 000000000000..07d979e9f77a --- /dev/null +++ b/clients/client-kms/test/kms-features.e2e.spec.ts @@ -0,0 +1,41 @@ +import { getE2eTestResources } from "@aws-sdk/aws-util-test/src"; +import { KMS } from "@aws-sdk/client-kms"; +import { beforeAll, describe, expect, test as it } from "vitest"; + +describe("AWS Key Management Service Features", () => { + let client: KMS; + let region: string; + + beforeAll(async () => { + const e2eTestResourcesEnv = await getE2eTestResources(); + Object.assign(process.env, e2eTestResourcesEnv); + + region = process?.env?.AWS_SMOKE_TEST_REGION as string; + + client = new KMS({ region }); + }); + + describe("List keys", () => { + it("should successfully list keys", async () => { + const result = await client.listKeys({}); + + expect(result.$metadata?.httpStatusCode).toBe(200); + expect(Array.isArray(result.Keys)).toBe(true); + }); + }); + + describe("Error handling", () => { + it("should contain validation error for invalid alias creation", async () => { + await expect( + client.createAlias({ + AliasName: "alias", + TargetKeyId: "non-existent", + }) + ).rejects.toThrow( + expect.objectContaining({ + name: "ValidationException", + }) + ); + }); + }); +}); diff --git a/clients/client-kms/vitest.config.e2e.mts b/clients/client-kms/vitest.config.e2e.mts new file mode 100644 index 000000000000..ccea26a45905 --- /dev/null +++ b/clients/client-kms/vitest.config.e2e.mts @@ -0,0 +1,10 @@ +import { defineConfig } from "vitest/config"; + +export default defineConfig({ + test: { + exclude: ["**/*.browser.e2e.spec.ts"], + include: ["**/*.e2e.spec.ts"], + environment: "node", + }, + mode: "development", +}); diff --git a/clients/client-lambda/package.json b/clients/client-lambda/package.json index 1ca90e45224c..b750247dc372 100644 --- a/clients/client-lambda/package.json +++ b/clients/client-lambda/package.json @@ -12,6 +12,8 @@ "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo", "extract:docs": "api-extractor run --local", "generate:client": "node ../../scripts/generate-clients/single-service --solo lambda", + "test:e2e": "yarn g:vitest run -c vitest.config.e2e.mts --mode development", + "test:e2e:watch": "yarn g:vitest watch -c vitest.config.e2e.mts", "test:index": "tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs" }, "main": "./dist-cjs/index.js", diff --git a/clients/client-lambda/test/lambda-features.e2e.spec.ts b/clients/client-lambda/test/lambda-features.e2e.spec.ts new file mode 100644 index 000000000000..ee6f39739b3c --- /dev/null +++ b/clients/client-lambda/test/lambda-features.e2e.spec.ts @@ -0,0 +1,40 @@ +import { getE2eTestResources } from "@aws-sdk/aws-util-test/src"; +import { Lambda } from "@aws-sdk/client-lambda"; +import { beforeAll, describe, expect, test as it } from "vitest"; + +describe("Amazon Lambda Features", () => { + let client: Lambda; + let region: string; + + beforeAll(async () => { + const e2eTestResourcesEnv = await getE2eTestResources(); + Object.assign(process.env, e2eTestResourcesEnv); + + region = process?.env?.AWS_SMOKE_TEST_REGION as string; + + client = new Lambda({ region }); + }); + + describe("Listing functions", () => { + it("should successfully list functions", async () => { + const result = await client.listFunctions({}); + + expect(result.$metadata?.httpStatusCode).toBe(200); + expect(Array.isArray(result.Functions)).toBe(true); + }); + }); + + describe("Error handling", () => { + it("should contain resource not found error for non-existent function", async () => { + await expect( + client.invoke({ + FunctionName: "non-exist", + }) + ).rejects.toThrow( + expect.objectContaining({ + name: "ResourceNotFoundException", + }) + ); + }); + }); +}); diff --git a/clients/client-lambda/vitest.config.e2e.mts b/clients/client-lambda/vitest.config.e2e.mts new file mode 100644 index 000000000000..ccea26a45905 --- /dev/null +++ b/clients/client-lambda/vitest.config.e2e.mts @@ -0,0 +1,10 @@ +import { defineConfig } from "vitest/config"; + +export default defineConfig({ + test: { + exclude: ["**/*.browser.e2e.spec.ts"], + include: ["**/*.e2e.spec.ts"], + environment: "node", + }, + mode: "development", +}); diff --git a/clients/client-redshift/package.json b/clients/client-redshift/package.json index 0ba0d8d0dea0..9db0161bbb6f 100644 --- a/clients/client-redshift/package.json +++ b/clients/client-redshift/package.json @@ -12,6 +12,8 @@ "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo", "extract:docs": "api-extractor run --local", "generate:client": "node ../../scripts/generate-clients/single-service --solo redshift", + "test:e2e": "yarn g:vitest run -c vitest.config.e2e.mts --mode development", + "test:e2e:watch": "yarn g:vitest watch -c vitest.config.e2e.mts", "test:index": "tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs" }, "main": "./dist-cjs/index.js", diff --git a/clients/client-redshift/test/redshift-features.e2e.spec.ts b/clients/client-redshift/test/redshift-features.e2e.spec.ts new file mode 100644 index 000000000000..ed5b0b31b36f --- /dev/null +++ b/clients/client-redshift/test/redshift-features.e2e.spec.ts @@ -0,0 +1,41 @@ +import { getE2eTestResources } from "@aws-sdk/aws-util-test/src"; +import { Redshift } from "@aws-sdk/client-redshift"; +import { beforeAll, describe, expect, test as it } from "vitest"; + +describe("Amazon Redshift Features", () => { + let client: Redshift; + let region: string; + + beforeAll(async () => { + const e2eTestResourcesEnv = await getE2eTestResources(); + Object.assign(process.env, e2eTestResourcesEnv); + + region = process?.env?.AWS_SMOKE_TEST_REGION as string; + + client = new Redshift({ region }); + }); + + describe("Describe cluster parameter groups", () => { + it("should successfully describe cluster parameter groups", async () => { + const result = await client.describeClusterParameterGroups({}); + + expect(result.$metadata?.httpStatusCode).toBe(200); + expect(Array.isArray(result.ParameterGroups)).toBe(true); + }); + }); + + describe("Error handling", () => { + it("should contain invalid parameter error for empty parameter group name", async () => { + try { + await client.createClusterParameterGroup({ + ParameterGroupName: "", // Empty name should cause InvalidParameterValue + ParameterGroupFamily: "redshift-1.0", + Description: "Test parameter group", + }); + } catch (error: any) { + expect(error.name).toBe("InvalidParameterValue"); + expect(error.message).toContain("The parameter DBParameterGroupName must be provided and must not be blank"); + } + }); + }); +}); diff --git a/clients/client-redshift/vitest.config.e2e.mts b/clients/client-redshift/vitest.config.e2e.mts new file mode 100644 index 000000000000..ccea26a45905 --- /dev/null +++ b/clients/client-redshift/vitest.config.e2e.mts @@ -0,0 +1,10 @@ +import { defineConfig } from "vitest/config"; + +export default defineConfig({ + test: { + exclude: ["**/*.browser.e2e.spec.ts"], + include: ["**/*.e2e.spec.ts"], + environment: "node", + }, + mode: "development", +}); diff --git a/clients/client-route-53-domains/package.json b/clients/client-route-53-domains/package.json index bcbd764745f6..b057ad597d7b 100644 --- a/clients/client-route-53-domains/package.json +++ b/clients/client-route-53-domains/package.json @@ -12,6 +12,8 @@ "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo", "extract:docs": "api-extractor run --local", "generate:client": "node ../../scripts/generate-clients/single-service --solo route-53-domains", + "test:e2e": "yarn g:vitest run -c vitest.config.e2e.mts --mode development", + "test:e2e:watch": "yarn g:vitest watch -c vitest.config.e2e.mts", "test:index": "tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs" }, "main": "./dist-cjs/index.js", diff --git a/clients/client-route-53-domains/test/route53domains-features.e2e.spec.ts b/clients/client-route-53-domains/test/route53domains-features.e2e.spec.ts new file mode 100644 index 000000000000..3e1bbe469a8e --- /dev/null +++ b/clients/client-route-53-domains/test/route53domains-features.e2e.spec.ts @@ -0,0 +1,54 @@ +import { getE2eTestResources } from "@aws-sdk/aws-util-test/src"; +import { Route53Domains } from "@aws-sdk/client-route-53-domains"; +import { beforeAll, describe, expect, test as it } from "vitest"; + +describe("Amazon Route 53 Domains Features", () => { + let client: Route53Domains; + let region: string; + + beforeAll(async () => { + const e2eTestResourcesEnv = await getE2eTestResources(); + Object.assign(process.env, e2eTestResourcesEnv); + + // Requests for domain registration only available in us-east-1 + region = "us-east-1"; + + client = new Route53Domains({ region }); + }); + + describe("Feature", () => { + it("should successfully list Route53 domains", async () => { + const result = await client.listDomains({}); + + expect(result.$metadata?.httpStatusCode).toBe(200); + expect(Array.isArray(result.Domains)).toBe(true); + }); + }); + + describe("Error handling", () => { + it("should contain invalid input error for invalid domain registration parameters", async () => { + await expect( + client.registerDomain({ + DomainName: "", // Empty domain name should cause InvalidInput + DurationInYears: 1, + AdminContact: { + FirstName: "", + LastName: "", + }, + RegistrantContact: { + FirstName: "", + LastName: "", + }, + TechContact: { + FirstName: "", + LastName: "", + }, + }) + ).rejects.toThrow( + expect.objectContaining({ + name: "InvalidInput", + }) + ); + }); + }); +}); diff --git a/clients/client-route-53-domains/vitest.config.e2e.mts b/clients/client-route-53-domains/vitest.config.e2e.mts new file mode 100644 index 000000000000..ccea26a45905 --- /dev/null +++ b/clients/client-route-53-domains/vitest.config.e2e.mts @@ -0,0 +1,10 @@ +import { defineConfig } from "vitest/config"; + +export default defineConfig({ + test: { + exclude: ["**/*.browser.e2e.spec.ts"], + include: ["**/*.e2e.spec.ts"], + environment: "node", + }, + mode: "development", +}); diff --git a/clients/client-route-53/package.json b/clients/client-route-53/package.json index 9182aacb099e..2789fd7e4ee9 100644 --- a/clients/client-route-53/package.json +++ b/clients/client-route-53/package.json @@ -12,6 +12,8 @@ "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo", "extract:docs": "api-extractor run --local", "generate:client": "node ../../scripts/generate-clients/single-service --solo route-53", + "test:e2e": "yarn g:vitest run -c vitest.config.e2e.mts --mode development", + "test:e2e:watch": "yarn g:vitest watch -c vitest.config.e2e.mts", "test:index": "tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs" }, "main": "./dist-cjs/index.js", diff --git a/clients/client-route-53/test/route53-features.e2e.spec.ts b/clients/client-route-53/test/route53-features.e2e.spec.ts new file mode 100644 index 000000000000..51e508cb26ac --- /dev/null +++ b/clients/client-route-53/test/route53-features.e2e.spec.ts @@ -0,0 +1,40 @@ +import { getE2eTestResources } from "@aws-sdk/aws-util-test/src"; +import { Route53 } from "@aws-sdk/client-route-53"; +import { beforeAll, describe, expect, test as it } from "vitest"; + +describe("Amazon Route 53 Features", () => { + let client: Route53; + let region: string; + + beforeAll(async () => { + const e2eTestResourcesEnv = await getE2eTestResources(); + Object.assign(process.env, e2eTestResourcesEnv); + + region = process?.env?.AWS_SMOKE_TEST_REGION as string; + + client = new Route53({ region }); + }); + + describe("Making a request", () => { + it("should successfully list hosted zones", async () => { + const result = await client.listHostedZones({}); + + expect(result.$metadata?.httpStatusCode).toBe(200); + expect(Array.isArray(result.HostedZones)).toBe(true); + }); + }); + + describe("Error handling", () => { + it("should contain no such hosted zone error for fake zone ID", async () => { + await expect( + client.getHostedZone({ + Id: "fake-zone", + }) + ).rejects.toThrow( + expect.objectContaining({ + name: "NoSuchHostedZone", + }) + ); + }); + }); +}); diff --git a/clients/client-route-53/vitest.config.e2e.mts b/clients/client-route-53/vitest.config.e2e.mts new file mode 100644 index 000000000000..ccea26a45905 --- /dev/null +++ b/clients/client-route-53/vitest.config.e2e.mts @@ -0,0 +1,10 @@ +import { defineConfig } from "vitest/config"; + +export default defineConfig({ + test: { + exclude: ["**/*.browser.e2e.spec.ts"], + include: ["**/*.e2e.spec.ts"], + environment: "node", + }, + mode: "development", +}); diff --git a/clients/client-sagemaker/package.json b/clients/client-sagemaker/package.json index 1b0e7db61174..ef48ec327149 100644 --- a/clients/client-sagemaker/package.json +++ b/clients/client-sagemaker/package.json @@ -12,6 +12,8 @@ "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo", "extract:docs": "api-extractor run --local", "generate:client": "node ../../scripts/generate-clients/single-service --solo sagemaker", + "test:e2e": "yarn g:vitest run -c vitest.config.e2e.mts --mode development", + "test:e2e:watch": "yarn g:vitest watch -c vitest.config.e2e.mts", "test:index": "tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs" }, "main": "./dist-cjs/index.js", diff --git a/clients/client-sagemaker/test/sagemaker-features.e2e.spec.ts b/clients/client-sagemaker/test/sagemaker-features.e2e.spec.ts new file mode 100644 index 000000000000..839752bd1044 --- /dev/null +++ b/clients/client-sagemaker/test/sagemaker-features.e2e.spec.ts @@ -0,0 +1,40 @@ +import { getE2eTestResources } from "@aws-sdk/aws-util-test/src"; +import { SageMaker } from "@aws-sdk/client-sagemaker"; +import { beforeAll, describe, expect, test as it } from "vitest"; + +describe("Amazon SageMaker Features", () => { + let client: SageMaker; + let region: string; + + beforeAll(async () => { + const e2eTestResourcesEnv = await getE2eTestResources(); + Object.assign(process.env, e2eTestResourcesEnv); + + region = process?.env?.AWS_SMOKE_TEST_REGION as string; + + client = new SageMaker({ region }); + }); + + describe("List Endpoints", () => { + it("should successfully list endpoints", async () => { + const result = await client.listEndpoints({}); + + expect(result.$metadata?.httpStatusCode).toBe(200); + expect(Array.isArray(result.Endpoints)).toBe(true); + }); + }); + + describe("Error handling", () => { + it("should contain validation error for non-existent endpoint", async () => { + await expect( + client.describeEndpoint({ + EndpointName: "non-existent", + }) + ).rejects.toThrow( + expect.objectContaining({ + name: "ValidationException", + }) + ); + }); + }); +}); diff --git a/clients/client-sagemaker/vitest.config.e2e.mts b/clients/client-sagemaker/vitest.config.e2e.mts new file mode 100644 index 000000000000..ccea26a45905 --- /dev/null +++ b/clients/client-sagemaker/vitest.config.e2e.mts @@ -0,0 +1,10 @@ +import { defineConfig } from "vitest/config"; + +export default defineConfig({ + test: { + exclude: ["**/*.browser.e2e.spec.ts"], + include: ["**/*.e2e.spec.ts"], + environment: "node", + }, + mode: "development", +}); diff --git a/clients/client-ses/package.json b/clients/client-ses/package.json index efb5b73fe290..f632905e401c 100644 --- a/clients/client-ses/package.json +++ b/clients/client-ses/package.json @@ -12,6 +12,8 @@ "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo", "extract:docs": "api-extractor run --local", "generate:client": "node ../../scripts/generate-clients/single-service --solo ses", + "test:e2e": "yarn g:vitest run -c vitest.config.e2e.mts --mode development", + "test:e2e:watch": "yarn g:vitest watch -c vitest.config.e2e.mts", "test:index": "tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs" }, "main": "./dist-cjs/index.js", diff --git a/clients/client-ses/test/ses-features.e2e.spec.ts b/clients/client-ses/test/ses-features.e2e.spec.ts new file mode 100644 index 000000000000..f974f417359b --- /dev/null +++ b/clients/client-ses/test/ses-features.e2e.spec.ts @@ -0,0 +1,52 @@ +import { getE2eTestResources } from "@aws-sdk/aws-util-test/src"; +import { SES } from "@aws-sdk/client-ses"; +import { beforeAll, describe, expect, test as it } from "vitest"; + +describe("SES Features", () => { + let client: SES; + let region: string; + + beforeAll(async () => { + const e2eTestResourcesEnv = await getE2eTestResources(); + Object.assign(process.env, e2eTestResourcesEnv); + + region = process?.env?.AWS_SMOKE_TEST_REGION as string; + + client = new SES({ region }); + }); + + describe("Check quota", () => { + it("should return quota with SentLast24Hours and MaxSendRate", async () => { + const result = await client.getSendQuota({}); + + expect(result.SentLast24Hours).toBeDefined(); + expect(typeof result.SentLast24Hours).toBe("number"); + expect(result.MaxSendRate).toBeDefined(); + expect(typeof result.MaxSendRate).toBe("number"); + }); + }); + + describe("Verify email", () => { + it("should return 200 status code for email verification request", async () => { + const result = await client.verifyEmailIdentity({ + EmailAddress: "foo@example.com", + }); + + expect(result.$metadata?.httpStatusCode).toBe(200); + }); + }); + + describe("Rescue SES InvalidParameterValue", () => { + it("should get InvalidParameterValue error for invalid email address", async () => { + try { + await client.verifyEmailIdentity({ + EmailAddress: "abc123", + }); + expect.fail("Expected InvalidParameterValue error was not thrown"); + } catch (error: any) { + expect(error.name).toBe("InvalidParameterValue"); + expect(error.message).toContain("Invalid email address."); + } + }); + }); +}); diff --git a/clients/client-ses/vitest.config.e2e.mts b/clients/client-ses/vitest.config.e2e.mts new file mode 100644 index 000000000000..ccea26a45905 --- /dev/null +++ b/clients/client-ses/vitest.config.e2e.mts @@ -0,0 +1,10 @@ +import { defineConfig } from "vitest/config"; + +export default defineConfig({ + test: { + exclude: ["**/*.browser.e2e.spec.ts"], + include: ["**/*.e2e.spec.ts"], + environment: "node", + }, + mode: "development", +}); diff --git a/clients/client-sns/package.json b/clients/client-sns/package.json index 4d98c03a05f0..dfd6aa16413b 100644 --- a/clients/client-sns/package.json +++ b/clients/client-sns/package.json @@ -12,6 +12,8 @@ "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo", "extract:docs": "api-extractor run --local", "generate:client": "node ../../scripts/generate-clients/single-service --solo sns", + "test:e2e": "yarn g:vitest run -c vitest.config.e2e.mts --mode development", + "test:e2e:watch": "yarn g:vitest watch -c vitest.config.e2e.mts", "test:index": "tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs" }, "main": "./dist-cjs/index.js", diff --git a/clients/client-sns/test/sns-features.e2e.spec.ts b/clients/client-sns/test/sns-features.e2e.spec.ts new file mode 100644 index 000000000000..a8c223ddf346 --- /dev/null +++ b/clients/client-sns/test/sns-features.e2e.spec.ts @@ -0,0 +1,49 @@ +import { getE2eTestResources } from "@aws-sdk/aws-util-test/src"; +import { SNS } from "@aws-sdk/client-sns"; +import { beforeAll, describe, expect, test as it } from "vitest"; + +describe("Simple Notification Service Features", () => { + let client: SNS; + let region: string; + let topicArn: string; + + beforeAll(async () => { + const e2eTestResourcesEnv = await getE2eTestResources(); + Object.assign(process.env, e2eTestResourcesEnv); + + region = process?.env?.AWS_SMOKE_TEST_REGION as string; + + client = new SNS({ region }); + }); + + describe("Topics", () => { + it("should create and list SNS topics", async () => { + const createResult = await client.createTopic({ + Name: `aws-js-sdk-${Date.now()}`, + }); + + topicArn = createResult.TopicArn || ""; + expect(topicArn).toBeTruthy(); + + const listResult = await client.listTopics({}); + expect(Array.isArray(listResult.Topics)).toBe(true); + + // Cleanup + await client.deleteTopic({ TopicArn: topicArn }); + }); + }); + + describe("Error handling", () => { + it("should contain invalid parameter error for invalid ARN", async () => { + await expect( + client.getTopicAttributes({ + TopicArn: "invalid-arn", + }) + ).rejects.toThrow( + expect.objectContaining({ + name: "InvalidParameterException", + }) + ); + }); + }); +}); diff --git a/clients/client-sns/vitest.config.e2e.mts b/clients/client-sns/vitest.config.e2e.mts new file mode 100644 index 000000000000..ccea26a45905 --- /dev/null +++ b/clients/client-sns/vitest.config.e2e.mts @@ -0,0 +1,10 @@ +import { defineConfig } from "vitest/config"; + +export default defineConfig({ + test: { + exclude: ["**/*.browser.e2e.spec.ts"], + include: ["**/*.e2e.spec.ts"], + environment: "node", + }, + mode: "development", +}); diff --git a/features/acm/acm.feature b/features/acm/acm.feature deleted file mode 100644 index 7da9679fd9f1..000000000000 --- a/features/acm/acm.feature +++ /dev/null @@ -1,17 +0,0 @@ -# language: en -@acm -Feature: - - I want to use AWS Certificate Manager - - Scenario: Making a request - Given I run the "listCertificates" operation - Then the request should be successful - And the value at "CertificateSummaryList" should be a list - - Scenario: Error handling - Given I run the "describeCertificate" operation with params: - """ - { "CertificateArn": "fake_arn" } - """ - Then the error code should be "ValidationException" diff --git a/features/acm/step_definitions/acm.js b/features/acm/step_definitions/acm.js deleted file mode 100644 index 303fb3edcd79..000000000000 --- a/features/acm/step_definitions/acm.js +++ /dev/null @@ -1,7 +0,0 @@ -const { Before } = require("@cucumber/cucumber"); - -Before({ tags: "@acm" }, function (scenario, callback) { - const { ACM } = require("../../../clients/client-acm"); - this.service = new ACM({}); - callback(); -}); diff --git a/features/apigateway/apigateway.feature b/features/apigateway/apigateway.feature deleted file mode 100644 index 663d7ee2630f..000000000000 --- a/features/apigateway/apigateway.feature +++ /dev/null @@ -1,17 +0,0 @@ -# language: en -@apigateway -Feature: - - I want to use Amazon API Gateway - - Scenario: Making a request - Given I run the "getRestApis" operation - Then the request should be successful - And the value at "items" should be a list - - Scenario: Error handling - Given I run the "getRestApi" operation with params: - """ - { "restApiId": "fake_id" } - """ - Then the error code should be "NotFoundException" diff --git a/features/apigateway/step_definitions/apigateway.js b/features/apigateway/step_definitions/apigateway.js deleted file mode 100644 index c63db04e63f6..000000000000 --- a/features/apigateway/step_definitions/apigateway.js +++ /dev/null @@ -1,7 +0,0 @@ -const { Before } = require("@cucumber/cucumber"); - -Before({ tags: "@apigateway" }, function (scenario, callback) { - const { APIGateway } = require("../../../clients/client-api-gateway"); - this.service = new APIGateway({}); - callback(); -}); diff --git a/features/cloudformation/cloudformation.feature b/features/cloudformation/cloudformation.feature deleted file mode 100644 index 1a13a19cd2f8..000000000000 --- a/features/cloudformation/cloudformation.feature +++ /dev/null @@ -1,20 +0,0 @@ -# language: en -@cloudformation -Feature: AWS CloudFormation - - I want to use AWS CloudFormation - - Scenario: Describing stacks - Given I run the "describeStacks" operation - Then the request should be successful - And the value at "Stacks" should be a list - - Scenario: Error handling - Given I create a CloudFormation stack with name prefix "" - Then the error code should be "ValidationError" - -# @pagination -# Scenario: Paginating responses -# Given I paginate the "listStacks" operation -# Then I should get at least one page -# And the last page should not contain a marker diff --git a/features/cloudformation/step_definitions/cloudformation.js b/features/cloudformation/step_definitions/cloudformation.js deleted file mode 100644 index 20603de1b6a2..000000000000 --- a/features/cloudformation/step_definitions/cloudformation.js +++ /dev/null @@ -1,18 +0,0 @@ -const { Before, Given } = require("@cucumber/cucumber"); - -Before({ tags: "@cloudformation" }, function (scenario, callback) { - const { CloudFormation } = require("../../../clients/client-cloudformation"); - this.service = new CloudFormation({}); - callback(); -}); - -Given("I create a CloudFormation stack with name prefix {string}", function (prefix, callback) { - this.stackName = this.uniqueName(prefix); - this.templateBody = '{"Resources":{"member":{"Type":"AWS::SQS::Queue"}}}'; - const params = { - TemplateBody: this.templateBody, - StackName: this.stackName, - EnableTerminationProtection: true, - }; - this.request(null, "createStack", params, callback, false); -}); diff --git a/features/cloudfront/cloudfront.feature b/features/cloudfront/cloudfront.feature deleted file mode 100644 index 9ffd92f4e780..000000000000 --- a/features/cloudfront/cloudfront.feature +++ /dev/null @@ -1,20 +0,0 @@ -# language: en -@cloudfront -Feature: Amazon CloudFront - - I want to use Amazon CloudFront - - Scenario: Listing distributions - Given I list CloudFront distributions - Then the result at DistributionList should contain a property Quantity with a number - - # Let this fail with NoSuchOrigin to confirm we serialized inputs - # but without creating a distribution. - Scenario: Creating a distribution - Given I create a CloudFront distribution with name prefix "aws-js-sdk" - Then the error code should be "NoSuchOrigin" - And the error status code should be 404 - - Scenario: Error handling - Given I create a CloudFront distribution with name prefix "" - Then the error code should be "InvalidArgument" diff --git a/features/cloudfront/step_definitions/cloudfront.js b/features/cloudfront/step_definitions/cloudfront.js deleted file mode 100644 index 977384dcae71..000000000000 --- a/features/cloudfront/step_definitions/cloudfront.js +++ /dev/null @@ -1,71 +0,0 @@ -const { Before, Given } = require("@cucumber/cucumber"); - -const createParams = { - CallerReference: "", - Aliases: { - Quantity: 0, - }, - DefaultRootObject: "", - Origins: { - Items: [ - { - Id: "origin", - DomainName: "example.com", - CustomOriginConfig: { - HTTPPort: 80, - HTTPSPort: 443, - OriginProtocolPolicy: "match-viewer", - }, - }, - ], - Quantity: 1, - }, - DefaultCacheBehavior: { - TargetOriginId: "origin", - ForwardedValues: { - QueryString: false, - Cookies: { - Forward: "all", - }, - }, - TrustedSigners: { - Items: [], - Enabled: false, - Quantity: 0, - }, - ViewerProtocolPolicy: "allow-all", - MinTTL: 0, - }, - CacheBehaviors: { - Items: [], - Quantity: 0, - }, - Comment: "", - Logging: { - Enabled: false, - Bucket: "invalidbucket.s3.amazonaws.com", - Prefix: "prefix", - IncludeCookies: false, - }, - PriceClass: "PriceClass_All", - Enabled: false, -}; - -Before({ tags: "@cloudfront" }, function (scenario, callback) { - const { CloudFront } = require("../../../clients/client-cloudfront"); - this.service = new CloudFront({}); - - this.cfCreateParams = createParams; - callback(); -}); - -Given("I create a CloudFront distribution with name prefix {string}", function (prefix, callback) { - this.cfName = this.uniqueName(prefix); - this.cfCreateParams.CallerReference = this.cfName; - this.cfCreateParams.Origins.Items[0].Id = this.cfName === "" ? "origin" : "InvalidOrigin"; - this.request(null, "createDistribution", { DistributionConfig: this.cfCreateParams }, callback, false); -}); - -Given("I list CloudFront distributions", function (callback) { - this.request(null, "listDistributions", {}, callback); -}); diff --git a/features/cloudtrail/cloudtrail.feature b/features/cloudtrail/cloudtrail.feature deleted file mode 100644 index c4d0f74f8918..000000000000 --- a/features/cloudtrail/cloudtrail.feature +++ /dev/null @@ -1,17 +0,0 @@ -# language: en -@cloudtrail -Feature: AWS CloudTrail - - I want to use AWS CloudTrail - - Scenario: Describing trails - Given I describe trails - Then the status code should be 200 - - Scenario: Error handling - Given I create a trail with an invalid name - Then the error code should be "InvalidTrailNameException" - And the error message should contain: - """ - cannot be blank - """ diff --git a/features/cloudtrail/step_definitions/cloudtrail.js b/features/cloudtrail/step_definitions/cloudtrail.js deleted file mode 100644 index 3dff3316456e..000000000000 --- a/features/cloudtrail/step_definitions/cloudtrail.js +++ /dev/null @@ -1,15 +0,0 @@ -const { Before, Given } = require("@cucumber/cucumber"); - -Before({ tags: "@cloudtrail" }, function (scenario, callback) { - const { CloudTrail } = require("../../../clients/client-cloudtrail"); - this.service = new CloudTrail({}); - callback(); -}); - -Given("I describe trails", function (callback) { - this.request(null, "describeTrails", {}, callback); -}); - -Given("I create a trail with an invalid name", function (callback) { - this.request(null, "createTrail", { Name: "", S3BucketName: "" }, callback, false); -}); diff --git a/features/cloudwatch/cloudwatch.feature b/features/cloudwatch/cloudwatch.feature deleted file mode 100644 index b9a0bf51ff59..000000000000 --- a/features/cloudwatch/cloudwatch.feature +++ /dev/null @@ -1,14 +0,0 @@ -# language: en -@cloudwatch -Feature: Amazon CloudWatch - - I want to use Amazon CloudWatch - - Scenario: Alarms - Given I create a CloudWatch alarm with prefix "aws-js-sdk-alarm" - And I list the CloudWatch alarms - Then the list should contain the CloudWatch alarm - - Scenario: Error handling - Given I create a CloudWatch alarm with prefix "" - Then the error code should be "ValidationError" diff --git a/features/cloudwatch/step_definitions/cloudwatch.js b/features/cloudwatch/step_definitions/cloudwatch.js deleted file mode 100644 index 33e6c7e83367..000000000000 --- a/features/cloudwatch/step_definitions/cloudwatch.js +++ /dev/null @@ -1,43 +0,0 @@ -const { After, Before, Given, Then } = require("@cucumber/cucumber"); - -Before({ tags: "@cloudwatch" }, function () { - const { CloudWatch } = require("../../../clients/client-cloudwatch"); - this.service = new CloudWatch({}); -}); - -After({ tags: "@cloudwatch" }, async function () { - if (this.alarmName) { - await this.service.deleteAlarms({ AlarmNames: [this.alarmName] }); - this.alarmName = undefined; - } -}); - -Given("I create a CloudWatch alarm with prefix {string}", async function (prefix) { - const alarmName = this.uniqueName(prefix); - try { - this.data = await this.service.putMetricAlarm({ - AlarmName: alarmName, - ComparisonOperator: "GreaterThanThreshold", - EvaluationPeriods: 5, - MetricName: "CPUUtilization", - Namespace: "AWS/EC2", - Period: 60, - Statistic: "Average", - Threshold: 50.0, - }); - this.alarmName = alarmName; - } catch (error) { - this.error = error; - } -}); - -Given("I list the CloudWatch alarms", async function () { - this.data = await this.service.describeAlarms({ AlarmNames: [this.alarmName] }); -}); - -Then("the list should contain the CloudWatch alarm", function () { - const name = this.alarmName; - this.assert.contains(this.data.MetricAlarms, function (alarm) { - return alarm.AlarmName === name; - }); -}); diff --git a/features/cloudwatchevents/cloudwatchevents.feature b/features/cloudwatchevents/cloudwatchevents.feature deleted file mode 100644 index d8c0f07b4c86..000000000000 --- a/features/cloudwatchevents/cloudwatchevents.feature +++ /dev/null @@ -1,17 +0,0 @@ -# language: en -@cloudwatchevents -Feature: - - I want to use Amazon CloudWatch Events - - Scenario: Making a request - Given I run the "listRules" operation - Then the request should be successful - And the value at "Rules" should be a list - - Scenario: Error handling - Given I run the "describeRule" operation with params: - """ - { "Name": "fake_rule" } - """ - Then the error code should be "ResourceNotFoundException" diff --git a/features/cloudwatchevents/step_definitions/cloudwatchevents.js b/features/cloudwatchevents/step_definitions/cloudwatchevents.js deleted file mode 100644 index 1561cd8e18b5..000000000000 --- a/features/cloudwatchevents/step_definitions/cloudwatchevents.js +++ /dev/null @@ -1,7 +0,0 @@ -const { Before } = require("@cucumber/cucumber"); - -Before({ tags: "@cloudwatchevents" }, function (scenario, callback) { - const { CloudWatchEvents } = require("../../../clients/client-cloudwatch-events"); - this.service = new CloudWatchEvents({}); - callback(); -}); diff --git a/features/cloudwatchlogs/cloudwatchlogs.feature b/features/cloudwatchlogs/cloudwatchlogs.feature deleted file mode 100644 index 46059bbe1a6e..000000000000 --- a/features/cloudwatchlogs/cloudwatchlogs.feature +++ /dev/null @@ -1,14 +0,0 @@ -# language: en -@cloudwatchlogs -Feature: - - I want to use Amazon CloudWatch Logs - - Scenario: Log Groups - Given I create a CloudWatch logGroup with prefix "aws-js-sdk" - And I list the CloudWatch logGroups - Then the list should contain the CloudWatch logGroup - - Scenario: Error handling - Given I create a CloudWatch logGroup with prefix "" - Then the error code should be "InvalidParameterException" diff --git a/features/cloudwatchlogs/step_definitions/cloudwatchlogs.js b/features/cloudwatchlogs/step_definitions/cloudwatchlogs.js deleted file mode 100644 index 7350cf81dbe1..000000000000 --- a/features/cloudwatchlogs/step_definitions/cloudwatchlogs.js +++ /dev/null @@ -1,30 +0,0 @@ -const { Before, Given, Then, After } = require("@cucumber/cucumber"); - -Before({ tags: "@cloudwatchlogs" }, function () { - const { CloudWatchLogs } = require("../../../clients/client-cloudwatch-logs"); - this.service = new CloudWatchLogs({}); -}); - -After({ tags: "@cloudwatchlogs" }, async function () { - if (this.logGroupName) { - await this.service.deleteLogGroup({ logGroupName: this.logGroupName }); - } -}); - -Given("I create a CloudWatch logGroup with prefix {string}", function (prefix, callback) { - const expectErr = prefix === "" ? false : undefined; - this.logGroupName = this.uniqueName(prefix); - this.request(null, "createLogGroup", { logGroupName: this.logGroupName }, callback, expectErr); -}); - -Given("I list the CloudWatch logGroups", function (callback) { - this.request(null, "describeLogGroups", { logGroupNamePrefix: this.logGroupName }, callback); -}); - -Then("the list should contain the CloudWatch logGroup", function (callback) { - const name = this.logGroupName; - this.assert.contains(this.data.logGroups, function (alarm) { - return alarm.logGroupName === name; - }); - callback(); -}); diff --git a/features/codecommit/codecommit.feature b/features/codecommit/codecommit.feature deleted file mode 100644 index a8dc69d2504a..000000000000 --- a/features/codecommit/codecommit.feature +++ /dev/null @@ -1,17 +0,0 @@ -# language: en -@codecommit -Feature: AWS CodeCommit - - I want to use AWS CodeCommit - - Scenario: Listing repositories - Given I run the "listRepositories" operation - Then the request should be successful - And the value at "repositories" should be a list - - Scenario: Error handling - Given I run the "listBranches" operation with params: - """ - { "repositoryName": "fake-repo" } - """ - Then the error code should be "RepositoryDoesNotExistException" diff --git a/features/codecommit/step_definitions/codecommit.js b/features/codecommit/step_definitions/codecommit.js deleted file mode 100644 index 1e24b6571510..000000000000 --- a/features/codecommit/step_definitions/codecommit.js +++ /dev/null @@ -1,7 +0,0 @@ -const { Before } = require("@cucumber/cucumber"); - -Before({ tags: "@codecommit" }, function (scenario, callback) { - const { CodeCommit } = require("../../../clients/client-codecommit"); - this.service = new CodeCommit({ region: "us-east-1" }); - callback(); -}); diff --git a/features/codedeploy/codedeploy.feature b/features/codedeploy/codedeploy.feature deleted file mode 100644 index 4bdf0a5cd675..000000000000 --- a/features/codedeploy/codedeploy.feature +++ /dev/null @@ -1,17 +0,0 @@ -# language: en -@codedeploy -Feature: AWS CodeDeploy - - I want to use AWS CodeDeploy - - Scenario: Listing Applicaitons - Given I run the "listApplications" operation - Then the request should be successful - And the value at "applications" should be a list - - Scenario: Error handling - Given I run the "createApplication" operation with params: - """ - { "applicationName": "" } - """ - Then the error code should be "ApplicationNameRequiredException" diff --git a/features/codedeploy/step_definitions/codedeploy.js b/features/codedeploy/step_definitions/codedeploy.js deleted file mode 100644 index 8cf138be2a0a..000000000000 --- a/features/codedeploy/step_definitions/codedeploy.js +++ /dev/null @@ -1,7 +0,0 @@ -const { Before } = require("@cucumber/cucumber"); - -Before({ tags: "@codedeploy" }, function (scenario, callback) { - const { CodeDeploy } = require("../../../clients/client-codedeploy"); - this.service = new CodeDeploy({}); - callback(); -}); diff --git a/features/codepipeline/codepipeline.feature b/features/codepipeline/codepipeline.feature deleted file mode 100644 index d8e9bb8fb123..000000000000 --- a/features/codepipeline/codepipeline.feature +++ /dev/null @@ -1,17 +0,0 @@ -# language: en -@codepipeline -Feature: AWS CodePipeline - - I want to use AWS CodePipeline - - Scenario: Listing repositories - Given I run the "listPipelines" operation - Then the request should be successful - And the value at "pipelines" should be a list - - Scenario: Error handling - Given I run the "getPipeline" operation with params: - """ - { "name": "fake-pipeline" } - """ - Then the error code should be "PipelineNotFoundException" diff --git a/features/codepipeline/step_definitions/codepipeline.js b/features/codepipeline/step_definitions/codepipeline.js deleted file mode 100644 index 04b65a2cbe7a..000000000000 --- a/features/codepipeline/step_definitions/codepipeline.js +++ /dev/null @@ -1,7 +0,0 @@ -const { Before } = require("@cucumber/cucumber"); - -Before({ tags: "@codepipeline" }, function (scenario, callback) { - const { CodePipeline } = require("../../../clients/client-codepipeline"); - this.service = new CodePipeline({ region: "us-east-1" }); - callback(); -}); diff --git a/features/cognitoidentity/cognitoidentity.feature b/features/cognitoidentity/cognitoidentity.feature deleted file mode 100644 index 9e78fa78f949..000000000000 --- a/features/cognitoidentity/cognitoidentity.feature +++ /dev/null @@ -1,14 +0,0 @@ -# language: en -@cognitoidentity -Feature: - - I want to use Amazon Cognito Identity - - Scenario: Identity Pools - Given I create a Cognito identity pool with prefix "awssdkjs" - And I describe the Cognito identity pool ID - Then the status code should be 200 - - Scenario: Error handling - Given I create a Cognito identity pool with prefix "" - Then the error code should be "ValidationException" diff --git a/features/cognitoidentity/step_definitions/cognitoidentity.js b/features/cognitoidentity/step_definitions/cognitoidentity.js deleted file mode 100644 index 72ab7f706c76..000000000000 --- a/features/cognitoidentity/step_definitions/cognitoidentity.js +++ /dev/null @@ -1,29 +0,0 @@ -const { After, Before, Given } = require("@cucumber/cucumber"); - -Before({ tags: "@cognitoidentity" }, function () { - const { CognitoIdentity } = require("../../../clients/client-cognito-identity"); - this.service = new CognitoIdentity({}); -}); - -After({ tags: "@cognitoidentity" }, async function () { - if (this.identityPoolId) { - this.service.deleteIdentityPool({ IdentityPoolId: this.identityPoolId }); - this.identityPoolId = undefined; - } -}); - -Given("I create a Cognito identity pool with prefix {string}", async function (prefix) { - try { - this.data = await this.service.createIdentityPool({ - IdentityPoolName: this.uniqueName(prefix), - AllowUnauthenticatedIdentities: true, - }); - this.identityPoolId = this.data.IdentityPoolId; - } catch (error) { - this.error = error; - } -}); - -Given("I describe the Cognito identity pool ID", async function () { - this.data = await this.service.describeIdentityPool({ IdentityPoolId: this.identityPoolId }); -}); diff --git a/features/cognitosync/cognitosync.feature b/features/cognitosync/cognitosync.feature deleted file mode 100644 index 1e93e77f35ab..000000000000 --- a/features/cognitosync/cognitosync.feature +++ /dev/null @@ -1,16 +0,0 @@ -# language: en -@cognitosync -Feature: - - I want to use Amazon Cognito Sync - - Scenario: Identity Pool Usage - Given I list Cognito identity pool usage - Then the status code should be 200 - - Scenario: Error handling - Given I list Cognito data sets with identity pool id "INVALID" and identity id "A:B:C" - Then the error message should contain: - """ - validation errors detected - """ diff --git a/features/cognitosync/step_definitions/cognitosync.js b/features/cognitosync/step_definitions/cognitosync.js deleted file mode 100644 index fbe35278f5a4..000000000000 --- a/features/cognitosync/step_definitions/cognitosync.js +++ /dev/null @@ -1,19 +0,0 @@ -const { Before, Given } = require("@cucumber/cucumber"); - -Before({ tags: "@cognitosync" }, function (scenario, callback) { - const { CognitoSync } = require("../../../clients/client-cognito-sync"); - this.service = new CognitoSync({}); - callback(); -}); - -Given("I list Cognito identity pool usage", function (callback) { - this.request(null, "listIdentityPoolUsage", {}, callback); -}); - -Given( - "I list Cognito data sets with identity pool id {string} and identity id {string}", - function (idpid, idid, callback) { - const params = { IdentityPoolId: idpid, IdentityId: idid }; - this.request(null, "listDatasets", params, callback, false); - } -); diff --git a/features/configservice/configservice.feature b/features/configservice/configservice.feature deleted file mode 100644 index fcfe2c0b40ae..000000000000 --- a/features/configservice/configservice.feature +++ /dev/null @@ -1,17 +0,0 @@ -# language: en -@configservice -Feature: AWS Config - - I want to use AWS Config - - Scenario: Listing delivery channels - Given I run the "describeDeliveryChannels" operation - Then the request should be successful - And the value at "DeliveryChannels" should be a list - - Scenario: Error handling - Given I run the "putDeliveryChannel" operation with params: - """ - { "DeliveryChannel": { "name": "" } } - """ - Then the error code should be "ValidationException" diff --git a/features/configservice/step_definitions/configservice.js b/features/configservice/step_definitions/configservice.js deleted file mode 100644 index 4e105dd37ce2..000000000000 --- a/features/configservice/step_definitions/configservice.js +++ /dev/null @@ -1,7 +0,0 @@ -const { Before } = require("@cucumber/cucumber"); - -Before({ tags: "@configservice" }, function (scenario, callback) { - const { ConfigService } = require("../../../clients/client-config-service"); - this.service = new ConfigService({}); - callback(); -}); diff --git a/features/datapipeline/datapipeline.feature b/features/datapipeline/datapipeline.feature deleted file mode 100644 index 1069f468bfdf..000000000000 --- a/features/datapipeline/datapipeline.feature +++ /dev/null @@ -1,18 +0,0 @@ -# language: en -@datapipeline -Feature: AWS Data Pipeline - - I want to use AWS Data Pipeline - - Scenario: Listing pipelines - Given I run the "listPipelines" operation - Then the request should be successful - And the value at "pipelineIdList" should be a list - - Scenario: Error handling - Given I create a Data Pipeline with name prefix "" - Then the error code should be "ValidationException" - And the error message should match: - """ - Member must have length greater than or equal to 1 - """ diff --git a/features/datapipeline/step_definitions/datapipeline.js b/features/datapipeline/step_definitions/datapipeline.js deleted file mode 100644 index 562b79ee5017..000000000000 --- a/features/datapipeline/step_definitions/datapipeline.js +++ /dev/null @@ -1,15 +0,0 @@ -const { Before, Given } = require("@cucumber/cucumber"); - -Before({ tags: "@datapipeline" }, function (scenario, callback) { - const { DataPipeline } = require("../../../clients/client-data-pipeline"); - this.service = new DataPipeline({}); - callback(); -}); - -Given("I create a Data Pipeline with name prefix {string}", function (prefix, callback) { - const params = { - name: this.uniqueName(prefix), - uniqueId: this.uniqueName("aws-js-sdk"), - }; - this.request(null, "createPipeline", params, callback, false); -}); diff --git a/features/devicefarm/devicefarm.feature b/features/devicefarm/devicefarm.feature deleted file mode 100644 index 666f164a2160..000000000000 --- a/features/devicefarm/devicefarm.feature +++ /dev/null @@ -1,17 +0,0 @@ -# language: en -@devicefarm -Feature: AWS Device Farm - - I want to use AWS Device Farm - - Scenario: Listing devices - Given I run the "listDevices" operation - Then the request should be successful - And the value at "devices" should be a list - - Scenario: Error handling - Given I run the "getDevice" operation with params: - """ - { "arn": "arn:aws:devicefarm:us-west-2::device:00000000000000000000000000000000" } - """ - Then the error code should be "NotFoundException" diff --git a/features/devicefarm/step_definitions/devicefarm.js b/features/devicefarm/step_definitions/devicefarm.js deleted file mode 100644 index 97499e982198..000000000000 --- a/features/devicefarm/step_definitions/devicefarm.js +++ /dev/null @@ -1,7 +0,0 @@ -const { Before } = require("@cucumber/cucumber"); - -Before({ tags: "@devicefarm" }, function (scenario, callback) { - const { DeviceFarm } = require("../../../clients/client-device-farm"); - this.service = new DeviceFarm({ region: "us-west-2" }); - callback(); -}); diff --git a/features/directconnect/directconnect.feature b/features/directconnect/directconnect.feature deleted file mode 100644 index 57ba942cf29f..000000000000 --- a/features/directconnect/directconnect.feature +++ /dev/null @@ -1,14 +0,0 @@ -# language: en -@directconnect -Feature: AWS Direct Connect - - I want to use AWS Direct Connect - - Scenario: describe connections - Given I run the "describeConnections" operation - Then the request should be successful - And the value at "connections" should be a list - - Scenario: Error handling - Given I create a Direct Connect connection with an invalid location - Then the error code should be "DirectConnectClientException" diff --git a/features/directconnect/step_definitions/directconnect.js b/features/directconnect/step_definitions/directconnect.js deleted file mode 100644 index 28b55235de91..000000000000 --- a/features/directconnect/step_definitions/directconnect.js +++ /dev/null @@ -1,16 +0,0 @@ -const { Before, Given } = require("@cucumber/cucumber"); - -Before({ tags: "@directconnect" }, function (scenario, callback) { - const { DirectConnect } = require("../../../clients/client-direct-connect"); - this.service = new DirectConnect({}); - callback(); -}); - -Given("I create a Direct Connect connection with an invalid location", function (callback) { - const params = { - bandwidth: "1Gbps", - location: "INVALID_LOCATION", - connectionName: this.uniqueName("aws-sdk-js"), - }; - this.request(null, "createConnection", params, callback, false); -}); diff --git a/features/directoryservice/directoryservice.feature b/features/directoryservice/directoryservice.feature deleted file mode 100644 index eeca7c887f2d..000000000000 --- a/features/directoryservice/directoryservice.feature +++ /dev/null @@ -1,17 +0,0 @@ -# language: en -@directoryservice -Feature: AWS Directory Service - - I want to use AWS Directory Service - - Scenario: Listing directories - Given I run the "describeDirectories" operation - Then the request should be successful - And the value at "DirectoryDescriptions" should be a list - - Scenario: Error handling - Given I run the "createDirectory" operation with params: - """ - { "Name": "", "Password": "" , "Size": ""} - """ - Then the error code should be "ValidationException" diff --git a/features/directoryservice/step_definitions/directoryservice.js b/features/directoryservice/step_definitions/directoryservice.js deleted file mode 100644 index 331e74f6156e..000000000000 --- a/features/directoryservice/step_definitions/directoryservice.js +++ /dev/null @@ -1,7 +0,0 @@ -const { Before } = require("@cucumber/cucumber"); - -Before({ tags: "@directoryservice" }, function (scenario, callback) { - const { DirectoryService } = require("../../../clients/client-directory-service"); - this.service = new DirectoryService({}); - callback(); -}); diff --git a/features/dms/dms.feature b/features/dms/dms.feature deleted file mode 100644 index ad577d55b6dc..000000000000 --- a/features/dms/dms.feature +++ /dev/null @@ -1,17 +0,0 @@ -# language: en -@databasemigrationservice -Feature: - - I want to use AWS Database Migration Service - - Scenario: Making a request - Given I run the "describeEndpoints" operation - Then the request should be successful - And the value at "Endpoints" should be a list - - Scenario: Error handling - Given I run the "startReplicationTask" operation with params: - """ - { "ReplicationTaskArn": "fake-arn", "StartReplicationTaskType": "fake-arn"} - """ - Then the error code should be "InvalidParameterValueException" diff --git a/features/dms/step_definitions/dms.js b/features/dms/step_definitions/dms.js deleted file mode 100644 index a93885a99992..000000000000 --- a/features/dms/step_definitions/dms.js +++ /dev/null @@ -1,7 +0,0 @@ -const { Before } = require("@cucumber/cucumber"); - -Before({ tags: "@databasemigrationservice" }, function (scenario, callback) { - const { DatabaseMigrationService } = require("../../../clients/client-database-migration-service"); - this.service = new DatabaseMigrationService({}); - callback(); -}); diff --git a/features/dynamodbstreams/dynamodbstreams.feature b/features/dynamodbstreams/dynamodbstreams.feature deleted file mode 100644 index 2d09eafd68a5..000000000000 --- a/features/dynamodbstreams/dynamodbstreams.feature +++ /dev/null @@ -1,17 +0,0 @@ -# language: en -@dynamodbstreams -Feature: Amazon DynamoDB Streams - - I want to use Amazon DynamoDB Streams - - Scenario: Listing streams - Given I run the "listStreams" operation - Then the request should be successful - And the value at "Streams" should be a list - - Scenario: Error handling - Given I run the "describeStream" operation with params: - """ - { "StreamArn": "fake-stream" } - """ - Then the error code should be "ValidationException" diff --git a/features/dynamodbstreams/step_definitions/dynamodbstreams.js b/features/dynamodbstreams/step_definitions/dynamodbstreams.js deleted file mode 100644 index 2ef9ee631378..000000000000 --- a/features/dynamodbstreams/step_definitions/dynamodbstreams.js +++ /dev/null @@ -1,7 +0,0 @@ -const { Before } = require("@cucumber/cucumber"); - -Before({ tags: "@dynamodbstreams" }, function (scenario, callback) { - const { DynamoDBStreams } = require("../../../clients/client-dynamodb-streams"); - this.service = new DynamoDBStreams({}); - callback(); -}); diff --git a/features/ecr/ecr.feature b/features/ecr/ecr.feature deleted file mode 100644 index 077fc4efa2c2..000000000000 --- a/features/ecr/ecr.feature +++ /dev/null @@ -1,17 +0,0 @@ -# language: en -@ecr -Feature: - - I want to use Amazon EC2 Container Registry - - Scenario: Making a request - Given I run the "describeRepositories" operation - Then the request should be successful - And the value at "repositories" should be a list - - Scenario: Error handling - Given I run the "listImages" operation with params: - """ - { "repositoryName": "fake_name" } - """ - Then the error code should be "RepositoryNotFoundException" diff --git a/features/ecr/step_definitions/ecr.js b/features/ecr/step_definitions/ecr.js deleted file mode 100644 index 9e41b8037f64..000000000000 --- a/features/ecr/step_definitions/ecr.js +++ /dev/null @@ -1,7 +0,0 @@ -const { Before } = require("@cucumber/cucumber"); - -Before({ tags: "@ecr" }, function (scenario, callback) { - const { ECR } = require("../../../clients/client-ecr"); - this.service = new ECR({}); - callback(); -}); diff --git a/features/ecs/ecs.feature b/features/ecs/ecs.feature deleted file mode 100644 index 4fb454283bf4..000000000000 --- a/features/ecs/ecs.feature +++ /dev/null @@ -1,17 +0,0 @@ -# language: en -@ecs -Feature: Amazon ECS - - I want to use Amazon ECS - - Scenario: Listing clusters - Given I run the "listClusters" operation - Then the request should be successful - And the value at "clusterArns" should be a list - - Scenario: Error handling - Given I run the "stopTask" operation with params: - """ - { "task": "xxxxxxxxxxx-xxxxxxxxxxxx-xxxxxxxxxxx" } - """ - Then the error status code should be 400 diff --git a/features/ecs/step_definitions/ecs.js b/features/ecs/step_definitions/ecs.js deleted file mode 100644 index c85b9f11c9e5..000000000000 --- a/features/ecs/step_definitions/ecs.js +++ /dev/null @@ -1,7 +0,0 @@ -const { Before } = require("@cucumber/cucumber"); - -Before({ tags: "@ecs" }, function (scenario, callback) { - const { ECS } = require("../../../clients/client-ecs"); - this.service = new ECS({}); - callback(); -}); diff --git a/features/efs/efs.feature b/features/efs/efs.feature deleted file mode 100644 index 9d9ade60ec07..000000000000 --- a/features/efs/efs.feature +++ /dev/null @@ -1,17 +0,0 @@ -# language: en -@efs -Feature: Amazon Elastic File System - - I want to use Amazon Elastic File System - - Scenario: Listing file systems - Given I run the "describeFileSystems" operation - Then the request should be successful - And the value at "FileSystems" should be a list - - Scenario: Error handling - Given I run the "deleteFileSystem" operation with params: - """ - { "FileSystemId": "fake-id" } - """ - Then the error code should be "ValidationException" diff --git a/features/efs/step_definitions/efs.js b/features/efs/step_definitions/efs.js deleted file mode 100644 index 840a3b86ffb9..000000000000 --- a/features/efs/step_definitions/efs.js +++ /dev/null @@ -1,7 +0,0 @@ -const { Before } = require("@cucumber/cucumber"); - -Before({ tags: "@efs" }, function (scenario, callback) { - const { EFS } = require("../../../clients/client-efs"); - this.service = new EFS({ region: "us-west-2" }); - callback(); -}); diff --git a/features/elasticache/elasticache.feature b/features/elasticache/elasticache.feature deleted file mode 100644 index 5eb890c2a685..000000000000 --- a/features/elasticache/elasticache.feature +++ /dev/null @@ -1,20 +0,0 @@ -# language: en -@elasticache -Feature: Amazon ElastiCache - - I want to use Amazon ElastiCache - - Scenario: Creating and deleting cache parameter groups - Given I create a cache parameter group with name prefix "aws-js-sdk" - And the cache parameter group name is in the result - And I describe the cache parameter groups - Then the value at "CacheParameterGroups" should be a list - And the cache parameter group should be described - - Scenario: Error handling - Given I create a cache parameter group with name prefix "" - Then the error code should be "InvalidParameterValueException" - Then the error message should contain: - """ - The parameter CacheParameterGroupName must be provided and must not be blank - """ diff --git a/features/elasticache/step_definitions/elasticache.js b/features/elasticache/step_definitions/elasticache.js deleted file mode 100644 index bb0b7eef9b59..000000000000 --- a/features/elasticache/step_definitions/elasticache.js +++ /dev/null @@ -1,46 +0,0 @@ -const { After, Before, Given, Then } = require("@cucumber/cucumber"); - -Before({ tags: "@elasticache" }, function () { - const { ElastiCache } = require("../../../clients/client-elasticache"); - this.service = new ElastiCache({}); -}); - -After({ tags: "@elasticache" }, async function () { - if (this.cacheGroupName) { - await this.service.deleteCacheParameterGroup({ CacheParameterGroupName: this.cacheGroupName }); - this.cacheGroupName = undefined; - } -}); - -Given("I create a cache parameter group with name prefix {string}", async function (prefix) { - this.cacheGroupName = this.uniqueName(prefix); - const params = { - Description: "Description", - CacheParameterGroupName: this.cacheGroupName, - CacheParameterGroupFamily: "memcached1.4", - }; - try { - this.data = await this.service.createCacheParameterGroup(params); - } catch (error) { - this.error = error; - } -}); - -Given("the cache parameter group name is in the result", async function () { - const name = this.data.CacheParameterGroup.CacheParameterGroupName; - this.assert.equal(name, this.cacheGroupName); -}); - -Given("I describe the cache parameter groups", async function () { - const params = { CacheParameterGroupName: this.cacheGroupName }; - try { - this.data = await this.service.describeCacheParameterGroups(params); - } catch (error) { - this.error = error; - } -}); - -Then("the cache parameter group should be described", function () { - const item = this.data.CacheParameterGroups[0]; - this.assert.equal(item.CacheParameterGroupName, this.cacheGroupName); -}); diff --git a/features/elasticbeanstalk/elasticbeanstalk.feature b/features/elasticbeanstalk/elasticbeanstalk.feature deleted file mode 100644 index 8fba7346e9c7..000000000000 --- a/features/elasticbeanstalk/elasticbeanstalk.feature +++ /dev/null @@ -1,21 +0,0 @@ -# language: en -@elasticbeanstalk -Feature: AWS Elastic Beanstalk - - I want to use AWS Elastic Beanstalk - - @requiresakid - Scenario: Creating applications and application versions - Given I create an Elastic Beanstalk application with name prefix "aws-js-sdk" - And I create an Elastic Beanstalk application version with label "1.0.0" - And I describe the Elastic Beanstalk application - Then the result should contain the Elastic Beanstalk application version - And the result should contain the Elastic Beanstalk application name - - Scenario: Error handling - Given I create an Elastic Beanstalk application with name prefix "" - Then the error code should be "ValidationError" - And the error message should match: - """ - Value '' at 'applicationName' - """ diff --git a/features/elasticbeanstalk/step_definitions/elasticbeanstalk.js b/features/elasticbeanstalk/step_definitions/elasticbeanstalk.js deleted file mode 100644 index a8eafce5a4bf..000000000000 --- a/features/elasticbeanstalk/step_definitions/elasticbeanstalk.js +++ /dev/null @@ -1,44 +0,0 @@ -const { After, Before, Given, Then } = require("@cucumber/cucumber"); - -Before({ tags: "@elasticbeanstalk" }, function () { - const { ElasticBeanstalk } = require("../../../clients/client-elastic-beanstalk"); - this.service = new ElasticBeanstalk({}); -}); - -After({ tags: "@elasticbeanstalk" }, async function () { - if (this.appName) { - await this.service.deleteApplication({ ApplicationName: this.appName }); - this.appName = undefined; - } -}); - -Given("I create an Elastic Beanstalk application with name prefix {string}", async function (prefix) { - this.appName = this.uniqueName(prefix); - try { - this.data = await this.service.createApplication({ ApplicationName: this.appName }); - } catch (error) { - this.error = error; - } -}); - -Given("I create an Elastic Beanstalk application version with label {string}", async function (label) { - this.appVersion = label; - const params = { - ApplicationName: this.appName, - VersionLabel: this.appVersion, - }; - await this.service.createApplicationVersion(params); -}); - -Given("I describe the Elastic Beanstalk application", async function () { - const params = { ApplicationNames: [this.appName] }; - this.data = await this.service.describeApplications(params); -}); - -Then("the result should contain the Elastic Beanstalk application version", function () { - this.assert.deepEqual(this.data.Applications[0].Versions, [this.appVersion]); -}); - -Then("the result should contain the Elastic Beanstalk application name", function () { - this.assert.equal(this.data.Applications[0].ApplicationName, this.appName); -}); diff --git a/features/elb/elb.feature b/features/elb/elb.feature deleted file mode 100644 index 8352633df9e8..000000000000 --- a/features/elb/elb.feature +++ /dev/null @@ -1,14 +0,0 @@ -# language: en -@elasticloadbalancing -Feature: Elastic Load Balancing - - I want to use Elastic Load Balancing - - Scenario: Making a request - Given I run the "describeLoadBalancers" operation - Then the request should be successful - - Scenario: Error handling - Given I create a load balancer with name prefix "verylongelasticloadbalancername" - Then the error code should be "ValidationError" - And the error status code should be 400 diff --git a/features/elb/step_definitions/elb.js b/features/elb/step_definitions/elb.js deleted file mode 100644 index ca93252a0e21..000000000000 --- a/features/elb/step_definitions/elb.js +++ /dev/null @@ -1,48 +0,0 @@ -const { Before, Given, Then } = require("@cucumber/cucumber"); - -Before({ tags: "@elasticloadbalancing" }, function (scenario, callback) { - const { ElasticLoadBalancing } = require("../../../clients/client-elastic-load-balancing"); - this.service = new ElasticLoadBalancing({}); - callback(); -}); - -Given("I create a load balancer with name prefix {string}", function (prefix, callback) { - this.loadBalancerName = prefix + "-" + new Date().getTime(); - - const params = { - LoadBalancerName: this.loadBalancerName, - Listeners: [ - { - Protocol: "TCP", - LoadBalancerPort: 80, - InstancePort: 80, - }, - ], - AvailabilityZones: ["us-east-1a"], - }; - this.request(null, "createLoadBalancer", params, callback, false); -}); - -Given("I describe load balancers with the load balancer name", function (callback) { - const params = { - LoadBalancerNames: [this.loadBalancerName], - }; - this.request(null, "describeLoadBalancers", params, callback); -}); - -Then("the load balancer should be in the list", function (callback) { - const name = this.data.LoadBalancerDescriptions[0].LoadBalancerName; - this.assert.equal(name, this.loadBalancerName); - callback(); -}); - -Then("I delete the load balancer", function (callback) { - const params = { - LoadBalancerName: this.loadBalancerName, - }; - this.request(null, "deleteLoadBalancer", params, callback); -}); - -Given("I try to create a load balancer with no name", function (callback) { - this.request(null, "createLoadBalancer", {}, callback); -}); diff --git a/features/elbv2/elbv2.feature b/features/elbv2/elbv2.feature deleted file mode 100644 index d1c5a41dc57b..000000000000 --- a/features/elbv2/elbv2.feature +++ /dev/null @@ -1,17 +0,0 @@ -# language: en -@elasticloadbalancingv2 -Feature: - - I want to use Elastic Load Balancing v2 - - Scenario: Making a request - Given I run the "describeTargetGroups" operation - Then the request should be successful - And the value at "TargetGroups" should be a list - - Scenario: Error handling - Given I run the "describeTags" operation with params: - """ - { "ResourceArns": ["fake_arn"] } - """ - Then the error code should be "ValidationError" diff --git a/features/elbv2/step_definitions/elbv2.js b/features/elbv2/step_definitions/elbv2.js deleted file mode 100644 index 589a0dde73dc..000000000000 --- a/features/elbv2/step_definitions/elbv2.js +++ /dev/null @@ -1,7 +0,0 @@ -const { Before } = require("@cucumber/cucumber"); - -Before({ tags: "@elasticloadbalancingv2" }, function (scenario, callback) { - const { ElasticLoadBalancingV2 } = require("../../../clients/client-elastic-load-balancing-v2"); - this.service = new ElasticLoadBalancingV2({}); - callback(); -}); diff --git a/features/emr/emr.feature b/features/emr/emr.feature deleted file mode 100644 index c5ccaa0c081f..000000000000 --- a/features/emr/emr.feature +++ /dev/null @@ -1,14 +0,0 @@ -# language: en -@emr -Feature: Amazon Elastic MapReduce - - I want to use Amazon Elastic MapReduce - - Scenario: Making a request - Given I run the "listClusters" operation - Then the request should be successful - And the value at "Clusters" should be a list - - Scenario: Error handling - Given I run an EMR job flow with invalid parameters - Then the error code should be "ValidationException" diff --git a/features/emr/step_definitions/emr.js b/features/emr/step_definitions/emr.js deleted file mode 100644 index 8471fe622563..000000000000 --- a/features/emr/step_definitions/emr.js +++ /dev/null @@ -1,14 +0,0 @@ -const { Before, Given } = require("@cucumber/cucumber"); - -Before({ tags: "@emr" }, function (scenario, callback) { - const { EMR } = require("../../../clients/client-emr"); - this.EMR = EMR; - this.service = new EMR({}); - callback(); -}); - -Given("I run an EMR job flow with invalid parameters", function (callback) { - this.service = new this.EMR({}); - const params = { Name: "", Instances: { MasterInstanceType: "invalid" } }; - this.request(null, "runJobFlow", params, callback, false); -}); diff --git a/features/es/es.feature b/features/es/es.feature deleted file mode 100644 index cf5682158332..000000000000 --- a/features/es/es.feature +++ /dev/null @@ -1,17 +0,0 @@ -# language: en -@elasticsearchservice -Feature: - - I want to use Amazon ES - - Scenario: Making a request - Given I run the "listDomainNames" operation - Then the request should be successful - And the value at "DomainNames" should be a list - - Scenario: Error handling - Given I run the "describeElasticsearchDomain" operation with params: - """ - { "DomainName": "not-a-domain" } - """ - Then the error code should be "ResourceNotFoundException" diff --git a/features/es/step_definitions/es.js b/features/es/step_definitions/es.js deleted file mode 100644 index 9365a53ba64a..000000000000 --- a/features/es/step_definitions/es.js +++ /dev/null @@ -1,7 +0,0 @@ -const { Before } = require("@cucumber/cucumber"); - -Before({ tags: "@elasticsearchservice" }, function (scenario, callback) { - const { ElasticsearchService } = require("../../../clients/client-elasticsearch-service"); - this.service = new ElasticsearchService({}); - callback(); -}); diff --git a/features/gamelift/gamelift.feature b/features/gamelift/gamelift.feature deleted file mode 100644 index 160033fe7270..000000000000 --- a/features/gamelift/gamelift.feature +++ /dev/null @@ -1,17 +0,0 @@ -# language: en -@gamelift -Feature: - - I want to use Amazon GameLift - - Scenario: Making a request - Given I run the "listBuilds" operation - Then the request should be successful - And the value at "Builds" should be a list - - Scenario: Error handling - Given I run the "describeAlias" operation with params: - """ - { "AliasId": "fake_id" } - """ - Then the error code should be "InvalidRequestException" diff --git a/features/gamelift/step_definitions/gamelift.js b/features/gamelift/step_definitions/gamelift.js deleted file mode 100644 index 1b31fdfb5bd5..000000000000 --- a/features/gamelift/step_definitions/gamelift.js +++ /dev/null @@ -1,7 +0,0 @@ -const { Before } = require("@cucumber/cucumber"); - -Before({ tags: "@gamelift" }, function (scenario, callback) { - const { GameLift } = require("../../../clients/client-gamelift"); - this.service = new GameLift({}); - callback(); -}); diff --git a/features/iam/iam.feature b/features/iam/iam.feature deleted file mode 100644 index 10030d98d74c..000000000000 --- a/features/iam/iam.feature +++ /dev/null @@ -1,20 +0,0 @@ -# language: en -@iam -Feature: IAM - - I want to use IAM - - Scenario: Users - Given I have an IAM username "js-test" - And I create an IAM user with the username - Then the IAM user should exist - - Scenario: Roles - Given I create an IAM role with name prefix "aws-sdk-js" - Then the IAM role should exist - - Scenario: Error handling - Given I have an IAM username "js-test-dupe" - And I create an IAM user with the username - And I create an IAM user with the username - Then the error code should be "EntityAlreadyExistsException" diff --git a/features/iam/step_definitions/iam.js b/features/iam/step_definitions/iam.js deleted file mode 100644 index f6b8976850ed..000000000000 --- a/features/iam/step_definitions/iam.js +++ /dev/null @@ -1,57 +0,0 @@ -const { After, Before, Given, Then } = require("@cucumber/cucumber"); - -Before({ tags: "@iam" }, function () { - const { IAM } = require("../../../clients/client-iam"); - this.iam = new IAM({}); -}); - -After({ tags: "@iam" }, async function () { - if (this.iamUser) { - await this.iam.deleteUser({ UserName: this.iamUser }); - this.iamUser = undefined; - } - if (this.iamRoleName) { - await this.iam.deleteRole({ RoleName: this.iamRoleName }); - this.iamRoleName = undefined; - } -}); - -Given("I have an IAM username {string}", function (name) { - this.iamUser = this.uniqueName(name); -}); - -Given("I create an IAM user with the username", async function () { - try { - const { User } = await this.iam.createUser({ UserName: this.iamUser }); - this.iamUserArn = User.Arn; - } catch (error) { - this.error = error; - } -}); - -Then("the IAM user should exist", async function () { - const { User } = await this.iam.getUser({ UserName: this.iamUser }); - this.assert.equal(User.UserName, this.iamUser); - this.assert.equal(User.Arn, this.iamUserArn); -}); - -Given("I create an IAM role with name prefix {string}", async function (name) { - this.iamRoleName = this.uniqueName(name); - - const assumeRolePolicyDocument = - '{"Version":"2008-10-17","Statement":[' + - '{"Effect":"Allow","Principal":{"Service":["ec2.amazonaws.com"]},' + - '"Action":["sts:AssumeRole"]}]}'; - const params = { - RoleName: this.iamRoleName, - AssumeRolePolicyDocument: assumeRolePolicyDocument, - }; - - this.data = await this.iam.createRole(params); - this.iamRoleArn = this.data.Role.Arn; -}); - -Then("the IAM role should exist", async function () { - const { Role } = await this.iam.getRole({ RoleName: this.iamRoleName }); - this.assert.equal(Role.RoleName, this.iamRoleName); -}); diff --git a/features/iot/iot.feature b/features/iot/iot.feature deleted file mode 100644 index 1479eab21457..000000000000 --- a/features/iot/iot.feature +++ /dev/null @@ -1,17 +0,0 @@ -# language: en -@iot -Feature: - - I want to use AWS IoT - - Scenario: Making a request - Given I run the "listPolicies" operation - Then the request should be successful - And the value at "policies" should be a list - - Scenario: Error handling - Given I run the "describeCertificate" operation with params: - """ - { "certificateId": "fake_id" } - """ - Then the error code should be "InvalidRequestException" diff --git a/features/iot/step_definitions/iot.js b/features/iot/step_definitions/iot.js deleted file mode 100644 index aadf29c5d4a7..000000000000 --- a/features/iot/step_definitions/iot.js +++ /dev/null @@ -1,7 +0,0 @@ -const { Before } = require("@cucumber/cucumber"); - -Before({ tags: "@iot" }, function (scenario, callback) { - const { IoT } = require("../../../clients/client-iot"); - this.service = new IoT({}); - callback(); -}); diff --git a/features/kinesis/kinesis.feature b/features/kinesis/kinesis.feature deleted file mode 100644 index 0e669ae7f527..000000000000 --- a/features/kinesis/kinesis.feature +++ /dev/null @@ -1,9 +0,0 @@ -# language: en -@kinesis -Feature: Amazon Kinesis - - I want to use Amazon Kinesis - -# Scenario: Error handling -# Given I try to describe a stream in Kinesis -# Then the error code should be "ResourceNotFoundException" diff --git a/features/kinesis/step_definitions/kinesis.js b/features/kinesis/step_definitions/kinesis.js deleted file mode 100644 index ea3c5af28bb0..000000000000 --- a/features/kinesis/step_definitions/kinesis.js +++ /dev/null @@ -1,11 +0,0 @@ -const { Before, Given } = require("@cucumber/cucumber"); - -Before({ tags: "@kinesis" }, function (scenario, callback) { - const { Kinesis } = require("../../../clients/client-kinesis"); - this.service = new Kinesis({}); - callback(); -}); - -Given("I try to describe a stream in Kinesis", function (callback) { - this.request(null, "describeStream", { StreamName: "XXINVALIDXX" }, callback, false); -}); diff --git a/features/kms/kms.feature b/features/kms/kms.feature deleted file mode 100644 index 713bebd4fae0..000000000000 --- a/features/kms/kms.feature +++ /dev/null @@ -1,17 +0,0 @@ -# language: en -@kms -Feature: AWS Key Management Service - - I want to use AWS Key Management Service - - Scenario: List keys - Given I run the "listKeys" operation - Then the request should be successful - And the value at "Keys" should be a list - - Scenario: Error handling - Given I run the "createAlias" operation with params: - """ - { "AliasName": "alias", "TargetKeyId": "non-existent" } - """ - Then the error code should be "ValidationException" diff --git a/features/kms/step_definitions/kms.js b/features/kms/step_definitions/kms.js deleted file mode 100644 index ba1a745f8e73..000000000000 --- a/features/kms/step_definitions/kms.js +++ /dev/null @@ -1,7 +0,0 @@ -const { Before } = require("@cucumber/cucumber"); - -Before({ tags: "@kms" }, function (scenario, callback) { - const { KMS } = require("../../../clients/client-kms"); - this.service = new KMS({}); - callback(); -}); diff --git a/features/lambda/lambda.feature b/features/lambda/lambda.feature deleted file mode 100644 index 364a1d6b47a1..000000000000 --- a/features/lambda/lambda.feature +++ /dev/null @@ -1,17 +0,0 @@ -# language: en -@lambda -Feature: Amazon Lambda - - I want to use Amazon Lambda - - Scenario: Listing functions - Given I run the "listFunctions" operation - Then the request should be successful - And the value at "Functions" should be a list - - Scenario: Error handling - Given I run the "invoke" operation with params: - """ - { "FunctionName": "non-exist" } - """ - Then the error code should be "ResourceNotFoundException" diff --git a/features/lambda/step_definitions/lambda.js b/features/lambda/step_definitions/lambda.js deleted file mode 100644 index 35d9fb468663..000000000000 --- a/features/lambda/step_definitions/lambda.js +++ /dev/null @@ -1,7 +0,0 @@ -const { Before } = require("@cucumber/cucumber"); - -Before({ tags: "@lambda" }, function (scenario, callback) { - const { Lambda } = require("../../../clients/client-lambda"); - this.service = new Lambda({}); - callback(); -}); diff --git a/features/pinpoint/pinpoint.feature b/features/pinpoint/pinpoint.feature deleted file mode 100644 index 7d15356e8a8c..000000000000 --- a/features/pinpoint/pinpoint.feature +++ /dev/null @@ -1,35 +0,0 @@ -# language: en -@pinpoint -Feature: Amazon Pinpoint - - I want to use Amazon Pinpoint - - Scenario: Putting events - Given I create an application - Given I run the "putEvents" operation with EventsRequest: - """ - { - "BatchItem": { - "foo": { - "Endpoint": { - "Address": "fooEndpointAddress" - }, - "Events": { - "foo": { - "EventType":"_session.start", - "Timestamp":"2015-03-19T17:32:40.577Z" - } - } - } - } - } - """ - Then the request should be successful - And I delete the application - - Scenario: Error handling - Given I run the "putEvents" operation with params: - """ - {"Events": [{"eventType": "test", "timestamp": "test"}], "ApplicationId": "test"} - """ - Then the error code should be "NotFoundException" diff --git a/features/pinpoint/step_definitions/pinpoint.js b/features/pinpoint/step_definitions/pinpoint.js deleted file mode 100644 index 409fd03a8149..000000000000 --- a/features/pinpoint/step_definitions/pinpoint.js +++ /dev/null @@ -1,47 +0,0 @@ -const { Before, Given } = require("@cucumber/cucumber"); - -Before({ tags: "@pinpoint" }, function (scenario, callback) { - const { Pinpoint } = require("../../../clients/client-pinpoint"); - this.service = new Pinpoint({}); - callback(); -}); - -Given("I create an application", function (callback) { - const params = { - CreateApplicationRequest: { - Name: this.uniqueName("aws-sdk-js-integration"), - }, - }; - this.request(null, "createApp", params, function (err, data) { - if (err) { - callback(err); - } - this.applicationId = this.data.ApplicationResponse.Id; - callback(); - }); -}); - -Given('I run the "putEvents" operation with EventsRequest:', function (eventsRequest, callback) { - this.request( - null, - "putEvents", - { - ApplicationId: this.applicationId, - EventsRequest: JSON.parse(eventsRequest), - }, - callback, - false - ); -}); - -Given("I delete the application", function (callback) { - this.request( - null, - "deleteApp", - { - ApplicationId: this.applicationId, - }, - callback, - false - ); -}); diff --git a/features/redshift/redshift.feature b/features/redshift/redshift.feature deleted file mode 100644 index e4b29bea30be..000000000000 --- a/features/redshift/redshift.feature +++ /dev/null @@ -1,18 +0,0 @@ -# language: en -@redshift -Feature: Amazon Redshift - - I want to use Amazon Redshift - - Scenario: Describe cluster parameter groups - Given I run the "describeClusterParameterGroups" operation - Then the request should be successful - And the value at "ParameterGroups" should be a list - - Scenario: Error handling - Given I create a Redshift cluster parameter group with prefix name "" - Then the error code should be "InvalidParameterValue" - Then the error message should contain: - """ - The parameter DBParameterGroupName must be provided and must not be blank - """ diff --git a/features/redshift/step_definitions/redshift.js b/features/redshift/step_definitions/redshift.js deleted file mode 100644 index 162ee388fa19..000000000000 --- a/features/redshift/step_definitions/redshift.js +++ /dev/null @@ -1,17 +0,0 @@ -const { Before, Given } = require("@cucumber/cucumber"); - -Before({ tags: "@redshift" }, function (scenario, callback) { - const { Redshift } = require("../../../clients/client-redshift"); - this.service = new Redshift({}); - callback(); -}); - -Given("I create a Redshift cluster parameter group with prefix name {string}", function (prefix, callback) { - this.parameterGroupName = this.uniqueName(prefix); - const params = { - Description: "Description", - ParameterGroupName: this.parameterGroupName, - ParameterGroupFamily: "redshift-1.0", - }; - this.request(null, "createClusterParameterGroup", params, callback, false); -}); diff --git a/features/route53/route53.feature b/features/route53/route53.feature deleted file mode 100644 index 16666328885d..000000000000 --- a/features/route53/route53.feature +++ /dev/null @@ -1,17 +0,0 @@ -# language: en -@route53 -Feature: Amazon Route 53 - - I want to use Amazon Route 53 - - Scenario: Making a request - Given I run the "listHostedZones" operation - Then the request should be successful - And the value at "HostedZones" should be a list - - Scenario: Error handling - Given I run the "getHostedZone" operation with params: - """ - { "Id": "fake-zone" } - """ - Then the error code should be "NoSuchHostedZone" diff --git a/features/route53/step_definitions/route53.js b/features/route53/step_definitions/route53.js deleted file mode 100644 index a2e468201576..000000000000 --- a/features/route53/step_definitions/route53.js +++ /dev/null @@ -1,123 +0,0 @@ -const { Before, Then, When } = require("@cucumber/cucumber"); - -Before({ tags: "@route53" }, function (scenario, callback) { - const { Route53 } = require("../../../clients/client-route-53"); - this.service = new Route53({}); - callback(); -}); - -When("I create a Route53 hosted zone with name prefix {string}", function (prefix, callback) { - this.zoneName = "zone1.example.com"; - const params = { - Name: this.zoneName, - CallerReference: this.uniqueName(prefix), - HostedZoneConfig: { - Comment: "A comment about the zone", - }, - }; - this.request(null, "createHostedZone", params, callback, false); -}); - -Then("the result should contain the hosted zone ID", function (callback) { - this.hostedZoneId = this.data.HostedZone.Id; - callback(); -}); - -Then("the result should contain the change ID", function (callback) { - this.changeInfoId = this.data.ChangeInfo.Id; - callback(); -}); - -Then("the result should contain the hosted zone name", function (callback) { - this.assert.equal(this.data.HostedZone.Name, this.zoneName + "."); - callback(); -}); - -When("I get information about the Route53 change ID", function (callback) { - this.request( - null, - "getChange", - { - Id: this.changeInfoId, - }, - callback - ); -}); - -Then("the change status should be PENDING or INSYNC", function (callback) { - this.assert.match(this.data.ChangeInfo.Status, "(PENDING|INSYNC)"); - callback(); -}); - -When("I get information about the Route53 hosted zone ID", function (callback) { - this.request( - null, - "getHostedZone", - { - Id: this.hostedZoneId, - }, - callback - ); -}); - -Then("the result should contain multiple nameservers", function (callback) { - this.assert.compare(this.data.DelegationSet.NameServers.length, ">=", 0); - this.assert.equal(typeof this.data.DelegationSet.NameServers[0], "string"); - callback(); -}); - -Then("I delete the Route53 hosted zone", function (callback) { - this.request( - null, - "deleteHostedZone", - { - Id: this.hostedZoneId, - }, - callback - ); -}); - -When("I create a Route53 TCP health check with name prefix {string}", function (prefix, callback) { - const params = { - CallerReference: this.uniqueName(prefix), - HealthCheckConfig: { - IPAddress: "192.0.43.10", // example.com - Port: 80, - Type: "TCP", - }, - }; - this.request(null, "createHealthCheck", params, callback); -}); - -Then("the result should contain health check information", function (callback) { - this.healthCheckInfo = this.data.HealthCheck; - callback(); -}); - -Then("the result should contain the health check ID", function (callback) { - this.healthCheckId = this.data.HealthCheck.Id; - callback(); -}); - -When("I get information about the health check ID", function (callback) { - const params = { - HealthCheckId: this.healthCheckId, - }; - this.request(null, "getHealthCheck", params, callback); -}); - -Then("the result should contain the previous health check information", function (callback) { - this.assert.deepEqual(this.data.HealthCheck, this.healthCheckInfo); - callback(); -}); - -Then("I delete the Route53 TCP health check", function (callback) { - const params = { - HealthCheckId: this.healthCheckId, - }; - this.request(null, "deleteHealthCheck", params, callback); -}); - -When("I list Route53 hosted zones", function (callback) { - this.request(null, "listHostedZones", {}, callback); -}); diff --git a/features/route53domains/route53domains.feature b/features/route53domains/route53domains.feature deleted file mode 100644 index aaa5897dfd8b..000000000000 --- a/features/route53domains/route53domains.feature +++ /dev/null @@ -1,14 +0,0 @@ -# language: en -@route53domains -Feature: Amazon Route 53 Domains - - I want to use Amazon Route 53 Domains - - Scenario: Feature - Given I list Route53 domains - Then the request should be successful - And the value at "Domains" should be a list - - Scenario: Error handling - Given I try to register a Route53 domain with invalid parameters - Then the error code should be "InvalidInput" diff --git a/features/route53domains/step_definitions/route53domains.js b/features/route53domains/step_definitions/route53domains.js deleted file mode 100644 index 89e582559f84..000000000000 --- a/features/route53domains/step_definitions/route53domains.js +++ /dev/null @@ -1,22 +0,0 @@ -const { Before, Given } = require("@cucumber/cucumber"); - -Before({ tags: "@route53domains" }, function (scenario, callback) { - const { Route53Domains } = require("../../../clients/client-route-53-domains"); - this.service = new Route53Domains({ region: "us-east-1" }); - callback(); -}); - -Given("I list Route53 domains", function (callback) { - this.request(null, "listDomains", {}, callback); -}); - -Given("I try to register a Route53 domain with invalid parameters", function (callback) { - const params = { - DomainName: "example.com", - DurationInYears: 1, - AdminContact: {}, - RegistrantContact: {}, - TechContact: {}, - }; - this.request(null, "registerDomain", params, callback, false); -}); diff --git a/features/sagemaker/sagemaker.feature b/features/sagemaker/sagemaker.feature deleted file mode 100644 index 4d6c6fffb639..000000000000 --- a/features/sagemaker/sagemaker.feature +++ /dev/null @@ -1,17 +0,0 @@ -# language: en -@sagemaker -Feature: Amazon SageMaker - - I want to use Amazon SageMaker - - Scenario: Listing Endpoints - Given I run the "listEndpoints" operation - Then the request should be successful - And the value at "Endpoints" should be a list - - Scenario: Error handling - Given I run the "describeEndpoint" operation with params: - """ - { "EndpointName": "non-existent" } - """ - Then the error code should be "ValidationException" diff --git a/features/sagemaker/step_definitions/sagemaker.js b/features/sagemaker/step_definitions/sagemaker.js deleted file mode 100644 index 8442a940fc26..000000000000 --- a/features/sagemaker/step_definitions/sagemaker.js +++ /dev/null @@ -1,7 +0,0 @@ -const { Before } = require("@cucumber/cucumber"); - -Before({ tags: "@sagemaker" }, function (scenario, callback) { - const { SageMaker } = require("../../../clients/client-sagemaker"); - this.service = new SageMaker({}); - callback(); -}); diff --git a/features/ses/ses.feature b/features/ses/ses.feature deleted file mode 100644 index 4351923a341c..000000000000 --- a/features/ses/ses.feature +++ /dev/null @@ -1,20 +0,0 @@ -# language: en -@ses -Feature: SES - - I want to use Simple Email Service. - - Scenario: Check quota - When I check quota - Then the result should include number "SentLast24Hours" - And the result should include number "MaxSendRate" - - Scenario: Verify email - When I ask to verify the email address "foo@example.com" - Then the status code should be 200 - - Scenario: Rescue SES InvalidParameterValue - When I ask to verify the email address "abc123" - Then I should get the error: - | name | message | - | InvalidParameterValue | Invalid email address. | diff --git a/features/ses/step_definitions/ses.js b/features/ses/step_definitions/ses.js deleted file mode 100644 index f03dfaa6de52..000000000000 --- a/features/ses/step_definitions/ses.js +++ /dev/null @@ -1,31 +0,0 @@ -const { Before, Then, When } = require("@cucumber/cucumber"); - -Before({ tags: "@ses" }, function (scenario, callback) { - const { SES } = require("../../../clients/client-ses"); - this.service = new SES({}); - callback(); -}); - -When("I check quota", function (next) { - this.request(null, "getSendQuota", {}, next); -}); - -Then("the result should include {word} {string}", function (type, attr, next) { - if (this.data[attr] === undefined) next.fail("Missing " + attr); - if (typeof this.data[attr] !== type) next.fail("Incorrect type " + attr); - next(); -}); - -When("I ask to verify the email address {string}", function (email, next) { - this.request( - null, - "verifyEmailAddress", - { - EmailAddress: email, - }, - next, - function () { - // do nothing - } - ); -}); diff --git a/features/sns/sns.feature b/features/sns/sns.feature deleted file mode 100644 index 5db78cb87640..000000000000 --- a/features/sns/sns.feature +++ /dev/null @@ -1,14 +0,0 @@ -# language: en -@sns -Feature: Simple Notification Service - - I want to use Amazon Simple Notification Service - - Scenario: Topics - Given I create an SNS topic with prefix "aws-js-sdk" - And I list the SNS topics - Then the list should contain the topic ARN - - Scenario: Error handling - Given I get SNS topic attributes with an invalid ARN - Then the error code should be "InvalidParameterException" diff --git a/features/sns/step_definitions/sns.js b/features/sns/step_definitions/sns.js deleted file mode 100644 index 97801284d205..000000000000 --- a/features/sns/step_definitions/sns.js +++ /dev/null @@ -1,38 +0,0 @@ -const { After, Before, Given, Then } = require("@cucumber/cucumber"); - -Before({ tags: "@sns" }, function () { - const { SNS } = require("../../../clients/client-sns"); - this.service = new SNS({}); -}); - -After({ tags: "@sns" }, async function () { - if (this.topicArn) { - await this.service.deleteTopic({ TopicArn: this.topicArn }); - this.topicArn = undefined; - } -}); - -Given("I create an SNS topic with prefix {string}", async function (prefix) { - const topicName = this.uniqueName(prefix); - const { TopicArn } = await this.service.createTopic({ Name: topicName }); - this.topicArn = TopicArn; -}); - -Given("I list the SNS topics", async function () { - this.data = await this.service.listTopics({}); -}); - -Then("the list should contain the topic ARN", function () { - const arn = this.topicArn; - this.assert.contains(this.data.Topics, function (topic) { - return topic.TopicArn === arn; - }); -}); - -Given("I get SNS topic attributes with an invalid ARN", async function () { - try { - await this.service.getTopicAttributes({ TopicArn: "INVALID" }); - } catch (error) { - this.error = error; - } -});