Skip to content

Commit

Permalink
test: add new version of patch for recent changes in next repository …
Browse files Browse the repository at this point in the history
…and try it if older one doesn't work (#2578)
  • Loading branch information
pieh committed Aug 30, 2024
1 parent 83f685e commit f13f3fa
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ jobs:
- name: patch Next.js
run: |
cp ../${{ env.runtime-path }}/tests/netlify-deploy.ts test/lib/next-modes/
git apply ../${{ env.runtime-path }}/tests/e2e-utils.patch
git apply ../${{ env.runtime-path }}/tests/e2e-utils.patch || git apply ../${{ env.runtime-path }}/tests/e2e-utils-v2.patch
working-directory: ${{ env.next-path }}

- name: install Next.js
Expand Down
2 changes: 1 addition & 1 deletion run-local-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export NEXT_TEST_MODE=deploy
export RUNTIME_DIR=$(pwd)
cp tests/netlify-deploy.ts ../next.js/test/lib/next-modes/netlify-deploy.ts
cd ../next.js/
git apply ../next-runtime/tests/e2e-utils.patch
git apply ../next-runtime/tests/e2e-utils.patch || git apply ../next-runtime/tests/e2e-utils-v2.patch
node run-tests.js --type e2e --debug --test-pattern $1
git checkout -- test/lib/e2e-utils.ts

13 changes: 13 additions & 0 deletions tests/e2e-utils-v2.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/test/lib/e2e-utils/index.ts b/test/lib/e2e-utils/index.ts
index 06765e81d9..a7a5a9e4bd 100644
--- a/test/lib/e2e-utils/index.ts
+++ b/test/lib/e2e-utils/index.ts
@@ -5,7 +5,7 @@ import { PHASE_DEVELOPMENT_SERVER } from 'next/constants'
import { NextInstance, NextInstanceOpts } from '../next-modes/base'
import { NextDevInstance } from '../next-modes/next-dev'
import { NextStartInstance } from '../next-modes/next-start'
-import { NextDeployInstance } from '../next-modes/next-deploy'
+import { NextDeployInstance } from '../next-modes/netlify-deploy'
import { shouldRunTurboDevTest } from '../next-test-utils'

export type { NextInstance }

0 comments on commit f13f3fa

Please sign in to comment.