Skip to content

Commit 9f47441

Browse files
committed
chore: fix failing integ tests
1 parent 8edb87c commit 9f47441

File tree

8 files changed

+27
-31
lines changed

8 files changed

+27
-31
lines changed

packages/eventstream-serde-universal/src/eventstream-cbor.integ.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ describe("local model integration test for cbor eventstreams", () => {
99
it("should read and write cbor event streams", async () => {
1010
const client = new XYZService({
1111
endpoint: "https://localhost",
12-
});
12+
apiKey: { apiKey: "test-api-key" },
13+
} as any);
1314

1415
const body = cbor.serialize({
1516
id: "alpha",

packages/util-retry/src/retries.integ.spec.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ describe("retries", () => {
2020
it("should retry throttling and transient-error status codes", async () => {
2121
const client = new XYZService({
2222
endpoint: "https://localhost/nowhere",
23-
});
23+
apiKey: { apiKey: "test-api-key" },
24+
} as any);
2425

2526
requireRequestsFrom(client)
2627
.toMatch({
@@ -50,7 +51,8 @@ describe("retries", () => {
5051
it("should retry when a retryable trait is modeled", async () => {
5152
const client = new XYZService({
5253
endpoint: "https://localhost/nowhere",
53-
});
54+
apiKey: { apiKey: "test-api-key" },
55+
} as any);
5456

5557
requireRequestsFrom(client)
5658
.toMatch({
@@ -80,7 +82,8 @@ describe("retries", () => {
8082
it("should retry retryable trait with throttling", async () => {
8183
const client = new XYZService({
8284
endpoint: "https://localhost/nowhere",
83-
});
85+
apiKey: { apiKey: "test-api-key" },
86+
} as any);
8487

8588
requireRequestsFrom(client)
8689
.toMatch({
@@ -110,7 +113,8 @@ describe("retries", () => {
110113
it("should not retry if the error is not modeled with retryable trait and is not otherwise retryable", async () => {
111114
const client = new XYZService({
112115
endpoint: "https://localhost/nowhere",
113-
});
116+
apiKey: { apiKey: "test-api-key" },
117+
} as any);
114118

115119
requireRequestsFrom(client)
116120
.toMatch({

private/my-local-model-schema/src/XYZServiceClient.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -243,12 +243,12 @@ export class XYZServiceClient extends __Client<
243243
const _config_0 = __getRuntimeConfig(configuration || {});
244244
super(_config_0 as any);
245245
this.initConfig = _config_0;
246-
let _config_1 = resolveClientEndpointParameters(_config_0);
247-
let _config_2 = resolveRetryConfig(_config_1);
248-
let _config_3 = resolveEndpointConfig(_config_2);
249-
let _config_4 = resolveEventStreamSerdeConfig(_config_3);
250-
let _config_5 = resolveHttpAuthSchemeConfig(_config_4);
251-
let _config_6 = resolveRuntimeExtensions(_config_5, configuration?.extensions || []);
246+
const _config_1 = resolveClientEndpointParameters(_config_0);
247+
const _config_2 = resolveRetryConfig(_config_1);
248+
const _config_3 = resolveEndpointConfig(_config_2);
249+
const _config_4 = resolveEventStreamSerdeConfig(_config_3);
250+
const _config_5 = resolveHttpAuthSchemeConfig(_config_4);
251+
const _config_6 = resolveRuntimeExtensions(_config_5, configuration?.extensions || []);
252252
this.config = _config_6;
253253
this.middlewareStack.use(getSchemaSerdePlugin(this.config));
254254
this.middlewareStack.use(getRetryPlugin(this.config));

private/my-local-model-schema/src/endpoint/EndpointParameters.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export interface ClientInputEndpointParameters {
1313
nonConflictingParam?: string | undefined | Provider<string | undefined>;
1414
};
1515
endpoint?: string | Provider<string> | Endpoint | Provider<Endpoint> | EndpointV2 | Provider<EndpointV2>;
16+
apiKey?: string | undefined | Provider<string | undefined>;
1617
customParam?: string | undefined | Provider<string | undefined>;
1718
enableFeature?: boolean | undefined | Provider<boolean | undefined>;
1819
debugMode?: boolean | undefined | Provider<boolean | undefined>;
@@ -43,6 +44,9 @@ const clientContextParamDefaults = {
4344
enableFeature: true,
4445
} as const;
4546

47+
/**
48+
* @internal
49+
*/
4650
export const resolveClientEndpointParameters = <T>(
4751
options: T & ClientInputEndpointParameters
4852
): T & ClientResolvedEndpointParameters => {

private/my-local-model/src/XYZServiceClient.ts

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -229,24 +229,13 @@ export class XYZServiceClient extends __Client<
229229
const _config_0 = __getRuntimeConfig(configuration || {});
230230
super(_config_0 as any);
231231
this.initConfig = _config_0;
232-
<<<<<<< HEAD
233232
const _config_1 = resolveClientEndpointParameters(_config_0);
234233
const _config_2 = resolveRetryConfig(_config_1);
235234
const _config_3 = resolveEndpointConfig(_config_2);
236-
const _config_4 = resolveEndpointRequiredConfig(_config_3);
237-
const _config_5 = resolveEventStreamSerdeConfig(_config_4);
238-
const _config_6 = resolveHttpAuthSchemeConfig(_config_5);
239-
const _config_7 = resolveRuntimeExtensions(_config_6, configuration?.extensions || []);
240-
this.config = _config_7;
241-
=======
242-
let _config_1 = resolveClientEndpointParameters(_config_0);
243-
let _config_2 = resolveRetryConfig(_config_1);
244-
let _config_3 = resolveEndpointConfig(_config_2);
245-
let _config_4 = resolveEventStreamSerdeConfig(_config_3);
246-
let _config_5 = resolveHttpAuthSchemeConfig(_config_4);
247-
let _config_6 = resolveRuntimeExtensions(_config_5, configuration?.extensions || []);
235+
const _config_4 = resolveEventStreamSerdeConfig(_config_3);
236+
const _config_5 = resolveHttpAuthSchemeConfig(_config_4);
237+
const _config_6 = resolveRuntimeExtensions(_config_5, configuration?.extensions || []);
248238
this.config = _config_6;
249-
>>>>>>> 815c7a737 (chore: refactor code and add custom ruleset)
250239
this.middlewareStack.use(getRetryPlugin(this.config));
251240
this.middlewareStack.use(getContentLengthPlugin(this.config));
252241
this.middlewareStack.use(

private/my-local-model/src/endpoint/EndpointParameters.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export interface ClientInputEndpointParameters {
1313
nonConflictingParam?: string | undefined | Provider<string | undefined>;
1414
};
1515
endpoint?: string | Provider<string> | Endpoint | Provider<Endpoint> | EndpointV2 | Provider<EndpointV2>;
16+
apiKey?: string | undefined | Provider<string | undefined>;
1617
customParam?: string | undefined | Provider<string | undefined>;
1718
enableFeature?: boolean | undefined | Provider<boolean | undefined>;
1819
debugMode?: boolean | undefined | Provider<boolean | undefined>;
@@ -43,6 +44,9 @@ const clientContextParamDefaults = {
4344
enableFeature: true,
4445
} as const;
4546

47+
/**
48+
* @internal
49+
*/
4650
export const resolveClientEndpointParameters = <T>(
4751
options: T & ClientInputEndpointParameters
4852
): T & ClientResolvedEndpointParameters => {

private/smithy-rpcv2-cbor-schema/src/endpoint/EndpointParameters.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ export interface ClientInputEndpointParameters {
88
endpoint?: string | Provider<string> | Endpoint | Provider<Endpoint> | EndpointV2 | Provider<EndpointV2>;
99
}
1010

11-
/**
12-
* @public
13-
*/
1411
export type ClientResolvedEndpointParameters = Omit<ClientInputEndpointParameters, "endpoint"> & {
1512
defaultSigningName: string;
1613
};

private/smithy-rpcv2-cbor/src/endpoint/EndpointParameters.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ export interface ClientInputEndpointParameters {
88
endpoint?: string | Provider<string> | Endpoint | Provider<Endpoint> | EndpointV2 | Provider<EndpointV2>;
99
}
1010

11-
/**
12-
* @public
13-
*/
1411
export type ClientResolvedEndpointParameters = Omit<ClientInputEndpointParameters, "endpoint"> & {
1512
defaultSigningName: string;
1613
};

0 commit comments

Comments
 (0)