-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ATO-1237: fix test running in github
- Due to a a difference in node version from the lambda and Github (18,20) this has caused a know issue where node uses ipv4 or ipv6 by default depending on node version. Setting the localhost to a default ipv4 has not worked. This has caused some de synced behaviour when running the pact tests and due to the code setting the httpAgent in axios is a bigger change than we would like at this moment. Solution is to seperate out the running of the pact tests for now. More information on: pact-foundation/pact-js#1066
- Loading branch information
Showing
3 changed files
with
21 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,22 +8,19 @@ import {clientRegistryResponse} from "../../../src/handlers/types/client-registr | |
import {mockLambdaContext} from "../../handlers/utils"; | ||
import {updateClientInRegistryHandler, UpdateClientPayload} from "../../../src/handlers/auth/update-client"; | ||
|
||
beforeAll((): void => { | ||
jest.setTimeout(200000); | ||
}); | ||
|
||
describe("ClientRegistryProvider", () => { | ||
const {like} = MatchersV3; | ||
|
||
const provider = new PactV3({ | ||
dir: path.resolve(process.cwd(), "pacts"), | ||
logLevel: "debug", | ||
port: 8080, | ||
consumer: "SSEAdminAPIClient", | ||
provider: "ClientRegistryProvider" | ||
}); | ||
|
||
describe("When a POST request is made to create a client", () => { | ||
const provider = new PactV3({ | ||
dir: path.resolve(process.cwd(), "pacts"), | ||
logLevel: "debug", | ||
port: 8080, | ||
host: "127.0.0.1", | ||
consumer: "SSEAdminAPIClient", | ||
provider: "ClientRegistryProvider" | ||
}); | ||
|
||
const postEvent: RegisterClientPayload = { | ||
contactEmail: "[email protected]", | ||
service: { | ||
|
@@ -88,6 +85,15 @@ describe("ClientRegistryProvider", () => { | |
}); | ||
|
||
describe("When a PUT request is made to update a client", () => { | ||
const provider = new PactV3({ | ||
dir: path.resolve(process.cwd(), "pacts"), | ||
logLevel: "debug", | ||
port: 8081, | ||
host: "127.0.0.1", | ||
consumer: "SSEAdminAPIClient", | ||
provider: "ClientRegistryProvider" | ||
}); | ||
|
||
const updatesForClient = { | ||
contacts: ["[email protected]"], | ||
subject_type: "pairwise" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters