diff --git a/.changeset/three-doors-act.md b/.changeset/three-doors-act.md new file mode 100644 index 0000000000..a845151cc8 --- /dev/null +++ b/.changeset/three-doors-act.md @@ -0,0 +1,2 @@ +--- +--- diff --git a/packages/integration-tests/src/constants.ts b/packages/integration-tests/src/constants.ts new file mode 100644 index 0000000000..a753b99c23 --- /dev/null +++ b/packages/integration-tests/src/constants.ts @@ -0,0 +1,6 @@ +/** + * Used to run `create amplfiy` at a specific tagged release + * Remove @beta before GA to switch to running against @latest + * https://github.com/aws-amplify/amplify-backend/issues/1013 + */ +export const amplifyAtTag = 'amplify@beta'; diff --git a/packages/integration-tests/src/test-e2e/create_amplify.test.ts b/packages/integration-tests/src/test-e2e/create_amplify.test.ts index 5a04688625..fafeda134c 100644 --- a/packages/integration-tests/src/test-e2e/create_amplify.test.ts +++ b/packages/integration-tests/src/test-e2e/create_amplify.test.ts @@ -8,6 +8,7 @@ import assert from 'assert'; import { glob } from 'glob'; import { testConcurrencyLevel } from './test_concurrency.js'; import { findBaselineCdkVersion } from '../cdk_version_finder.js'; +import { amplifyAtTag } from '../constants.js'; void describe( 'create-amplify script', @@ -31,7 +32,7 @@ void describe( // Force 'create-amplify' installation in npx cache by executing help command // before tests run. Otherwise, installing 'create-amplify' concurrently // may lead to race conditions and corrupted npx cache. - await execa('npm', ['create', 'amplify', '--yes', '--', '--help'], { + await execa('npm', ['create', amplifyAtTag, '--yes', '--', '--help'], { // Command must run outside of 'amplify-backend' workspace. cwd: os.homedir(), stdio: 'inherit', @@ -80,7 +81,7 @@ void describe( ); } - await execa('npm', ['create', 'amplify', '--yes'], { + await execa('npm', ['create', amplifyAtTag, '--yes'], { cwd: tempDir, stdio: 'inherit', }); @@ -236,7 +237,7 @@ void describe( const amplifyDirPath = path.join(tempDir, 'amplify'); await fs.mkdir(amplifyDirPath, { recursive: true }); - const result = await execa('npm', ['create', 'amplify', '--yes'], { + const result = await execa('npm', ['create', amplifyAtTag, '--yes'], { cwd: tempDir, stdio: 'pipe', reject: false, diff --git a/packages/integration-tests/src/test-live-dependency-health-checks/health_checks.test.ts b/packages/integration-tests/src/test-live-dependency-health-checks/health_checks.test.ts index 995177142f..044553d25d 100644 --- a/packages/integration-tests/src/test-live-dependency-health-checks/health_checks.test.ts +++ b/packages/integration-tests/src/test-live-dependency-health-checks/health_checks.test.ts @@ -19,6 +19,7 @@ import { } from '../process-controller/predicated_action_macros.js'; import { BackendIdentifierConversions } from '@aws-amplify/platform-core'; import { e2eToolingClientConfig } from '../e2e_tooling_client_config.js'; +import { amplifyAtTag } from '../constants.js'; const cfnClient = new CloudFormationClient(e2eToolingClientConfig); @@ -42,7 +43,7 @@ void describe('Live dependency health checks', { concurrency: true }, () => { // Force 'create-amplify' installation in npx cache by executing help command // before tests run. Otherwise, installing 'create-amplify' concurrently // may lead to race conditions and corrupted npx cache. - await execa('npm', ['create', 'amplify', '--yes', '--', '--help'], { + await execa('npm', ['create', amplifyAtTag, '--yes', '--', '--help'], { // Command must run outside of 'amplify-backend' workspace. cwd: os.homedir(), stdio: 'inherit', @@ -77,7 +78,7 @@ void describe('Live dependency health checks', { concurrency: true }, () => { }); void it('end to end flow', async () => { - await execa('npm', ['create', 'amplify', '--yes'], { + await execa('npm', ['create', amplifyAtTag, '--yes'], { cwd: tempDir, stdio: 'inherit', }); @@ -114,7 +115,7 @@ void describe('Live dependency health checks', { concurrency: true }, () => { }); void it('end to end flow', async () => { - await execa('npm', ['create', 'amplify', '--yes'], { + await execa('npm', ['create', amplifyAtTag, '--yes'], { cwd: tempDir, stdio: 'inherit', });