Skip to content

Commit 60af2e1

Browse files
authored
Merge pull request #7608 from Shopify/fix/e2e-deploy-allow-updates
Fix stale E2E CLI assumptions
2 parents 0165d06 + 74e7148 commit 60af2e1

3 files changed

Lines changed: 10 additions & 3 deletions

File tree

packages/e2e/setup/app.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,15 +147,17 @@ export async function deployApp(
147147
version?: string
148148
message?: string
149149
config?: string
150-
force?: boolean
150+
allowUpdates?: boolean
151+
allowDeletes?: boolean
151152
noBuild?: boolean
152153
},
153154
): Promise<ExecResult> {
154155
const args = ['app', 'deploy']
155156
if (ctx.version) args.push('--version', ctx.version)
156157
if (ctx.message) args.push('--message', ctx.message)
157158
if (ctx.config) args.push('--config', ctx.config)
158-
if (ctx.force ?? true) args.push('--force')
159+
if (ctx.allowUpdates ?? true) args.push('--allow-updates')
160+
if (ctx.allowDeletes) args.push('--allow-deletes')
159161
if (ctx.noBuild) args.push('--no-build')
160162
args.push('--path', ctx.appDir)
161163
return ctx.cli.exec(args, {timeout: CLI_TIMEOUT.long})

packages/e2e/setup/env.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,10 +139,16 @@ export const envFixture = base.extend<{testSection: void}, {env: E2EEnv}>({
139139
fs.mkdirSync(tmpBase, {recursive: true})
140140

141141
const {tempDir, xdgEnv} = createIsolatedEnv(tmpBase)
142+
const cloudflaredPath = path.join(
143+
tempDir,
144+
'cloudflared',
145+
process.platform === 'win32' ? 'cloudflared.exe' : 'cloudflared',
146+
)
142147

143148
const processEnv: NodeJS.ProcessEnv = {
144149
...process.env,
145150
...xdgEnv,
151+
SHOPIFY_CLI_CLOUDFLARED_PATH: cloudflaredPath,
146152
SHOPIFY_RUN_AS_USER: '0',
147153
NODE_OPTIONS: '',
148154
CI: '1',

packages/e2e/tests/smoke-pty.spec.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import {expect} from '@playwright/test'
44
test.describe('PTY smoke test', () => {
55
test('shopify version runs via PTY', async ({cli}) => {
66
const proc = await cli.spawn(['version'])
7-
await proc.waitForOutput('3.')
87
const code = await proc.waitForExit()
98
expect(code, `shopify version (PTY) failed. Output:\n${proc.getOutput()}`).toBe(0)
109
expect(proc.getOutput()).toMatch(/\d+\.\d+\.\d+/)

0 commit comments

Comments
 (0)