test(e2e): add playwright e2e harness
Process and API-only Playwright harness: binary and image setup, server/CLI runners, fake Docker Engine socket, read-only database inspection, secret redaction in reports, seeded fuzzing, leak detection and harness self-checks.
This commit is contained in:
1 parent
a02eef13a7
commit
fe0cd4bf6d
33 files changed
+6370
No files matched your search
@@ -0,0 +1,20 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
// Copyright (C) 2026 Bryan Joshua Pedini
|
||||
|
||||
/**
|
||||
* `image-setup` project: check the image under test ($DPSAPI_IMAGE) and the tools the image
|
||||
* suite needs. All image tests depend on it.
|
||||
*/
|
||||
import { test as setup } from '@playwright/test';
|
||||
import { imageRef } from '../harness/env';
|
||||
import { HarnessError } from '../harness/errors';
|
||||
import { requireCurl, requireDocker, sh } from './prereq';
|
||||
|
||||
setup('image prerequisites: Docker, curl, image under test', async () => {
|
||||
requireCurl();
|
||||
requireDocker();
|
||||
const image = imageRef();
|
||||
if (!image) throw new HarnessError('prerequisite', 'DPSAPI_IMAGE is not set (run `make docker-e2e`, or export DPSAPI_IMAGE=<image ref>)');
|
||||
const r = sh('docker', ['image', 'inspect', '--format', '{{.Id}}', image]);
|
||||
if (r.code !== 0) throw new HarnessError('prerequisite', `image ${image} is not present locally (build it with \`make docker\`): ${r.err.trim()}`);
|
||||
});
|
||||
Reference in new issue
Block a user