Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/@aws-cdk-testing/framework-integ/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"license": "Apache-2.0",
"devDependencies": {
"@aws-cdk/cdk-build-tools": "0.0.0",
"@aws-cdk/integ-runner": "^2.190.2",
"@aws-cdk/integ-runner": "^2.192.2",
"@aws-cdk/pkglint": "0.0.0",
"@aws-sdk/client-acm": "3.632.0",
"@aws-sdk/client-rds": "3.632.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
ConfigurationContent,
HostedConfiguration,
} from 'aws-cdk-lib/aws-appconfig';
import * as path from 'path';

const app = new App();

Expand All @@ -21,7 +22,7 @@ const appConfigApp = new Application(stack, 'MyAppConfig', {

new HostedConfiguration(stack, 'MyHostedConfigFromFile', {
application: appConfigApp,
content: ConfigurationContent.fromFile('config.json'),
content: ConfigurationContent.fromFile(path.join(__dirname, 'config.json')),
kmsKey,
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import {
RolloutStrategy,
SourcedConfiguration,
} from 'aws-cdk-lib/aws-appconfig';
import * as path from 'path';

const SCHEMA_STR =
`{
Expand Down Expand Up @@ -58,7 +59,7 @@ const deploymentStrategy = new DeploymentStrategy(stack, 'MyDeployStrategy', {
// hosted config from file
new HostedConfiguration(stack, 'MyHostedConfigFromFile', {
application: appConfigApp,
content: ConfigurationContent.fromFile('config.json'),
content: ConfigurationContent.fromFile(path.join(__dirname, 'config.json')),
deletionProtectionCheck: DeletionProtectionCheck.BYPASS,
});

Expand All @@ -70,7 +71,7 @@ new HostedConfiguration(stack, 'MyHostedConfig', {
deployTo: [hostedEnv],
validators: [
JsonSchemaValidator.fromInline(SCHEMA_STR),
JsonSchemaValidator.fromFile('schema.json'),
JsonSchemaValidator.fromFile(path.join(__dirname, 'schema.json')),
],
deploymentStrategy,
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import * as cdk from 'aws-cdk-lib';
import * as codecommit from 'aws-cdk-lib/aws-codecommit';
import { Code } from 'aws-cdk-lib/aws-codecommit';
import * as path from 'path';

const app = new cdk.App();
const stack = new cdk.Stack(app, 'aws-cdk-codecommit-repo-contents-zip-file');

new codecommit.Repository(stack, 'Repo', {
repositoryName: 'aws-cdk-codecommit-repo-contents-zip-file',
code: Code.fromZipFile('./asset-test.zip'),
code: Code.fromZipFile(path.join(__dirname, 'asset-test.zip')),
});

app.synth();
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import * as cdk from 'aws-cdk-lib';
import * as codecommit from 'aws-cdk-lib/aws-codecommit';
import { Code } from 'aws-cdk-lib/aws-codecommit';
import * as path from 'path';

const app = new cdk.App();
const stack = new cdk.Stack(app, 'aws-cdk-codecommit-repo-contents-assets');

new codecommit.Repository(stack, 'Repo', {
repositoryName: 'aws-cdk-codecommit-repo-contents-assets',
code: Code.fromDirectory('./asset-test'),
code: Code.fromDirectory(path.join(__dirname, 'asset-test')),
});

app.synth();
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import * as iam from 'aws-cdk-lib/aws-iam';
import * as lambda from 'aws-cdk-lib/aws-lambda';
import * as route53 from 'aws-cdk-lib/aws-route53';
import * as route53targets from 'aws-cdk-lib/aws-route53-targets';
import * as path from 'path';

interface CognitoUserProps {
userPool: cognito.UserPool;
Expand Down Expand Up @@ -204,7 +205,7 @@ const testUser = new CognitoUser(testCase, 'User', cognitoUserProps);
// this function signs in to the website and returns text content of the authenticated page body
const signinFunction = new lambda.Function(testCase, 'Signin', {
functionName: 'cdk-integ-alb-cognito-signin-handler',
code: lambda.Code.fromAsset('alb-cognito-signin-handler', { exclude: ['*.ts'] }),
code: lambda.Code.fromAsset(path.join(__dirname, 'alb-cognito-signin-handler'), { exclude: ['*.ts'] }),
handler: 'index.handler',
runtime: lambda.Runtime.NODEJS_20_X,
environment: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import * as route53targets from 'aws-cdk-lib/aws-route53-targets';
import { App, Duration, RemovalPolicy, Stack, StackProps } from 'aws-cdk-lib/core';
import { AwsCustomResource, AwsCustomResourcePolicy, PhysicalResourceId } from 'aws-cdk-lib/custom-resources';
import { Construct } from 'constructs';
import * as path from 'path';

interface CognitoUserProps {
userPool: cognito.UserPool;
Expand Down Expand Up @@ -184,7 +185,7 @@ const testUser = new CognitoUser(testCase, 'User', cognitoUserProps);
// this function signs in to the website and returns text content of the authenticated page body
const signinFunction = new lambda.Function(testCase, 'Signin', {
functionName: 'cdk-integ-alb-oidc-signin-handler',
code: lambda.Code.fromAsset('alb-oidc-signin-handler', { exclude: ['*.ts'] }),
code: lambda.Code.fromAsset(path.join(__dirname, 'alb-oidc-signin-handler'), { exclude: ['*.ts'] }),
handler: 'index.handler',
runtime: lambda.Runtime.NODEJS_20_X,
environment: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ new Function(stack, 'Python313SnapstartLambda', {
});

new Function(stack, 'DotnetSnapstartLambda', {
code: Code.fromAsset('dotnet-handler'),
code: Code.fromAsset(path.join(__dirname, 'dotnet-handler')),
handler: 'Handler',
runtime: Runtime.DOTNET_8,
snapStart: SnapStartConf.ON_PUBLISHED_VERSIONS,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class TestStack extends Stack {
bucketName: 's3sourcekmskeyarnbucket',
});
const deployment = new s3deploy.BucketDeployment(this, 'DeployLambdaCode', {
sources: [s3deploy.Source.asset('lambda-zip')],
sources: [s3deploy.Source.asset(path.join(__dirname, 'lambda-zip'))],
destinationBucket: bucket,
});
const fnBucket = new lambda.Function(this, 'myFunction2', {
Expand All @@ -96,7 +96,7 @@ class TestStack extends Stack {
this.functionName2 = fnBucket.functionName;

// Using Custom Command
const command = 'lambda-zip/python-lambda-handler.zip';
const command = path.join(__dirname, 'lambda-zip/python-lambda-handler.zip');
const fnCustom = new lambda.Function(this, 'myFunction3', {
runtime: lambda.Runtime.PYTHON_3_11,
handler: 'index.handler',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { App, Stack } from 'aws-cdk-lib';
import * as integ from '@aws-cdk/integ-tests-alpha';
import { Code, Function, Runtime } from 'aws-cdk-lib/aws-lambda';
import * as path from 'path';

const app = new App({
postCliContext: {
Expand All @@ -11,7 +12,7 @@ const app = new App({
const stack = new Stack(app, 'aws-cdk-lambda-runtime-management');

new Function(stack, 'Lambda', {
code: Code.fromAsset('dotnet-handler'),
code: Code.fromAsset(path.join(__dirname, 'dotnet-handler')),
handler: 'Handler',
runtime: Runtime.DOTNET_8,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import * as sc from 'aws-cdk-lib/aws-servicecatalog';
import * as lambda from 'aws-cdk-lib/aws-lambda';
import * as s3 from 'aws-cdk-lib/aws-s3';
import { IntegTest } from '@aws-cdk/integ-tests-alpha';
import * as path from 'path';

const app = new App({
postCliContext: {
Expand Down Expand Up @@ -42,13 +43,13 @@ class SampleNestedStack extends NestedStack {

new lambda.Function(this, 'HelloHandler', {
runtime: lambda.Runtime.PYTHON_3_9,
code: lambda.Code.fromAsset('./assets'),
code: lambda.Code.fromAsset(path.join(__dirname, 'assets')),
handler: 'index.handler',
});

new lambda.Function(this, 'HelloHandler2', {
runtime: lambda.Runtime.PYTHON_3_9,
code: lambda.Code.fromAsset('./assetsv2'),
code: lambda.Code.fromAsset(path.join(__dirname, 'assetsv2')),
handler: 'index.handler',
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ class TestAssetProductStack extends servicecatalog.ProductStack {

new lambda.Function(this, 'HelloHandler', {
runtime: lambda.Runtime.PYTHON_3_9,
code: lambda.Code.fromAsset('./assets'),
code: lambda.Code.fromAsset(path.join(__dirname, 'assets')),
handler: 'index.handler',
});

new lambda.Function(this, 'HelloHandler2', {
runtime: lambda.Runtime.PYTHON_3_9,
code: lambda.Code.fromAsset('./assetsv2'),
code: lambda.Code.fromAsset(path.join(__dirname, 'assetsv2')),
handler: 'index.handler',
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,13 @@ class TestAssetProductStack extends servicecatalog.ProductStack {

new lambda.Function(this, 'HelloHandler', {
runtime: lambda.Runtime.PYTHON_3_9,
code: lambda.Code.fromAsset('./assets'),
code: lambda.Code.fromAsset(path.join(__dirname, 'assets')),
handler: 'index.handler',
});

new lambda.Function(this, 'HelloHandler2', {
runtime: lambda.Runtime.PYTHON_3_9,
code: lambda.Code.fromAsset('./assetsv2'),
code: lambda.Code.fromAsset(path.join(__dirname, 'assetsv2')),
handler: 'index.handler',
});
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import * as core from 'aws-cdk-lib';
import * as inc from 'aws-cdk-lib/cloudformation-include';
import * as integ from '@aws-cdk/integ-tests-alpha';
import * as path from 'path';

const app = new core.App();
const stack = new core.Stack(app, 'Stack');

new inc.CfnInclude(stack, 'Stack', {
templateFile: 'test-templates/autoscaling-update-policy.json',
templateFile: path.join(__dirname, 'test-templates/autoscaling-update-policy.json'),
});

new integ.IntegTest(app, 'AutoScalingUpdatePolicyTest', {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import * as core from 'aws-cdk-lib';
import * as inc from 'aws-cdk-lib/cloudformation-include';
import * as integ from '@aws-cdk/integ-tests-alpha';
import * as path from 'path';

const app = new core.App();

const stack = new core.Stack(app, 'Stack');

new inc.CfnInclude(stack, 'Stack', {
templateFile: 'test-templates/fn-if-deletion-policy.json',
templateFile: path.join(__dirname, 'test-templates/fn-if-deletion-policy.json'),
});

new integ.IntegTest(app, 'DeletionPolicyTest', {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
import * as core from 'aws-cdk-lib';
import * as inc from 'aws-cdk-lib/cloudformation-include';
import * as path from 'path';

const app = new core.App();

const stack = new core.Stack(app, 'ParentStack');

new inc.CfnInclude(stack, 'ParentStack', {
templateFile: 'test-templates/nested/parent-one-child.json',
templateFile: path.join(__dirname, 'test-templates/nested/parent-one-child.json'),
loadNestedStacks: {
ChildStack: {
templateFile: 'test-templates/nested/grandchild-import-stack.json',
templateFile: path.join(__dirname, 'test-templates/nested/grandchild-import-stack.json'),
},
},
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import * as core from 'aws-cdk-lib';
import * as inc from 'aws-cdk-lib/cloudformation-include';
import * as integ from '@aws-cdk/integ-tests-alpha';
import * as path from 'path';

const app = new core.App();

const stack = new core.Stack(app, 'Stack');

new inc.CfnInclude(stack, 'Stack', {
templateFile: 'test-templates/tags-with-intrinsics.json',
templateFile: path.join(__dirname, 'test-templates/tags-with-intrinsics.json'),
});

new integ.IntegTest(app, 'ResourceTagIntrinsicStack', {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { App, Duration, Stack } from 'aws-cdk-lib';
import * as integ from '@aws-cdk/integ-tests-alpha';
import * as triggers from 'aws-cdk-lib/triggers';
import { STANDARD_NODEJS_RUNTIME } from '../../config';
import * as path from 'path';

const app = new App({
postCliContext: {
Expand Down Expand Up @@ -45,7 +46,7 @@ const funcWithAssertion = new lambda.Function(stack, 'MyAssertionLambdaFunction'
runtime: STANDARD_NODEJS_RUNTIME,
handler: 'index.handler',
timeout: Duration.minutes(15),
code: lambda.Code.fromAsset('lib'),
code: lambda.Code.fromAsset(path.join(__dirname, 'lib')),
environment: {
QUEUE_URL: assertionQueue.queueUrl,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
},
"devDependencies": {
"aws-cdk-lib": "0.0.0",
"@aws-cdk/integ-runner": "^2.190.2",
"@aws-cdk/integ-runner": "^2.192.2",
"@aws-cdk/integ-tests-alpha": "0.0.0",
"constructs": "^10.0.0",
"@aws-cdk/cdk-build-tools": "0.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-amplify-alpha/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
"license": "Apache-2.0",
"devDependencies": {
"@aws-cdk/cdk-build-tools": "0.0.0",
"@aws-cdk/integ-runner": "^2.190.2",
"@aws-cdk/integ-runner": "^2.192.2",
"@aws-cdk/pkglint": "0.0.0",
"@aws-cdk/custom-resource-handlers": "0.0.0",
"@aws-sdk/client-amplify": "3.632.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
"license": "Apache-2.0",
"devDependencies": {
"@aws-cdk/cdk-build-tools": "0.0.0",
"@aws-cdk/integ-runner": "^2.190.2",
"@aws-cdk/integ-runner": "^2.192.2",
"@aws-cdk/integ-tests-alpha": "0.0.0",
"@aws-cdk/pkglint": "0.0.0",
"@types/jest": "^29.5.14",
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-apprunner-alpha/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
"devDependencies": {
"@aws-cdk/cdk-build-tools": "0.0.0",
"aws-cdk-lib": "0.0.0",
"@aws-cdk/integ-runner": "^2.190.2",
"@aws-cdk/integ-runner": "^2.192.2",
"@aws-cdk/pkglint": "0.0.0",
"@types/jest": "^29.5.14",
"constructs": "^10.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-bedrock-agentcore-alpha/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
"aws-cdk-lib": "0.0.0",
"@aws-cdk/aws-bedrock-alpha": "0.0.0",
"@aws-cdk/cdk-build-tools": "0.0.0",
"@aws-cdk/integ-runner": "^2.190.2",
"@aws-cdk/integ-runner": "^2.192.2",
"@aws-cdk/pkglint": "0.0.0",
"@aws-cdk/integ-tests-alpha": "0.0.0",
"@types/jest": "^29.5.14",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import * as cdk from 'aws-cdk-lib';
import * as lambda from 'aws-cdk-lib/aws-lambda';
import * as integ from '@aws-cdk/integ-tests-alpha';
import * as agentcore from '../../../lib';
import * as path from 'path';

const app = new cdk.App();
const stack = new cdk.Stack(app, 'BedrockAgentCoreGatewayIntegTest', {
Expand Down Expand Up @@ -80,7 +81,7 @@ const lambdaTarget = gateway.addLambdaTarget('LambdaTarget', {
const smithyTarget = gateway.addSmithyTarget('SmithyTarget', {
gatewayTargetName: 'smithy-test-target',
description: 'Smithy target using convenience method',
smithyModel: agentcore.ApiSchema.fromLocalAsset('schemas/smithy/basic-service.json'),
smithyModel: agentcore.ApiSchema.fromLocalAsset(path.join(__dirname, 'schemas', 'smithy', 'basic-service.json')),
});

// ===== Outputs =====
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import * as cdk from 'aws-cdk-lib';
import * as lambda from 'aws-cdk-lib/aws-lambda';
import * as integ from '@aws-cdk/integ-tests-alpha';
import * as agentcore from '../../../lib';
import * as path from 'path';

const app = new cdk.App();
const stack = new cdk.Stack(app, 'BedrockAgentCoreTargetIntegTest', {
Expand Down Expand Up @@ -69,7 +70,7 @@ const smithyTarget = agentcore.GatewayTarget.forSmithy(stack, 'SmithyTarget', {
gateway: gateway,
gatewayTargetName: 'smithy-via-static',
description: 'Target created via forSmithy static method',
smithyModel: agentcore.ApiSchema.fromLocalAsset('schemas/smithy/basic-service.json'),
smithyModel: agentcore.ApiSchema.fromLocalAsset(path.join(__dirname, 'schemas', 'smithy', 'basic-service.json')),
});

// ===== Test 4: GatewayTarget Constructor with LambdaTargetConfiguration =====
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-bedrock-alpha/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
"devDependencies": {
"aws-cdk-lib": "0.0.0",
"@aws-cdk/cdk-build-tools": "0.0.0",
"@aws-cdk/integ-runner": "^2.190.2",
"@aws-cdk/integ-runner": "^2.192.2",
"@aws-cdk/pkglint": "0.0.0",
"@aws-cdk/integ-tests-alpha": "0.0.0",
"@types/jest": "^29.5.14",
Expand Down
Loading
Loading