Skip to content

Commit

Permalink
armmarketplaceordering v1.2.0-beta.1 release (#21006)
Browse files Browse the repository at this point in the history
  • Loading branch information
jhendrixMSFT authored Jun 13, 2023
1 parent 1c74def commit 007d0de
Show file tree
Hide file tree
Showing 19 changed files with 820 additions and 97 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Release History

## 1.2.0-beta.1 (2023-06-13)

### Features Added

- Support for test fakes and OpenTelemetry trace spans.

## 1.1.0 (2023-03-31)
### Features Added

Expand All @@ -12,4 +18,4 @@ The package of `github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/marketplac

To migrate the existing applications to the latest version, please refer to [Migration Guide](https://aka.ms/azsdk/go/mgmt/migration).

To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/go/mgmt).
To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/go/mgmt).
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,31 @@ A client groups a set of related APIs, providing access to its functionality. C
client := clientFactory.NewMarketplaceAgreementsClient()
```

## Fakes
The `fake` package provides implementations for fake servers that can be used for testing.
To create a fake server, declare an instance of the required fake server type(s).
```go
myFakeMarketplaceAgreementsServer := fake.MarketplaceAgreementsServer{}
```
Next, provide func implementations for the methods you wish to fake.
The named return variables can be used to simplify return value construction.
```go
myFakeMarketplaceAgreementsServer.Get = func(ctx context.Context, offerType armmarketplaceordering.OfferType, publisherID string, offerID string, planID string, options *armmarketplaceordering.MarketplaceAgreementsClientGetOptions) (resp azfake.Responder[armmarketplaceordering.MarketplaceAgreementsClientGetResponse], errResp azfake.ErrorResponder) {
// TODO: resp.SetResponse(/* your fake MarketplaceAgreementsClientGetResponse response */)
return
}
```
You connect the fake server to a client instance during construction through the optional transport.
Use `NewTokenCredential()` from `azcore/fake` to obtain a fake credential.
```go
import azfake "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake"
client, err := armmarketplaceordering.NewMarketplaceAgreementsClient("subscriptionID", azfake.NewTokenCredential(), &arm.ClientOptions{
ClientOptions: azcore.ClientOptions{
Transport: fake.NewMarketplaceAgreementsServerTransport(&myFakeMarketplaceAgreementsServer),
},
})
```

## Provide Feedback

If you encounter bugs or have suggestions, please
Expand All @@ -82,4 +107,4 @@ This project has adopted the
For more information, see the
[Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)
or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any
additional questions or comments.
additional questions or comments.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ require:
- https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/marketplaceordering/resource-manager/readme.md
- https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/marketplaceordering/resource-manager/readme.go.md
license-header: MICROSOFT_MIT_NO_VERSION
module-version: 1.1.0

```
module: github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/marketplaceordering/armmarketplaceordering
module-version: 1.2.0-beta.1
azcore-version: 1.7.0-beta.2
generate-fakes: true
inject-spans: true
```
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
// Licensed under the MIT License. See License.txt in the project root for license information.

// This file enables 'go generate' to regenerate this specific SDK
//go:generate pwsh ../../../../eng/scripts/build.ps1 -skipBuild -cleanGenerated -format -tidy -generate resourcemanager/marketplaceordering/armmarketplaceordering
//go:generate pwsh ../../../../eng/scripts/build.ps1 -goExtension "@autorest/go@4.0.0-preview.51" -skipBuild -cleanGenerated -format -tidy -generate resourcemanager/marketplaceordering/armmarketplaceordering

package armmarketplaceordering

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 007d0de

Please sign in to comment.