Skip to content

Commit

Permalink
chore: remove excludes
Browse files Browse the repository at this point in the history
  • Loading branch information
jkoenig134 committed Nov 14, 2024
1 parent e41a725 commit fb63bd8
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 11 deletions.
2 changes: 1 addition & 1 deletion packages/sdk/src/ConnectorClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export class ConnectorClient {
const axiosInstance = axios.create({
baseURL: config.baseUrl,
headers: {
"X-API-KEY": config.apiKey // eslint-disable-line @typescript-eslint/naming-convention
"X-API-KEY": config.apiKey
},
httpAgent: config.httpAgent,
httpsAgent: config.httpsAgent,
Expand Down
1 change: 0 additions & 1 deletion src/modules/webhooks/WebhooksModule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ export default class WebhooksModule extends ConnectorRuntimeModule<WebhooksModul
let headers = webhook.target.headers;

const correlationId = correlator.getId();
// eslint-disable-next-line @typescript-eslint/naming-convention
if (correlationId) headers = { ...headers, "x-correlation-id": correlationId };

const response = await this.axios.post(url, payload, { headers });
Expand Down
5 changes: 1 addition & 4 deletions test/correlationId.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,9 @@ describe("test the correlation ids", () => {
},
peer: account2Address
},
// eslint-disable-next-line @typescript-eslint/naming-convention
{ headers: { "x-correlation-id": customCorrelationId } }
);

await connectorClient1._eventBus?.waitForEvent("consumption.outgoingRequestCreated", (event: any) => {
return event.headers["x-correlation-id"] === customCorrelationId;
});
await connectorClient1._eventBus?.waitForEvent("consumption.outgoingRequestCreated", (event: any) => event.headers["x-correlation-id"] === customCorrelationId);
});
});
6 changes: 1 addition & 5 deletions test/errors.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ beforeAll(async () => {
axiosClient = axios.create({
baseURL: baseUrl,
validateStatus: (_) => true,
// eslint-disable-next-line @typescript-eslint/naming-convention
headers: { "X-API-KEY": launcher.apiKey }
});
}, getTimeout(30000));
Expand All @@ -20,10 +19,7 @@ afterAll(() => launcher.stop());

describe("Errors", () => {
test("http error 401", async () => {
const response = await axiosClient.get<any>("/api/v2/Files", {
// eslint-disable-next-line @typescript-eslint/naming-convention
headers: { "X-API-KEY": "invalid" }
});
const response = await axiosClient.get<any>("/api/v2/Files", { headers: { "X-API-KEY": "invalid" } });
expect(response.status).toBe(401);
validateSchema(ValidationSchema.Error, response.data.error);
});
Expand Down

0 comments on commit fb63bd8

Please sign in to comment.