Skip to content

Commit 2b3d2f3

Browse files
committed
Tests: Move baseURL to secret
1 parent 6e2a9ec commit 2b3d2f3

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

.github/workflows/playwright.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ on:
1010
env:
1111
FRONT_DOOR_USERNAME: ${{ secrets.FRONT_DOOR_USERNAME }}
1212
FRONT_DOOR_PASSWORD: ${{ secrets.FRONT_DOOR_PASSWORD }}
13+
COVEO_CREDENTIALS_BASE_URL: ${{ secrets.COVEO_CREDENTIALS_BASE_URL }}
1314
jobs:
1415
playwright:
1516
name: Run Playwright

tests/.env.example

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
FRONT_DOOR_USERNAME=
2-
FRONT_DOOR_PASSWORD=
2+
FRONT_DOOR_PASSWORD=
3+
COVEO_CREDENTIALS_BASE_URL=

tests/src/constants/constants.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
export const TIMEOUT = 4000;
2-
export const COVEO_CREDENTIALS_BASE_URL = 'https://docs-dev.nginx.com';
32
export const COVEO_CREDENTIALS_ENDPOINT = 'api/v1/auth/search_token';

tests/src/mock/coveo.mock.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
import { expect } from '@playwright/test';
2-
import {
3-
COVEO_CREDENTIALS_BASE_URL,
4-
COVEO_CREDENTIALS_ENDPOINT,
5-
} from '../constants';
2+
import { COVEO_CREDENTIALS_ENDPOINT } from '../constants';
63

74
export const mockCoveoData = {
85
validQuery: 'proxy',
@@ -14,8 +11,9 @@ export async function mockCoveoCredentials(page, request) {
1411
// Get credentials
1512
const username = process.env.FRONT_DOOR_USERNAME;
1613
const password = process.env.FRONT_DOOR_PASSWORD;
14+
const baseURL = process.env.COVEO_CREDENTIALS_BASE_URL;
1715
const response = await request.get(
18-
`${COVEO_CREDENTIALS_BASE_URL}/${COVEO_CREDENTIALS_ENDPOINT}`,
16+
`${baseURL}/${COVEO_CREDENTIALS_ENDPOINT}`,
1917
{
2018
headers: {
2119
Authorization:

0 commit comments

Comments
 (0)