mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-23 09:09:36 +02:00
[server-pro] test: harden reconfiguring (#28193)
When reconfiguring fails, the config snapshot in the frontend is not updated. When the next test uses the previous config, it will not attempt to restore that config again, and instead use the other config. Reset the config before making changes to ensure all tests get their desired config, even when reconfiguring fails. GitOrigin-RevId: 0939e709cf93da820a86fef2599940669138d728
This commit is contained in:
@@ -53,6 +53,7 @@ export function startWith({
|
|||||||
cy.log(`starting with ${cfg}`)
|
cy.log(`starting with ${cfg}`)
|
||||||
|
|
||||||
this.timeout(STARTUP_TIMEOUT)
|
this.timeout(STARTUP_TIMEOUT)
|
||||||
|
previousConfigFrontend = ''
|
||||||
const { previousConfigServer } = await reconfigure({
|
const { previousConfigServer } = await reconfigure({
|
||||||
pro,
|
pro,
|
||||||
version,
|
version,
|
||||||
@@ -94,6 +95,7 @@ export async function reloadWith({
|
|||||||
} else if (previousConfigFrontend === cfg) {
|
} else if (previousConfigFrontend === cfg) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
previousConfigFrontend = ''
|
||||||
const { previousConfigServer } = await reconfigure({
|
const { previousConfigServer } = await reconfigure({
|
||||||
pro,
|
pro,
|
||||||
version,
|
version,
|
||||||
|
|||||||
Reference in New Issue
Block a user