Merge pull request #20117 from overleaf/jpa-server-pro-test-local

[server-pro] tests: add support for running email tests on Macs

GitOrigin-RevId: 19a206f4ee70d43624094dd8da87091063d631a0
This commit is contained in:
Jakob Ackermann
2024-09-02 08:05:25 +00:00
committed by Copybot
parent 16eb99ee48
commit 3c5bd060f4
6 changed files with 25 additions and 17 deletions
+5 -5
View File
@@ -1,7 +1,7 @@
const hostAdminUrl = Cypress.env('ADMIN_CLIENT_URL') || 'http://host-admin'
const hostAdminURL = Cypress.env('HOST_ADMIN_URL') || 'http://host-admin'
export async function dockerCompose(cmd: string, ...args: string[]) {
return await fetchJSON(`${hostAdminUrl}/docker/compose/${cmd}`, {
return await fetchJSON(`${hostAdminURL}/docker/compose/${cmd}`, {
method: 'POST',
body: JSON.stringify({
args,
@@ -16,7 +16,7 @@ export async function reconfigure({
withDataDir = false,
resetData = false,
}): Promise<{ previousConfigServer: string }> {
return await fetchJSON(`${hostAdminUrl}/reconfigure`, {
return await fetchJSON(`${hostAdminURL}/reconfigure`, {
method: 'POST',
body: JSON.stringify({
pro,
@@ -68,7 +68,7 @@ export async function runScript({
script: string
args?: string[]
}) {
return await fetchJSON(`${hostAdminUrl}/run/script`, {
return await fetchJSON(`${hostAdminURL}/run/script`, {
method: 'POST',
body: JSON.stringify({
cwd,
@@ -79,7 +79,7 @@ export async function runScript({
}
export async function getRedisKeys() {
const { stdout } = await fetchJSON(`${hostAdminUrl}/redis/keys`, {
const { stdout } = await fetchJSON(`${hostAdminURL}/redis/keys`, {
method: 'GET',
})
return stdout.split('\n')