Skip to content

Commit 0bab4f7

Browse files
authored
chore: fix tests that check package versions in the pipeline (#26934)
They execute correctly locally and in a PR build, but not in the Pipeline because the `framework-integ` package gets an `-alpha.999` suffix (whereas the actual constructs get an `-rc.0` suffix). The test used to read the expected version from its own `package.json`. It will now read the expected version from `aws-cdk-lib`'s `package.json`. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent bdce16c commit 0bab4f7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/@aws-cdk-testing/framework-integ/test/core/test/runtime-info.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ class TestConstruct extends Construct {
176176
function localCdkVersion(): string {
177177
if (!_cdkVersion) {
178178
// eslint-disable-next-line @typescript-eslint/no-require-imports
179-
const pkgJson = findParentPkgJson(__dirname);
179+
const pkgJson = findParentPkgJson(require.resolve('aws-cdk-lib'));
180180
_cdkVersion = pkgJson.version;
181181
if (!_cdkVersion) {
182182
throw new Error('Unable to determine CDK version');

0 commit comments

Comments
 (0)