make test-frontend runs against a stack of its own
The suite creates and deletes flows, dashboards and users, and ran against whatever stack was up, which is the dev instance's data. make test-stack starts the compose project fluksio-test (compose.test.yml over the local stack's files) with its own containers, volumes and image tags, served by the local Traefik on app.test.localhost and api.test.localhost, and leaves it running. The hostname is fixed, so it no longer comes off the running dev stack, and a LAN stack makes no difference. The suite's default origin is the test stack.
This commit is contained in:
@@ -29,7 +29,8 @@ export const firstSuperuserPassword = getEnvVar("FIRST_SUPERUSER_PASSWORD")
|
||||
* instance. Both origins come from the same place instead: whatever the browser
|
||||
* is pointed at is what teardown may write to.
|
||||
*/
|
||||
export const appUrl = process.env.PLAYWRIGHT_BASE_URL || "http://app.localhost"
|
||||
export const appUrl =
|
||||
process.env.PLAYWRIGHT_BASE_URL || "http://app.test.localhost"
|
||||
|
||||
export const apiUrl = process.env.PLAYWRIGHT_API_URL || apiOrigin(appUrl)
|
||||
|
||||
|
||||
@@ -11,9 +11,9 @@ import { apiUrl, firstSuperuser, firstSuperuserPassword } from "./config.ts"
|
||||
* rather than after one is what makes this work at all: it happens even when
|
||||
* the run that made the mess died.
|
||||
*
|
||||
* The suite runs against whatever stack is up, which is somebody's own
|
||||
* instance with real flows in it, so the predicate has to be incapable of
|
||||
* matching one. A name qualifies only if it has the shape every fixture has —
|
||||
* `make test-frontend` runs against a stack of its own, but the suite can be
|
||||
* pointed at any (PLAYWRIGHT_BASE_URL), and that may be somebody's own instance
|
||||
* with real flows in it, so the predicate has to be incapable of matching one. A name qualifies only if it has the shape every fixture has —
|
||||
* `test_<spec>_<base36 Date.now()>`, plus an optional `_<suffix>` for a second
|
||||
* artefact of the same spec — and only if the timestamp it carries is an hour
|
||||
* old, which nothing the run now starting is about to create can be.
|
||||
|
||||
Reference in New Issue
Block a user