test(gerrit): fix approvePr coverage

This commit is contained in:
Felipe Santos 2024-12-01 16:40:11 +00:00
parent 7877331cf7
commit 1d8daf5095

View file

@ -161,7 +161,7 @@ export async function updatePr(prConfig: UpdatePrConfig): Promise<void> {
);
}
if (prConfig.platformPrOptions?.autoApprove) {
await client.approveChange(prConfig.number);
await approvePr(prConfig.number);
}
if (prConfig.state && prConfig.state === 'closed') {
await client.abandonChange(prConfig.number);
@ -196,7 +196,7 @@ export async function createPr(prConfig: CreatePRConfig): Promise<Pr | null> {
TAG_PULL_REQUEST_BODY,
);
if (prConfig.platformPrOptions?.autoApprove) {
await client.approveChange(pr._number);
await approvePr(pr._number);
}
return getPr(pr._number);
}