Skip to content

Commit 08a9e7d

Browse files
authored
Add @beta tag to create amplify in e2e tests (#1018)
1 parent 21f6292 commit 08a9e7d

File tree

4 files changed

+16
-6
lines changed

4 files changed

+16
-6
lines changed

.changeset/three-doors-act.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/**
2+
* Used to run `create amplfiy` at a specific tagged release
3+
* Remove @beta before GA to switch to running against @latest
4+
* https://github.com/aws-amplify/amplify-backend/issues/1013
5+
*/
6+
export const amplifyAtTag = 'amplify@beta';

packages/integration-tests/src/test-e2e/create_amplify.test.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import assert from 'assert';
88
import { glob } from 'glob';
99
import { testConcurrencyLevel } from './test_concurrency.js';
1010
import { findBaselineCdkVersion } from '../cdk_version_finder.js';
11+
import { amplifyAtTag } from '../constants.js';
1112

1213
void describe(
1314
'create-amplify script',
@@ -31,7 +32,7 @@ void describe(
3132
// Force 'create-amplify' installation in npx cache by executing help command
3233
// before tests run. Otherwise, installing 'create-amplify' concurrently
3334
// may lead to race conditions and corrupted npx cache.
34-
await execa('npm', ['create', 'amplify', '--yes', '--', '--help'], {
35+
await execa('npm', ['create', amplifyAtTag, '--yes', '--', '--help'], {
3536
// Command must run outside of 'amplify-backend' workspace.
3637
cwd: os.homedir(),
3738
stdio: 'inherit',
@@ -80,7 +81,7 @@ void describe(
8081
);
8182
}
8283

83-
await execa('npm', ['create', 'amplify', '--yes'], {
84+
await execa('npm', ['create', amplifyAtTag, '--yes'], {
8485
cwd: tempDir,
8586
stdio: 'inherit',
8687
});
@@ -236,7 +237,7 @@ void describe(
236237
const amplifyDirPath = path.join(tempDir, 'amplify');
237238
await fs.mkdir(amplifyDirPath, { recursive: true });
238239

239-
const result = await execa('npm', ['create', 'amplify', '--yes'], {
240+
const result = await execa('npm', ['create', amplifyAtTag, '--yes'], {
240241
cwd: tempDir,
241242
stdio: 'pipe',
242243
reject: false,

packages/integration-tests/src/test-live-dependency-health-checks/health_checks.test.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import {
1919
} from '../process-controller/predicated_action_macros.js';
2020
import { BackendIdentifierConversions } from '@aws-amplify/platform-core';
2121
import { e2eToolingClientConfig } from '../e2e_tooling_client_config.js';
22+
import { amplifyAtTag } from '../constants.js';
2223

2324
const cfnClient = new CloudFormationClient(e2eToolingClientConfig);
2425

@@ -42,7 +43,7 @@ void describe('Live dependency health checks', { concurrency: true }, () => {
4243
// Force 'create-amplify' installation in npx cache by executing help command
4344
// before tests run. Otherwise, installing 'create-amplify' concurrently
4445
// may lead to race conditions and corrupted npx cache.
45-
await execa('npm', ['create', 'amplify', '--yes', '--', '--help'], {
46+
await execa('npm', ['create', amplifyAtTag, '--yes', '--', '--help'], {
4647
// Command must run outside of 'amplify-backend' workspace.
4748
cwd: os.homedir(),
4849
stdio: 'inherit',
@@ -77,7 +78,7 @@ void describe('Live dependency health checks', { concurrency: true }, () => {
7778
});
7879

7980
void it('end to end flow', async () => {
80-
await execa('npm', ['create', 'amplify', '--yes'], {
81+
await execa('npm', ['create', amplifyAtTag, '--yes'], {
8182
cwd: tempDir,
8283
stdio: 'inherit',
8384
});
@@ -114,7 +115,7 @@ void describe('Live dependency health checks', { concurrency: true }, () => {
114115
});
115116

116117
void it('end to end flow', async () => {
117-
await execa('npm', ['create', 'amplify', '--yes'], {
118+
await execa('npm', ['create', amplifyAtTag, '--yes'], {
118119
cwd: tempDir,
119120
stdio: 'inherit',
120121
});

0 commit comments

Comments
 (0)