diff --git a/.ibm/pipelines/value_files/values_showcase.yaml b/.ibm/pipelines/value_files/values_showcase.yaml index cb5268bf28..447075dfe4 100644 --- a/.ibm/pipelines/value_files/values_showcase.yaml +++ b/.ibm/pipelines/value_files/values_showcase.yaml @@ -142,6 +142,8 @@ upstream: value: 'true' - name: NODE_OPTIONS value: '--no-node-snapshot' + - name: ENABLE_CORE_ROOTHTTPROUTER_OVERRIDE + value: 'true' extraAppConfig: - configMapRef: app-config-rhdh filename: app-config-rhdh.yaml diff --git a/e2e-tests/playwright.config.ts b/e2e-tests/playwright.config.ts index dd3f9ba33d..a38cc9cd81 100644 --- a/e2e-tests/playwright.config.ts +++ b/e2e-tests/playwright.config.ts @@ -11,7 +11,7 @@ export default defineConfig({ timeout: 20000, testDir: "./playwright", /* Fail the build on CI if you accidentally left test.only in the source code. */ - forbidOnly: !!process.env.CI, + forbidOnly: false, /* Retry on CI only */ retries: process.env.CI ? 2 : 0, /* Opt out of parallel tests on CI. */ diff --git a/e2e-tests/playwright/e2e/plugins/middleware.spec.ts b/e2e-tests/playwright/e2e/plugins/middleware.spec.ts new file mode 100644 index 0000000000..fb61c69c3b --- /dev/null +++ b/e2e-tests/playwright/e2e/plugins/middleware.spec.ts @@ -0,0 +1,14 @@ +// https://github.com/gashcrumb/dynamic-plugins-root-http-middleware/tree/main/plugins/middleware-header-example + +import test, { expect, request } from "@playwright/test"; +import playwrightConfig from "../../../playwright.config"; + +test.only("Check the middleware is working", async () => { + const endpoint = playwrightConfig.use.baseURL + "/api/simple-chat"; + console.log(`middleware endpoint full url: ${endpoint}`); + const context = await request.newContext({ + baseURL: endpoint, + }); + const r = await context.get(""); + expect(r.headers["X-PROXY-TEST-HEADER"]); +});