ocket8888 commented on code in PR #7459:
URL: https://github.com/apache/trafficcontrol/pull/7459#discussion_r1194167148
##########
experimental/traffic-portal/src/app/api/cdn.service.spec.ts:
##########
@@ -129,6 +129,21 @@ describe("CDNService", () => {
await expectAsync(responseP).toBeResolved();
});
+ it("queues a CDN by ID", async () => {
+ const responseP = service.queueCDNUpdates(cdn, "queue");
Review Comment:
This doesn't queue updates using an ID, it uses a whole CDN object. Because
the `number` case isn't covered, we still aren't hitting 100% of statements -
but even if you change that we won't hit 100% of branches because then the
passing-a-whole-CDN-object case won't be under test.
##########
experimental/traffic-portal/src/app/api/cdn.service.ts:
##########
@@ -119,4 +119,19 @@ export class CDNService extends APIService {
return this.put<ResponseCDN>(`cdns/${id}`, body).toPromise();
}
+
+ /**
+ * Queues or dequeues updates on a CDN's servers.
+ *
+ * @param cdn The CDN to queue or dequeue updates on.
+ * @param action The action to perform on the CDN, either "queue" or
"dequeue".
+ */
+ public async queueCDNUpdates(cdn: ResponseCDN | number, action: "queue"
| "dequeue"): Promise<CDNQueueResponse> {
Review Comment:
This method appears to be missing from the testing mock service
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]