Skip to content

Commit b40ea07

Browse files
committed
chore: add more details on ngrok setup when running smoke tests with user session locally
1 parent 8eff71f commit b40ea07

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ To run a test suite for a type of FT subscriber, add a `user` property to the su
167167

168168
For the test to get the user session tokens from [`next-test-sessions-lambda`](http://github.com/financial-times/next-test-sessions-lambda), it needs to rewrite the URL being tested to an ft.com host. The original URL is set in the `FT-Test-Host` header, which tells `next-router` to proxy the test URL rather than production.
169169

170-
The test output will display the original URL.
170+
The test output will display the original URL.
171171

172172
*Options:* `premium`, `standard`, `expired`.
173173

@@ -202,11 +202,20 @@ n-test smoke -H https://05bd2344ebca.ngrok.io
202202

203203
Needs to set TEST_SESSIONS_URL (url to [`next-test-sessions-lambda`](http://github.com/financial-times/next-test-sessions-lambda)) and TEST_SESSIONS_API_KEY environment variables when running the tests.
204204

205+
```
206+
TEST_SESSIONS_API_KEY=<TEST_SESSIONS_API_KEY> TEST_SESSIONS_URL=<TEST_SESSIONS_URL> n-test smoke -H https://05bd2344ebca.ngrok.io
207+
```
208+
209+
Ngrok has added a warning page to block phishing attack, so an additional header `ngrok-skip-browser-warning` is needed to be truthy to bypass the page, or the warning page is always shown.
210+
205211
*Example*
206212
```
207213
[
208214
{
209215
user: 'premium',
216+
header: {
217+
'ngrok-skip-browser-warning': 1,
218+
},
210219
urls: [
211220
'/these-will': 200,
212221
'/run-with-a': 200,

0 commit comments

Comments
 (0)