From 4ea49d2e9dff1ab714c04b87ad636c4f3d7f6389 Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Tue, 14 Nov 2023 02:13:21 +0300 Subject: [PATCH] Fix JFrog URL in main.test.ts --- jfrog-oauth/main.test.ts | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/jfrog-oauth/main.test.ts b/jfrog-oauth/main.test.ts index a3931cc..f31aa5d 100644 --- a/jfrog-oauth/main.test.ts +++ b/jfrog-oauth/main.test.ts @@ -9,32 +9,9 @@ import { describe("jfrog-oauth", async () => { await runTerraformInit(import.meta.dir); - // Run a fake JFrog server so the provider can initialize - // correctly. This saves us from having to make remote requests! - const fakeFrogHost = serve({ - fetch: (req) => { - const url = new URL(req.url); - // See https://jfrog.com/help/r/jfrog-rest-apis/license-information - if (url.pathname === "/artifactory/api/system/license") - return createJSONResponse({ - type: "Commercial", - licensedTo: "JFrog inc.", - validThrough: "May 15, 2036", - }); - if (url.pathname === "/access/api/v1/tokens") - return createJSONResponse({ - token_id: "xxx", - access_token: "xxx", - scope: "any", - }); - return createJSONResponse({}); - }, - port: 0, - }); - testRequiredVariables(import.meta.dir, { agent_id: "some-agent-id", - jfrog_url: "http://" + fakeFrogHost.hostname + ":" + fakeFrogHost.port, + jfrog_url: "http://localhost:8081", package_managers: "{}", }); });