From 35e8342ffe1d5a18ffee3d36bd495dd49d1f9b07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A1s=20Cs=C3=A1nyi?= Date: Thu, 25 Mar 2021 14:56:59 +0100 Subject: [PATCH] fix: add labels to examples (#97) * fix(activity tracker): add labels to example output * fix(case management): add labels to example output * fix(configuration governance): add spaces between "\n" and "%s" in printf methods for easier readability * fix(enterprise billing units): add labels to example output * fix(enterprise usage report): 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(iam 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 controller): 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(attracker): fix labels in example output * fix(case management): fix labels in example output * fix(configuration governance): fix labels in example output * fix(enterprise billing units): fix labels in example output * fix(enterprise usage reports): fix labels in example output * fix(global catalog): fix labels in example output * fix(global search): fix labels in example output * fix(global tagging): 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 controller): fix labels in example output * fix(resource manager): fix labels in example output * fix(usage metering): fix labels in example output * fix(usage reports): fix labels in example output * fix(user management): fix labels in example output * fix(configuration governance): fix build fail --- atrackerv1/atracker_v1_examples_test.go | 20 +++++------ .../case_management_v1_examples_test.go | 21 ++++++------ ...nfiguration_governance_v1_examples_test.go | 6 ++-- ...terprise_billing_units_v1_examples_test.go | 8 ++--- ...terprise_usage_reports_v1_examples_test.go | 2 +- .../global_catalog_v1_examples_test.go | 29 +++++++++------- .../global_search_v2_examples_test.go | 4 +-- .../global_tagging_v1_examples_test.go | 12 +++---- .../iam_access_groups_v2_examples_test.go | 34 +++++++++++-------- .../iam_identity_v1_examples_test.go | 28 +++++++++------ .../iam_policy_management_v1_examples_test.go | 18 +++++----- .../open_service_broker_v1_examples_test.go | 17 +++++----- .../resource_manager_v2_examples_test.go | 13 +++---- .../usage_metering_v4_examples_test.go | 2 +- .../usage_reports_v4_examples_test.go | 14 ++++---- .../user_management_v1_examples_test.go | 11 +++--- 16 files changed, 130 insertions(+), 109 deletions(-) diff --git a/atrackerv1/atracker_v1_examples_test.go b/atrackerv1/atracker_v1_examples_test.go index 45213fc5..59668b3b 100644 --- a/atrackerv1/atracker_v1_examples_test.go +++ b/atrackerv1/atracker_v1_examples_test.go @@ -115,7 +115,7 @@ var _ = Describe(`AtrackerV1 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(target, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nCreateTarget() result:\n%s\n", string(b)) // end-create_target @@ -136,7 +136,7 @@ var _ = Describe(`AtrackerV1 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(targetList, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nListTargets() result:\n%s\n", string(b)) // end-list_targets @@ -157,7 +157,7 @@ var _ = Describe(`AtrackerV1 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(target, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nGetTarget() result:\n%s\n", string(b)) // end-get_target @@ -188,7 +188,7 @@ var _ = Describe(`AtrackerV1 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(target, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nReplaceTarget() result:\n%s\n", string(b)) // end-replace_target @@ -215,7 +215,7 @@ var _ = Describe(`AtrackerV1 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(route, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nCreateRoute() result:\n%s\n", string(b)) // end-create_route @@ -236,7 +236,7 @@ var _ = Describe(`AtrackerV1 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(routeList, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nListRoutes() result:\n%s\n", string(b)) // end-list_routes @@ -257,7 +257,7 @@ var _ = Describe(`AtrackerV1 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(route, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nGetRoute() result:\n%s\n", string(b)) // end-get_route @@ -285,7 +285,7 @@ var _ = Describe(`AtrackerV1 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(route, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nReplaceRoute() result:\n%s\n", string(b)) // end-replace_route @@ -305,7 +305,7 @@ var _ = Describe(`AtrackerV1 Examples Tests`, func() { if err != nil { panic(err) } - + fmt.Printf("\nDeleteRoute() response status code: %d\n", response.StatusCode) // end-delete_route Expect(err).To(BeNil()) @@ -323,7 +323,7 @@ var _ = Describe(`AtrackerV1 Examples Tests`, func() { if err != nil { panic(err) } - + fmt.Printf("\nDeleteTarget() result status code: %d\n", response.StatusCode) // end-delete_target Expect(err).To(BeNil()) diff --git a/casemanagementv1/case_management_v1_examples_test.go b/casemanagementv1/case_management_v1_examples_test.go index 9fe599da..8f078a92 100644 --- a/casemanagementv1/case_management_v1_examples_test.go +++ b/casemanagementv1/case_management_v1_examples_test.go @@ -140,7 +140,7 @@ var _ = Describe(`CaseManagementV1 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(caseVar, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nCreateCase() result:\n%s\n", string(b)) // end-createCase @@ -172,7 +172,7 @@ var _ = Describe(`CaseManagementV1 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(caseVar, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nGetCase() result:\n%s\n", string(b)) // end-getCase @@ -195,7 +195,7 @@ var _ = Describe(`CaseManagementV1 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(caseList, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nGetCases() result:\n%s\n", string(b)) // end-getCases @@ -219,7 +219,7 @@ var _ = Describe(`CaseManagementV1 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(comment, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nAddComment() result:\n%s\n", string(b)) // end-addComment @@ -245,7 +245,7 @@ var _ = Describe(`CaseManagementV1 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(watchlistAddResponse, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nAddWatchlist() result:\n%s\n", string(b)) // end-addWatchlist @@ -271,7 +271,7 @@ var _ = Describe(`CaseManagementV1 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(watchlist, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nRemoveWatchlist() result:\n%s\n", string(b)) // end-removeWatchlist @@ -296,7 +296,7 @@ var _ = Describe(`CaseManagementV1 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(resource, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nAddResource() result:\n%s\n", string(b)) // end-addResource @@ -328,7 +328,7 @@ var _ = Describe(`CaseManagementV1 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(attachment, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nUploadFile() result:\n%s\n", string(b)) // end-uploadFile @@ -359,6 +359,7 @@ var _ = Describe(`CaseManagementV1 Examples Tests`, func() { buf := new(bytes.Buffer) buf.ReadFrom(result) + fmt.Println("\nDownloadFile() result:") fmt.Println("Attachment content-type: ", response.GetHeaders().Get("Content-Type")) fmt.Println("Attachment contents: ", buf.String()) } @@ -386,7 +387,7 @@ var _ = Describe(`CaseManagementV1 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(attachmentList, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nDeleteFile() result:\n%s\n", string(b)) // end-deleteFile @@ -416,7 +417,7 @@ var _ = Describe(`CaseManagementV1 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(caseVar, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nUpdateCaseStatus() result:\n%s\n", string(b)) // end-updateCaseStatus diff --git a/configurationgovernancev1/configuration_governance_v1_examples_test.go b/configurationgovernancev1/configuration_governance_v1_examples_test.go index c6de3bf4..fc3845f8 100644 --- a/configurationgovernancev1/configuration_governance_v1_examples_test.go +++ b/configurationgovernancev1/configuration_governance_v1_examples_test.go @@ -440,8 +440,7 @@ var _ = Describe(`ConfigurationGovernanceV1 Examples Tests`, func() { if err != nil { panic(err) } - b, _ := json.MarshalIndent(response, "", " ") - fmt.Printf("DeleteAttachment() response body:\n%s\n", string(b)) + fmt.Printf("DeleteAttachment() response status code: %d\n", response.StatusCode) // end-delete_attachment @@ -459,8 +458,7 @@ var _ = Describe(`ConfigurationGovernanceV1 Examples Tests`, func() { if err != nil { panic(err) } - b, _ := json.MarshalIndent(response, "", " ") - fmt.Printf("DeleteRule() response body:\n%s\n", string(b)) + fmt.Printf("DeleteRule() response status code: %d\n", response.StatusCode) // end-delete_rule diff --git a/enterprisebillingunitsv1/enterprise_billing_units_v1_examples_test.go b/enterprisebillingunitsv1/enterprise_billing_units_v1_examples_test.go index 06805199..eb3c4f4b 100644 --- a/enterprisebillingunitsv1/enterprise_billing_units_v1_examples_test.go +++ b/enterprisebillingunitsv1/enterprise_billing_units_v1_examples_test.go @@ -126,7 +126,7 @@ var _ = Describe(`EnterpriseBillingUnitsV1 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(billingUnit, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nGetBillingUnit() result:\n%s\n", string(b)) // end-get_billing_unit @@ -146,7 +146,7 @@ var _ = Describe(`EnterpriseBillingUnitsV1 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(billingUnitsList, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nListBillingUnits() result:\n%s\n", string(b)) // end-list_billing_units @@ -167,7 +167,7 @@ var _ = Describe(`EnterpriseBillingUnitsV1 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(billingOption, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nListBillingOptions() result:\n%s\n", string(b)) // end-list_billing_options @@ -188,7 +188,7 @@ var _ = Describe(`EnterpriseBillingUnitsV1 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(creditPoolsList, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nGetCreditPools() result:\n%s\n", string(b)) // end-get_credit_pools diff --git a/enterpriseusagereportsv1/enterprise_usage_reports_v1_examples_test.go b/enterpriseusagereportsv1/enterprise_usage_reports_v1_examples_test.go index 91de210b..679b7eec 100644 --- a/enterpriseusagereportsv1/enterprise_usage_reports_v1_examples_test.go +++ b/enterpriseusagereportsv1/enterprise_usage_reports_v1_examples_test.go @@ -134,7 +134,7 @@ var _ = Describe(`EnterpriseUsageReportsV1 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(reports, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nGetResourceUsageReport() result:\n%s\n", string(b)) // end-get_resource_usage_report diff --git a/globalcatalogv1/global_catalog_v1_examples_test.go b/globalcatalogv1/global_catalog_v1_examples_test.go index 593feaa0..2a30ec06 100644 --- a/globalcatalogv1/global_catalog_v1_examples_test.go +++ b/globalcatalogv1/global_catalog_v1_examples_test.go @@ -169,7 +169,7 @@ var _ = Describe(`GlobalCatalogV1 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(catalogEntry, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nCreateCatalogEntry() result:\n%s\n", string(b)) // end-create_catalog_entry @@ -193,7 +193,7 @@ var _ = Describe(`GlobalCatalogV1 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(catalogEntry, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nGetCatalogEntry() result:\n%s\n", string(b)) // end-get_catalog_entry @@ -258,7 +258,7 @@ var _ = Describe(`GlobalCatalogV1 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(catalogEntry, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nUpdateCatalogEntry() result:\n%s\n", string(b)) // end-update_catalog_entry @@ -281,7 +281,7 @@ var _ = Describe(`GlobalCatalogV1 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(entrySearchResult, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nListCatalogEntries() result:\n%s\n", string(b)) // end-list_catalog_entries @@ -308,7 +308,7 @@ var _ = Describe(`GlobalCatalogV1 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(entrySearchResult, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nGetChildObjects() result:\n%s\n", string(b)) // end-get_child_objects @@ -329,6 +329,7 @@ var _ = Describe(`GlobalCatalogV1 Examples Tests`, func() { if err != nil { panic(err) } + fmt.Printf("\nRestoreCatalogEntry() response status code: %d\n", response.StatusCode) // end-restore_catalog_entry @@ -350,7 +351,7 @@ var _ = Describe(`GlobalCatalogV1 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(visibility, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nGetVisibility() result:\n%s\n", string(b)) // end-get_visibility @@ -373,6 +374,7 @@ var _ = Describe(`GlobalCatalogV1 Examples Tests`, func() { if err != nil { fmt.Println("UpdateVisibility() returned the following error: ", err.Error()) } + fmt.Printf("\nUpdateVisibility() response status code: %d\n: ", response.StatusCode) // end-update_visibility @@ -393,7 +395,7 @@ var _ = Describe(`GlobalCatalogV1 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(pricingGet, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nGetPricing() result:\n%s\n", string(b)) // end-get_pricing @@ -418,7 +420,7 @@ var _ = Describe(`GlobalCatalogV1 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(auditSearchResult, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nGetAuditLogs() result:\n%s\n", string(b)) // end-get_audit_logs @@ -444,6 +446,7 @@ var _ = Describe(`GlobalCatalogV1 Examples Tests`, func() { if err != nil { panic(err) } + fmt.Printf("\nUploadArtifact() response status code: %d\n", response.StatusCode) // end-upload_artifact @@ -468,8 +471,9 @@ var _ = Describe(`GlobalCatalogV1 Examples Tests`, func() { defer result.Close() buf := new(bytes.Buffer) buf.ReadFrom(result) - fmt.Println("Artifact content-type: ", response.GetHeaders().Get("Content-Type")) - fmt.Println("Artifact contents: ", buf.String()) + fmt.Println("\nGetArtifact() result:") + fmt.Printf("Artifact content-type: %s \n", response.GetHeaders().Get("Content-Type")) + fmt.Printf("Artifact contents: %s \n", buf.String()) } // end-get_artifact @@ -492,7 +496,7 @@ var _ = Describe(`GlobalCatalogV1 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(artifacts, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nListArtifacts() result:\n%s\n", string(b)) // end-list_artifacts @@ -515,7 +519,7 @@ var _ = Describe(`GlobalCatalogV1 Examples Tests`, func() { if err != nil { panic(err) } - + fmt.Printf("\nDeleteArtifact() response status code: %d\n", response.StatusCode) // end-delete_artifact Expect(err).To(BeNil()) @@ -535,6 +539,7 @@ var _ = Describe(`GlobalCatalogV1 Examples Tests`, func() { if err != nil { panic(err) } + fmt.Printf("\nDeleteCatalogEntry() response status code: %d\n", response.StatusCode) // end-delete_catalog_entry diff --git a/globalsearchv2/global_search_v2_examples_test.go b/globalsearchv2/global_search_v2_examples_test.go index 1510ca56..40c0e149 100644 --- a/globalsearchv2/global_search_v2_examples_test.go +++ b/globalsearchv2/global_search_v2_examples_test.go @@ -117,7 +117,7 @@ var _ = Describe(`GlobalSearchV2 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(scanResult, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nSearch() result:\n%s\n", string(b)) // end-search @@ -136,7 +136,7 @@ var _ = Describe(`GlobalSearchV2 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(supportedTypesList, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nGetSupportedTypes() result:\n%s\n", string(b)) // end-get_supported_types diff --git a/globaltaggingv1/global_tagging_v1_examples_test.go b/globaltaggingv1/global_tagging_v1_examples_test.go index f666a371..47d2e766 100644 --- a/globaltaggingv1/global_tagging_v1_examples_test.go +++ b/globaltaggingv1/global_tagging_v1_examples_test.go @@ -124,7 +124,7 @@ var _ = Describe(`GlobalTaggingV1 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(createTagResults, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nCreateTag() result:\n%s\n", string(b)) // end-create_tag @@ -147,7 +147,7 @@ var _ = Describe(`GlobalTaggingV1 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(tagList, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nListTags() result:\n%s\n", string(b)) // end-list_tags @@ -173,7 +173,7 @@ var _ = Describe(`GlobalTaggingV1 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(tagResults, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nAttachTag() result:\n%s\n", string(b)) // end-attach_tag @@ -200,7 +200,7 @@ var _ = Describe(`GlobalTaggingV1 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(tagResults, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nDetachTag() result:\n%s\n", string(b)) // end-detach_tag @@ -220,7 +220,7 @@ var _ = Describe(`GlobalTaggingV1 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(deleteTagResults, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nDeleteTag() result:\n%s\n", string(b)) // end-delete_tag @@ -239,7 +239,7 @@ var _ = Describe(`GlobalTaggingV1 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(deleteTagsResult, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nDeleteTagAll() result:\n%s\n", string(b)) // end-delete_tag_all diff --git a/iamaccessgroupsv2/iam_access_groups_v2_examples_test.go b/iamaccessgroupsv2/iam_access_groups_v2_examples_test.go index 0c37902b..24939af7 100644 --- a/iamaccessgroupsv2/iam_access_groups_v2_examples_test.go +++ b/iamaccessgroupsv2/iam_access_groups_v2_examples_test.go @@ -123,7 +123,7 @@ var _ = Describe(`IamAccessGroupsV2 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(group, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nCreateAccessGroup() result:\n%s\n", string(b)) // end-create_access_group @@ -142,7 +142,7 @@ var _ = Describe(`IamAccessGroupsV2 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(group, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nGetAccessGroup() result:\n%s\n", string(b)) // end-get_access_group @@ -163,7 +163,7 @@ var _ = Describe(`IamAccessGroupsV2 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(group, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nUpdateAccessGroup() result:\n%s\n", string(b)) // end-update_access_group @@ -180,7 +180,7 @@ var _ = Describe(`IamAccessGroupsV2 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(groupsList, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nListAccessGroups() result:\n%s\n", string(b)) // end-list_access_groups @@ -208,7 +208,7 @@ var _ = Describe(`IamAccessGroupsV2 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(addGroupMembersResponse, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nAddMembersToAccessGroup() result:\n%s\n", string(b)) // end-add_members_to_access_group @@ -224,6 +224,7 @@ var _ = Describe(`IamAccessGroupsV2 Examples Tests`, func() { if err != nil { panic(err) } + fmt.Printf("\nIsMemberOfAccessGroup() response status code: %d\n", response.StatusCode) // end-is_member_of_access_group @@ -239,7 +240,7 @@ var _ = Describe(`IamAccessGroupsV2 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(groupMembersList, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nListAccessGroupMembers() result:\n%s\n", string(b)) // end-list_access_group_members @@ -255,6 +256,7 @@ var _ = Describe(`IamAccessGroupsV2 Examples Tests`, func() { if err != nil { panic(err) } + fmt.Printf("\nRemoveMemberFromAccessGroup() response status code: %d\n:", response.StatusCode) // end-remove_member_from_access_group @@ -271,7 +273,7 @@ var _ = Describe(`IamAccessGroupsV2 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(deleteGroupBulkMembersResponse, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nRemoveMembersFromAccessGroup() result:\n%s\n", string(b)) // end-remove_members_from_access_group @@ -290,7 +292,7 @@ var _ = Describe(`IamAccessGroupsV2 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(addMembershipMultipleGroupsResponse, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nAddMemberToMultipleAccessGroups() result:\n%s\n", string(b)) // end-add_member_to_multiple_access_groups @@ -307,7 +309,7 @@ var _ = Describe(`IamAccessGroupsV2 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(deleteFromAllGroupsResponse, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nRemoveMemberFromAllAccessGroups() result:\n%s\n", string(b)) // end-remove_member_from_all_access_groups @@ -335,7 +337,7 @@ var _ = Describe(`IamAccessGroupsV2 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(rule, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nAddAccessGroupRule() result:\n%s\n", string(b)) // end-add_access_group_rule @@ -354,7 +356,7 @@ var _ = Describe(`IamAccessGroupsV2 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(rule, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nGetAccessGroupRule() result:\n%s\n", string(b)) // end-get_access_group_rule @@ -386,7 +388,7 @@ var _ = Describe(`IamAccessGroupsV2 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(rule, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nReplaceAccessGroupRule() result:\n%s\n", string(b)) // end-replace_access_group_rule @@ -403,7 +405,7 @@ var _ = Describe(`IamAccessGroupsV2 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(rulesList, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nListAccessGroupRules() result:\n%s\n", string(b)) // end-list_access_group_rules @@ -420,6 +422,7 @@ var _ = Describe(`IamAccessGroupsV2 Examples Tests`, func() { if err != nil { panic(err) } + fmt.Printf("\nRemoveAccessGroupRule() response status code: %d\n", response.StatusCode) // end-remove_access_group_rule @@ -435,7 +438,7 @@ var _ = Describe(`IamAccessGroupsV2 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(accountSettings, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nGetAccountSettings() result:\n%s\n", string(b)) // end-get_account_settings @@ -455,7 +458,7 @@ var _ = Describe(`IamAccessGroupsV2 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(accountSettings, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nUpdateAccountSettings() result:\n%s\n", string(b)) // end-update_account_settings @@ -471,6 +474,7 @@ var _ = Describe(`IamAccessGroupsV2 Examples Tests`, func() { if err != nil { panic(err) } + fmt.Printf("\nDeleteAccessGroup() response status code: %d\n", response.StatusCode) // end-delete_access_group diff --git a/iamidentityv1/iam_identity_v1_examples_test.go b/iamidentityv1/iam_identity_v1_examples_test.go index b18f0d30..d96fe14d 100644 --- a/iamidentityv1/iam_identity_v1_examples_test.go +++ b/iamidentityv1/iam_identity_v1_examples_test.go @@ -151,7 +151,7 @@ var _ = Describe(`IamIdentityV1 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(apiKey, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nCreateAPIKey() result:\n%s\n", string(b)) apikeyID = *apiKey.ID // end-create_api_key @@ -174,7 +174,7 @@ var _ = Describe(`IamIdentityV1 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(apiKeyList, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nListAPIKeys() result:\n%s\n", string(b)) // end-list_api_keys @@ -194,7 +194,7 @@ var _ = Describe(`IamIdentityV1 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(apiKey, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nGetAPIKeysDetails() result:\n%s\n", string(b)) // end-get_api_keys_details @@ -213,7 +213,7 @@ var _ = Describe(`IamIdentityV1 Examples Tests`, func() { } apikeyEtag = response.GetHeaders().Get("Etag") b, _ := json.MarshalIndent(apiKey, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nGetAPIKey() result:\n%s\n", string(b)) // end-get_api_key @@ -233,7 +233,7 @@ var _ = Describe(`IamIdentityV1 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(apiKey, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nUpdateAPIKey() result:\n%s\n", string(b)) // end-update_api_key @@ -250,6 +250,7 @@ var _ = Describe(`IamIdentityV1 Examples Tests`, func() { if err != nil { panic(err) } + fmt.Printf("\nLockAPIKey() response status code: %d\n", response.StatusCode) // end-lock_api_key @@ -265,6 +266,7 @@ var _ = Describe(`IamIdentityV1 Examples Tests`, func() { if err != nil { panic(err) } + fmt.Printf("\nUnlockAPIKey() response status code: %d\n", response.StatusCode) // end-unlock_api_key @@ -280,6 +282,7 @@ var _ = Describe(`IamIdentityV1 Examples Tests`, func() { if err != nil { panic(err) } + fmt.Printf("\nDeleteAPIKey() response status code: %d\n", response.StatusCode) // end-delete_api_key @@ -298,7 +301,7 @@ var _ = Describe(`IamIdentityV1 Examples Tests`, func() { } svcID = *serviceID.ID b, _ := json.MarshalIndent(serviceID, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nCreateServiceID() result:\n%s\n", string(b)) // end-create_service_id @@ -318,7 +321,7 @@ var _ = Describe(`IamIdentityV1 Examples Tests`, func() { } svcIDEtag = response.GetHeaders().Get("Etag") b, _ := json.MarshalIndent(serviceID, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nGetServiceID() result:\n%s\n", string(b)) // end-get_service_id @@ -339,7 +342,7 @@ var _ = Describe(`IamIdentityV1 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(serviceIDList, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nListServiceIds() result:\n%s\n", string(b)) // end-list_service_ids @@ -358,7 +361,7 @@ var _ = Describe(`IamIdentityV1 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(serviceID, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nUpdateServiceID() result:\n%s\n", string(b)) // end-update_service_id @@ -375,6 +378,7 @@ var _ = Describe(`IamIdentityV1 Examples Tests`, func() { if err != nil { panic(err) } + fmt.Printf("\nLockServiceID() response status code: %d\n", response.StatusCode) // end-lock_service_id @@ -390,6 +394,7 @@ var _ = Describe(`IamIdentityV1 Examples Tests`, func() { if err != nil { panic(err) } + fmt.Printf("\nUnlockServiceID() response status code: %d\n", response.StatusCode) // end-unlock_service_id @@ -405,6 +410,7 @@ var _ = Describe(`IamIdentityV1 Examples Tests`, func() { if err != nil { panic(err) } + fmt.Printf("\nDeleteServiceID() response status code: %d\n", response.StatusCode) // end-delete_service_id @@ -421,7 +427,7 @@ var _ = Describe(`IamIdentityV1 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(accountSettingsResponse, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nGetAccountSettings() result:\n%s\n", string(b)) // end-getAccountSettings @@ -450,7 +456,7 @@ var _ = Describe(`IamIdentityV1 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(accountSettingsResponse, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nUpdateAccountSettings() result:\n%s\n", string(b)) // end-updateAccountSettings diff --git a/iampolicymanagementv1/iam_policy_management_v1_examples_test.go b/iampolicymanagementv1/iam_policy_management_v1_examples_test.go index e4c44e95..7b811294 100644 --- a/iampolicymanagementv1/iam_policy_management_v1_examples_test.go +++ b/iampolicymanagementv1/iam_policy_management_v1_examples_test.go @@ -161,7 +161,7 @@ var _ = Describe(`IamPolicyManagementV1 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(policy, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nCreatePolicy() result:\n%s\n", string(b)) // end-create_policy @@ -183,7 +183,7 @@ var _ = Describe(`IamPolicyManagementV1 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(policy, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nGetPolicy() result:\n%s\n", string(b)) // end-get_policy @@ -241,7 +241,7 @@ var _ = Describe(`IamPolicyManagementV1 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(policy, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nUpdatePolicy() result:\n%s\n", string(b)) // end-update_policy @@ -264,7 +264,7 @@ var _ = Describe(`IamPolicyManagementV1 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(policyList, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nListPolicies() result:\n%s\n", string(b)) // end-list_policies @@ -284,6 +284,7 @@ var _ = Describe(`IamPolicyManagementV1 Examples Tests`, func() { if err != nil { panic(err) } + fmt.Printf("\nDeletePolicy() response status code: %d\n", response.StatusCode) // end-delete_policy @@ -307,7 +308,7 @@ var _ = Describe(`IamPolicyManagementV1 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(customRole, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nCreateRole() result:\n%s\n", string(b)) // end-create_role @@ -329,7 +330,7 @@ var _ = Describe(`IamPolicyManagementV1 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(customRole, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nGetRole() result:\n%s\n", string(b)) // end-get_role @@ -356,7 +357,7 @@ var _ = Describe(`IamPolicyManagementV1 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(customRole, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nUpdateRole() result:\n%s\n", string(b)) // end-update_role @@ -376,7 +377,7 @@ var _ = Describe(`IamPolicyManagementV1 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(roleList, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nListRoles() result:\n%s\n", string(b)) // end-list_roles @@ -396,6 +397,7 @@ var _ = Describe(`IamPolicyManagementV1 Examples Tests`, func() { if err != nil { panic(err) } + fmt.Printf("\nDeleteRole() response status code: %d\n", response.StatusCode) // end-delete_role diff --git a/openservicebrokerv1/open_service_broker_v1_examples_test.go b/openservicebrokerv1/open_service_broker_v1_examples_test.go index 3a470007..ed019798 100644 --- a/openservicebrokerv1/open_service_broker_v1_examples_test.go +++ b/openservicebrokerv1/open_service_broker_v1_examples_test.go @@ -159,7 +159,7 @@ var _ = Describe(`OpenServiceBrokerV1 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(result, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nGetServiceInstanceState() result:\n%s\n", string(b)) // end-get_service_instance_state @@ -182,7 +182,7 @@ var _ = Describe(`OpenServiceBrokerV1 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(result, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nReplaceServiceInstanceState() result:\n%s\n", string(b)) // end-replace_service_instance_state @@ -218,7 +218,7 @@ var _ = Describe(`OpenServiceBrokerV1 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(result, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nReplaceServiceInstance() result:\n%s\n", string(b)) // end-replace_service_instance @@ -256,7 +256,7 @@ var _ = Describe(`OpenServiceBrokerV1 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(result, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nUpdateServiceInstance() result:\n%s\n", string(b)) // end-update_service_instance @@ -275,7 +275,7 @@ var _ = Describe(`OpenServiceBrokerV1 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(result, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nListCatalog() result:\n%s\n", string(b)) // end-list_catalog @@ -299,7 +299,7 @@ var _ = Describe(`OpenServiceBrokerV1 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(result, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nGetLastOperation() result:\n%s\n", string(b)) // end-get_last_operation @@ -333,7 +333,7 @@ var _ = Describe(`OpenServiceBrokerV1 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(result, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nReplaceServiceBinding() result:\n%s\n", string(b)) // end-replace_service_binding @@ -356,7 +356,7 @@ var _ = Describe(`OpenServiceBrokerV1 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(result, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nDeleteServiceInstance() result:\n%s\n", string(b)) // end-delete_service_instance @@ -379,6 +379,7 @@ var _ = Describe(`OpenServiceBrokerV1 Examples Tests`, func() { if err != nil { panic(err) } + fmt.Printf("\nDeleteServiceBinding() response status code: %d\n", response.StatusCode) // end-delete_service_binding diff --git a/resourcemanagerv2/resource_manager_v2_examples_test.go b/resourcemanagerv2/resource_manager_v2_examples_test.go index 435489e0..9a21e1a3 100644 --- a/resourcemanagerv2/resource_manager_v2_examples_test.go +++ b/resourcemanagerv2/resource_manager_v2_examples_test.go @@ -147,7 +147,7 @@ var _ = Describe(`ResourceManagerV2 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(resCreateResourceGroup, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nCreateResourceGroup() result:\n%s\n", string(b)) // end-create_resource_group @@ -171,7 +171,7 @@ var _ = Describe(`ResourceManagerV2 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(resourceGroup, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nGetResourceGroup() result:\n%s\n", string(b)) // end-get_resource_group @@ -195,7 +195,7 @@ var _ = Describe(`ResourceManagerV2 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(resourceGroup, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nUpdateResourceGroup() result:\n%s\n", string(b)) // end-update_resource_group @@ -217,7 +217,7 @@ var _ = Describe(`ResourceManagerV2 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(resourceGroupList, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nListResourceGroups() result:\n%s\n", string(b)) // end-list_resource_groups @@ -238,6 +238,7 @@ var _ = Describe(`ResourceManagerV2 Examples Tests`, func() { if err != nil { panic(err) } + fmt.Printf("\nDeleteResourceGroup() response status code: %d\n", response.StatusCode) // end-delete_resource_group @@ -258,7 +259,7 @@ var _ = Describe(`ResourceManagerV2 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(quotaDefinition, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nGetQuotaDefinition() result:\n%s\n", string(b)) // end-get_quota_definition @@ -276,7 +277,7 @@ var _ = Describe(`ResourceManagerV2 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(quotaDefinitionList, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nListQuotaDefinitions() result:\n%s\n", string(b)) // end-list_quota_definitions diff --git a/usagemeteringv4/usage_metering_v4_examples_test.go b/usagemeteringv4/usage_metering_v4_examples_test.go index 0e142538..67a806fa 100644 --- a/usagemeteringv4/usage_metering_v4_examples_test.go +++ b/usagemeteringv4/usage_metering_v4_examples_test.go @@ -154,7 +154,7 @@ var _ = Describe(`UsageMeteringV4 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(responseAccepted, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nReportResourceUsage() result:\n%s\n", string(b)) // end-report_resource_usage diff --git a/usagereportsv4/usage_reports_v4_examples_test.go b/usagereportsv4/usage_reports_v4_examples_test.go index 5d6e2769..cf6e11f1 100644 --- a/usagereportsv4/usage_reports_v4_examples_test.go +++ b/usagereportsv4/usage_reports_v4_examples_test.go @@ -136,7 +136,7 @@ var _ = Describe(`UsageReportsV4 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(accountSummary, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nGetAccountSummary() result:\n%s\n", string(b)) // end-get_account_summary @@ -157,7 +157,7 @@ var _ = Describe(`UsageReportsV4 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(accountUsage, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nGetAccountUsage() result:\n%s\n", string(b)) // end-get_account_usage @@ -179,7 +179,7 @@ var _ = Describe(`UsageReportsV4 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(resourceGroupUsage, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nGetResourceGroupUsage() result:\n%s\n", string(b)) // end-get_resource_group_usage @@ -201,7 +201,7 @@ var _ = Describe(`UsageReportsV4 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(orgUsage, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nGetOrgUsage() result:\n%s\n", string(b)) // end-get_org_usage @@ -222,7 +222,7 @@ var _ = Describe(`UsageReportsV4 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(instancesUsage, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nGetResourceUsageAccount() result:\n%s\n", string(b)) // end-get_resource_usage_account @@ -244,7 +244,7 @@ var _ = Describe(`UsageReportsV4 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(instancesUsage, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nGetResourceUsageResourceGroup() result:\n%s\n", string(b)) // end-get_resource_usage_resource_group @@ -266,7 +266,7 @@ var _ = Describe(`UsageReportsV4 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(instancesUsage, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nGetResourceUsageOrg() result:\n%s\n", string(b)) // end-get_resource_usage_org diff --git a/usermanagementv1/user_management_v1_examples_test.go b/usermanagementv1/user_management_v1_examples_test.go index 347d3cd0..60a784d8 100644 --- a/usermanagementv1/user_management_v1_examples_test.go +++ b/usermanagementv1/user_management_v1_examples_test.go @@ -172,7 +172,7 @@ var _ = Describe(`UserManagementV1 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(invitedUserList, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nInviteUsers() result:\n%s\n", string(b)) // end-invite_users @@ -201,7 +201,7 @@ var _ = Describe(`UserManagementV1 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(userList, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nListUsers() result:\n%s\n", string(b)) // end-list_users @@ -225,6 +225,7 @@ var _ = Describe(`UserManagementV1 Examples Tests`, func() { if err != nil { panic(err) } + fmt.Printf("\nRemoveUser() response status code: %d\n", response.StatusCode) // end-remove_user @@ -248,7 +249,7 @@ var _ = Describe(`UserManagementV1 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(userProfile, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nGetUserProfile() result:\n%s\n", string(b)) // end-get_user_profile @@ -273,6 +274,7 @@ var _ = Describe(`UserManagementV1 Examples Tests`, func() { if err != nil { panic(err) } + fmt.Printf("\nUpdateUserProfile() response status code: %d\n", response.StatusCode) // end-update_user_profile @@ -296,7 +298,7 @@ var _ = Describe(`UserManagementV1 Examples Tests`, func() { panic(err) } b, _ := json.MarshalIndent(userSettings, "", " ") - fmt.Println(string(b)) + fmt.Printf("\nGetUserSettings() result:\n%s\n", string(b)) // end-get_user_settings @@ -322,6 +324,7 @@ var _ = Describe(`UserManagementV1 Examples Tests`, func() { if err != nil { panic(err) } + fmt.Printf("\nUpdateUserSettings() response status code: %d\n", response.StatusCode) // end-update_user_settings