Skip to content

Commit 33caedb

Browse files
committed
Merge branches 'enewman/integration-test' and 'enewman/integration-test' of https://github.com/Azure/apiops-cli into enewman/integration-test
2 parents 5759256 + 6f28fc1 commit 33caedb

4 files changed

Lines changed: 6 additions & 7 deletions

File tree

src/services/override-merger.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export function applyOverrides(
5555
const wrappedOverride = { properties: overrideValues };
5656

5757
// Deep-merge the override into the resource JSON
58-
const result = deepMerge(json, wrappedOverride as Record<string, unknown>);
58+
const result = deepMerge(json, wrappedOverride);
5959

6060
logger.debug(
6161
`Applied overrides to ${descriptor.type} '${descriptor.nameParts.join('/')}'`,

src/services/product-publisher.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ async function publishProductAssociations(
125125
await client.putResource(context, assocDescriptor, {});
126126
logger.debug(`Created ${resourceType} association: ${productName}/${name}`);
127127
} catch (error) {
128-
logger.warn(`Failed to create ${resourceType} association ${productName}/${name}: ${error}`);
128+
logger.warn(`Failed to create ${resourceType} association ${productName}/${name}: ${String(error)}`);
129129
}
130130
}
131131
}
@@ -168,7 +168,7 @@ async function publishProductTags(
168168
await client.putResource(context, tagDescriptor, {});
169169
logger.debug(`Created ProductTag association: ${productName}/${tagName}`);
170170
} catch (error) {
171-
logger.warn(`Failed to create ProductTag association ${productName}/${tagName}: ${error}`);
171+
logger.warn(`Failed to create ProductTag association ${productName}/${tagName}: ${String(error)}`);
172172
}
173173
}
174174

tests/unit/services/api-product-extractor.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -502,6 +502,7 @@ describe('api-extractor', () => {
502502
if (type === ResourceType.GraphQLResolver) {
503503
throw new Error('Should not list resolvers for non-GraphQL API');
504504
}
505+
yield* [];
505506
});
506507
client.listResources = listResourcesSpy;
507508

tests/unit/services/extract-service.test.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,6 @@ describe('extract-service', () => {
299299
});
300300

301301
// Handle GatewayApi requests for the gateway
302-
const originalListResources = client.listResources;
303302
client.listResources = async function* (_ctx, type, parent?) {
304303
if (type === ResourceType.Gateway) {
305304
yield { name: 'gw-1', properties: {} };
@@ -318,7 +317,7 @@ describe('extract-service', () => {
318317
logLevel: LogLevel.INFO,
319318
};
320319

321-
const result = await runExtraction(client, store, config);
320+
await runExtraction(client, store, config);
322321

323322
expect(store.writeAssociation).toHaveBeenCalledWith(
324323
expect.anything(),
@@ -335,8 +334,7 @@ describe('extract-service', () => {
335334
],
336335
});
337336

338-
// eslint-disable-next-line require-yield
339-
client.listResources = async function* (_ctx, type, parent?) {
337+
client.listResources = async function* (_ctx, type, _parent?) {
340338
if (type === ResourceType.Gateway) {
341339
yield { name: 'gw-1', properties: {} };
342340
}

0 commit comments

Comments
 (0)