Skip to content

Commit

Permalink
fix: add labels to example output (#87)
Browse files Browse the repository at this point in the history
* fix(case management): add labels to example output

* fix(configuration governance): add labels to example output

* fix(enterprise billing units): add labels to example output

* fix(enterprise usage reports): add labels to example output

* fix(global catalog): add labels to example output

* fix(global search): add labels to example output

* fix(global tagging): add labels to example output

* fix(ima access groups): add labels to example output

* fix(iam identity): add labels to example output

* fix(iam policy management): add labels to example output

* fix(open service broker): add labels to example output

* fix(resource manager): add labels to example output

* fix(usage metering): add labels to example output

* fix(usage reports): add labels to example output

* fix(user management): add labels to example output

* fix(case management): fix output labels

* fix(global catalog): fix example output labels

* fix(resource controller): fix example output labels

* fix(configuration governance): fix labels in example output

* fix(global catalog): fix labels in example output

* fix(iam access groups): fix labels in example output

* fix(iam identity): fix labels in example output

* fix(iam policy management): fix labels in example output

* fix(open service broker): fix labels in example output

* fix(resource manager): fix labels in example output

* fix(user management): fix labels in example output
  • Loading branch information
Andras-Csanyi authored Mar 25, 2021
1 parent cccd58b commit 7cc8e2a
Show file tree
Hide file tree
Showing 16 changed files with 149 additions and 147 deletions.
21 changes: 11 additions & 10 deletions examples/case-management.v1.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ describe('CaseManagementV1', () => {
caseManagementService.createCase(params)
.then(res => {
caseNumber = res.result.number
console.log(JSON.stringify(res.result, null, 2));
console.log('createCase() result:\n' + JSON.stringify(res.result, null, 2));
})
.catch(err => {
console.warn(err)
Expand Down Expand Up @@ -133,7 +133,7 @@ describe('CaseManagementV1', () => {

caseManagementService.getCase(params)
.then(res => {
console.log(JSON.stringify(res.result, null, 2));
console.log('getCase() result:\n' + JSON.stringify(res.result, null, 2));
})
.catch(err => {
console.warn(err)
Expand Down Expand Up @@ -162,7 +162,7 @@ describe('CaseManagementV1', () => {

caseManagementService.getCases({})
.then(res => {
console.log(JSON.stringify(res.result, null, 2));
console.log('getCases() result:\n' + JSON.stringify(res.result, null, 2));
})
.catch(err => {
console.warn(err)
Expand Down Expand Up @@ -192,7 +192,7 @@ describe('CaseManagementV1', () => {

caseManagementService.addComment(params)
.then(res => {
console.log(JSON.stringify(res.result, null, 2));
console.log('addComment() result:\n' + JSON.stringify(res.result, null, 2));
})
.catch(err => {
console.warn(err)
Expand Down Expand Up @@ -225,7 +225,7 @@ describe('CaseManagementV1', () => {

caseManagementService.addWatchlist(params)
.then(res => {
console.log(JSON.stringify(res.result, null, 2));
console.log('addWatchlist() result:\n' + JSON.stringify(res.result, null, 2));
})
.catch(err => {
console.warn(err)
Expand Down Expand Up @@ -258,7 +258,7 @@ describe('CaseManagementV1', () => {

caseManagementService.removeWatchlist(params)
.then(res => {
console.log(JSON.stringify(res.result, null, 2));
console.log('removeWatchlist() result:\n' + JSON.stringify(res.result, null, 2));
})
.catch(err => {
console.warn(err)
Expand Down Expand Up @@ -289,7 +289,7 @@ describe('CaseManagementV1', () => {

caseManagementService.addResource(params)
.then(res => {
console.log(JSON.stringify(res.result, null, 2));
console.log('addResource() result:\n' + JSON.stringify(res.result, null, 2));
})
.catch(err => {
console.warn(err)
Expand Down Expand Up @@ -329,7 +329,7 @@ describe('CaseManagementV1', () => {
caseManagementService.uploadFile(params)
.then(res => {
attachmentId = res.result.id;
console.log(JSON.stringify(res.result, null, 2));
console.log('uploadFile() result:\n' + JSON.stringify(res.result, null, 2));
})
.catch(err => {
console.warn(err)
Expand Down Expand Up @@ -365,6 +365,7 @@ describe('CaseManagementV1', () => {
return streamToPromise(res.result);
})
.then(contents => {
console.log('downloadFile() result:\n');
console.log(`Attachment content-type: ${responseContentType}\nAttachment contents: ${contents}`);
})
.catch(err => {
Expand Down Expand Up @@ -395,7 +396,7 @@ describe('CaseManagementV1', () => {

caseManagementService.deleteFile(params)
.then(res => {
console.log(JSON.stringify(res.result, null, 2));
console.log('deleteFile() result:\n' + JSON.stringify(res.result, null, 2));
})
.catch(err => {
console.warn(err)
Expand Down Expand Up @@ -430,7 +431,7 @@ describe('CaseManagementV1', () => {

caseManagementService.updateCaseStatus(params)
.then(res => {
console.log(JSON.stringify(res.result, null, 2));
console.log('updateCaseStatus() result:\n' + JSON.stringify(res.result, null, 2));
})
.catch(err => {
console.warn(err)
Expand Down
20 changes: 10 additions & 10 deletions examples/configuration-governance.v1.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ describe('ConfigurationGovernanceV1', () => {
.then(res => {
const { result, status } = res;
if (status === 201) {
console.log(JSON.stringify(result, null, 2));
console.log('createRules() result:\n' + JSON.stringify(result, null, 2));
} else {
// some rules may have failed
for (rule of result.rules) {
Expand Down Expand Up @@ -138,7 +138,7 @@ describe('ConfigurationGovernanceV1', () => {

configurationGovernanceService.createAttachments(params)
.then(res => {
console.log(JSON.stringify(res.result, null, 2));
console.log('createAttachments() result:\n' + JSON.stringify(res.result, null, 2));
})
.catch(err => {
console.warn(err)
Expand Down Expand Up @@ -174,7 +174,7 @@ describe('ConfigurationGovernanceV1', () => {

configurationGovernanceService.getAttachment(params)
.then(res => {
console.log(JSON.stringify(res.result, null, 2));
console.log('getAttachment() result:\n' + JSON.stringify(res.result, null, 2));
})
.catch(err => {
console.warn(err)
Expand Down Expand Up @@ -208,7 +208,7 @@ describe('ConfigurationGovernanceV1', () => {

configurationGovernanceService.getRule(params)
.then(res => {
console.log(JSON.stringify(res.result, null, 2));
console.log('getRule() result:\n' + JSON.stringify(res.result, null, 2));
})
.catch(err => {
console.warn(err)
Expand All @@ -233,7 +233,7 @@ describe('ConfigurationGovernanceV1', () => {

configurationGovernanceService.listRules(params)
.then(res => {
console.log(JSON.stringify(res.result, null, 2));
console.log('listRules() result:\n' + JSON.stringify(res.result, null, 2));
})
.catch(err => {
console.warn(err)
Expand Down Expand Up @@ -267,7 +267,7 @@ describe('ConfigurationGovernanceV1', () => {

configurationGovernanceService.updateRule(params)
.then(res => {
console.log(JSON.stringify(res.result, null, 2));
console.log('updateRule() result:\n' + JSON.stringify(res.result, null, 2));
})
.catch(err => {
console.warn(err)
Expand All @@ -292,7 +292,7 @@ describe('ConfigurationGovernanceV1', () => {

configurationGovernanceService.listAttachments(params)
.then(res => {
console.log(JSON.stringify(res.result, null, 2));
console.log('listAttachments() result:\n' + JSON.stringify(res.result, null, 2));
})
.catch(err => {
console.warn(err)
Expand Down Expand Up @@ -322,7 +322,7 @@ describe('ConfigurationGovernanceV1', () => {

configurationGovernanceService.updateAttachment(params)
.then(res => {
console.log(JSON.stringify(res.result, null, 2));
console.log('updateAttachment() result:\n' + JSON.stringify(res.result, null, 2));
})
.catch(err => {
console.warn(err)
Expand All @@ -348,7 +348,7 @@ describe('ConfigurationGovernanceV1', () => {

configurationGovernanceService.deleteAttachment(params)
.then(res => {
console.log(JSON.stringify(res.result, null, 2));
console.log('deleteAttachment() response status code: ' + res.status);
})
.catch(err => {
console.warn(err)
Expand All @@ -373,7 +373,7 @@ describe('ConfigurationGovernanceV1', () => {

configurationGovernanceService.deleteRule(params)
.then(res => {
console.log(JSON.stringify(res.result, null, 2));
console.log('deleteRule() response status code: ' + res.status);
})
.catch(err => {
console.warn(err)
Expand Down
8 changes: 4 additions & 4 deletions examples/enterprise-billing-units.v1.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ describe('EnterpriseBillingUnitsV1', () => {

enterpriseBillingUnitsService.getBillingUnit(params)
.then(res => {
console.log(JSON.stringify(res.result, null, 2));
console.log('getBillingUnit() result:\n' + JSON.stringify(res.result, null, 2));
})
.catch(err => {
console.warn(err)
Expand All @@ -107,7 +107,7 @@ describe('EnterpriseBillingUnitsV1', () => {
};
enterpriseBillingUnitsService.listBillingUnits(params)
.then(res => {
console.log(JSON.stringify(res.result, null, 2));
console.log('listBillingUnits() result:\n' + JSON.stringify(res.result, null, 2));
})
.catch(err => {
console.warn(err)
Expand All @@ -133,7 +133,7 @@ describe('EnterpriseBillingUnitsV1', () => {

enterpriseBillingUnitsService.listBillingOptions(params)
.then(res => {
console.log(JSON.stringify(res.result, null, 2));
console.log('listBillingOptions() result:\n' + JSON.stringify(res.result, null, 2));
})
.catch(err => {
console.warn(err)
Expand All @@ -159,7 +159,7 @@ describe('EnterpriseBillingUnitsV1', () => {

enterpriseBillingUnitsService.getCreditPools(params)
.then(res => {
console.log(JSON.stringify(res.result, null, 2));
console.log('getCreditPools() result:\n' + JSON.stringify(res.result, null, 2));
})
.catch(err => {
console.warn(err)
Expand Down
2 changes: 1 addition & 1 deletion examples/enterprise-usage-reports.v1.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ describe('EnterpriseUsageReportsV1', () => {

enterpriseUsageReportsService.getResourceUsageReport(params)
.then(res => {
console.log(JSON.stringify(res.result, null, 2));
console.log('getResourceUsageReport() result:\n' + JSON.stringify(res.result, null, 2));
})
.catch(err => {
console.warn(err)
Expand Down
29 changes: 15 additions & 14 deletions examples/global-catalog.v1.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ describe('GlobalCatalogV1', () => {

globalCatalogService.createCatalogEntry(params)
.then(res => {
console.log(JSON.stringify(res.result, null, 2));
console.log('createCatalogEntry() result:\n' + JSON.stringify(res.result, null, 2));
})
.catch(err => {
console.warn(err)
Expand Down Expand Up @@ -148,7 +148,7 @@ describe('GlobalCatalogV1', () => {

globalCatalogService.getCatalogEntry(params)
.then(res => {
console.log(JSON.stringify(res.result, null, 2));
console.log('getCatalogEntry() result:\n' + JSON.stringify(res.result, null, 2));
})
.catch(err => {
console.warn(err)
Expand Down Expand Up @@ -209,7 +209,7 @@ describe('GlobalCatalogV1', () => {

globalCatalogService.updateCatalogEntry(params)
.then(res => {
console.log(JSON.stringify(res.result, null, 2));
console.log('updateCatalogEntry() result:\n' + JSON.stringify(res.result, null, 2));
})
.catch(err => {
console.warn(err)
Expand All @@ -236,7 +236,7 @@ describe('GlobalCatalogV1', () => {
};
globalCatalogService.listCatalogEntries(params)
.then(res => {
console.log(JSON.stringify(res.result, null, 2));
console.log('listCatalogEntries() result:\n' + JSON.stringify(res.result, null, 2));
})
.catch(err => {
console.warn(err)
Expand Down Expand Up @@ -268,7 +268,7 @@ describe('GlobalCatalogV1', () => {

globalCatalogService.getChildObjects(params)
.then(res => {
console.log(JSON.stringify(res.result, null, 2));
console.log('getChildObjects() result:\n' + JSON.stringify(res.result, null, 2));
})
.catch(err => {
console.warn(err)
Expand Down Expand Up @@ -296,7 +296,7 @@ describe('GlobalCatalogV1', () => {

globalCatalogService.restoreCatalogEntry(params)
.then(res => {
console.log(JSON.stringify(res, null, 2));
console.log('restoreCatalogEntry() response status code: ' + res.status);
})
.catch(err => {
console.warn(err)
Expand Down Expand Up @@ -324,7 +324,7 @@ describe('GlobalCatalogV1', () => {

globalCatalogService.getVisibility(params)
.then(res => {
console.log(JSON.stringify(res.result, null, 2));
console.log('getVisibility() result:\n' + JSON.stringify(res.result, null, 2));
})
.catch(err => {
console.warn(err)
Expand Down Expand Up @@ -353,7 +353,7 @@ describe('GlobalCatalogV1', () => {

globalCatalogService.updateVisibility(params)
.then(res => {
console.log(JSON.stringify(res.result, null, 2));
console.log('updateVisibility() response status code: ' + res.status);
})
.catch(err => {
console.log('updateVisibility() returned the following error: ' + err);
Expand Down Expand Up @@ -381,7 +381,7 @@ describe('GlobalCatalogV1', () => {

globalCatalogService.getPricing(params)
.then(res => {
console.log(JSON.stringify(res.result, null, 2));
console.log('getPricing() result:\n' + JSON.stringify(res.result, null, 2));
})
.catch(err => {
console.warn(err)
Expand Down Expand Up @@ -411,7 +411,7 @@ describe('GlobalCatalogV1', () => {

globalCatalogService.getAuditLogs(params)
.then(res => {
console.log(JSON.stringify(res.result, null, 2));
console.log('getAuditLogs() result:\n' + JSON.stringify(res.result, null, 2));
})
.catch(err => {
console.warn(err)
Expand Down Expand Up @@ -441,7 +441,7 @@ describe('GlobalCatalogV1', () => {

globalCatalogService.uploadArtifact(params)
.then(res => {
console.log(JSON.stringify(res, null, 2));
console.log('uploadArtifact() response status code: ' + res.status);
})
.catch(err => {
console.warn(err)
Expand Down Expand Up @@ -476,6 +476,7 @@ describe('GlobalCatalogV1', () => {
return streamToPromise(res.result);
})
.then(contents => {
console.log('getArtifact() result:\n');
console.log(`Artifact content type: ${responseContentType}\nArtifact contents: ${contents}`);
})
.catch(err => {
Expand Down Expand Up @@ -504,7 +505,7 @@ describe('GlobalCatalogV1', () => {

globalCatalogService.listArtifacts(params)
.then(res => {
console.log(JSON.stringify(res.result, null, 2));
console.log('listArtifacts() result:\n' + JSON.stringify(res.result, null, 2));
})
.catch(err => {
console.warn(err)
Expand Down Expand Up @@ -533,7 +534,7 @@ describe('GlobalCatalogV1', () => {

globalCatalogService.deleteArtifact(params)
.then(res => {
console.log(JSON.stringify(res, null, 2));
console.log('deleteArtifact() response status code: ' + res.status);
})
.catch(err => {
console.warn(err)
Expand Down Expand Up @@ -561,7 +562,7 @@ describe('GlobalCatalogV1', () => {

globalCatalogService.deleteCatalogEntry(params)
.then(res => {
console.log(JSON.stringify(res, null, 2));
console.log('deleteCatalogEntry() response status code: ' + res.status);
})
.catch(err => {
console.warn(err)
Expand Down
4 changes: 2 additions & 2 deletions examples/global-search.v2.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ describe('GlobalSearchV2', () => {

globalSearchService.search(params)
.then(res => {
console.log(JSON.stringify(res.result, null, 2));
console.log('search() result:\n' + JSON.stringify(res.result, null, 2));
})
.catch(err => {
console.warn(err)
Expand All @@ -104,7 +104,7 @@ describe('GlobalSearchV2', () => {

globalSearchService.getSupportedTypes({})
.then(res => {
console.log(JSON.stringify(res.result, null, 2));
console.log('getSupportedTypes() result:\n' + JSON.stringify(res.result, null, 2));
})
.catch(err => {
console.warn(err)
Expand Down
Loading

0 comments on commit 7cc8e2a

Please sign in to comment.