Unverified Commit 75b9f201 authored by Hendrik Liebau's avatar Hendrik Liebau Committed by GitHub

[test] Fix deployment tests that relied on implicit startup (#98935)

PR #98776 moved deployment creation into `start()` and made deploy mode
honor `skipStart`. Two suites consequently requested an undefined URL,
as reported in
https://github.com/vercel/next.js/actions/runs/35407031061.

The `use-cache-output-export` suite now skips automatic startup only in
local production mode. The `trace-build-file` suite now excludes deploy
mode because its trace assertions require local build output.
parent 7b58e588
...@@ -3,6 +3,8 @@ import { join } from 'path' ...@@ -3,6 +3,8 @@ import { join } from 'path'
import { existsSync } from 'fs' import { existsSync } from 'fs'
import { parseTraceFile } from '../../../lib/parse-trace-file' import { parseTraceFile } from '../../../lib/parse-trace-file'
// The trace assertions require access to local build output.
// @force-gate !deploy
describe('trace-build-file', () => { describe('trace-build-file', () => {
const { next } = nextTestSetup({ const { next } = nextTestSetup({
files: __dirname, files: __dirname,
......
import { nextTestSetup } from 'e2e-utils' import { isNextStart, nextTestSetup } from 'e2e-utils'
import { renderViaHTTP, startCleanStaticServer } from 'next-test-utils' import { renderViaHTTP, startCleanStaticServer } from 'next-test-utils'
import { join } from 'path' import { join } from 'path'
import { AddressInfo, Server } from 'net' import { AddressInfo, Server } from 'net'
describe('use-cache-output-export', () => { describe('use-cache-output-export', () => {
const { next, isNextStart } = nextTestSetup({ const { next } = nextTestSetup({
files: __dirname, files: __dirname,
skipStart: process.env.NEXT_TEST_MODE !== 'dev', skipStart: isNextStart,
}) })
if (process.env.__NEXT_CACHE_COMPONENTS === 'true') { if (process.env.__NEXT_CACHE_COMPONENTS === 'true') {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment