From 19da635a9fb42f482d41dd87b4894170cd7221c3 Mon Sep 17 00:00:00 2001 From: Christopher Scott Date: Mon, 5 Apr 2021 12:41:00 -0500 Subject: [PATCH 01/42] Initial generation of the aztables module (#14441) * initial generation --- sdk/tables/aztables/CHANGELOG.md | 3 + sdk/tables/aztables/LICENSE | 21 + sdk/tables/aztables/README.md | 145 +++ sdk/tables/aztables/ci.yml | 15 + sdk/tables/aztables/go.mod | 8 + sdk/tables/aztables/go.sum | 23 + .../shared_policy_shared_key_credential.go | 161 +++ sdk/tables/aztables/tableClient.go | 39 + sdk/tables/aztables/tableClient_test.go | 12 + sdk/tables/aztables/zc_client_options.go | 29 + sdk/tables/aztables/zt_test.go | 123 ++ .../aztables/zz_generated_connection.go | 73 ++ sdk/tables/aztables/zz_generated_constants.go | 73 ++ sdk/tables/aztables/zz_generated_models.go | 741 ++++++++++++ sdk/tables/aztables/zz_generated_service.go | 224 ++++ sdk/tables/aztables/zz_generated_table.go | 1004 +++++++++++++++++ .../aztables/zz_generated_time_rfc1123.go | 41 + .../aztables/zz_generated_time_rfc3339.go | 57 + 18 files changed, 2792 insertions(+) create mode 100644 sdk/tables/aztables/CHANGELOG.md create mode 100644 sdk/tables/aztables/LICENSE create mode 100644 sdk/tables/aztables/README.md create mode 100644 sdk/tables/aztables/ci.yml create mode 100644 sdk/tables/aztables/go.mod create mode 100644 sdk/tables/aztables/go.sum create mode 100644 sdk/tables/aztables/shared_policy_shared_key_credential.go create mode 100644 sdk/tables/aztables/tableClient.go create mode 100644 sdk/tables/aztables/tableClient_test.go create mode 100644 sdk/tables/aztables/zc_client_options.go create mode 100644 sdk/tables/aztables/zt_test.go create mode 100644 sdk/tables/aztables/zz_generated_connection.go create mode 100644 sdk/tables/aztables/zz_generated_constants.go create mode 100644 sdk/tables/aztables/zz_generated_models.go create mode 100644 sdk/tables/aztables/zz_generated_service.go create mode 100644 sdk/tables/aztables/zz_generated_table.go create mode 100644 sdk/tables/aztables/zz_generated_time_rfc1123.go create mode 100644 sdk/tables/aztables/zz_generated_time_rfc3339.go diff --git a/sdk/tables/aztables/CHANGELOG.md b/sdk/tables/aztables/CHANGELOG.md new file mode 100644 index 000000000000..b8c2e452d173 --- /dev/null +++ b/sdk/tables/aztables/CHANGELOG.md @@ -0,0 +1,3 @@ +# Release History + +## v0.1.0 (Unreleased) diff --git a/sdk/tables/aztables/LICENSE b/sdk/tables/aztables/LICENSE new file mode 100644 index 000000000000..d1ca00f20a89 --- /dev/null +++ b/sdk/tables/aztables/LICENSE @@ -0,0 +1,21 @@ + MIT License + + Copyright (c) Microsoft Corporation. All rights reserved. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE \ No newline at end of file diff --git a/sdk/tables/aztables/README.md b/sdk/tables/aztables/README.md new file mode 100644 index 000000000000..18eb9c67c656 --- /dev/null +++ b/sdk/tables/aztables/README.md @@ -0,0 +1,145 @@ +# Azure Tables client library for Go + +Azure Table storage is a service that stores large amounts of structured NoSQL data in the cloud, providing +a key/attribute store with a schema-less design. + +Azure Cosmos DB provides a Table API for applications that are written for Azure Table storage that need premium capabilities like: + +- Turnkey global distribution. +- Dedicated throughput worldwide. +- Single-digit millisecond latencies at the 99th percentile. +- Guaranteed high availability. +- Automatic secondary indexing. + +The Azure Tables client library can seamlessly target either Azure Table storage or Azure Cosmos DB table service endpoints with no code changes. + +## Getting started + +### Install the package +Install the Azure Tables client library for Go : + +### Prerequisites +* An [Azure subscription][azure_sub]. +* An existing Azure storage account or Azure Cosmos DB database with Azure Table API specified. + +If you need to create either of these, you can use the [Azure CLI][azure_cli]. + +#### Creating a storage account + +Create a storage account `mystorageaccount` in resource group `MyResourceGroup` +in the subscription `MySubscription` in the West US region. + + +#### Creating a Cosmos DB + +Create a Cosmos DB account `MyCosmosDBDatabaseAccount` in resource group `MyResourceGroup` +in the subscription `MySubscription` and a table named `MyTableName` in the account. + + +### Authenticate the Client + +Learn more about options for authentication _(including Connection Strings, Shared Key, and Shared Key Signatures)_ in our samples. + +## Key concepts + +- `TableServiceClient` - Client that provides methods to interact at the Table Service level such as creating, listing, and deleting tables +- `TableClient` - Client that provides methods to interact at an table entity level such as creating, querying, and deleting entities within a table. +- `Table` - Tables store data as collections of entities. +- `Entity` - Entities are similar to rows. An entity has a primary key and a set of properties. A property is a name value pair, similar to a column. + +Common uses of the Table service include: + +- Storing TBs of structured data capable of serving web scale applications +- Storing datasets that don't require complex joins, foreign keys, or stored procedures and can be de-normalized for fast access +- Quickly querying data using a clustered index +### Create the Table service client + +First, we need to construct a `TableServiceClient`. + +### Create an Azure table +Next, we can create a new table. + + +### Get an Azure table +The set of existing Azure tables can be queries using an OData filter. + + +### Delete an Azure table + +Individual tables can be deleted from the service. + + +### Create the Table client + +To interact with table entities, we must first construct a `TableClient`. + + +### Add table entities + +Let's define a new `TableEntity` so that we can add it to the table. + +Using the `TableClient` we can now add our new entity to the table. + + +### Query table entities + +To inspect the set of existing table entities, we can query the table using an OData filter. + + +If you prefer LINQ style query expressions, we can query the table using that syntax as well. + + +### Delete table entities + +If we no longer need our new table entity, it can be deleted. + + +## Troubleshooting + +When you interact with the Azure table library using the .NET SDK, errors returned by the service correspond to the same HTTP +status codes returned for [REST API][tables_rest] requests. + +For example, if you try to create a table that already exists, a `409` error is returned, indicating "Conflict". + + +### Setting up console logging + +The simplest way to see the logs is to enable the console logging. +To create an Azure SDK log listener that outputs messages to console use AzureEventSourceListener.CreateConsoleLogger method. + + +To learn more about other logging mechanisms see [here][logging]. + +## Next steps + +Get started with our [Table samples][table_client_samples]. + +## Known Issues + +A list of currently known issues relating to Cosmos DB table endpoints can be found [here](https://aka.ms/tablesknownissues). + +## Contributing + +This project welcomes contributions and suggestions. Most contributions require +you to agree to a Contributor License Agreement (CLA) declaring that you have +the right to, and actually do, grant us the rights to use your contribution. For +details, visit [cla.microsoft.com][cla]. + +This project has adopted the [Microsoft Open Source Code of Conduct][coc]. +For more information see the [Code of Conduct FAQ][coc_faq] or contact +[opencode@microsoft.com][coc_contact] with any additional questions or comments. + + +[tables_rest]: https://docs.microsoft.com/rest/api/storageservices/table-service-rest-api +[azure_cli]: https://docs.microsoft.com/cli/azure +[azure_sub]: https://azure.microsoft.com/free/ +[table_client_nuget_package]: https://www.nuget.org/packages?q=Azure.Data.Tables +[table_client_samples]: https://github\.com/Azure/azure-sdk-for-go +[table_client_src]: https://github\.com/Azure/azure-sdk-for-go +[logging]: https://github\.com/Azure/azure-sdk-for-go +[cla]: https://cla.microsoft.com +[coc]: https://opensource.microsoft.com/codeofconduct/ +[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ +[coc_contact]: mailto:opencode@microsoft.com + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-net%2Fsdk%2Ftables%2FAzure.Data.Tables%2FREADME.png) diff --git a/sdk/tables/aztables/ci.yml b/sdk/tables/aztables/ci.yml new file mode 100644 index 000000000000..900004ccf8bc --- /dev/null +++ b/sdk/tables/aztables/ci.yml @@ -0,0 +1,15 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. +trigger: + paths: + include: + - sdk/tables/aztables/ + +pr: + paths: + include: + - sdk/tables/aztables/ + +stages: +- template: ../../eng/pipelines/templates/jobs/archetype-sdk-client.yml + parameters: + ServiceDirectory: 'tables' \ No newline at end of file diff --git a/sdk/tables/aztables/go.mod b/sdk/tables/aztables/go.mod new file mode 100644 index 000000000000..a37066df4bb0 --- /dev/null +++ b/sdk/tables/aztables/go.mod @@ -0,0 +1,8 @@ +module github.com/Azure/azure-sdk-for-go/sdk/tables/aztables + +go 1.13 + +require ( + github.com/Azure/azure-sdk-for-go/sdk/azcore v0.14.1 + gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c +) diff --git a/sdk/tables/aztables/go.sum b/sdk/tables/aztables/go.sum new file mode 100644 index 000000000000..369497e547f8 --- /dev/null +++ b/sdk/tables/aztables/go.sum @@ -0,0 +1,23 @@ +github.com/Azure/azure-sdk-for-go/sdk/azcore v0.14.1 h1:7JdDsau2B5IZc0d0CPvSMn8DxJ3GRBxtFS7OrZPIJdA= +github.com/Azure/azure-sdk-for-go/sdk/azcore v0.14.1/go.mod h1:pElNP+u99BvCZD+0jOlhI9OC/NB2IDTOTGZOZH0Qhq8= +github.com/Azure/azure-sdk-for-go/sdk/internal v0.5.0 h1:HG1ggl8L3ZkV/Ydanf7lKr5kkhhPGCpWdnr1J6v7cO4= +github.com/Azure/azure-sdk-for-go/sdk/internal v0.5.0/go.mod h1:k4KbFSunV/+0hOHL1vyFaPsiYQ1Vmvy1TBpmtvCDLZM= +github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20201010224723-4f7140c49acb h1:mUVeFHoDKis5nxCAzoAi7E8Ghb86EXh/RK6wtvJIqRY= +golang.org/x/net v0.0.0-20201010224723-4f7140c49acb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= diff --git a/sdk/tables/aztables/shared_policy_shared_key_credential.go b/sdk/tables/aztables/shared_policy_shared_key_credential.go new file mode 100644 index 000000000000..88745e14f667 --- /dev/null +++ b/sdk/tables/aztables/shared_policy_shared_key_credential.go @@ -0,0 +1,161 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package aztables + +import ( + "bytes" + "crypto/hmac" + "crypto/sha256" + "encoding/base64" + "fmt" + "net/http" + "net/url" + "sort" + "strings" + "sync/atomic" + "time" + + "github.com/Azure/azure-sdk-for-go/sdk/azcore" +) + +// NewSharedKeyCredential creates an immutable SharedKeyCredential containing the +// storage account's name and either its primary or secondary key. +func NewSharedKeyCredential(accountName, accountKey string) (*SharedKeyCredential, error) { + c := SharedKeyCredential{accountName: accountName} + if err := c.SetAccountKey(accountKey); err != nil { + return nil, err + } + return &c, nil +} + +// SharedKeyCredential contains an account's name and its primary or secondary key. +// It is immutable making it shareable and goroutine-safe. +type SharedKeyCredential struct { + // Only the NewSharedKeyCredential method should set these; all other methods should treat them as read-only + accountName string + accountKey atomic.Value // []byte +} + +// AccountName returns the Storage account's name. +func (c *SharedKeyCredential) AccountName() string { + return c.accountName +} + +// SetAccountKey replaces the existing account key with the specified account key. +func (c *SharedKeyCredential) SetAccountKey(accountKey string) error { + bytes, err := base64.StdEncoding.DecodeString(accountKey) + if err != nil { + return fmt.Errorf("decode account key: %w", err) + } + c.accountKey.Store(bytes) + return nil +} + +// computeHMACSHA256 generates a hash signature for an HTTP request or for a SAS. +func (c *SharedKeyCredential) ComputeHMACSHA256(message string) (base64String string) { + h := hmac.New(sha256.New, c.accountKey.Load().([]byte)) + h.Write([]byte(message)) + return base64.StdEncoding.EncodeToString(h.Sum(nil)) +} + +func (c *SharedKeyCredential) buildStringToSign(req *http.Request) (string, error) { + // https://docs.microsoft.com/en-us/rest/api/storageservices/authentication-for-the-azure-storage-services + headers := req.Header + contentLength := headers.Get(azcore.HeaderContentLength) + if contentLength == "0" { + contentLength = "" + } + + canonicalizedResource, err := c.buildCanonicalizedResource(req.URL) + if err != nil { + return "", err + } + + stringToSign := strings.Join([]string{ + headers.Get(azcore.HeaderXmsDate), + canonicalizedResource, + }, "\n") + return stringToSign, nil +} + +func (c *SharedKeyCredential) buildCanonicalizedHeader(headers http.Header) string { + cm := map[string][]string{} + for k, v := range headers { + headerName := strings.TrimSpace(strings.ToLower(k)) + if strings.HasPrefix(headerName, "x-ms-") { + cm[headerName] = v // NOTE: the value must not have any whitespace around it. + } + } + if len(cm) == 0 { + return "" + } + + keys := make([]string, 0, len(cm)) + for key := range cm { + keys = append(keys, key) + } + sort.Strings(keys) + ch := bytes.NewBufferString("") + for i, key := range keys { + if i > 0 { + ch.WriteRune('\n') + } + ch.WriteString(key) + ch.WriteRune(':') + ch.WriteString(strings.Join(cm[key], ",")) + } + return string(ch.Bytes()) +} + +func (c *SharedKeyCredential) buildCanonicalizedResource(u *url.URL) (string, error) { + // https://docs.microsoft.com/en-us/rest/api/storageservices/authentication-for-the-azure-storage-services + cr := bytes.NewBufferString("/") + cr.WriteString(c.accountName) + + if len(u.Path) > 0 { + // Any portion of the CanonicalizedResource string that is derived from + // the resource's URI should be encoded exactly as it is in the URI. + // -- https://msdn.microsoft.com/en-gb/library/azure/dd179428.aspx + cr.WriteString(u.EscapedPath()) + } else { + // a slash is required to indicate the root path + cr.WriteString("/") + } + + // params is a map[string][]string; param name is key; params values is []string + params, err := url.ParseQuery(u.RawQuery) // Returns URL decoded values + if err != nil { + return "", fmt.Errorf("failed to parse query params: %w", err) + } + + if compVal, ok := params["comp"]; ok { + //do something here + cr.WriteString("?" + "comp=" + compVal[0]) + } + return string(cr.Bytes()), nil +} + +// AuthenticationPolicy implements the Credential interface on SharedKeyCredential. +func (c *SharedKeyCredential) AuthenticationPolicy(azcore.AuthenticationPolicyOptions) azcore.Policy { + return azcore.PolicyFunc(func(req *azcore.Request) (*azcore.Response, error) { + // Add a x-ms-date header if it doesn't already exist + if d := req.Request.Header.Get(azcore.HeaderXmsDate); d == "" { + req.Request.Header.Set(azcore.HeaderXmsDate, time.Now().UTC().Format(http.TimeFormat)) + } + stringToSign, err := c.buildStringToSign(req.Request) + if err != nil { + return nil, err + } + signature := c.ComputeHMACSHA256(stringToSign) + authHeader := strings.Join([]string{"SharedKeyLite ", c.AccountName(), ":", signature}, "") + req.Request.Header.Set(azcore.HeaderAuthorization, authHeader) + + response, err := req.Next() + if err != nil && response != nil && response.StatusCode == http.StatusForbidden { + // Service failed to authenticate request, log it + azcore.Log().Write(azcore.LogResponse, "===== HTTP Forbidden status, String-to-Sign:\n"+stringToSign+"\n===============================\n") + } + return response, err + }) +} diff --git a/sdk/tables/aztables/tableClient.go b/sdk/tables/aztables/tableClient.go new file mode 100644 index 000000000000..edc74ece6075 --- /dev/null +++ b/sdk/tables/aztables/tableClient.go @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package aztables + +import ( + "context" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" +) + +// A TableClient represents a URL to an Azure Storage blob; the blob may be a block blob, append blob, or page blob. +type TableClient struct { + client *tableClient + cred SharedKeyCredential +} + +// NewTableClient creates a TableClient object using the specified URL and request policy pipeline. +func NewTableClient(serviceURL string, cred azcore.Credential, options *TableClientOptions) (*TableClient, error) { + con := newConnection(serviceURL, cred, options.getConnectionOptions()) + + c, _ := cred.(*SharedKeyCredential) + + return &TableClient{client: &tableClient{con}, cred: *c}, nil +} + +// Create +func (t TableClient) Create(ctx context.Context, name string) (TableResponseResponse, error) { + resp, err := t.client.Create(ctx, TableProperties{&name}, nil, nil) + if resp == nil { + return TableResponseResponse{}, err + } else { + return resp.(TableResponseResponse), err + } +} + +// Delete +func (t TableClient) Delete(ctx context.Context, name string) (TableDeleteResponse, error) { + return t.client.Delete(ctx, name, nil) +} diff --git a/sdk/tables/aztables/tableClient_test.go b/sdk/tables/aztables/tableClient_test.go new file mode 100644 index 000000000000..0b76e48fd15d --- /dev/null +++ b/sdk/tables/aztables/tableClient_test.go @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package aztables + +import ( + chk "gopkg.in/check.v1" // go get gopkg.in/check.v1 +) + +func (s *aztestsSuite) TestContainerCreateAccessContainer(c *chk.C) { + // TODO +} diff --git a/sdk/tables/aztables/zc_client_options.go b/sdk/tables/aztables/zc_client_options.go new file mode 100644 index 000000000000..cf24278fd2d2 --- /dev/null +++ b/sdk/tables/aztables/zc_client_options.go @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package aztables + +import ( + "github.com/Azure/azure-sdk-for-go/sdk/azcore" +) + +type TableClientOptions struct { + // HTTPClient sets the transport for making HTTP requests. + HTTPClient azcore.Transport + // Retry configures the built-in retry policy behavior. + Retry azcore.RetryOptions + // Telemetry configures the built-in telemetry policy behavior. + Telemetry azcore.TelemetryOptions +} + +func (o *TableClientOptions) getConnectionOptions() *connectionOptions { + if o == nil { + return nil + } + + return &connectionOptions{ + HTTPClient: o.HTTPClient, + Retry: o.Retry, + Telemetry: o.Telemetry, + } +} \ No newline at end of file diff --git a/sdk/tables/aztables/zt_test.go b/sdk/tables/aztables/zt_test.go new file mode 100644 index 000000000000..c9e649bca203 --- /dev/null +++ b/sdk/tables/aztables/zt_test.go @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package aztables + +import ( + "context" + "errors" + "fmt" + "os" + "testing" + "time" + + chk "gopkg.in/check.v1" +) + +// For testing docs, see: https://labix.org/gocheck +// To test a specific test: go test -check.f MyTestSuite + +// Hookup to the testing framework +func Test(t *testing.T) { chk.TestingT(t) } + +type aztestsSuite struct{} + +var _ = chk.Suite(&aztestsSuite{}) + +const ( + storageAccountNameEnvVar = "TABLES_STORAGE_ACCOUNT_NAME" + cosmosAccountNameEnnVar = "TABLES_COSMOS_ACCOUNT_NAME" + accountKeyEnvVar = "TABLES_PRIMARY_STORAGE_ACCOUNT_KEY" + storageEndpointSuffixEnvVar = "STORAGE_ENDPOINT_SUFFIX" + cosmosEndpointSuffixEnvVar = "COSMOS_TABLES_ENDPOINT_SUFFIX" + storageAccountKeyEnvVar = "TABLES_PRIMARY_STORAGE_ACCOUNT_KEY" + cosmosAccountKeyEnvVar = "TABLES_PRIMARY_COSMOS_ACCOUNT_KEY" + tableNamePrefix = "gotable" + DefaultStorageSuffix = "core.windows.net" + DefaultCosmosSuffix = "cosmos.azure.com" +) + +type EndpointType string + +const ( + StorageEndpoint EndpointType = "storage" + CosmosEndpoint EndpointType = "cosmos" +) + +var ctx = context.Background() + +func getRequiredEnv(name string) string { + env, ok := os.LookupEnv(name) + if ok { + return env + } else { + panic("Required environment variable not set: " + name) + } +} + +func storageURI() string { + return "https://" + storageAccountName() + ".table." + storageEndpointSuffix() +} + +func cosmosURI() string { + return "https://" + cosmosAccountName() + ".table" + cosmosAccountName() +} + +func storageAccountName() string { + return getRequiredEnv(storageAccountNameEnvVar) +} + +func cosmosAccountName() string { + return getRequiredEnv(cosmosAccountNameEnnVar) +} + +func cosmosAccountKey() string { + return getRequiredEnv(cosmosAccountKeyEnvVar) +} + +func storageAccountKey() string { + return getRequiredEnv(storageAccountKeyEnvVar) +} + +func storageEndpointSuffix() string { + suffix, ok := os.LookupEnv(storageEndpointSuffixEnvVar) + if ok { + return suffix + } else { + return DefaultStorageSuffix + } +} + +func cosmosEndpointSuffix() string { + suffix, ok := os.LookupEnv(cosmosEndpointSuffix()) + if ok { + return suffix + } else { + return DefaultCosmosSuffix + } +} + +func createTableClient(endpointType EndpointType) (*TableClient, error) { + if endpointType == StorageEndpoint { + storageCred, _ := NewSharedKeyCredential(storageAccountName(), storageAccountKey()) + return NewTableClient(storageURI(), storageCred, nil) + } else { + cosmosCred, _ := NewSharedKeyCredential(cosmosAccountName(), cosmosAccountKey()) + return NewTableClient(cosmosURI(), cosmosCred, nil) + } +} + +func getGenericCredential(accountType string) (*SharedKeyCredential, error) { + + accountName, accountKey := getRequiredEnv(storageAccountNameEnvVar), getRequiredEnv(accountKeyEnvVar) + if accountName == "" || accountKey == "" { + return nil, errors.New(storageAccountNameEnvVar + " and/or " + accountKeyEnvVar + " environment variables not specified.") + } + return NewSharedKeyCredential(accountName, accountKey) +} + +func generateName() string { + currentTime := time.Now() + name := fmt.Sprintf("%s%d%d%d", tableNamePrefix, currentTime.Minute(), currentTime.Second(), currentTime.Nanosecond()) + return name +} diff --git a/sdk/tables/aztables/zz_generated_connection.go b/sdk/tables/aztables/zz_generated_connection.go new file mode 100644 index 000000000000..990122c2b6e3 --- /dev/null +++ b/sdk/tables/aztables/zz_generated_connection.go @@ -0,0 +1,73 @@ +// +build go1.13 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package aztables + +import ( + "fmt" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" +) + +const scope = "foo" +const telemetryInfo = "azsdk-go-tables/" +// connectionOptions contains configuration settings for the connection's pipeline. +// All zero-value fields will be initialized with their default values. +type connectionOptions struct { + // HTTPClient sets the transport for making HTTP requests. + HTTPClient azcore.Transport + // Retry configures the built-in retry policy behavior. + Retry azcore.RetryOptions + // Telemetry configures the built-in telemetry policy behavior. + Telemetry azcore.TelemetryOptions + // Logging configures the built-in logging policy behavior. + Logging azcore.LogOptions +} + +func (c *connectionOptions) telemetryOptions() *azcore.TelemetryOptions { + to := c.Telemetry + if to.Value == "" { + to.Value = telemetryInfo + } else { + to.Value = fmt.Sprintf("%s %s", telemetryInfo, to.Value) + } + return &to +} + +type connection struct { + u string + p azcore.Pipeline +} + +// newConnection creates an instance of the connection type with the specified endpoint. +// Pass nil to accept the default options; this is the same as passing a zero-value options. +func newConnection(endpoint string, cred azcore.Credential, options *connectionOptions) *connection { + if options == nil { + options = &connectionOptions{} + } + p := azcore.NewPipeline(options.HTTPClient, + azcore.NewTelemetryPolicy(options.telemetryOptions()), + azcore.NewRetryPolicy(&options.Retry), + cred.AuthenticationPolicy(azcore.AuthenticationPolicyOptions{Options: azcore.TokenRequestOptions{Scopes: []string{scope}}}), + azcore.NewLogPolicy(&options.Logging)) + return newConnectionWithPipeline(endpoint, p) +} + +// newConnectionWithPipeline creates an instance of the connection type with the specified endpoint and pipeline. +func newConnectionWithPipeline(endpoint string, p azcore.Pipeline) *connection { + return &connection{u: endpoint, p: p} +} + +// Endpoint returns the connection's endpoint. +func (c *connection) Endpoint() string { + return c.u +} + +// Pipeline returns the connection's pipeline. +func (c *connection) Pipeline() (azcore.Pipeline) { + return c.p +} + diff --git a/sdk/tables/aztables/zz_generated_constants.go b/sdk/tables/aztables/zz_generated_constants.go new file mode 100644 index 000000000000..f117e6efcbe9 --- /dev/null +++ b/sdk/tables/aztables/zz_generated_constants.go @@ -0,0 +1,73 @@ +// +build go1.13 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package aztables + +// GeoReplicationStatusType - The status of the secondary location. +type GeoReplicationStatusType string + +const ( + GeoReplicationStatusTypeBootstrap GeoReplicationStatusType = "bootstrap" + GeoReplicationStatusTypeLive GeoReplicationStatusType = "live" + GeoReplicationStatusTypeUnavailable GeoReplicationStatusType = "unavailable" +) + +// PossibleGeoReplicationStatusTypeValues returns the possible values for the GeoReplicationStatusType const type. +func PossibleGeoReplicationStatusTypeValues() []GeoReplicationStatusType { + return []GeoReplicationStatusType{ + GeoReplicationStatusTypeBootstrap, + GeoReplicationStatusTypeLive, + GeoReplicationStatusTypeUnavailable, + } +} + +// ToPtr() returns a *GeoReplicationStatusType pointing to the current value. +func (c GeoReplicationStatusType) ToPtr() *GeoReplicationStatusType { + return &c +} + +type OdataMetadataFormat string + +const ( + OdataMetadataFormatApplicationJSONOdataFullmetadata OdataMetadataFormat = "application/json;odata=fullmetadata" + OdataMetadataFormatApplicationJSONOdataMinimalmetadata OdataMetadataFormat = "application/json;odata=minimalmetadata" + OdataMetadataFormatApplicationJSONOdataNometadata OdataMetadataFormat = "application/json;odata=nometadata" +) + +// PossibleOdataMetadataFormatValues returns the possible values for the OdataMetadataFormat const type. +func PossibleOdataMetadataFormatValues() []OdataMetadataFormat { + return []OdataMetadataFormat{ + OdataMetadataFormatApplicationJSONOdataFullmetadata, + OdataMetadataFormatApplicationJSONOdataMinimalmetadata, + OdataMetadataFormatApplicationJSONOdataNometadata, + } +} + +// ToPtr() returns a *OdataMetadataFormat pointing to the current value. +func (c OdataMetadataFormat) ToPtr() *OdataMetadataFormat { + return &c +} + +type ResponseFormat string + +const ( + ResponseFormatReturnContent ResponseFormat = "return-content" + ResponseFormatReturnNoContent ResponseFormat = "return-no-content" +) + +// PossibleResponseFormatValues returns the possible values for the ResponseFormat const type. +func PossibleResponseFormatValues() []ResponseFormat { + return []ResponseFormat{ + ResponseFormatReturnContent, + ResponseFormatReturnNoContent, + } +} + +// ToPtr() returns a *ResponseFormat pointing to the current value. +func (c ResponseFormat) ToPtr() *ResponseFormat { + return &c +} diff --git a/sdk/tables/aztables/zz_generated_models.go b/sdk/tables/aztables/zz_generated_models.go new file mode 100644 index 000000000000..00bbe531834a --- /dev/null +++ b/sdk/tables/aztables/zz_generated_models.go @@ -0,0 +1,741 @@ +// +build go1.13 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package aztables + +import ( + "encoding/xml" + "fmt" + "net/http" + "time" +) + +// An Access policy. +type AccessPolicy struct { + // The datetime that the policy expires. + Expiry *time.Time `xml:"Expiry"` + + // The permissions for the acl policy. + Permission *string `xml:"Permission"` + + // The start datetime from which the policy is active. + Start *time.Time `xml:"Start"` +} + +// MarshalXML implements the xml.Marshaller interface for type AccessPolicy. +func (a AccessPolicy) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + type alias AccessPolicy + aux := &struct { + *alias + Expiry *timeRFC3339 `xml:"Expiry"` + Start *timeRFC3339 `xml:"Start"` + }{ + alias: (*alias)(&a), + Expiry: (*timeRFC3339)(a.Expiry), + Start: (*timeRFC3339)(a.Start), + } + return e.EncodeElement(aux, start) +} + +// UnmarshalXML implements the xml.Unmarshaller interface for type AccessPolicy. +func (a *AccessPolicy) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error { + type alias AccessPolicy + aux := &struct { + *alias + Expiry *timeRFC3339 `xml:"Expiry"` + Start *timeRFC3339 `xml:"Start"` + }{ + alias: (*alias)(a), + } + if err := d.DecodeElement(aux, &start); err != nil { + return err + } + a.Expiry = (*time.Time)(aux.Expiry) + a.Start = (*time.Time)(aux.Start) + return nil +} + +// CORS is an HTTP feature that enables a web application running under one domain to access resources in another domain. Web browsers implement a security +// restriction known as same-origin policy that +// prevents a web page from calling APIs in a different domain; CORS provides a secure way to allow one domain (the origin domain) to call APIs in another +// domain. +type CorsRule struct { + // The request headers that the origin domain may specify on the CORS request. + AllowedHeaders *string `xml:"AllowedHeaders"` + + // The methods (HTTP request verbs) that the origin domain may use for a CORS request. (comma separated) + AllowedMethods *string `xml:"AllowedMethods"` + + // The origin domains that are permitted to make a request against the service via CORS. The origin domain is the domain from which the request originates. + // Note that the origin must be an exact + // case-sensitive match with the origin that the user age sends to the service. You can also use the wildcard character '*' to allow all origin domains + // to make requests via CORS. + AllowedOrigins *string `xml:"AllowedOrigins"` + + // The response headers that may be sent in the response to the CORS request and exposed by the browser to the request issuer. + ExposedHeaders *string `xml:"ExposedHeaders"` + + // The maximum amount time that a browser should cache the preflight OPTIONS request. + MaxAgeInSeconds *int32 `xml:"MaxAgeInSeconds"` +} + +type GeoReplication struct { + // A GMT date/time value, to the second. All primary writes preceding this value are guaranteed to be available for read operations at the secondary. Primary + // writes after this point in time may or may + // not be available for reads. + LastSyncTime *time.Time `xml:"LastSyncTime"` + + // The status of the secondary location. + Status *GeoReplicationStatusType `xml:"Status"` +} + +// MarshalXML implements the xml.Marshaller interface for type GeoReplication. +func (g GeoReplication) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + type alias GeoReplication + aux := &struct { + *alias + LastSyncTime *timeRFC1123 `xml:"LastSyncTime"` + }{ + alias: (*alias)(&g), + LastSyncTime: (*timeRFC1123)(g.LastSyncTime), + } + return e.EncodeElement(aux, start) +} + +// UnmarshalXML implements the xml.Unmarshaller interface for type GeoReplication. +func (g *GeoReplication) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error { + type alias GeoReplication + aux := &struct { + *alias + LastSyncTime *timeRFC1123 `xml:"LastSyncTime"` + }{ + alias: (*alias)(g), + } + if err := d.DecodeElement(aux, &start); err != nil { + return err + } + g.LastSyncTime = (*time.Time)(aux.LastSyncTime) + return nil +} + +// Azure Analytics Logging settings. +type Logging struct { + // Indicates whether all delete requests should be logged. + Delete *bool `xml:"Delete"` + + // Indicates whether all read requests should be logged. + Read *bool `xml:"Read"` + + // The retention policy. + RetentionPolicy *RetentionPolicy `xml:"RetentionPolicy"` + + // The version of Analytics to configure. + Version *string `xml:"Version"` + + // Indicates whether all write requests should be logged. + Write *bool `xml:"Write"` +} + +// MapOfInterfaceResponse is the response envelope for operations that return a map[string]interface{} type. +type MapOfInterfaceResponse struct { + // ClientRequestID contains the information returned from the x-ms-client-request-id header response. + ClientRequestID *string + + // ContentType contains the information returned from the Content-Type header response. + ContentType *string + + // Date contains the information returned from the Date header response. + Date *time.Time + + // ETag contains the information returned from the ETag header response. + ETag *string + + // PreferenceApplied contains the information returned from the Preference-Applied header response. + PreferenceApplied *string + + // RawResponse contains the underlying HTTP response. + RawResponse *http.Response + + // RequestID contains the information returned from the x-ms-request-id header response. + RequestID *string + + // The other properties of the table entity. + Value map[string]interface{} + + // Version contains the information returned from the x-ms-version header response. + Version *string +} + +type Metrics struct { + // Indicates whether metrics are enabled for the Table service. + Enabled *bool `xml:"Enabled"` + + // Indicates whether metrics should generate summary statistics for called API operations. + IncludeAPIs *bool `xml:"IncludeAPIs"` + + // The retention policy. + RetentionPolicy *RetentionPolicy `xml:"RetentionPolicy"` + + // The version of Analytics to configure. + Version *string `xml:"Version"` +} + +// QueryOptions contains a group of parameters for the Table.Query method. +type QueryOptions struct { + // OData filter expression. + Filter *string + // Specifies the media type for the response. + Format *OdataMetadataFormat + // Select expression using OData notation. Limits the columns on each record to just those requested, e.g. "$select=PolicyAssignmentId, ResourceId". + Select *string + // Maximum number of records to return. + Top *int32 +} + +// The retention policy. +type RetentionPolicy struct { + // Indicates the number of days that metrics or logging or soft-deleted data should be retained. All data older than this value will be deleted. + Days *int32 `xml:"Days"` + + // Indicates whether a retention policy is enabled for the service. + Enabled *bool `xml:"Enabled"` +} + +// ServiceGetPropertiesOptions contains the optional parameters for the Service.GetProperties method. +type ServiceGetPropertiesOptions struct { + // Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when analytics logging is enabled. + RequestID *string + // The timeout parameter is expressed in seconds. + Timeout *int32 +} + +// ServiceGetStatisticsOptions contains the optional parameters for the Service.GetStatistics method. +type ServiceGetStatisticsOptions struct { + // Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when analytics logging is enabled. + RequestID *string + // The timeout parameter is expressed in seconds. + Timeout *int32 +} + +// ServiceSetPropertiesOptions contains the optional parameters for the Service.SetProperties method. +type ServiceSetPropertiesOptions struct { + // Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when analytics logging is enabled. + RequestID *string + // The timeout parameter is expressed in seconds. + Timeout *int32 +} + +// ServiceSetPropertiesResponse contains the response from method Service.SetProperties. +type ServiceSetPropertiesResponse struct { + // ClientRequestID contains the information returned from the x-ms-client-request-id header response. + ClientRequestID *string + + // RawResponse contains the underlying HTTP response. + RawResponse *http.Response + + // RequestID contains the information returned from the x-ms-request-id header response. + RequestID *string + + // Version contains the information returned from the x-ms-version header response. + Version *string +} + +// A signed identifier. +type SignedIdentifier struct { + // The access policy. + AccessPolicy *AccessPolicy `xml:"AccessPolicy"` + + // A unique id. + ID *string `xml:"Id"` +} + +// SignedIdentifierArrayResponse is the response envelope for operations that return a []SignedIdentifier type. +type SignedIdentifierArrayResponse struct { + // ClientRequestID contains the information returned from the x-ms-client-request-id header response. + ClientRequestID *string `xml:"ClientRequestID"` + + // Date contains the information returned from the Date header response. + Date *time.Time `xml:"Date"` + + // RawResponse contains the underlying HTTP response. + RawResponse *http.Response + + // RequestID contains the information returned from the x-ms-request-id header response. + RequestID *string `xml:"RequestID"` + + // A collection of signed identifiers. + SignedIdentifiers []SignedIdentifier `xml:"SignedIdentifier"` + + // Version contains the information returned from the x-ms-version header response. + Version *string `xml:"Version"` +} + +// TableCreateOptions contains the optional parameters for the Table.Create method. +type TableCreateOptions struct { + // Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when analytics logging is enabled. + RequestID *string + // Specifies whether the response should include the inserted entity in the payload. Possible values are return-no-content and return-content. + ResponsePreference *ResponseFormat +} + +// TableCreateResponse contains the response from method Table.Create. +type TableCreateResponse struct { + // ClientRequestID contains the information returned from the x-ms-client-request-id header response. + ClientRequestID *string + + // Date contains the information returned from the Date header response. + Date *time.Time + + // PreferenceApplied contains the information returned from the Preference-Applied header response. + PreferenceApplied *string + + // RawResponse contains the underlying HTTP response. + RawResponse *http.Response + + // RequestID contains the information returned from the x-ms-request-id header response. + RequestID *string + + // Version contains the information returned from the x-ms-version header response. + Version *string +} + +// TableDeleteEntityOptions contains the optional parameters for the Table.DeleteEntity method. +type TableDeleteEntityOptions struct { + // Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when analytics logging is enabled. + RequestID *string + // The timeout parameter is expressed in seconds. + Timeout *int32 +} + +// TableDeleteEntityResponse contains the response from method Table.DeleteEntity. +type TableDeleteEntityResponse struct { + // ClientRequestID contains the information returned from the x-ms-client-request-id header response. + ClientRequestID *string + + // Date contains the information returned from the Date header response. + Date *time.Time + + // RawResponse contains the underlying HTTP response. + RawResponse *http.Response + + // RequestID contains the information returned from the x-ms-request-id header response. + RequestID *string + + // Version contains the information returned from the x-ms-version header response. + Version *string +} + +// TableDeleteOptions contains the optional parameters for the Table.Delete method. +type TableDeleteOptions struct { + // Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when analytics logging is enabled. + RequestID *string +} + +// TableDeleteResponse contains the response from method Table.Delete. +type TableDeleteResponse struct { + // ClientRequestID contains the information returned from the x-ms-client-request-id header response. + ClientRequestID *string + + // Date contains the information returned from the Date header response. + Date *time.Time + + // RawResponse contains the underlying HTTP response. + RawResponse *http.Response + + // RequestID contains the information returned from the x-ms-request-id header response. + RequestID *string + + // Version contains the information returned from the x-ms-version header response. + Version *string +} + +// The properties for the table entity query response. +type TableEntityQueryResponse struct { + // The metadata response of the table. + OdataMetadata *string `json:"odata.metadata,omitempty"` + + // List of table entities. + Value *[]map[string]interface{} `json:"value,omitempty"` +} + +// TableEntityQueryResponseResponse is the response envelope for operations that return a TableEntityQueryResponse type. +type TableEntityQueryResponseResponse struct { + // ClientRequestID contains the information returned from the x-ms-client-request-id header response. + ClientRequestID *string + + // Date contains the information returned from the Date header response. + Date *time.Time + + // ETag contains the information returned from the ETag header response. + ETag *string + + // RawResponse contains the underlying HTTP response. + RawResponse *http.Response + + // RequestID contains the information returned from the x-ms-request-id header response. + RequestID *string + + // The properties for the table entity query response. + TableEntityQueryResponse *TableEntityQueryResponse + + // Version contains the information returned from the x-ms-version header response. + Version *string + + // XMSContinuationNextPartitionKey contains the information returned from the x-ms-continuation-NextPartitionKey header response. + XMSContinuationNextPartitionKey *string + + // XMSContinuationNextRowKey contains the information returned from the x-ms-continuation-NextRowKey header response. + XMSContinuationNextRowKey *string +} + +// TableGetAccessPolicyOptions contains the optional parameters for the Table.GetAccessPolicy method. +type TableGetAccessPolicyOptions struct { + // Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when analytics logging is enabled. + RequestID *string + // The timeout parameter is expressed in seconds. + Timeout *int32 +} + +// TableInsertEntityOptions contains the optional parameters for the Table.InsertEntity method. +type TableInsertEntityOptions struct { + // Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when analytics logging is enabled. + RequestID *string + // Specifies whether the response should include the inserted entity in the payload. Possible values are return-no-content and return-content. + ResponsePreference *ResponseFormat + // The properties for the table entity. + TableEntityProperties *map[string]interface{} + // The timeout parameter is expressed in seconds. + Timeout *int32 +} + +// TableInsertEntityResponse contains the response from method Table.InsertEntity. +type TableInsertEntityResponse struct { + // ClientRequestID contains the information returned from the x-ms-client-request-id header response. + ClientRequestID *string + + // ContentType contains the information returned from the Content-Type header response. + ContentType *string + + // Date contains the information returned from the Date header response. + Date *time.Time + + // ETag contains the information returned from the ETag header response. + ETag *string + + // PreferenceApplied contains the information returned from the Preference-Applied header response. + PreferenceApplied *string + + // RawResponse contains the underlying HTTP response. + RawResponse *http.Response + + // RequestID contains the information returned from the x-ms-request-id header response. + RequestID *string + + // Version contains the information returned from the x-ms-version header response. + Version *string +} + +// TableMergeEntityOptions contains the optional parameters for the Table.MergeEntity method. +type TableMergeEntityOptions struct { + // Match condition for an entity to be updated. If specified and a matching entity is not found, an error will be raised. To force an unconditional update, + // set to the wildcard character (*). If not specified, an insert will be performed when no existing entity is found to update and a merge will be performed + // if an existing entity is found. + IfMatch *string + // Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when analytics logging is enabled. + RequestID *string + // The properties for the table entity. + TableEntityProperties *map[string]interface{} + // The timeout parameter is expressed in seconds. + Timeout *int32 +} + +// TableMergeEntityResponse contains the response from method Table.MergeEntity. +type TableMergeEntityResponse struct { + // ClientRequestID contains the information returned from the x-ms-client-request-id header response. + ClientRequestID *string + + // Date contains the information returned from the Date header response. + Date *time.Time + + // ETag contains the information returned from the ETag header response. + ETag *string + + // RawResponse contains the underlying HTTP response. + RawResponse *http.Response + + // RequestID contains the information returned from the x-ms-request-id header response. + RequestID *string + + // Version contains the information returned from the x-ms-version header response. + Version *string +} + +// The properties for creating a table. +type TableProperties struct { + // The name of the table to create. + TableName *string `json:"TableName,omitempty"` +} + +// TableQueryEntitiesOptions contains the optional parameters for the Table.QueryEntities method. +type TableQueryEntitiesOptions struct { + // An entity query continuation token from a previous call. + NextPartitionKey *string + // An entity query continuation token from a previous call. + NextRowKey *string + // Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when analytics logging is enabled. + RequestID *string + // The timeout parameter is expressed in seconds. + Timeout *int32 +} + +// TableQueryEntitiesWithPartitionAndRowKeyOptions contains the optional parameters for the Table.QueryEntitiesWithPartitionAndRowKey method. +type TableQueryEntitiesWithPartitionAndRowKeyOptions struct { + // Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when analytics logging is enabled. + RequestID *string + // The timeout parameter is expressed in seconds. + Timeout *int32 +} + +// TableQueryOptions contains the optional parameters for the Table.Query method. +type TableQueryOptions struct { + // A table query continuation token from a previous call. + NextTableName *string + // Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when analytics logging is enabled. + RequestID *string +} + +// The properties for the table query response. +type TableQueryResponse struct { + // The metadata response of the table. + OdataMetadata *string `json:"odata.metadata,omitempty"` + + // List of tables. + Value *[]TableResponseProperties `json:"value,omitempty"` +} + +// TableQueryResponseResponse is the response envelope for operations that return a TableQueryResponse type. +type TableQueryResponseResponse struct { + // ClientRequestID contains the information returned from the x-ms-client-request-id header response. + ClientRequestID *string + + // Date contains the information returned from the Date header response. + Date *time.Time + + // RawResponse contains the underlying HTTP response. + RawResponse *http.Response + + // RequestID contains the information returned from the x-ms-request-id header response. + RequestID *string + + // The properties for the table query response. + TableQueryResponse *TableQueryResponse + + // Version contains the information returned from the x-ms-version header response. + Version *string + + // XMSContinuationNextTableName contains the information returned from the x-ms-continuation-NextTableName header response. + XMSContinuationNextTableName *string +} + +// The response for a single table. +type TableResponse struct { + TableResponseProperties + // The metadata response of the table. + OdataMetadata *string `json:"odata.metadata,omitempty"` +} + +// The properties for the table response. +type TableResponseProperties struct { + // The edit link of the table. + OdataEditLink *string `json:"odata.editLink,omitempty"` + + // The id of the table. + OdataID *string `json:"odata.id,omitempty"` + + // The odata type of the table. + OdataType *string `json:"odata.type,omitempty"` + + // The name of the table. + TableName *string `json:"TableName,omitempty"` +} + +// TableResponseResponse is the response envelope for operations that return a TableResponse type. +type TableResponseResponse struct { + // ClientRequestID contains the information returned from the x-ms-client-request-id header response. + ClientRequestID *string + + // Date contains the information returned from the Date header response. + Date *time.Time + + // PreferenceApplied contains the information returned from the Preference-Applied header response. + PreferenceApplied *string + + // RawResponse contains the underlying HTTP response. + RawResponse *http.Response + + // RequestID contains the information returned from the x-ms-request-id header response. + RequestID *string + + // The response for a single table. + TableResponse *TableResponse + + // Version contains the information returned from the x-ms-version header response. + Version *string +} + +// Table Service error. +type TableServiceError struct { + // The error message. + Message *string `json:"Message,omitempty"` +} + +// Error implements the error interface for type TableServiceError. +func (e TableServiceError) Error() string { + msg := "" + if e.Message != nil { + msg += fmt.Sprintf("Message: %v\n", *e.Message) + } + if msg == "" { + msg = "missing error info" + } + return msg +} + +// Table Service Properties. +type TableServiceProperties struct { + // The set of CORS rules. + Cors *[]CorsRule `xml:"Cors>CorsRule"` + + // A summary of request statistics grouped by API in hourly aggregates for tables. + HourMetrics *Metrics `xml:"HourMetrics"` + + // Azure Analytics Logging settings. + Logging *Logging `xml:"Logging"` + + // A summary of request statistics grouped by API in minute aggregates for tables. + MinuteMetrics *Metrics `xml:"MinuteMetrics"` +} + +// MarshalXML implements the xml.Marshaller interface for type TableServiceProperties. +func (t TableServiceProperties) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + start.Name.Local = "StorageServiceProperties" + type alias TableServiceProperties + aux := &struct { + *alias + }{ + alias: (*alias)(&t), + } + return e.EncodeElement(aux, start) +} + +// TableServicePropertiesResponse is the response envelope for operations that return a TableServiceProperties type. +type TableServicePropertiesResponse struct { + // ClientRequestID contains the information returned from the x-ms-client-request-id header response. + ClientRequestID *string `xml:"ClientRequestID"` + + // RawResponse contains the underlying HTTP response. + RawResponse *http.Response + + // RequestID contains the information returned from the x-ms-request-id header response. + RequestID *string `xml:"RequestID"` + + // Table Service Properties. + StorageServiceProperties *TableServiceProperties `xml:"StorageServiceProperties"` + + // Version contains the information returned from the x-ms-version header response. + Version *string `xml:"Version"` +} + +// Stats for the service. +type TableServiceStats struct { + // Geo-Replication information for the Secondary Storage Service. + GeoReplication *GeoReplication `xml:"GeoReplication"` +} + +// TableServiceStatsResponse is the response envelope for operations that return a TableServiceStats type. +type TableServiceStatsResponse struct { + // ClientRequestID contains the information returned from the x-ms-client-request-id header response. + ClientRequestID *string `xml:"ClientRequestID"` + + // Date contains the information returned from the Date header response. + Date *time.Time `xml:"Date"` + + // RawResponse contains the underlying HTTP response. + RawResponse *http.Response + + // RequestID contains the information returned from the x-ms-request-id header response. + RequestID *string `xml:"RequestID"` + + // Stats for the service. + StorageServiceStats *TableServiceStats `xml:"StorageServiceStats"` + + // Version contains the information returned from the x-ms-version header response. + Version *string `xml:"Version"` +} + +// TableSetAccessPolicyOptions contains the optional parameters for the Table.SetAccessPolicy method. +type TableSetAccessPolicyOptions struct { + // Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when analytics logging is enabled. + RequestID *string + // The acls for the table. + TableACL *[]SignedIdentifier + // The timeout parameter is expressed in seconds. + Timeout *int32 +} + +// TableSetAccessPolicyResponse contains the response from method Table.SetAccessPolicy. +type TableSetAccessPolicyResponse struct { + // ClientRequestID contains the information returned from the x-ms-client-request-id header response. + ClientRequestID *string + + // Date contains the information returned from the Date header response. + Date *time.Time + + // RawResponse contains the underlying HTTP response. + RawResponse *http.Response + + // RequestID contains the information returned from the x-ms-request-id header response. + RequestID *string + + // Version contains the information returned from the x-ms-version header response. + Version *string +} + +// TableUpdateEntityOptions contains the optional parameters for the Table.UpdateEntity method. +type TableUpdateEntityOptions struct { + // Match condition for an entity to be updated. If specified and a matching entity is not found, an error will be raised. To force an unconditional update, + // set to the wildcard character (*). If not specified, an insert will be performed when no existing entity is found to update and a replace will be performed + // if an existing entity is found. + IfMatch *string + // Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when analytics logging is enabled. + RequestID *string + // The properties for the table entity. + TableEntityProperties *map[string]interface{} + // The timeout parameter is expressed in seconds. + Timeout *int32 +} + +// TableUpdateEntityResponse contains the response from method Table.UpdateEntity. +type TableUpdateEntityResponse struct { + // ClientRequestID contains the information returned from the x-ms-client-request-id header response. + ClientRequestID *string + + // Date contains the information returned from the Date header response. + Date *time.Time + + // ETag contains the information returned from the ETag header response. + ETag *string + + // RawResponse contains the underlying HTTP response. + RawResponse *http.Response + + // RequestID contains the information returned from the x-ms-request-id header response. + RequestID *string + + // Version contains the information returned from the x-ms-version header response. + Version *string +} diff --git a/sdk/tables/aztables/zz_generated_service.go b/sdk/tables/aztables/zz_generated_service.go new file mode 100644 index 000000000000..182f446e1484 --- /dev/null +++ b/sdk/tables/aztables/zz_generated_service.go @@ -0,0 +1,224 @@ +// +build go1.13 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package aztables + +import ( + "context" + "net/http" + "strconv" + "time" + + "github.com/Azure/azure-sdk-for-go/sdk/azcore" +) + +type serviceClient struct { + con *connection +} + +// GetProperties - Gets the properties of an account's Table service, including properties for Analytics and CORS (Cross-Origin Resource Sharing) rules. +func (client *serviceClient) GetProperties(ctx context.Context, options *ServiceGetPropertiesOptions) (TableServicePropertiesResponse, error) { + req, err := client.getPropertiesCreateRequest(ctx, options) + if err != nil { + return TableServicePropertiesResponse{}, err + } + resp, err := client.con.Pipeline().Do(req) + if err != nil { + return TableServicePropertiesResponse{}, err + } + if !resp.HasStatusCode(http.StatusOK) { + return TableServicePropertiesResponse{}, client.getPropertiesHandleError(resp) + } + return client.getPropertiesHandleResponse(resp) +} + +// getPropertiesCreateRequest creates the GetProperties request. +func (client *serviceClient) getPropertiesCreateRequest(ctx context.Context, options *ServiceGetPropertiesOptions) (*azcore.Request, error) { + req, err := azcore.NewRequest(ctx, http.MethodGet, client.con.Endpoint()) + if err != nil { + return nil, err + } + req.Telemetry(telemetryInfo) + query := req.URL.Query() + query.Set("restype", "service") + query.Set("comp", "properties") + if options != nil && options.Timeout != nil { + query.Set("timeout", strconv.FormatInt(int64(*options.Timeout), 10)) + } + req.URL.RawQuery = query.Encode() + req.Header.Set("x-ms-version", "2019-02-02") + if options != nil && options.RequestID != nil { + req.Header.Set("x-ms-client-request-id", *options.RequestID) + } + req.Header.Set("Accept", "application/xml") + return req, nil +} + +// getPropertiesHandleResponse handles the GetProperties response. +func (client *serviceClient) getPropertiesHandleResponse(resp *azcore.Response) (TableServicePropertiesResponse, error) { + var val *TableServiceProperties + if err := resp.UnmarshalAsXML(&val); err != nil { + return TableServicePropertiesResponse{}, err + } + result := TableServicePropertiesResponse{RawResponse: resp.Response, StorageServiceProperties: val} + if val := resp.Header.Get("x-ms-client-request-id"); val != "" { + result.ClientRequestID = &val + } + if val := resp.Header.Get("x-ms-request-id"); val != "" { + result.RequestID = &val + } + if val := resp.Header.Get("x-ms-version"); val != "" { + result.Version = &val + } + return result, nil +} + +// getPropertiesHandleError handles the GetProperties error response. +func (client *serviceClient) getPropertiesHandleError(resp *azcore.Response) error { + var err TableServiceError + if err := resp.UnmarshalAsJSON(&err); err != nil { + return err + } + return azcore.NewResponseError(&err, resp.Response) +} + +// GetStatistics - Retrieves statistics related to replication for the Table service. It is only available on the secondary location endpoint when read-access +// geo-redundant replication is enabled for the account. +func (client *serviceClient) GetStatistics(ctx context.Context, options *ServiceGetStatisticsOptions) (TableServiceStatsResponse, error) { + req, err := client.getStatisticsCreateRequest(ctx, options) + if err != nil { + return TableServiceStatsResponse{}, err + } + resp, err := client.con.Pipeline().Do(req) + if err != nil { + return TableServiceStatsResponse{}, err + } + if !resp.HasStatusCode(http.StatusOK) { + return TableServiceStatsResponse{}, client.getStatisticsHandleError(resp) + } + return client.getStatisticsHandleResponse(resp) +} + +// getStatisticsCreateRequest creates the GetStatistics request. +func (client *serviceClient) getStatisticsCreateRequest(ctx context.Context, options *ServiceGetStatisticsOptions) (*azcore.Request, error) { + req, err := azcore.NewRequest(ctx, http.MethodGet, client.con.Endpoint()) + if err != nil { + return nil, err + } + req.Telemetry(telemetryInfo) + query := req.URL.Query() + query.Set("restype", "service") + query.Set("comp", "stats") + if options != nil && options.Timeout != nil { + query.Set("timeout", strconv.FormatInt(int64(*options.Timeout), 10)) + } + req.URL.RawQuery = query.Encode() + req.Header.Set("x-ms-version", "2019-02-02") + if options != nil && options.RequestID != nil { + req.Header.Set("x-ms-client-request-id", *options.RequestID) + } + req.Header.Set("Accept", "application/xml") + return req, nil +} + +// getStatisticsHandleResponse handles the GetStatistics response. +func (client *serviceClient) getStatisticsHandleResponse(resp *azcore.Response) (TableServiceStatsResponse, error) { + var val *TableServiceStats + if err := resp.UnmarshalAsXML(&val); err != nil { + return TableServiceStatsResponse{}, err + } + result := TableServiceStatsResponse{RawResponse: resp.Response, StorageServiceStats: val} + if val := resp.Header.Get("x-ms-client-request-id"); val != "" { + result.ClientRequestID = &val + } + if val := resp.Header.Get("x-ms-request-id"); val != "" { + result.RequestID = &val + } + if val := resp.Header.Get("x-ms-version"); val != "" { + result.Version = &val + } + if val := resp.Header.Get("Date"); val != "" { + date, err := time.Parse(time.RFC1123, val) + if err != nil { + return TableServiceStatsResponse{}, err + } + result.Date = &date + } + return result, nil +} + +// getStatisticsHandleError handles the GetStatistics error response. +func (client *serviceClient) getStatisticsHandleError(resp *azcore.Response) error { + var err TableServiceError + if err := resp.UnmarshalAsJSON(&err); err != nil { + return err + } + return azcore.NewResponseError(&err, resp.Response) +} + +// SetProperties - Sets properties for an account's Table service endpoint, including properties for Analytics and CORS (Cross-Origin Resource Sharing) +// rules. +func (client *serviceClient) SetProperties(ctx context.Context, tableServiceProperties TableServiceProperties, options *ServiceSetPropertiesOptions) (ServiceSetPropertiesResponse, error) { + req, err := client.setPropertiesCreateRequest(ctx, tableServiceProperties, options) + if err != nil { + return ServiceSetPropertiesResponse{}, err + } + resp, err := client.con.Pipeline().Do(req) + if err != nil { + return ServiceSetPropertiesResponse{}, err + } + if !resp.HasStatusCode(http.StatusAccepted) { + return ServiceSetPropertiesResponse{}, client.setPropertiesHandleError(resp) + } + return client.setPropertiesHandleResponse(resp) +} + +// setPropertiesCreateRequest creates the SetProperties request. +func (client *serviceClient) setPropertiesCreateRequest(ctx context.Context, tableServiceProperties TableServiceProperties, options *ServiceSetPropertiesOptions) (*azcore.Request, error) { + req, err := azcore.NewRequest(ctx, http.MethodPut, client.con.Endpoint()) + if err != nil { + return nil, err + } + req.Telemetry(telemetryInfo) + query := req.URL.Query() + query.Set("restype", "service") + query.Set("comp", "properties") + if options != nil && options.Timeout != nil { + query.Set("timeout", strconv.FormatInt(int64(*options.Timeout), 10)) + } + req.URL.RawQuery = query.Encode() + req.Header.Set("x-ms-version", "2019-02-02") + if options != nil && options.RequestID != nil { + req.Header.Set("x-ms-client-request-id", *options.RequestID) + } + req.Header.Set("Accept", "application/xml") + return req, req.MarshalAsXML(tableServiceProperties) +} + +// setPropertiesHandleResponse handles the SetProperties response. +func (client *serviceClient) setPropertiesHandleResponse(resp *azcore.Response) (ServiceSetPropertiesResponse, error) { + result := ServiceSetPropertiesResponse{RawResponse: resp.Response} + if val := resp.Header.Get("x-ms-client-request-id"); val != "" { + result.ClientRequestID = &val + } + if val := resp.Header.Get("x-ms-request-id"); val != "" { + result.RequestID = &val + } + if val := resp.Header.Get("x-ms-version"); val != "" { + result.Version = &val + } + return result, nil +} + +// setPropertiesHandleError handles the SetProperties error response. +func (client *serviceClient) setPropertiesHandleError(resp *azcore.Response) error { + var err TableServiceError + if err := resp.UnmarshalAsJSON(&err); err != nil { + return err + } + return azcore.NewResponseError(&err, resp.Response) +} diff --git a/sdk/tables/aztables/zz_generated_table.go b/sdk/tables/aztables/zz_generated_table.go new file mode 100644 index 000000000000..b7bf3cd8a88d --- /dev/null +++ b/sdk/tables/aztables/zz_generated_table.go @@ -0,0 +1,1004 @@ +// +build go1.13 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package aztables + +import ( + "context" + "encoding/xml" + "errors" + "fmt" + "io/ioutil" + "net/http" + "net/url" + "strconv" + "strings" + "time" + + "github.com/Azure/azure-sdk-for-go/sdk/azcore" +) + +type tableClient struct { + con *connection +} + +// Create - Creates a new table under the given account. +// Possible return types are *TableResponseResponse, *TableCreateResponse +func (client *tableClient) Create(ctx context.Context, tableProperties TableProperties, tableCreateOptions *TableCreateOptions, queryOptions *QueryOptions) (interface{}, error) { + req, err := client.createCreateRequest(ctx, tableProperties, tableCreateOptions, queryOptions) + if err != nil { + return nil, err + } + resp, err := client.con.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !resp.HasStatusCode(http.StatusCreated, http.StatusNoContent) { + return nil, client.createHandleError(resp) + } + return client.createHandleResponse(resp) +} + +// createCreateRequest creates the Create request. +func (client *tableClient) createCreateRequest(ctx context.Context, tableProperties TableProperties, tableCreateOptions *TableCreateOptions, queryOptions *QueryOptions) (*azcore.Request, error) { + urlPath := "/Tables" + req, err := azcore.NewRequest(ctx, http.MethodPost, azcore.JoinPaths(client.con.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + req.Telemetry(telemetryInfo) + query := req.URL.Query() + if queryOptions != nil && queryOptions.Format != nil { + query.Set("$format", string(*queryOptions.Format)) + } + req.URL.RawQuery = query.Encode() + req.Header.Set("x-ms-version", "2019-02-02") + if tableCreateOptions != nil && tableCreateOptions.RequestID != nil { + req.Header.Set("x-ms-client-request-id", *tableCreateOptions.RequestID) + } + req.Header.Set("DataServiceVersion", "3.0") + if tableCreateOptions != nil && tableCreateOptions.ResponsePreference != nil { + req.Header.Set("Prefer", string(*tableCreateOptions.ResponsePreference)) + } + req.Header.Set("Accept", "application/json;odata=minimalmetadata") + return req, req.MarshalAsJSON(tableProperties) +} + +// createHandleResponse handles the Create response. +func (client *tableClient) createHandleResponse(resp *azcore.Response) (interface{}, error) { + switch resp.StatusCode { + case http.StatusCreated: + var val *TableResponse + if err := resp.UnmarshalAsJSON(&val); err != nil { + return nil, err + } + result := TableResponseResponse{RawResponse: resp.Response, TableResponse: val} + if val := resp.Header.Get("x-ms-client-request-id"); val != "" { + result.ClientRequestID = &val + } + if val := resp.Header.Get("x-ms-request-id"); val != "" { + result.RequestID = &val + } + if val := resp.Header.Get("x-ms-version"); val != "" { + result.Version = &val + } + if val := resp.Header.Get("Date"); val != "" { + date, err := time.Parse(time.RFC1123, val) + if err != nil { + return TableResponseResponse{}, err + } + result.Date = &date + } + if val := resp.Header.Get("Preference-Applied"); val != "" { + result.PreferenceApplied = &val + } + return result, nil + case http.StatusNoContent: + result := TableCreateResponse{RawResponse: resp.Response} + if val := resp.Header.Get("x-ms-client-request-id"); val != "" { + result.ClientRequestID = &val + } + if val := resp.Header.Get("x-ms-request-id"); val != "" { + result.RequestID = &val + } + if val := resp.Header.Get("x-ms-version"); val != "" { + result.Version = &val + } + if val := resp.Header.Get("Date"); val != "" { + date, err := time.Parse(time.RFC1123, val) + if err != nil { + return TableCreateResponse{}, err + } + result.Date = &date + } + if val := resp.Header.Get("Preference-Applied"); val != "" { + result.PreferenceApplied = &val + } + return result, nil + default: + return nil, fmt.Errorf("unhandled HTTP status code %d", resp.StatusCode) + } +} + +// createHandleError handles the Create error response. +func (client *tableClient) createHandleError(resp *azcore.Response) error { + var err TableServiceError + if err := resp.UnmarshalAsJSON(&err); err != nil { + return err + } + return azcore.NewResponseError(&err, resp.Response) +} + +// Delete - Operation permanently deletes the specified table. +func (client *tableClient) Delete(ctx context.Context, table string, options *TableDeleteOptions) (TableDeleteResponse, error) { + req, err := client.deleteCreateRequest(ctx, table, options) + if err != nil { + return TableDeleteResponse{}, err + } + resp, err := client.con.Pipeline().Do(req) + if err != nil { + return TableDeleteResponse{}, err + } + if !resp.HasStatusCode(http.StatusNoContent) { + return TableDeleteResponse{}, client.deleteHandleError(resp) + } + return client.deleteHandleResponse(resp) +} + +// deleteCreateRequest creates the Delete request. +func (client *tableClient) deleteCreateRequest(ctx context.Context, table string, options *TableDeleteOptions) (*azcore.Request, error) { + urlPath := "/Tables('{table}')" + urlPath = strings.ReplaceAll(urlPath, "{table}", url.PathEscape(table)) + req, err := azcore.NewRequest(ctx, http.MethodDelete, azcore.JoinPaths(client.con.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + req.Telemetry(telemetryInfo) + req.Header.Set("x-ms-version", "2019-02-02") + if options != nil && options.RequestID != nil { + req.Header.Set("x-ms-client-request-id", *options.RequestID) + } + req.Header.Set("Accept", "application/json") + return req, nil +} + +// deleteHandleResponse handles the Delete response. +func (client *tableClient) deleteHandleResponse(resp *azcore.Response) (TableDeleteResponse, error) { + result := TableDeleteResponse{RawResponse: resp.Response} + if val := resp.Header.Get("x-ms-client-request-id"); val != "" { + result.ClientRequestID = &val + } + if val := resp.Header.Get("x-ms-request-id"); val != "" { + result.RequestID = &val + } + if val := resp.Header.Get("x-ms-version"); val != "" { + result.Version = &val + } + if val := resp.Header.Get("Date"); val != "" { + date, err := time.Parse(time.RFC1123, val) + if err != nil { + return TableDeleteResponse{}, err + } + result.Date = &date + } + return result, nil +} + +// deleteHandleError handles the Delete error response. +func (client *tableClient) deleteHandleError(resp *azcore.Response) error { + var err TableServiceError + if err := resp.UnmarshalAsJSON(&err); err != nil { + return err + } + return azcore.NewResponseError(&err, resp.Response) +} + +// DeleteEntity - Deletes the specified entity in a table. +func (client *tableClient) DeleteEntity(ctx context.Context, table string, partitionKey string, rowKey string, ifMatch string, tableDeleteEntityOptions *TableDeleteEntityOptions, queryOptions *QueryOptions) (TableDeleteEntityResponse, error) { + req, err := client.deleteEntityCreateRequest(ctx, table, partitionKey, rowKey, ifMatch, tableDeleteEntityOptions, queryOptions) + if err != nil { + return TableDeleteEntityResponse{}, err + } + resp, err := client.con.Pipeline().Do(req) + if err != nil { + return TableDeleteEntityResponse{}, err + } + if !resp.HasStatusCode(http.StatusNoContent) { + return TableDeleteEntityResponse{}, client.deleteEntityHandleError(resp) + } + return client.deleteEntityHandleResponse(resp) +} + +// deleteEntityCreateRequest creates the DeleteEntity request. +func (client *tableClient) deleteEntityCreateRequest(ctx context.Context, table string, partitionKey string, rowKey string, ifMatch string, tableDeleteEntityOptions *TableDeleteEntityOptions, queryOptions *QueryOptions) (*azcore.Request, error) { + urlPath := "/{table}(PartitionKey='{partitionKey}',RowKey='{rowKey}')" + urlPath = strings.ReplaceAll(urlPath, "{table}", url.PathEscape(table)) + urlPath = strings.ReplaceAll(urlPath, "{partitionKey}", url.PathEscape(partitionKey)) + urlPath = strings.ReplaceAll(urlPath, "{rowKey}", url.PathEscape(rowKey)) + req, err := azcore.NewRequest(ctx, http.MethodDelete, azcore.JoinPaths(client.con.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + req.Telemetry(telemetryInfo) + query := req.URL.Query() + if tableDeleteEntityOptions != nil && tableDeleteEntityOptions.Timeout != nil { + query.Set("timeout", strconv.FormatInt(int64(*tableDeleteEntityOptions.Timeout), 10)) + } + if queryOptions != nil && queryOptions.Format != nil { + query.Set("$format", string(*queryOptions.Format)) + } + req.URL.RawQuery = query.Encode() + req.Header.Set("x-ms-version", "2019-02-02") + if tableDeleteEntityOptions != nil && tableDeleteEntityOptions.RequestID != nil { + req.Header.Set("x-ms-client-request-id", *tableDeleteEntityOptions.RequestID) + } + req.Header.Set("DataServiceVersion", "3.0") + req.Header.Set("If-Match", ifMatch) + req.Header.Set("Accept", "application/json;odata=minimalmetadata") + return req, nil +} + +// deleteEntityHandleResponse handles the DeleteEntity response. +func (client *tableClient) deleteEntityHandleResponse(resp *azcore.Response) (TableDeleteEntityResponse, error) { + result := TableDeleteEntityResponse{RawResponse: resp.Response} + if val := resp.Header.Get("x-ms-client-request-id"); val != "" { + result.ClientRequestID = &val + } + if val := resp.Header.Get("x-ms-request-id"); val != "" { + result.RequestID = &val + } + if val := resp.Header.Get("x-ms-version"); val != "" { + result.Version = &val + } + if val := resp.Header.Get("Date"); val != "" { + date, err := time.Parse(time.RFC1123, val) + if err != nil { + return TableDeleteEntityResponse{}, err + } + result.Date = &date + } + return result, nil +} + +// deleteEntityHandleError handles the DeleteEntity error response. +func (client *tableClient) deleteEntityHandleError(resp *azcore.Response) error { + var err TableServiceError + if err := resp.UnmarshalAsJSON(&err); err != nil { + return err + } + return azcore.NewResponseError(&err, resp.Response) +} + +// GetAccessPolicy - Retrieves details about any stored access policies specified on the table that may be used with Shared Access Signatures. +func (client *tableClient) GetAccessPolicy(ctx context.Context, table string, options *TableGetAccessPolicyOptions) (SignedIdentifierArrayResponse, error) { + req, err := client.getAccessPolicyCreateRequest(ctx, table, options) + if err != nil { + return SignedIdentifierArrayResponse{}, err + } + resp, err := client.con.Pipeline().Do(req) + if err != nil { + return SignedIdentifierArrayResponse{}, err + } + if !resp.HasStatusCode(http.StatusOK) { + return SignedIdentifierArrayResponse{}, client.getAccessPolicyHandleError(resp) + } + return client.getAccessPolicyHandleResponse(resp) +} + +// getAccessPolicyCreateRequest creates the GetAccessPolicy request. +func (client *tableClient) getAccessPolicyCreateRequest(ctx context.Context, table string, options *TableGetAccessPolicyOptions) (*azcore.Request, error) { + urlPath := "/{table}" + urlPath = strings.ReplaceAll(urlPath, "{table}", url.PathEscape(table)) + req, err := azcore.NewRequest(ctx, http.MethodGet, azcore.JoinPaths(client.con.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + req.Telemetry(telemetryInfo) + query := req.URL.Query() + if options != nil && options.Timeout != nil { + query.Set("timeout", strconv.FormatInt(int64(*options.Timeout), 10)) + } + query.Set("comp", "acl") + req.URL.RawQuery = query.Encode() + req.Header.Set("x-ms-version", "2019-02-02") + if options != nil && options.RequestID != nil { + req.Header.Set("x-ms-client-request-id", *options.RequestID) + } + req.Header.Set("Accept", "application/xml") + return req, nil +} + +// getAccessPolicyHandleResponse handles the GetAccessPolicy response. +func (client *tableClient) getAccessPolicyHandleResponse(resp *azcore.Response) (SignedIdentifierArrayResponse, error) { + result := SignedIdentifierArrayResponse{RawResponse: resp.Response} + if err := resp.UnmarshalAsXML(&result); err != nil { + return SignedIdentifierArrayResponse{}, err + } + if val := resp.Header.Get("x-ms-client-request-id"); val != "" { + result.ClientRequestID = &val + } + if val := resp.Header.Get("x-ms-request-id"); val != "" { + result.RequestID = &val + } + if val := resp.Header.Get("x-ms-version"); val != "" { + result.Version = &val + } + if val := resp.Header.Get("Date"); val != "" { + date, err := time.Parse(time.RFC1123, val) + if err != nil { + return SignedIdentifierArrayResponse{}, err + } + result.Date = &date + } + return result, nil +} + +// getAccessPolicyHandleError handles the GetAccessPolicy error response. +func (client *tableClient) getAccessPolicyHandleError(resp *azcore.Response) error { + var err TableServiceError + if err := resp.UnmarshalAsJSON(&err); err != nil { + return err + } + return azcore.NewResponseError(&err, resp.Response) +} + +// InsertEntity - Insert entity in a table. +// Possible return types are *MapOfInterfaceResponse, *TableInsertEntityResponse +func (client *tableClient) InsertEntity(ctx context.Context, table string, tableInsertEntityOptions *TableInsertEntityOptions, queryOptions *QueryOptions) (interface{}, error) { + req, err := client.insertEntityCreateRequest(ctx, table, tableInsertEntityOptions, queryOptions) + if err != nil { + return nil, err + } + resp, err := client.con.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !resp.HasStatusCode(http.StatusCreated, http.StatusNoContent) { + return nil, client.insertEntityHandleError(resp) + } + return client.insertEntityHandleResponse(resp) +} + +// insertEntityCreateRequest creates the InsertEntity request. +func (client *tableClient) insertEntityCreateRequest(ctx context.Context, table string, tableInsertEntityOptions *TableInsertEntityOptions, queryOptions *QueryOptions) (*azcore.Request, error) { + urlPath := "/{table}" + urlPath = strings.ReplaceAll(urlPath, "{table}", url.PathEscape(table)) + req, err := azcore.NewRequest(ctx, http.MethodPost, azcore.JoinPaths(client.con.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + req.Telemetry(telemetryInfo) + query := req.URL.Query() + if tableInsertEntityOptions != nil && tableInsertEntityOptions.Timeout != nil { + query.Set("timeout", strconv.FormatInt(int64(*tableInsertEntityOptions.Timeout), 10)) + } + if queryOptions != nil && queryOptions.Format != nil { + query.Set("$format", string(*queryOptions.Format)) + } + req.URL.RawQuery = query.Encode() + req.Header.Set("x-ms-version", "2019-02-02") + if tableInsertEntityOptions != nil && tableInsertEntityOptions.RequestID != nil { + req.Header.Set("x-ms-client-request-id", *tableInsertEntityOptions.RequestID) + } + req.Header.Set("DataServiceVersion", "3.0") + if tableInsertEntityOptions != nil && tableInsertEntityOptions.ResponsePreference != nil { + req.Header.Set("Prefer", string(*tableInsertEntityOptions.ResponsePreference)) + } + req.Header.Set("Accept", "application/json;odata=minimalmetadata") + if tableInsertEntityOptions != nil { + return req, req.MarshalAsJSON(tableInsertEntityOptions.TableEntityProperties) + } + return req, nil +} + +// insertEntityHandleResponse handles the InsertEntity response. +func (client *tableClient) insertEntityHandleResponse(resp *azcore.Response) (interface{}, error) { + switch resp.StatusCode { + case http.StatusCreated: + var val map[string]interface{} + if err := resp.UnmarshalAsJSON(&val); err != nil { + return nil, err + } + result := MapOfInterfaceResponse{RawResponse: resp.Response, Value: val} + if val := resp.Header.Get("x-ms-client-request-id"); val != "" { + result.ClientRequestID = &val + } + if val := resp.Header.Get("x-ms-request-id"); val != "" { + result.RequestID = &val + } + if val := resp.Header.Get("x-ms-version"); val != "" { + result.Version = &val + } + if val := resp.Header.Get("Date"); val != "" { + date, err := time.Parse(time.RFC1123, val) + if err != nil { + return MapOfInterfaceResponse{}, err + } + result.Date = &date + } + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if val := resp.Header.Get("Preference-Applied"); val != "" { + result.PreferenceApplied = &val + } + if val := resp.Header.Get("Content-Type"); val != "" { + result.ContentType = &val + } + return result, nil + case http.StatusNoContent: + result := TableInsertEntityResponse{RawResponse: resp.Response} + if val := resp.Header.Get("x-ms-client-request-id"); val != "" { + result.ClientRequestID = &val + } + if val := resp.Header.Get("x-ms-request-id"); val != "" { + result.RequestID = &val + } + if val := resp.Header.Get("x-ms-version"); val != "" { + result.Version = &val + } + if val := resp.Header.Get("Date"); val != "" { + date, err := time.Parse(time.RFC1123, val) + if err != nil { + return TableInsertEntityResponse{}, err + } + result.Date = &date + } + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if val := resp.Header.Get("Preference-Applied"); val != "" { + result.PreferenceApplied = &val + } + if val := resp.Header.Get("Content-Type"); val != "" { + result.ContentType = &val + } + return result, nil + default: + return nil, fmt.Errorf("unhandled HTTP status code %d", resp.StatusCode) + } +} + +// insertEntityHandleError handles the InsertEntity error response. +func (client *tableClient) insertEntityHandleError(resp *azcore.Response) error { + var err TableServiceError + if err := resp.UnmarshalAsJSON(&err); err != nil { + return err + } + return azcore.NewResponseError(&err, resp.Response) +} + +// MergeEntity - Merge entity in a table. +func (client *tableClient) MergeEntity(ctx context.Context, table string, partitionKey string, rowKey string, tableMergeEntityOptions *TableMergeEntityOptions, queryOptions *QueryOptions) (TableMergeEntityResponse, error) { + req, err := client.mergeEntityCreateRequest(ctx, table, partitionKey, rowKey, tableMergeEntityOptions, queryOptions) + if err != nil { + return TableMergeEntityResponse{}, err + } + resp, err := client.con.Pipeline().Do(req) + if err != nil { + return TableMergeEntityResponse{}, err + } + if !resp.HasStatusCode(http.StatusNoContent) { + return TableMergeEntityResponse{}, client.mergeEntityHandleError(resp) + } + return client.mergeEntityHandleResponse(resp) +} + +// mergeEntityCreateRequest creates the MergeEntity request. +func (client *tableClient) mergeEntityCreateRequest(ctx context.Context, table string, partitionKey string, rowKey string, tableMergeEntityOptions *TableMergeEntityOptions, queryOptions *QueryOptions) (*azcore.Request, error) { + urlPath := "/{table}(PartitionKey='{partitionKey}',RowKey='{rowKey}')" + urlPath = strings.ReplaceAll(urlPath, "{table}", url.PathEscape(table)) + urlPath = strings.ReplaceAll(urlPath, "{partitionKey}", url.PathEscape(partitionKey)) + urlPath = strings.ReplaceAll(urlPath, "{rowKey}", url.PathEscape(rowKey)) + req, err := azcore.NewRequest(ctx, http.MethodPatch, azcore.JoinPaths(client.con.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + req.Telemetry(telemetryInfo) + query := req.URL.Query() + if tableMergeEntityOptions != nil && tableMergeEntityOptions.Timeout != nil { + query.Set("timeout", strconv.FormatInt(int64(*tableMergeEntityOptions.Timeout), 10)) + } + if queryOptions != nil && queryOptions.Format != nil { + query.Set("$format", string(*queryOptions.Format)) + } + req.URL.RawQuery = query.Encode() + req.Header.Set("x-ms-version", "2019-02-02") + if tableMergeEntityOptions != nil && tableMergeEntityOptions.RequestID != nil { + req.Header.Set("x-ms-client-request-id", *tableMergeEntityOptions.RequestID) + } + req.Header.Set("DataServiceVersion", "3.0") + if tableMergeEntityOptions != nil && tableMergeEntityOptions.IfMatch != nil { + req.Header.Set("If-Match", *tableMergeEntityOptions.IfMatch) + } + req.Header.Set("Accept", "application/json") + if tableMergeEntityOptions != nil { + return req, req.MarshalAsJSON(tableMergeEntityOptions.TableEntityProperties) + } + return req, nil +} + +// mergeEntityHandleResponse handles the MergeEntity response. +func (client *tableClient) mergeEntityHandleResponse(resp *azcore.Response) (TableMergeEntityResponse, error) { + result := TableMergeEntityResponse{RawResponse: resp.Response} + if val := resp.Header.Get("x-ms-client-request-id"); val != "" { + result.ClientRequestID = &val + } + if val := resp.Header.Get("x-ms-request-id"); val != "" { + result.RequestID = &val + } + if val := resp.Header.Get("x-ms-version"); val != "" { + result.Version = &val + } + if val := resp.Header.Get("Date"); val != "" { + date, err := time.Parse(time.RFC1123, val) + if err != nil { + return TableMergeEntityResponse{}, err + } + result.Date = &date + } + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + return result, nil +} + +// mergeEntityHandleError handles the MergeEntity error response. +func (client *tableClient) mergeEntityHandleError(resp *azcore.Response) error { + var err TableServiceError + if err := resp.UnmarshalAsJSON(&err); err != nil { + return err + } + return azcore.NewResponseError(&err, resp.Response) +} + +// Query - Queries tables under the given account. +func (client *tableClient) Query(ctx context.Context, tableQueryOptions *TableQueryOptions, queryOptions *QueryOptions) (TableQueryResponseResponse, error) { + req, err := client.queryCreateRequest(ctx, tableQueryOptions, queryOptions) + if err != nil { + return TableQueryResponseResponse{}, err + } + resp, err := client.con.Pipeline().Do(req) + if err != nil { + return TableQueryResponseResponse{}, err + } + if !resp.HasStatusCode(http.StatusOK) { + return TableQueryResponseResponse{}, client.queryHandleError(resp) + } + return client.queryHandleResponse(resp) +} + +// queryCreateRequest creates the Query request. +func (client *tableClient) queryCreateRequest(ctx context.Context, tableQueryOptions *TableQueryOptions, queryOptions *QueryOptions) (*azcore.Request, error) { + urlPath := "/Tables" + req, err := azcore.NewRequest(ctx, http.MethodGet, azcore.JoinPaths(client.con.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + req.Telemetry(telemetryInfo) + query := req.URL.Query() + if queryOptions != nil && queryOptions.Format != nil { + query.Set("$format", string(*queryOptions.Format)) + } + if queryOptions != nil && queryOptions.Top != nil { + query.Set("$top", strconv.FormatInt(int64(*queryOptions.Top), 10)) + } + if queryOptions != nil && queryOptions.Select != nil { + query.Set("$select", *queryOptions.Select) + } + if queryOptions != nil && queryOptions.Filter != nil { + query.Set("$filter", *queryOptions.Filter) + } + if tableQueryOptions != nil && tableQueryOptions.NextTableName != nil { + query.Set("NextTableName", *tableQueryOptions.NextTableName) + } + req.URL.RawQuery = query.Encode() + req.Header.Set("x-ms-version", "2019-02-02") + if tableQueryOptions != nil && tableQueryOptions.RequestID != nil { + req.Header.Set("x-ms-client-request-id", *tableQueryOptions.RequestID) + } + req.Header.Set("DataServiceVersion", "3.0") + req.Header.Set("Accept", "application/json;odata=minimalmetadata") + return req, nil +} + +// queryHandleResponse handles the Query response. +func (client *tableClient) queryHandleResponse(resp *azcore.Response) (TableQueryResponseResponse, error) { + var val *TableQueryResponse + if err := resp.UnmarshalAsJSON(&val); err != nil { + return TableQueryResponseResponse{}, err + } + result := TableQueryResponseResponse{RawResponse: resp.Response, TableQueryResponse: val} + if val := resp.Header.Get("x-ms-client-request-id"); val != "" { + result.ClientRequestID = &val + } + if val := resp.Header.Get("x-ms-request-id"); val != "" { + result.RequestID = &val + } + if val := resp.Header.Get("x-ms-version"); val != "" { + result.Version = &val + } + if val := resp.Header.Get("Date"); val != "" { + date, err := time.Parse(time.RFC1123, val) + if err != nil { + return TableQueryResponseResponse{}, err + } + result.Date = &date + } + if val := resp.Header.Get("x-ms-continuation-NextTableName"); val != "" { + result.XMSContinuationNextTableName = &val + } + return result, nil +} + +// queryHandleError handles the Query error response. +func (client *tableClient) queryHandleError(resp *azcore.Response) error { + body, err := ioutil.ReadAll(resp.Body) + if err != nil { + return fmt.Errorf("%s; failed to read response body: %w", resp.Status, err) + } + if len(body) == 0 { + return azcore.NewResponseError(errors.New(resp.Status), resp.Response) + } + return azcore.NewResponseError(errors.New(string(body)), resp.Response) +} + +// QueryEntities - Queries entities in a table. +func (client *tableClient) QueryEntities(ctx context.Context, table string, tableQueryEntitiesOptions *TableQueryEntitiesOptions, queryOptions *QueryOptions) (TableEntityQueryResponseResponse, error) { + req, err := client.queryEntitiesCreateRequest(ctx, table, tableQueryEntitiesOptions, queryOptions) + if err != nil { + return TableEntityQueryResponseResponse{}, err + } + resp, err := client.con.Pipeline().Do(req) + if err != nil { + return TableEntityQueryResponseResponse{}, err + } + if !resp.HasStatusCode(http.StatusOK) { + return TableEntityQueryResponseResponse{}, client.queryEntitiesHandleError(resp) + } + return client.queryEntitiesHandleResponse(resp) +} + +// queryEntitiesCreateRequest creates the QueryEntities request. +func (client *tableClient) queryEntitiesCreateRequest(ctx context.Context, table string, tableQueryEntitiesOptions *TableQueryEntitiesOptions, queryOptions *QueryOptions) (*azcore.Request, error) { + urlPath := "/{table}()" + urlPath = strings.ReplaceAll(urlPath, "{table}", url.PathEscape(table)) + req, err := azcore.NewRequest(ctx, http.MethodGet, azcore.JoinPaths(client.con.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + req.Telemetry(telemetryInfo) + query := req.URL.Query() + if tableQueryEntitiesOptions != nil && tableQueryEntitiesOptions.Timeout != nil { + query.Set("timeout", strconv.FormatInt(int64(*tableQueryEntitiesOptions.Timeout), 10)) + } + if queryOptions != nil && queryOptions.Format != nil { + query.Set("$format", string(*queryOptions.Format)) + } + if queryOptions != nil && queryOptions.Top != nil { + query.Set("$top", strconv.FormatInt(int64(*queryOptions.Top), 10)) + } + if queryOptions != nil && queryOptions.Select != nil { + query.Set("$select", *queryOptions.Select) + } + if queryOptions != nil && queryOptions.Filter != nil { + query.Set("$filter", *queryOptions.Filter) + } + if tableQueryEntitiesOptions != nil && tableQueryEntitiesOptions.NextPartitionKey != nil { + query.Set("NextPartitionKey", *tableQueryEntitiesOptions.NextPartitionKey) + } + if tableQueryEntitiesOptions != nil && tableQueryEntitiesOptions.NextRowKey != nil { + query.Set("NextRowKey", *tableQueryEntitiesOptions.NextRowKey) + } + req.URL.RawQuery = query.Encode() + req.Header.Set("x-ms-version", "2019-02-02") + if tableQueryEntitiesOptions != nil && tableQueryEntitiesOptions.RequestID != nil { + req.Header.Set("x-ms-client-request-id", *tableQueryEntitiesOptions.RequestID) + } + req.Header.Set("DataServiceVersion", "3.0") + req.Header.Set("Accept", "application/json;odata=minimalmetadata") + return req, nil +} + +// queryEntitiesHandleResponse handles the QueryEntities response. +func (client *tableClient) queryEntitiesHandleResponse(resp *azcore.Response) (TableEntityQueryResponseResponse, error) { + var val *TableEntityQueryResponse + if err := resp.UnmarshalAsJSON(&val); err != nil { + return TableEntityQueryResponseResponse{}, err + } + result := TableEntityQueryResponseResponse{RawResponse: resp.Response, TableEntityQueryResponse: val} + if val := resp.Header.Get("x-ms-client-request-id"); val != "" { + result.ClientRequestID = &val + } + if val := resp.Header.Get("x-ms-request-id"); val != "" { + result.RequestID = &val + } + if val := resp.Header.Get("x-ms-version"); val != "" { + result.Version = &val + } + if val := resp.Header.Get("Date"); val != "" { + date, err := time.Parse(time.RFC1123, val) + if err != nil { + return TableEntityQueryResponseResponse{}, err + } + result.Date = &date + } + if val := resp.Header.Get("x-ms-continuation-NextPartitionKey"); val != "" { + result.XMSContinuationNextPartitionKey = &val + } + if val := resp.Header.Get("x-ms-continuation-NextRowKey"); val != "" { + result.XMSContinuationNextRowKey = &val + } + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + return result, nil +} + +// queryEntitiesHandleError handles the QueryEntities error response. +func (client *tableClient) queryEntitiesHandleError(resp *azcore.Response) error { + var err TableServiceError + if err := resp.UnmarshalAsJSON(&err); err != nil { + return err + } + return azcore.NewResponseError(&err, resp.Response) +} + +// QueryEntitiesWithPartitionAndRowKey - Queries entities in a table. +func (client *tableClient) QueryEntitiesWithPartitionAndRowKey(ctx context.Context, table string, partitionKey string, rowKey string, tableQueryEntitiesWithPartitionAndRowKeyOptions *TableQueryEntitiesWithPartitionAndRowKeyOptions, queryOptions *QueryOptions) (TableEntityQueryResponseResponse, error) { + req, err := client.queryEntitiesWithPartitionAndRowKeyCreateRequest(ctx, table, partitionKey, rowKey, tableQueryEntitiesWithPartitionAndRowKeyOptions, queryOptions) + if err != nil { + return TableEntityQueryResponseResponse{}, err + } + resp, err := client.con.Pipeline().Do(req) + if err != nil { + return TableEntityQueryResponseResponse{}, err + } + if !resp.HasStatusCode(http.StatusOK) { + return TableEntityQueryResponseResponse{}, client.queryEntitiesWithPartitionAndRowKeyHandleError(resp) + } + return client.queryEntitiesWithPartitionAndRowKeyHandleResponse(resp) +} + +// queryEntitiesWithPartitionAndRowKeyCreateRequest creates the QueryEntitiesWithPartitionAndRowKey request. +func (client *tableClient) queryEntitiesWithPartitionAndRowKeyCreateRequest(ctx context.Context, table string, partitionKey string, rowKey string, tableQueryEntitiesWithPartitionAndRowKeyOptions *TableQueryEntitiesWithPartitionAndRowKeyOptions, queryOptions *QueryOptions) (*azcore.Request, error) { + urlPath := "/{table}(PartitionKey='{partitionKey}',RowKey='{rowKey}')" + urlPath = strings.ReplaceAll(urlPath, "{table}", url.PathEscape(table)) + urlPath = strings.ReplaceAll(urlPath, "{partitionKey}", url.PathEscape(partitionKey)) + urlPath = strings.ReplaceAll(urlPath, "{rowKey}", url.PathEscape(rowKey)) + req, err := azcore.NewRequest(ctx, http.MethodGet, azcore.JoinPaths(client.con.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + req.Telemetry(telemetryInfo) + query := req.URL.Query() + if tableQueryEntitiesWithPartitionAndRowKeyOptions != nil && tableQueryEntitiesWithPartitionAndRowKeyOptions.Timeout != nil { + query.Set("timeout", strconv.FormatInt(int64(*tableQueryEntitiesWithPartitionAndRowKeyOptions.Timeout), 10)) + } + if queryOptions != nil && queryOptions.Format != nil { + query.Set("$format", string(*queryOptions.Format)) + } + if queryOptions != nil && queryOptions.Select != nil { + query.Set("$select", *queryOptions.Select) + } + if queryOptions != nil && queryOptions.Filter != nil { + query.Set("$filter", *queryOptions.Filter) + } + req.URL.RawQuery = query.Encode() + req.Header.Set("x-ms-version", "2019-02-02") + if tableQueryEntitiesWithPartitionAndRowKeyOptions != nil && tableQueryEntitiesWithPartitionAndRowKeyOptions.RequestID != nil { + req.Header.Set("x-ms-client-request-id", *tableQueryEntitiesWithPartitionAndRowKeyOptions.RequestID) + } + req.Header.Set("DataServiceVersion", "3.0") + req.Header.Set("Accept", "application/json;odata=minimalmetadata") + return req, nil +} + +// queryEntitiesWithPartitionAndRowKeyHandleResponse handles the QueryEntitiesWithPartitionAndRowKey response. +func (client *tableClient) queryEntitiesWithPartitionAndRowKeyHandleResponse(resp *azcore.Response) (TableEntityQueryResponseResponse, error) { + var val *TableEntityQueryResponse + if err := resp.UnmarshalAsJSON(&val); err != nil { + return TableEntityQueryResponseResponse{}, err + } + result := TableEntityQueryResponseResponse{RawResponse: resp.Response, TableEntityQueryResponse: val} + if val := resp.Header.Get("x-ms-client-request-id"); val != "" { + result.ClientRequestID = &val + } + if val := resp.Header.Get("x-ms-request-id"); val != "" { + result.RequestID = &val + } + if val := resp.Header.Get("x-ms-version"); val != "" { + result.Version = &val + } + if val := resp.Header.Get("Date"); val != "" { + date, err := time.Parse(time.RFC1123, val) + if err != nil { + return TableEntityQueryResponseResponse{}, err + } + result.Date = &date + } + if val := resp.Header.Get("x-ms-continuation-NextPartitionKey"); val != "" { + result.XMSContinuationNextPartitionKey = &val + } + if val := resp.Header.Get("x-ms-continuation-NextRowKey"); val != "" { + result.XMSContinuationNextRowKey = &val + } + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + return result, nil +} + +// queryEntitiesWithPartitionAndRowKeyHandleError handles the QueryEntitiesWithPartitionAndRowKey error response. +func (client *tableClient) queryEntitiesWithPartitionAndRowKeyHandleError(resp *azcore.Response) error { + var err TableServiceError + if err := resp.UnmarshalAsJSON(&err); err != nil { + return err + } + return azcore.NewResponseError(&err, resp.Response) +} + +// SetAccessPolicy - Sets stored access policies for the table that may be used with Shared Access Signatures. +func (client *tableClient) SetAccessPolicy(ctx context.Context, table string, options *TableSetAccessPolicyOptions) (TableSetAccessPolicyResponse, error) { + req, err := client.setAccessPolicyCreateRequest(ctx, table, options) + if err != nil { + return TableSetAccessPolicyResponse{}, err + } + resp, err := client.con.Pipeline().Do(req) + if err != nil { + return TableSetAccessPolicyResponse{}, err + } + if !resp.HasStatusCode(http.StatusNoContent) { + return TableSetAccessPolicyResponse{}, client.setAccessPolicyHandleError(resp) + } + return client.setAccessPolicyHandleResponse(resp) +} + +// setAccessPolicyCreateRequest creates the SetAccessPolicy request. +func (client *tableClient) setAccessPolicyCreateRequest(ctx context.Context, table string, options *TableSetAccessPolicyOptions) (*azcore.Request, error) { + urlPath := "/{table}" + urlPath = strings.ReplaceAll(urlPath, "{table}", url.PathEscape(table)) + req, err := azcore.NewRequest(ctx, http.MethodPut, azcore.JoinPaths(client.con.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + req.Telemetry(telemetryInfo) + query := req.URL.Query() + if options != nil && options.Timeout != nil { + query.Set("timeout", strconv.FormatInt(int64(*options.Timeout), 10)) + } + query.Set("comp", "acl") + req.URL.RawQuery = query.Encode() + req.Header.Set("x-ms-version", "2019-02-02") + if options != nil && options.RequestID != nil { + req.Header.Set("x-ms-client-request-id", *options.RequestID) + } + req.Header.Set("Accept", "application/xml") + type wrapper struct { + XMLName xml.Name `xml:"SignedIdentifiers"` + TableACL *[]SignedIdentifier `xml:"SignedIdentifier"` + } + if options != nil { + return req, req.MarshalAsXML(wrapper{TableACL: options.TableACL}) + } + return req, nil +} + +// setAccessPolicyHandleResponse handles the SetAccessPolicy response. +func (client *tableClient) setAccessPolicyHandleResponse(resp *azcore.Response) (TableSetAccessPolicyResponse, error) { + result := TableSetAccessPolicyResponse{RawResponse: resp.Response} + if val := resp.Header.Get("x-ms-client-request-id"); val != "" { + result.ClientRequestID = &val + } + if val := resp.Header.Get("x-ms-request-id"); val != "" { + result.RequestID = &val + } + if val := resp.Header.Get("x-ms-version"); val != "" { + result.Version = &val + } + if val := resp.Header.Get("Date"); val != "" { + date, err := time.Parse(time.RFC1123, val) + if err != nil { + return TableSetAccessPolicyResponse{}, err + } + result.Date = &date + } + return result, nil +} + +// setAccessPolicyHandleError handles the SetAccessPolicy error response. +func (client *tableClient) setAccessPolicyHandleError(resp *azcore.Response) error { + var err TableServiceError + if err := resp.UnmarshalAsJSON(&err); err != nil { + return err + } + return azcore.NewResponseError(&err, resp.Response) +} + +// UpdateEntity - Update entity in a table. +func (client *tableClient) UpdateEntity(ctx context.Context, table string, partitionKey string, rowKey string, tableUpdateEntityOptions *TableUpdateEntityOptions, queryOptions *QueryOptions) (TableUpdateEntityResponse, error) { + req, err := client.updateEntityCreateRequest(ctx, table, partitionKey, rowKey, tableUpdateEntityOptions, queryOptions) + if err != nil { + return TableUpdateEntityResponse{}, err + } + resp, err := client.con.Pipeline().Do(req) + if err != nil { + return TableUpdateEntityResponse{}, err + } + if !resp.HasStatusCode(http.StatusNoContent) { + return TableUpdateEntityResponse{}, client.updateEntityHandleError(resp) + } + return client.updateEntityHandleResponse(resp) +} + +// updateEntityCreateRequest creates the UpdateEntity request. +func (client *tableClient) updateEntityCreateRequest(ctx context.Context, table string, partitionKey string, rowKey string, tableUpdateEntityOptions *TableUpdateEntityOptions, queryOptions *QueryOptions) (*azcore.Request, error) { + urlPath := "/{table}(PartitionKey='{partitionKey}',RowKey='{rowKey}')" + urlPath = strings.ReplaceAll(urlPath, "{table}", url.PathEscape(table)) + urlPath = strings.ReplaceAll(urlPath, "{partitionKey}", url.PathEscape(partitionKey)) + urlPath = strings.ReplaceAll(urlPath, "{rowKey}", url.PathEscape(rowKey)) + req, err := azcore.NewRequest(ctx, http.MethodPut, azcore.JoinPaths(client.con.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + req.Telemetry(telemetryInfo) + query := req.URL.Query() + if tableUpdateEntityOptions != nil && tableUpdateEntityOptions.Timeout != nil { + query.Set("timeout", strconv.FormatInt(int64(*tableUpdateEntityOptions.Timeout), 10)) + } + if queryOptions != nil && queryOptions.Format != nil { + query.Set("$format", string(*queryOptions.Format)) + } + req.URL.RawQuery = query.Encode() + req.Header.Set("x-ms-version", "2019-02-02") + if tableUpdateEntityOptions != nil && tableUpdateEntityOptions.RequestID != nil { + req.Header.Set("x-ms-client-request-id", *tableUpdateEntityOptions.RequestID) + } + req.Header.Set("DataServiceVersion", "3.0") + if tableUpdateEntityOptions != nil && tableUpdateEntityOptions.IfMatch != nil { + req.Header.Set("If-Match", *tableUpdateEntityOptions.IfMatch) + } + req.Header.Set("Accept", "application/json") + if tableUpdateEntityOptions != nil { + return req, req.MarshalAsJSON(tableUpdateEntityOptions.TableEntityProperties) + } + return req, nil +} + +// updateEntityHandleResponse handles the UpdateEntity response. +func (client *tableClient) updateEntityHandleResponse(resp *azcore.Response) (TableUpdateEntityResponse, error) { + result := TableUpdateEntityResponse{RawResponse: resp.Response} + if val := resp.Header.Get("x-ms-client-request-id"); val != "" { + result.ClientRequestID = &val + } + if val := resp.Header.Get("x-ms-request-id"); val != "" { + result.RequestID = &val + } + if val := resp.Header.Get("x-ms-version"); val != "" { + result.Version = &val + } + if val := resp.Header.Get("Date"); val != "" { + date, err := time.Parse(time.RFC1123, val) + if err != nil { + return TableUpdateEntityResponse{}, err + } + result.Date = &date + } + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + return result, nil +} + +// updateEntityHandleError handles the UpdateEntity error response. +func (client *tableClient) updateEntityHandleError(resp *azcore.Response) error { + var err TableServiceError + if err := resp.UnmarshalAsJSON(&err); err != nil { + return err + } + return azcore.NewResponseError(&err, resp.Response) +} diff --git a/sdk/tables/aztables/zz_generated_time_rfc1123.go b/sdk/tables/aztables/zz_generated_time_rfc1123.go new file mode 100644 index 000000000000..618f7cf33fb5 --- /dev/null +++ b/sdk/tables/aztables/zz_generated_time_rfc1123.go @@ -0,0 +1,41 @@ +// +build go1.13 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package aztables + +import ( + "strings" + "time" +) + +const ( + rfc1123JSON = `"` + time.RFC1123 + `"` +) + +type timeRFC1123 time.Time + +func (t timeRFC1123) MarshalJSON() ([]byte, error) { + b := []byte(time.Time(t).Format(rfc1123JSON)) + return b, nil +} + +func (t timeRFC1123) MarshalText() ([]byte, error) { + b := []byte(time.Time(t).Format(time.RFC1123)) + return b, nil +} + +func (t *timeRFC1123) UnmarshalJSON(data []byte) error { + p, err := time.Parse(rfc1123JSON, strings.ToUpper(string(data))) + *t = timeRFC1123(p) + return err +} + +func (t *timeRFC1123) UnmarshalText(data []byte) error { + p, err := time.Parse(time.RFC1123, string(data)) + *t = timeRFC1123(p) + return err +} diff --git a/sdk/tables/aztables/zz_generated_time_rfc3339.go b/sdk/tables/aztables/zz_generated_time_rfc3339.go new file mode 100644 index 000000000000..f4161ad815bb --- /dev/null +++ b/sdk/tables/aztables/zz_generated_time_rfc3339.go @@ -0,0 +1,57 @@ +// +build go1.13 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package aztables + +import ( + "regexp" + "strings" + "time" +) + +const ( + utcLayoutJSON = `"2006-01-02T15:04:05.999999999"` + utcLayout = "2006-01-02T15:04:05.999999999" + rfc3339JSON = `"` + time.RFC3339Nano + `"` +) + +// Azure reports time in UTC but it doesn't include the 'Z' time zone suffix in some cases. +var tzOffsetRegex = regexp.MustCompile(`(Z|z|\+|-)(\d+:\d+)*"*$`) + +type timeRFC3339 time.Time + +func (t timeRFC3339) MarshalJSON() (json []byte, err error) { + tt := time.Time(t) + return tt.MarshalJSON() +} + +func (t timeRFC3339) MarshalText() (text []byte, err error) { + tt := time.Time(t) + return tt.MarshalText() +} + +func (t *timeRFC3339) UnmarshalJSON(data []byte) error { + layout := utcLayoutJSON + if tzOffsetRegex.Match(data) { + layout = rfc3339JSON + } + return t.Parse(layout, string(data)) +} + +func (t *timeRFC3339) UnmarshalText(data []byte) (err error) { + layout := utcLayout + if tzOffsetRegex.Match(data) { + layout = time.RFC3339Nano + } + return t.Parse(layout, string(data)) +} + +func (t *timeRFC3339) Parse(layout, value string) error { + p, err := time.Parse(layout, strings.ToUpper(value)) + *t = timeRFC3339(p) + return err +} From 3e724e2c239b5f99b0c4b50c406113b7217f6240 Mon Sep 17 00:00:00 2001 From: Christopher Scott Date: Mon, 5 Apr 2021 14:17:53 -0500 Subject: [PATCH 02/42] Update ci.yml --- sdk/tables/aztables/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/tables/aztables/ci.yml b/sdk/tables/aztables/ci.yml index 900004ccf8bc..176bc16e42c8 100644 --- a/sdk/tables/aztables/ci.yml +++ b/sdk/tables/aztables/ci.yml @@ -10,6 +10,6 @@ pr: - sdk/tables/aztables/ stages: -- template: ../../eng/pipelines/templates/jobs/archetype-sdk-client.yml +- template: ../../../eng/pipelines/templates/jobs/archetype-sdk-client.yml parameters: - ServiceDirectory: 'tables' \ No newline at end of file + ServiceDirectory: 'tables' From 6ddf8071db17e6dcd5185b2d70364a6704891568 Mon Sep 17 00:00:00 2001 From: Christopher Scott Date: Wed, 21 Apr 2021 10:24:38 -0500 Subject: [PATCH 03/42] Introduce internal/testFramework and test aztables with it (#14491) * testFramework initial implementation --- sdk/internal/go.mod | 6 +- sdk/internal/go.sum | 30 +- sdk/internal/testframework/recording.go | 414 ++++++++++++++++++ .../testframework/recording_sanitizer.go | 83 ++++ .../testframework/recording_sanitizer_test.go | 157 +++++++ sdk/internal/testframework/recording_test.go | 356 +++++++++++++++ sdk/internal/testframework/request_matcher.go | 111 +++++ .../testframework/request_matcher_test.go | 193 ++++++++ sdk/internal/testframework/testcontext.go | 50 +++ sdk/tables/aztables/tableClient.go | 1 + sdk/tables/aztables/tableClient_test.go | 10 +- sdk/tables/aztables/zc_client_options.go | 6 +- .../aztables/zz_generated_connection.go | 4 +- 13 files changed, 1396 insertions(+), 25 deletions(-) create mode 100644 sdk/internal/testframework/recording.go create mode 100644 sdk/internal/testframework/recording_sanitizer.go create mode 100644 sdk/internal/testframework/recording_sanitizer_test.go create mode 100644 sdk/internal/testframework/recording_test.go create mode 100644 sdk/internal/testframework/request_matcher.go create mode 100644 sdk/internal/testframework/request_matcher_test.go create mode 100644 sdk/internal/testframework/testcontext.go diff --git a/sdk/internal/go.mod b/sdk/internal/go.mod index 5a5a2fb7eb04..c23772f28d9d 100644 --- a/sdk/internal/go.mod +++ b/sdk/internal/go.mod @@ -3,10 +3,8 @@ module github.com/Azure/azure-sdk-for-go/sdk/internal go 1.14 require ( - github.com/davecgh/go-spew v1.1.1 // indirect - github.com/dnaeon/go-vcr v1.2.0 + github.com/dnaeon/go-vcr v1.1.0 github.com/stretchr/testify v1.7.0 - golang.org/x/net v0.0.0-20210610132358-84b48f89b13b + golang.org/x/net v0.0.0-20201010224723-4f7140c49acb gopkg.in/yaml.v2 v2.4.0 - gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect ) diff --git a/sdk/internal/go.sum b/sdk/internal/go.sum index 7064208964e3..7c8192467fcd 100644 --- a/sdk/internal/go.sum +++ b/sdk/internal/go.sum @@ -1,27 +1,29 @@ +github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= -github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= +github.com/dnaeon/go-vcr v1.1.0 h1:ReYa/UBrRyQdant9B4fNHGoCNKw6qh6P0fsdGmZpR7c= +github.com/dnaeon/go-vcr v1.1.0/go.mod h1:M7tiix8f0r6mKKJ3Yq/kqU1OYf3MnfmBWVbPx/yU9ko= github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -golang.org/x/net v0.0.0-20210610132358-84b48f89b13b h1:k+E048sYJHyVnsr1GDrRZWQ32D2C7lWs9JRc0bel53A= -golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20201010224723-4f7140c49acb h1:mUVeFHoDKis5nxCAzoAi7E8Ghb86EXh/RK6wtvJIqRY= +golang.org/x/net v0.0.0-20201010224723-4f7140c49acb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/sdk/internal/testframework/recording.go b/sdk/internal/testframework/recording.go new file mode 100644 index 000000000000..0f1462812c59 --- /dev/null +++ b/sdk/internal/testframework/recording.go @@ -0,0 +1,414 @@ +// +build go1.13 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package testframework + +import ( + "errors" + "fmt" + "io/ioutil" + "math/rand" + "net/http" + "os" + "path/filepath" + "strconv" + "strings" + "time" + + "github.com/Azure/azure-sdk-for-go/sdk/internal/uuid" + "github.com/dnaeon/go-vcr/cassette" + "github.com/dnaeon/go-vcr/recorder" + "gopkg.in/yaml.v2" +) + +type Recording struct { + SessionName string + RecordingFile string + VariablesFile string + Mode RecordMode + variables map[string]*string `yaml:"variables"` + previousSessionVariables map[string]*string `yaml:"variables"` + recorder *recorder.Recorder + src rand.Source + now *time.Time + sanitizer *RecordingSanitizer + c TestContext +} + +const ( + alphanumericBytes = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890" + alphanumericLowercaseBytes = "abcdefghijklmnopqrstuvwxyz1234567890" + randomSeedVariableName = "randomSeed" + nowVariableName = "now" + ModeEnvironmentVariableName = "AZURE_TEST_MODE" +) + +// Inspired by https://stackoverflow.com/questions/22892120/how-to-generate-a-random-string-of-a-fixed-length-in-go +const ( + letterIdxBits = 6 // 6 bits to represent a letter index + letterIdxMask = 1< 0 { + // Merge values from previousVariables that are not in variables to variables + for k, v := range r.previousSessionVariables { + if _, ok := r.variables[k]; ok { + // skip variables that were new in the current session + continue + } + r.variables[k] = v + } + + // Marshal to YAML and save variables + data, err := yaml.Marshal(r.variables) + if err != nil { + return err + } + + f, err := r.createVariablesFileIfNotExists() + if err != nil { + return err + } + + defer f.Close() + + // http://www.yaml.org/spec/1.2/spec.html#id2760395 + _, err = f.Write([]byte("---\n")) + if err != nil { + return err + } + + _, err = f.Write(data) + if err != nil { + return err + } + } + return nil +} + +func (r *Recording) Now() time.Time { + r.initNow() + + return *r.now +} + +func (r *Recording) UUID() uuid.UUID { + r.initRandomSource() + + return uuid.FromSource(r.src) +} + +// GenerateAlphaNumericID will generate a recorded random alpha numeric id +// if the recording has a randomSeed already set, the value will be generated from that seed, else a new random seed will be used +func (r *Recording) GenerateAlphaNumericID(prefix string, length int, lowercaseOnly bool) (string, error) { + + if length <= len(prefix) { + return "", errors.New("length must be greater than prefix") + } + + r.initRandomSource() + + sb := strings.Builder{} + sb.Grow(length) + sb.WriteString(prefix) + i := length - len(prefix) - 1 + // A src.Int63() generates 63 random bits, enough for letterIdxMax characters! + for cache, remain := r.src.Int63(), letterIdxMax; i >= 0; { + if remain == 0 { + cache, remain = r.src.Int63(), letterIdxMax + } + if lowercaseOnly { + if idx := int(cache & letterIdxMask); idx < len(alphanumericLowercaseBytes) { + sb.WriteByte(alphanumericLowercaseBytes[idx]) + i-- + } + } else { + if idx := int(cache & letterIdxMask); idx < len(alphanumericBytes) { + sb.WriteByte(alphanumericBytes[idx]) + i-- + } + } + cache >>= letterIdxBits + remain-- + } + str := sb.String() + return str, nil +} + +// getRequiredEnv gets an environment variable by name and returns an error if it is not found +func getRequiredEnv(name string) (*string, error) { + env, ok := os.LookupEnv(name) + if ok { + return &env, nil + } else { + return nil, errors.New(envNotExistsError(name)) + } +} + +// getOptionalEnv gets an environment variable by name and returns the defaultValue if not found +func getOptionalEnv(name string, defaultValue string) *string { + env, ok := os.LookupEnv(name) + if ok { + return &env + } else { + return &defaultValue + } +} + +func (r *Recording) matchRequest(req *http.Request, rec cassette.Request) bool { + isMatch := compareMethods(req, rec, r.c) && + compareURLs(req, rec, r.c) && + compareHeaders(req, rec, r.c) && + compareBodies(req, rec, r.c) + + return isMatch +} + +func missingRequestError(req *http.Request) string { + reqUrl := req.URL.String() + return fmt.Sprintf("\nNo matching recorded request found.\nRequest: [%s] %s\n", req.Method, reqUrl) +} + +func envNotExistsError(varName string) string { + return "Required environment variable not set: " + varName +} + +// applyVariableOptions applies the VariableType transform to the value +// If variableType is not provided or Default, return result +// If variableType is Secret_String, return SanitizedValue +// If variableType isSecret_Base64String return SanitizedBase64Value +func applyVariableOptions(val *string, variableType VariableType) *string { + var ret string + + switch variableType { + case Secret_String: + ret = SanitizedValue + return &ret + case Secret_Base64String: + ret = SanitizedBase64Value + return &ret + default: + return val + } +} + +// initRandomSource initializes the Source to be used for random value creation in this Recording +func (r *Recording) initRandomSource() { + // if we already have a Source generated, return immediately + if r.src != nil { + return + } + + var seed int64 + var err error + + // check to see if we already have a random seed stored, use that if so + seedString, ok := r.previousSessionVariables[randomSeedVariableName] + if ok { + seed, err = strconv.ParseInt(*seedString, 10, 64) + } + + // We did not have a random seed already stored; create a new one + if !ok || err != nil || r.Mode == Live { + seed = time.Now().Unix() + val := strconv.FormatInt(seed, 10) + r.variables[randomSeedVariableName] = &val + } + + // create a Source with the seed + r.src = rand.NewSource(seed) +} + +// initNow initializes the Source to be used for random value creation in this Recording +func (r *Recording) initNow() { + // if we already have a now generated, return immediately + if r.now != nil { + return + } + + var err error + var nowStr *string + var newNow time.Time + + // check to see if we already have a random seed stored, use that if so + nowStr, ok := r.previousSessionVariables[nowVariableName] + if ok { + newNow, err = time.Parse(time.RFC3339Nano, *nowStr) + } + + // We did not have a random seed already stored; create a new one + if !ok || err != nil || r.Mode == Live { + newNow = time.Now() + nowStr = new(string) + *nowStr = newNow.Format(time.RFC3339Nano) + r.variables[nowVariableName] = nowStr + } + + // save the now value. + r.now = &newNow +} + +// getFilePaths returns (recordingFilePath, variablesFilePath) +func getFilePaths(name string) (string, string) { + recPath := "recordings/" + name + varPath := fmt.Sprintf("%s-variables.yaml", recPath) + return recPath, varPath +} + +// createVariablesFileIfNotExists calls os.Create on the VariablesFile and creates it if it or the path does not exist +// Callers must call Close on the result +func (r *Recording) createVariablesFileIfNotExists() (*os.File, error) { + f, err := os.Create(r.VariablesFile) + if err != nil { + if !os.IsNotExist(err) { + return nil, err + } + // Create directory for the variables if missing + variablesDir := filepath.Dir(r.VariablesFile) + if _, err := os.Stat(variablesDir); os.IsNotExist(err) { + if err = os.MkdirAll(variablesDir, 0755); err != nil { + return nil, err + } + } + + f, err = os.Create(r.VariablesFile) + if err != nil { + return nil, err + } + } + + return f, nil +} + +func (r *Recording) unmarshalVariablesFile(out interface{}) error { + data, err := ioutil.ReadFile(r.VariablesFile) + if err != nil { + // If the file or dir do not exist, this is not an error to report + if os.IsNotExist(err) { + r.c.Log(fmt.Sprintf("Did not find recording for test '%s'", r.RecordingFile)) + return nil + } else { + return err + } + } else { + err = yaml.Unmarshal(data, out) + } + return nil +} + +func (r *Recording) initVariables() error { + return r.unmarshalVariablesFile(r.previousSessionVariables) +} + +var modeMap = map[RecordMode]recorder.Mode{ + Record: recorder.ModeRecording, + Live: recorder.ModeDisabled, + Playback: recorder.ModeReplaying, +} diff --git a/sdk/internal/testframework/recording_sanitizer.go b/sdk/internal/testframework/recording_sanitizer.go new file mode 100644 index 000000000000..ac4311ef46a2 --- /dev/null +++ b/sdk/internal/testframework/recording_sanitizer.go @@ -0,0 +1,83 @@ +// +build go1.13 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package testframework + +import ( + "net/http" + + "github.com/dnaeon/go-vcr/cassette" + "github.com/dnaeon/go-vcr/recorder" +) + +type RecordingSanitizer struct { + recorder *recorder.Recorder + headersToSanitize map[string]*string + urlSanitizer StringSanitizer + bodySanitizer StringSanitizer +} + +type StringSanitizer func(*string) + +const SanitizedValue string = "sanitized" +const SanitizedBase64Value string = "Kg==" + +var sanitizedValueSlice = []string{SanitizedValue} + +func DefaultSanitizer(recorder *recorder.Recorder) *RecordingSanitizer { + // The default sanitizer sanitizes the Authorization header + s := &RecordingSanitizer{headersToSanitize: map[string]*string{"Authorization": nil}, recorder: recorder, urlSanitizer: DefaultStringSanitizer} + recorder.AddSaveFilter(s.applySaveFilter) + + return s +} + +// AddSanitizedHeaders adds the supplied header names to the list of headers to be sanitized on request and response recordings. +func (s *RecordingSanitizer) AddSanitizedHeaders(headers ...string) { + for _, headerName := range headers { + s.headersToSanitize[headerName] = nil + } +} + +// AddBodysanitizer configures the supplied StringSanitizer to sanitize recording request and response bodies +func (s *RecordingSanitizer) AddBodysanitizer(sanitizer StringSanitizer) { + s.bodySanitizer = sanitizer +} + +// AddUriSanitizer configures the supplied StringSanitizer to sanitize recording request and response URLs +func (s *RecordingSanitizer) AddUrlSanitizer(sanitizer StringSanitizer) { + s.urlSanitizer = sanitizer +} + +func (s *RecordingSanitizer) sanitizeHeaders(header http.Header) { + for headerName := range s.headersToSanitize { + if _, ok := header[headerName]; ok { + header[headerName] = sanitizedValueSlice + } + } +} + +func (s *RecordingSanitizer) sanitizeBodies(body *string) { + s.bodySanitizer(body) +} + +func (s *RecordingSanitizer) sanitizeURL(url *string) { + s.urlSanitizer(url) +} + +func (s *RecordingSanitizer) applySaveFilter(i *cassette.Interaction) error { + s.sanitizeHeaders(i.Request.Headers) + s.sanitizeHeaders(i.Response.Headers) + s.sanitizeURL(&i.Request.URL) + if len(i.Request.Body) > 0 { + s.sanitizeBodies(&i.Request.Body) + } + if len(i.Response.Body) > 0 { + s.sanitizeBodies(&i.Response.Body) + } + return nil +} + +func DefaultStringSanitizer(s *string) {} diff --git a/sdk/internal/testframework/recording_sanitizer_test.go b/sdk/internal/testframework/recording_sanitizer_test.go new file mode 100644 index 000000000000..570dfb3b005b --- /dev/null +++ b/sdk/internal/testframework/recording_sanitizer_test.go @@ -0,0 +1,157 @@ +// +build go1.13 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package testframework + +import ( + "net/http" + "os" + "strings" + "testing" + + "github.com/Azure/azure-sdk-for-go/sdk/internal/mock" + "github.com/dnaeon/go-vcr/cassette" + "github.com/dnaeon/go-vcr/recorder" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/suite" +) + +type recordingSanitizerTests struct { + suite.Suite +} + +const authHeader string = "Authorization" +const customHeader1 string = "Fooheader" +const customHeader2 string = "Barheader" +const nonSanitizedHeader string = "notsanitized" + +func TestRecordingSanitizer(t *testing.T) { + suite.Run(t, new(recordingSanitizerTests)) +} + +func (s *recordingSanitizerTests) TestDefaultSanitizerSanitizesAuthHeader() { + assert := assert.New(s.T()) + server, cleanup := mock.NewServer() + server.SetResponse() + defer cleanup() + rt := NewMockRoundTripper(server) + r, _ := recorder.NewAsMode(getTestFileName(s.T(), false), recorder.ModeRecording, rt) + + DefaultSanitizer(r) + + req, _ := http.NewRequest(http.MethodPost, server.URL(), nil) + req.Header.Add(authHeader, "superSecret") + + r.RoundTrip(req) + r.Stop() + + assert.Equal(SanitizedValue, req.Header.Get(authHeader)) + + rec, err := cassette.Load(getTestFileName(s.T(), false)) + assert.Nil(err) + + for _, i := range rec.Interactions { + assert.Equal(SanitizedValue, i.Request.Headers.Get(authHeader)) + } +} + +func (s *recordingSanitizerTests) TestAddSanitizedHeadersSanitizes() { + assert := assert.New(s.T()) + server, cleanup := mock.NewServer() + server.SetResponse() + defer cleanup() + rt := NewMockRoundTripper(server) + r, _ := recorder.NewAsMode(getTestFileName(s.T(), false), recorder.ModeRecording, rt) + + target := DefaultSanitizer(r) + target.AddSanitizedHeaders(customHeader1, customHeader2) + + req, _ := http.NewRequest(http.MethodPost, server.URL(), nil) + req.Header.Add(customHeader1, "superSecret") + req.Header.Add(customHeader2, "verySecret") + safeValue := "safeValue" + req.Header.Add(nonSanitizedHeader, safeValue) + + r.RoundTrip(req) + r.Stop() + + assert.Equal(SanitizedValue, req.Header.Get(customHeader1)) + assert.Equal(SanitizedValue, req.Header.Get(customHeader2)) + assert.Equal(safeValue, req.Header.Get(nonSanitizedHeader)) + + rec, err := cassette.Load(getTestFileName(s.T(), false)) + assert.Nil(err) + + for _, i := range rec.Interactions { + assert.Equal(SanitizedValue, i.Request.Headers.Get(customHeader1)) + assert.Equal(SanitizedValue, i.Request.Headers.Get(customHeader2)) + assert.Equal(safeValue, i.Request.Headers.Get(nonSanitizedHeader)) + } +} + +func (s *recordingSanitizerTests) TestAddUrlSanitizerSanitizes() { + assert := assert.New(s.T()) + secret := "secretvalue" + secretBody := "some body content that contains a " + secret + server, cleanup := mock.NewServer() + server.SetResponse(mock.WithStatusCode(http.StatusCreated), mock.WithBody([]byte(secretBody))) + defer cleanup() + rt := NewMockRoundTripper(server) + r, _ := recorder.NewAsMode(getTestFileName(s.T(), false), recorder.ModeRecording, rt) + + baseUrl := server.URL() + "/" + + target := DefaultSanitizer(r) + target.AddUrlSanitizer(func(url *string) { + *url = strings.Replace(*url, secret, SanitizedValue, -1) + }) + target.AddBodysanitizer(func(body *string) { + *body = strings.Replace(*body, secret, SanitizedValue, -1) + }) + + req, _ := http.NewRequest(http.MethodPost, baseUrl+secret, closerFromString(secretBody)) + + r.RoundTrip(req) + r.Stop() + + rec, err := cassette.Load(getTestFileName(s.T(), false)) + assert.Nil(err) + + for _, i := range rec.Interactions { + assert.NotContains(i.Response.Body, secret) + assert.NotContains(i.Request.URL, secret) + assert.NotContains(i.Request.Body, secret) + assert.Contains(i.Request.URL, SanitizedValue) + assert.Contains(i.Request.Body, SanitizedValue) + assert.Contains(i.Response.Body, SanitizedValue) + } +} + +func (s *recordingSanitizerTests) TearDownSuite() { + assert := assert.New(s.T()) + // cleanup test files + err := os.RemoveAll("testfiles") + assert.Nil(err) +} + +func getTestFileName(t *testing.T, addSuffix bool) string { + name := "testfiles/" + t.Name() + if addSuffix { + name = name + ".yaml" + } + return name +} + +type mockRoundTripper struct { + server *mock.Server +} + +func NewMockRoundTripper(server *mock.Server) *mockRoundTripper { + return &mockRoundTripper{server: server} +} + +func (m *mockRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) { + return m.server.Do(req) +} diff --git a/sdk/internal/testframework/recording_test.go b/sdk/internal/testframework/recording_test.go new file mode 100644 index 000000000000..4ed73f5805ce --- /dev/null +++ b/sdk/internal/testframework/recording_test.go @@ -0,0 +1,356 @@ +// +build go1.13 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package testframework + +import ( + "fmt" + "io/ioutil" + "net/http" + "os" + "strings" + "testing" + "time" + + "github.com/Azure/azure-sdk-for-go/sdk/internal/mock" + "github.com/dnaeon/go-vcr/cassette" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/suite" +) + +type recordingTests struct { + suite.Suite +} + +func TestRecording(t *testing.T) { + suite.Run(t, new(recordingTests)) +} + +func (s *recordingTests) TestInitializeRecording() { + assert := assert.New(s.T()) + context := NewTestContext(func(msg string) { assert.FailNow(msg) }, func(msg string) { s.T().Log(msg) }, func() string { return s.T().Name() }) + + expectedMode := Playback + + target, err := NewRecording(context, expectedMode) + assert.Nil(err) + assert.NotNil(target.RecordingFile) + assert.NotNil(target.VariablesFile) + assert.Equal(expectedMode, target.Mode) + + err = target.Stop() + assert.Nil(err) +} + +func (s *recordingTests) TestStopDoesNotSaveVariablesWhenNoVariablesExist() { + assert := assert.New(s.T()) + context := NewTestContext(func(msg string) { assert.FailNow(msg) }, func(msg string) { s.T().Log(msg) }, func() string { return s.T().Name() }) + + target, err := NewRecording(context, Playback) + assert.Nil(err) + + err = target.Stop() + assert.Nil(err) + + _, err = ioutil.ReadFile(target.VariablesFile) + assert.Equal(true, os.IsNotExist(err)) +} + +func (s *recordingTests) TestRecordedVariables() { + assert := assert.New(s.T()) + context := NewTestContext(func(msg string) { s.T().Log(msg) }, func(msg string) { s.T().Log(msg) }, func() string { return s.T().Name() }) + + nonExistingEnvVar := "nonExistingEnvVar" + expectedVariableValue := "foobar" + variablesMap := map[string]string{} + + target, err := NewRecording(context, Playback) + assert.Nil(err) + + // optional variables always succeed. + assert.Equal(expectedVariableValue, target.GetOptionalRecordedVariable(nonExistingEnvVar, expectedVariableValue, Default)) + + // non existent variables return an error + val, err := target.GetRecordedVariable(nonExistingEnvVar, Default) + // mark test as succeeded + assert.Equal(envNotExistsError(nonExistingEnvVar), err.Error()) + + // now create the env variable and check that it can be fetched + os.Setenv(nonExistingEnvVar, expectedVariableValue) + defer os.Unsetenv(nonExistingEnvVar) + val, err = target.GetRecordedVariable(nonExistingEnvVar, Default) + assert.Equal(expectedVariableValue, val) + + err = target.Stop() + assert.Nil(err) + + // check that a variables file was created with the correct variable + target.unmarshalVariablesFile(variablesMap) + actualValue, ok := variablesMap[nonExistingEnvVar] + assert.Equal(true, ok) + assert.Equal(expectedVariableValue, actualValue) +} + +func (s *recordingTests) TestRecordedVariablesSanitized() { + assert := assert.New(s.T()) + context := NewTestContext(func(msg string) { assert.FailNow(msg) }, func(msg string) { s.T().Log(msg) }, func() string { return s.T().Name() }) + + SanitizedStringVar := "sanitizedvar" + SanitizedBase64StrigVar := "sanitizedbase64var" + secret := "secretstring" + secretBase64 := "asdfasdf==" + variablesMap := map[string]string{} + + target, err := NewRecording(context, Playback) + assert.Nil(err) + + // call GetOptionalRecordedVariable with the Secret_String VariableType arg + assert.Equal(secret, target.GetOptionalRecordedVariable(SanitizedStringVar, secret, Secret_String)) + + // call GetOptionalRecordedVariable with the Secret_Base64String VariableType arg + assert.Equal(secretBase64, target.GetOptionalRecordedVariable(SanitizedBase64StrigVar, secretBase64, Secret_Base64String)) + + // Calling Stop will save the variables and apply the sanitization options + err = target.Stop() + assert.Nil(err) + + // check that a variables file was created with the correct variables + target.unmarshalVariablesFile(variablesMap) + actualValue, ok := variablesMap[SanitizedStringVar] + assert.Equal(true, ok) + // the saved value is sanitized + assert.Equal(SanitizedValue, actualValue) + + target.unmarshalVariablesFile(variablesMap) + actualValue, ok = variablesMap[SanitizedBase64StrigVar] + assert.Equal(true, ok) + // the saved value is sanitized + assert.Equal(SanitizedBase64Value, actualValue) +} + +func (s *recordingTests) TestStopSavesVariablesIfExistAndReadsPreviousVariables() { + assert := assert.New(s.T()) + context := NewTestContext(func(msg string) { assert.FailNow(msg) }, func(msg string) { s.T().Log(msg) }, func() string { return s.T().Name() }) + + expectedVariableName := "someVariable" + expectedVariableValue := "foobar" + addedVariableName := "addedVariable" + addedVariableValue := "fizzbuzz" + variablesMap := map[string]string{} + + target, err := NewRecording(context, Playback) + assert.Nil(err) + + target.GetOptionalRecordedVariable(expectedVariableName, expectedVariableValue, Default) + + err = target.Stop() + assert.Nil(err) + + // check that a variables file was created with the correct variable + target.unmarshalVariablesFile(variablesMap) + actualValue, ok := variablesMap[expectedVariableName] + assert.True(ok) + assert.Equal(expectedVariableValue, actualValue) + + variablesMap = map[string]string{} + target2, err := NewRecording(context, Playback) + assert.Nil(err) + + // add a new variable to the existing batch + target2.GetOptionalRecordedVariable(addedVariableName, addedVariableValue, Default) + + err = target2.Stop() + assert.Nil(err) + + // check that a variables file was created with the variables loaded from the previous recording + target2.unmarshalVariablesFile(variablesMap) + actualValue, ok = variablesMap[addedVariableName] + assert.Truef(ok, fmt.Sprintf("Should have found %s", addedVariableName)) + assert.Equal(addedVariableValue, actualValue) + actualValue, ok = variablesMap[expectedVariableName] + assert.Truef(ok, fmt.Sprintf("Should have found %s", expectedVariableName)) + assert.Equal(expectedVariableValue, actualValue) +} + +func (s *recordingTests) TestUUID() { + assert := assert.New(s.T()) + context := NewTestContext(func(msg string) { assert.FailNow(msg) }, func(msg string) { s.T().Log(msg) }, func() string { return s.T().Name() }) + + target, err := NewRecording(context, Playback) + assert.Nil(err) + + recordedUUID1 := target.UUID() + recordedUUID1a := target.UUID() + assert.NotEqual(recordedUUID1.String(), recordedUUID1a.String()) + + err = target.Stop() + assert.Nil(err) + + target2, err := NewRecording(context, Playback) + assert.Nil(err) + + recordedUUID2 := target2.UUID() + + // The two generated UUIDs should be the same since target2 loaded the saved random seed from target + assert.Equal(recordedUUID1.String(), recordedUUID2.String()) + + err = target.Stop() + assert.Nil(err) +} + +func (s *recordingTests) TestNow() { + assert := assert.New(s.T()) + context := NewTestContext(func(msg string) { assert.FailNow(msg) }, func(msg string) { s.T().Log(msg) }, func() string { return s.T().Name() }) + + target, err := NewRecording(context, Playback) + assert.Nil(err) + + recordedNow1 := target.Now() + + time.Sleep(time.Millisecond * 100) + + recordedNow1a := target.Now() + assert.Equal(recordedNow1.UnixNano(), recordedNow1a.UnixNano()) + + err = target.Stop() + assert.Nil(err) + + target2, err := NewRecording(context, Playback) + assert.Nil(err) + + recordedNow2 := target2.Now() + + // The two generated nows should be the same since target2 loaded the saved random seed from target + assert.Equal(recordedNow1.UnixNano(), recordedNow2.UnixNano()) + + err = target.Stop() + assert.Nil(err) +} + +func (s *recordingTests) TestGenerateAlphaNumericID() { + assert := assert.New(s.T()) + context := NewTestContext(func(msg string) { assert.FailNow(msg) }, func(msg string) { s.T().Log(msg) }, func() string { return s.T().Name() }) + + prefix := "myprefix" + + target, err := NewRecording(context, Playback) + assert.Nil(err) + + generated1, err := target.GenerateAlphaNumericID(prefix, 10, true) + + assert.Equal(10, len(generated1)) + assert.Equal(true, strings.HasPrefix(generated1, prefix)) + + generated1a, err := target.GenerateAlphaNumericID(prefix, 10, true) + assert.NotEqual(generated1, generated1a) + + err = target.Stop() + assert.Nil(err) + + target2, err := NewRecording(context, Playback) + assert.Nil(err) + + generated2, err := target2.GenerateAlphaNumericID(prefix, 10, true) + + // The two generated Ids should be the same since target2 loaded the saved random seed from target + assert.Equal(generated2, generated1) + + err = target.Stop() + assert.Nil(err) +} + +func (s *recordingTests) TestRecordRequestsAndDoMatching() { + assert := assert.New(s.T()) + context := NewTestContext(func(msg string) { assert.FailNow(msg) }, func(msg string) { s.T().Log(msg) }, func() string { return s.T().Name() }) + server, cleanup := mock.NewServer() + server.SetResponse() + defer cleanup() + rt := NewMockRoundTripper(server) + + target, err := NewRecording(context, Playback) + target.recorder.SetTransport(rt) + + path, err := target.GenerateAlphaNumericID("", 5, true) + reqUrl := server.URL() + "/" + path + + req, _ := http.NewRequest(http.MethodPost, reqUrl, nil) + + // record the request + target.Do(req) + err = target.Stop() + assert.Nil(err) + + rec, err := cassette.Load(target.SessionName) + assert.Nil(err) + + for _, i := range rec.Interactions { + assert.Equal(reqUrl, i.Request.URL) + } + + // re-initialize the recording + target, err = NewRecording(context, Playback) + target.recorder.SetTransport(rt) + + // re-create the random url using the recorded variables + path, err = target.GenerateAlphaNumericID("", 5, true) + reqUrl = server.URL() + "/" + path + req, _ = http.NewRequest(http.MethodPost, reqUrl, nil) + + // playback the request + target.Do(req) + err = target.Stop() + assert.Nil(err) +} + +func (s *recordingTests) TestRecordRequestsAndFailMatchingForMissingRecording() { + assert := assert.New(s.T()) + context := NewTestContext(func(msg string) { s.T().Log(msg) }, func(msg string) { s.T().Log(msg) }, func() string { return s.T().Name() }) + server, cleanup := mock.NewServer() + server.SetResponse() + defer cleanup() + rt := NewMockRoundTripper(server) + + target, err := NewRecording(context, Playback) + target.recorder.SetTransport(rt) + + path, err := target.GenerateAlphaNumericID("", 5, true) + reqUrl := server.URL() + "/" + path + + req, _ := http.NewRequest(http.MethodPost, reqUrl, nil) + + // record the request + target.Do(req) + err = target.Stop() + assert.Nil(err) + + rec, err := cassette.Load(target.SessionName) + assert.Nil(err) + + for _, i := range rec.Interactions { + assert.Equal(reqUrl, i.Request.URL) + } + + // re-initialize the recording + target, err = NewRecording(context, Playback) + target.recorder.SetTransport(rt) + + // re-create the random url using the recorded variables + reqUrl = server.URL() + "/" + "mismatchedRequest" + req, _ = http.NewRequest(http.MethodPost, reqUrl, nil) + + // playback the request + _, err = target.Do(req) + assert.Equal(missingRequestError(req), err.Error()) + // mark succeeded + err = target.Stop() + assert.Nil(err) +} + +func (s *recordingTests) TearDownSuite() { + + // cleanup test files + err := os.RemoveAll("recordings") + assert.Nil(s.T(), err) +} diff --git a/sdk/internal/testframework/request_matcher.go b/sdk/internal/testframework/request_matcher.go new file mode 100644 index 000000000000..38997a5ffa50 --- /dev/null +++ b/sdk/internal/testframework/request_matcher.go @@ -0,0 +1,111 @@ +// +build go1.13 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package testframework + +import ( + "bytes" + "fmt" + "io/ioutil" + "net/http" + "reflect" + + "github.com/dnaeon/go-vcr/cassette" +) + +type RequestMatcher struct { + ignoredHeaders map[string]*string +} + +var ignoredHeaders = map[string]*string{ + "Date": nil, + "X-Ms-Date": nil, + "x-ms-date": nil, + "x-ms-client-request-id": nil, + "User-Agent": nil, + "Request-Id": nil, + "traceparent": nil, + "Authorization": nil, +} + +var recordingHeaderMissing = "Test recording headers do not match. Header '%s' is present in request but not in recording." +var requestHeaderMissing = "Test recording headers do not match. Header '%s' is present in recording but not in request." +var headerValuesMismatch = "Test recording header '%s' does not match. request: %s, recording: %s" +var methodMismatch = "Test recording methods do not match. request: %s, recording: %s" +var urlMismatch = "Test recording URLs do not match. request: %s, recording: %s" +var bodiesMismatch = "Test recording bodies do not match.\nrequest: %s\nrecording: %s" + +func compareBodies(r *http.Request, i cassette.Request, c TestContext) bool { + body := bytes.Buffer{} + if r.Body != nil { + _, err := body.ReadFrom(r.Body) + if err != nil { + return false + } + r.Body = ioutil.NopCloser(&body) + } + bodiesMatch := body.String() == i.Body + if !bodiesMatch { + c.Log(fmt.Sprintf(bodiesMismatch, body.String(), i.Body)) + } + return bodiesMatch +} + +func compareURLs(r *http.Request, i cassette.Request, c TestContext) bool { + if r.URL.String() != i.URL { + c.Log(fmt.Sprintf(urlMismatch, r.URL.String(), i.URL)) + return false + } + return true +} + +func compareMethods(r *http.Request, i cassette.Request, c TestContext) bool { + if r.Method != i.Method { + c.Log(fmt.Sprintf(methodMismatch, r.Method, i.Method)) + return false + } + return true +} + +func compareHeaders(r *http.Request, i cassette.Request, c TestContext) bool { + unVisitedCassetteKeys := make(map[string]*string, len(i.Headers)) + // clone the cassette keys to track which we have seen + for k := range i.Headers { + if _, ignore := ignoredHeaders[k]; ignore { + // don't copy ignored headers + continue + } + unVisitedCassetteKeys[k] = nil + } + //iterate through all the request headers to compare them to cassette headers + for key, requestHeader := range r.Header { + if _, ignore := ignoredHeaders[key]; ignore { + // this is an ignorable header + continue + } + delete(unVisitedCassetteKeys, key) + if recordedHeader, foundMatch := i.Headers[key]; foundMatch { + headersMatch := reflect.DeepEqual(requestHeader, recordedHeader) + if !headersMatch { + // headers don't match + c.Log(fmt.Sprintf(headerValuesMismatch, key, requestHeader, recordedHeader)) + return false + } + + } else { + // header not found + c.Log(fmt.Sprintf(recordingHeaderMissing, key)) + return false + } + } + if len(unVisitedCassetteKeys) > 0 { + // headers exist in the recording that do not exist in the request + for headerName := range unVisitedCassetteKeys { + c.Log(fmt.Sprintf(requestHeaderMissing, headerName)) + } + return false + } + return true +} diff --git a/sdk/internal/testframework/request_matcher_test.go b/sdk/internal/testframework/request_matcher_test.go new file mode 100644 index 000000000000..90c945458917 --- /dev/null +++ b/sdk/internal/testframework/request_matcher_test.go @@ -0,0 +1,193 @@ +// +build go1.13 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package testframework + +import ( + "io" + "io/ioutil" + "net/http" + "net/url" + "strings" + "testing" + + "github.com/Azure/azure-sdk-for-go/sdk/internal/uuid" + "github.com/dnaeon/go-vcr/cassette" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/suite" +) + +type requestMatcherTests struct { + suite.Suite +} + +func TestRequestMatcher(t *testing.T) { + suite.Run(t, new(requestMatcherTests)) +} + +const matchedBody string = "Matching body." +const unMatchedBody string = "This body does not match." + +func (s *requestMatcherTests) TestCompareBodies() { + assert := assert.New(s.T()) + context := NewTestContext(func(msg string) { assert.FailNow(msg) }, func(msg string) { s.T().Log(msg) }, func() string { return s.T().Name() }) + + req := http.Request{Body: closerFromString(matchedBody)} + recReq := cassette.Request{Body: matchedBody} + + isMatch := compareBodies(&req, recReq, context) + + assert.Equal(true, isMatch) + + // make the requests mis-match + req.Body = closerFromString((unMatchedBody)) + + isMatch = compareBodies(&req, recReq, context) + + assert.False(isMatch) +} + +func (s *requestMatcherTests) TestCompareHeadersIgnoresIgnoredHeaders() { + assert := assert.New(s.T()) + context := NewTestContext(func(msg string) { assert.FailNow(msg) }, func(msg string) { s.T().Log(msg) }, func() string { return s.T().Name() }) + + // populate only ignored headers that do not match + reqHeaders := make(http.Header) + recordedHeaders := make(http.Header) + for headerName := range ignoredHeaders { + reqHeaders[headerName] = []string{uuid.New().String()} + recordedHeaders[headerName] = []string{uuid.New().String()} + } + + req := http.Request{Header: reqHeaders} + recReq := cassette.Request{Headers: recordedHeaders} + + // All headers match + assert.True(compareHeaders(&req, recReq, context)) +} + +func (s *requestMatcherTests) TestCompareHeadersMatchesHeaders() { + assert := assert.New(s.T()) + context := NewTestContext(func(msg string) { assert.FailNow(msg) }, func(msg string) { s.T().Log(msg) }, func() string { return s.T().Name() }) + + // populate only ignored headers that do not match + reqHeaders := make(http.Header) + recordedHeaders := make(http.Header) + header1 := "header1" + headerValue := []string{"some value"} + + reqHeaders[header1] = headerValue + recordedHeaders[header1] = headerValue + + req := http.Request{Header: reqHeaders} + recReq := cassette.Request{Headers: recordedHeaders} + + assert.True(compareHeaders(&req, recReq, context)) +} + +func (s *requestMatcherTests) TestCompareHeadersFailsMissingRecHeader() { + assert := assert.New(s.T()) + context := NewTestContext(func(msg string) { assert.FailNow(msg) }, func(msg string) { s.T().Log(msg) }, func() string { return s.T().Name() }) + + // populate only ignored headers that do not match + reqHeaders := make(http.Header) + recordedHeaders := make(http.Header) + header1 := "header1" + header2 := "header2" + headerValue := []string{"some value"} + + reqHeaders[header1] = headerValue + recordedHeaders[header1] = headerValue + + req := http.Request{Header: reqHeaders} + recReq := cassette.Request{Headers: recordedHeaders} + + // add a new header to the just req + reqHeaders[header2] = headerValue + + assert.False(compareHeaders(&req, recReq, context)) +} + +func (s *requestMatcherTests) TestCompareHeadersFailsMissingReqHeader() { + assert := assert.New(s.T()) + context := NewTestContext(func(msg string) { assert.FailNow(msg) }, func(msg string) { s.T().Log(msg) }, func() string { return s.T().Name() }) + + // populate only ignored headers that do not match + reqHeaders := make(http.Header) + recordedHeaders := make(http.Header) + header1 := "header1" + header2 := "header2" + headerValue := []string{"some value"} + + reqHeaders[header1] = headerValue + recordedHeaders[header1] = headerValue + + req := http.Request{Header: reqHeaders} + recReq := cassette.Request{Headers: recordedHeaders} + + // add a new header to just the recording + recordedHeaders[header2] = headerValue + + assert.False(compareHeaders(&req, recReq, context)) +} + +func (s *requestMatcherTests) TestCompareHeadersFailsMismatchedValues() { + assert := assert.New(s.T()) + context := NewTestContext(func(msg string) { assert.FailNow(msg) }, func(msg string) { s.T().Log(msg) }, func() string { return s.T().Name() }) + + // populate only ignored headers that do not match + reqHeaders := make(http.Header) + recordedHeaders := make(http.Header) + header1 := "header1" + header2 := "header2" + headerValue := []string{"some value"} + mismatch := []string{"mismatch"} + + reqHeaders[header1] = headerValue + recordedHeaders[header1] = headerValue + + req := http.Request{Header: reqHeaders} + recReq := cassette.Request{Headers: recordedHeaders} + + // header names match but values are different + recordedHeaders[header2] = headerValue + reqHeaders[header2] = mismatch + + assert.False(compareHeaders(&req, recReq, context)) +} + +func (s *requestMatcherTests) TestCompareURLs() { + assert := assert.New(s.T()) + context := NewTestContext(func(msg string) { assert.FailNow(msg) }, func(msg string) { s.T().Log(msg) }, func() string { return s.T().Name() }) + scheme := "https" + host := "foo.bar" + req := http.Request{URL: &url.URL{Scheme: scheme, Host: host}} + recReq := cassette.Request{URL: scheme + "://" + host} + + assert.True(compareURLs(&req, recReq, context)) + + req.URL.Path = "noMatch" + + assert.False(compareURLs(&req, recReq, context)) +} + +func (s *requestMatcherTests) TestCompareMethods() { + assert := assert.New(s.T()) + context := NewTestContext(func(msg string) { assert.FailNow(msg) }, func(msg string) { s.T().Log(msg) }, func() string { return s.T().Name() }) + methodPost := "POST" + methodPatch := "PATCH" + req := http.Request{Method: methodPost} + recReq := cassette.Request{Method: methodPost} + + assert.True(compareMethods(&req, recReq, context)) + + req.Method = methodPatch + + assert.False(compareMethods(&req, recReq, context)) +} + +func closerFromString(content string) io.ReadCloser { + return ioutil.NopCloser(strings.NewReader(content)) +} diff --git a/sdk/internal/testframework/testcontext.go b/sdk/internal/testframework/testcontext.go new file mode 100644 index 000000000000..97bcc132e5ef --- /dev/null +++ b/sdk/internal/testframework/testcontext.go @@ -0,0 +1,50 @@ +// +build go1.13 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package testframework + +type TestContext interface { + Fail(string) + Log(string) + Name() string + IsFailed() bool +} + +type testContext struct { + failed bool + fail Failer + log Logger + name string +} + +type Failer func(string) +type Logger func(string) +type Name func() string + +// NewTestContext initializes a new TestContext +func NewTestContext(failer Failer, logger Logger, name Name) TestContext { + return &testContext{fail: failer, log: logger, name: name()} +} + +// Fail calls the Failer func and makes IsFailed return true. +func (c *testContext) Fail(msg string) { + c.failed = true + c.fail(msg) +} + +// Log calls the Logger func. +func (c *testContext) Log(msg string) { + c.log(msg) +} + +// Name calls the Name func and returns the result. +func (c *testContext) Name() string { + return c.name +} + +// IsFailed returns true if the Failer has been called. +func (c *testContext) IsFailed() bool { + return c.failed +} diff --git a/sdk/tables/aztables/tableClient.go b/sdk/tables/aztables/tableClient.go index edc74ece6075..d24ae0a14931 100644 --- a/sdk/tables/aztables/tableClient.go +++ b/sdk/tables/aztables/tableClient.go @@ -5,6 +5,7 @@ package aztables import ( "context" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" ) diff --git a/sdk/tables/aztables/tableClient_test.go b/sdk/tables/aztables/tableClient_test.go index 0b76e48fd15d..45b97edc2d47 100644 --- a/sdk/tables/aztables/tableClient_test.go +++ b/sdk/tables/aztables/tableClient_test.go @@ -4,9 +4,15 @@ package aztables import ( - chk "gopkg.in/check.v1" // go get gopkg.in/check.v1 + "testing" ) -func (s *aztestsSuite) TestContainerCreateAccessContainer(c *chk.C) { +func TestContainerCreateAccessContainer(t *testing.T) { // TODO + cred, err := NewSharedKeyCredential("foo", "Kg==") + if err != nil { + t.Fatal(err) + } + + NewTableClient("https://foo", cred, &TableClientOptions{}) } diff --git a/sdk/tables/aztables/zc_client_options.go b/sdk/tables/aztables/zc_client_options.go index cf24278fd2d2..f0a7200fd141 100644 --- a/sdk/tables/aztables/zc_client_options.go +++ b/sdk/tables/aztables/zc_client_options.go @@ -23,7 +23,7 @@ func (o *TableClientOptions) getConnectionOptions() *connectionOptions { return &connectionOptions{ HTTPClient: o.HTTPClient, - Retry: o.Retry, - Telemetry: o.Telemetry, + Retry: o.Retry, + Telemetry: o.Telemetry, } -} \ No newline at end of file +} diff --git a/sdk/tables/aztables/zz_generated_connection.go b/sdk/tables/aztables/zz_generated_connection.go index 990122c2b6e3..325fa053b1bd 100644 --- a/sdk/tables/aztables/zz_generated_connection.go +++ b/sdk/tables/aztables/zz_generated_connection.go @@ -14,6 +14,7 @@ import ( const scope = "foo" const telemetryInfo = "azsdk-go-tables/" + // connectionOptions contains configuration settings for the connection's pipeline. // All zero-value fields will be initialized with their default values. type connectionOptions struct { @@ -67,7 +68,6 @@ func (c *connection) Endpoint() string { } // Pipeline returns the connection's pipeline. -func (c *connection) Pipeline() (azcore.Pipeline) { +func (c *connection) Pipeline() azcore.Pipeline { return c.p } - From 1559e920265b783e81d9c858c1d3f4b33ef14de4 Mon Sep 17 00:00:00 2001 From: catalinaperalta Date: Wed, 28 Apr 2021 07:23:31 -0700 Subject: [PATCH 04/42] sanitizer fixes (#14600) --- sdk/internal/testframework/recording.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/internal/testframework/recording.go b/sdk/internal/testframework/recording.go index 0f1462812c59..2b008d55f3f8 100644 --- a/sdk/internal/testframework/recording.go +++ b/sdk/internal/testframework/recording.go @@ -33,7 +33,7 @@ type Recording struct { recorder *recorder.Recorder src rand.Source now *time.Time - sanitizer *RecordingSanitizer + Sanitizer *RecordingSanitizer c TestContext } @@ -104,7 +104,7 @@ func NewRecording(c TestContext, mode RecordMode) (*Recording, error) { rec.SetMatcher(recording.matchRequest) // wire up the sanitizer - DefaultSanitizer(rec) + recording.Sanitizer = DefaultSanitizer(rec) return recording, err } From fed39eb3580d547577cd49001f158d7835dfdd5c Mon Sep 17 00:00:00 2001 From: Christopher Scott Date: Fri, 21 May 2021 18:16:52 -0500 Subject: [PATCH 05/42] Progress on aztables (#14676) * implement batch operations and all entity operations --- .../testframework/recording_sanitizer.go | 2 +- sdk/tables/aztables/README.md | 6 + .../aztables/cosmos_patch_transform_policy.go | 27 + sdk/tables/aztables/go.mod | 9 +- sdk/tables/aztables/go.sum | 41 +- .../TestCreateTable-variables.yaml | 5 + .../TestCreateTable.yaml | 75 +++ .../TestQueryTable-variables.yaml | 5 + .../TestQueryTable.yaml | 499 ++++++++++++++++ .../TestServiceErrors-variables.yaml | 5 + .../TestServiceErrors.yaml | 113 ++++ .../TestCreateTable-variables.yaml | 5 + .../TestCreateTable.yaml | 85 +++ .../TestQueryTable-variables.yaml | 5 + .../TestQueryTable.yaml | 532 ++++++++++++++++++ .../TestServiceErrors-variables.yaml | 5 + .../TestServiceErrors.yaml | 129 +++++ .../TestAddComplexEntity-variables.yaml | 6 + .../TestAddComplexEntity.yaml | 121 ++++ .../TestAddEntity-variables.yaml | 5 + .../TestTableClient_Cosmos/TestAddEntity.yaml | 121 ++++ .../TestBatchAdd-variables.yaml | 6 + .../TestTableClient_Cosmos/TestBatchAdd.yaml | 203 +++++++ .../TestBatchError-variables.yaml | 6 + .../TestBatchError.yaml | 177 ++++++ .../TestBatchMixed-variables.yaml | 6 + .../TestBatchMixed.yaml | 281 +++++++++ .../TestCreateTable-variables.yaml | 5 + .../TestCreateTable.yaml | 75 +++ .../TestDeleteEntity-variables.yaml | 5 + .../TestDeleteEntity.yaml | 156 +++++ .../TestGetEntity-variables.yaml | 5 + .../TestTableClient_Cosmos/TestGetEntity.yaml | 157 ++++++ .../TestMergeEntity-variables.yaml | 5 + .../TestMergeEntity.yaml | 232 ++++++++ .../TestQueryComplexEntity-variables.yaml | 6 + .../TestQueryComplexEntity.yaml | 342 +++++++++++ .../TestQuerySimpleEntity-variables.yaml | 5 + .../TestQuerySimpleEntity.yaml | 342 +++++++++++ .../TestServiceErrors-variables.yaml | 5 + .../TestServiceErrors.yaml | 113 ++++ .../TestUpsertEntity-variables.yaml | 5 + .../TestUpsertEntity.yaml | 225 ++++++++ .../TestAddComplexEntity-variables.yaml | 6 + .../TestAddComplexEntity.yaml | 139 +++++ .../TestAddEntity-variables.yaml | 5 + .../TestAddEntity.yaml | 139 +++++ .../TestBatchAdd-variables.yaml | 6 + .../TestTableClient_Storage/TestBatchAdd.yaml | 229 ++++++++ .../TestBatchError-variables.yaml | 6 + .../TestBatchError.yaml | 202 +++++++ .../TestBatchMixed-variables.yaml | 6 + .../TestBatchMixed.yaml | 323 +++++++++++ .../TestCreateTable-variables.yaml | 5 + .../TestCreateTable.yaml | 85 +++ .../TestDeleteEntity-variables.yaml | 5 + .../TestDeleteEntity.yaml | 180 ++++++ .../TestGetEntity-variables.yaml | 5 + .../TestGetEntity.yaml | 181 ++++++ .../TestMergeEntity-variables.yaml | 5 + .../TestMergeEntity.yaml | 266 +++++++++ .../TestQueryComplexEntity-variables.yaml | 6 + .../TestQueryComplexEntity.yaml | 398 +++++++++++++ .../TestQuerySimpleEntity-variables.yaml | 5 + .../TestQuerySimpleEntity.yaml | 398 +++++++++++++ .../TestServiceErrors-variables.yaml | 5 + .../TestServiceErrors.yaml | 129 +++++ .../TestUpsertEntity-variables.yaml | 5 + .../TestUpsertEntity.yaml | 255 +++++++++ sdk/tables/aztables/tableClient.go | 40 -- sdk/tables/aztables/tableClient_test.go | 18 - sdk/tables/aztables/table_client.go | 129 +++++ sdk/tables/aztables/table_client_test.go | 489 ++++++++++++++++ sdk/tables/aztables/table_pagers.go | 442 +++++++++++++++ sdk/tables/aztables/table_pagers_test.go | 244 ++++++++ sdk/tables/aztables/table_service_client.go | 79 +++ .../aztables/table_service_client_test.go | 120 ++++ .../aztables/table_transactional_batch.go | 346 ++++++++++++ sdk/tables/aztables/zc_tableConstants.go | 23 + sdk/tables/aztables/zt_tableRecordedTests.go | 203 +++++++ sdk/tables/aztables/zt_test.go | 123 ---- .../aztables/zz_generated_connection.go | 28 +- sdk/tables/aztables/zz_generated_constants.go | 6 +- sdk/tables/aztables/zz_generated_models.go | 454 +++------------ .../aztables/zz_generated_response_types.go | 343 +++++++++++ ...vice.go => zz_generated_service_client.go} | 73 ++- ..._table.go => zz_generated_table_client.go} | 358 ++++++++---- 87 files changed, 9933 insertions(+), 742 deletions(-) create mode 100644 sdk/tables/aztables/cosmos_patch_transform_policy.go create mode 100644 sdk/tables/aztables/recordings/TestServiceClient_Cosmos/TestCreateTable-variables.yaml create mode 100644 sdk/tables/aztables/recordings/TestServiceClient_Cosmos/TestCreateTable.yaml create mode 100644 sdk/tables/aztables/recordings/TestServiceClient_Cosmos/TestQueryTable-variables.yaml create mode 100644 sdk/tables/aztables/recordings/TestServiceClient_Cosmos/TestQueryTable.yaml create mode 100644 sdk/tables/aztables/recordings/TestServiceClient_Cosmos/TestServiceErrors-variables.yaml create mode 100644 sdk/tables/aztables/recordings/TestServiceClient_Cosmos/TestServiceErrors.yaml create mode 100644 sdk/tables/aztables/recordings/TestServiceClient_Storage/TestCreateTable-variables.yaml create mode 100644 sdk/tables/aztables/recordings/TestServiceClient_Storage/TestCreateTable.yaml create mode 100644 sdk/tables/aztables/recordings/TestServiceClient_Storage/TestQueryTable-variables.yaml create mode 100644 sdk/tables/aztables/recordings/TestServiceClient_Storage/TestQueryTable.yaml create mode 100644 sdk/tables/aztables/recordings/TestServiceClient_Storage/TestServiceErrors-variables.yaml create mode 100644 sdk/tables/aztables/recordings/TestServiceClient_Storage/TestServiceErrors.yaml create mode 100644 sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestAddComplexEntity-variables.yaml create mode 100644 sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestAddComplexEntity.yaml create mode 100644 sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestAddEntity-variables.yaml create mode 100644 sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestAddEntity.yaml create mode 100644 sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestBatchAdd-variables.yaml create mode 100644 sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestBatchAdd.yaml create mode 100644 sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestBatchError-variables.yaml create mode 100644 sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestBatchError.yaml create mode 100644 sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestBatchMixed-variables.yaml create mode 100644 sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestBatchMixed.yaml create mode 100644 sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestCreateTable-variables.yaml create mode 100644 sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestCreateTable.yaml create mode 100644 sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestDeleteEntity-variables.yaml create mode 100644 sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestDeleteEntity.yaml create mode 100644 sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestGetEntity-variables.yaml create mode 100644 sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestGetEntity.yaml create mode 100644 sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestMergeEntity-variables.yaml create mode 100644 sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestMergeEntity.yaml create mode 100644 sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestQueryComplexEntity-variables.yaml create mode 100644 sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestQueryComplexEntity.yaml create mode 100644 sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestQuerySimpleEntity-variables.yaml create mode 100644 sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestQuerySimpleEntity.yaml create mode 100644 sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestServiceErrors-variables.yaml create mode 100644 sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestServiceErrors.yaml create mode 100644 sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestUpsertEntity-variables.yaml create mode 100644 sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestUpsertEntity.yaml create mode 100644 sdk/tables/aztables/recordings/TestTableClient_Storage/TestAddComplexEntity-variables.yaml create mode 100644 sdk/tables/aztables/recordings/TestTableClient_Storage/TestAddComplexEntity.yaml create mode 100644 sdk/tables/aztables/recordings/TestTableClient_Storage/TestAddEntity-variables.yaml create mode 100644 sdk/tables/aztables/recordings/TestTableClient_Storage/TestAddEntity.yaml create mode 100644 sdk/tables/aztables/recordings/TestTableClient_Storage/TestBatchAdd-variables.yaml create mode 100644 sdk/tables/aztables/recordings/TestTableClient_Storage/TestBatchAdd.yaml create mode 100644 sdk/tables/aztables/recordings/TestTableClient_Storage/TestBatchError-variables.yaml create mode 100644 sdk/tables/aztables/recordings/TestTableClient_Storage/TestBatchError.yaml create mode 100644 sdk/tables/aztables/recordings/TestTableClient_Storage/TestBatchMixed-variables.yaml create mode 100644 sdk/tables/aztables/recordings/TestTableClient_Storage/TestBatchMixed.yaml create mode 100644 sdk/tables/aztables/recordings/TestTableClient_Storage/TestCreateTable-variables.yaml create mode 100644 sdk/tables/aztables/recordings/TestTableClient_Storage/TestCreateTable.yaml create mode 100644 sdk/tables/aztables/recordings/TestTableClient_Storage/TestDeleteEntity-variables.yaml create mode 100644 sdk/tables/aztables/recordings/TestTableClient_Storage/TestDeleteEntity.yaml create mode 100644 sdk/tables/aztables/recordings/TestTableClient_Storage/TestGetEntity-variables.yaml create mode 100644 sdk/tables/aztables/recordings/TestTableClient_Storage/TestGetEntity.yaml create mode 100644 sdk/tables/aztables/recordings/TestTableClient_Storage/TestMergeEntity-variables.yaml create mode 100644 sdk/tables/aztables/recordings/TestTableClient_Storage/TestMergeEntity.yaml create mode 100644 sdk/tables/aztables/recordings/TestTableClient_Storage/TestQueryComplexEntity-variables.yaml create mode 100644 sdk/tables/aztables/recordings/TestTableClient_Storage/TestQueryComplexEntity.yaml create mode 100644 sdk/tables/aztables/recordings/TestTableClient_Storage/TestQuerySimpleEntity-variables.yaml create mode 100644 sdk/tables/aztables/recordings/TestTableClient_Storage/TestQuerySimpleEntity.yaml create mode 100644 sdk/tables/aztables/recordings/TestTableClient_Storage/TestServiceErrors-variables.yaml create mode 100644 sdk/tables/aztables/recordings/TestTableClient_Storage/TestServiceErrors.yaml create mode 100644 sdk/tables/aztables/recordings/TestTableClient_Storage/TestUpsertEntity-variables.yaml create mode 100644 sdk/tables/aztables/recordings/TestTableClient_Storage/TestUpsertEntity.yaml delete mode 100644 sdk/tables/aztables/tableClient.go delete mode 100644 sdk/tables/aztables/tableClient_test.go create mode 100644 sdk/tables/aztables/table_client.go create mode 100644 sdk/tables/aztables/table_client_test.go create mode 100644 sdk/tables/aztables/table_pagers.go create mode 100644 sdk/tables/aztables/table_pagers_test.go create mode 100644 sdk/tables/aztables/table_service_client.go create mode 100644 sdk/tables/aztables/table_service_client_test.go create mode 100644 sdk/tables/aztables/table_transactional_batch.go create mode 100644 sdk/tables/aztables/zc_tableConstants.go create mode 100644 sdk/tables/aztables/zt_tableRecordedTests.go delete mode 100644 sdk/tables/aztables/zt_test.go create mode 100644 sdk/tables/aztables/zz_generated_response_types.go rename sdk/tables/aztables/{zz_generated_service.go => zz_generated_service_client.go} (79%) rename sdk/tables/aztables/{zz_generated_table.go => zz_generated_table_client.go} (74%) diff --git a/sdk/internal/testframework/recording_sanitizer.go b/sdk/internal/testframework/recording_sanitizer.go index ac4311ef46a2..873844b7703b 100644 --- a/sdk/internal/testframework/recording_sanitizer.go +++ b/sdk/internal/testframework/recording_sanitizer.go @@ -28,7 +28,7 @@ var sanitizedValueSlice = []string{SanitizedValue} func DefaultSanitizer(recorder *recorder.Recorder) *RecordingSanitizer { // The default sanitizer sanitizes the Authorization header - s := &RecordingSanitizer{headersToSanitize: map[string]*string{"Authorization": nil}, recorder: recorder, urlSanitizer: DefaultStringSanitizer} + s := &RecordingSanitizer{headersToSanitize: map[string]*string{"Authorization": nil}, recorder: recorder, urlSanitizer: DefaultStringSanitizer, bodySanitizer: DefaultStringSanitizer} recorder.AddSaveFilter(s.applySaveFilter) return s diff --git a/sdk/tables/aztables/README.md b/sdk/tables/aztables/README.md index 18eb9c67c656..ffcd20626bea 100644 --- a/sdk/tables/aztables/README.md +++ b/sdk/tables/aztables/README.md @@ -129,6 +129,12 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For more information see the [Code of Conduct FAQ][coc_faq] or contact [opencode@microsoft.com][coc_contact] with any additional questions or comments. +## Generating the client + +From the tables dir: + +autorest --use=@autorest/go@4.0.0-preview.20 https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/cosmos-db/data-plane/readme.md --tag=package-2019-02 --file-prefix="zz_generated_" --modelerfour.lenient-model-deduplication --license-header=MICROSOFT_MIT_NO_VERSION --output-folder=aztables --module=aztables --openapi-type="data-plane" --credential-scope=none + [tables_rest]: https://docs.microsoft.com/rest/api/storageservices/table-service-rest-api [azure_cli]: https://docs.microsoft.com/cli/azure diff --git a/sdk/tables/aztables/cosmos_patch_transform_policy.go b/sdk/tables/aztables/cosmos_patch_transform_policy.go new file mode 100644 index 000000000000..93e8ffa9d61b --- /dev/null +++ b/sdk/tables/aztables/cosmos_patch_transform_policy.go @@ -0,0 +1,27 @@ +// +build go1.13 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package aztables + +import ( + "net/http" + + "github.com/Azure/azure-sdk-for-go/sdk/azcore" +) + +// CosmosPatchTransformPolicy transforms PATCH requests into POST requests with the "X-HTTP-Method":"MERGE" header set. +type CosmosPatchTransformPolicy struct{} + +func (p CosmosPatchTransformPolicy) Do(req *azcore.Request) (*azcore.Response, error) { + transformPatchToCosmosPost(req) + return req.Next() +} + +func transformPatchToCosmosPost(req *azcore.Request) { + if req.Method == http.MethodPatch { + req.Method = http.MethodPost + req.Header.Set("X-HTTP-Method", "MERGE") + } +} diff --git a/sdk/tables/aztables/go.mod b/sdk/tables/aztables/go.mod index a37066df4bb0..2992eb5c22c4 100644 --- a/sdk/tables/aztables/go.mod +++ b/sdk/tables/aztables/go.mod @@ -2,7 +2,12 @@ module github.com/Azure/azure-sdk-for-go/sdk/tables/aztables go 1.13 +replace github.com/Azure/azure-sdk-for-go/sdk/internal => ../../internal + require ( - github.com/Azure/azure-sdk-for-go/sdk/azcore v0.14.1 - gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c + github.com/Azure/azure-sdk-for-go/sdk/azcore v0.16.1 + github.com/Azure/azure-sdk-for-go/sdk/internal v0.5.1 + github.com/stretchr/testify v1.7.0 + golang.org/x/net v0.0.0-20210510120150-4163338589ed // indirect + gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect ) diff --git a/sdk/tables/aztables/go.sum b/sdk/tables/aztables/go.sum index 369497e547f8..6de49c407854 100644 --- a/sdk/tables/aztables/go.sum +++ b/sdk/tables/aztables/go.sum @@ -1,23 +1,38 @@ -github.com/Azure/azure-sdk-for-go/sdk/azcore v0.14.1 h1:7JdDsau2B5IZc0d0CPvSMn8DxJ3GRBxtFS7OrZPIJdA= -github.com/Azure/azure-sdk-for-go/sdk/azcore v0.14.1/go.mod h1:pElNP+u99BvCZD+0jOlhI9OC/NB2IDTOTGZOZH0Qhq8= -github.com/Azure/azure-sdk-for-go/sdk/internal v0.5.0 h1:HG1ggl8L3ZkV/Ydanf7lKr5kkhhPGCpWdnr1J6v7cO4= -github.com/Azure/azure-sdk-for-go/sdk/internal v0.5.0/go.mod h1:k4KbFSunV/+0hOHL1vyFaPsiYQ1Vmvy1TBpmtvCDLZM= -github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= -github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/Azure/azure-sdk-for-go/sdk/azcore v0.16.1 h1:yQw8Ah26gBP4dv66ZNjZpRBRV+gaHH/0TLn1taU4FZ4= +github.com/Azure/azure-sdk-for-go/sdk/azcore v0.16.1/go.mod h1:MVdrcUC4Hup35qHym3VdzoW+NBgBxrta9Vei97jRtM8= +github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dnaeon/go-vcr v1.1.0 h1:ReYa/UBrRyQdant9B4fNHGoCNKw6qh6P0fsdGmZpR7c= +github.com/dnaeon/go-vcr v1.1.0/go.mod h1:M7tiix8f0r6mKKJ3Yq/kqU1OYf3MnfmBWVbPx/yU9ko= +github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/stretchr/objx v0.1.0 h1:4G4v2dO3VZwixGIRoQ5Lfboy6nUhCyYzaqnIAPPhYs4= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20201010224723-4f7140c49acb h1:mUVeFHoDKis5nxCAzoAi7E8Ghb86EXh/RK6wtvJIqRY= golang.org/x/net v0.0.0-20201010224723-4f7140c49acb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20210510120150-4163338589ed h1:p9UgmWI9wKpfYmgaV/IZKGdXc5qEK45tDwwwDyjS26I= +golang.org/x/net v0.0.0-20210510120150-4163338589ed/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/sdk/tables/aztables/recordings/TestServiceClient_Cosmos/TestCreateTable-variables.yaml b/sdk/tables/aztables/recordings/TestServiceClient_Cosmos/TestCreateTable-variables.yaml new file mode 100644 index 000000000000..7c9e2af36ee8 --- /dev/null +++ b/sdk/tables/aztables/recordings/TestServiceClient_Cosmos/TestCreateTable-variables.yaml @@ -0,0 +1,5 @@ +--- +COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com +TABLES_COSMOS_ACCOUNT_NAME: chrisstablesprim +TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== +randomSeed: "1617573293" diff --git a/sdk/tables/aztables/recordings/TestServiceClient_Cosmos/TestCreateTable.yaml b/sdk/tables/aztables/recordings/TestServiceClient_Cosmos/TestCreateTable.yaml new file mode 100644 index 000000000000..032f93240511 --- /dev/null +++ b/sdk/tables/aztables/recordings/TestServiceClient_Cosmos/TestCreateTable.yaml @@ -0,0 +1,75 @@ +--- +version: 1 +interactions: +- request: + body: '{"TableName":"gotablecwmvbx3xi23m7"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "36" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Sun, 04 Apr 2021 21:54:53 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.cosmos.azure.com/Tables + method: POST + response: + body: '{"TableName":"gotablecwmvbx3xi23m7","odata.metadata":"https://chrisstablesprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' + headers: + Content-Type: + - application/json;odata=minimalmetadata + Date: + - Sun, 04 Apr 2021 21:54:53 GMT + Etag: + - W/"datetime'2021-04-04T21%3A54%3A53.3743624Z'" + Location: + - https://chrisstablesprim.table.cosmos.azure.com/Tables('gotablecwmvbx3xi23m7') + Server: + - Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - 33edc858-c2fc-436f-a0a0-8f909cfd1114 + status: 201 Created + code: 201 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Sun, 04 Apr 2021 21:54:53 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.cosmos.azure.com/Tables('gotablecwmvbx3xi23m7') + method: DELETE + response: + body: "" + headers: + Content-Length: + - "0" + Date: + - Sun, 04 Apr 2021 21:54:53 GMT + Server: + - Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - 654da1b1-025b-451e-8d64-d3c4afe7739a + status: 204 No Content + code: 204 + duration: "" diff --git a/sdk/tables/aztables/recordings/TestServiceClient_Cosmos/TestQueryTable-variables.yaml b/sdk/tables/aztables/recordings/TestServiceClient_Cosmos/TestQueryTable-variables.yaml new file mode 100644 index 000000000000..e1d3c746ac8b --- /dev/null +++ b/sdk/tables/aztables/recordings/TestServiceClient_Cosmos/TestQueryTable-variables.yaml @@ -0,0 +1,5 @@ +--- +COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com +TABLES_COSMOS_ACCOUNT_NAME: chrisstablesprim +TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== +randomSeed: "1617573294" diff --git a/sdk/tables/aztables/recordings/TestServiceClient_Cosmos/TestQueryTable.yaml b/sdk/tables/aztables/recordings/TestServiceClient_Cosmos/TestQueryTable.yaml new file mode 100644 index 000000000000..4451edbf754c --- /dev/null +++ b/sdk/tables/aztables/recordings/TestServiceClient_Cosmos/TestQueryTable.yaml @@ -0,0 +1,499 @@ +--- +version: 1 +interactions: +- request: + body: '{"TableName":"zzza6868drab2e097oxu"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "36" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Sun, 04 Apr 2021 21:54:54 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.cosmos.azure.com/Tables + method: POST + response: + body: '{"TableName":"zzza6868drab2e097oxu","odata.metadata":"https://chrisstablesprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' + headers: + Content-Type: + - application/json;odata=minimalmetadata + Date: + - Sun, 04 Apr 2021 21:54:53 GMT + Etag: + - W/"datetime'2021-04-04T21%3A54%3A54.2225416Z'" + Location: + - https://chrisstablesprim.table.cosmos.azure.com/Tables('zzza6868drab2e097oxu') + Server: + - Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - b9dd1425-f416-44cd-9759-fa6ddc763d8e + status: 201 Created + code: 201 + duration: "" +- request: + body: '{"TableName":"zzza47kqkxef1dqg6hk5"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "36" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Sun, 04 Apr 2021 21:54:54 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.cosmos.azure.com/Tables + method: POST + response: + body: '{"TableName":"zzza47kqkxef1dqg6hk5","odata.metadata":"https://chrisstablesprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' + headers: + Content-Type: + - application/json;odata=minimalmetadata + Date: + - Sun, 04 Apr 2021 21:54:55 GMT + Etag: + - W/"datetime'2021-04-04T21%3A54%3A54.7395592Z'" + Location: + - https://chrisstablesprim.table.cosmos.azure.com/Tables('zzza47kqkxef1dqg6hk5') + Server: + - Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - 7cc0bdc4-bc2e-41a5-a9d5-718481425834 + status: 201 Created + code: 201 + duration: "" +- request: + body: '{"TableName":"zzzancjsimv46ssmus2y"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "36" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Sun, 04 Apr 2021 21:54:55 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.cosmos.azure.com/Tables + method: POST + response: + body: '{"TableName":"zzzancjsimv46ssmus2y","odata.metadata":"https://chrisstablesprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' + headers: + Content-Type: + - application/json;odata=minimalmetadata + Date: + - Sun, 04 Apr 2021 21:54:55 GMT + Etag: + - W/"datetime'2021-04-04T21%3A54%3A55.2994824Z'" + Location: + - https://chrisstablesprim.table.cosmos.azure.com/Tables('zzzancjsimv46ssmus2y') + Server: + - Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - 458c58e3-3247-448a-a542-de9f20e68872 + status: 201 Created + code: 201 + duration: "" +- request: + body: '{"TableName":"zzzau7wd11jeadrhkzia"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "36" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Sun, 04 Apr 2021 21:54:55 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.cosmos.azure.com/Tables + method: POST + response: + body: '{"TableName":"zzzau7wd11jeadrhkzia","odata.metadata":"https://chrisstablesprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' + headers: + Content-Type: + - application/json;odata=minimalmetadata + Date: + - Sun, 04 Apr 2021 21:54:56 GMT + Etag: + - W/"datetime'2021-04-04T21%3A54%3A55.8298120Z'" + Location: + - https://chrisstablesprim.table.cosmos.azure.com/Tables('zzzau7wd11jeadrhkzia') + Server: + - Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - e08277e1-0ac2-4cb7-a9c2-3ad4d593d33e + status: 201 Created + code: 201 + duration: "" +- request: + body: '{"TableName":"zzzbm74eob1xykl1zb71"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "36" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Sun, 04 Apr 2021 21:54:56 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.cosmos.azure.com/Tables + method: POST + response: + body: '{"TableName":"zzzbm74eob1xykl1zb71","odata.metadata":"https://chrisstablesprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' + headers: + Content-Type: + - application/json;odata=minimalmetadata + Date: + - Sun, 04 Apr 2021 21:54:56 GMT + Etag: + - W/"datetime'2021-04-04T21%3A54%3A56.4097032Z'" + Location: + - https://chrisstablesprim.table.cosmos.azure.com/Tables('zzzbm74eob1xykl1zb71') + Server: + - Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - aba90f45-d352-46e5-8d0b-32d749a29ac3 + status: 201 Created + code: 201 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Sun, 04 Apr 2021 21:54:56 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.cosmos.azure.com/Tables?%24filter=TableName+ge+%27zzza%27+and+TableName+lt+%27zzzb%27 + method: GET + response: + body: '{"value":[{"TableName":"zzza6868drab2e097oxu"},{"TableName":"zzza47kqkxef1dqg6hk5"},{"TableName":"zzzancjsimv46ssmus2y"},{"TableName":"zzzau7wd11jeadrhkzia"}],"odata.metadata":"https://chrisstablesprim.table.cosmos.azure.com/$metadata#Tables"}' + headers: + Content-Type: + - application/json;odata=minimalmetadata + Date: + - Sun, 04 Apr 2021 21:54:56 GMT + Server: + - Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - e277f56f-be38-4847-bcc7-d404818cc2a4 + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Sun, 04 Apr 2021 21:54:57 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.cosmos.azure.com/Tables?%24filter=TableName+ge+%27zzza%27+and+TableName+lt+%27zzzb%27&%24top=2 + method: GET + response: + body: '{"value":[{"TableName":"zzza6868drab2e097oxu"},{"TableName":"zzza47kqkxef1dqg6hk5"}],"odata.metadata":"https://chrisstablesprim.table.cosmos.azure.com/$metadata#Tables"}' + headers: + Content-Type: + - application/json;odata=minimalmetadata + Date: + - Sun, 04 Apr 2021 21:54:56 GMT + Server: + - Microsoft-HTTPAPI/2.0 + X-Ms-Continuation-Nexttablename: + - -RID:~-mg9ANt+LD8=#RT:1#TRC:2 + X-Ms-Request-Id: + - 89b83810-e42f-46f9-a174-3a0cd1ebd42b + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Sun, 04 Apr 2021 21:54:57 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.cosmos.azure.com/Tables?%24filter=TableName+ge+%27zzza%27+and+TableName+lt+%27zzzb%27&%24top=2&NextTableName=-RID%3A~-mg9ANt%2BLD8%3D%23RT%3A1%23TRC%3A2 + method: GET + response: + body: '{"value":[{"TableName":"zzzancjsimv46ssmus2y"},{"TableName":"zzzau7wd11jeadrhkzia"}],"odata.metadata":"https://chrisstablesprim.table.cosmos.azure.com/$metadata#Tables"}' + headers: + Content-Type: + - application/json;odata=minimalmetadata + Date: + - Sun, 04 Apr 2021 21:54:56 GMT + Server: + - Microsoft-HTTPAPI/2.0 + X-Ms-Continuation-Nexttablename: + - -RID:~-mg9AOab5rE=#RT:2#TRC:4 + X-Ms-Request-Id: + - 5b359f2a-f01b-4b51-88b8-f555384be342 + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Sun, 04 Apr 2021 21:54:57 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.cosmos.azure.com/Tables?%24filter=TableName+ge+%27zzza%27+and+TableName+lt+%27zzzb%27&%24top=2&NextTableName=-RID%3A~-mg9AOab5rE%3D%23RT%3A2%23TRC%3A4 + method: GET + response: + body: '{"value":[],"odata.metadata":"https://chrisstablesprim.table.cosmos.azure.com/$metadata#Tables"}' + headers: + Content-Type: + - application/json;odata=minimalmetadata + Date: + - Sun, 04 Apr 2021 21:54:56 GMT + Server: + - Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - bac31683-48dc-4dba-86b7-5299f8f80b14 + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Sun, 04 Apr 2021 21:54:57 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.cosmos.azure.com/Tables('zzza6868drab2e097oxu') + method: DELETE + response: + body: "" + headers: + Content-Length: + - "0" + Date: + - Sun, 04 Apr 2021 21:54:57 GMT + Server: + - Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - 4e2b7f94-e9a9-4397-9ec1-c4808f908cf0 + status: 204 No Content + code: 204 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Sun, 04 Apr 2021 21:54:57 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.cosmos.azure.com/Tables('zzza47kqkxef1dqg6hk5') + method: DELETE + response: + body: "" + headers: + Content-Length: + - "0" + Date: + - Sun, 04 Apr 2021 21:54:57 GMT + Server: + - Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - 0c5dda5b-2983-493f-8114-90378a12a073 + status: 204 No Content + code: 204 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Sun, 04 Apr 2021 21:54:58 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.cosmos.azure.com/Tables('zzzancjsimv46ssmus2y') + method: DELETE + response: + body: "" + headers: + Content-Length: + - "0" + Date: + - Sun, 04 Apr 2021 21:54:57 GMT + Server: + - Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - 7f4c8bcf-9801-493b-90b8-84ee3935af02 + status: 204 No Content + code: 204 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Sun, 04 Apr 2021 21:54:58 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.cosmos.azure.com/Tables('zzzau7wd11jeadrhkzia') + method: DELETE + response: + body: "" + headers: + Content-Length: + - "0" + Date: + - Sun, 04 Apr 2021 21:54:58 GMT + Server: + - Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - a05000dd-1cfe-4256-88b7-e6be74a2d7df + status: 204 No Content + code: 204 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Sun, 04 Apr 2021 21:54:58 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.cosmos.azure.com/Tables('zzzbm74eob1xykl1zb71') + method: DELETE + response: + body: "" + headers: + Content-Length: + - "0" + Date: + - Sun, 04 Apr 2021 21:54:58 GMT + Server: + - Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - 81acb8ac-7460-4aa8-b548-e426c88aba21 + status: 204 No Content + code: 204 + duration: "" diff --git a/sdk/tables/aztables/recordings/TestServiceClient_Cosmos/TestServiceErrors-variables.yaml b/sdk/tables/aztables/recordings/TestServiceClient_Cosmos/TestServiceErrors-variables.yaml new file mode 100644 index 000000000000..760bc4d4fdfb --- /dev/null +++ b/sdk/tables/aztables/recordings/TestServiceClient_Cosmos/TestServiceErrors-variables.yaml @@ -0,0 +1,5 @@ +--- +COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com +TABLES_COSMOS_ACCOUNT_NAME: chrisstablesprim +TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== +randomSeed: "1617573550" diff --git a/sdk/tables/aztables/recordings/TestServiceClient_Cosmos/TestServiceErrors.yaml b/sdk/tables/aztables/recordings/TestServiceClient_Cosmos/TestServiceErrors.yaml new file mode 100644 index 000000000000..d3b9bf432eb8 --- /dev/null +++ b/sdk/tables/aztables/recordings/TestServiceClient_Cosmos/TestServiceErrors.yaml @@ -0,0 +1,113 @@ +--- +version: 1 +interactions: +- request: + body: '{"TableName":"gotable5hickrxl8lpbo"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "36" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Sun, 04 Apr 2021 21:59:10 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.cosmos.azure.com/Tables + method: POST + response: + body: '{"TableName":"gotable5hickrxl8lpbo","odata.metadata":"https://chrisstablesprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' + headers: + Content-Type: + - application/json;odata=minimalmetadata + Date: + - Sun, 04 Apr 2021 21:59:11 GMT + Etag: + - W/"datetime'2021-04-04T21%3A59%3A10.9652488Z'" + Location: + - https://chrisstablesprim.table.cosmos.azure.com/Tables('gotable5hickrxl8lpbo') + Server: + - Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - a5903255-58e5-4c43-bad9-f5e92cd5bd68 + status: 201 Created + code: 201 + duration: "" +- request: + body: '{"TableName":"gotable5hickrxl8lpbo"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "36" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Sun, 04 Apr 2021 21:59:11 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.cosmos.azure.com/Tables + method: POST + response: + body: "{\"odata.error\":{\"code\":\"TableAlreadyExists\",\"message\":{\"lang\":\"en-us\",\"value\":\"The + specified table already exists.\\nRequestID:e216471c-9dae-4105-99a9-66a274775cce\\n\"}}}\r\n" + headers: + Content-Type: + - application/json;odata=minimalmetadata + Date: + - Sun, 04 Apr 2021 21:59:11 GMT + Server: + - Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - e216471c-9dae-4105-99a9-66a274775cce + status: 409 Conflict + code: 409 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Sun, 04 Apr 2021 21:59:11 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.cosmos.azure.com/Tables('gotable5hickrxl8lpbo') + method: DELETE + response: + body: "" + headers: + Content-Length: + - "0" + Date: + - Sun, 04 Apr 2021 21:59:11 GMT + Server: + - Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - c8bbfa46-7d78-46af-a6cb-b54bd57237af + status: 204 No Content + code: 204 + duration: "" diff --git a/sdk/tables/aztables/recordings/TestServiceClient_Storage/TestCreateTable-variables.yaml b/sdk/tables/aztables/recordings/TestServiceClient_Storage/TestCreateTable-variables.yaml new file mode 100644 index 000000000000..9b7c965397f6 --- /dev/null +++ b/sdk/tables/aztables/recordings/TestServiceClient_Storage/TestCreateTable-variables.yaml @@ -0,0 +1,5 @@ +--- +STORAGE_ENDPOINT_SUFFIX: core.windows.net +TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== +TABLES_STORAGE_ACCOUNT_NAME: chrisstablesprim +randomSeed: "1617573291" diff --git a/sdk/tables/aztables/recordings/TestServiceClient_Storage/TestCreateTable.yaml b/sdk/tables/aztables/recordings/TestServiceClient_Storage/TestCreateTable.yaml new file mode 100644 index 000000000000..f5f90205815d --- /dev/null +++ b/sdk/tables/aztables/recordings/TestServiceClient_Storage/TestCreateTable.yaml @@ -0,0 +1,85 @@ +--- +version: 1 +interactions: +- request: + body: '{"TableName":"gotablep06y44pq0dcqy"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "36" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Sun, 04 Apr 2021 21:54:51 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.core.windows.net/Tables + method: POST + response: + body: '{"odata.metadata":"https://chrisstablesprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotablep06y44pq0dcqy"}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + Date: + - Sun, 04 Apr 2021 21:54:51 GMT + Location: + - https://chrisstablesprim.table.core.windows.net/Tables('gotablep06y44pq0dcqy') + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - aa171c82-c002-0053-409d-291720000000 + X-Ms-Version: + - "2019-02-02" + status: 201 Created + code: 201 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Sun, 04 Apr 2021 21:54:51 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.core.windows.net/Tables('gotablep06y44pq0dcqy') + method: DELETE + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Date: + - Sun, 04 Apr 2021 21:54:51 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - aa171c8d-c002-0053-4a9d-291720000000 + X-Ms-Version: + - "2019-02-02" + status: 204 No Content + code: 204 + duration: "" diff --git a/sdk/tables/aztables/recordings/TestServiceClient_Storage/TestQueryTable-variables.yaml b/sdk/tables/aztables/recordings/TestServiceClient_Storage/TestQueryTable-variables.yaml new file mode 100644 index 000000000000..9b7c965397f6 --- /dev/null +++ b/sdk/tables/aztables/recordings/TestServiceClient_Storage/TestQueryTable-variables.yaml @@ -0,0 +1,5 @@ +--- +STORAGE_ENDPOINT_SUFFIX: core.windows.net +TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== +TABLES_STORAGE_ACCOUNT_NAME: chrisstablesprim +randomSeed: "1617573291" diff --git a/sdk/tables/aztables/recordings/TestServiceClient_Storage/TestQueryTable.yaml b/sdk/tables/aztables/recordings/TestServiceClient_Storage/TestQueryTable.yaml new file mode 100644 index 000000000000..2431a475cb56 --- /dev/null +++ b/sdk/tables/aztables/recordings/TestServiceClient_Storage/TestQueryTable.yaml @@ -0,0 +1,532 @@ +--- +version: 1 +interactions: +- request: + body: '{"TableName":"zzzap06y44pq0dcqyefd"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "36" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Sun, 04 Apr 2021 21:54:51 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.core.windows.net/Tables + method: POST + response: + body: '{"odata.metadata":"https://chrisstablesprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"zzzap06y44pq0dcqyefd"}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + Date: + - Sun, 04 Apr 2021 21:54:51 GMT + Location: + - https://chrisstablesprim.table.core.windows.net/Tables('zzzap06y44pq0dcqyefd') + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - aa171c98-c002-0053-539d-291720000000 + X-Ms-Version: + - "2019-02-02" + status: 201 Created + code: 201 + duration: "" +- request: + body: '{"TableName":"zzzas5q9cqk9i1o44v25"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "36" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Sun, 04 Apr 2021 21:54:52 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.core.windows.net/Tables + method: POST + response: + body: '{"odata.metadata":"https://chrisstablesprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"zzzas5q9cqk9i1o44v25"}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + Date: + - Sun, 04 Apr 2021 21:54:51 GMT + Location: + - https://chrisstablesprim.table.core.windows.net/Tables('zzzas5q9cqk9i1o44v25') + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - aa171ca1-c002-0053-5b9d-291720000000 + X-Ms-Version: + - "2019-02-02" + status: 201 Created + code: 201 + duration: "" +- request: + body: '{"TableName":"zzzavphdrg4ipo7z4boc"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "36" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Sun, 04 Apr 2021 21:54:52 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.core.windows.net/Tables + method: POST + response: + body: '{"odata.metadata":"https://chrisstablesprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"zzzavphdrg4ipo7z4boc"}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + Date: + - Sun, 04 Apr 2021 21:54:51 GMT + Location: + - https://chrisstablesprim.table.core.windows.net/Tables('zzzavphdrg4ipo7z4boc') + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - aa171ca9-c002-0053-629d-291720000000 + X-Ms-Version: + - "2019-02-02" + status: 201 Created + code: 201 + duration: "" +- request: + body: '{"TableName":"zzzanoa2c4lxhmr55w1n"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "36" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Sun, 04 Apr 2021 21:54:52 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.core.windows.net/Tables + method: POST + response: + body: '{"odata.metadata":"https://chrisstablesprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"zzzanoa2c4lxhmr55w1n"}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + Date: + - Sun, 04 Apr 2021 21:54:51 GMT + Location: + - https://chrisstablesprim.table.core.windows.net/Tables('zzzanoa2c4lxhmr55w1n') + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - aa171cb5-c002-0053-6c9d-291720000000 + X-Ms-Version: + - "2019-02-02" + status: 201 Created + code: 201 + duration: "" +- request: + body: '{"TableName":"zzzbq0ics0v4b1nbyytz"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "36" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Sun, 04 Apr 2021 21:54:52 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.core.windows.net/Tables + method: POST + response: + body: '{"odata.metadata":"https://chrisstablesprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"zzzbq0ics0v4b1nbyytz"}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + Date: + - Sun, 04 Apr 2021 21:54:51 GMT + Location: + - https://chrisstablesprim.table.core.windows.net/Tables('zzzbq0ics0v4b1nbyytz') + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - aa171cbe-c002-0053-739d-291720000000 + X-Ms-Version: + - "2019-02-02" + status: 201 Created + code: 201 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Sun, 04 Apr 2021 21:54:52 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.core.windows.net/Tables?%24filter=TableName+ge+%27zzza%27+and+TableName+lt+%27zzzb%27 + method: GET + response: + body: '{"odata.metadata":"https://chrisstablesprim.table.core.windows.net/$metadata#Tables","value":[{"TableName":"zzzanoa2c4lxhmr55w1n"},{"TableName":"zzzap06y44pq0dcqyefd"},{"TableName":"zzzas5q9cqk9i1o44v25"},{"TableName":"zzzavphdrg4ipo7z4boc"}]}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + Date: + - Sun, 04 Apr 2021 21:54:51 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - aa171ccc-c002-0053-7f9d-291720000000 + X-Ms-Version: + - "2019-02-02" + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Sun, 04 Apr 2021 21:54:52 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.core.windows.net/Tables?%24filter=TableName+ge+%27zzza%27+and+TableName+lt+%27zzzb%27&%24top=2 + method: GET + response: + body: '{"odata.metadata":"https://chrisstablesprim.table.core.windows.net/$metadata#Tables","value":[{"TableName":"zzzanoa2c4lxhmr55w1n"},{"TableName":"zzzap06y44pq0dcqyefd"}]}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + Date: + - Sun, 04 Apr 2021 21:54:51 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Continuation-Nexttablename: + - 1!52!enp6YXM1cTljcWs5aTFvNDR2MjUBMDFkNzI5OWQyM2U4NjU2Yw-- + X-Ms-Request-Id: + - aa171ce3-c002-0053-159d-291720000000 + X-Ms-Version: + - "2019-02-02" + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Sun, 04 Apr 2021 21:54:52 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.core.windows.net/Tables?%24filter=TableName+ge+%27zzza%27+and+TableName+lt+%27zzzb%27&%24top=2&NextTableName=1%2152%21enp6YXM1cTljcWs5aTFvNDR2MjUBMDFkNzI5OWQyM2U4NjU2Yw-- + method: GET + response: + body: '{"odata.metadata":"https://chrisstablesprim.table.core.windows.net/$metadata#Tables","value":[{"TableName":"zzzas5q9cqk9i1o44v25"},{"TableName":"zzzavphdrg4ipo7z4boc"}]}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + Date: + - Sun, 04 Apr 2021 21:54:51 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - aa171cf4-c002-0053-269d-291720000000 + X-Ms-Version: + - "2019-02-02" + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Sun, 04 Apr 2021 21:54:52 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.core.windows.net/Tables('zzzap06y44pq0dcqyefd') + method: DELETE + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Date: + - Sun, 04 Apr 2021 21:54:52 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - aa171d07-c002-0053-369d-291720000000 + X-Ms-Version: + - "2019-02-02" + status: 204 No Content + code: 204 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Sun, 04 Apr 2021 21:54:52 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.core.windows.net/Tables('zzzas5q9cqk9i1o44v25') + method: DELETE + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Date: + - Sun, 04 Apr 2021 21:54:52 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - aa171d16-c002-0053-459d-291720000000 + X-Ms-Version: + - "2019-02-02" + status: 204 No Content + code: 204 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Sun, 04 Apr 2021 21:54:52 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.core.windows.net/Tables('zzzavphdrg4ipo7z4boc') + method: DELETE + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Date: + - Sun, 04 Apr 2021 21:54:52 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - aa171d2a-c002-0053-599d-291720000000 + X-Ms-Version: + - "2019-02-02" + status: 204 No Content + code: 204 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Sun, 04 Apr 2021 21:54:52 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.core.windows.net/Tables('zzzanoa2c4lxhmr55w1n') + method: DELETE + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Date: + - Sun, 04 Apr 2021 21:54:52 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - aa171d3d-c002-0053-6c9d-291720000000 + X-Ms-Version: + - "2019-02-02" + status: 204 No Content + code: 204 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Sun, 04 Apr 2021 21:54:53 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.core.windows.net/Tables('zzzbq0ics0v4b1nbyytz') + method: DELETE + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Date: + - Sun, 04 Apr 2021 21:54:52 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - aa171d51-c002-0053-7d9d-291720000000 + X-Ms-Version: + - "2019-02-02" + status: 204 No Content + code: 204 + duration: "" diff --git a/sdk/tables/aztables/recordings/TestServiceClient_Storage/TestServiceErrors-variables.yaml b/sdk/tables/aztables/recordings/TestServiceClient_Storage/TestServiceErrors-variables.yaml new file mode 100644 index 000000000000..3f5acca6cabc --- /dev/null +++ b/sdk/tables/aztables/recordings/TestServiceClient_Storage/TestServiceErrors-variables.yaml @@ -0,0 +1,5 @@ +--- +STORAGE_ENDPOINT_SUFFIX: core.windows.net +TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== +TABLES_STORAGE_ACCOUNT_NAME: chrisstablesprim +randomSeed: "1617573550" diff --git a/sdk/tables/aztables/recordings/TestServiceClient_Storage/TestServiceErrors.yaml b/sdk/tables/aztables/recordings/TestServiceClient_Storage/TestServiceErrors.yaml new file mode 100644 index 000000000000..55b918ae4d98 --- /dev/null +++ b/sdk/tables/aztables/recordings/TestServiceClient_Storage/TestServiceErrors.yaml @@ -0,0 +1,129 @@ +--- +version: 1 +interactions: +- request: + body: '{"TableName":"gotable5hickrxl8lpbo"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "36" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Sun, 04 Apr 2021 21:59:10 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.core.windows.net/Tables + method: POST + response: + body: '{"odata.metadata":"https://chrisstablesprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotable5hickrxl8lpbo"}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + Date: + - Sun, 04 Apr 2021 21:59:09 GMT + Location: + - https://chrisstablesprim.table.core.windows.net/Tables('gotable5hickrxl8lpbo') + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - a5bfa352-3002-0057-209d-299a27000000 + X-Ms-Version: + - "2019-02-02" + status: 201 Created + code: 201 + duration: "" +- request: + body: '{"TableName":"gotable5hickrxl8lpbo"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "36" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Sun, 04 Apr 2021 21:59:10 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.core.windows.net/Tables + method: POST + response: + body: '{"odata.error":{"code":"TableAlreadyExists","message":{"lang":"en-US","value":"The + table specified already exists.\nRequestId:a5bfa358-3002-0057-259d-299a27000000\nTime:2021-04-04T21:59:10.6883876Z"}}}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + Date: + - Sun, 04 Apr 2021 21:59:10 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - a5bfa358-3002-0057-259d-299a27000000 + X-Ms-Version: + - "2019-02-02" + status: 409 Conflict + code: 409 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Sun, 04 Apr 2021 21:59:10 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.core.windows.net/Tables('gotable5hickrxl8lpbo') + method: DELETE + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Date: + - Sun, 04 Apr 2021 21:59:10 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - a5bfa35c-3002-0057-299d-299a27000000 + X-Ms-Version: + - "2019-02-02" + status: 204 No Content + code: 204 + duration: "" diff --git a/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestAddComplexEntity-variables.yaml b/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestAddComplexEntity-variables.yaml new file mode 100644 index 000000000000..a5295bc78865 --- /dev/null +++ b/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestAddComplexEntity-variables.yaml @@ -0,0 +1,6 @@ +--- +COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com +TABLES_COSMOS_ACCOUNT_NAME: chrisstablesprim +TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== +now: "2021-04-10T19:18:39.9706889-05:00" +randomSeed: "1618100318" diff --git a/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestAddComplexEntity.yaml b/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestAddComplexEntity.yaml new file mode 100644 index 000000000000..a90bdd2b73da --- /dev/null +++ b/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestAddComplexEntity.yaml @@ -0,0 +1,121 @@ +--- +version: 1 +interactions: +- request: + body: '{"TableName":"gotablexiw8zfw9mws0q"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "36" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Sun, 11 Apr 2021 00:18:38 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.cosmos.azure.com/Tables + method: POST + response: + body: '{"TableName":"gotablexiw8zfw9mws0q","odata.metadata":"https://chrisstablesprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' + headers: + Content-Type: + - application/json;odata=minimalmetadata + Date: + - Sun, 11 Apr 2021 00:18:39 GMT + Etag: + - W/"datetime'2021-04-11T00%3A18%3A39.0866952Z'" + Location: + - https://chrisstablesprim.table.cosmos.azure.com/Tables('gotablexiw8zfw9mws0q') + Server: + - Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - 8d38468e-c994-404d-90cc-925db534f55f + status: 201 Created + code: 201 + duration: "" +- request: + body: '{"PartitionKey":"partition","RowKey":"row","SomeBinaryProperty":"c29tZSBieXRlcw==","SomeBinaryProperty@odata.type":"Edm.Binary","SomeDateProperty":"2021-04-11T00:18:39.9706889Z","SomeDateProperty@odata.type":"Edm.DateTime","SomeDoubleProperty0":1,"SomeDoubleProperty0@odata.type":"Edm.Double","SomeDoubleProperty1":1.2345,"SomeDoubleProperty1@odata.type":"Edm.Double","SomeGuidProperty":"4346b1a2-6141-483a-779b-1332da28b7d5","SomeGuidProperty@odata.type":"Edm.Guid","SomeInt64Property":"9223372036854775807","SomeInt64Property@odata.type":"Edm.Int64","SomeIntProperty":42,"SomePtrStringProperty":"some + pointer to string","SomeStringProperty":"some string"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "657" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + Prefer: + - return-no-content + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Sun, 11 Apr 2021 00:18:39 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.cosmos.azure.com/gotablexiw8zfw9mws0q + method: POST + response: + body: "" + headers: + Content-Length: + - "0" + Date: + - Sun, 11 Apr 2021 00:18:39 GMT + Etag: + - W/"datetime'2021-04-11T00%3A18%3A39.7189128Z'" + Location: + - https://chrisstablesprim.table.cosmos.azure.com/gotablexiw8zfw9mws0q(PartitionKey='partition',RowKey='row') + Preference-Applied: + - return-no-content + Server: + - Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - cec68903-00ae-4306-ae0a-5200c5f8bb60 + status: 204 No Content + code: 204 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Sun, 11 Apr 2021 00:18:40 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.cosmos.azure.com/Tables('gotablexiw8zfw9mws0q') + method: DELETE + response: + body: "" + headers: + Content-Length: + - "0" + Date: + - Sun, 11 Apr 2021 00:18:39 GMT + Server: + - Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - ef2e97eb-017c-458b-be6d-9c130a33dfa6 + status: 204 No Content + code: 204 + duration: "" diff --git a/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestAddEntity-variables.yaml b/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestAddEntity-variables.yaml new file mode 100644 index 000000000000..dd3226b5e15b --- /dev/null +++ b/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestAddEntity-variables.yaml @@ -0,0 +1,5 @@ +--- +COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com +TABLES_COSMOS_ACCOUNT_NAME: chrisstablesprim +TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== +randomSeed: "1617580856" diff --git a/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestAddEntity.yaml b/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestAddEntity.yaml new file mode 100644 index 000000000000..f8993d0f4f77 --- /dev/null +++ b/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestAddEntity.yaml @@ -0,0 +1,121 @@ +--- +version: 1 +interactions: +- request: + body: '{"TableName":"gotable7ws4xms1mzf9z"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "36" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Mon, 05 Apr 2021 00:00:56 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.cosmos.azure.com/Tables + method: POST + response: + body: '{"TableName":"gotable7ws4xms1mzf9z","odata.metadata":"https://chrisstablesprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' + headers: + Content-Type: + - application/json;odata=minimalmetadata + Date: + - Mon, 05 Apr 2021 00:00:56 GMT + Etag: + - W/"datetime'2021-04-05T00%3A00%3A56.5521416Z'" + Location: + - https://chrisstablesprim.table.cosmos.azure.com/Tables('gotable7ws4xms1mzf9z') + Server: + - Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - 9ca87b9a-5e66-4ec1-97d0-0ea03fd04375 + status: 201 Created + code: 201 + duration: "" +- request: + body: '{"BoolProp":true,"IntProp":1,"PartitionKey":"partition","RowKey":"1","StringProp":"some + string 1"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "98" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + Prefer: + - return-no-content + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Mon, 05 Apr 2021 00:00:57 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.cosmos.azure.com/gotable7ws4xms1mzf9z + method: POST + response: + body: "" + headers: + Content-Length: + - "0" + Date: + - Mon, 05 Apr 2021 00:00:56 GMT + Etag: + - W/"datetime'2021-04-05T00%3A00%3A57.0277896Z'" + Location: + - https://chrisstablesprim.table.cosmos.azure.com/gotable7ws4xms1mzf9z(PartitionKey='partition',RowKey='1') + Preference-Applied: + - return-no-content + Server: + - Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - 57a01ccb-9f82-4e3c-a2be-601d4ed96b9d + status: 204 No Content + code: 204 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Mon, 05 Apr 2021 00:00:57 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.cosmos.azure.com/Tables('gotable7ws4xms1mzf9z') + method: DELETE + response: + body: "" + headers: + Content-Length: + - "0" + Date: + - Mon, 05 Apr 2021 00:00:56 GMT + Server: + - Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - a515445a-2616-4e51-a4ea-bf4a788ad138 + status: 204 No Content + code: 204 + duration: "" diff --git a/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestBatchAdd-variables.yaml b/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestBatchAdd-variables.yaml new file mode 100644 index 000000000000..1d74b5b453b7 --- /dev/null +++ b/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestBatchAdd-variables.yaml @@ -0,0 +1,6 @@ +--- +COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com +TABLES_COSMOS_ACCOUNT_NAME: chrisstablesprim +TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== +now: "2021-05-18T10:39:59.9902777-05:00" +randomSeed: "1621352398" diff --git a/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestBatchAdd.yaml b/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestBatchAdd.yaml new file mode 100644 index 000000000000..633e16370940 --- /dev/null +++ b/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestBatchAdd.yaml @@ -0,0 +1,203 @@ +--- +version: 1 +interactions: +- request: + body: '{"TableName":"gotable9m3drbgv2znqx"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "36" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Tue, 18 May 2021 15:39:58 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.cosmos.azure.com/Tables + method: POST + response: + body: '{"TableName":"gotable9m3drbgv2znqx","odata.metadata":"https://chrisstablesprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' + headers: + Content-Type: + - application/json;odata=minimalmetadata + Date: + - Tue, 18 May 2021 15:40:00 GMT + Etag: + - W/"datetime'2021-05-18T15%3A40%3A00.0075784Z'" + Location: + - https://chrisstablesprim.table.cosmos.azure.com/Tables('gotable9m3drbgv2znqx') + Server: + - Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - 85c6b886-4404-4b2e-865e-266f59837b2a + status: 201 Ok + code: 201 + duration: "" +- request: + body: "--batch_bae5ce88-edc3-4b25-7b33-be5c7454aefc\r\nContent-Type: multipart/mixed; + boundary=changeset_dd23acc5-a2fb-419d-5006-1de1ca035a9f\r\n\r\n--changeset_dd23acc5-a2fb-419d-5006-1de1ca035a9f\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://chrisstablesprim.table.cosmos.azure.com/gotable9m3drbgv2znqx?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: + 663\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"BoolProp\":true,\"IntProp\":1,\"PartitionKey\":\"partition\",\"RowKey\":\"1\",\"SomeBinaryProperty\":\"c29tZSBieXRlcw==\",\"SomeBinaryProperty@odata.type\":\"Edm.Binary\",\"SomeDateProperty\":\"2021-05-18T15:39:59.9902777Z\",\"SomeDateProperty@odata.type\":\"Edm.DateTime\",\"SomeDoubleProperty0\":1,\"SomeDoubleProperty0@odata.type\":\"Edm.Double\",\"SomeDoubleProperty1\":1.2345,\"SomeDoubleProperty1@odata.type\":\"Edm.Double\",\"SomeGuidProperty\":\"1fb643ec-1e6e-4fc0-5606-be23d98cef50\",\"SomeGuidProperty@odata.type\":\"Edm.Guid\",\"SomeInt64Property\":\"9223372036854775807\",\"SomeInt64Property@odata.type\":\"Edm.Int64\",\"SomeIntProperty\":42,\"SomeStringProperty\":\"some + string\",\"StringProp\":\"some string 1\"}\r\n--changeset_dd23acc5-a2fb-419d-5006-1de1ca035a9f\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://chrisstablesprim.table.cosmos.azure.com/gotable9m3drbgv2znqx?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: + 663\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"BoolProp\":true,\"IntProp\":2,\"PartitionKey\":\"partition\",\"RowKey\":\"2\",\"SomeBinaryProperty\":\"c29tZSBieXRlcw==\",\"SomeBinaryProperty@odata.type\":\"Edm.Binary\",\"SomeDateProperty\":\"2021-05-18T15:39:59.9902777Z\",\"SomeDateProperty@odata.type\":\"Edm.DateTime\",\"SomeDoubleProperty0\":1,\"SomeDoubleProperty0@odata.type\":\"Edm.Double\",\"SomeDoubleProperty1\":1.2345,\"SomeDoubleProperty1@odata.type\":\"Edm.Double\",\"SomeGuidProperty\":\"24d3bd3d-3e02-4411-580f-5a3a8146d1ed\",\"SomeGuidProperty@odata.type\":\"Edm.Guid\",\"SomeInt64Property\":\"9223372036854775807\",\"SomeInt64Property@odata.type\":\"Edm.Int64\",\"SomeIntProperty\":42,\"SomeStringProperty\":\"some + string\",\"StringProp\":\"some string 2\"}\r\n--changeset_dd23acc5-a2fb-419d-5006-1de1ca035a9f\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://chrisstablesprim.table.cosmos.azure.com/gotable9m3drbgv2znqx?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: + 663\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"BoolProp\":true,\"IntProp\":3,\"PartitionKey\":\"partition\",\"RowKey\":\"3\",\"SomeBinaryProperty\":\"c29tZSBieXRlcw==\",\"SomeBinaryProperty@odata.type\":\"Edm.Binary\",\"SomeDateProperty\":\"2021-05-18T15:39:59.9902777Z\",\"SomeDateProperty@odata.type\":\"Edm.DateTime\",\"SomeDoubleProperty0\":1,\"SomeDoubleProperty0@odata.type\":\"Edm.Double\",\"SomeDoubleProperty1\":1.2345,\"SomeDoubleProperty1@odata.type\":\"Edm.Double\",\"SomeGuidProperty\":\"84d4e62a-f422-4b27-6dc2-6c322e138b6d\",\"SomeGuidProperty@odata.type\":\"Edm.Guid\",\"SomeInt64Property\":\"9223372036854775807\",\"SomeInt64Property@odata.type\":\"Edm.Int64\",\"SomeIntProperty\":42,\"SomeStringProperty\":\"some + string\",\"StringProp\":\"some string 3\"}\r\n--changeset_dd23acc5-a2fb-419d-5006-1de1ca035a9f\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://chrisstablesprim.table.cosmos.azure.com/gotable9m3drbgv2znqx?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: + 663\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"BoolProp\":true,\"IntProp\":4,\"PartitionKey\":\"partition\",\"RowKey\":\"4\",\"SomeBinaryProperty\":\"c29tZSBieXRlcw==\",\"SomeBinaryProperty@odata.type\":\"Edm.Binary\",\"SomeDateProperty\":\"2021-05-18T15:39:59.9902777Z\",\"SomeDateProperty@odata.type\":\"Edm.DateTime\",\"SomeDoubleProperty0\":1,\"SomeDoubleProperty0@odata.type\":\"Edm.Double\",\"SomeDoubleProperty1\":1.2345,\"SomeDoubleProperty1@odata.type\":\"Edm.Double\",\"SomeGuidProperty\":\"76ce5e7d-a431-4b17-472c-2a589bf333cf\",\"SomeGuidProperty@odata.type\":\"Edm.Guid\",\"SomeInt64Property\":\"9223372036854775807\",\"SomeInt64Property@odata.type\":\"Edm.Int64\",\"SomeIntProperty\":42,\"SomeStringProperty\":\"some + string\",\"StringProp\":\"some string 4\"}\r\n--changeset_dd23acc5-a2fb-419d-5006-1de1ca035a9f\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://chrisstablesprim.table.cosmos.azure.com/gotable9m3drbgv2znqx?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: + 663\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"BoolProp\":true,\"IntProp\":5,\"PartitionKey\":\"partition\",\"RowKey\":\"5\",\"SomeBinaryProperty\":\"c29tZSBieXRlcw==\",\"SomeBinaryProperty@odata.type\":\"Edm.Binary\",\"SomeDateProperty\":\"2021-05-18T15:39:59.9902777Z\",\"SomeDateProperty@odata.type\":\"Edm.DateTime\",\"SomeDoubleProperty0\":1,\"SomeDoubleProperty0@odata.type\":\"Edm.Double\",\"SomeDoubleProperty1\":1.2345,\"SomeDoubleProperty1@odata.type\":\"Edm.Double\",\"SomeGuidProperty\":\"39afa2e2-8d46-446d-4141-034427ec5a5c\",\"SomeGuidProperty@odata.type\":\"Edm.Guid\",\"SomeInt64Property\":\"9223372036854775807\",\"SomeInt64Property@odata.type\":\"Edm.Int64\",\"SomeIntProperty\":42,\"SomeStringProperty\":\"some + string\",\"StringProp\":\"some string 5\"}\r\n--changeset_dd23acc5-a2fb-419d-5006-1de1ca035a9f\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://chrisstablesprim.table.cosmos.azure.com/gotable9m3drbgv2znqx?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: + 663\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"BoolProp\":true,\"IntProp\":6,\"PartitionKey\":\"partition\",\"RowKey\":\"6\",\"SomeBinaryProperty\":\"c29tZSBieXRlcw==\",\"SomeBinaryProperty@odata.type\":\"Edm.Binary\",\"SomeDateProperty\":\"2021-05-18T15:39:59.9902777Z\",\"SomeDateProperty@odata.type\":\"Edm.DateTime\",\"SomeDoubleProperty0\":1,\"SomeDoubleProperty0@odata.type\":\"Edm.Double\",\"SomeDoubleProperty1\":1.2345,\"SomeDoubleProperty1@odata.type\":\"Edm.Double\",\"SomeGuidProperty\":\"b0bcacc3-0388-4bf4-6e61-0e60dfa720f3\",\"SomeGuidProperty@odata.type\":\"Edm.Guid\",\"SomeInt64Property\":\"9223372036854775807\",\"SomeInt64Property@odata.type\":\"Edm.Int64\",\"SomeIntProperty\":42,\"SomeStringProperty\":\"some + string\",\"StringProp\":\"some string 6\"}\r\n--changeset_dd23acc5-a2fb-419d-5006-1de1ca035a9f\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://chrisstablesprim.table.cosmos.azure.com/gotable9m3drbgv2znqx?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: + 663\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"BoolProp\":true,\"IntProp\":7,\"PartitionKey\":\"partition\",\"RowKey\":\"7\",\"SomeBinaryProperty\":\"c29tZSBieXRlcw==\",\"SomeBinaryProperty@odata.type\":\"Edm.Binary\",\"SomeDateProperty\":\"2021-05-18T15:39:59.9902777Z\",\"SomeDateProperty@odata.type\":\"Edm.DateTime\",\"SomeDoubleProperty0\":1,\"SomeDoubleProperty0@odata.type\":\"Edm.Double\",\"SomeDoubleProperty1\":1.2345,\"SomeDoubleProperty1@odata.type\":\"Edm.Double\",\"SomeGuidProperty\":\"6f8a8185-7c64-437c-451b-3dcde76a19d1\",\"SomeGuidProperty@odata.type\":\"Edm.Guid\",\"SomeInt64Property\":\"9223372036854775807\",\"SomeInt64Property@odata.type\":\"Edm.Int64\",\"SomeIntProperty\":42,\"SomeStringProperty\":\"some + string\",\"StringProp\":\"some string 7\"}\r\n--changeset_dd23acc5-a2fb-419d-5006-1de1ca035a9f\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://chrisstablesprim.table.cosmos.azure.com/gotable9m3drbgv2znqx?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: + 663\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"BoolProp\":true,\"IntProp\":8,\"PartitionKey\":\"partition\",\"RowKey\":\"8\",\"SomeBinaryProperty\":\"c29tZSBieXRlcw==\",\"SomeBinaryProperty@odata.type\":\"Edm.Binary\",\"SomeDateProperty\":\"2021-05-18T15:39:59.9902777Z\",\"SomeDateProperty@odata.type\":\"Edm.DateTime\",\"SomeDoubleProperty0\":1,\"SomeDoubleProperty0@odata.type\":\"Edm.Double\",\"SomeDoubleProperty1\":1.2345,\"SomeDoubleProperty1@odata.type\":\"Edm.Double\",\"SomeGuidProperty\":\"3d524c9f-5e29-42bf-5626-8d39c21fb846\",\"SomeGuidProperty@odata.type\":\"Edm.Guid\",\"SomeInt64Property\":\"9223372036854775807\",\"SomeInt64Property@odata.type\":\"Edm.Int64\",\"SomeIntProperty\":42,\"SomeStringProperty\":\"some + string\",\"StringProp\":\"some string 8\"}\r\n--changeset_dd23acc5-a2fb-419d-5006-1de1ca035a9f\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://chrisstablesprim.table.cosmos.azure.com/gotable9m3drbgv2znqx?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: + 663\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"BoolProp\":true,\"IntProp\":9,\"PartitionKey\":\"partition\",\"RowKey\":\"9\",\"SomeBinaryProperty\":\"c29tZSBieXRlcw==\",\"SomeBinaryProperty@odata.type\":\"Edm.Binary\",\"SomeDateProperty\":\"2021-05-18T15:39:59.9902777Z\",\"SomeDateProperty@odata.type\":\"Edm.DateTime\",\"SomeDoubleProperty0\":1,\"SomeDoubleProperty0@odata.type\":\"Edm.Double\",\"SomeDoubleProperty1\":1.2345,\"SomeDoubleProperty1@odata.type\":\"Edm.Double\",\"SomeGuidProperty\":\"8b8c218f-b30b-40bc-62c0-92f1c52bebf9\",\"SomeGuidProperty@odata.type\":\"Edm.Guid\",\"SomeInt64Property\":\"9223372036854775807\",\"SomeInt64Property@odata.type\":\"Edm.Int64\",\"SomeIntProperty\":42,\"SomeStringProperty\":\"some + string\",\"StringProp\":\"some string 9\"}\r\n--changeset_dd23acc5-a2fb-419d-5006-1de1ca035a9f\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://chrisstablesprim.table.cosmos.azure.com/gotable9m3drbgv2znqx?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: + 666\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"BoolProp\":true,\"IntProp\":10,\"PartitionKey\":\"partition\",\"RowKey\":\"10\",\"SomeBinaryProperty\":\"c29tZSBieXRlcw==\",\"SomeBinaryProperty@odata.type\":\"Edm.Binary\",\"SomeDateProperty\":\"2021-05-18T15:39:59.9902777Z\",\"SomeDateProperty@odata.type\":\"Edm.DateTime\",\"SomeDoubleProperty0\":1,\"SomeDoubleProperty0@odata.type\":\"Edm.Double\",\"SomeDoubleProperty1\":1.2345,\"SomeDoubleProperty1@odata.type\":\"Edm.Double\",\"SomeGuidProperty\":\"c1891fd1-e63b-4c16-7b74-1502bcab7668\",\"SomeGuidProperty@odata.type\":\"Edm.Guid\",\"SomeInt64Property\":\"9223372036854775807\",\"SomeInt64Property@odata.type\":\"Edm.Int64\",\"SomeIntProperty\":42,\"SomeStringProperty\":\"some + string\",\"StringProp\":\"some string 10\"}\r\n--changeset_dd23acc5-a2fb-419d-5006-1de1ca035a9f--\r\n\r\n--batch_bae5ce88-edc3-4b25-7b33-be5c7454aefc--\r\n" + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "11281" + Content-Type: + - multipart/mixed; boundary=batch_bae5ce88-edc3-4b25-7b33-be5c7454aefc + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; Windows_NT) + X-Ms-Date: + - Tue, 18 May 2021 15:39:59 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.cosmos.azure.com/$batch + method: POST + response: + body: "--batchresponse_38a3240d-92fd-45d7-a9f4-1507ec60bf61\r\nContent-Type: multipart/mixed; + boundary=changesetresponse_69a6b8e4-6cec-4fb2-a7f3-975a3df93882\r\n\r\n--changesetresponse_69a6b8e4-6cec-4fb2-a7f3-975a3df93882\nContent-Type: + application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: + W/\"datetime'2021-05-18T15%3A40%3A00.4656136Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: + https://chrisstablesprim.table.cosmos.azure.com/gotable9m3drbgv2znqx(PartitionKey='partition',RowKey='1')\r\nContent-ID: + 1\r\n\r\n\r\n--changesetresponse_69a6b8e4-6cec-4fb2-a7f3-975a3df93882\nContent-Type: + application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: + W/\"datetime'2021-05-18T15%3A40%3A00.4663304Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: + https://chrisstablesprim.table.cosmos.azure.com/gotable9m3drbgv2znqx(PartitionKey='partition',RowKey='2')\r\nContent-ID: + 2\r\n\r\n\r\n--changesetresponse_69a6b8e4-6cec-4fb2-a7f3-975a3df93882\nContent-Type: + application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: + W/\"datetime'2021-05-18T15%3A40%3A00.4669448Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: + https://chrisstablesprim.table.cosmos.azure.com/gotable9m3drbgv2znqx(PartitionKey='partition',RowKey='3')\r\nContent-ID: + 3\r\n\r\n\r\n--changesetresponse_69a6b8e4-6cec-4fb2-a7f3-975a3df93882\nContent-Type: + application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: + W/\"datetime'2021-05-18T15%3A40%3A00.4675592Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: + https://chrisstablesprim.table.cosmos.azure.com/gotable9m3drbgv2znqx(PartitionKey='partition',RowKey='4')\r\nContent-ID: + 4\r\n\r\n\r\n--changesetresponse_69a6b8e4-6cec-4fb2-a7f3-975a3df93882\nContent-Type: + application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: + W/\"datetime'2021-05-18T15%3A40%3A00.4680712Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: + https://chrisstablesprim.table.cosmos.azure.com/gotable9m3drbgv2znqx(PartitionKey='partition',RowKey='5')\r\nContent-ID: + 5\r\n\r\n\r\n--changesetresponse_69a6b8e4-6cec-4fb2-a7f3-975a3df93882\nContent-Type: + application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: + W/\"datetime'2021-05-18T15%3A40%3A00.4685832Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: + https://chrisstablesprim.table.cosmos.azure.com/gotable9m3drbgv2znqx(PartitionKey='partition',RowKey='6')\r\nContent-ID: + 6\r\n\r\n\r\n--changesetresponse_69a6b8e4-6cec-4fb2-a7f3-975a3df93882\nContent-Type: + application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: + W/\"datetime'2021-05-18T15%3A40%3A00.4689928Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: + https://chrisstablesprim.table.cosmos.azure.com/gotable9m3drbgv2znqx(PartitionKey='partition',RowKey='7')\r\nContent-ID: + 7\r\n\r\n\r\n--changesetresponse_69a6b8e4-6cec-4fb2-a7f3-975a3df93882\nContent-Type: + application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: + W/\"datetime'2021-05-18T15%3A40%3A00.4695048Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: + https://chrisstablesprim.table.cosmos.azure.com/gotable9m3drbgv2znqx(PartitionKey='partition',RowKey='8')\r\nContent-ID: + 8\r\n\r\n\r\n--changesetresponse_69a6b8e4-6cec-4fb2-a7f3-975a3df93882\nContent-Type: + application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: + W/\"datetime'2021-05-18T15%3A40%3A00.4699144Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: + https://chrisstablesprim.table.cosmos.azure.com/gotable9m3drbgv2znqx(PartitionKey='partition',RowKey='9')\r\nContent-ID: + 9\r\n\r\n\r\n--changesetresponse_69a6b8e4-6cec-4fb2-a7f3-975a3df93882\nContent-Type: + application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: + W/\"datetime'2021-05-18T15%3A40%3A00.4703240Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: + https://chrisstablesprim.table.cosmos.azure.com/gotable9m3drbgv2znqx(PartitionKey='partition',RowKey='10')\r\nContent-ID: + 10\r\n\r\n\r\n--changesetresponse_69a6b8e4-6cec-4fb2-a7f3-975a3df93882--\n--batchresponse_38a3240d-92fd-45d7-a9f4-1507ec60bf61--\r\n" + headers: + Content-Type: + - multipart/mixed; boundary=batchresponse_38a3240d-92fd-45d7-a9f4-1507ec60bf61 + Date: + - Tue, 18 May 2021 15:40:00 GMT + Server: + - Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - 24146f57-712a-4890-923b-e24eb0f41461 + status: 202 Accepted + code: 202 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Tue, 18 May 2021 15:40:00 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.cosmos.azure.com/Tables('gotable9m3drbgv2znqx') + method: DELETE + response: + body: "" + headers: + Content-Length: + - "0" + Date: + - Tue, 18 May 2021 15:40:00 GMT + Server: + - Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - 51bb42ce-1f87-455b-a029-6d83ef15ef14 + status: 204 No Content + code: 204 + duration: "" diff --git a/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestBatchError-variables.yaml b/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestBatchError-variables.yaml new file mode 100644 index 000000000000..62baaafd7ab9 --- /dev/null +++ b/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestBatchError-variables.yaml @@ -0,0 +1,6 @@ +--- +COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com +TABLES_COSMOS_ACCOUNT_NAME: chrisstablesprim +TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== +now: "2021-05-21T13:23:34.3457407-05:00" +randomSeed: "1621621412" diff --git a/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestBatchError.yaml b/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestBatchError.yaml new file mode 100644 index 000000000000..1957a9d8bae5 --- /dev/null +++ b/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestBatchError.yaml @@ -0,0 +1,177 @@ +--- +version: 1 +interactions: +- request: + body: '{"TableName":"gotabletzmby34yuxg6n"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "36" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Fri, 21 May 2021 18:23:32 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.cosmos.azure.com/Tables + method: POST + response: + body: '{"TableName":"gotabletzmby34yuxg6n","odata.metadata":"https://chrisstablesprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' + headers: + Content-Type: + - application/json;odata=minimalmetadata + Date: + - Fri, 21 May 2021 18:23:34 GMT + Etag: + - W/"datetime'2021-05-21T18%3A23%3A34.0203016Z'" + Location: + - https://chrisstablesprim.table.cosmos.azure.com/Tables('gotabletzmby34yuxg6n') + Server: + - Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - fc4b4542-c0a5-4264-a7ee-fecd96b9b9b4 + status: 201 Ok + code: 201 + duration: "" +- request: + body: '{"BoolProp":true,"IntProp":3,"PartitionKey":"partition","RowKey":"3","SomeBinaryProperty":"c29tZSBieXRlcw==","SomeBinaryProperty@odata.type":"Edm.Binary","SomeDateProperty":"2021-05-21T18:23:34.3457407Z","SomeDateProperty@odata.type":"Edm.DateTime","SomeDoubleProperty0":1,"SomeDoubleProperty0@odata.type":"Edm.Double","SomeDoubleProperty1":1.2345,"SomeDoubleProperty1@odata.type":"Edm.Double","SomeGuidProperty":"4d7bd7de-2c53-477c-4d41-30b23d6c6016","SomeGuidProperty@odata.type":"Edm.Guid","SomeInt64Property":"9223372036854775807","SomeInt64Property@odata.type":"Edm.Int64","SomeIntProperty":42,"SomeStringProperty":"some + string","StringProp":"some string 3"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "663" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + Prefer: + - return-no-content + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Fri, 21 May 2021 18:23:34 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.cosmos.azure.com/gotabletzmby34yuxg6n + method: POST + response: + body: "" + headers: + Content-Length: + - "0" + Date: + - Fri, 21 May 2021 18:23:34 GMT + Etag: + - W/"datetime'2021-05-21T18%3A23%3A34.5252360Z'" + Location: + - https://chrisstablesprim.table.cosmos.azure.com/gotabletzmby34yuxg6n(PartitionKey='partition',RowKey='3') + Preference-Applied: + - return-no-content + Server: + - Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - 86973fa6-1d80-4ca1-ab39-2af2c5bf73a5 + status: 204 No Content + code: 204 + duration: "" +- request: + body: "--batch_9e5262f4-1bac-49aa-5e98-659e96cc8629\r\nContent-Type: multipart/mixed; + boundary=changeset_03f12eec-7a2f-46c8-78a3-30799f56b3c0\r\n\r\n--changeset_03f12eec-7a2f-46c8-78a3-30799f56b3c0\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://chrisstablesprim.table.cosmos.azure.com/gotabletzmby34yuxg6n?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: + 663\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"BoolProp\":true,\"IntProp\":1,\"PartitionKey\":\"partition\",\"RowKey\":\"1\",\"SomeBinaryProperty\":\"c29tZSBieXRlcw==\",\"SomeBinaryProperty@odata.type\":\"Edm.Binary\",\"SomeDateProperty\":\"2021-05-21T18:23:34.3457407Z\",\"SomeDateProperty@odata.type\":\"Edm.DateTime\",\"SomeDoubleProperty0\":1,\"SomeDoubleProperty0@odata.type\":\"Edm.Double\",\"SomeDoubleProperty1\":1.2345,\"SomeDoubleProperty1@odata.type\":\"Edm.Double\",\"SomeGuidProperty\":\"b5d5aa35-2089-4822-604b-edcdba3d0e2e\",\"SomeGuidProperty@odata.type\":\"Edm.Guid\",\"SomeInt64Property\":\"9223372036854775807\",\"SomeInt64Property@odata.type\":\"Edm.Int64\",\"SomeIntProperty\":42,\"SomeStringProperty\":\"some + string\",\"StringProp\":\"some string 1\"}\r\n--changeset_03f12eec-7a2f-46c8-78a3-30799f56b3c0\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://chrisstablesprim.table.cosmos.azure.com/gotabletzmby34yuxg6n?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: + 663\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"BoolProp\":true,\"IntProp\":2,\"PartitionKey\":\"partition\",\"RowKey\":\"2\",\"SomeBinaryProperty\":\"c29tZSBieXRlcw==\",\"SomeBinaryProperty@odata.type\":\"Edm.Binary\",\"SomeDateProperty\":\"2021-05-21T18:23:34.3457407Z\",\"SomeDateProperty@odata.type\":\"Edm.DateTime\",\"SomeDoubleProperty0\":1,\"SomeDoubleProperty0@odata.type\":\"Edm.Double\",\"SomeDoubleProperty1\":1.2345,\"SomeDoubleProperty1@odata.type\":\"Edm.Double\",\"SomeGuidProperty\":\"e88aeec4-8336-490d-5024-b16bb25b3a57\",\"SomeGuidProperty@odata.type\":\"Edm.Guid\",\"SomeInt64Property\":\"9223372036854775807\",\"SomeInt64Property@odata.type\":\"Edm.Int64\",\"SomeIntProperty\":42,\"SomeStringProperty\":\"some + string\",\"StringProp\":\"some string 2\"}\r\n--changeset_03f12eec-7a2f-46c8-78a3-30799f56b3c0\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://chrisstablesprim.table.cosmos.azure.com/gotabletzmby34yuxg6n?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: + 663\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"BoolProp\":true,\"IntProp\":3,\"PartitionKey\":\"partition\",\"RowKey\":\"3\",\"SomeBinaryProperty\":\"c29tZSBieXRlcw==\",\"SomeBinaryProperty@odata.type\":\"Edm.Binary\",\"SomeDateProperty\":\"2021-05-21T18:23:34.3457407Z\",\"SomeDateProperty@odata.type\":\"Edm.DateTime\",\"SomeDoubleProperty0\":1,\"SomeDoubleProperty0@odata.type\":\"Edm.Double\",\"SomeDoubleProperty1\":1.2345,\"SomeDoubleProperty1@odata.type\":\"Edm.Double\",\"SomeGuidProperty\":\"4d7bd7de-2c53-477c-4d41-30b23d6c6016\",\"SomeGuidProperty@odata.type\":\"Edm.Guid\",\"SomeInt64Property\":\"9223372036854775807\",\"SomeInt64Property@odata.type\":\"Edm.Int64\",\"SomeIntProperty\":42,\"SomeStringProperty\":\"some + string\",\"StringProp\":\"some string 3\"}\r\n--changeset_03f12eec-7a2f-46c8-78a3-30799f56b3c0--\r\n\r\n--batch_9e5262f4-1bac-49aa-5e98-659e96cc8629--\r\n" + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "3550" + Content-Type: + - multipart/mixed; boundary=batch_9e5262f4-1bac-49aa-5e98-659e96cc8629 + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; Windows_NT) + X-Ms-Date: + - Fri, 21 May 2021 18:23:34 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.cosmos.azure.com/$batch + method: POST + response: + body: "--batchresponse_2c374acb-11fe-45dd-abb9-b8fa0285e378\r\nContent-Type: multipart/mixed; + boundary=changesetresponse_2a51fb17-83d0-47ff-ab71-943237da06ed\r\n\r\n--changesetresponse_2a51fb17-83d0-47ff-ab71-943237da06ed\nContent-Type: + application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 409 Conflict\r\nContent-Type: + application/json;odata=fullmetadata\r\n\r\n{\"odata.error\":{\"code\":\"EntityAlreadyExists\",\"message\":{\"lang\":\"en-us\",\"value\":\"2:The + specified entity already exists.\\n\\nRequestID:d2475065-a351-4a8b-92cc-ad5777e346de\\n\"}}}\r\n--changesetresponse_2a51fb17-83d0-47ff-ab71-943237da06ed--\n--batchresponse_2c374acb-11fe-45dd-abb9-b8fa0285e378--\r\n" + headers: + Content-Type: + - multipart/mixed; boundary=batchresponse_2c374acb-11fe-45dd-abb9-b8fa0285e378 + Date: + - Fri, 21 May 2021 18:23:34 GMT + Server: + - Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - d2475065-a351-4a8b-92cc-ad5777e346de + status: 202 Accepted + code: 202 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Fri, 21 May 2021 18:23:34 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.cosmos.azure.com/Tables('gotabletzmby34yuxg6n') + method: DELETE + response: + body: "" + headers: + Content-Length: + - "0" + Date: + - Fri, 21 May 2021 18:23:34 GMT + Server: + - Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - 4005b91f-1bc7-4149-9f87-9ed556c393de + status: 204 No Content + code: 204 + duration: "" diff --git a/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestBatchMixed-variables.yaml b/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestBatchMixed-variables.yaml new file mode 100644 index 000000000000..b41be654bf47 --- /dev/null +++ b/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestBatchMixed-variables.yaml @@ -0,0 +1,6 @@ +--- +COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com +TABLES_COSMOS_ACCOUNT_NAME: chrisstablesprim +TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== +now: "2021-05-21T14:41:05.1021027-05:00" +randomSeed: "1621626063" diff --git a/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestBatchMixed.yaml b/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestBatchMixed.yaml new file mode 100644 index 000000000000..376c67befeb3 --- /dev/null +++ b/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestBatchMixed.yaml @@ -0,0 +1,281 @@ +--- +version: 1 +interactions: +- request: + body: '{"TableName":"gotable3m8dvqbvcbgmg"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "36" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Fri, 21 May 2021 19:41:03 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.cosmos.azure.com/Tables + method: POST + response: + body: '{"TableName":"gotable3m8dvqbvcbgmg","odata.metadata":"https://chrisstablesprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' + headers: + Content-Type: + - application/json;odata=minimalmetadata + Date: + - Fri, 21 May 2021 19:41:04 GMT + Etag: + - W/"datetime'2021-05-21T19%3A41%3A04.7087112Z'" + Location: + - https://chrisstablesprim.table.cosmos.azure.com/Tables('gotable3m8dvqbvcbgmg') + Server: + - Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - 3f6441cb-4700-494e-9552-bfe42d0f6ce0 + status: 201 Ok + code: 201 + duration: "" +- request: + body: "--batch_80320635-4aac-4149-7852-98d9c153d70c\r\nContent-Type: multipart/mixed; + boundary=changeset_f291243d-1675-4bd4-7c0d-8f9c37b602db\r\n\r\n--changeset_f291243d-1675-4bd4-7c0d-8f9c37b602db\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://chrisstablesprim.table.cosmos.azure.com/gotable3m8dvqbvcbgmg?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: + 663\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"BoolProp\":true,\"IntProp\":1,\"PartitionKey\":\"partition\",\"RowKey\":\"1\",\"SomeBinaryProperty\":\"c29tZSBieXRlcw==\",\"SomeBinaryProperty@odata.type\":\"Edm.Binary\",\"SomeDateProperty\":\"2021-05-21T19:41:05.1021027Z\",\"SomeDateProperty@odata.type\":\"Edm.DateTime\",\"SomeDoubleProperty0\":1,\"SomeDoubleProperty0@odata.type\":\"Edm.Double\",\"SomeDoubleProperty1\":1.2345,\"SomeDoubleProperty1@odata.type\":\"Edm.Double\",\"SomeGuidProperty\":\"c4d3ae3f-7292-4e24-6ba8-2e7aeb230a6a\",\"SomeGuidProperty@odata.type\":\"Edm.Guid\",\"SomeInt64Property\":\"9223372036854775807\",\"SomeInt64Property@odata.type\":\"Edm.Int64\",\"SomeIntProperty\":42,\"SomeStringProperty\":\"some + string\",\"StringProp\":\"some string 1\"}\r\n--changeset_f291243d-1675-4bd4-7c0d-8f9c37b602db\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://chrisstablesprim.table.cosmos.azure.com/gotable3m8dvqbvcbgmg?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: + 663\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"BoolProp\":true,\"IntProp\":2,\"PartitionKey\":\"partition\",\"RowKey\":\"2\",\"SomeBinaryProperty\":\"c29tZSBieXRlcw==\",\"SomeBinaryProperty@odata.type\":\"Edm.Binary\",\"SomeDateProperty\":\"2021-05-21T19:41:05.1021027Z\",\"SomeDateProperty@odata.type\":\"Edm.DateTime\",\"SomeDoubleProperty0\":1,\"SomeDoubleProperty0@odata.type\":\"Edm.Double\",\"SomeDoubleProperty1\":1.2345,\"SomeDoubleProperty1@odata.type\":\"Edm.Double\",\"SomeGuidProperty\":\"1180f1b3-b1de-48ad-71c4-ef4f70b3b49a\",\"SomeGuidProperty@odata.type\":\"Edm.Guid\",\"SomeInt64Property\":\"9223372036854775807\",\"SomeInt64Property@odata.type\":\"Edm.Int64\",\"SomeIntProperty\":42,\"SomeStringProperty\":\"some + string\",\"StringProp\":\"some string 2\"}\r\n--changeset_f291243d-1675-4bd4-7c0d-8f9c37b602db\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://chrisstablesprim.table.cosmos.azure.com/gotable3m8dvqbvcbgmg?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: + 663\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"BoolProp\":true,\"IntProp\":3,\"PartitionKey\":\"partition\",\"RowKey\":\"3\",\"SomeBinaryProperty\":\"c29tZSBieXRlcw==\",\"SomeBinaryProperty@odata.type\":\"Edm.Binary\",\"SomeDateProperty\":\"2021-05-21T19:41:05.1021027Z\",\"SomeDateProperty@odata.type\":\"Edm.DateTime\",\"SomeDoubleProperty0\":1,\"SomeDoubleProperty0@odata.type\":\"Edm.Double\",\"SomeDoubleProperty1\":1.2345,\"SomeDoubleProperty1@odata.type\":\"Edm.Double\",\"SomeGuidProperty\":\"51d51f9f-3692-4675-7e9b-8ee1a704204f\",\"SomeGuidProperty@odata.type\":\"Edm.Guid\",\"SomeInt64Property\":\"9223372036854775807\",\"SomeInt64Property@odata.type\":\"Edm.Int64\",\"SomeIntProperty\":42,\"SomeStringProperty\":\"some + string\",\"StringProp\":\"some string 3\"}\r\n--changeset_f291243d-1675-4bd4-7c0d-8f9c37b602db--\r\n\r\n--batch_80320635-4aac-4149-7852-98d9c153d70c--\r\n" + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "3550" + Content-Type: + - multipart/mixed; boundary=batch_80320635-4aac-4149-7852-98d9c153d70c + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; Windows_NT) + X-Ms-Date: + - Fri, 21 May 2021 19:41:05 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.cosmos.azure.com/$batch + method: POST + response: + body: "--batchresponse_a9702722-351c-4503-882c-974676140382\r\nContent-Type: multipart/mixed; + boundary=changesetresponse_01d951c7-cf0c-4ef5-a40a-38b651d346bf\r\n\r\n--changesetresponse_01d951c7-cf0c-4ef5-a40a-38b651d346bf\nContent-Type: + application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: + W/\"datetime'2021-05-21T19%3A41%3A05.3346824Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: + https://chrisstablesprim.table.cosmos.azure.com/gotable3m8dvqbvcbgmg(PartitionKey='partition',RowKey='1')\r\nContent-ID: + 1\r\n\r\n\r\n--changesetresponse_01d951c7-cf0c-4ef5-a40a-38b651d346bf\nContent-Type: + application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: + W/\"datetime'2021-05-21T19%3A41%3A05.3356040Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: + https://chrisstablesprim.table.cosmos.azure.com/gotable3m8dvqbvcbgmg(PartitionKey='partition',RowKey='2')\r\nContent-ID: + 2\r\n\r\n\r\n--changesetresponse_01d951c7-cf0c-4ef5-a40a-38b651d346bf\nContent-Type: + application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: + W/\"datetime'2021-05-21T19%3A41%3A05.3362184Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: + https://chrisstablesprim.table.cosmos.azure.com/gotable3m8dvqbvcbgmg(PartitionKey='partition',RowKey='3')\r\nContent-ID: + 3\r\n\r\n\r\n--changesetresponse_01d951c7-cf0c-4ef5-a40a-38b651d346bf--\n--batchresponse_a9702722-351c-4503-882c-974676140382--\r\n" + headers: + Content-Type: + - multipart/mixed; boundary=batchresponse_a9702722-351c-4503-882c-974676140382 + Date: + - Fri, 21 May 2021 19:41:04 GMT + Server: + - Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - 94500c18-401b-4b44-9882-f954843f31bd + status: 202 Accepted + code: 202 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Fri, 21 May 2021 19:41:05 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.cosmos.azure.com/gotable3m8dvqbvcbgmg()?%24filter=RowKey+eq+%271%27 + method: GET + response: + body: '{"value":[{"odata.etag":"W/\"datetime''2021-05-21T19%3A41%3A05.3346824Z''\"","BoolProp":true,"IntProp":1,"PartitionKey":"partition","RowKey":"1","SomeBinaryProperty@odata.type":"Edm.Binary","SomeBinaryProperty":"c29tZSBieXRlcw==","SomeDateProperty@odata.type":"Edm.DateTime","SomeDateProperty":"2021-05-21T19:41:05.1021027Z","SomeDoubleProperty0":1.0,"SomeDoubleProperty1":1.2345,"SomeGuidProperty@odata.type":"Edm.Guid","SomeGuidProperty":"c4d3ae3f-7292-4e24-6ba8-2e7aeb230a6a","SomeInt64Property@odata.type":"Edm.Int64","SomeInt64Property":"9223372036854775807","SomeIntProperty":42,"SomeStringProperty":"some + string","StringProp":"some string 1","Timestamp":"2021-05-21T19:41:05.3346824Z"}],"odata.metadata":"https://chrisstablesprim.table.cosmos.azure.com/$metadata#gotable3m8dvqbvcbgmg"}' + headers: + Content-Type: + - application/json;odata=minimalmetadata + Date: + - Fri, 21 May 2021 19:41:04 GMT + Server: + - Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - 938e335a-d6f0-4d10-904f-ea9f7800149c + status: 200 Ok + code: 200 + duration: "" +- request: + body: "--batch_1de6d73d-d2eb-4a17-7801-13a2879cfa9c\r\nContent-Type: multipart/mixed; + boundary=changeset_f6299849-8235-4d0c-757f-95ac2ffe2db7\r\n\r\n--changeset_f6299849-8235-4d0c-757f-95ac2ffe2db7\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://chrisstablesprim.table.cosmos.azure.com/gotable3m8dvqbvcbgmg(PartitionKey='partition',RowKey='1')?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + HTTP/1.1\r\nAccept: application/json\r\nContent-Length: 63\r\nContent-Type: + application/json\r\nDataserviceversion: 3.0\r\nIf-Match: W/\"datetime'2021-05-21T19%3A41%3A05.3346824Z'\"\r\nX-Http-Method: + MERGE\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"MergeProperty\":\"foo\",\"PartitionKey\":\"partition\",\"RowKey\":\"1\"}\r\n--changeset_f6299849-8235-4d0c-757f-95ac2ffe2db7\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nDELETE https://chrisstablesprim.table.cosmos.azure.com/gotable3m8dvqbvcbgmg(PartitionKey='partition',RowKey='2')?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nDataserviceversion: + 3.0\r\nIf-Match: *\r\nX-Ms-Version: 2019-02-02\r\n\r\n\r\n--changeset_f6299849-8235-4d0c-757f-95ac2ffe2db7\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPUT https://chrisstablesprim.table.cosmos.azure.com/gotable3m8dvqbvcbgmg(PartitionKey='partition',RowKey='3')?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + HTTP/1.1\r\nAccept: application/json\r\nContent-Length: 65\r\nContent-Type: + application/json\r\nDataserviceversion: 3.0\r\nIf-Match: *\r\nX-Ms-Version: + 2019-02-02\r\n\r\n{\"PartitionKey\":\"partition\",\"ReplaceProperty\":\"foo\",\"RowKey\":\"3\"}\r\n--changeset_f6299849-8235-4d0c-757f-95ac2ffe2db7\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://chrisstablesprim.table.cosmos.azure.com/gotable3m8dvqbvcbgmg?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: + 663\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"BoolProp\":true,\"IntProp\":4,\"PartitionKey\":\"partition\",\"RowKey\":\"4\",\"SomeBinaryProperty\":\"c29tZSBieXRlcw==\",\"SomeBinaryProperty@odata.type\":\"Edm.Binary\",\"SomeDateProperty\":\"2021-05-21T19:41:05.1021027Z\",\"SomeDateProperty@odata.type\":\"Edm.DateTime\",\"SomeDoubleProperty0\":1,\"SomeDoubleProperty0@odata.type\":\"Edm.Double\",\"SomeDoubleProperty1\":1.2345,\"SomeDoubleProperty1@odata.type\":\"Edm.Double\",\"SomeGuidProperty\":\"e08237e7-441b-4d89-7e71-dc8cd8dd82fb\",\"SomeGuidProperty@odata.type\":\"Edm.Guid\",\"SomeInt64Property\":\"9223372036854775807\",\"SomeInt64Property@odata.type\":\"Edm.Int64\",\"SomeIntProperty\":42,\"SomeStringProperty\":\"some + string\",\"StringProp\":\"some string 4\"}\r\n--changeset_f6299849-8235-4d0c-757f-95ac2ffe2db7\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://chrisstablesprim.table.cosmos.azure.com/gotable3m8dvqbvcbgmg?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: + 663\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"BoolProp\":true,\"IntProp\":5,\"PartitionKey\":\"partition\",\"RowKey\":\"5\",\"SomeBinaryProperty\":\"c29tZSBieXRlcw==\",\"SomeBinaryProperty@odata.type\":\"Edm.Binary\",\"SomeDateProperty\":\"2021-05-21T19:41:05.1021027Z\",\"SomeDateProperty@odata.type\":\"Edm.DateTime\",\"SomeDoubleProperty0\":1,\"SomeDoubleProperty0@odata.type\":\"Edm.Double\",\"SomeDoubleProperty1\":1.2345,\"SomeDoubleProperty1@odata.type\":\"Edm.Double\",\"SomeGuidProperty\":\"b486e769-b01f-4a13-5231-bca1795f2797\",\"SomeGuidProperty@odata.type\":\"Edm.Guid\",\"SomeInt64Property\":\"9223372036854775807\",\"SomeInt64Property@odata.type\":\"Edm.Int64\",\"SomeIntProperty\":42,\"SomeStringProperty\":\"some + string\",\"StringProp\":\"some string 5\"}\r\n--changeset_f6299849-8235-4d0c-757f-95ac2ffe2db7--\r\n\r\n--batch_1de6d73d-d2eb-4a17-7801-13a2879cfa9c--\r\n" + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "3935" + Content-Type: + - multipart/mixed; boundary=batch_1de6d73d-d2eb-4a17-7801-13a2879cfa9c + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; Windows_NT) + X-Ms-Date: + - Fri, 21 May 2021 19:41:05 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.cosmos.azure.com/$batch + method: POST + response: + body: "--batchresponse_26ff053e-5a43-4bed-9fee-351647f22cb8\r\nContent-Type: multipart/mixed; + boundary=changesetresponse_7bd4dd3f-b230-48aa-93a0-659d19e94058\r\n\r\n--changesetresponse_7bd4dd3f-b230-48aa-93a0-659d19e94058\nContent-Type: + application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: + W/\"datetime'2021-05-21T19%3A41%3A05.5514632Z'\"\r\nContent-ID: 1\r\n\r\n\r\n--changesetresponse_7bd4dd3f-b230-48aa-93a0-659d19e94058\nContent-Type: + application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nContent-ID: + 2\r\n\r\n\r\n--changesetresponse_7bd4dd3f-b230-48aa-93a0-659d19e94058\nContent-Type: + application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: + W/\"datetime'2021-05-21T19%3A41%3A05.5545352Z'\"\r\nContent-ID: 3\r\n\r\n\r\n--changesetresponse_7bd4dd3f-b230-48aa-93a0-659d19e94058\nContent-Type: + application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: + W/\"datetime'2021-05-21T19%3A41%3A05.5551496Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: + https://chrisstablesprim.table.cosmos.azure.com/gotable3m8dvqbvcbgmg(PartitionKey='partition',RowKey='4')\r\nContent-ID: + 4\r\n\r\n\r\n--changesetresponse_7bd4dd3f-b230-48aa-93a0-659d19e94058\nContent-Type: + application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: + W/\"datetime'2021-05-21T19%3A41%3A05.5557640Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: + https://chrisstablesprim.table.cosmos.azure.com/gotable3m8dvqbvcbgmg(PartitionKey='partition',RowKey='5')\r\nContent-ID: + 5\r\n\r\n\r\n--changesetresponse_7bd4dd3f-b230-48aa-93a0-659d19e94058--\n--batchresponse_26ff053e-5a43-4bed-9fee-351647f22cb8--\r\n" + headers: + Content-Type: + - multipart/mixed; boundary=batchresponse_26ff053e-5a43-4bed-9fee-351647f22cb8 + Date: + - Fri, 21 May 2021 19:41:04 GMT + Server: + - Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - 1fdc1f60-328f-4921-aa92-4daa90d9d983 + status: 202 Accepted + code: 202 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Fri, 21 May 2021 19:41:05 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.cosmos.azure.com/gotable3m8dvqbvcbgmg()?%24filter=RowKey+eq+%271%27 + method: GET + response: + body: '{"value":[{"odata.etag":"W/\"datetime''2021-05-21T19%3A41%3A05.5514632Z''\"","BoolProp":true,"IntProp":1,"PartitionKey":"partition","RowKey":"1","SomeBinaryProperty@odata.type":"Edm.Binary","SomeBinaryProperty":"c29tZSBieXRlcw==","SomeDateProperty@odata.type":"Edm.DateTime","SomeDateProperty":"2021-05-21T19:41:05.1021027Z","SomeDoubleProperty0":1.0,"SomeDoubleProperty1":1.2345,"SomeGuidProperty@odata.type":"Edm.Guid","SomeGuidProperty":"c4d3ae3f-7292-4e24-6ba8-2e7aeb230a6a","SomeInt64Property@odata.type":"Edm.Int64","SomeInt64Property":"9223372036854775807","SomeIntProperty":42,"SomeStringProperty":"some + string","StringProp":"some string 1","MergeProperty":"foo","Timestamp":"2021-05-21T19:41:05.5514632Z"}],"odata.metadata":"https://chrisstablesprim.table.cosmos.azure.com/$metadata#gotable3m8dvqbvcbgmg"}' + headers: + Content-Type: + - application/json;odata=minimalmetadata + Date: + - Fri, 21 May 2021 19:41:04 GMT + Server: + - Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - 36f8f06d-a7db-40ca-a5c3-9995d9921dc2 + status: 200 Ok + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Fri, 21 May 2021 19:41:05 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.cosmos.azure.com/Tables('gotable3m8dvqbvcbgmg') + method: DELETE + response: + body: "" + headers: + Content-Length: + - "0" + Date: + - Fri, 21 May 2021 19:41:06 GMT + Server: + - Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - a468a3f2-b961-4185-9082-454f33840250 + status: 204 No Content + code: 204 + duration: "" diff --git a/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestCreateTable-variables.yaml b/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestCreateTable-variables.yaml new file mode 100644 index 000000000000..5a403251353a --- /dev/null +++ b/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestCreateTable-variables.yaml @@ -0,0 +1,5 @@ +--- +COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com +TABLES_COSMOS_ACCOUNT_NAME: chrisstablesprim +TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== +randomSeed: "1617573289" diff --git a/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestCreateTable.yaml b/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestCreateTable.yaml new file mode 100644 index 000000000000..a60e34d514b1 --- /dev/null +++ b/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestCreateTable.yaml @@ -0,0 +1,75 @@ +--- +version: 1 +interactions: +- request: + body: '{"TableName":"gotable3atc3ia9qkkbd"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "36" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Sun, 04 Apr 2021 21:54:49 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.cosmos.azure.com/Tables + method: POST + response: + body: '{"TableName":"gotable3atc3ia9qkkbd","odata.metadata":"https://chrisstablesprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' + headers: + Content-Type: + - application/json;odata=minimalmetadata + Date: + - Sun, 04 Apr 2021 21:54:50 GMT + Etag: + - W/"datetime'2021-04-04T21%3A54%3A49.7968136Z'" + Location: + - https://chrisstablesprim.table.cosmos.azure.com/Tables('gotable3atc3ia9qkkbd') + Server: + - Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - b9386c93-2228-4a78-bcab-652c24994580 + status: 201 Created + code: 201 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Sun, 04 Apr 2021 21:54:50 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.cosmos.azure.com/Tables('gotable3atc3ia9qkkbd') + method: DELETE + response: + body: "" + headers: + Content-Length: + - "0" + Date: + - Sun, 04 Apr 2021 21:54:50 GMT + Server: + - Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - f8cecc20-febd-48ed-950f-6fb532eb326d + status: 204 No Content + code: 204 + duration: "" diff --git a/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestDeleteEntity-variables.yaml b/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestDeleteEntity-variables.yaml new file mode 100644 index 000000000000..4c7074f25ef1 --- /dev/null +++ b/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestDeleteEntity-variables.yaml @@ -0,0 +1,5 @@ +--- +COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com +TABLES_COSMOS_ACCOUNT_NAME: chrisstablesprim +TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== +randomSeed: "1621624378" diff --git a/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestDeleteEntity.yaml b/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestDeleteEntity.yaml new file mode 100644 index 000000000000..dbdadd952053 --- /dev/null +++ b/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestDeleteEntity.yaml @@ -0,0 +1,156 @@ +--- +version: 1 +interactions: +- request: + body: '{"TableName":"gotablezdpmnyzkryrie"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "36" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Fri, 21 May 2021 19:12:58 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.cosmos.azure.com/Tables + method: POST + response: + body: '{"TableName":"gotablezdpmnyzkryrie","odata.metadata":"https://chrisstablesprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' + headers: + Content-Type: + - application/json;odata=minimalmetadata + Date: + - Fri, 21 May 2021 19:12:59 GMT + Etag: + - W/"datetime'2021-05-21T19%3A12%3A59.2534536Z'" + Location: + - https://chrisstablesprim.table.cosmos.azure.com/Tables('gotablezdpmnyzkryrie') + Server: + - Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - 7c429f5f-dca8-4df1-bd4b-f5bc1fde8790 + status: 201 Ok + code: 201 + duration: "" +- request: + body: '{"BoolProp":true,"IntProp":1,"PartitionKey":"partition","RowKey":"1","StringProp":"some + string 1"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "98" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + Prefer: + - return-no-content + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Fri, 21 May 2021 19:12:59 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.cosmos.azure.com/gotablezdpmnyzkryrie + method: POST + response: + body: "" + headers: + Content-Length: + - "0" + Date: + - Fri, 21 May 2021 19:12:59 GMT + Etag: + - W/"datetime'2021-05-21T19%3A12%3A59.7676040Z'" + Location: + - https://chrisstablesprim.table.cosmos.azure.com/gotablezdpmnyzkryrie(PartitionKey='partition',RowKey='1') + Preference-Applied: + - return-no-content + Server: + - Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - 44675488-a37b-4fe1-b501-0e28dbe55652 + status: 204 No Content + code: 204 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Dataserviceversion: + - "3.0" + If-Match: + - '*' + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Fri, 21 May 2021 19:12:59 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.cosmos.azure.com/gotablezdpmnyzkryrie(PartitionKey='partition',RowKey='1') + method: DELETE + response: + body: "" + headers: + Content-Length: + - "0" + Date: + - Fri, 21 May 2021 19:12:59 GMT + Server: + - Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - 34dc8550-34e5-45c7-9625-0f5ba9721089 + status: 204 No Content + code: 204 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Fri, 21 May 2021 19:12:59 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.cosmos.azure.com/Tables('gotablezdpmnyzkryrie') + method: DELETE + response: + body: "" + headers: + Content-Length: + - "0" + Date: + - Fri, 21 May 2021 19:12:59 GMT + Server: + - Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - 56f22cb9-bf6b-4764-8f79-2afa92a5c479 + status: 204 No Content + code: 204 + duration: "" diff --git a/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestGetEntity-variables.yaml b/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestGetEntity-variables.yaml new file mode 100644 index 000000000000..4caa11ec87e2 --- /dev/null +++ b/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestGetEntity-variables.yaml @@ -0,0 +1,5 @@ +--- +COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com +TABLES_COSMOS_ACCOUNT_NAME: chrisstablesprim +TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== +randomSeed: "1621634379" diff --git a/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestGetEntity.yaml b/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestGetEntity.yaml new file mode 100644 index 000000000000..8d9555ed484a --- /dev/null +++ b/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestGetEntity.yaml @@ -0,0 +1,157 @@ +--- +version: 1 +interactions: +- request: + body: '{"TableName":"gotable6durux9k2gsr8"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "36" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Fri, 21 May 2021 21:59:39 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.cosmos.azure.com/Tables + method: POST + response: + body: '{"TableName":"gotable6durux9k2gsr8","odata.metadata":"https://chrisstablesprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' + headers: + Content-Type: + - application/json;odata=minimalmetadata + Date: + - Fri, 21 May 2021 21:59:40 GMT + Etag: + - W/"datetime'2021-05-21T21%3A59%3A40.3318280Z'" + Location: + - https://chrisstablesprim.table.cosmos.azure.com/Tables('gotable6durux9k2gsr8') + Server: + - Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - c2e26f70-23d9-4093-a9a4-9540ad534c18 + status: 201 Ok + code: 201 + duration: "" +- request: + body: '{"BoolProp":true,"IntProp":1,"PartitionKey":"partition","RowKey":"1","StringProp":"some + string 1"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "98" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + Prefer: + - return-no-content + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Fri, 21 May 2021 21:59:40 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.cosmos.azure.com/gotable6durux9k2gsr8 + method: POST + response: + body: "" + headers: + Content-Length: + - "0" + Date: + - Fri, 21 May 2021 21:59:40 GMT + Etag: + - W/"datetime'2021-05-21T21%3A59%3A40.8694280Z'" + Location: + - https://chrisstablesprim.table.cosmos.azure.com/gotable6durux9k2gsr8(PartitionKey='partition',RowKey='1') + Preference-Applied: + - return-no-content + Server: + - Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - 6c631ecc-f986-46a6-9fbb-7d3c853b0ed1 + status: 204 No Content + code: 204 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Fri, 21 May 2021 21:59:40 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.cosmos.azure.com/gotable6durux9k2gsr8(PartitionKey='partition',RowKey='1') + method: GET + response: + body: '{"odata.metadata":"https://chrisstablesprim.table.cosmos.azure.com/gotable6durux9k2gsr8/$metadata#gotable6durux9k2gsr8/@Element","odata.etag":"W/\"datetime''2021-05-21T21%3A59%3A40.8694280Z''\"","BoolProp":true,"IntProp":1,"PartitionKey":"partition","RowKey":"1","StringProp":"some + string 1","Timestamp":"2021-05-21T21:59:40.8694280Z"}' + headers: + Content-Type: + - application/json;odata=minimalmetadata + Date: + - Fri, 21 May 2021 21:59:40 GMT + Etag: + - W/"datetime'2021-05-21T21%3A59%3A40.8694280Z'" + Server: + - Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - fdfab123-339c-4d90-947e-caf22d86c87d + status: 200 Ok + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Fri, 21 May 2021 21:59:40 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.cosmos.azure.com/Tables('gotable6durux9k2gsr8') + method: DELETE + response: + body: "" + headers: + Content-Length: + - "0" + Date: + - Fri, 21 May 2021 21:59:40 GMT + Server: + - Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - 8dd07d23-ae92-459a-bbb4-3f8575021ad5 + status: 204 No Content + code: 204 + duration: "" diff --git a/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestMergeEntity-variables.yaml b/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestMergeEntity-variables.yaml new file mode 100644 index 000000000000..db05ce09d74c --- /dev/null +++ b/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestMergeEntity-variables.yaml @@ -0,0 +1,5 @@ +--- +COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com +TABLES_COSMOS_ACCOUNT_NAME: chrisstablesprim +TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== +randomSeed: "1621628756" diff --git a/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestMergeEntity.yaml b/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestMergeEntity.yaml new file mode 100644 index 000000000000..77bdca4ccce1 --- /dev/null +++ b/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestMergeEntity.yaml @@ -0,0 +1,232 @@ +--- +version: 1 +interactions: +- request: + body: '{"TableName":"gotable6emf0bk6m2agc"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "36" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Fri, 21 May 2021 20:25:56 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.cosmos.azure.com/Tables + method: POST + response: + body: '{"TableName":"gotable6emf0bk6m2agc","odata.metadata":"https://chrisstablesprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' + headers: + Content-Type: + - application/json;odata=minimalmetadata + Date: + - Fri, 21 May 2021 20:25:57 GMT + Etag: + - W/"datetime'2021-05-21T20%3A25%3A57.4829064Z'" + Location: + - https://chrisstablesprim.table.cosmos.azure.com/Tables('gotable6emf0bk6m2agc') + Server: + - Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - 5fa5b82f-551e-424c-8695-36d3099e2ec0 + status: 201 Ok + code: 201 + duration: "" +- request: + body: '{"BoolProp":true,"IntProp":1,"PartitionKey":"partition","RowKey":"1","StringProp":"some + string 1"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "98" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + Prefer: + - return-no-content + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Fri, 21 May 2021 20:25:57 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.cosmos.azure.com/gotable6emf0bk6m2agc + method: POST + response: + body: "" + headers: + Content-Length: + - "0" + Date: + - Fri, 21 May 2021 20:25:57 GMT + Etag: + - W/"datetime'2021-05-21T20%3A25%3A58.0876808Z'" + Location: + - https://chrisstablesprim.table.cosmos.azure.com/gotable6emf0bk6m2agc(PartitionKey='partition',RowKey='1') + Preference-Applied: + - return-no-content + Server: + - Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - 51bcbecc-ab8e-4c77-8f28-92843e3bd90c + status: 204 No Content + code: 204 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Fri, 21 May 2021 20:25:57 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.cosmos.azure.com/gotable6emf0bk6m2agc()?%24filter=RowKey+eq+%271%27 + method: GET + response: + body: '{"value":[{"odata.etag":"W/\"datetime''2021-05-21T20%3A25%3A58.0876808Z''\"","BoolProp":true,"IntProp":1,"PartitionKey":"partition","RowKey":"1","StringProp":"some + string 1","Timestamp":"2021-05-21T20:25:58.0876808Z"}],"odata.metadata":"https://chrisstablesprim.table.cosmos.azure.com/$metadata#gotable6emf0bk6m2agc"}' + headers: + Content-Type: + - application/json;odata=minimalmetadata + Date: + - Fri, 21 May 2021 20:25:57 GMT + Server: + - Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - 82b460c2-5845-41f1-a62f-854fe69ac246 + status: 200 Ok + code: 200 + duration: "" +- request: + body: '{"MergeProperty":"foo","PartitionKey":"partition","RowKey":"1"}' + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + Content-Length: + - "63" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + If-Match: + - '*' + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + Windows_NT) + X-Http-Method: + - MERGE + X-Ms-Date: + - Fri, 21 May 2021 20:25:58 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.cosmos.azure.com/gotable6emf0bk6m2agc(PartitionKey='partition',RowKey='1') + method: POST + response: + body: "" + headers: + Content-Length: + - "0" + Date: + - Fri, 21 May 2021 20:25:58 GMT + Etag: + - W/"datetime'2021-05-21T20%3A25%3A58.2475272Z'" + Server: + - Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - 9dc5e715-8500-4ef9-a2d0-d26602a86f16 + status: 204 No Content + code: 204 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Fri, 21 May 2021 20:25:58 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.cosmos.azure.com/gotable6emf0bk6m2agc()?%24filter=RowKey+eq+%271%27 + method: GET + response: + body: '{"value":[{"odata.etag":"W/\"datetime''2021-05-21T20%3A25%3A58.2475272Z''\"","BoolProp":true,"IntProp":1,"PartitionKey":"partition","RowKey":"1","StringProp":"some + string 1","MergeProperty":"foo","Timestamp":"2021-05-21T20:25:58.2475272Z"}],"odata.metadata":"https://chrisstablesprim.table.cosmos.azure.com/$metadata#gotable6emf0bk6m2agc"}' + headers: + Content-Type: + - application/json;odata=minimalmetadata + Date: + - Fri, 21 May 2021 20:25:58 GMT + Server: + - Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - 87e09a62-3363-49b8-bb37-9d68a981b6cd + status: 200 Ok + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Fri, 21 May 2021 20:25:58 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.cosmos.azure.com/Tables('gotable6emf0bk6m2agc') + method: DELETE + response: + body: "" + headers: + Content-Length: + - "0" + Date: + - Fri, 21 May 2021 20:25:58 GMT + Server: + - Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - adb03d8d-0443-442d-99ed-1546b9f305dd + status: 204 No Content + code: 204 + duration: "" diff --git a/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestQueryComplexEntity-variables.yaml b/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestQueryComplexEntity-variables.yaml new file mode 100644 index 000000000000..1a38b8ca8f7c --- /dev/null +++ b/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestQueryComplexEntity-variables.yaml @@ -0,0 +1,6 @@ +--- +COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com +TABLES_COSMOS_ACCOUNT_NAME: chrisstablesprim +TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== +now: "2021-05-19T11:25:36.9614656-05:00" +randomSeed: "1621441535" diff --git a/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestQueryComplexEntity.yaml b/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestQueryComplexEntity.yaml new file mode 100644 index 000000000000..2df9bc1de628 --- /dev/null +++ b/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestQueryComplexEntity.yaml @@ -0,0 +1,342 @@ +--- +version: 1 +interactions: +- request: + body: '{"TableName":"gotableerbzz3oh8axos"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "36" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Wed, 19 May 2021 16:25:35 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.cosmos.azure.com/Tables + method: POST + response: + body: '{"TableName":"gotableerbzz3oh8axos","odata.metadata":"https://chrisstablesprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' + headers: + Content-Type: + - application/json;odata=minimalmetadata + Date: + - Wed, 19 May 2021 16:25:36 GMT + Etag: + - W/"datetime'2021-05-19T16%3A25%3A36.7447560Z'" + Location: + - https://chrisstablesprim.table.cosmos.azure.com/Tables('gotableerbzz3oh8axos') + Server: + - Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - 5c17ccda-a639-4be6-96cb-e8273c725aef + status: 201 Ok + code: 201 + duration: "" +- request: + body: '{"BoolProp":true,"IntProp":1,"PartitionKey":"partition","RowKey":"1","SomeBinaryProperty":"c29tZSBieXRlcw==","SomeBinaryProperty@odata.type":"Edm.Binary","SomeDateProperty":"2021-05-19T16:25:36.9614656Z","SomeDateProperty@odata.type":"Edm.DateTime","SomeDoubleProperty0":1,"SomeDoubleProperty0@odata.type":"Edm.Double","SomeDoubleProperty1":1.2345,"SomeDoubleProperty1@odata.type":"Edm.Double","SomeGuidProperty":"d043f74e-07ff-4cc6-466d-4a3e83bea7a6","SomeGuidProperty@odata.type":"Edm.Guid","SomeInt64Property":"9223372036854775807","SomeInt64Property@odata.type":"Edm.Int64","SomeIntProperty":42,"SomeStringProperty":"some + string","StringProp":"some string 1"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "663" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + Prefer: + - return-no-content + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Wed, 19 May 2021 16:25:36 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.cosmos.azure.com/gotableerbzz3oh8axos + method: POST + response: + body: "" + headers: + Content-Length: + - "0" + Date: + - Wed, 19 May 2021 16:25:37 GMT + Etag: + - W/"datetime'2021-05-19T16%3A25%3A37.2379144Z'" + Location: + - https://chrisstablesprim.table.cosmos.azure.com/gotableerbzz3oh8axos(PartitionKey='partition',RowKey='1') + Preference-Applied: + - return-no-content + Server: + - Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - 4bc36820-3f67-4d67-8498-614f874bdad2 + status: 204 No Content + code: 204 + duration: "" +- request: + body: '{"BoolProp":true,"IntProp":2,"PartitionKey":"partition","RowKey":"2","SomeBinaryProperty":"c29tZSBieXRlcw==","SomeBinaryProperty@odata.type":"Edm.Binary","SomeDateProperty":"2021-05-19T16:25:36.9614656Z","SomeDateProperty@odata.type":"Edm.DateTime","SomeDoubleProperty0":1,"SomeDoubleProperty0@odata.type":"Edm.Double","SomeDoubleProperty1":1.2345,"SomeDoubleProperty1@odata.type":"Edm.Double","SomeGuidProperty":"7ff97177-74be-48b0-6508-e241a43145ca","SomeGuidProperty@odata.type":"Edm.Guid","SomeInt64Property":"9223372036854775807","SomeInt64Property@odata.type":"Edm.Int64","SomeIntProperty":42,"SomeStringProperty":"some + string","StringProp":"some string 2"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "663" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + Prefer: + - return-no-content + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Wed, 19 May 2021 16:25:37 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.cosmos.azure.com/gotableerbzz3oh8axos + method: POST + response: + body: "" + headers: + Content-Length: + - "0" + Date: + - Wed, 19 May 2021 16:25:37 GMT + Etag: + - W/"datetime'2021-05-19T16%3A25%3A37.3221896Z'" + Location: + - https://chrisstablesprim.table.cosmos.azure.com/gotableerbzz3oh8axos(PartitionKey='partition',RowKey='2') + Preference-Applied: + - return-no-content + Server: + - Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - 6b425666-7fd5-48fb-a84b-43b4b0f282cb + status: 204 No Content + code: 204 + duration: "" +- request: + body: '{"BoolProp":true,"IntProp":3,"PartitionKey":"partition","RowKey":"3","SomeBinaryProperty":"c29tZSBieXRlcw==","SomeBinaryProperty@odata.type":"Edm.Binary","SomeDateProperty":"2021-05-19T16:25:36.9614656Z","SomeDateProperty@odata.type":"Edm.DateTime","SomeDoubleProperty0":1,"SomeDoubleProperty0@odata.type":"Edm.Double","SomeDoubleProperty1":1.2345,"SomeDoubleProperty1@odata.type":"Edm.Double","SomeGuidProperty":"e3d25206-7ddd-45f3-5914-7324bcac30da","SomeGuidProperty@odata.type":"Edm.Guid","SomeInt64Property":"9223372036854775807","SomeInt64Property@odata.type":"Edm.Int64","SomeIntProperty":42,"SomeStringProperty":"some + string","StringProp":"some string 3"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "663" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + Prefer: + - return-no-content + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Wed, 19 May 2021 16:25:37 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.cosmos.azure.com/gotableerbzz3oh8axos + method: POST + response: + body: "" + headers: + Content-Length: + - "0" + Date: + - Wed, 19 May 2021 16:25:37 GMT + Etag: + - W/"datetime'2021-05-19T16%3A25%3A37.3971464Z'" + Location: + - https://chrisstablesprim.table.cosmos.azure.com/gotableerbzz3oh8axos(PartitionKey='partition',RowKey='3') + Preference-Applied: + - return-no-content + Server: + - Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - 37712eb5-d553-4201-8281-557bb6a05794 + status: 204 No Content + code: 204 + duration: "" +- request: + body: '{"BoolProp":true,"IntProp":4,"PartitionKey":"partition","RowKey":"4","SomeBinaryProperty":"c29tZSBieXRlcw==","SomeBinaryProperty@odata.type":"Edm.Binary","SomeDateProperty":"2021-05-19T16:25:36.9614656Z","SomeDateProperty@odata.type":"Edm.DateTime","SomeDoubleProperty0":1,"SomeDoubleProperty0@odata.type":"Edm.Double","SomeDoubleProperty1":1.2345,"SomeDoubleProperty1@odata.type":"Edm.Double","SomeGuidProperty":"10b21c2d-8c8a-4171-6d54-b3c3c44c5a13","SomeGuidProperty@odata.type":"Edm.Guid","SomeInt64Property":"9223372036854775807","SomeInt64Property@odata.type":"Edm.Int64","SomeIntProperty":42,"SomeStringProperty":"some + string","StringProp":"some string 4"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "663" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + Prefer: + - return-no-content + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Wed, 19 May 2021 16:25:37 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.cosmos.azure.com/gotableerbzz3oh8axos + method: POST + response: + body: "" + headers: + Content-Length: + - "0" + Date: + - Wed, 19 May 2021 16:25:37 GMT + Etag: + - W/"datetime'2021-05-19T16%3A25%3A37.4755848Z'" + Location: + - https://chrisstablesprim.table.cosmos.azure.com/gotableerbzz3oh8axos(PartitionKey='partition',RowKey='4') + Preference-Applied: + - return-no-content + Server: + - Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - 208c2931-b5c1-4d93-8608-1dd165a5cb9a + status: 204 No Content + code: 204 + duration: "" +- request: + body: '{"BoolProp":true,"IntProp":5,"PartitionKey":"partition","RowKey":"5","SomeBinaryProperty":"c29tZSBieXRlcw==","SomeBinaryProperty@odata.type":"Edm.Binary","SomeDateProperty":"2021-05-19T16:25:36.9614656Z","SomeDateProperty@odata.type":"Edm.DateTime","SomeDoubleProperty0":1,"SomeDoubleProperty0@odata.type":"Edm.Double","SomeDoubleProperty1":1.2345,"SomeDoubleProperty1@odata.type":"Edm.Double","SomeGuidProperty":"ac1bacb5-1e2a-453e-5410-2ba3ec3bcbf5","SomeGuidProperty@odata.type":"Edm.Guid","SomeInt64Property":"9223372036854775807","SomeInt64Property@odata.type":"Edm.Int64","SomeIntProperty":42,"SomeStringProperty":"some + string","StringProp":"some string 5"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "663" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + Prefer: + - return-no-content + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Wed, 19 May 2021 16:25:37 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.cosmos.azure.com/gotableerbzz3oh8axos + method: POST + response: + body: "" + headers: + Content-Length: + - "0" + Date: + - Wed, 19 May 2021 16:25:37 GMT + Etag: + - W/"datetime'2021-05-19T16%3A25%3A37.5523848Z'" + Location: + - https://chrisstablesprim.table.cosmos.azure.com/gotableerbzz3oh8axos(PartitionKey='partition',RowKey='5') + Preference-Applied: + - return-no-content + Server: + - Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - c720727d-3141-4628-9d6a-5fe36e7c1f3f + status: 204 No Content + code: 204 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Wed, 19 May 2021 16:25:37 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.cosmos.azure.com/gotableerbzz3oh8axos()?%24filter=RowKey+lt+%275%27 + method: GET + response: + body: '{"value":[{"odata.etag":"W/\"datetime''2021-05-19T16%3A25%3A37.2379144Z''\"","BoolProp":true,"IntProp":1,"PartitionKey":"partition","RowKey":"1","SomeBinaryProperty@odata.type":"Edm.Binary","SomeBinaryProperty":"c29tZSBieXRlcw==","SomeDateProperty@odata.type":"Edm.DateTime","SomeDateProperty":"2021-05-19T16:25:36.9614656Z","SomeDoubleProperty0":1.0,"SomeDoubleProperty1":1.2345,"SomeGuidProperty@odata.type":"Edm.Guid","SomeGuidProperty":"d043f74e-07ff-4cc6-466d-4a3e83bea7a6","SomeInt64Property@odata.type":"Edm.Int64","SomeInt64Property":"9223372036854775807","SomeIntProperty":42,"SomeStringProperty":"some + string","StringProp":"some string 1","Timestamp":"2021-05-19T16:25:37.2379144Z"},{"odata.etag":"W/\"datetime''2021-05-19T16%3A25%3A37.3221896Z''\"","BoolProp":true,"IntProp":2,"PartitionKey":"partition","RowKey":"2","SomeBinaryProperty@odata.type":"Edm.Binary","SomeBinaryProperty":"c29tZSBieXRlcw==","SomeDateProperty@odata.type":"Edm.DateTime","SomeDateProperty":"2021-05-19T16:25:36.9614656Z","SomeDoubleProperty0":1.0,"SomeDoubleProperty1":1.2345,"SomeGuidProperty@odata.type":"Edm.Guid","SomeGuidProperty":"7ff97177-74be-48b0-6508-e241a43145ca","SomeInt64Property@odata.type":"Edm.Int64","SomeInt64Property":"9223372036854775807","SomeIntProperty":42,"SomeStringProperty":"some + string","StringProp":"some string 2","Timestamp":"2021-05-19T16:25:37.3221896Z"},{"odata.etag":"W/\"datetime''2021-05-19T16%3A25%3A37.3971464Z''\"","BoolProp":true,"IntProp":3,"PartitionKey":"partition","RowKey":"3","SomeBinaryProperty@odata.type":"Edm.Binary","SomeBinaryProperty":"c29tZSBieXRlcw==","SomeDateProperty@odata.type":"Edm.DateTime","SomeDateProperty":"2021-05-19T16:25:36.9614656Z","SomeDoubleProperty0":1.0,"SomeDoubleProperty1":1.2345,"SomeGuidProperty@odata.type":"Edm.Guid","SomeGuidProperty":"e3d25206-7ddd-45f3-5914-7324bcac30da","SomeInt64Property@odata.type":"Edm.Int64","SomeInt64Property":"9223372036854775807","SomeIntProperty":42,"SomeStringProperty":"some + string","StringProp":"some string 3","Timestamp":"2021-05-19T16:25:37.3971464Z"},{"odata.etag":"W/\"datetime''2021-05-19T16%3A25%3A37.4755848Z''\"","BoolProp":true,"IntProp":4,"PartitionKey":"partition","RowKey":"4","SomeBinaryProperty@odata.type":"Edm.Binary","SomeBinaryProperty":"c29tZSBieXRlcw==","SomeDateProperty@odata.type":"Edm.DateTime","SomeDateProperty":"2021-05-19T16:25:36.9614656Z","SomeDoubleProperty0":1.0,"SomeDoubleProperty1":1.2345,"SomeGuidProperty@odata.type":"Edm.Guid","SomeGuidProperty":"10b21c2d-8c8a-4171-6d54-b3c3c44c5a13","SomeInt64Property@odata.type":"Edm.Int64","SomeInt64Property":"9223372036854775807","SomeIntProperty":42,"SomeStringProperty":"some + string","StringProp":"some string 4","Timestamp":"2021-05-19T16:25:37.4755848Z"}],"odata.metadata":"https://chrisstablesprim.table.cosmos.azure.com/$metadata#gotableerbzz3oh8axos"}' + headers: + Content-Type: + - application/json;odata=minimalmetadata + Date: + - Wed, 19 May 2021 16:25:37 GMT + Server: + - Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - 3cdbe1a7-78e9-468f-97f3-ac9797a0b9d0 + status: 200 Ok + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Wed, 19 May 2021 16:25:37 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.cosmos.azure.com/Tables('gotableerbzz3oh8axos') + method: DELETE + response: + body: "" + headers: + Content-Length: + - "0" + Date: + - Wed, 19 May 2021 16:25:37 GMT + Server: + - Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - 8bfec822-1a10-4c87-97ec-875c49da7acb + status: 204 No Content + code: 204 + duration: "" diff --git a/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestQuerySimpleEntity-variables.yaml b/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestQuerySimpleEntity-variables.yaml new file mode 100644 index 000000000000..05898e645159 --- /dev/null +++ b/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestQuerySimpleEntity-variables.yaml @@ -0,0 +1,5 @@ +--- +COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com +TABLES_COSMOS_ACCOUNT_NAME: chrisstablesprim +TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== +randomSeed: "1617598959" diff --git a/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestQuerySimpleEntity.yaml b/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestQuerySimpleEntity.yaml new file mode 100644 index 000000000000..4cc2c9ff4295 --- /dev/null +++ b/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestQuerySimpleEntity.yaml @@ -0,0 +1,342 @@ +--- +version: 1 +interactions: +- request: + body: '{"TableName":"gotabledtlot4b2qfkop"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "36" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Mon, 05 Apr 2021 05:02:39 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.cosmos.azure.com/Tables + method: POST + response: + body: '{"TableName":"gotabledtlot4b2qfkop","odata.metadata":"https://chrisstablesprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' + headers: + Content-Type: + - application/json;odata=minimalmetadata + Date: + - Mon, 05 Apr 2021 05:02:40 GMT + Etag: + - W/"datetime'2021-04-05T05%3A02%3A40.1485832Z'" + Location: + - https://chrisstablesprim.table.cosmos.azure.com/Tables('gotabledtlot4b2qfkop') + Server: + - Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - 0c4ccc90-a38a-47db-b904-ec327ee3f600 + status: 201 Created + code: 201 + duration: "" +- request: + body: '{"BoolProp":true,"IntProp":1,"PartitionKey":"partition","RowKey":"1","StringProp":"some + string 1"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "98" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + Prefer: + - return-no-content + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Mon, 05 Apr 2021 05:02:40 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.cosmos.azure.com/gotabledtlot4b2qfkop + method: POST + response: + body: "" + headers: + Content-Length: + - "0" + Date: + - Mon, 05 Apr 2021 05:02:40 GMT + Etag: + - W/"datetime'2021-04-05T05%3A02%3A40.7371784Z'" + Location: + - https://chrisstablesprim.table.cosmos.azure.com/gotabledtlot4b2qfkop(PartitionKey='partition',RowKey='1') + Preference-Applied: + - return-no-content + Server: + - Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - 40cfa5d5-3867-469b-a5fe-aa61bfdded39 + status: 204 No Content + code: 204 + duration: "" +- request: + body: '{"BoolProp":true,"IntProp":2,"PartitionKey":"partition","RowKey":"2","StringProp":"some + string 2"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "98" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + Prefer: + - return-no-content + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Mon, 05 Apr 2021 05:02:40 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.cosmos.azure.com/gotabledtlot4b2qfkop + method: POST + response: + body: "" + headers: + Content-Length: + - "0" + Date: + - Mon, 05 Apr 2021 05:02:40 GMT + Etag: + - W/"datetime'2021-04-05T05%3A02%3A40.8410120Z'" + Location: + - https://chrisstablesprim.table.cosmos.azure.com/gotabledtlot4b2qfkop(PartitionKey='partition',RowKey='2') + Preference-Applied: + - return-no-content + Server: + - Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - 3c31aac3-2859-47ad-abd7-8203e7f10b11 + status: 204 No Content + code: 204 + duration: "" +- request: + body: '{"BoolProp":true,"IntProp":3,"PartitionKey":"partition","RowKey":"3","StringProp":"some + string 3"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "98" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + Prefer: + - return-no-content + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Mon, 05 Apr 2021 05:02:41 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.cosmos.azure.com/gotabledtlot4b2qfkop + method: POST + response: + body: "" + headers: + Content-Length: + - "0" + Date: + - Mon, 05 Apr 2021 05:02:40 GMT + Etag: + - W/"datetime'2021-04-05T05%3A02%3A40.9537544Z'" + Location: + - https://chrisstablesprim.table.cosmos.azure.com/gotabledtlot4b2qfkop(PartitionKey='partition',RowKey='3') + Preference-Applied: + - return-no-content + Server: + - Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - 0cd7d680-2274-4e93-9b7f-4d44cacff771 + status: 204 No Content + code: 204 + duration: "" +- request: + body: '{"BoolProp":true,"IntProp":4,"PartitionKey":"partition","RowKey":"4","StringProp":"some + string 4"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "98" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + Prefer: + - return-no-content + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Mon, 05 Apr 2021 05:02:41 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.cosmos.azure.com/gotabledtlot4b2qfkop + method: POST + response: + body: "" + headers: + Content-Length: + - "0" + Date: + - Mon, 05 Apr 2021 05:02:40 GMT + Etag: + - W/"datetime'2021-04-05T05%3A02%3A41.0579976Z'" + Location: + - https://chrisstablesprim.table.cosmos.azure.com/gotabledtlot4b2qfkop(PartitionKey='partition',RowKey='4') + Preference-Applied: + - return-no-content + Server: + - Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - 2c18f6d8-af7f-4533-bf30-9243a8e31e18 + status: 204 No Content + code: 204 + duration: "" +- request: + body: '{"BoolProp":true,"IntProp":5,"PartitionKey":"partition","RowKey":"5","StringProp":"some + string 5"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "98" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + Prefer: + - return-no-content + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Mon, 05 Apr 2021 05:02:41 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.cosmos.azure.com/gotabledtlot4b2qfkop + method: POST + response: + body: "" + headers: + Content-Length: + - "0" + Date: + - Mon, 05 Apr 2021 05:02:40 GMT + Etag: + - W/"datetime'2021-04-05T05%3A02%3A41.1676680Z'" + Location: + - https://chrisstablesprim.table.cosmos.azure.com/gotabledtlot4b2qfkop(PartitionKey='partition',RowKey='5') + Preference-Applied: + - return-no-content + Server: + - Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - 6ca39a1d-05ef-4d68-bfc2-5a79a009fdeb + status: 204 No Content + code: 204 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Mon, 05 Apr 2021 05:02:41 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.cosmos.azure.com/gotabledtlot4b2qfkop()?%24filter=RowKey+lt+%275%27 + method: GET + response: + body: '{"value":[{"odata.etag":"W/\"datetime''2021-04-05T05%3A02%3A40.7371784Z''\"","BoolProp":true,"IntProp":1,"PartitionKey":"partition","RowKey":"1","StringProp":"some + string 1","Timestamp":"2021-04-05T05:02:40.7371784Z"},{"odata.etag":"W/\"datetime''2021-04-05T05%3A02%3A40.8410120Z''\"","BoolProp":true,"IntProp":2,"PartitionKey":"partition","RowKey":"2","StringProp":"some + string 2","Timestamp":"2021-04-05T05:02:40.8410120Z"},{"odata.etag":"W/\"datetime''2021-04-05T05%3A02%3A40.9537544Z''\"","BoolProp":true,"IntProp":3,"PartitionKey":"partition","RowKey":"3","StringProp":"some + string 3","Timestamp":"2021-04-05T05:02:40.9537544Z"},{"odata.etag":"W/\"datetime''2021-04-05T05%3A02%3A41.0579976Z''\"","BoolProp":true,"IntProp":4,"PartitionKey":"partition","RowKey":"4","StringProp":"some + string 4","Timestamp":"2021-04-05T05:02:41.0579976Z"}],"odata.metadata":"https://chrisstablesprim.table.cosmos.azure.com/$metadata#gotabledtlot4b2qfkop"}' + headers: + Content-Type: + - application/json;odata=minimalmetadata + Date: + - Mon, 05 Apr 2021 05:02:40 GMT + Server: + - Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - 98466a7e-727a-4e2d-8f48-37039dae8f64 + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Mon, 05 Apr 2021 05:02:41 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.cosmos.azure.com/Tables('gotabledtlot4b2qfkop') + method: DELETE + response: + body: "" + headers: + Content-Length: + - "0" + Date: + - Mon, 05 Apr 2021 05:02:41 GMT + Server: + - Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - d7fa3ec7-64ad-43a3-8444-9f567b156391 + status: 204 No Content + code: 204 + duration: "" diff --git a/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestServiceErrors-variables.yaml b/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestServiceErrors-variables.yaml new file mode 100644 index 000000000000..be617c45b1f0 --- /dev/null +++ b/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestServiceErrors-variables.yaml @@ -0,0 +1,5 @@ +--- +COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com +TABLES_COSMOS_ACCOUNT_NAME: chrisstablesprim +TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== +randomSeed: "1617580014" diff --git a/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestServiceErrors.yaml b/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestServiceErrors.yaml new file mode 100644 index 000000000000..0a52371c64d2 --- /dev/null +++ b/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestServiceErrors.yaml @@ -0,0 +1,113 @@ +--- +version: 1 +interactions: +- request: + body: '{"TableName":"gotable85g6eby7icg1v"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "36" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Sun, 04 Apr 2021 23:46:54 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.cosmos.azure.com/Tables + method: POST + response: + body: '{"TableName":"gotable85g6eby7icg1v","odata.metadata":"https://chrisstablesprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' + headers: + Content-Type: + - application/json;odata=minimalmetadata + Date: + - Sun, 04 Apr 2021 23:46:54 GMT + Etag: + - W/"datetime'2021-04-04T23%3A46%3A54.7914760Z'" + Location: + - https://chrisstablesprim.table.cosmos.azure.com/Tables('gotable85g6eby7icg1v') + Server: + - Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - 947f9642-3c9b-475a-b3a0-6c04b3c2d40b + status: 201 Created + code: 201 + duration: "" +- request: + body: '{"TableName":"gotable85g6eby7icg1v"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "36" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Sun, 04 Apr 2021 23:46:55 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.cosmos.azure.com/Tables + method: POST + response: + body: "{\"odata.error\":{\"code\":\"TableAlreadyExists\",\"message\":{\"lang\":\"en-us\",\"value\":\"The + specified table already exists.\\nRequestID:58f7ef4b-3378-4612-8f88-7fad883916de\\n\"}}}\r\n" + headers: + Content-Type: + - application/json;odata=minimalmetadata + Date: + - Sun, 04 Apr 2021 23:46:54 GMT + Server: + - Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - 58f7ef4b-3378-4612-8f88-7fad883916de + status: 409 Conflict + code: 409 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Sun, 04 Apr 2021 23:46:55 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.cosmos.azure.com/Tables('gotable85g6eby7icg1v') + method: DELETE + response: + body: "" + headers: + Content-Length: + - "0" + Date: + - Sun, 04 Apr 2021 23:46:54 GMT + Server: + - Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - 40da51e2-3c50-4a09-a6e9-78663d0215c4 + status: 204 No Content + code: 204 + duration: "" diff --git a/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestUpsertEntity-variables.yaml b/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestUpsertEntity-variables.yaml new file mode 100644 index 000000000000..c1db334f613b --- /dev/null +++ b/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestUpsertEntity-variables.yaml @@ -0,0 +1,5 @@ +--- +COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com +TABLES_COSMOS_ACCOUNT_NAME: chrisstablesprim +TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== +randomSeed: "1621629299" diff --git a/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestUpsertEntity.yaml b/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestUpsertEntity.yaml new file mode 100644 index 000000000000..6401f20d46cd --- /dev/null +++ b/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestUpsertEntity.yaml @@ -0,0 +1,225 @@ +--- +version: 1 +interactions: +- request: + body: '{"TableName":"gotable1msfgttesz2cp"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "36" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Fri, 21 May 2021 20:34:59 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.cosmos.azure.com/Tables + method: POST + response: + body: '{"TableName":"gotable1msfgttesz2cp","odata.metadata":"https://chrisstablesprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' + headers: + Content-Type: + - application/json;odata=minimalmetadata + Date: + - Fri, 21 May 2021 20:35:00 GMT + Etag: + - W/"datetime'2021-05-21T20%3A35%3A00.7158280Z'" + Location: + - https://chrisstablesprim.table.cosmos.azure.com/Tables('gotable1msfgttesz2cp') + Server: + - Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - a06787e1-1d41-432c-92bc-45ab333cf72d + status: 201 Ok + code: 201 + duration: "" +- request: + body: '{"BoolProp":true,"IntProp":1,"PartitionKey":"partition","RowKey":"1","StringProp":"some + string 1"}' + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + Content-Length: + - "98" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Fri, 21 May 2021 20:35:01 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.cosmos.azure.com/gotable1msfgttesz2cp(PartitionKey='partition',RowKey='1') + method: PUT + response: + body: "" + headers: + Content-Length: + - "0" + Content-Type: + - application/json + Date: + - Fri, 21 May 2021 20:35:00 GMT + Etag: + - W/"datetime'2021-05-21T20%3A35%3A01.3144584Z'" + Server: + - Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - ae166874-a09d-4ddb-83cf-72d2728bcbbc + status: 204 No Content + code: 204 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Fri, 21 May 2021 20:35:01 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.cosmos.azure.com/gotable1msfgttesz2cp()?%24filter=RowKey+eq+%271%27 + method: GET + response: + body: '{"value":[{"odata.etag":"W/\"datetime''2021-05-21T20%3A35%3A01.3144584Z''\"","PartitionKey":"partition","RowKey":"1","BoolProp":true,"IntProp":1,"StringProp":"some + string 1","Timestamp":"2021-05-21T20:35:01.3144584Z"}],"odata.metadata":"https://chrisstablesprim.table.cosmos.azure.com/$metadata#gotable1msfgttesz2cp"}' + headers: + Content-Type: + - application/json;odata=minimalmetadata + Date: + - Fri, 21 May 2021 20:35:00 GMT + Server: + - Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - d091e8e7-5c01-4fd7-8637-fc7960d805b2 + status: 200 Ok + code: 200 + duration: "" +- request: + body: '{"MergeProperty":"foo","PartitionKey":"partition","RowKey":"1"}' + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + Content-Length: + - "63" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Fri, 21 May 2021 20:35:01 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.cosmos.azure.com/gotable1msfgttesz2cp(PartitionKey='partition',RowKey='1') + method: PUT + response: + body: "" + headers: + Content-Length: + - "0" + Content-Type: + - application/json + Date: + - Fri, 21 May 2021 20:35:00 GMT + Etag: + - W/"datetime'2021-05-21T20%3A35%3A01.4885384Z'" + Server: + - Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - 54960acf-d75a-4bf5-b2eb-b20a4e546c72 + status: 204 No Content + code: 204 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Fri, 21 May 2021 20:35:01 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.cosmos.azure.com/gotable1msfgttesz2cp()?%24filter=RowKey+eq+%271%27 + method: GET + response: + body: '{"value":[{"odata.etag":"W/\"datetime''2021-05-21T20%3A35%3A01.4885384Z''\"","PartitionKey":"partition","RowKey":"1","MergeProperty":"foo","Timestamp":"2021-05-21T20:35:01.4885384Z"}],"odata.metadata":"https://chrisstablesprim.table.cosmos.azure.com/$metadata#gotable1msfgttesz2cp"}' + headers: + Content-Type: + - application/json;odata=minimalmetadata + Date: + - Fri, 21 May 2021 20:35:00 GMT + Server: + - Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - 656e83b0-2e58-4c39-beec-116830e09468 + status: 200 Ok + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Fri, 21 May 2021 20:35:01 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.cosmos.azure.com/Tables('gotable1msfgttesz2cp') + method: DELETE + response: + body: "" + headers: + Content-Length: + - "0" + Date: + - Fri, 21 May 2021 20:35:01 GMT + Server: + - Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - 6d490fec-695f-4191-9f6c-50c27bafe0ef + status: 204 No Content + code: 204 + duration: "" diff --git a/sdk/tables/aztables/recordings/TestTableClient_Storage/TestAddComplexEntity-variables.yaml b/sdk/tables/aztables/recordings/TestTableClient_Storage/TestAddComplexEntity-variables.yaml new file mode 100644 index 000000000000..f86a77d88694 --- /dev/null +++ b/sdk/tables/aztables/recordings/TestTableClient_Storage/TestAddComplexEntity-variables.yaml @@ -0,0 +1,6 @@ +--- +STORAGE_ENDPOINT_SUFFIX: core.windows.net +TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== +TABLES_STORAGE_ACCOUNT_NAME: chrisstablesprim +now: "2021-04-10T19:18:38.5403201-05:00" +randomSeed: "1618100317" diff --git a/sdk/tables/aztables/recordings/TestTableClient_Storage/TestAddComplexEntity.yaml b/sdk/tables/aztables/recordings/TestTableClient_Storage/TestAddComplexEntity.yaml new file mode 100644 index 000000000000..78e8e8f28f88 --- /dev/null +++ b/sdk/tables/aztables/recordings/TestTableClient_Storage/TestAddComplexEntity.yaml @@ -0,0 +1,139 @@ +--- +version: 1 +interactions: +- request: + body: '{"TableName":"gotableseqkydnlewbop"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "36" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Sun, 11 Apr 2021 00:18:37 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.core.windows.net/Tables + method: POST + response: + body: '{"odata.metadata":"https://chrisstablesprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotableseqkydnlewbop"}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + Date: + - Sun, 11 Apr 2021 00:18:38 GMT + Location: + - https://chrisstablesprim.table.core.windows.net/Tables('gotableseqkydnlewbop') + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - 91267bb0-7002-0034-4468-2e07dc000000 + X-Ms-Version: + - "2019-02-02" + status: 201 Created + code: 201 + duration: "" +- request: + body: '{"PartitionKey":"partition","RowKey":"row","SomeBinaryProperty":"c29tZSBieXRlcw==","SomeBinaryProperty@odata.type":"Edm.Binary","SomeDateProperty":"2021-04-11T00:18:38.5403201Z","SomeDateProperty@odata.type":"Edm.DateTime","SomeDoubleProperty0":1,"SomeDoubleProperty0@odata.type":"Edm.Double","SomeDoubleProperty1":1.2345,"SomeDoubleProperty1@odata.type":"Edm.Double","SomeGuidProperty":"bc08bdf6-10bd-4b3e-612f-62de19f57821","SomeGuidProperty@odata.type":"Edm.Guid","SomeInt64Property":"9223372036854775807","SomeInt64Property@odata.type":"Edm.Int64","SomeIntProperty":42,"SomePtrStringProperty":"some + pointer to string","SomeStringProperty":"some string"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "657" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + Prefer: + - return-no-content + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Sun, 11 Apr 2021 00:18:38 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.core.windows.net/gotableseqkydnlewbop + method: POST + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Dataserviceid: + - https://chrisstablesprim.table.core.windows.net/gotableseqkydnlewbop(PartitionKey='partition',RowKey='row') + Date: + - Sun, 11 Apr 2021 00:18:38 GMT + Etag: + - W/"datetime'2021-04-11T00%3A18%3A38.2407207Z'" + Location: + - https://chrisstablesprim.table.core.windows.net/gotableseqkydnlewbop(PartitionKey='partition',RowKey='row') + Preference-Applied: + - return-no-content + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - 91267bbe-7002-0034-5068-2e07dc000000 + X-Ms-Version: + - "2019-02-02" + status: 204 No Content + code: 204 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Sun, 11 Apr 2021 00:18:38 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.core.windows.net/Tables('gotableseqkydnlewbop') + method: DELETE + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Date: + - Sun, 11 Apr 2021 00:18:38 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - 91267bc3-7002-0034-5568-2e07dc000000 + X-Ms-Version: + - "2019-02-02" + status: 204 No Content + code: 204 + duration: "" diff --git a/sdk/tables/aztables/recordings/TestTableClient_Storage/TestAddEntity-variables.yaml b/sdk/tables/aztables/recordings/TestTableClient_Storage/TestAddEntity-variables.yaml new file mode 100644 index 000000000000..b2ce8f9f7145 --- /dev/null +++ b/sdk/tables/aztables/recordings/TestTableClient_Storage/TestAddEntity-variables.yaml @@ -0,0 +1,5 @@ +--- +STORAGE_ENDPOINT_SUFFIX: core.windows.net +TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== +TABLES_STORAGE_ACCOUNT_NAME: chrisstablesprim +randomSeed: "1617580855" diff --git a/sdk/tables/aztables/recordings/TestTableClient_Storage/TestAddEntity.yaml b/sdk/tables/aztables/recordings/TestTableClient_Storage/TestAddEntity.yaml new file mode 100644 index 000000000000..e5b71baad0b6 --- /dev/null +++ b/sdk/tables/aztables/recordings/TestTableClient_Storage/TestAddEntity.yaml @@ -0,0 +1,139 @@ +--- +version: 1 +interactions: +- request: + body: '{"TableName":"gotableldjhskq166plj"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "36" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Mon, 05 Apr 2021 00:00:55 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.core.windows.net/Tables + method: POST + response: + body: '{"odata.metadata":"https://chrisstablesprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotableldjhskq166plj"}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + Date: + - Mon, 05 Apr 2021 00:00:55 GMT + Location: + - https://chrisstablesprim.table.core.windows.net/Tables('gotableldjhskq166plj') + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - 204673eb-b002-003b-64ae-2971b0000000 + X-Ms-Version: + - "2019-02-02" + status: 201 Created + code: 201 + duration: "" +- request: + body: '{"BoolProp":true,"IntProp":1,"PartitionKey":"partition","RowKey":"1","StringProp":"some + string 1"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "98" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + Prefer: + - return-no-content + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Mon, 05 Apr 2021 00:00:55 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.core.windows.net/gotableldjhskq166plj + method: POST + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Dataserviceid: + - https://chrisstablesprim.table.core.windows.net/gotableldjhskq166plj(PartitionKey='partition',RowKey='1') + Date: + - Mon, 05 Apr 2021 00:00:55 GMT + Etag: + - W/"datetime'2021-04-05T00%3A00%3A55.7477359Z'" + Location: + - https://chrisstablesprim.table.core.windows.net/gotableldjhskq166plj(PartitionKey='partition',RowKey='1') + Preference-Applied: + - return-no-content + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - 204673f0-b002-003b-67ae-2971b0000000 + X-Ms-Version: + - "2019-02-02" + status: 204 No Content + code: 204 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Mon, 05 Apr 2021 00:00:55 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.core.windows.net/Tables('gotableldjhskq166plj') + method: DELETE + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Date: + - Mon, 05 Apr 2021 00:00:55 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - 204673f1-b002-003b-68ae-2971b0000000 + X-Ms-Version: + - "2019-02-02" + status: 204 No Content + code: 204 + duration: "" diff --git a/sdk/tables/aztables/recordings/TestTableClient_Storage/TestBatchAdd-variables.yaml b/sdk/tables/aztables/recordings/TestTableClient_Storage/TestBatchAdd-variables.yaml new file mode 100644 index 000000000000..6f3cfa81b06e --- /dev/null +++ b/sdk/tables/aztables/recordings/TestTableClient_Storage/TestBatchAdd-variables.yaml @@ -0,0 +1,6 @@ +--- +STORAGE_ENDPOINT_SUFFIX: core.windows.net +TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== +TABLES_STORAGE_ACCOUNT_NAME: chrisstablesprim +now: "2021-05-18T10:39:58.4641986-05:00" +randomSeed: "1621352397" diff --git a/sdk/tables/aztables/recordings/TestTableClient_Storage/TestBatchAdd.yaml b/sdk/tables/aztables/recordings/TestTableClient_Storage/TestBatchAdd.yaml new file mode 100644 index 000000000000..ba8083378d10 --- /dev/null +++ b/sdk/tables/aztables/recordings/TestTableClient_Storage/TestBatchAdd.yaml @@ -0,0 +1,229 @@ +--- +version: 1 +interactions: +- request: + body: '{"TableName":"gotablenmikoizges9as"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "36" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Tue, 18 May 2021 15:39:57 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.core.windows.net/Tables + method: POST + response: + body: '{"odata.metadata":"https://chrisstablesprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotablenmikoizges9as"}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + Date: + - Tue, 18 May 2021 15:39:58 GMT + Location: + - https://chrisstablesprim.table.core.windows.net/Tables('gotablenmikoizges9as') + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - 5375fa6b-7002-0024-30fc-4bc2b4000000 + X-Ms-Version: + - "2019-02-02" + status: 201 Created + code: 201 + duration: "" +- request: + body: "--batch_648025d9-6ce8-4fa4-5da7-940a633d3404\r\nContent-Type: multipart/mixed; + boundary=changeset_0f2514c8-6c9b-4052-78de-f6e2e355e3f3\r\n\r\n--changeset_0f2514c8-6c9b-4052-78de-f6e2e355e3f3\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://chrisstablesprim.table.core.windows.net/gotablenmikoizges9as?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: + 663\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"BoolProp\":true,\"IntProp\":1,\"PartitionKey\":\"partition\",\"RowKey\":\"1\",\"SomeBinaryProperty\":\"c29tZSBieXRlcw==\",\"SomeBinaryProperty@odata.type\":\"Edm.Binary\",\"SomeDateProperty\":\"2021-05-18T15:39:58.4641986Z\",\"SomeDateProperty@odata.type\":\"Edm.DateTime\",\"SomeDoubleProperty0\":1,\"SomeDoubleProperty0@odata.type\":\"Edm.Double\",\"SomeDoubleProperty1\":1.2345,\"SomeDoubleProperty1@odata.type\":\"Edm.Double\",\"SomeGuidProperty\":\"d2a8e9ac-0663-4275-5820-8cf92d76404b\",\"SomeGuidProperty@odata.type\":\"Edm.Guid\",\"SomeInt64Property\":\"9223372036854775807\",\"SomeInt64Property@odata.type\":\"Edm.Int64\",\"SomeIntProperty\":42,\"SomeStringProperty\":\"some + string\",\"StringProp\":\"some string 1\"}\r\n--changeset_0f2514c8-6c9b-4052-78de-f6e2e355e3f3\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://chrisstablesprim.table.core.windows.net/gotablenmikoizges9as?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: + 663\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"BoolProp\":true,\"IntProp\":2,\"PartitionKey\":\"partition\",\"RowKey\":\"2\",\"SomeBinaryProperty\":\"c29tZSBieXRlcw==\",\"SomeBinaryProperty@odata.type\":\"Edm.Binary\",\"SomeDateProperty\":\"2021-05-18T15:39:58.4641986Z\",\"SomeDateProperty@odata.type\":\"Edm.DateTime\",\"SomeDoubleProperty0\":1,\"SomeDoubleProperty0@odata.type\":\"Edm.Double\",\"SomeDoubleProperty1\":1.2345,\"SomeDoubleProperty1@odata.type\":\"Edm.Double\",\"SomeGuidProperty\":\"bd350865-51bd-4c75-5d83-9b7096e127d1\",\"SomeGuidProperty@odata.type\":\"Edm.Guid\",\"SomeInt64Property\":\"9223372036854775807\",\"SomeInt64Property@odata.type\":\"Edm.Int64\",\"SomeIntProperty\":42,\"SomeStringProperty\":\"some + string\",\"StringProp\":\"some string 2\"}\r\n--changeset_0f2514c8-6c9b-4052-78de-f6e2e355e3f3\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://chrisstablesprim.table.core.windows.net/gotablenmikoizges9as?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: + 663\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"BoolProp\":true,\"IntProp\":3,\"PartitionKey\":\"partition\",\"RowKey\":\"3\",\"SomeBinaryProperty\":\"c29tZSBieXRlcw==\",\"SomeBinaryProperty@odata.type\":\"Edm.Binary\",\"SomeDateProperty\":\"2021-05-18T15:39:58.4641986Z\",\"SomeDateProperty@odata.type\":\"Edm.DateTime\",\"SomeDoubleProperty0\":1,\"SomeDoubleProperty0@odata.type\":\"Edm.Double\",\"SomeDoubleProperty1\":1.2345,\"SomeDoubleProperty1@odata.type\":\"Edm.Double\",\"SomeGuidProperty\":\"07f327de-fc7c-4354-5ed6-4a0722415e8e\",\"SomeGuidProperty@odata.type\":\"Edm.Guid\",\"SomeInt64Property\":\"9223372036854775807\",\"SomeInt64Property@odata.type\":\"Edm.Int64\",\"SomeIntProperty\":42,\"SomeStringProperty\":\"some + string\",\"StringProp\":\"some string 3\"}\r\n--changeset_0f2514c8-6c9b-4052-78de-f6e2e355e3f3\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://chrisstablesprim.table.core.windows.net/gotablenmikoizges9as?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: + 663\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"BoolProp\":true,\"IntProp\":4,\"PartitionKey\":\"partition\",\"RowKey\":\"4\",\"SomeBinaryProperty\":\"c29tZSBieXRlcw==\",\"SomeBinaryProperty@odata.type\":\"Edm.Binary\",\"SomeDateProperty\":\"2021-05-18T15:39:58.4641986Z\",\"SomeDateProperty@odata.type\":\"Edm.DateTime\",\"SomeDoubleProperty0\":1,\"SomeDoubleProperty0@odata.type\":\"Edm.Double\",\"SomeDoubleProperty1\":1.2345,\"SomeDoubleProperty1@odata.type\":\"Edm.Double\",\"SomeGuidProperty\":\"e59c88f8-9b85-4105-5557-82e7260ec226\",\"SomeGuidProperty@odata.type\":\"Edm.Guid\",\"SomeInt64Property\":\"9223372036854775807\",\"SomeInt64Property@odata.type\":\"Edm.Int64\",\"SomeIntProperty\":42,\"SomeStringProperty\":\"some + string\",\"StringProp\":\"some string 4\"}\r\n--changeset_0f2514c8-6c9b-4052-78de-f6e2e355e3f3\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://chrisstablesprim.table.core.windows.net/gotablenmikoizges9as?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: + 663\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"BoolProp\":true,\"IntProp\":5,\"PartitionKey\":\"partition\",\"RowKey\":\"5\",\"SomeBinaryProperty\":\"c29tZSBieXRlcw==\",\"SomeBinaryProperty@odata.type\":\"Edm.Binary\",\"SomeDateProperty\":\"2021-05-18T15:39:58.4641986Z\",\"SomeDateProperty@odata.type\":\"Edm.DateTime\",\"SomeDoubleProperty0\":1,\"SomeDoubleProperty0@odata.type\":\"Edm.Double\",\"SomeDoubleProperty1\":1.2345,\"SomeDoubleProperty1@odata.type\":\"Edm.Double\",\"SomeGuidProperty\":\"89770aa3-03ca-42b6-65f8-5a125274b222\",\"SomeGuidProperty@odata.type\":\"Edm.Guid\",\"SomeInt64Property\":\"9223372036854775807\",\"SomeInt64Property@odata.type\":\"Edm.Int64\",\"SomeIntProperty\":42,\"SomeStringProperty\":\"some + string\",\"StringProp\":\"some string 5\"}\r\n--changeset_0f2514c8-6c9b-4052-78de-f6e2e355e3f3\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://chrisstablesprim.table.core.windows.net/gotablenmikoizges9as?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: + 663\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"BoolProp\":true,\"IntProp\":6,\"PartitionKey\":\"partition\",\"RowKey\":\"6\",\"SomeBinaryProperty\":\"c29tZSBieXRlcw==\",\"SomeBinaryProperty@odata.type\":\"Edm.Binary\",\"SomeDateProperty\":\"2021-05-18T15:39:58.4641986Z\",\"SomeDateProperty@odata.type\":\"Edm.DateTime\",\"SomeDoubleProperty0\":1,\"SomeDoubleProperty0@odata.type\":\"Edm.Double\",\"SomeDoubleProperty1\":1.2345,\"SomeDoubleProperty1@odata.type\":\"Edm.Double\",\"SomeGuidProperty\":\"d19dcff6-9768-4ddf-71a6-55acc1a48e27\",\"SomeGuidProperty@odata.type\":\"Edm.Guid\",\"SomeInt64Property\":\"9223372036854775807\",\"SomeInt64Property@odata.type\":\"Edm.Int64\",\"SomeIntProperty\":42,\"SomeStringProperty\":\"some + string\",\"StringProp\":\"some string 6\"}\r\n--changeset_0f2514c8-6c9b-4052-78de-f6e2e355e3f3\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://chrisstablesprim.table.core.windows.net/gotablenmikoizges9as?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: + 663\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"BoolProp\":true,\"IntProp\":7,\"PartitionKey\":\"partition\",\"RowKey\":\"7\",\"SomeBinaryProperty\":\"c29tZSBieXRlcw==\",\"SomeBinaryProperty@odata.type\":\"Edm.Binary\",\"SomeDateProperty\":\"2021-05-18T15:39:58.4641986Z\",\"SomeDateProperty@odata.type\":\"Edm.DateTime\",\"SomeDoubleProperty0\":1,\"SomeDoubleProperty0@odata.type\":\"Edm.Double\",\"SomeDoubleProperty1\":1.2345,\"SomeDoubleProperty1@odata.type\":\"Edm.Double\",\"SomeGuidProperty\":\"df72b407-50b5-49dc-6c76-75d1d1a9d347\",\"SomeGuidProperty@odata.type\":\"Edm.Guid\",\"SomeInt64Property\":\"9223372036854775807\",\"SomeInt64Property@odata.type\":\"Edm.Int64\",\"SomeIntProperty\":42,\"SomeStringProperty\":\"some + string\",\"StringProp\":\"some string 7\"}\r\n--changeset_0f2514c8-6c9b-4052-78de-f6e2e355e3f3\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://chrisstablesprim.table.core.windows.net/gotablenmikoizges9as?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: + 663\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"BoolProp\":true,\"IntProp\":8,\"PartitionKey\":\"partition\",\"RowKey\":\"8\",\"SomeBinaryProperty\":\"c29tZSBieXRlcw==\",\"SomeBinaryProperty@odata.type\":\"Edm.Binary\",\"SomeDateProperty\":\"2021-05-18T15:39:58.4641986Z\",\"SomeDateProperty@odata.type\":\"Edm.DateTime\",\"SomeDoubleProperty0\":1,\"SomeDoubleProperty0@odata.type\":\"Edm.Double\",\"SomeDoubleProperty1\":1.2345,\"SomeDoubleProperty1@odata.type\":\"Edm.Double\",\"SomeGuidProperty\":\"5c09c881-918b-4a0d-5ad0-9f3e71a3d14b\",\"SomeGuidProperty@odata.type\":\"Edm.Guid\",\"SomeInt64Property\":\"9223372036854775807\",\"SomeInt64Property@odata.type\":\"Edm.Int64\",\"SomeIntProperty\":42,\"SomeStringProperty\":\"some + string\",\"StringProp\":\"some string 8\"}\r\n--changeset_0f2514c8-6c9b-4052-78de-f6e2e355e3f3\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://chrisstablesprim.table.core.windows.net/gotablenmikoizges9as?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: + 663\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"BoolProp\":true,\"IntProp\":9,\"PartitionKey\":\"partition\",\"RowKey\":\"9\",\"SomeBinaryProperty\":\"c29tZSBieXRlcw==\",\"SomeBinaryProperty@odata.type\":\"Edm.Binary\",\"SomeDateProperty\":\"2021-05-18T15:39:58.4641986Z\",\"SomeDateProperty@odata.type\":\"Edm.DateTime\",\"SomeDoubleProperty0\":1,\"SomeDoubleProperty0@odata.type\":\"Edm.Double\",\"SomeDoubleProperty1\":1.2345,\"SomeDoubleProperty1@odata.type\":\"Edm.Double\",\"SomeGuidProperty\":\"d685a381-7648-4e16-74a5-c2c58f30d7b0\",\"SomeGuidProperty@odata.type\":\"Edm.Guid\",\"SomeInt64Property\":\"9223372036854775807\",\"SomeInt64Property@odata.type\":\"Edm.Int64\",\"SomeIntProperty\":42,\"SomeStringProperty\":\"some + string\",\"StringProp\":\"some string 9\"}\r\n--changeset_0f2514c8-6c9b-4052-78de-f6e2e355e3f3\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://chrisstablesprim.table.core.windows.net/gotablenmikoizges9as?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: + 666\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"BoolProp\":true,\"IntProp\":10,\"PartitionKey\":\"partition\",\"RowKey\":\"10\",\"SomeBinaryProperty\":\"c29tZSBieXRlcw==\",\"SomeBinaryProperty@odata.type\":\"Edm.Binary\",\"SomeDateProperty\":\"2021-05-18T15:39:58.4641986Z\",\"SomeDateProperty@odata.type\":\"Edm.DateTime\",\"SomeDoubleProperty0\":1,\"SomeDoubleProperty0@odata.type\":\"Edm.Double\",\"SomeDoubleProperty1\":1.2345,\"SomeDoubleProperty1@odata.type\":\"Edm.Double\",\"SomeGuidProperty\":\"6fd6a8cb-a3c9-4a59-6648-0b7127b4d451\",\"SomeGuidProperty@odata.type\":\"Edm.Guid\",\"SomeInt64Property\":\"9223372036854775807\",\"SomeInt64Property@odata.type\":\"Edm.Int64\",\"SomeIntProperty\":42,\"SomeStringProperty\":\"some + string\",\"StringProp\":\"some string 10\"}\r\n--changeset_0f2514c8-6c9b-4052-78de-f6e2e355e3f3--\r\n\r\n--batch_648025d9-6ce8-4fa4-5da7-940a633d3404--\r\n" + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "11281" + Content-Type: + - multipart/mixed; boundary=batch_648025d9-6ce8-4fa4-5da7-940a633d3404 + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; Windows_NT) + X-Ms-Date: + - Tue, 18 May 2021 15:39:58 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.core.windows.net/$batch + method: POST + response: + body: "--batchresponse_68cd5b83-b388-4748-a611-24bdcdcb20e5\r\nContent-Type: multipart/mixed; + boundary=changesetresponse_48be468e-4dd0-4b63-aaab-535394c983c2\r\n\r\n--changesetresponse_48be468e-4dd0-4b63-aaab-535394c983c2\r\nContent-Type: + application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No + Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nPreference-Applied: + return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://chrisstablesprim.table.core.windows.net/gotablenmikoizges9as(PartitionKey='partition',RowKey='1')\r\nDataServiceId: + https://chrisstablesprim.table.core.windows.net/gotablenmikoizges9as(PartitionKey='partition',RowKey='1')\r\nETag: + W/\"datetime'2021-05-18T15%3A39%3A58.8905171Z'\"\r\n\r\n\r\n--changesetresponse_48be468e-4dd0-4b63-aaab-535394c983c2\r\nContent-Type: + application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No + Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nPreference-Applied: + return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://chrisstablesprim.table.core.windows.net/gotablenmikoizges9as(PartitionKey='partition',RowKey='2')\r\nDataServiceId: + https://chrisstablesprim.table.core.windows.net/gotablenmikoizges9as(PartitionKey='partition',RowKey='2')\r\nETag: + W/\"datetime'2021-05-18T15%3A39%3A58.8905171Z'\"\r\n\r\n\r\n--changesetresponse_48be468e-4dd0-4b63-aaab-535394c983c2\r\nContent-Type: + application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No + Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nPreference-Applied: + return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://chrisstablesprim.table.core.windows.net/gotablenmikoizges9as(PartitionKey='partition',RowKey='3')\r\nDataServiceId: + https://chrisstablesprim.table.core.windows.net/gotablenmikoizges9as(PartitionKey='partition',RowKey='3')\r\nETag: + W/\"datetime'2021-05-18T15%3A39%3A58.8905171Z'\"\r\n\r\n\r\n--changesetresponse_48be468e-4dd0-4b63-aaab-535394c983c2\r\nContent-Type: + application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No + Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nPreference-Applied: + return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://chrisstablesprim.table.core.windows.net/gotablenmikoizges9as(PartitionKey='partition',RowKey='4')\r\nDataServiceId: + https://chrisstablesprim.table.core.windows.net/gotablenmikoizges9as(PartitionKey='partition',RowKey='4')\r\nETag: + W/\"datetime'2021-05-18T15%3A39%3A58.8905171Z'\"\r\n\r\n\r\n--changesetresponse_48be468e-4dd0-4b63-aaab-535394c983c2\r\nContent-Type: + application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No + Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nPreference-Applied: + return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://chrisstablesprim.table.core.windows.net/gotablenmikoizges9as(PartitionKey='partition',RowKey='5')\r\nDataServiceId: + https://chrisstablesprim.table.core.windows.net/gotablenmikoizges9as(PartitionKey='partition',RowKey='5')\r\nETag: + W/\"datetime'2021-05-18T15%3A39%3A58.8905171Z'\"\r\n\r\n\r\n--changesetresponse_48be468e-4dd0-4b63-aaab-535394c983c2\r\nContent-Type: + application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No + Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nPreference-Applied: + return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://chrisstablesprim.table.core.windows.net/gotablenmikoizges9as(PartitionKey='partition',RowKey='6')\r\nDataServiceId: + https://chrisstablesprim.table.core.windows.net/gotablenmikoizges9as(PartitionKey='partition',RowKey='6')\r\nETag: + W/\"datetime'2021-05-18T15%3A39%3A58.8905171Z'\"\r\n\r\n\r\n--changesetresponse_48be468e-4dd0-4b63-aaab-535394c983c2\r\nContent-Type: + application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No + Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nPreference-Applied: + return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://chrisstablesprim.table.core.windows.net/gotablenmikoizges9as(PartitionKey='partition',RowKey='7')\r\nDataServiceId: + https://chrisstablesprim.table.core.windows.net/gotablenmikoizges9as(PartitionKey='partition',RowKey='7')\r\nETag: + W/\"datetime'2021-05-18T15%3A39%3A58.8905171Z'\"\r\n\r\n\r\n--changesetresponse_48be468e-4dd0-4b63-aaab-535394c983c2\r\nContent-Type: + application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No + Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nPreference-Applied: + return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://chrisstablesprim.table.core.windows.net/gotablenmikoizges9as(PartitionKey='partition',RowKey='8')\r\nDataServiceId: + https://chrisstablesprim.table.core.windows.net/gotablenmikoizges9as(PartitionKey='partition',RowKey='8')\r\nETag: + W/\"datetime'2021-05-18T15%3A39%3A58.8905171Z'\"\r\n\r\n\r\n--changesetresponse_48be468e-4dd0-4b63-aaab-535394c983c2\r\nContent-Type: + application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No + Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nPreference-Applied: + return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://chrisstablesprim.table.core.windows.net/gotablenmikoizges9as(PartitionKey='partition',RowKey='9')\r\nDataServiceId: + https://chrisstablesprim.table.core.windows.net/gotablenmikoizges9as(PartitionKey='partition',RowKey='9')\r\nETag: + W/\"datetime'2021-05-18T15%3A39%3A58.8905171Z'\"\r\n\r\n\r\n--changesetresponse_48be468e-4dd0-4b63-aaab-535394c983c2\r\nContent-Type: + application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No + Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nPreference-Applied: + return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://chrisstablesprim.table.core.windows.net/gotablenmikoizges9as(PartitionKey='partition',RowKey='10')\r\nDataServiceId: + https://chrisstablesprim.table.core.windows.net/gotablenmikoizges9as(PartitionKey='partition',RowKey='10')\r\nETag: + W/\"datetime'2021-05-18T15%3A39%3A58.8905171Z'\"\r\n\r\n\r\n--changesetresponse_48be468e-4dd0-4b63-aaab-535394c983c2--\r\n--batchresponse_68cd5b83-b388-4748-a611-24bdcdcb20e5--\r\n" + headers: + Cache-Control: + - no-cache + Content-Type: + - multipart/mixed; boundary=batchresponse_68cd5b83-b388-4748-a611-24bdcdcb20e5 + Date: + - Tue, 18 May 2021 15:39:58 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - 5375fa87-7002-0024-46fc-4bc2b4000000 + X-Ms-Version: + - "2019-02-02" + status: 202 Accepted + code: 202 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Tue, 18 May 2021 15:39:58 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.core.windows.net/Tables('gotablenmikoizges9as') + method: DELETE + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Date: + - Tue, 18 May 2021 15:39:58 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - 5375fab1-7002-0024-70fc-4bc2b4000000 + X-Ms-Version: + - "2019-02-02" + status: 204 No Content + code: 204 + duration: "" diff --git a/sdk/tables/aztables/recordings/TestTableClient_Storage/TestBatchError-variables.yaml b/sdk/tables/aztables/recordings/TestTableClient_Storage/TestBatchError-variables.yaml new file mode 100644 index 000000000000..5b36d6860273 --- /dev/null +++ b/sdk/tables/aztables/recordings/TestTableClient_Storage/TestBatchError-variables.yaml @@ -0,0 +1,6 @@ +--- +STORAGE_ENDPOINT_SUFFIX: core.windows.net +TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== +TABLES_STORAGE_ACCOUNT_NAME: chrisstablesprim +now: "2021-05-21T13:23:32.659245-05:00" +randomSeed: "1621621411" diff --git a/sdk/tables/aztables/recordings/TestTableClient_Storage/TestBatchError.yaml b/sdk/tables/aztables/recordings/TestTableClient_Storage/TestBatchError.yaml new file mode 100644 index 000000000000..c6524481065f --- /dev/null +++ b/sdk/tables/aztables/recordings/TestTableClient_Storage/TestBatchError.yaml @@ -0,0 +1,202 @@ +--- +version: 1 +interactions: +- request: + body: '{"TableName":"gotablepqb1rkgf82uab"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "36" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Fri, 21 May 2021 18:23:31 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.core.windows.net/Tables + method: POST + response: + body: '{"odata.metadata":"https://chrisstablesprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotablepqb1rkgf82uab"}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + Date: + - Fri, 21 May 2021 18:23:32 GMT + Location: + - https://chrisstablesprim.table.core.windows.net/Tables('gotablepqb1rkgf82uab') + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - fef5bddc-1002-000d-2f6e-4efcc0000000 + X-Ms-Version: + - "2019-02-02" + status: 201 Created + code: 201 + duration: "" +- request: + body: '{"BoolProp":true,"IntProp":3,"PartitionKey":"partition","RowKey":"3","SomeBinaryProperty":"c29tZSBieXRlcw==","SomeBinaryProperty@odata.type":"Edm.Binary","SomeDateProperty":"2021-05-21T18:23:32.659245Z","SomeDateProperty@odata.type":"Edm.DateTime","SomeDoubleProperty0":1,"SomeDoubleProperty0@odata.type":"Edm.Double","SomeDoubleProperty1":1.2345,"SomeDoubleProperty1@odata.type":"Edm.Double","SomeGuidProperty":"4c51dc80-5e1c-4a79-4b58-8b5d1a887417","SomeGuidProperty@odata.type":"Edm.Guid","SomeInt64Property":"9223372036854775807","SomeInt64Property@odata.type":"Edm.Int64","SomeIntProperty":42,"SomeStringProperty":"some + string","StringProp":"some string 3"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "662" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + Prefer: + - return-no-content + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Fri, 21 May 2021 18:23:32 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.core.windows.net/gotablepqb1rkgf82uab + method: POST + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Dataserviceid: + - https://chrisstablesprim.table.core.windows.net/gotablepqb1rkgf82uab(PartitionKey='partition',RowKey='3') + Date: + - Fri, 21 May 2021 18:23:32 GMT + Etag: + - W/"datetime'2021-05-21T18%3A23%3A32.8055163Z'" + Location: + - https://chrisstablesprim.table.core.windows.net/gotablepqb1rkgf82uab(PartitionKey='partition',RowKey='3') + Preference-Applied: + - return-no-content + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - fef5bdf4-1002-000d-446e-4efcc0000000 + X-Ms-Version: + - "2019-02-02" + status: 204 No Content + code: 204 + duration: "" +- request: + body: "--batch_082f04d4-15cc-43be-66be-49e083de268c\r\nContent-Type: multipart/mixed; + boundary=changeset_239ec220-4c24-4f16-5cbf-8fbd53fd6135\r\n\r\n--changeset_239ec220-4c24-4f16-5cbf-8fbd53fd6135\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://chrisstablesprim.table.core.windows.net/gotablepqb1rkgf82uab?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: + 662\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"BoolProp\":true,\"IntProp\":1,\"PartitionKey\":\"partition\",\"RowKey\":\"1\",\"SomeBinaryProperty\":\"c29tZSBieXRlcw==\",\"SomeBinaryProperty@odata.type\":\"Edm.Binary\",\"SomeDateProperty\":\"2021-05-21T18:23:32.659245Z\",\"SomeDateProperty@odata.type\":\"Edm.DateTime\",\"SomeDoubleProperty0\":1,\"SomeDoubleProperty0@odata.type\":\"Edm.Double\",\"SomeDoubleProperty1\":1.2345,\"SomeDoubleProperty1@odata.type\":\"Edm.Double\",\"SomeGuidProperty\":\"24322eae-ac26-4914-7a51-4291c19121c7\",\"SomeGuidProperty@odata.type\":\"Edm.Guid\",\"SomeInt64Property\":\"9223372036854775807\",\"SomeInt64Property@odata.type\":\"Edm.Int64\",\"SomeIntProperty\":42,\"SomeStringProperty\":\"some + string\",\"StringProp\":\"some string 1\"}\r\n--changeset_239ec220-4c24-4f16-5cbf-8fbd53fd6135\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://chrisstablesprim.table.core.windows.net/gotablepqb1rkgf82uab?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: + 662\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"BoolProp\":true,\"IntProp\":2,\"PartitionKey\":\"partition\",\"RowKey\":\"2\",\"SomeBinaryProperty\":\"c29tZSBieXRlcw==\",\"SomeBinaryProperty@odata.type\":\"Edm.Binary\",\"SomeDateProperty\":\"2021-05-21T18:23:32.659245Z\",\"SomeDateProperty@odata.type\":\"Edm.DateTime\",\"SomeDoubleProperty0\":1,\"SomeDoubleProperty0@odata.type\":\"Edm.Double\",\"SomeDoubleProperty1\":1.2345,\"SomeDoubleProperty1@odata.type\":\"Edm.Double\",\"SomeGuidProperty\":\"ea15bdd7-a18a-45f7-52b5-f2dafe05af3c\",\"SomeGuidProperty@odata.type\":\"Edm.Guid\",\"SomeInt64Property\":\"9223372036854775807\",\"SomeInt64Property@odata.type\":\"Edm.Int64\",\"SomeIntProperty\":42,\"SomeStringProperty\":\"some + string\",\"StringProp\":\"some string 2\"}\r\n--changeset_239ec220-4c24-4f16-5cbf-8fbd53fd6135\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://chrisstablesprim.table.core.windows.net/gotablepqb1rkgf82uab?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: + 662\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"BoolProp\":true,\"IntProp\":3,\"PartitionKey\":\"partition\",\"RowKey\":\"3\",\"SomeBinaryProperty\":\"c29tZSBieXRlcw==\",\"SomeBinaryProperty@odata.type\":\"Edm.Binary\",\"SomeDateProperty\":\"2021-05-21T18:23:32.659245Z\",\"SomeDateProperty@odata.type\":\"Edm.DateTime\",\"SomeDoubleProperty0\":1,\"SomeDoubleProperty0@odata.type\":\"Edm.Double\",\"SomeDoubleProperty1\":1.2345,\"SomeDoubleProperty1@odata.type\":\"Edm.Double\",\"SomeGuidProperty\":\"4c51dc80-5e1c-4a79-4b58-8b5d1a887417\",\"SomeGuidProperty@odata.type\":\"Edm.Guid\",\"SomeInt64Property\":\"9223372036854775807\",\"SomeInt64Property@odata.type\":\"Edm.Int64\",\"SomeIntProperty\":42,\"SomeStringProperty\":\"some + string\",\"StringProp\":\"some string 3\"}\r\n--changeset_239ec220-4c24-4f16-5cbf-8fbd53fd6135--\r\n\r\n--batch_082f04d4-15cc-43be-66be-49e083de268c--\r\n" + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "3547" + Content-Type: + - multipart/mixed; boundary=batch_082f04d4-15cc-43be-66be-49e083de268c + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; Windows_NT) + X-Ms-Date: + - Fri, 21 May 2021 18:23:32 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.core.windows.net/$batch + method: POST + response: + body: "--batchresponse_38af3102-a3c4-4d6b-9ad4-0d936fb607d7\r\nContent-Type: multipart/mixed; + boundary=changesetresponse_a33fe87c-1503-4bd5-971b-a32caf04061f\r\n\r\n--changesetresponse_a33fe87c-1503-4bd5-971b-a32caf04061f\r\nContent-Type: + application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 409 Conflict\r\nX-Content-Type-Options: + nosniff\r\nCache-Control: no-cache\r\nPreference-Applied: return-no-content\r\nDataServiceVersion: + 3.0;\r\nContent-Type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8\r\n\r\n{\"odata.error\":{\"code\":\"EntityAlreadyExists\",\"message\":{\"lang\":\"en-US\",\"value\":\"2:The + specified entity already exists.\\nRequestId:fef5be0e-1002-000d-5d6e-4efcc0000000\\nTime:2021-05-21T18:23:32.8905761Z\"}}}\r\n--changesetresponse_a33fe87c-1503-4bd5-971b-a32caf04061f--\r\n--batchresponse_38af3102-a3c4-4d6b-9ad4-0d936fb607d7--\r\n" + headers: + Cache-Control: + - no-cache + Content-Type: + - multipart/mixed; boundary=batchresponse_38af3102-a3c4-4d6b-9ad4-0d936fb607d7 + Date: + - Fri, 21 May 2021 18:23:32 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - fef5be0e-1002-000d-5d6e-4efcc0000000 + X-Ms-Version: + - "2019-02-02" + status: 202 Accepted + code: 202 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Fri, 21 May 2021 18:23:32 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.core.windows.net/Tables('gotablepqb1rkgf82uab') + method: DELETE + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Date: + - Fri, 21 May 2021 18:23:32 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - fef5be1c-1002-000d-6b6e-4efcc0000000 + X-Ms-Version: + - "2019-02-02" + status: 204 No Content + code: 204 + duration: "" diff --git a/sdk/tables/aztables/recordings/TestTableClient_Storage/TestBatchMixed-variables.yaml b/sdk/tables/aztables/recordings/TestTableClient_Storage/TestBatchMixed-variables.yaml new file mode 100644 index 000000000000..72609d6fa263 --- /dev/null +++ b/sdk/tables/aztables/recordings/TestTableClient_Storage/TestBatchMixed-variables.yaml @@ -0,0 +1,6 @@ +--- +STORAGE_ENDPOINT_SUFFIX: core.windows.net +TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== +TABLES_STORAGE_ACCOUNT_NAME: chrisstablesprim +now: "2021-05-21T14:41:03.2032731-05:00" +randomSeed: "1621626062" diff --git a/sdk/tables/aztables/recordings/TestTableClient_Storage/TestBatchMixed.yaml b/sdk/tables/aztables/recordings/TestTableClient_Storage/TestBatchMixed.yaml new file mode 100644 index 000000000000..171a61c4c7be --- /dev/null +++ b/sdk/tables/aztables/recordings/TestTableClient_Storage/TestBatchMixed.yaml @@ -0,0 +1,323 @@ +--- +version: 1 +interactions: +- request: + body: '{"TableName":"gotableg8scudpw7lv7b"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "36" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Fri, 21 May 2021 19:41:02 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.core.windows.net/Tables + method: POST + response: + body: '{"odata.metadata":"https://chrisstablesprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotableg8scudpw7lv7b"}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + Date: + - Fri, 21 May 2021 19:41:03 GMT + Location: + - https://chrisstablesprim.table.core.windows.net/Tables('gotableg8scudpw7lv7b') + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - 8e3dc898-5002-001c-4c79-4e6674000000 + X-Ms-Version: + - "2019-02-02" + status: 201 Created + code: 201 + duration: "" +- request: + body: "--batch_2de7b066-5519-4c0f-4a33-ddc8370312e9\r\nContent-Type: multipart/mixed; + boundary=changeset_2e8293fd-fcc9-4729-761c-8513e70db34b\r\n\r\n--changeset_2e8293fd-fcc9-4729-761c-8513e70db34b\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://chrisstablesprim.table.core.windows.net/gotableg8scudpw7lv7b?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: + 663\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"BoolProp\":true,\"IntProp\":1,\"PartitionKey\":\"partition\",\"RowKey\":\"1\",\"SomeBinaryProperty\":\"c29tZSBieXRlcw==\",\"SomeBinaryProperty@odata.type\":\"Edm.Binary\",\"SomeDateProperty\":\"2021-05-21T19:41:03.2032731Z\",\"SomeDateProperty@odata.type\":\"Edm.DateTime\",\"SomeDoubleProperty0\":1,\"SomeDoubleProperty0@odata.type\":\"Edm.Double\",\"SomeDoubleProperty1\":1.2345,\"SomeDoubleProperty1@odata.type\":\"Edm.Double\",\"SomeGuidProperty\":\"27bdea07-48bb-49a1-7575-fa9c92b50ecc\",\"SomeGuidProperty@odata.type\":\"Edm.Guid\",\"SomeInt64Property\":\"9223372036854775807\",\"SomeInt64Property@odata.type\":\"Edm.Int64\",\"SomeIntProperty\":42,\"SomeStringProperty\":\"some + string\",\"StringProp\":\"some string 1\"}\r\n--changeset_2e8293fd-fcc9-4729-761c-8513e70db34b\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://chrisstablesprim.table.core.windows.net/gotableg8scudpw7lv7b?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: + 663\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"BoolProp\":true,\"IntProp\":2,\"PartitionKey\":\"partition\",\"RowKey\":\"2\",\"SomeBinaryProperty\":\"c29tZSBieXRlcw==\",\"SomeBinaryProperty@odata.type\":\"Edm.Binary\",\"SomeDateProperty\":\"2021-05-21T19:41:03.2032731Z\",\"SomeDateProperty@odata.type\":\"Edm.DateTime\",\"SomeDoubleProperty0\":1,\"SomeDoubleProperty0@odata.type\":\"Edm.Double\",\"SomeDoubleProperty1\":1.2345,\"SomeDoubleProperty1@odata.type\":\"Edm.Double\",\"SomeGuidProperty\":\"4a7ba0e9-458c-4f1c-5a5d-e7c330b95315\",\"SomeGuidProperty@odata.type\":\"Edm.Guid\",\"SomeInt64Property\":\"9223372036854775807\",\"SomeInt64Property@odata.type\":\"Edm.Int64\",\"SomeIntProperty\":42,\"SomeStringProperty\":\"some + string\",\"StringProp\":\"some string 2\"}\r\n--changeset_2e8293fd-fcc9-4729-761c-8513e70db34b\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://chrisstablesprim.table.core.windows.net/gotableg8scudpw7lv7b?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: + 663\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"BoolProp\":true,\"IntProp\":3,\"PartitionKey\":\"partition\",\"RowKey\":\"3\",\"SomeBinaryProperty\":\"c29tZSBieXRlcw==\",\"SomeBinaryProperty@odata.type\":\"Edm.Binary\",\"SomeDateProperty\":\"2021-05-21T19:41:03.2032731Z\",\"SomeDateProperty@odata.type\":\"Edm.DateTime\",\"SomeDoubleProperty0\":1,\"SomeDoubleProperty0@odata.type\":\"Edm.Double\",\"SomeDoubleProperty1\":1.2345,\"SomeDoubleProperty1@odata.type\":\"Edm.Double\",\"SomeGuidProperty\":\"167df718-ab10-4028-4462-d89bd2eab843\",\"SomeGuidProperty@odata.type\":\"Edm.Guid\",\"SomeInt64Property\":\"9223372036854775807\",\"SomeInt64Property@odata.type\":\"Edm.Int64\",\"SomeIntProperty\":42,\"SomeStringProperty\":\"some + string\",\"StringProp\":\"some string 3\"}\r\n--changeset_2e8293fd-fcc9-4729-761c-8513e70db34b--\r\n\r\n--batch_2de7b066-5519-4c0f-4a33-ddc8370312e9--\r\n" + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "3550" + Content-Type: + - multipart/mixed; boundary=batch_2de7b066-5519-4c0f-4a33-ddc8370312e9 + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; Windows_NT) + X-Ms-Date: + - Fri, 21 May 2021 19:41:03 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.core.windows.net/$batch + method: POST + response: + body: "--batchresponse_69af1b31-119b-4d4d-9bf8-35b4f6c0713c\r\nContent-Type: multipart/mixed; + boundary=changesetresponse_54cb4ac8-f287-4dc7-856c-b3c2dc2be705\r\n\r\n--changesetresponse_54cb4ac8-f287-4dc7-856c-b3c2dc2be705\r\nContent-Type: + application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No + Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nPreference-Applied: + return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://chrisstablesprim.table.core.windows.net/gotableg8scudpw7lv7b(PartitionKey='partition',RowKey='1')\r\nDataServiceId: + https://chrisstablesprim.table.core.windows.net/gotableg8scudpw7lv7b(PartitionKey='partition',RowKey='1')\r\nETag: + W/\"datetime'2021-05-21T19%3A41%3A03.3758609Z'\"\r\n\r\n\r\n--changesetresponse_54cb4ac8-f287-4dc7-856c-b3c2dc2be705\r\nContent-Type: + application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No + Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nPreference-Applied: + return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://chrisstablesprim.table.core.windows.net/gotableg8scudpw7lv7b(PartitionKey='partition',RowKey='2')\r\nDataServiceId: + https://chrisstablesprim.table.core.windows.net/gotableg8scudpw7lv7b(PartitionKey='partition',RowKey='2')\r\nETag: + W/\"datetime'2021-05-21T19%3A41%3A03.3758609Z'\"\r\n\r\n\r\n--changesetresponse_54cb4ac8-f287-4dc7-856c-b3c2dc2be705\r\nContent-Type: + application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No + Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nPreference-Applied: + return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://chrisstablesprim.table.core.windows.net/gotableg8scudpw7lv7b(PartitionKey='partition',RowKey='3')\r\nDataServiceId: + https://chrisstablesprim.table.core.windows.net/gotableg8scudpw7lv7b(PartitionKey='partition',RowKey='3')\r\nETag: + W/\"datetime'2021-05-21T19%3A41%3A03.3758609Z'\"\r\n\r\n\r\n--changesetresponse_54cb4ac8-f287-4dc7-856c-b3c2dc2be705--\r\n--batchresponse_69af1b31-119b-4d4d-9bf8-35b4f6c0713c--\r\n" + headers: + Cache-Control: + - no-cache + Content-Type: + - multipart/mixed; boundary=batchresponse_69af1b31-119b-4d4d-9bf8-35b4f6c0713c + Date: + - Fri, 21 May 2021 19:41:03 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - 8e3dc8a8-5002-001c-5879-4e6674000000 + X-Ms-Version: + - "2019-02-02" + status: 202 Accepted + code: 202 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Fri, 21 May 2021 19:41:03 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.core.windows.net/gotableg8scudpw7lv7b()?%24filter=RowKey+eq+%271%27 + method: GET + response: + body: '{"odata.metadata":"https://chrisstablesprim.table.core.windows.net/$metadata#gotableg8scudpw7lv7b","value":[{"odata.etag":"W/\"datetime''2021-05-21T19%3A41%3A03.3758609Z''\"","PartitionKey":"partition","RowKey":"1","Timestamp":"2021-05-21T19:41:03.3758609Z","BoolProp":true,"IntProp":1,"SomeBinaryProperty@odata.type":"Edm.Binary","SomeBinaryProperty":"c29tZSBieXRlcw==","SomeDateProperty@odata.type":"Edm.DateTime","SomeDateProperty":"2021-05-21T19:41:03.2032731Z","SomeDoubleProperty0":1.0,"SomeDoubleProperty1":1.2345,"SomeGuidProperty@odata.type":"Edm.Guid","SomeGuidProperty":"27bdea07-48bb-49a1-7575-fa9c92b50ecc","SomeInt64Property@odata.type":"Edm.Int64","SomeInt64Property":"9223372036854775807","SomeIntProperty":42,"SomeStringProperty":"some + string","StringProp":"some string 1"}]}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + Date: + - Fri, 21 May 2021 19:41:03 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - 8e3dc8ba-5002-001c-6879-4e6674000000 + X-Ms-Version: + - "2019-02-02" + status: 200 OK + code: 200 + duration: "" +- request: + body: "--batch_9f2e9a16-b748-4c4a-7498-385179c10249\r\nContent-Type: multipart/mixed; + boundary=changeset_06606488-add1-4c38-456b-b53b0a02871d\r\n\r\n--changeset_06606488-add1-4c38-456b-b53b0a02871d\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPATCH https://chrisstablesprim.table.core.windows.net/gotableg8scudpw7lv7b(PartitionKey='partition',RowKey='1')?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + HTTP/1.1\r\nAccept: application/json\r\nContent-Length: 63\r\nContent-Type: + application/json\r\nDataserviceversion: 3.0\r\nIf-Match: W/\"datetime'2021-05-21T19%3A41%3A03.3758609Z'\"\r\nX-Ms-Version: + 2019-02-02\r\n\r\n{\"MergeProperty\":\"foo\",\"PartitionKey\":\"partition\",\"RowKey\":\"1\"}\r\n--changeset_06606488-add1-4c38-456b-b53b0a02871d\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nDELETE https://chrisstablesprim.table.core.windows.net/gotableg8scudpw7lv7b(PartitionKey='partition',RowKey='2')?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nDataserviceversion: + 3.0\r\nIf-Match: *\r\nX-Ms-Version: 2019-02-02\r\n\r\n\r\n--changeset_06606488-add1-4c38-456b-b53b0a02871d\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPUT https://chrisstablesprim.table.core.windows.net/gotableg8scudpw7lv7b(PartitionKey='partition',RowKey='3')?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + HTTP/1.1\r\nAccept: application/json\r\nContent-Length: 65\r\nContent-Type: + application/json\r\nDataserviceversion: 3.0\r\nIf-Match: *\r\nX-Ms-Version: + 2019-02-02\r\n\r\n{\"PartitionKey\":\"partition\",\"ReplaceProperty\":\"foo\",\"RowKey\":\"3\"}\r\n--changeset_06606488-add1-4c38-456b-b53b0a02871d\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://chrisstablesprim.table.core.windows.net/gotableg8scudpw7lv7b?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: + 663\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"BoolProp\":true,\"IntProp\":4,\"PartitionKey\":\"partition\",\"RowKey\":\"4\",\"SomeBinaryProperty\":\"c29tZSBieXRlcw==\",\"SomeBinaryProperty@odata.type\":\"Edm.Binary\",\"SomeDateProperty\":\"2021-05-21T19:41:03.2032731Z\",\"SomeDateProperty@odata.type\":\"Edm.DateTime\",\"SomeDoubleProperty0\":1,\"SomeDoubleProperty0@odata.type\":\"Edm.Double\",\"SomeDoubleProperty1\":1.2345,\"SomeDoubleProperty1@odata.type\":\"Edm.Double\",\"SomeGuidProperty\":\"58c5605e-f11c-4b8c-5280-4a1bbea87efe\",\"SomeGuidProperty@odata.type\":\"Edm.Guid\",\"SomeInt64Property\":\"9223372036854775807\",\"SomeInt64Property@odata.type\":\"Edm.Int64\",\"SomeIntProperty\":42,\"SomeStringProperty\":\"some + string\",\"StringProp\":\"some string 4\"}\r\n--changeset_06606488-add1-4c38-456b-b53b0a02871d\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://chrisstablesprim.table.core.windows.net/gotableg8scudpw7lv7b?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: + 663\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"BoolProp\":true,\"IntProp\":5,\"PartitionKey\":\"partition\",\"RowKey\":\"5\",\"SomeBinaryProperty\":\"c29tZSBieXRlcw==\",\"SomeBinaryProperty@odata.type\":\"Edm.Binary\",\"SomeDateProperty\":\"2021-05-21T19:41:03.2032731Z\",\"SomeDateProperty@odata.type\":\"Edm.DateTime\",\"SomeDoubleProperty0\":1,\"SomeDoubleProperty0@odata.type\":\"Edm.Double\",\"SomeDoubleProperty1\":1.2345,\"SomeDoubleProperty1@odata.type\":\"Edm.Double\",\"SomeGuidProperty\":\"1778baf7-61ae-4e82-7bf8-b5279e3ec598\",\"SomeGuidProperty@odata.type\":\"Edm.Guid\",\"SomeInt64Property\":\"9223372036854775807\",\"SomeInt64Property@odata.type\":\"Edm.Int64\",\"SomeIntProperty\":42,\"SomeStringProperty\":\"some + string\",\"StringProp\":\"some string 5\"}\r\n--changeset_06606488-add1-4c38-456b-b53b0a02871d--\r\n\r\n--batch_9f2e9a16-b748-4c4a-7498-385179c10249--\r\n" + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "3914" + Content-Type: + - multipart/mixed; boundary=batch_9f2e9a16-b748-4c4a-7498-385179c10249 + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; Windows_NT) + X-Ms-Date: + - Fri, 21 May 2021 19:41:03 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.core.windows.net/$batch + method: POST + response: + body: "--batchresponse_159fb801-3c8d-46db-a03b-b292c7948339\r\nContent-Type: multipart/mixed; + boundary=changesetresponse_a0c7390f-4e2a-4953-bcdb-f3d6c4033244\r\n\r\n--changesetresponse_a0c7390f-4e2a-4953-bcdb-f3d6c4033244\r\nContent-Type: + application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No + Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nDataServiceVersion: + 1.0;\r\nETag: W/\"datetime'2021-05-21T19%3A41%3A03.5240944Z'\"\r\n\r\n\r\n--changesetresponse_a0c7390f-4e2a-4953-bcdb-f3d6c4033244\r\nContent-Type: + application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No + Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nDataServiceVersion: + 1.0;\r\n\r\n\r\n--changesetresponse_a0c7390f-4e2a-4953-bcdb-f3d6c4033244\r\nContent-Type: + application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No + Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nDataServiceVersion: + 1.0;\r\nETag: W/\"datetime'2021-05-21T19%3A41%3A03.5240944Z'\"\r\n\r\n\r\n--changesetresponse_a0c7390f-4e2a-4953-bcdb-f3d6c4033244\r\nContent-Type: + application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No + Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nPreference-Applied: + return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://chrisstablesprim.table.core.windows.net/gotableg8scudpw7lv7b(PartitionKey='partition',RowKey='4')\r\nDataServiceId: + https://chrisstablesprim.table.core.windows.net/gotableg8scudpw7lv7b(PartitionKey='partition',RowKey='4')\r\nETag: + W/\"datetime'2021-05-21T19%3A41%3A03.5239662Z'\"\r\n\r\n\r\n--changesetresponse_a0c7390f-4e2a-4953-bcdb-f3d6c4033244\r\nContent-Type: + application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No + Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nPreference-Applied: + return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://chrisstablesprim.table.core.windows.net/gotableg8scudpw7lv7b(PartitionKey='partition',RowKey='5')\r\nDataServiceId: + https://chrisstablesprim.table.core.windows.net/gotableg8scudpw7lv7b(PartitionKey='partition',RowKey='5')\r\nETag: + W/\"datetime'2021-05-21T19%3A41%3A03.5239662Z'\"\r\n\r\n\r\n--changesetresponse_a0c7390f-4e2a-4953-bcdb-f3d6c4033244--\r\n--batchresponse_159fb801-3c8d-46db-a03b-b292c7948339--\r\n" + headers: + Cache-Control: + - no-cache + Content-Type: + - multipart/mixed; boundary=batchresponse_159fb801-3c8d-46db-a03b-b292c7948339 + Date: + - Fri, 21 May 2021 19:41:03 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - 8e3dc8c6-5002-001c-7379-4e6674000000 + X-Ms-Version: + - "2019-02-02" + status: 202 Accepted + code: 202 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Fri, 21 May 2021 19:41:03 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.core.windows.net/gotableg8scudpw7lv7b()?%24filter=RowKey+eq+%271%27 + method: GET + response: + body: '{"odata.metadata":"https://chrisstablesprim.table.core.windows.net/$metadata#gotableg8scudpw7lv7b","value":[{"odata.etag":"W/\"datetime''2021-05-21T19%3A41%3A03.5240944Z''\"","PartitionKey":"partition","RowKey":"1","Timestamp":"2021-05-21T19:41:03.5240944Z","BoolProp":true,"IntProp":1,"MergeProperty":"foo","SomeBinaryProperty@odata.type":"Edm.Binary","SomeBinaryProperty":"c29tZSBieXRlcw==","SomeDateProperty@odata.type":"Edm.DateTime","SomeDateProperty":"2021-05-21T19:41:03.2032731Z","SomeDoubleProperty0":1.0,"SomeDoubleProperty1":1.2345,"SomeGuidProperty@odata.type":"Edm.Guid","SomeGuidProperty":"27bdea07-48bb-49a1-7575-fa9c92b50ecc","SomeInt64Property@odata.type":"Edm.Int64","SomeInt64Property":"9223372036854775807","SomeIntProperty":42,"SomeStringProperty":"some + string","StringProp":"some string 1"}]}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + Date: + - Fri, 21 May 2021 19:41:03 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - 8e3dc8da-5002-001c-0579-4e6674000000 + X-Ms-Version: + - "2019-02-02" + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Fri, 21 May 2021 19:41:03 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.core.windows.net/Tables('gotableg8scudpw7lv7b') + method: DELETE + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Date: + - Fri, 21 May 2021 19:41:03 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - 8e3dc8e3-5002-001c-0d79-4e6674000000 + X-Ms-Version: + - "2019-02-02" + status: 204 No Content + code: 204 + duration: "" diff --git a/sdk/tables/aztables/recordings/TestTableClient_Storage/TestCreateTable-variables.yaml b/sdk/tables/aztables/recordings/TestTableClient_Storage/TestCreateTable-variables.yaml new file mode 100644 index 000000000000..db82b723a5c5 --- /dev/null +++ b/sdk/tables/aztables/recordings/TestTableClient_Storage/TestCreateTable-variables.yaml @@ -0,0 +1,5 @@ +--- +STORAGE_ENDPOINT_SUFFIX: core.windows.net +TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== +TABLES_STORAGE_ACCOUNT_NAME: chrisstablesprim +randomSeed: "1617573288" diff --git a/sdk/tables/aztables/recordings/TestTableClient_Storage/TestCreateTable.yaml b/sdk/tables/aztables/recordings/TestTableClient_Storage/TestCreateTable.yaml new file mode 100644 index 000000000000..6ef28bf11ac7 --- /dev/null +++ b/sdk/tables/aztables/recordings/TestTableClient_Storage/TestCreateTable.yaml @@ -0,0 +1,85 @@ +--- +version: 1 +interactions: +- request: + body: '{"TableName":"gotable9uourkrfkri2m"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "36" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Sun, 04 Apr 2021 21:54:48 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.core.windows.net/Tables + method: POST + response: + body: '{"odata.metadata":"https://chrisstablesprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotable9uourkrfkri2m"}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + Date: + - Sun, 04 Apr 2021 21:54:48 GMT + Location: + - https://chrisstablesprim.table.core.windows.net/Tables('gotable9uourkrfkri2m') + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - aa171ae1-c002-0053-399d-291720000000 + X-Ms-Version: + - "2019-02-02" + status: 201 Created + code: 201 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Sun, 04 Apr 2021 21:54:48 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.core.windows.net/Tables('gotable9uourkrfkri2m') + method: DELETE + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Date: + - Sun, 04 Apr 2021 21:54:48 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - aa171aec-c002-0053-419d-291720000000 + X-Ms-Version: + - "2019-02-02" + status: 204 No Content + code: 204 + duration: "" diff --git a/sdk/tables/aztables/recordings/TestTableClient_Storage/TestDeleteEntity-variables.yaml b/sdk/tables/aztables/recordings/TestTableClient_Storage/TestDeleteEntity-variables.yaml new file mode 100644 index 000000000000..ab689c50cddf --- /dev/null +++ b/sdk/tables/aztables/recordings/TestTableClient_Storage/TestDeleteEntity-variables.yaml @@ -0,0 +1,5 @@ +--- +STORAGE_ENDPOINT_SUFFIX: core.windows.net +TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== +TABLES_STORAGE_ACCOUNT_NAME: chrisstablesprim +randomSeed: "1621624377" diff --git a/sdk/tables/aztables/recordings/TestTableClient_Storage/TestDeleteEntity.yaml b/sdk/tables/aztables/recordings/TestTableClient_Storage/TestDeleteEntity.yaml new file mode 100644 index 000000000000..4bc5d74b1533 --- /dev/null +++ b/sdk/tables/aztables/recordings/TestTableClient_Storage/TestDeleteEntity.yaml @@ -0,0 +1,180 @@ +--- +version: 1 +interactions: +- request: + body: '{"TableName":"gotable1eyzuuvhvub30"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "36" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Fri, 21 May 2021 19:12:57 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.core.windows.net/Tables + method: POST + response: + body: '{"odata.metadata":"https://chrisstablesprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotable1eyzuuvhvub30"}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + Date: + - Fri, 21 May 2021 19:12:57 GMT + Location: + - https://chrisstablesprim.table.core.windows.net/Tables('gotable1eyzuuvhvub30') + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - d8f0ab3d-2002-0006-0275-4e07ab000000 + X-Ms-Version: + - "2019-02-02" + status: 201 Created + code: 201 + duration: "" +- request: + body: '{"BoolProp":true,"IntProp":1,"PartitionKey":"partition","RowKey":"1","StringProp":"some + string 1"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "98" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + Prefer: + - return-no-content + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Fri, 21 May 2021 19:12:57 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.core.windows.net/gotable1eyzuuvhvub30 + method: POST + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Dataserviceid: + - https://chrisstablesprim.table.core.windows.net/gotable1eyzuuvhvub30(PartitionKey='partition',RowKey='1') + Date: + - Fri, 21 May 2021 19:12:57 GMT + Etag: + - W/"datetime'2021-05-21T19%3A12%3A58.1142822Z'" + Location: + - https://chrisstablesprim.table.core.windows.net/gotable1eyzuuvhvub30(PartitionKey='partition',RowKey='1') + Preference-Applied: + - return-no-content + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - d8f0ab55-2002-0006-1575-4e07ab000000 + X-Ms-Version: + - "2019-02-02" + status: 204 No Content + code: 204 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Dataserviceversion: + - "3.0" + If-Match: + - '*' + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Fri, 21 May 2021 19:12:58 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.core.windows.net/gotable1eyzuuvhvub30(PartitionKey='partition',RowKey='1') + method: DELETE + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Date: + - Fri, 21 May 2021 19:12:58 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - d8f0ab6c-2002-0006-2975-4e07ab000000 + X-Ms-Version: + - "2019-02-02" + status: 204 No Content + code: 204 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Fri, 21 May 2021 19:12:58 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.core.windows.net/Tables('gotable1eyzuuvhvub30') + method: DELETE + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Date: + - Fri, 21 May 2021 19:12:58 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - d8f0ab7c-2002-0006-3975-4e07ab000000 + X-Ms-Version: + - "2019-02-02" + status: 204 No Content + code: 204 + duration: "" diff --git a/sdk/tables/aztables/recordings/TestTableClient_Storage/TestGetEntity-variables.yaml b/sdk/tables/aztables/recordings/TestTableClient_Storage/TestGetEntity-variables.yaml new file mode 100644 index 000000000000..cf961f9b1cd5 --- /dev/null +++ b/sdk/tables/aztables/recordings/TestTableClient_Storage/TestGetEntity-variables.yaml @@ -0,0 +1,5 @@ +--- +STORAGE_ENDPOINT_SUFFIX: core.windows.net +TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== +TABLES_STORAGE_ACCOUNT_NAME: chrisstablesprim +randomSeed: "1621634376" diff --git a/sdk/tables/aztables/recordings/TestTableClient_Storage/TestGetEntity.yaml b/sdk/tables/aztables/recordings/TestTableClient_Storage/TestGetEntity.yaml new file mode 100644 index 000000000000..908730a04650 --- /dev/null +++ b/sdk/tables/aztables/recordings/TestTableClient_Storage/TestGetEntity.yaml @@ -0,0 +1,181 @@ +--- +version: 1 +interactions: +- request: + body: '{"TableName":"gotabler50ulgi64r43f"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "36" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Fri, 21 May 2021 21:59:36 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.core.windows.net/Tables + method: POST + response: + body: '{"odata.metadata":"https://chrisstablesprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotabler50ulgi64r43f"}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + Date: + - Fri, 21 May 2021 21:59:38 GMT + Location: + - https://chrisstablesprim.table.core.windows.net/Tables('gotabler50ulgi64r43f') + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - 32966ff3-c002-006c-348c-4edf83000000 + X-Ms-Version: + - "2019-02-02" + status: 201 Created + code: 201 + duration: "" +- request: + body: '{"BoolProp":true,"IntProp":1,"PartitionKey":"partition","RowKey":"1","StringProp":"some + string 1"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "98" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + Prefer: + - return-no-content + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Fri, 21 May 2021 21:59:38 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.core.windows.net/gotabler50ulgi64r43f + method: POST + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Dataserviceid: + - https://chrisstablesprim.table.core.windows.net/gotabler50ulgi64r43f(PartitionKey='partition',RowKey='1') + Date: + - Fri, 21 May 2021 21:59:38 GMT + Etag: + - W/"datetime'2021-05-21T21%3A59%3A39.1154205Z'" + Location: + - https://chrisstablesprim.table.core.windows.net/gotabler50ulgi64r43f(PartitionKey='partition',RowKey='1') + Preference-Applied: + - return-no-content + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - 32967012-c002-006c-4f8c-4edf83000000 + X-Ms-Version: + - "2019-02-02" + status: 204 No Content + code: 204 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Fri, 21 May 2021 21:59:38 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.core.windows.net/gotabler50ulgi64r43f(PartitionKey='partition',RowKey='1') + method: GET + response: + body: '{"odata.metadata":"https://chrisstablesprim.table.core.windows.net/$metadata#gotabler50ulgi64r43f/@Element","odata.etag":"W/\"datetime''2021-05-21T21%3A59%3A39.1154205Z''\"","PartitionKey":"partition","RowKey":"1","Timestamp":"2021-05-21T21:59:39.1154205Z","BoolProp":true,"IntProp":1,"StringProp":"some + string 1"}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + Date: + - Fri, 21 May 2021 21:59:39 GMT + Etag: + - W/"datetime'2021-05-21T21%3A59%3A39.1154205Z'" + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - 3296702c-c002-006c-648c-4edf83000000 + X-Ms-Version: + - "2019-02-02" + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Fri, 21 May 2021 21:59:39 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.core.windows.net/Tables('gotabler50ulgi64r43f') + method: DELETE + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Date: + - Fri, 21 May 2021 21:59:39 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - 32967036-c002-006c-6d8c-4edf83000000 + X-Ms-Version: + - "2019-02-02" + status: 204 No Content + code: 204 + duration: "" diff --git a/sdk/tables/aztables/recordings/TestTableClient_Storage/TestMergeEntity-variables.yaml b/sdk/tables/aztables/recordings/TestTableClient_Storage/TestMergeEntity-variables.yaml new file mode 100644 index 000000000000..e53058d11dbe --- /dev/null +++ b/sdk/tables/aztables/recordings/TestTableClient_Storage/TestMergeEntity-variables.yaml @@ -0,0 +1,5 @@ +--- +STORAGE_ENDPOINT_SUFFIX: core.windows.net +TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== +TABLES_STORAGE_ACCOUNT_NAME: chrisstablesprim +randomSeed: "1621628754" diff --git a/sdk/tables/aztables/recordings/TestTableClient_Storage/TestMergeEntity.yaml b/sdk/tables/aztables/recordings/TestTableClient_Storage/TestMergeEntity.yaml new file mode 100644 index 000000000000..8f3bc72088cb --- /dev/null +++ b/sdk/tables/aztables/recordings/TestTableClient_Storage/TestMergeEntity.yaml @@ -0,0 +1,266 @@ +--- +version: 1 +interactions: +- request: + body: '{"TableName":"gotable29xnpgoal4avd"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "36" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Fri, 21 May 2021 20:25:54 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.core.windows.net/Tables + method: POST + response: + body: '{"odata.metadata":"https://chrisstablesprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotable29xnpgoal4avd"}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + Date: + - Fri, 21 May 2021 20:25:55 GMT + Location: + - https://chrisstablesprim.table.core.windows.net/Tables('gotable29xnpgoal4avd') + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - 9335a71f-b002-002b-2d7f-4eb4d8000000 + X-Ms-Version: + - "2019-02-02" + status: 201 Created + code: 201 + duration: "" +- request: + body: '{"BoolProp":true,"IntProp":1,"PartitionKey":"partition","RowKey":"1","StringProp":"some + string 1"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "98" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + Prefer: + - return-no-content + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Fri, 21 May 2021 20:25:55 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.core.windows.net/gotable29xnpgoal4avd + method: POST + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Dataserviceid: + - https://chrisstablesprim.table.core.windows.net/gotable29xnpgoal4avd(PartitionKey='partition',RowKey='1') + Date: + - Fri, 21 May 2021 20:25:55 GMT + Etag: + - W/"datetime'2021-05-21T20%3A25%3A56.1541897Z'" + Location: + - https://chrisstablesprim.table.core.windows.net/gotable29xnpgoal4avd(PartitionKey='partition',RowKey='1') + Preference-Applied: + - return-no-content + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - 9335a734-b002-002b-3b7f-4eb4d8000000 + X-Ms-Version: + - "2019-02-02" + status: 204 No Content + code: 204 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Fri, 21 May 2021 20:25:56 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.core.windows.net/gotable29xnpgoal4avd()?%24filter=RowKey+eq+%271%27 + method: GET + response: + body: '{"odata.metadata":"https://chrisstablesprim.table.core.windows.net/$metadata#gotable29xnpgoal4avd","value":[{"odata.etag":"W/\"datetime''2021-05-21T20%3A25%3A56.1541897Z''\"","PartitionKey":"partition","RowKey":"1","Timestamp":"2021-05-21T20:25:56.1541897Z","BoolProp":true,"IntProp":1,"StringProp":"some + string 1"}]}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + Date: + - Fri, 21 May 2021 20:25:56 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - 9335a73c-b002-002b-437f-4eb4d8000000 + X-Ms-Version: + - "2019-02-02" + status: 200 OK + code: 200 + duration: "" +- request: + body: '{"MergeProperty":"foo","PartitionKey":"partition","RowKey":"1"}' + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + Content-Length: + - "63" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + If-Match: + - '*' + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Fri, 21 May 2021 20:25:56 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.core.windows.net/gotable29xnpgoal4avd(PartitionKey='partition',RowKey='1') + method: PATCH + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Date: + - Fri, 21 May 2021 20:25:56 GMT + Etag: + - W/"datetime'2021-05-21T20%3A25%3A56.3029412Z'" + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - 9335a74a-b002-002b-4f7f-4eb4d8000000 + X-Ms-Version: + - "2019-02-02" + status: 204 No Content + code: 204 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Fri, 21 May 2021 20:25:56 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.core.windows.net/gotable29xnpgoal4avd()?%24filter=RowKey+eq+%271%27 + method: GET + response: + body: '{"odata.metadata":"https://chrisstablesprim.table.core.windows.net/$metadata#gotable29xnpgoal4avd","value":[{"odata.etag":"W/\"datetime''2021-05-21T20%3A25%3A56.3029412Z''\"","PartitionKey":"partition","RowKey":"1","Timestamp":"2021-05-21T20:25:56.3029412Z","BoolProp":true,"IntProp":1,"MergeProperty":"foo","StringProp":"some + string 1"}]}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + Date: + - Fri, 21 May 2021 20:25:56 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - 9335a753-b002-002b-587f-4eb4d8000000 + X-Ms-Version: + - "2019-02-02" + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Fri, 21 May 2021 20:25:56 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.core.windows.net/Tables('gotable29xnpgoal4avd') + method: DELETE + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Date: + - Fri, 21 May 2021 20:25:56 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - 9335a758-b002-002b-5d7f-4eb4d8000000 + X-Ms-Version: + - "2019-02-02" + status: 204 No Content + code: 204 + duration: "" diff --git a/sdk/tables/aztables/recordings/TestTableClient_Storage/TestQueryComplexEntity-variables.yaml b/sdk/tables/aztables/recordings/TestTableClient_Storage/TestQueryComplexEntity-variables.yaml new file mode 100644 index 000000000000..3716fc99c1ac --- /dev/null +++ b/sdk/tables/aztables/recordings/TestTableClient_Storage/TestQueryComplexEntity-variables.yaml @@ -0,0 +1,6 @@ +--- +STORAGE_ENDPOINT_SUFFIX: core.windows.net +TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== +TABLES_STORAGE_ACCOUNT_NAME: chrisstablesprim +now: "2021-05-19T11:25:34.8176907-05:00" +randomSeed: "1621441533" diff --git a/sdk/tables/aztables/recordings/TestTableClient_Storage/TestQueryComplexEntity.yaml b/sdk/tables/aztables/recordings/TestTableClient_Storage/TestQueryComplexEntity.yaml new file mode 100644 index 000000000000..a4520174812d --- /dev/null +++ b/sdk/tables/aztables/recordings/TestTableClient_Storage/TestQueryComplexEntity.yaml @@ -0,0 +1,398 @@ +--- +version: 1 +interactions: +- request: + body: '{"TableName":"gotablejb1ox80o3u07d"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "36" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Wed, 19 May 2021 16:25:33 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.core.windows.net/Tables + method: POST + response: + body: '{"odata.metadata":"https://chrisstablesprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotablejb1ox80o3u07d"}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + Date: + - Wed, 19 May 2021 16:25:34 GMT + Location: + - https://chrisstablesprim.table.core.windows.net/Tables('gotablejb1ox80o3u07d') + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - fc7aa098-d002-0012-61cb-4c4fc4000000 + X-Ms-Version: + - "2019-02-02" + status: 201 Created + code: 201 + duration: "" +- request: + body: '{"BoolProp":true,"IntProp":1,"PartitionKey":"partition","RowKey":"1","SomeBinaryProperty":"c29tZSBieXRlcw==","SomeBinaryProperty@odata.type":"Edm.Binary","SomeDateProperty":"2021-05-19T16:25:34.8176907Z","SomeDateProperty@odata.type":"Edm.DateTime","SomeDoubleProperty0":1,"SomeDoubleProperty0@odata.type":"Edm.Double","SomeDoubleProperty1":1.2345,"SomeDoubleProperty1@odata.type":"Edm.Double","SomeGuidProperty":"db1ac97d-fb93-4b44-7d4b-d4f954a074cd","SomeGuidProperty@odata.type":"Edm.Guid","SomeInt64Property":"9223372036854775807","SomeInt64Property@odata.type":"Edm.Int64","SomeIntProperty":42,"SomeStringProperty":"some + string","StringProp":"some string 1"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "663" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + Prefer: + - return-no-content + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Wed, 19 May 2021 16:25:34 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.core.windows.net/gotablejb1ox80o3u07d + method: POST + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Dataserviceid: + - https://chrisstablesprim.table.core.windows.net/gotablejb1ox80o3u07d(PartitionKey='partition',RowKey='1') + Date: + - Wed, 19 May 2021 16:25:34 GMT + Etag: + - W/"datetime'2021-05-19T16%3A25%3A35.0582247Z'" + Location: + - https://chrisstablesprim.table.core.windows.net/gotablejb1ox80o3u07d(PartitionKey='partition',RowKey='1') + Preference-Applied: + - return-no-content + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - fc7aa0a7-d002-0012-68cb-4c4fc4000000 + X-Ms-Version: + - "2019-02-02" + status: 204 No Content + code: 204 + duration: "" +- request: + body: '{"BoolProp":true,"IntProp":2,"PartitionKey":"partition","RowKey":"2","SomeBinaryProperty":"c29tZSBieXRlcw==","SomeBinaryProperty@odata.type":"Edm.Binary","SomeDateProperty":"2021-05-19T16:25:34.8176907Z","SomeDateProperty@odata.type":"Edm.DateTime","SomeDoubleProperty0":1,"SomeDoubleProperty0@odata.type":"Edm.Double","SomeDoubleProperty1":1.2345,"SomeDoubleProperty1@odata.type":"Edm.Double","SomeGuidProperty":"fb4d0c37-ce1d-4be9-7caf-b33d2c76c8d2","SomeGuidProperty@odata.type":"Edm.Guid","SomeInt64Property":"9223372036854775807","SomeInt64Property@odata.type":"Edm.Int64","SomeIntProperty":42,"SomeStringProperty":"some + string","StringProp":"some string 2"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "663" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + Prefer: + - return-no-content + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Wed, 19 May 2021 16:25:34 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.core.windows.net/gotablejb1ox80o3u07d + method: POST + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Dataserviceid: + - https://chrisstablesprim.table.core.windows.net/gotablejb1ox80o3u07d(PartitionKey='partition',RowKey='2') + Date: + - Wed, 19 May 2021 16:25:34 GMT + Etag: + - W/"datetime'2021-05-19T16%3A25%3A35.1402835Z'" + Location: + - https://chrisstablesprim.table.core.windows.net/gotablejb1ox80o3u07d(PartitionKey='partition',RowKey='2') + Preference-Applied: + - return-no-content + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - fc7aa0bc-d002-0012-74cb-4c4fc4000000 + X-Ms-Version: + - "2019-02-02" + status: 204 No Content + code: 204 + duration: "" +- request: + body: '{"BoolProp":true,"IntProp":3,"PartitionKey":"partition","RowKey":"3","SomeBinaryProperty":"c29tZSBieXRlcw==","SomeBinaryProperty@odata.type":"Edm.Binary","SomeDateProperty":"2021-05-19T16:25:34.8176907Z","SomeDateProperty@odata.type":"Edm.DateTime","SomeDoubleProperty0":1,"SomeDoubleProperty0@odata.type":"Edm.Double","SomeDoubleProperty1":1.2345,"SomeDoubleProperty1@odata.type":"Edm.Double","SomeGuidProperty":"dcc950e1-9b4d-4921-641f-6b027f009872","SomeGuidProperty@odata.type":"Edm.Guid","SomeInt64Property":"9223372036854775807","SomeInt64Property@odata.type":"Edm.Int64","SomeIntProperty":42,"SomeStringProperty":"some + string","StringProp":"some string 3"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "663" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + Prefer: + - return-no-content + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Wed, 19 May 2021 16:25:34 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.core.windows.net/gotablejb1ox80o3u07d + method: POST + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Dataserviceid: + - https://chrisstablesprim.table.core.windows.net/gotablejb1ox80o3u07d(PartitionKey='partition',RowKey='3') + Date: + - Wed, 19 May 2021 16:25:34 GMT + Etag: + - W/"datetime'2021-05-19T16%3A25%3A35.2163375Z'" + Location: + - https://chrisstablesprim.table.core.windows.net/gotablejb1ox80o3u07d(PartitionKey='partition',RowKey='3') + Preference-Applied: + - return-no-content + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - fc7aa0c9-d002-0012-7ccb-4c4fc4000000 + X-Ms-Version: + - "2019-02-02" + status: 204 No Content + code: 204 + duration: "" +- request: + body: '{"BoolProp":true,"IntProp":4,"PartitionKey":"partition","RowKey":"4","SomeBinaryProperty":"c29tZSBieXRlcw==","SomeBinaryProperty@odata.type":"Edm.Binary","SomeDateProperty":"2021-05-19T16:25:34.8176907Z","SomeDateProperty@odata.type":"Edm.DateTime","SomeDoubleProperty0":1,"SomeDoubleProperty0@odata.type":"Edm.Double","SomeDoubleProperty1":1.2345,"SomeDoubleProperty1@odata.type":"Edm.Double","SomeGuidProperty":"1d4ec065-b163-4655-6837-dfb00d348f05","SomeGuidProperty@odata.type":"Edm.Guid","SomeInt64Property":"9223372036854775807","SomeInt64Property@odata.type":"Edm.Int64","SomeIntProperty":42,"SomeStringProperty":"some + string","StringProp":"some string 4"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "663" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + Prefer: + - return-no-content + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Wed, 19 May 2021 16:25:35 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.core.windows.net/gotablejb1ox80o3u07d + method: POST + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Dataserviceid: + - https://chrisstablesprim.table.core.windows.net/gotablejb1ox80o3u07d(PartitionKey='partition',RowKey='4') + Date: + - Wed, 19 May 2021 16:25:34 GMT + Etag: + - W/"datetime'2021-05-19T16%3A25%3A35.2903901Z'" + Location: + - https://chrisstablesprim.table.core.windows.net/gotablejb1ox80o3u07d(PartitionKey='partition',RowKey='4') + Preference-Applied: + - return-no-content + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - fc7aa0d4-d002-0012-02cb-4c4fc4000000 + X-Ms-Version: + - "2019-02-02" + status: 204 No Content + code: 204 + duration: "" +- request: + body: '{"BoolProp":true,"IntProp":5,"PartitionKey":"partition","RowKey":"5","SomeBinaryProperty":"c29tZSBieXRlcw==","SomeBinaryProperty@odata.type":"Edm.Binary","SomeDateProperty":"2021-05-19T16:25:34.8176907Z","SomeDateProperty@odata.type":"Edm.DateTime","SomeDoubleProperty0":1,"SomeDoubleProperty0@odata.type":"Edm.Double","SomeDoubleProperty1":1.2345,"SomeDoubleProperty1@odata.type":"Edm.Double","SomeGuidProperty":"56f00341-cce5-4e8b-7071-d032809fc2ba","SomeGuidProperty@odata.type":"Edm.Guid","SomeInt64Property":"9223372036854775807","SomeInt64Property@odata.type":"Edm.Int64","SomeIntProperty":42,"SomeStringProperty":"some + string","StringProp":"some string 5"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "663" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + Prefer: + - return-no-content + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Wed, 19 May 2021 16:25:35 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.core.windows.net/gotablejb1ox80o3u07d + method: POST + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Dataserviceid: + - https://chrisstablesprim.table.core.windows.net/gotablejb1ox80o3u07d(PartitionKey='partition',RowKey='5') + Date: + - Wed, 19 May 2021 16:25:34 GMT + Etag: + - W/"datetime'2021-05-19T16%3A25%3A35.368446Z'" + Location: + - https://chrisstablesprim.table.core.windows.net/gotablejb1ox80o3u07d(PartitionKey='partition',RowKey='5') + Preference-Applied: + - return-no-content + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - fc7aa0e3-d002-0012-0bcb-4c4fc4000000 + X-Ms-Version: + - "2019-02-02" + status: 204 No Content + code: 204 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Wed, 19 May 2021 16:25:35 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.core.windows.net/gotablejb1ox80o3u07d()?%24filter=RowKey+lt+%275%27 + method: GET + response: + body: '{"odata.metadata":"https://chrisstablesprim.table.core.windows.net/$metadata#gotablejb1ox80o3u07d","value":[{"odata.etag":"W/\"datetime''2021-05-19T16%3A25%3A35.0582247Z''\"","PartitionKey":"partition","RowKey":"1","Timestamp":"2021-05-19T16:25:35.0582247Z","BoolProp":true,"IntProp":1,"SomeBinaryProperty@odata.type":"Edm.Binary","SomeBinaryProperty":"c29tZSBieXRlcw==","SomeDateProperty@odata.type":"Edm.DateTime","SomeDateProperty":"2021-05-19T16:25:34.8176907Z","SomeDoubleProperty0":1.0,"SomeDoubleProperty1":1.2345,"SomeGuidProperty@odata.type":"Edm.Guid","SomeGuidProperty":"db1ac97d-fb93-4b44-7d4b-d4f954a074cd","SomeInt64Property@odata.type":"Edm.Int64","SomeInt64Property":"9223372036854775807","SomeIntProperty":42,"SomeStringProperty":"some + string","StringProp":"some string 1"},{"odata.etag":"W/\"datetime''2021-05-19T16%3A25%3A35.1402835Z''\"","PartitionKey":"partition","RowKey":"2","Timestamp":"2021-05-19T16:25:35.1402835Z","BoolProp":true,"IntProp":2,"SomeBinaryProperty@odata.type":"Edm.Binary","SomeBinaryProperty":"c29tZSBieXRlcw==","SomeDateProperty@odata.type":"Edm.DateTime","SomeDateProperty":"2021-05-19T16:25:34.8176907Z","SomeDoubleProperty0":1.0,"SomeDoubleProperty1":1.2345,"SomeGuidProperty@odata.type":"Edm.Guid","SomeGuidProperty":"fb4d0c37-ce1d-4be9-7caf-b33d2c76c8d2","SomeInt64Property@odata.type":"Edm.Int64","SomeInt64Property":"9223372036854775807","SomeIntProperty":42,"SomeStringProperty":"some + string","StringProp":"some string 2"},{"odata.etag":"W/\"datetime''2021-05-19T16%3A25%3A35.2163375Z''\"","PartitionKey":"partition","RowKey":"3","Timestamp":"2021-05-19T16:25:35.2163375Z","BoolProp":true,"IntProp":3,"SomeBinaryProperty@odata.type":"Edm.Binary","SomeBinaryProperty":"c29tZSBieXRlcw==","SomeDateProperty@odata.type":"Edm.DateTime","SomeDateProperty":"2021-05-19T16:25:34.8176907Z","SomeDoubleProperty0":1.0,"SomeDoubleProperty1":1.2345,"SomeGuidProperty@odata.type":"Edm.Guid","SomeGuidProperty":"dcc950e1-9b4d-4921-641f-6b027f009872","SomeInt64Property@odata.type":"Edm.Int64","SomeInt64Property":"9223372036854775807","SomeIntProperty":42,"SomeStringProperty":"some + string","StringProp":"some string 3"},{"odata.etag":"W/\"datetime''2021-05-19T16%3A25%3A35.2903901Z''\"","PartitionKey":"partition","RowKey":"4","Timestamp":"2021-05-19T16:25:35.2903901Z","BoolProp":true,"IntProp":4,"SomeBinaryProperty@odata.type":"Edm.Binary","SomeBinaryProperty":"c29tZSBieXRlcw==","SomeDateProperty@odata.type":"Edm.DateTime","SomeDateProperty":"2021-05-19T16:25:34.8176907Z","SomeDoubleProperty0":1.0,"SomeDoubleProperty1":1.2345,"SomeGuidProperty@odata.type":"Edm.Guid","SomeGuidProperty":"1d4ec065-b163-4655-6837-dfb00d348f05","SomeInt64Property@odata.type":"Edm.Int64","SomeInt64Property":"9223372036854775807","SomeIntProperty":42,"SomeStringProperty":"some + string","StringProp":"some string 4"}]}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + Date: + - Wed, 19 May 2021 16:25:34 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - fc7aa0e9-d002-0012-11cb-4c4fc4000000 + X-Ms-Version: + - "2019-02-02" + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Wed, 19 May 2021 16:25:35 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.core.windows.net/Tables('gotablejb1ox80o3u07d') + method: DELETE + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Date: + - Wed, 19 May 2021 16:25:34 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - fc7aa0f9-d002-0012-21cb-4c4fc4000000 + X-Ms-Version: + - "2019-02-02" + status: 204 No Content + code: 204 + duration: "" diff --git a/sdk/tables/aztables/recordings/TestTableClient_Storage/TestQuerySimpleEntity-variables.yaml b/sdk/tables/aztables/recordings/TestTableClient_Storage/TestQuerySimpleEntity-variables.yaml new file mode 100644 index 000000000000..7a6b1b1ab41d --- /dev/null +++ b/sdk/tables/aztables/recordings/TestTableClient_Storage/TestQuerySimpleEntity-variables.yaml @@ -0,0 +1,5 @@ +--- +STORAGE_ENDPOINT_SUFFIX: core.windows.net +TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== +TABLES_STORAGE_ACCOUNT_NAME: chrisstablesprim +randomSeed: "1617598958" diff --git a/sdk/tables/aztables/recordings/TestTableClient_Storage/TestQuerySimpleEntity.yaml b/sdk/tables/aztables/recordings/TestTableClient_Storage/TestQuerySimpleEntity.yaml new file mode 100644 index 000000000000..1735178553e0 --- /dev/null +++ b/sdk/tables/aztables/recordings/TestTableClient_Storage/TestQuerySimpleEntity.yaml @@ -0,0 +1,398 @@ +--- +version: 1 +interactions: +- request: + body: '{"TableName":"gotablev9ymy16fzote2"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "36" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Mon, 05 Apr 2021 05:02:38 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.core.windows.net/Tables + method: POST + response: + body: '{"odata.metadata":"https://chrisstablesprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotablev9ymy16fzote2"}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + Date: + - Mon, 05 Apr 2021 05:02:37 GMT + Location: + - https://chrisstablesprim.table.core.windows.net/Tables('gotablev9ymy16fzote2') + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - 95cfebe3-e002-0019-49d8-29b4af000000 + X-Ms-Version: + - "2019-02-02" + status: 201 Created + code: 201 + duration: "" +- request: + body: '{"BoolProp":true,"IntProp":1,"PartitionKey":"partition","RowKey":"1","StringProp":"some + string 1"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "98" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + Prefer: + - return-no-content + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Mon, 05 Apr 2021 05:02:38 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.core.windows.net/gotablev9ymy16fzote2 + method: POST + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Dataserviceid: + - https://chrisstablesprim.table.core.windows.net/gotablev9ymy16fzote2(PartitionKey='partition',RowKey='1') + Date: + - Mon, 05 Apr 2021 05:02:37 GMT + Etag: + - W/"datetime'2021-04-05T05%3A02%3A38.4885381Z'" + Location: + - https://chrisstablesprim.table.core.windows.net/gotablev9ymy16fzote2(PartitionKey='partition',RowKey='1') + Preference-Applied: + - return-no-content + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - 95cfebec-e002-0019-50d8-29b4af000000 + X-Ms-Version: + - "2019-02-02" + status: 204 No Content + code: 204 + duration: "" +- request: + body: '{"BoolProp":true,"IntProp":2,"PartitionKey":"partition","RowKey":"2","StringProp":"some + string 2"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "98" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + Prefer: + - return-no-content + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Mon, 05 Apr 2021 05:02:38 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.core.windows.net/gotablev9ymy16fzote2 + method: POST + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Dataserviceid: + - https://chrisstablesprim.table.core.windows.net/gotablev9ymy16fzote2(PartitionKey='partition',RowKey='2') + Date: + - Mon, 05 Apr 2021 05:02:37 GMT + Etag: + - W/"datetime'2021-04-05T05%3A02%3A38.5946142Z'" + Location: + - https://chrisstablesprim.table.core.windows.net/gotablev9ymy16fzote2(PartitionKey='partition',RowKey='2') + Preference-Applied: + - return-no-content + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - 95cfebf1-e002-0019-55d8-29b4af000000 + X-Ms-Version: + - "2019-02-02" + status: 204 No Content + code: 204 + duration: "" +- request: + body: '{"BoolProp":true,"IntProp":3,"PartitionKey":"partition","RowKey":"3","StringProp":"some + string 3"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "98" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + Prefer: + - return-no-content + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Mon, 05 Apr 2021 05:02:38 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.core.windows.net/gotablev9ymy16fzote2 + method: POST + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Dataserviceid: + - https://chrisstablesprim.table.core.windows.net/gotablev9ymy16fzote2(PartitionKey='partition',RowKey='3') + Date: + - Mon, 05 Apr 2021 05:02:38 GMT + Etag: + - W/"datetime'2021-04-05T05%3A02%3A38.6866808Z'" + Location: + - https://chrisstablesprim.table.core.windows.net/gotablev9ymy16fzote2(PartitionKey='partition',RowKey='3') + Preference-Applied: + - return-no-content + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - 95cfebf3-e002-0019-57d8-29b4af000000 + X-Ms-Version: + - "2019-02-02" + status: 204 No Content + code: 204 + duration: "" +- request: + body: '{"BoolProp":true,"IntProp":4,"PartitionKey":"partition","RowKey":"4","StringProp":"some + string 4"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "98" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + Prefer: + - return-no-content + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Mon, 05 Apr 2021 05:02:38 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.core.windows.net/gotablev9ymy16fzote2 + method: POST + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Dataserviceid: + - https://chrisstablesprim.table.core.windows.net/gotablev9ymy16fzote2(PartitionKey='partition',RowKey='4') + Date: + - Mon, 05 Apr 2021 05:02:38 GMT + Etag: + - W/"datetime'2021-04-05T05%3A02%3A38.7727417Z'" + Location: + - https://chrisstablesprim.table.core.windows.net/gotablev9ymy16fzote2(PartitionKey='partition',RowKey='4') + Preference-Applied: + - return-no-content + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - 95cfebf5-e002-0019-59d8-29b4af000000 + X-Ms-Version: + - "2019-02-02" + status: 204 No Content + code: 204 + duration: "" +- request: + body: '{"BoolProp":true,"IntProp":5,"PartitionKey":"partition","RowKey":"5","StringProp":"some + string 5"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "98" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + Prefer: + - return-no-content + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Mon, 05 Apr 2021 05:02:38 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.core.windows.net/gotablev9ymy16fzote2 + method: POST + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Dataserviceid: + - https://chrisstablesprim.table.core.windows.net/gotablev9ymy16fzote2(PartitionKey='partition',RowKey='5') + Date: + - Mon, 05 Apr 2021 05:02:38 GMT + Etag: + - W/"datetime'2021-04-05T05%3A02%3A38.8487963Z'" + Location: + - https://chrisstablesprim.table.core.windows.net/gotablev9ymy16fzote2(PartitionKey='partition',RowKey='5') + Preference-Applied: + - return-no-content + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - 95cfebfb-e002-0019-5cd8-29b4af000000 + X-Ms-Version: + - "2019-02-02" + status: 204 No Content + code: 204 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Mon, 05 Apr 2021 05:02:39 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.core.windows.net/gotablev9ymy16fzote2()?%24filter=RowKey+lt+%275%27 + method: GET + response: + body: '{"odata.metadata":"https://chrisstablesprim.table.core.windows.net/$metadata#gotablev9ymy16fzote2","value":[{"odata.etag":"W/\"datetime''2021-04-05T05%3A02%3A38.4885381Z''\"","PartitionKey":"partition","RowKey":"1","Timestamp":"2021-04-05T05:02:38.4885381Z","BoolProp":true,"IntProp":1,"StringProp":"some + string 1"},{"odata.etag":"W/\"datetime''2021-04-05T05%3A02%3A38.5946142Z''\"","PartitionKey":"partition","RowKey":"2","Timestamp":"2021-04-05T05:02:38.5946142Z","BoolProp":true,"IntProp":2,"StringProp":"some + string 2"},{"odata.etag":"W/\"datetime''2021-04-05T05%3A02%3A38.6866808Z''\"","PartitionKey":"partition","RowKey":"3","Timestamp":"2021-04-05T05:02:38.6866808Z","BoolProp":true,"IntProp":3,"StringProp":"some + string 3"},{"odata.etag":"W/\"datetime''2021-04-05T05%3A02%3A38.7727417Z''\"","PartitionKey":"partition","RowKey":"4","Timestamp":"2021-04-05T05:02:38.7727417Z","BoolProp":true,"IntProp":4,"StringProp":"some + string 4"}]}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + Date: + - Mon, 05 Apr 2021 05:02:38 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - 95cfebfe-e002-0019-5ed8-29b4af000000 + X-Ms-Version: + - "2019-02-02" + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Mon, 05 Apr 2021 05:02:39 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.core.windows.net/Tables('gotablev9ymy16fzote2') + method: DELETE + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Date: + - Mon, 05 Apr 2021 05:02:38 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - 95cfec00-e002-0019-60d8-29b4af000000 + X-Ms-Version: + - "2019-02-02" + status: 204 No Content + code: 204 + duration: "" diff --git a/sdk/tables/aztables/recordings/TestTableClient_Storage/TestServiceErrors-variables.yaml b/sdk/tables/aztables/recordings/TestTableClient_Storage/TestServiceErrors-variables.yaml new file mode 100644 index 000000000000..db3e9cbbe8a7 --- /dev/null +++ b/sdk/tables/aztables/recordings/TestTableClient_Storage/TestServiceErrors-variables.yaml @@ -0,0 +1,5 @@ +--- +STORAGE_ENDPOINT_SUFFIX: core.windows.net +TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== +TABLES_STORAGE_ACCOUNT_NAME: chrisstablesprim +randomSeed: "1617580013" diff --git a/sdk/tables/aztables/recordings/TestTableClient_Storage/TestServiceErrors.yaml b/sdk/tables/aztables/recordings/TestTableClient_Storage/TestServiceErrors.yaml new file mode 100644 index 000000000000..65a3e042f9f4 --- /dev/null +++ b/sdk/tables/aztables/recordings/TestTableClient_Storage/TestServiceErrors.yaml @@ -0,0 +1,129 @@ +--- +version: 1 +interactions: +- request: + body: '{"TableName":"gotable4gghmbc0umbca"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "36" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Sun, 04 Apr 2021 23:46:53 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.core.windows.net/Tables + method: POST + response: + body: '{"odata.metadata":"https://chrisstablesprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotable4gghmbc0umbca"}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + Date: + - Sun, 04 Apr 2021 23:46:53 GMT + Location: + - https://chrisstablesprim.table.core.windows.net/Tables('gotable4gghmbc0umbca') + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - 89afb2ba-b002-0066-1aac-297b34000000 + X-Ms-Version: + - "2019-02-02" + status: 201 Created + code: 201 + duration: "" +- request: + body: '{"TableName":"gotable4gghmbc0umbca"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "36" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Sun, 04 Apr 2021 23:46:54 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.core.windows.net/Tables + method: POST + response: + body: '{"odata.error":{"code":"TableAlreadyExists","message":{"lang":"en-US","value":"The + table specified already exists.\nRequestId:89afb2c5-b002-0066-23ac-297b34000000\nTime:2021-04-04T23:46:53.9829008Z"}}}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + Date: + - Sun, 04 Apr 2021 23:46:53 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - 89afb2c5-b002-0066-23ac-297b34000000 + X-Ms-Version: + - "2019-02-02" + status: 409 Conflict + code: 409 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Sun, 04 Apr 2021 23:46:54 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.core.windows.net/Tables('gotable4gghmbc0umbca') + method: DELETE + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Date: + - Sun, 04 Apr 2021 23:46:53 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - 89afb2cd-b002-0066-2aac-297b34000000 + X-Ms-Version: + - "2019-02-02" + status: 204 No Content + code: 204 + duration: "" diff --git a/sdk/tables/aztables/recordings/TestTableClient_Storage/TestUpsertEntity-variables.yaml b/sdk/tables/aztables/recordings/TestTableClient_Storage/TestUpsertEntity-variables.yaml new file mode 100644 index 000000000000..0d48c901e16e --- /dev/null +++ b/sdk/tables/aztables/recordings/TestTableClient_Storage/TestUpsertEntity-variables.yaml @@ -0,0 +1,5 @@ +--- +STORAGE_ENDPOINT_SUFFIX: core.windows.net +TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== +TABLES_STORAGE_ACCOUNT_NAME: chrisstablesprim +randomSeed: "1621629298" diff --git a/sdk/tables/aztables/recordings/TestTableClient_Storage/TestUpsertEntity.yaml b/sdk/tables/aztables/recordings/TestTableClient_Storage/TestUpsertEntity.yaml new file mode 100644 index 000000000000..a051ad2e5f87 --- /dev/null +++ b/sdk/tables/aztables/recordings/TestTableClient_Storage/TestUpsertEntity.yaml @@ -0,0 +1,255 @@ +--- +version: 1 +interactions: +- request: + body: '{"TableName":"gotableybpwrxkkatqur"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "36" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Fri, 21 May 2021 20:34:58 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.core.windows.net/Tables + method: POST + response: + body: '{"odata.metadata":"https://chrisstablesprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotableybpwrxkkatqur"}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + Date: + - Fri, 21 May 2021 20:34:58 GMT + Location: + - https://chrisstablesprim.table.core.windows.net/Tables('gotableybpwrxkkatqur') + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - c1ecaa3f-8002-0030-1d80-4e8adb000000 + X-Ms-Version: + - "2019-02-02" + status: 201 Created + code: 201 + duration: "" +- request: + body: '{"BoolProp":true,"IntProp":1,"PartitionKey":"partition","RowKey":"1","StringProp":"some + string 1"}' + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + Content-Length: + - "98" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Fri, 21 May 2021 20:34:59 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.core.windows.net/gotableybpwrxkkatqur(PartitionKey='partition',RowKey='1') + method: PUT + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Date: + - Fri, 21 May 2021 20:34:58 GMT + Etag: + - W/"datetime'2021-05-21T20%3A34%3A59.5369667Z'" + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - c1ecaa49-8002-0030-2380-4e8adb000000 + X-Ms-Version: + - "2019-02-02" + status: 204 No Content + code: 204 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Fri, 21 May 2021 20:34:59 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.core.windows.net/gotableybpwrxkkatqur()?%24filter=RowKey+eq+%271%27 + method: GET + response: + body: '{"odata.metadata":"https://chrisstablesprim.table.core.windows.net/$metadata#gotableybpwrxkkatqur","value":[{"odata.etag":"W/\"datetime''2021-05-21T20%3A34%3A59.5369667Z''\"","PartitionKey":"partition","RowKey":"1","Timestamp":"2021-05-21T20:34:59.5369667Z","BoolProp":true,"IntProp":1,"StringProp":"some + string 1"}]}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + Date: + - Fri, 21 May 2021 20:34:58 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - c1ecaa4c-8002-0030-2580-4e8adb000000 + X-Ms-Version: + - "2019-02-02" + status: 200 OK + code: 200 + duration: "" +- request: + body: '{"MergeProperty":"foo","PartitionKey":"partition","RowKey":"1"}' + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + Content-Length: + - "63" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Fri, 21 May 2021 20:34:59 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.core.windows.net/gotableybpwrxkkatqur(PartitionKey='partition',RowKey='1') + method: PUT + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Date: + - Fri, 21 May 2021 20:34:58 GMT + Etag: + - W/"datetime'2021-05-21T20%3A34%3A59.6890733Z'" + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - c1ecaa52-8002-0030-2b80-4e8adb000000 + X-Ms-Version: + - "2019-02-02" + status: 204 No Content + code: 204 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Fri, 21 May 2021 20:34:59 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.core.windows.net/gotableybpwrxkkatqur()?%24filter=RowKey+eq+%271%27 + method: GET + response: + body: '{"odata.metadata":"https://chrisstablesprim.table.core.windows.net/$metadata#gotableybpwrxkkatqur","value":[{"odata.etag":"W/\"datetime''2021-05-21T20%3A34%3A59.6890733Z''\"","PartitionKey":"partition","RowKey":"1","Timestamp":"2021-05-21T20:34:59.6890733Z","MergeProperty":"foo"}]}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + Date: + - Fri, 21 May 2021 20:34:58 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - c1ecaa53-8002-0030-2c80-4e8adb000000 + X-Ms-Version: + - "2019-02-02" + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + Windows_NT) + X-Ms-Date: + - Fri, 21 May 2021 20:34:59 GMT + X-Ms-Version: + - "2019-02-02" + url: https://chrisstablesprim.table.core.windows.net/Tables('gotableybpwrxkkatqur') + method: DELETE + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Date: + - Fri, 21 May 2021 20:34:58 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - c1ecaa59-8002-0030-3180-4e8adb000000 + X-Ms-Version: + - "2019-02-02" + status: 204 No Content + code: 204 + duration: "" diff --git a/sdk/tables/aztables/tableClient.go b/sdk/tables/aztables/tableClient.go deleted file mode 100644 index d24ae0a14931..000000000000 --- a/sdk/tables/aztables/tableClient.go +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package aztables - -import ( - "context" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore" -) - -// A TableClient represents a URL to an Azure Storage blob; the blob may be a block blob, append blob, or page blob. -type TableClient struct { - client *tableClient - cred SharedKeyCredential -} - -// NewTableClient creates a TableClient object using the specified URL and request policy pipeline. -func NewTableClient(serviceURL string, cred azcore.Credential, options *TableClientOptions) (*TableClient, error) { - con := newConnection(serviceURL, cred, options.getConnectionOptions()) - - c, _ := cred.(*SharedKeyCredential) - - return &TableClient{client: &tableClient{con}, cred: *c}, nil -} - -// Create -func (t TableClient) Create(ctx context.Context, name string) (TableResponseResponse, error) { - resp, err := t.client.Create(ctx, TableProperties{&name}, nil, nil) - if resp == nil { - return TableResponseResponse{}, err - } else { - return resp.(TableResponseResponse), err - } -} - -// Delete -func (t TableClient) Delete(ctx context.Context, name string) (TableDeleteResponse, error) { - return t.client.Delete(ctx, name, nil) -} diff --git a/sdk/tables/aztables/tableClient_test.go b/sdk/tables/aztables/tableClient_test.go deleted file mode 100644 index 45b97edc2d47..000000000000 --- a/sdk/tables/aztables/tableClient_test.go +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package aztables - -import ( - "testing" -) - -func TestContainerCreateAccessContainer(t *testing.T) { - // TODO - cred, err := NewSharedKeyCredential("foo", "Kg==") - if err != nil { - t.Fatal(err) - } - - NewTableClient("https://foo", cred, &TableClientOptions{}) -} diff --git a/sdk/tables/aztables/table_client.go b/sdk/tables/aztables/table_client.go new file mode 100644 index 000000000000..ec4a3e16819c --- /dev/null +++ b/sdk/tables/aztables/table_client.go @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package aztables + +import ( + "context" + "errors" + + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/internal/runtime" +) + +// A TableClient represents a URL to an Azure Storage blob; the blob may be a block blob, append blob, or page blob. +type TableClient struct { + client *tableClient + service *TableServiceClient + cred SharedKeyCredential + Name string +} + +type TableUpdateMode string + +const ( + Replace TableUpdateMode = "replace" + Merge TableUpdateMode = "merge" +) + +// NewTableClient creates a TableClient object using the specified URL and request policy pipeline. +func NewTableClient(tableName string, serviceURL string, cred azcore.Credential, options *TableClientOptions) (*TableClient, error) { + s, err := NewTableServiceClient(serviceURL, cred, options) + return s.GetTableClient(tableName), err +} + +// Create creates the table with the name specified in NewTableClient +func (t *TableClient) Create(ctx context.Context) (*TableResponseResponse, *runtime.ResponseError) { + return t.service.Create(ctx, t.Name) +} + +// Delete deletes the current table +func (t *TableClient) Delete(ctx context.Context) (*TableDeleteResponse, *runtime.ResponseError) { + return t.service.Delete(ctx, t.Name) +} + +// Query queries the tables using the specified QueryOptions +func (t *TableClient) Query(queryOptions QueryOptions) TableEntityQueryResponsePager { + return &tableEntityQueryResponsePager{tableClient: t, queryOptions: &queryOptions, tableQueryOptions: &TableQueryEntitiesOptions{}} +} + +// QueryAsModel queries the table using the specified QueryOptions and attempts to serialize the response as the supplied interface type +func (t *TableClient) QueryAsModel(opt QueryOptions, s FromMapper) StructEntityQueryResponsePager { + return &structQueryResponsePager{mapper: s, tableClient: t, queryOptions: &opt, tableQueryOptions: &TableQueryEntitiesOptions{}} +} + +func (t *TableClient) GetEntity(ctx context.Context, partitionKey string, rowKey string) (MapOfInterfaceResponse, error) { + resp, err := t.client.QueryEntityWithPartitionAndRowKey(ctx, t.Name, partitionKey, rowKey, &TableQueryEntityWithPartitionAndRowKeyOptions{}, &QueryOptions{}) + if err != nil { + return resp, err + } + castAndRemoveAnnotations(&resp.Value) + return resp, err +} + +// AddEntity Creates an entity from a map value. +func (t *TableClient) AddEntity(ctx context.Context, entity map[string]interface{}) (*TableInsertEntityResponse, *runtime.ResponseError) { + toOdataAnnotatedDictionary(&entity) + resp, err := t.client.InsertEntity(ctx, t.Name, &TableInsertEntityOptions{TableEntityProperties: entity, ResponsePreference: ResponseFormatReturnNoContent.ToPtr()}, &QueryOptions{}) + if err == nil { + insertResp := resp.(TableInsertEntityResponse) + return &insertResp, nil + } else { + return nil, convertErr(err) + } +} + +// AddModelEntity creates an entity from an arbitrary struct value. +func (t *TableClient) AddModelEntity(ctx context.Context, entity interface{}) (*TableInsertEntityResponse, *runtime.ResponseError) { + entmap, err := toMap(entity) + if err != nil { + return nil, azcore.NewResponseError(err, nil).(*runtime.ResponseError) + } + resp, err := t.client.InsertEntity(ctx, t.Name, &TableInsertEntityOptions{TableEntityProperties: *entmap, ResponsePreference: ResponseFormatReturnNoContent.ToPtr()}, &QueryOptions{}) + if err == nil { + insertResp := resp.(TableInsertEntityResponse) + return &insertResp, nil + } else { + return nil, convertErr(err) + } +} + +func (t *TableClient) DeleteEntity(ctx context.Context, partitionKey string, rowKey string, etag string) (TableDeleteEntityResponse, error) { + return t.client.DeleteEntity(ctx, t.Name, partitionKey, rowKey, etag, nil, &QueryOptions{}) +} + +// UpdateEntity updates the specified table entity if it exists. +// If updateMode is Replace, the entity will be replaced. +// If updateMode is Merge, the property values present in the specified entity will be merged with the existing entity. +// The response type will be TableEntityMergeResponse if updateMode is Merge and TableEntityUpdateResponse if updateMode is Replace. +func (t *TableClient) UpdateEntity(ctx context.Context, entity map[string]interface{}, etag *string, updateMode TableUpdateMode) (interface{}, error) { + pk := entity[partitionKey].(string) + rk := entity[rowKey].(string) + var ifMatch string = "*" + if etag != nil { + ifMatch = *etag + } + switch updateMode { + case Merge: + return t.client.MergeEntity(ctx, t.Name, pk, rk, &TableMergeEntityOptions{IfMatch: &ifMatch, TableEntityProperties: entity}, &QueryOptions{}) + case Replace: + return t.client.UpdateEntity(ctx, t.Name, pk, rk, &TableUpdateEntityOptions{IfMatch: &ifMatch, TableEntityProperties: entity}, &QueryOptions{}) + } + return nil, errors.New("Invalid TableUpdateMode") +} + +// UpsertEntity replaces the specified table entity if it exists or creates the entity if it does not exist. +// If the entity exists and updateMode is Merge, the property values present in the specified entity will be merged with the existing entity rather than replaced. +// The response type will be TableEntityMergeResponse if updateMode is Merge and TableEntityUpdateResponse if updateMode is Replace. +func (t *TableClient) UpsertEntity(ctx context.Context, entity map[string]interface{}, updateMode TableUpdateMode) (interface{}, error) { + pk := entity[partitionKey].(string) + rk := entity[rowKey].(string) + + switch updateMode { + case Merge: + return t.client.MergeEntity(ctx, t.Name, pk, rk, &TableMergeEntityOptions{TableEntityProperties: entity}, &QueryOptions{}) + case Replace: + return t.client.UpdateEntity(ctx, t.Name, pk, rk, &TableUpdateEntityOptions{TableEntityProperties: entity}, &QueryOptions{}) + } + return nil, errors.New("Invalid TableUpdateMode") +} diff --git a/sdk/tables/aztables/table_client_test.go b/sdk/tables/aztables/table_client_test.go new file mode 100644 index 000000000000..3d07b0cba508 --- /dev/null +++ b/sdk/tables/aztables/table_client_test.go @@ -0,0 +1,489 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package aztables + +import ( + "bytes" + "io/ioutil" + "net/http" + "testing" + "time" + + "github.com/Azure/azure-sdk-for-go/sdk/internal/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/internal/testframework" + "github.com/Azure/azure-sdk-for-go/sdk/internal/uuid" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "github.com/stretchr/testify/suite" +) + +type tableClientLiveTests struct { + suite.Suite + endpointType EndpointType + mode testframework.RecordMode +} + +// Hookup to the testing framework +func TestTableClient_Storage(t *testing.T) { + storage := tableClientLiveTests{endpointType: StorageEndpoint, mode: testframework.Playback /* change to Record to re-record tests */} + suite.Run(t, &storage) +} + +// Hookup to the testing framework +func TestTableClient_Cosmos(t *testing.T) { + cosmos := tableClientLiveTests{endpointType: CosmosEndpoint, mode: testframework.Playback /* change to Record to re-record tests */} + suite.Run(t, &cosmos) +} + +func (s *tableClientLiveTests) TestServiceErrors() { + client, delete := s.init(true) + defer delete() + + // Create a duplicate table to produce an error + _, err := client.Create(ctx) + assert.Equal(s.T(), err.RawResponse().StatusCode, http.StatusConflict) +} + +func (s *tableClientLiveTests) TestCreateTable() { + assert := assert.New(s.T()) + client, delete := s.init(false) + defer delete() + + resp, err := client.Create(ctx) + + assert.Nil(err) + assert.Equal(*resp.TableResponse.TableName, client.Name) +} + +func (s *tableClientLiveTests) TestAddEntity() { + assert := assert.New(s.T()) + client, delete := s.init(true) + defer delete() + + entitiesToCreate := createSimpleEntities(1, "partition") + + _, err := client.AddEntity(ctx, (*entitiesToCreate)[0]) + assert.Nil(err) +} + +func (s *tableClientLiveTests) TestAddComplexEntity() { + assert := assert.New(s.T()) + context := getTestContext(s.T().Name()) + client, delete := s.init(true) + defer delete() + + entitiesToCreate := createComplexEntities(context, 1, "partition") + + for _, e := range *entitiesToCreate { + _, err := client.AddModelEntity(ctx, e) + assert.Nilf(err, getStringFromBody(err)) + } +} + +func (s *tableClientLiveTests) TestDeleteEntity() { + assert := assert.New(s.T()) + client, delete := s.init(true) + defer delete() + + entitiesToCreate := createSimpleEntities(1, "partition") + + _, err := client.AddEntity(ctx, (*entitiesToCreate)[0]) + assert.Nil(err) + _, delErr := client.DeleteEntity(ctx, (*entitiesToCreate)[0][partitionKey].(string), (*entitiesToCreate)[0][rowKey].(string), "*") + assert.Nil(delErr) +} + +func (s *tableClientLiveTests) TestMergeEntity() { + assert := assert.New(s.T()) + client, delete := s.init(true) + defer delete() + + entitiesToCreate := createSimpleEntities(1, "partition") + + _, err := client.AddEntity(ctx, (*entitiesToCreate)[0]) + assert.Nil(err) + + var qResp TableEntityQueryResponseResponse + filter := "RowKey eq '1'" + pager := client.Query(QueryOptions{Filter: &filter}) + for pager.NextPage(ctx) { + qResp = pager.PageResponse() + } + preMerge := qResp.TableEntityQueryResponse.Value[0] + + mergeProp := "MergeProperty" + val := "foo" + var mergeProperty = map[string]interface{}{ + partitionKey: (*entitiesToCreate)[0][partitionKey], + rowKey: (*entitiesToCreate)[0][rowKey], + mergeProp: val, + } + + _, updateErr := client.UpdateEntity(ctx, mergeProperty, nil, Merge) + assert.Nil(updateErr) + + pager = client.Query(QueryOptions{Filter: &filter}) + for pager.NextPage(ctx) { + qResp = pager.PageResponse() + } + postMerge := qResp.TableEntityQueryResponse.Value[0] + + // The merged entity has all its properties + the merged property + assert.Equalf(len(preMerge)+1, len(postMerge), "postMerge should have one more property than preMerge") + assert.Equalf(postMerge[mergeProp], val, "%s property should equal %s", mergeProp, val) +} + +func (s *tableClientLiveTests) TestUpsertEntity() { + assert := assert.New(s.T()) + require := require.New(s.T()) + client, delete := s.init(true) + defer delete() + + entitiesToCreate := createSimpleEntities(1, "partition") + + _, err := client.UpsertEntity(ctx, (*entitiesToCreate)[0], Replace) + require.Nil(err) + + var qResp TableEntityQueryResponseResponse + filter := "RowKey eq '1'" + pager := client.Query(QueryOptions{Filter: &filter}) + for pager.NextPage(ctx) { + qResp = pager.PageResponse() + } + preMerge := qResp.TableEntityQueryResponse.Value[0] + + mergeProp := "MergeProperty" + val := "foo" + var mergeProperty = map[string]interface{}{ + partitionKey: (*entitiesToCreate)[0][partitionKey], + rowKey: (*entitiesToCreate)[0][rowKey], + mergeProp: val, + } + + _, updateErr := client.UpsertEntity(ctx, mergeProperty, Replace) + require.Nil(updateErr) + + pager = client.Query(QueryOptions{Filter: &filter}) + for pager.NextPage(ctx) { + qResp = pager.PageResponse() + } + postMerge := qResp.TableEntityQueryResponse.Value[0] + + // The merged entity has only the standard properties + the merged property + assert.Greater(len(preMerge), len(postMerge), "postMerge should have fewer properties than preMerge") + assert.Equalf(postMerge[mergeProp], val, "%s property should equal %s", mergeProp, val) +} + +func (s *tableClientLiveTests) _TestGetEntity() { + assert := assert.New(s.T()) + require := require.New(s.T()) + client, delete := s.init(true) + defer delete() + + // Add 5 entities + entitiesToCreate := createSimpleEntities(1, "partition") + for _, e := range *entitiesToCreate { + _, err := client.AddEntity(ctx, e) + assert.Nil(err) + } + + resp, err := client.GetEntity(ctx, "partition", "1") + require.Nil(err) + e := resp.Value + _, ok := e[partitionKey].(string) + assert.True(ok) + _, ok = e[rowKey].(string) + assert.True(ok) + _, ok = e[timestamp].(string) + assert.True(ok) + _, ok = e[etagOdata].(string) + assert.True(ok) + _, ok = e["StringProp"].(string) + assert.True(ok) + //TODO: fix when serialization is implemented + _, ok = e["IntProp"].(float64) + assert.True(ok) + _, ok = e["BoolProp"].(bool) + assert.True(ok) +} + +func (s *tableClientLiveTests) TestQuerySimpleEntity() { + assert := assert.New(s.T()) + client, delete := s.init(true) + defer delete() + + // Add 5 entities + entitiesToCreate := createSimpleEntities(5, "partition") + for _, e := range *entitiesToCreate { + _, err := client.AddEntity(ctx, e) + assert.Nil(err) + } + + filter := "RowKey lt '5'" + expectedCount := 4 + var resp TableEntityQueryResponseResponse + pager := client.Query(QueryOptions{Filter: &filter}) + for pager.NextPage(ctx) { + resp = pager.PageResponse() + assert.Equal(len(resp.TableEntityQueryResponse.Value), expectedCount) + } + resp = pager.PageResponse() + assert.Nil(pager.Err()) + for _, e := range resp.TableEntityQueryResponse.Value { + _, ok := e[partitionKey].(string) + assert.True(ok) + _, ok = e[rowKey].(string) + assert.True(ok) + _, ok = e[timestamp].(string) + assert.True(ok) + _, ok = e[etagOdata].(string) + assert.True(ok) + _, ok = e["StringProp"].(string) + assert.True(ok) + //TODO: fix when serialization is implemented + _, ok = e["IntProp"].(float64) + assert.True(ok) + _, ok = e["BoolProp"].(bool) + assert.True(ok) + } +} + +func (s *tableClientLiveTests) TestQueryComplexEntity() { + assert := assert.New(s.T()) + context := getTestContext(s.T().Name()) + client, delete := s.init(true) + defer delete() + + // Add 5 entities + entitiesToCreate := createComplexMapEntities(context, 5, "partition") + for _, e := range *entitiesToCreate { + _, err := client.AddEntity(ctx, e) + assert.Nil(err) + } + + filter := "RowKey lt '5'" + expectedCount := 4 + var resp TableEntityQueryResponseResponse + pager := client.Query(QueryOptions{Filter: &filter}) + for pager.NextPage(ctx) { + resp = pager.PageResponse() + assert.Equal(expectedCount, len(resp.TableEntityQueryResponse.Value)) + } + resp = pager.PageResponse() + assert.Nil(pager.Err()) + for _, e := range resp.TableEntityQueryResponse.Value { + _, ok := e[partitionKey].(string) + assert.True(ok) + _, ok = e[rowKey].(string) + assert.True(ok) + _, ok = e[timestamp].(string) + assert.True(ok) + _, ok = e[etagOdata].(string) + assert.True(ok) + _, ok = e["StringProp"].(string) + assert.True(ok) + //TODO: fix when serialization is implemented + _, ok = e["IntProp"].(float64) + assert.True(ok) + _, ok = e["BoolProp"].(bool) + assert.True(ok) + _, ok = e["SomeBinaryProperty"].([]byte) + assert.True(ok) + _, ok = e["SomeDateProperty"].(time.Time) + assert.True(ok) + _, ok = e["SomeDoubleProperty0"].(float64) + assert.True(ok) + _, ok = e["SomeDoubleProperty1"].(float64) + assert.True(ok) + _, ok = e["SomeGuidProperty"].(uuid.UUID) + assert.True(ok) + _, ok = e["SomeInt64Property"].(int64) + assert.True(ok) + //TODO: fix when serialization is implemented + _, ok = e["SomeIntProperty"].(float64) + assert.True(ok) + _, ok = e["SomeStringProperty"].(string) + assert.True(ok) + } +} + +func (s *tableClientLiveTests) TestBatchAdd() { + assert := assert.New(s.T()) + context := getTestContext(s.T().Name()) + client, delete := s.init(true) + defer delete() + + entitiesToCreate := createComplexMapEntities(context, 10, "partition") + batch := make([]TableTransactionAction, 10) + + for i, e := range *entitiesToCreate { + batch[i] = TableTransactionAction{ActionType: Add, Entity: e} + } + + resp, err := client.submitTransactionInternal(ctx, &batch, context.recording.UUID(), context.recording.UUID(), nil) + assert.Nil(err) + for i := 0; i < len(*resp.TransactionResponses); i++ { + r := (*resp.TransactionResponses)[i] + assert.Equal(r.StatusCode, http.StatusNoContent) + } +} + +func (s *tableClientLiveTests) TestBatchMixed() { + assert := assert.New(s.T()) + require := require.New(s.T()) + context := getTestContext(s.T().Name()) + client, delete := s.init(true) + defer delete() + + entitiesToCreate := createComplexMapEntities(context, 5, "partition") + batch := make([]TableTransactionAction, 3) + + // Add the first 3 entities. + for i := range batch { + batch[i] = TableTransactionAction{ActionType: Add, Entity: (*entitiesToCreate)[i]} + } + + resp, err := client.submitTransactionInternal(ctx, &batch, context.recording.UUID(), context.recording.UUID(), nil) + require.Nil(err) + for i := 0; i < len(*resp.TransactionResponses); i++ { + r := (*resp.TransactionResponses)[i] + assert.Equal(http.StatusNoContent, r.StatusCode) + } + + var qResp TableEntityQueryResponseResponse + filter := "RowKey eq '1'" + pager := client.Query(QueryOptions{Filter: &filter}) + for pager.NextPage(ctx) { + qResp = pager.PageResponse() + } + preMerge := qResp.TableEntityQueryResponse.Value[0] + + // create a new batch slice. + batch = make([]TableTransactionAction, 5) + + // create a merge action for the first added entity + mergeProp := "MergeProperty" + val := "foo" + var mergeProperty = map[string]interface{}{ + partitionKey: (*entitiesToCreate)[0][partitionKey], + rowKey: (*entitiesToCreate)[0][rowKey], + mergeProp: val, + } + batch[0] = TableTransactionAction{ActionType: UpdateMerge, Entity: mergeProperty, ETag: (*resp.TransactionResponses)[0].Header.Get(etag)} + + // create a delete action for the second added entity + batch[1] = TableTransactionAction{ActionType: Delete, Entity: (*entitiesToCreate)[1]} + + // create an upsert action to replace the third added entity with a new value + replaceProp := "ReplaceProperty" + var replaceProperties = map[string]interface{}{ + partitionKey: (*entitiesToCreate)[2][partitionKey], + rowKey: (*entitiesToCreate)[2][rowKey], + replaceProp: val, + } + batch[2] = TableTransactionAction{ActionType: UpsertReplace, Entity: replaceProperties} + + // Add the remaining 2 entities. + batch[3] = TableTransactionAction{ActionType: Add, Entity: (*entitiesToCreate)[3]} + batch[4] = TableTransactionAction{ActionType: Add, Entity: (*entitiesToCreate)[4]} + + //batch = batch[1:] + + resp, err = client.submitTransactionInternal(ctx, &batch, context.recording.UUID(), context.recording.UUID(), nil) + require.Nil(err) + + for i := 0; i < len(*resp.TransactionResponses); i++ { + r := (*resp.TransactionResponses)[i] + assert.Equal(http.StatusNoContent, r.StatusCode) + + } + + pager = client.Query(QueryOptions{Filter: &filter}) + for pager.NextPage(ctx) { + qResp = pager.PageResponse() + } + postMerge := qResp.TableEntityQueryResponse.Value[0] + + // The merged entity has all its properties + the merged property + assert.Equalf(len(preMerge)+1, len(postMerge), "postMerge should have one more property than preMerge") + assert.Equalf(postMerge[mergeProp], val, "%s property should equal %s", mergeProp, val) +} + +func (s *tableClientLiveTests) TestBatchError() { + assert := assert.New(s.T()) + require := require.New(s.T()) + context := getTestContext(s.T().Name()) + client, delete := s.init(true) + defer delete() + + entitiesToCreate := createComplexMapEntities(context, 3, "partition") + + // Create the batch. + batch := make([]TableTransactionAction, 0, 3) + + // Sending an empty batch throws. + _, err := client.submitTransactionInternal(ctx, &batch, context.recording.UUID(), context.recording.UUID(), nil) + assert.NotNil(err) + assert.Equal(error_empty_transaction, err.Error()) + + // Add the last entity to the table prior to adding it as part of the batch to cause a batch failure. + client.AddEntity(ctx, (*entitiesToCreate)[2]) + + // Add the entities to the batch + for i := 0; i < cap(batch); i++ { + batch = append(batch, TableTransactionAction{ActionType: Add, Entity: (*entitiesToCreate)[i]}) + } + + resp, err := client.submitTransactionInternal(ctx, &batch, context.recording.UUID(), context.recording.UUID(), nil) + assert.NotNil(err) + te, ok := err.(*TableTransactionError) + require.Truef(ok, "err should be of type TableTransactionError") + assert.Equal("EntityAlreadyExists", te.OdataError.Code) + assert.Equal(2, te.FailedEntityIndex) + assert.Equal(http.StatusConflict, (*resp.TransactionResponses)[0].StatusCode) +} + +// setup the test environment +func (s *tableClientLiveTests) BeforeTest(suite string, test string) { + recordedTestSetup(s.T(), s.T().Name(), s.endpointType, s.mode) +} + +// teardown the test context +func (s *tableClientLiveTests) AfterTest(suite string, test string) { + recordedTestTeardown(s.T().Name()) +} + +func (s *tableClientLiveTests) init(doCreate bool) (*TableClient, func()) { + assert := assert.New(s.T()) + context := getTestContext(s.T().Name()) + tableName, _ := getTableName(context) + client := context.client.GetTableClient(tableName) + if doCreate { + _, err := client.Create(ctx) + if err != nil { + assert.FailNow(getStringFromBody(err)) + } + } + return client, func() { + client.Delete(ctx) + } +} + +func getStringFromBody(e *runtime.ResponseError) string { + if e == nil { + return "Error is nil" + } + r := e.RawResponse() + body := bytes.Buffer{} + b := r.Body + b.Close() + if b != nil { + _, err := body.ReadFrom(b) + if err != nil { + return "" + } + b = ioutil.NopCloser(&body) + } + return body.String() +} diff --git a/sdk/tables/aztables/table_pagers.go b/sdk/tables/aztables/table_pagers.go new file mode 100644 index 000000000000..d73de8a8f5c3 --- /dev/null +++ b/sdk/tables/aztables/table_pagers.go @@ -0,0 +1,442 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package aztables + +import ( + "context" + "encoding/base64" + "errors" + "fmt" + "net/http" + "reflect" + "strconv" + "strings" + "time" + + "github.com/Azure/azure-sdk-for-go/sdk/internal/uuid" +) + +// Pager for Table entity queries +type TableEntityQueryResponsePager interface { + // NextPage returns true if the pager advanced to the next page. + // Returns false if there are no more pages or an error occurred. + NextPage(context.Context) bool + + // Page returns the current TableQueryResponseResponse. + PageResponse() TableEntityQueryResponseResponse + + // Err returns the last error encountered while paging. + Err() error +} + +type StructEntityQueryResponsePager interface { + NextPage(context.Context) bool + PageResponse() StructQueryResponseResponse + Err() error +} + +type StructQueryResponseResponse struct { + // ClientRequestID contains the information returned from the x-ms-client-request-id header response. + ClientRequestID *string + + // Date contains the information returned from the Date header response. + Date *time.Time + + // ETag contains the information returned from the ETag header response. + ETag *string + + // RawResponse contains the underlying HTTP response. + RawResponse *http.Response + + // RequestID contains the information returned from the x-ms-request-id header response. + RequestID *string + + // The properties for the table entity query response. + StructQueryResponse *StructQueryResponse + + // Version contains the information returned from the x-ms-version header response. + Version *string + + // XMSContinuationNextPartitionKey contains the information returned from the x-ms-continuation-NextPartitionKey header response. + XMSContinuationNextPartitionKey *string + + // XMSContinuationNextRowKey contains the information returned from the x-ms-continuation-NextRowKey header response. + XMSContinuationNextRowKey *string +} + +type StructQueryResponse struct { + // The metadata response of the table. + OdataMetadata *string `json:"odata.metadata,omitempty"` + + // List of table entities. + Value *[]interface{} `json:"value,omitempty"` +} + +type tableEntityQueryResponsePager struct { + tableClient *TableClient + current *TableEntityQueryResponseResponse + tableQueryOptions *TableQueryEntitiesOptions + queryOptions *QueryOptions + err error +} + +func (p *tableEntityQueryResponsePager) NextPage(ctx context.Context) bool { + if p.err != nil || (p.current != nil && p.current.XMSContinuationNextPartitionKey == nil && p.current.XMSContinuationNextRowKey == nil) { + return false + } + var resp TableEntityQueryResponseResponse + resp, p.err = p.tableClient.client.QueryEntities(ctx, p.tableClient.Name, p.tableQueryOptions, p.queryOptions) + castAndRemoveAnnotationsSlice(&resp.TableEntityQueryResponse.Value) + p.current = &resp + p.tableQueryOptions.NextPartitionKey = resp.XMSContinuationNextPartitionKey + p.tableQueryOptions.NextRowKey = resp.XMSContinuationNextRowKey + return p.err == nil && resp.TableEntityQueryResponse.Value != nil && len(resp.TableEntityQueryResponse.Value) > 0 +} + +func (p *tableEntityQueryResponsePager) PageResponse() TableEntityQueryResponseResponse { + return *p.current +} + +func (p *tableEntityQueryResponsePager) Err() error { + return p.err +} + +type structQueryResponsePager struct { + mapper FromMapper + tableClient *TableClient + current *StructQueryResponseResponse + tableQueryOptions *TableQueryEntitiesOptions + queryOptions *QueryOptions + err error +} + +func (p *structQueryResponsePager) NextPage(ctx context.Context) bool { + if p.err != nil || (p.current != nil && p.current.XMSContinuationNextPartitionKey == nil && p.current.XMSContinuationNextRowKey == nil) { + return false + } + var resp TableEntityQueryResponseResponse + resp, p.err = p.tableClient.client.QueryEntities(ctx, p.tableClient.Name, p.tableQueryOptions, p.queryOptions) + castAndRemoveAnnotationsSlice(&resp.TableEntityQueryResponse.Value) + //p.current = &resp + r := make([]interface{}, 0, len(resp.TableEntityQueryResponse.Value)) + for _, e := range resp.TableEntityQueryResponse.Value { + r = append(r, p.mapper.FromMap(&e)) + } + p.current = &StructQueryResponseResponse{StructQueryResponse: &StructQueryResponse{Value: &r}} + p.tableQueryOptions.NextPartitionKey = resp.XMSContinuationNextPartitionKey + p.tableQueryOptions.NextRowKey = resp.XMSContinuationNextRowKey + return p.err == nil && resp.TableEntityQueryResponse.Value != nil && len(resp.TableEntityQueryResponse.Value) > 0 +} + +func (p *structQueryResponsePager) PageResponse() StructQueryResponseResponse { + return *p.current +} + +func (p *structQueryResponsePager) Err() error { + return p.err +} + +// Pager for Table Queries +type TableQueryResponsePager interface { + // NextPage returns true if the pager advanced to the next page. + // Returns false if there are no more pages or an error occurred. + NextPage(context.Context) bool + + // Page returns the current TableQueryResponseResponse. + PageResponse() TableQueryResponseResponse + + // Err returns the last error encountered while paging. + Err() error +} + +type FromMapper interface { + FromMap(e *map[string]interface{}) interface{} +} + +type tableQueryResponsePager struct { + client *tableClient + current *TableQueryResponseResponse + tableQueryOptions *TableQueryOptions + queryOptions *QueryOptions + err error +} + +func (p *tableQueryResponsePager) NextPage(ctx context.Context) bool { + if p.err != nil || (p.current != nil && p.current.XMSContinuationNextTableName == nil) { + return false + } + var resp TableQueryResponseResponse + resp, p.err = p.client.Query(ctx, p.tableQueryOptions, p.queryOptions) + p.current = &resp + p.tableQueryOptions.NextTableName = resp.XMSContinuationNextTableName + return p.err == nil && resp.TableQueryResponse.Value != nil && len(resp.TableQueryResponse.Value) > 0 +} + +func (p *tableQueryResponsePager) PageResponse() TableQueryResponseResponse { + return *p.current +} + +func (p *tableQueryResponsePager) Err() error { + return p.err +} + +func castAndRemoveAnnotationsSlice(entities *[]map[string]interface{}) { + for _, e := range *entities { + castAndRemoveAnnotations(&e) + } +} + +// TODO: The default behavior of json.Unmarshal is to deserialize all json numbers as Float64. +// This can be a problem for table entities which store float and int differently +func castAndRemoveAnnotations(entity *map[string]interface{}) error { + //value := (*entity)["value"].([]interface{})[0].(map[string]interface{}) + value := *entity + for k, v := range value { + + iSuffix := strings.Index(k, OdataType) + if iSuffix > 0 { + // Get the name of the property that this odataType key describes. + valueKey := k[0:iSuffix] + // get the string value of the value at the valueKey + valAsString := value[valueKey].(string) + + switch v { + case edmBinary: + value[valueKey] = []byte(valAsString) + case edmDateTime: + t, err := time.Parse(ISO8601, valAsString) + if err != nil { + return err + } + value[valueKey] = t + case edmGuid: + value[valueKey] = uuid.Parse(valAsString) + case edmInt64: + i, err := strconv.ParseInt(valAsString, 10, 64) + if err != nil { + return err + } + value[valueKey] = i + default: + return errors.New(fmt.Sprintf("unsupported annotation found: %s", k)) + } + // remove the annotation key + delete(value, k) + } + } + return nil +} + +func toOdataAnnotatedDictionary(entity *map[string]interface{}) error { + entMap := *entity + for k, v := range entMap { + t := reflect.TypeOf(v) + Switch: + switch t.Kind() { + case reflect.Slice, reflect.Array: + if GetTypeArray(v) != reflect.TypeOf(byte(0)) { + return errors.New("arrays and slices must be of type byte") + } + // check if this is a uuid + uuidVal, ok := v.(uuid.UUID) + if ok { + entMap[k] = uuidVal.String() + entMap[odataType(k)] = edmGuid + } else { + entMap[odataType(k)] = edmBinary + b := v.([]byte) + entMap[k] = base64.StdEncoding.EncodeToString(b) + } + case reflect.Struct: + switch tn := reflect.TypeOf(v).String(); tn { + case "time.Time": + entMap[odataType(k)] = edmDateTime + time := v.(time.Time) + entMap[k] = time.UTC().Format(ISO8601) + continue + default: + return errors.New(fmt.Sprintf("Invalid struct for entity field '%s' of type '%s'", k, tn)) + } + case reflect.Float32, reflect.Float64: + entMap[odataType(k)] = edmDouble + case reflect.Int64: + entMap[odataType(k)] = edmInt64 + i64 := v.(int64) + entMap[k] = strconv.FormatInt(i64, 10) + case reflect.Ptr: + if v == nil { + // if the pointer is nil, ignore it. + continue + } + // follow the pointer to the type and re-run the switch + t = reflect.ValueOf(v).Elem().Type() + goto Switch + } + } + return nil +} + +func toMap(ent interface{}) (*map[string]interface{}, error) { + var s reflect.Value + if reflect.ValueOf(ent).Kind() == reflect.Ptr { + s = reflect.ValueOf(ent).Elem() + } else { + s = reflect.ValueOf(&ent).Elem().Elem() + } + typeOfT := s.Type() + nf := s.NumField() + entMap := make(map[string]interface{}, nf) + + for i := 0; i < nf; i++ { + v := s.Field(i) + Switch: + f := typeOfT.Field(i) + name := f.Name + if name == etag || name == timestamp { + // we do not need to serialize ETag or TimeStamp + continue + } + // add odata annotations for the types that require it. + switch k := v.Type().Kind(); k { + case reflect.Array, reflect.Slice: + if GetTypeArray(v.Interface()) != reflect.TypeOf(byte(0)) { + return nil, errors.New("arrays and slices must be of type byte") + } + // check if this is a uuid field as decorated by a tag + if _, ok := f.Tag.Lookup("uuid"); ok { + entMap[odataType(name)] = edmGuid + u := v.Interface().([16]byte) + var uu uuid.UUID = u + entMap[name] = uu.String() + continue + } else { + entMap[odataType(name)] = edmBinary + b := v.Interface().([]byte) + entMap[name] = base64.StdEncoding.EncodeToString(b) + continue + } + case reflect.Struct: + switch tn := v.Type().String(); tn { + case "time.Time": + entMap[odataType(name)] = edmDateTime + time := v.Interface().(time.Time) + entMap[name] = time.UTC().Format(ISO8601) + continue + default: + return nil, errors.New(fmt.Sprintf("Invalid struct for entity field '%s' of type '%s'", typeOfT.Field(i).Name, tn)) + } + case reflect.Float32, reflect.Float64: + entMap[odataType(name)] = edmDouble + case reflect.Int64: + entMap[odataType(name)] = edmInt64 + i64 := v.Interface().(int64) + entMap[name] = strconv.FormatInt(i64, 10) + continue + case reflect.Ptr: + if v.IsNil() { + // if the pointer is nil, ignore it. + continue + } + // follow the pointer to the type and re-run the switch + v = v.Elem() + goto Switch + + // typeOfT.Field(i).Name, f.Type(), f.Interface()) + } + entMap[name] = v.Interface() + } + return &entMap, nil +} + +func fromMap(src interface{}, fmap *map[string]int, m *map[string]interface{}) (interface{}, error) { + tt := reflect.TypeOf(src) + srcVal := reflect.New(tt).Elem() + + for k, v := range *m { + // skip if this is an OData type descriptor + iSuffix := strings.Index(k, OdataType) + if iSuffix > 0 { + continue + } + // fetch the Field index by property name from the field map + fIndex := (*fmap)[k] + // Get the Value for the Field + val := srcVal.Field(fIndex) + Switch: + switch val.Kind() { + case reflect.String: + val.SetString(v.(string)) + case reflect.Float64: + val.SetFloat(v.(float64)) + case reflect.Int: + val.SetInt(int64(v.(float64))) + case reflect.Int64: + i64, err := strconv.ParseInt(v.(string), 10, 64) + if err != nil { + return nil, err + } + val.SetInt(i64) + case reflect.Struct: + switch tn := val.Type().String(); tn { + case "time.Time": + t, err := time.Parse(ISO8601, v.(string)) + if err != nil { + return nil, err + } + val.Set(reflect.ValueOf(t)) + } + case reflect.Ptr: + if val.IsNil() { + // populate the nil pointer with it's element type and re-run the type evaluation + val.Set(reflect.New(val.Type().Elem())) + val = val.Elem() + goto Switch + } + case reflect.Array, reflect.Map, reflect.Slice: + if GetTypeArray(val.Interface()) != reflect.TypeOf(byte(0)) { + return nil, errors.New("arrays and slices must be of type byte") + } + // // check if this is a uuid field as decorated by a tag + if _, ok := tt.Field(fIndex).Tag.Lookup("uuid"); ok { + u := uuid.Parse(v.(string)) + val.Set(reflect.ValueOf(u)) + } else { + b, err := base64.StdEncoding.DecodeString(v.(string)) + if err != nil { + return nil, err + } + val.SetBytes(b) + } + } + } + return srcVal.Interface(), nil +} + +// getTypeValueMap - builds a map of Field names to their Field index for the given interface{} +func getTypeValueMap(i interface{}) *map[string]int { + tt := reflect.TypeOf(complexEntity{}) + nf := tt.NumField() + fmap := make(map[string]int) + // build a map of field types + for i := 0; i < nf; i++ { + f := tt.Field(i) + fmap[f.Name] = i + if f.Name == etag { + fmap[etagOdata] = i + } + } + return &fmap +} + +func odataType(n string) string { + var b strings.Builder + b.Grow(len(n) + len(OdataType)) + b.WriteString(n) + b.WriteString(OdataType) + return b.String() +} + +func GetTypeArray(arr interface{}) reflect.Type { + return reflect.TypeOf(arr).Elem() +} diff --git a/sdk/tables/aztables/table_pagers_test.go b/sdk/tables/aztables/table_pagers_test.go new file mode 100644 index 000000000000..92b06191ad4f --- /dev/null +++ b/sdk/tables/aztables/table_pagers_test.go @@ -0,0 +1,244 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package aztables + +import ( + "encoding/base64" + "encoding/json" + "fmt" + "io" + "io/ioutil" + "math" + "net/http" + "strconv" + "strings" + "testing" + "time" + + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/internal/uuid" + "github.com/stretchr/testify/assert" +) + +type pagerTests struct{} + +func TestCastAndRemoveAnnotations(t *testing.T) { + assert := assert.New(t) + + r := &http.Response{Body: closerFromString(complexPayload)} + resp := azcore.Response{Response: r} + + var val map[string]interface{} + err := resp.UnmarshalAsJSON(&val) + assert.Nil(err) + err = castAndRemoveAnnotations(&val) + assert.Nil(err) + // assert all odata annotations are removed. + for k := range val { + assert.NotContains(k, OdataType) + } + + assert.IsType(time.Now(), val["SomeDateProperty"]) + assert.IsType([]byte{}, val["SomeBinaryProperty"]) + assert.IsType(float64(0), val["SomeDoubleProperty0"]) + // TODO: fix this + // assert.IsType(int(0), (*entity)["SomeIntProperty"]) +} + +func TestToOdataAnnotatedDictionary(t *testing.T) { + assert := assert.New(t) + + var val = createComplexEntityMap() + err := toOdataAnnotatedDictionary(&val) + assert.Nil(err) + // assert all odata annotations are removed. + for k := range odataHintProps { + _, ok := val[k] + assert.Truef(ok, fmt.Sprintf("map does not contain %s", k)) + iSuffix := strings.Index(k, OdataType) + if iSuffix > 0 { + // Get the name of the property that this odataType key describes. + valueKey := k[0:iSuffix] + if !strings.Contains(valueKey, "SomeDoubleProperty") { + assert.IsTypef("", val[valueKey], fmt.Sprintf("should be type string %s", valueKey)) + } + } + _, ok = val[odataType(k)] + assert.Truef(ok, fmt.Sprintf("map does not contain %s", odataType(k))) + } +} + +func BenchmarkUnMarshal_AsJson_CastAndRemove_Map(b *testing.B) { + assert := assert.New(b) + b.ReportAllocs() + bt := []byte(complexPayload) + for i := 0; i < b.N; i++ { + var val = make(map[string]interface{}) + json.Unmarshal(bt, &val) + castAndRemoveAnnotations(&val) + assert.Equal("somePartition", val["PartitionKey"]) + } +} + +func BenchmarkUnMarshal_FromMap_Entity(b *testing.B) { + assert := assert.New(b) + fmap := getTypeValueMap(complexEntity{}) + bt := []byte(complexPayload) + for i := 0; i < b.N; i++ { + var val = make(map[string]interface{}) + json.Unmarshal(bt, &val) + result, err := fromMap(complexEntity{}, fmap, &val) + assert.Nil(err) + ent := result.(complexEntity) + assert.Equal("somePartition", ent.PartitionKey) + } +} + +func BenchmarkMarshal_Entity_ToMap_ToOdataDict_Map(b *testing.B) { + ent := createComplexEntity() + for i := 0; i < b.N; i++ { + m, _ := toMap(ent) + toOdataAnnotatedDictionary(m) + json.Marshal(m) + } +} + +func BenchmarkMarshal_Map_ToOdataDict_Map(b *testing.B) { + ent := createComplexEntityMap() + for i := 0; i < b.N; i++ { + toOdataAnnotatedDictionary(&ent) + json.Marshal(ent) + } +} + +func TestToMap(t *testing.T) { + assert := assert.New(t) + + ent := createComplexEntity() + + entMap, err := toMap(ent) + assert.Nil(err) + + // Validate that we have all the @odata.type properties for types []byte, int64, float64, time.Time, and uuid + for k, v := range odataHintProps { + vv, ok := (*entMap)[odataType(k)] + assert.Truef(ok, "Should have found map key of name '%s'", odataType(k)) + assert.Equal(v, vv) + } + + // validate all the types were properly casted / converted + assert.Equal(ent.PartitionKey, (*entMap)["PartitionKey"]) + assert.Equal(ent.RowKey, (*entMap)["RowKey"]) + assert.Equal(base64.StdEncoding.EncodeToString(ent.SomeBinaryProperty), string((*entMap)["SomeBinaryProperty"].(string))) + ts, _ := time.Parse(ISO8601, (*entMap)["SomeDateProperty"].(string)) + assert.Equal(ent.SomeDateProperty.UTC().Format(ISO8601), ts.Format(ISO8601)) + assert.Equal(ent.SomeDoubleProperty0, (*entMap)["SomeDoubleProperty0"]) + assert.Equal(ent.SomeDoubleProperty1, (*entMap)["SomeDoubleProperty1"]) + var u uuid.UUID = ent.SomeGuidProperty + assert.Equal(u.String(), (*entMap)["SomeGuidProperty"].(string)) + assert.Equal(strconv.FormatInt(ent.SomeInt64Property, 10), (*entMap)["SomeInt64Property"].(string)) + assert.Equal(ent.SomeIntProperty, (*entMap)["SomeIntProperty"]) + assert.Equal(ent.SomeStringProperty, (*entMap)["SomeStringProperty"]) + assert.Equal(*ent.SomePtrStringProperty, (*entMap)["SomePtrStringProperty"]) +} + +func TestEntitySerialization(t *testing.T) { + assert := assert.New(t) + + ent := createComplexEntity() + + b, err := json.Marshal(ent) + assert.Nil(err) + assert.NotEmpty(b) + s := string(b) + //assert.FailNow(s) + assert.NotEmpty(s) +} + +func TestDeserializeFromMap(t *testing.T) { + assert := assert.New(t) + + expected := createComplexEntity() + bt := []byte(complexPayload) + var val = make(map[string]interface{}) + json.Unmarshal(bt, &val) + result, err := fromMap(complexEntity{}, getTypeValueMap(complexEntity{}), &val) + assert.Nil(err) + ent := result.(complexEntity) + assert.EqualValues(expected, ent) +} + +func createComplexEntity() complexEntity { + sp := "some pointer to string" + t, _ := time.Parse(ISO8601, "2021-03-23T18:29:15.9686039Z") + t2, _ := time.Parse(ISO8601, "2020-01-01T01:02:00Z") + b, _ := base64.StdEncoding.DecodeString("AQIDBAU=") + var e = complexEntity{ + PartitionKey: "somePartition", + ETag: "W/\"datetime'2021-04-05T05%3A02%3A40.7371784Z'\"", + RowKey: "01", + Timestamp: t, + SomeBinaryProperty: b, + SomeDateProperty: t2, + SomeDoubleProperty0: float64(1.0), + SomeDoubleProperty1: float64(1.5), + SomeGuidProperty: uuid.Parse("0d391d16-97f1-4b9a-be68-4cc871f90001"), + SomeInt64Property: int64(math.MaxInt64), + SomeIntProperty: 42, + SomeStringProperty: "This is table entity number 01", + SomePtrStringProperty: &sp} + return e +} + +func createComplexEntityMap() map[string]interface{} { + sp := "some pointer to string" + t, _ := time.Parse(ISO8601, "2021-03-23T18:29:15.9686039Z") + t2, _ := time.Parse(ISO8601, "2020-01-01T01:02:00Z") + b, _ := base64.StdEncoding.DecodeString("AQIDBAU=") + var e = map[string]interface{}{ + "PartitionKey": "somePartition", + "ETag": "W/\"datetime'2021-04-05T05%3A02%3A40.7371784Z'\"", + "RowKey": "01", + "Timestamp": t, + "SomeBinaryProperty": b, + "SomeDateProperty": t2, + "SomeDoubleProperty0": float64(1.0), + "SomeDoubleProperty1": float64(1.5), + "SomeGuidProperty": uuid.Parse("0d391d16-97f1-4b9a-be68-4cc871f90001"), + "SomeInt64Property": int64(math.MaxInt64), + "SomeIntProperty": 42, + "SomeStringProperty": "This is table entity number 01", + "SomePtrStringProperty": &sp} + return e +} + +func closerFromString(content string) io.ReadCloser { + return ioutil.NopCloser(strings.NewReader(content)) +} + +var odataHintProps = map[string]string{ + "SomeBinaryProperty": edmBinary, + "SomeDateProperty": edmDateTime, + "SomeDoubleProperty0": edmDouble, + "SomeDoubleProperty1": edmDouble, + "SomeGuidProperty": edmGuid, + "SomeInt64Property": edmInt64} + +var complexPayload = "{\"odata.etag\": \"W/\\\"datetime'2021-04-05T05%3A02%3A40.7371784Z'\\\"\"," + + "\"PartitionKey\": \"somePartition\"," + + "\"RowKey\": \"01\"," + + "\"Timestamp\": \"2021-03-23T18:29:15.9686039Z\"," + + "\"SomeBinaryProperty@odata.type\": \"Edm.Binary\"," + + "\"SomeBinaryProperty\": \"AQIDBAU=\"," + + "\"SomeDateProperty@odata.type\": \"Edm.DateTime\"," + + "\"SomeDateProperty\": \"2020-01-01T01:02:00Z\"," + + "\"SomeDoubleProperty0\": 1.0," + + "\"SomeDoubleProperty1\": 1.5," + + "\"SomeGuidProperty@odata.type\": \"Edm.Guid\"," + + "\"SomeGuidProperty\": \"0d391d16-97f1-4b9a-be68-4cc871f90001\"," + + "\"SomeInt64Property@odata.type\": \"Edm.Int64\"," + + "\"SomeInt64Property\": \"" + strconv.FormatInt(math.MaxInt64, 10) + "\"," + + "\"SomeIntProperty\": 42," + + "\"SomeStringProperty\": \"This is table entity number 01\"," + + "\"SomePtrStringProperty\": \"some pointer to string\" }" diff --git a/sdk/tables/aztables/table_service_client.go b/sdk/tables/aztables/table_service_client.go new file mode 100644 index 000000000000..63dc45093e93 --- /dev/null +++ b/sdk/tables/aztables/table_service_client.go @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package aztables + +import ( + "context" + "errors" + "strings" + + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/internal/runtime" +) + +const ( + LegacyCosmosTableDomain = ".table.cosmosdb." + CosmosTableDomain = ".table.cosmos." +) + +// A TableServiceClient represents a URL to an Azure Storage blob; the blob may be a block blob, append blob, or page blob. +type TableServiceClient struct { + client *tableClient + service *serviceClient + cred SharedKeyCredential +} + +// NewTableServiceClient creates a TableClient object using the specified URL and request policy pipeline. +func NewTableServiceClient(serviceURL string, cred azcore.Credential, options *TableClientOptions) (*TableServiceClient, error) { + conOptions := options.getConnectionOptions() + if isCosmosEndpoint(serviceURL) { + conOptions.PerCallPolicies = []azcore.Policy{CosmosPatchTransformPolicy{}} + } + con := newConnection(serviceURL, cred, conOptions) + c, _ := cred.(*SharedKeyCredential) + return &TableServiceClient{client: &tableClient{con}, service: &serviceClient{con}, cred: *c}, nil +} + +// Gets a TableClient affinitzed to the specified table name and initialized with the same serviceURL and credentials as this TableServiceClient +func (t *TableServiceClient) GetTableClient(tableName string) *TableClient { + return &TableClient{client: t.client, cred: t.cred, Name: tableName, service: t} +} + +// Creates a table with the specified name +func (t *TableServiceClient) Create(ctx context.Context, name string) (*TableResponseResponse, *runtime.ResponseError) { + var r *TableResponseResponse = nil + resp, err := t.client.Create(ctx, TableProperties{&name}, new(TableCreateOptions), new(QueryOptions)) + if err == nil { + tableResp := resp.(TableResponseResponse) + r = &tableResp + } + return r, convertErr(err) +} + +// Deletes a table by name +func (t *TableServiceClient) Delete(ctx context.Context, name string) (*TableDeleteResponse, *runtime.ResponseError) { + resp, err := t.client.Delete(ctx, name, nil) + return &resp, convertErr(err) +} + +// Queries the tables using the specified QueryOptions +func (t *TableServiceClient) QueryTables(queryOptions QueryOptions) TableQueryResponsePager { + return &tableQueryResponsePager{client: t.client, queryOptions: &queryOptions, tableQueryOptions: new(TableQueryOptions)} +} + +func isCosmosEndpoint(url string) bool { + isCosmosEmulator := strings.Index(url, "localhost") >= 0 && strings.Index(url, "8902") >= 0 + return isCosmosEmulator || + strings.Index(url, CosmosTableDomain) >= 0 || + strings.Index(url, LegacyCosmosTableDomain) >= 0 +} + +func convertErr(err error) *runtime.ResponseError { + var e *runtime.ResponseError + if err == nil || !errors.As(err, &e) { + return nil + } else { + return e + } +} diff --git a/sdk/tables/aztables/table_service_client_test.go b/sdk/tables/aztables/table_service_client_test.go new file mode 100644 index 000000000000..a1f728789ebe --- /dev/null +++ b/sdk/tables/aztables/table_service_client_test.go @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package aztables + +import ( + "fmt" + "net/http" + "testing" + + "github.com/Azure/azure-sdk-for-go/sdk/internal/testframework" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/suite" +) + +type tableServiceClientLiveTests struct { + suite.Suite + endpointType EndpointType + mode testframework.RecordMode +} + +// Hookup to the testing framework +func TestServiceClient_Storage(t *testing.T) { + storage := tableServiceClientLiveTests{endpointType: StorageEndpoint, mode: testframework.Playback /* change to Record to re-record tests */} + suite.Run(t, &storage) +} + +// Hookup to the testing framework +func TestServiceClient_Cosmos(t *testing.T) { + cosmos := tableServiceClientLiveTests{endpointType: CosmosEndpoint, mode: testframework.Playback /* change to Record to re-record tests */} + suite.Run(t, &cosmos) +} + +func (s *tableServiceClientLiveTests) TestServiceErrors() { + assert := assert.New(s.T()) + context := getTestContext(s.T().Name()) + tableName, err := getTableName(context) + + _, err = context.client.Create(ctx, tableName) + defer context.client.Delete(ctx, tableName) + assert.Nil(err) + + // Create a duplicate table to produce an error + _, svcErr := context.client.Create(ctx, tableName) + assert.Equal(svcErr.RawResponse().StatusCode, http.StatusConflict) +} + +func (s *tableServiceClientLiveTests) TestCreateTable() { + assert := assert.New(s.T()) + context := getTestContext(s.T().Name()) + tableName, err := getTableName(context) + + resp, err := context.client.Create(ctx, tableName) + defer context.client.Delete(ctx, tableName) + + assert.Nil(err) + assert.Equal(*resp.TableResponse.TableName, tableName) +} + +func (s *tableServiceClientLiveTests) TestQueryTable() { + assert := assert.New(s.T()) + context := getTestContext(s.T().Name()) + tableCount := 5 + tableNames := make([]string, tableCount) + prefix1 := "zzza" + prefix2 := "zzzb" + + defer cleanupTables(context, &tableNames) + //create 10 tables with our exected prefix and 1 with a different prefix + for i := 0; i < tableCount; i++ { + if i < (tableCount - 1) { + name, _ := getTableName(context, prefix1) + tableNames[i] = name + } else { + name, _ := getTableName(context, prefix2) + tableNames[i] = name + } + _, err := context.client.Create(ctx, tableNames[i]) + assert.Nil(err) + } + + // Query for tables with no pagination. The filter should exclude one table from the results + filter := fmt.Sprintf("TableName ge '%s' and TableName lt '%s'", prefix1, prefix2) + pager := context.client.QueryTables(QueryOptions{Filter: &filter}) + + resultCount := 0 + for pager.NextPage(ctx) { + resp := pager.PageResponse() + resultCount += len(resp.TableQueryResponse.Value) + } + + assert.Nil(pager.Err()) + assert.Equal(resultCount, tableCount-1) + + // Query for tables with pagination + top := int32(2) + pager = context.client.QueryTables(QueryOptions{Filter: &filter, Top: &top}) + + resultCount = 0 + pageCount := 0 + for pager.NextPage(ctx) { + resp := pager.PageResponse() + resultCount += len(resp.TableQueryResponse.Value) + pageCount++ + } + + assert.Nil(pager.Err()) + assert.Equal(resultCount, tableCount-1) + assert.Equal(pageCount, int(top)) +} + +func (s *tableServiceClientLiveTests) BeforeTest(suite string, test string) { + // setup the test environment + recordedTestSetup(s.T(), s.T().Name(), s.endpointType, s.mode) +} + +func (s *tableServiceClientLiveTests) AfterTest(suite string, test string) { + // teardown the test context + recordedTestTeardown(s.T().Name()) +} diff --git a/sdk/tables/aztables/table_transactional_batch.go b/sdk/tables/aztables/table_transactional_batch.go new file mode 100644 index 000000000000..f208725c3a39 --- /dev/null +++ b/sdk/tables/aztables/table_transactional_batch.go @@ -0,0 +1,346 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package aztables + +import ( + "bufio" + "bytes" + "context" + "encoding/json" + "errors" + "fmt" + "io" + "io/ioutil" + "mime/multipart" + "net/http" + "net/textproto" + "sort" + "strconv" + "strings" + "time" + + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/internal/uuid" +) + +type TableTransactionActionType string + +const ( + Add TableTransactionActionType = "add" + UpdateMerge TableTransactionActionType = "updatemerge" + UpdateReplace TableTransactionActionType = "updatereplace" + Delete TableTransactionActionType = "delete" + UpsertMerge TableTransactionActionType = "upsertmerge" + UpsertReplace TableTransactionActionType = "upsertreplace" +) + +const ( + headerContentType = "Content-Type" + headerContentTransferEncoding = "Content-Transfer-Encoding" + error_empty_transaction = "Transaction cannot be empty." +) + +type OdataErrorMessage struct { + Lang string `json:"lang"` + Value string `json:"value"` +} + +type OdataError struct { + Code string `json:"code"` + Message OdataErrorMessage `json:"message"` +} + +type TableTransactionError struct { + OdataError OdataError `json:"odata.error"` + FailedEntityIndex int +} + +func (e *TableTransactionError) Error() string { + return fmt.Sprintf("Code: %s, Message: %s", e.OdataError.Code, e.OdataError.Message.Value) +} + +type TableTransactionAction struct { + ActionType TableTransactionActionType + Entity map[string]interface{} + ETag string +} + +type TableTransactionResponse struct { + // ClientRequestID contains the information returned from the x-ms-client-request-id header response. + ClientRequestID *string + + // Date contains the information returned from the Date header response. + Date *time.Time + + // PreferenceApplied contains the information returned from the Preference-Applied header response. + PreferenceApplied *string + + // RawResponse contains the underlying HTTP response. + RawResponse *http.Response + + // RequestID contains the information returned from the x-ms-request-id header response. + RequestID *string + + // The response for a single table. + TransactionResponses *[]azcore.Response + + // Version contains the information returned from the x-ms-version header response. + Version *string + + // ContentType contains the information returned from the Content-Type header response. + ContentType *string +} + +type TableSubmitTransactionOptions struct { + RequestID *string +} + +var defaultChangesetHeaders = map[string]string{ + "Accept": "application/json;odata=minimalmetadata", + "Content-Type": "application/json", + "Prefer": "return-no-content", +} + +// SubmitTransaction submits the table transactional batch according to the slice of TableTransactionActions provided. +func (t *TableClient) SubmitTransaction(ctx context.Context, transactionActions []TableTransactionAction, tableSubmitTransactionOptions *TableSubmitTransactionOptions) (TableTransactionResponse, error) { + return t.submitTransactionInternal(ctx, &transactionActions, uuid.New(), uuid.New(), tableSubmitTransactionOptions) +} + +// submitTransactionInternal is the internal implementation for SubmitTransaction. It allows for explicit configuration of the batch and changeset UUID values for testing. +func (t *TableClient) submitTransactionInternal(ctx context.Context, transactionActions *[]TableTransactionAction, batchUuid uuid.UUID, changesetUuid uuid.UUID, tableSubmitTransactionOptions *TableSubmitTransactionOptions) (TableTransactionResponse, error) { + if len(*transactionActions) == 0 { + return TableTransactionResponse{}, errors.New(error_empty_transaction) + } + changesetBoundary := fmt.Sprintf("changeset_%s", changesetUuid.String()) + changeSetBody, err := t.generateChangesetBody(changesetBoundary, transactionActions) + if err != nil { + return TableTransactionResponse{}, err + } + req, err := azcore.NewRequest(ctx, http.MethodPost, azcore.JoinPaths(t.client.con.Endpoint(), "$batch")) + if err != nil { + return TableTransactionResponse{}, err + } + req.Header.Set("x-ms-version", "2019-02-02") + if tableSubmitTransactionOptions != nil && tableSubmitTransactionOptions.RequestID != nil { + req.Header.Set("x-ms-client-request-id", *tableSubmitTransactionOptions.RequestID) + } + req.Header.Set("DataServiceVersion", "3.0") + req.Header.Set("Accept", string(OdataMetadataFormatApplicationJSONOdataMinimalmetadata)) + + boundary := fmt.Sprintf("batch_%s", batchUuid.String()) + body := new(bytes.Buffer) + writer := multipart.NewWriter(body) + writer.SetBoundary(boundary) + h := make(textproto.MIMEHeader) + h.Set(headerContentType, fmt.Sprintf("multipart/mixed; boundary=%s", changesetBoundary)) + batchWriter, err := writer.CreatePart(h) + if err != nil { + return TableTransactionResponse{}, err + } + batchWriter.Write(changeSetBody.Bytes()) + writer.Close() + + req.SetBody(azcore.NopCloser(bytes.NewReader(body.Bytes())), fmt.Sprintf("multipart/mixed; boundary=%s", boundary)) + + resp, err := t.client.con.Pipeline().Do(req) + if err != nil { + return TableTransactionResponse{}, err + } + + transactionResponse, err := buildTransactionResponse(req, resp, len(*transactionActions)) + if err != nil { + return transactionResponse, err + } + + if !resp.HasStatusCode(http.StatusAccepted, http.StatusNoContent) { + return TableTransactionResponse{}, azcore.NewResponseError(err, resp.Response) + } + return transactionResponse, nil +} + +func buildTransactionResponse(req *azcore.Request, resp *azcore.Response, itemCount int) (TableTransactionResponse, error) { + innerResponses := make([]azcore.Response, itemCount) + result := TableTransactionResponse{RawResponse: resp.Response, TransactionResponses: &innerResponses} + + if val := resp.Header.Get("x-ms-client-request-id"); val != "" { + result.ClientRequestID = &val + } + if val := resp.Header.Get("x-ms-request-id"); val != "" { + result.RequestID = &val + } + if val := resp.Header.Get("x-ms-version"); val != "" { + result.Version = &val + } + if val := resp.Header.Get("Date"); val != "" { + date, err := time.Parse(time.RFC1123, val) + if err != nil { + return TableTransactionResponse{}, err + } + result.Date = &date + } + + if val := resp.Header.Get("Preference-Applied"); val != "" { + result.PreferenceApplied = &val + } + if val := resp.Header.Get("Content-Type"); val != "" { + result.ContentType = &val + } + + bytesBody, err := ioutil.ReadAll(resp.Body) + if err != nil { + return TableTransactionResponse{}, err + } + reader := bytes.NewReader(bytesBody) + if bytes.IndexByte(bytesBody, '{') == 0 { + // This is a failure and the body is json + return TableTransactionResponse{}, newTableTransactionError(bytesBody) + } + outerBoundary := getBoundaryName(bytesBody) + mpReader := multipart.NewReader(reader, outerBoundary) + outerPart, err := mpReader.NextPart() + innerBytes, err := ioutil.ReadAll(outerPart) + innerBoundary := getBoundaryName(innerBytes) + reader = bytes.NewReader(innerBytes) + mpReader = multipart.NewReader(reader, innerBoundary) + i := 0 + innerPart, err := mpReader.NextPart() + for ; err == nil; innerPart, err = mpReader.NextPart() { + part, err := ioutil.ReadAll(innerPart) + if err != nil { + break + } + r, err := http.ReadResponse(bufio.NewReader(bytes.NewBuffer(part)), req.Request) + if err != nil { + return TableTransactionResponse{}, err + } + if r.StatusCode >= 400 { + errorBody, err := ioutil.ReadAll(r.Body) + if err != nil { + return TableTransactionResponse{}, err + } else { + innerResponses = []azcore.Response{{Response: r}} + return result, newTableTransactionError(errorBody) + } + } + innerResponses[i] = azcore.Response{Response: r} + i++ + } + + return result, nil +} + +func getBoundaryName(bytesBody []byte) string { + end := bytes.Index(bytesBody, []byte("\n")) + if end > 0 && bytesBody[end-1] == '\r' { + end -= 1 + } + return string(bytesBody[2:end]) +} + +// newTableTransactionError handles the SubmitTransaction error response. +func newTableTransactionError(errorBody []byte) error { + oe := TableTransactionError{} + if err := json.Unmarshal(errorBody, &oe); err == nil { + if i := strings.Index(oe.OdataError.Message.Value, ":"); i > 0 { + if val, err := strconv.Atoi(oe.OdataError.Message.Value[0:i]); err == nil { + oe.FailedEntityIndex = val + } + } + return &oe + } + return errors.New("Unknown error.") +} + +// generateChangesetBody generates the individual changesets for the various operations within the batch request. +// There is a changeset for Insert, Delete, Merge etc. +func (t *TableClient) generateChangesetBody(changesetBoundary string, transactionActions *[]TableTransactionAction) (*bytes.Buffer, error) { + + body := new(bytes.Buffer) + writer := multipart.NewWriter(body) + writer.SetBoundary(changesetBoundary) + + for _, be := range *transactionActions { + err := t.generateEntitySubset(&be, writer) + if err != nil { + return nil, err + } + } + + writer.Close() + return body, nil +} + +// generateEntitySubset generates body payload for particular batch entity +func (t *TableClient) generateEntitySubset(transactionAction *TableTransactionAction, writer *multipart.Writer) error { + + h := make(textproto.MIMEHeader) + h.Set(headerContentTransferEncoding, "binary") + h.Set(headerContentType, "application/http") + qo := &QueryOptions{Format: OdataMetadataFormatApplicationJSONOdataMinimalmetadata.ToPtr()} + + operationWriter, err := writer.CreatePart(h) + if err != nil { + return err + } + var req *azcore.Request + var entity map[string]interface{} = transactionAction.Entity + + if _, ok := entity[partitionKey]; !ok { + return fmt.Errorf("entity properties must contain a %s property", partitionKey) + } + if _, ok := entity[rowKey]; !ok { + return fmt.Errorf("entity properties must contain a %s property", rowKey) + } + // Consider empty ETags as '*' + if len(transactionAction.ETag) == 0 { + transactionAction.ETag = "*" + } + + switch transactionAction.ActionType { + case Delete: + req, err = t.client.deleteEntityCreateRequest(ctx, t.Name, entity[partitionKey].(string), entity[rowKey].(string), transactionAction.ETag, &TableDeleteEntityOptions{}, qo) + case Add: + toOdataAnnotatedDictionary(&entity) + req, err = t.client.insertEntityCreateRequest(ctx, t.Name, &TableInsertEntityOptions{TableEntityProperties: entity, ResponsePreference: ResponseFormatReturnNoContent.ToPtr()}, qo) + case UpdateMerge: + fallthrough + case UpsertMerge: + toOdataAnnotatedDictionary(&entity) + opts := &TableMergeEntityOptions{TableEntityProperties: entity} + if len(transactionAction.ETag) > 0 { + opts.IfMatch = &transactionAction.ETag + } + req, err = t.client.mergeEntityCreateRequest(ctx, t.Name, entity[partitionKey].(string), entity[rowKey].(string), opts, qo) + if isCosmosEndpoint(t.client.con.Endpoint()) { + transformPatchToCosmosPost(req) + } + case UpdateReplace: + fallthrough + case UpsertReplace: + toOdataAnnotatedDictionary(&entity) + req, err = t.client.updateEntityCreateRequest(ctx, t.Name, entity[partitionKey].(string), entity[rowKey].(string), &TableUpdateEntityOptions{TableEntityProperties: entity, IfMatch: &transactionAction.ETag}, qo) + } + + urlAndVerb := fmt.Sprintf("%s %s HTTP/1.1\r\n", req.Method, req.URL) + operationWriter.Write([]byte(urlAndVerb)) + writeHeaders(req.Header, &operationWriter) + operationWriter.Write([]byte("\r\n")) // additional \r\n is needed per changeset separating the "headers" and the body. + if req.Body != nil { + io.Copy(operationWriter, req.Body) + } + + return nil +} + +func writeHeaders(h http.Header, writer *io.Writer) { + // This way it is guaranteed the headers will be written in a sorted order + var keys []string + for k := range h { + keys = append(keys, k) + } + sort.Strings(keys) + for _, k := range keys { + (*writer).Write([]byte(fmt.Sprintf("%s: %s\r\n", k, h.Get(k)))) + } +} diff --git a/sdk/tables/aztables/zc_tableConstants.go b/sdk/tables/aztables/zc_tableConstants.go new file mode 100644 index 000000000000..69d77706df20 --- /dev/null +++ b/sdk/tables/aztables/zc_tableConstants.go @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package aztables + +const ( + timestamp = "Timestamp" + partitionKey = "PartitionKey" + rowKey = "RowKey" + etagOdata = "odata.etag" + etag = "ETag" + odataMetadata = "odata.metadata" + OdataType = "@odata.type" + edmBinary = "Edm.Binary" + edmBoolean = "Emd.Boolean" + edmDateTime = "Edm.DateTime" + edmDouble = "Edm.Double" + edmGuid = "Edm.Guid" + edmInt32 = "Edm.Int32" + edmInt64 = "Edm.Int64" + edmString = "Edm.String" + ISO8601 = "2006-01-02T15:04:05.9999999Z" +) diff --git a/sdk/tables/aztables/zt_tableRecordedTests.go b/sdk/tables/aztables/zt_tableRecordedTests.go new file mode 100644 index 000000000000..1141e42396fc --- /dev/null +++ b/sdk/tables/aztables/zt_tableRecordedTests.go @@ -0,0 +1,203 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package aztables + +import ( + "context" + "fmt" + "math" + "testing" + "time" + + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/internal/testframework" + "github.com/stretchr/testify/assert" +) + +type tablesRecordedTests struct{} + +type testContext struct { + recording *testframework.Recording + client *TableServiceClient + context *testframework.TestContext +} + +const ( + storageAccountNameEnvVar = "TABLES_STORAGE_ACCOUNT_NAME" + cosmosAccountNameEnnVar = "TABLES_COSMOS_ACCOUNT_NAME" + storageEndpointSuffixEnvVar = "STORAGE_ENDPOINT_SUFFIX" + cosmosEndpointSuffixEnvVar = "COSMOS_TABLES_ENDPOINT_SUFFIX" + storageAccountKeyEnvVar = "TABLES_PRIMARY_STORAGE_ACCOUNT_KEY" + cosmosAccountKeyEnvVar = "TABLES_PRIMARY_COSMOS_ACCOUNT_KEY" + tableNamePrefix = "gotable" + DefaultStorageSuffix = "core.windows.net" + DefaultCosmosSuffix = "cosmos.azure.com" +) + +type EndpointType string + +const ( + StorageEndpoint EndpointType = "storage" + CosmosEndpoint EndpointType = "cosmos" +) + +var ctx = context.Background() +var clientsMap map[string]*testContext = make(map[string]*testContext) + +func storageURI(accountName string, endpointSuffix string) string { + return "https://" + accountName + ".table." + endpointSuffix +} + +func cosmosURI(accountName string, endpointSuffix string) string { + return "https://" + accountName + ".table." + endpointSuffix +} + +// create the test specific TableClient and wire it up to recordings +func recordedTestSetup(t *testing.T, testName string, endpointType EndpointType, mode testframework.RecordMode) { + var accountName string + var suffix string + var cred *SharedKeyCredential + var secret string + var uri string + assert := assert.New(t) + + // init the test framework + context := testframework.NewTestContext(func(msg string) { assert.FailNow(msg) }, func(msg string) { t.Log(msg) }, func() string { return testName }) + recording, err := testframework.NewRecording(context, mode) + assert.Nil(err) + + if endpointType == StorageEndpoint { + accountName, err = recording.GetRecordedVariable(storageAccountNameEnvVar, testframework.Default) + suffix = recording.GetOptionalRecordedVariable(storageEndpointSuffixEnvVar, DefaultStorageSuffix, testframework.Default) + secret, err = recording.GetRecordedVariable(storageAccountKeyEnvVar, testframework.Secret_Base64String) + cred, _ = NewSharedKeyCredential(accountName, secret) + uri = storageURI(accountName, suffix) + } else { + accountName, err = recording.GetRecordedVariable(cosmosAccountNameEnnVar, testframework.Default) + suffix = recording.GetOptionalRecordedVariable(cosmosEndpointSuffixEnvVar, DefaultCosmosSuffix, testframework.Default) + secret, err = recording.GetRecordedVariable(cosmosAccountKeyEnvVar, testframework.Secret_Base64String) + cred, _ = NewSharedKeyCredential(accountName, secret) + uri = cosmosURI(accountName, suffix) + } + + client, err := NewTableServiceClient(uri, cred, &TableClientOptions{HTTPClient: recording, Retry: azcore.RetryOptions{MaxRetries: -1}}) + assert.Nil(err) + clientsMap[testName] = &testContext{client: client, recording: recording, context: &context} +} + +func recordedTestTeardown(key string) { + context, ok := clientsMap[key] + if ok && !(*context.context).IsFailed() { + context.recording.Stop() + } +} + +// cleans up the specified tables. If tables is nil, all tables will be deleted +func cleanupTables(context *testContext, tables *[]string) { + c := context.client + if tables == nil { + pager := c.QueryTables(QueryOptions{}) + for pager.NextPage(ctx) { + for _, t := range pager.PageResponse().TableQueryResponse.Value { + c.Delete(ctx, *t.TableName) + } + } + } else { + for _, t := range *tables { + c.Delete(ctx, t) + } + } +} + +func getTestContext(key string) *testContext { + return clientsMap[key] +} + +func getTableName(context *testContext, prefix ...string) (string, error) { + if len(prefix) == 0 { + return context.recording.GenerateAlphaNumericID(tableNamePrefix, 20, true) + } else { + return context.recording.GenerateAlphaNumericID(prefix[0], 20, true) + } +} + +func createSimpleEntities(count int, pk string) *[]map[string]interface{} { + result := make([]map[string]interface{}, count) + + for i := 1; i <= count; i++ { + var e = map[string]interface{}{ + partitionKey: pk, + rowKey: fmt.Sprint(i), + "StringProp": fmt.Sprintf("some string %d", i), + "IntProp": i, + "BoolProp": true, + } + result[i-1] = e + } + return &result +} + +func createComplexMapEntities(context *testContext, count int, pk string) *[]map[string]interface{} { + result := make([]map[string]interface{}, count) + + for i := 1; i <= count; i++ { + var e = map[string]interface{}{ + partitionKey: pk, + rowKey: fmt.Sprint(i), + "StringProp": fmt.Sprintf("some string %d", i), + "IntProp": i, + "BoolProp": true, + "SomeBinaryProperty": []byte("some bytes"), + "SomeDateProperty": context.recording.Now(), + "SomeDoubleProperty0": float64(1), + "SomeDoubleProperty1": float64(1.2345), + "SomeGuidProperty": context.recording.UUID(), + "SomeInt64Property": (int64)(math.MaxInt64), + "SomeIntProperty": 42, + "SomeStringProperty": "some string", + } + result[i-1] = e + } + return &result +} + +func createComplexEntities(context *testContext, count int, pk string) *[]complexEntity { + result := make([]complexEntity, count) + + sp := "some pointer to string" + for i := 1; i <= count; i++ { + var e = complexEntity{ + PartitionKey: "partition", + ETag: "*", + RowKey: "row", + Timestamp: context.recording.Now(), + SomeBinaryProperty: []byte("some bytes"), + SomeDateProperty: context.recording.Now(), + SomeDoubleProperty0: float64(1), + SomeDoubleProperty1: float64(1.2345), + SomeGuidProperty: context.recording.UUID(), + SomeInt64Property: math.MaxInt64, + SomeIntProperty: 42, + SomeStringProperty: "some string", + SomePtrStringProperty: &sp} + result[i-1] = e + } + return &result +} + +type complexEntity struct { + ETag string + PartitionKey string + RowKey string + Timestamp time.Time + SomeBinaryProperty []byte + SomeDateProperty time.Time + SomeDoubleProperty0 float64 + SomeDoubleProperty1 float64 + SomeGuidProperty [16]byte `uuid:""` + SomeInt64Property int64 + SomeIntProperty int + SomeStringProperty string + SomePtrStringProperty *string +} diff --git a/sdk/tables/aztables/zt_test.go b/sdk/tables/aztables/zt_test.go deleted file mode 100644 index c9e649bca203..000000000000 --- a/sdk/tables/aztables/zt_test.go +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package aztables - -import ( - "context" - "errors" - "fmt" - "os" - "testing" - "time" - - chk "gopkg.in/check.v1" -) - -// For testing docs, see: https://labix.org/gocheck -// To test a specific test: go test -check.f MyTestSuite - -// Hookup to the testing framework -func Test(t *testing.T) { chk.TestingT(t) } - -type aztestsSuite struct{} - -var _ = chk.Suite(&aztestsSuite{}) - -const ( - storageAccountNameEnvVar = "TABLES_STORAGE_ACCOUNT_NAME" - cosmosAccountNameEnnVar = "TABLES_COSMOS_ACCOUNT_NAME" - accountKeyEnvVar = "TABLES_PRIMARY_STORAGE_ACCOUNT_KEY" - storageEndpointSuffixEnvVar = "STORAGE_ENDPOINT_SUFFIX" - cosmosEndpointSuffixEnvVar = "COSMOS_TABLES_ENDPOINT_SUFFIX" - storageAccountKeyEnvVar = "TABLES_PRIMARY_STORAGE_ACCOUNT_KEY" - cosmosAccountKeyEnvVar = "TABLES_PRIMARY_COSMOS_ACCOUNT_KEY" - tableNamePrefix = "gotable" - DefaultStorageSuffix = "core.windows.net" - DefaultCosmosSuffix = "cosmos.azure.com" -) - -type EndpointType string - -const ( - StorageEndpoint EndpointType = "storage" - CosmosEndpoint EndpointType = "cosmos" -) - -var ctx = context.Background() - -func getRequiredEnv(name string) string { - env, ok := os.LookupEnv(name) - if ok { - return env - } else { - panic("Required environment variable not set: " + name) - } -} - -func storageURI() string { - return "https://" + storageAccountName() + ".table." + storageEndpointSuffix() -} - -func cosmosURI() string { - return "https://" + cosmosAccountName() + ".table" + cosmosAccountName() -} - -func storageAccountName() string { - return getRequiredEnv(storageAccountNameEnvVar) -} - -func cosmosAccountName() string { - return getRequiredEnv(cosmosAccountNameEnnVar) -} - -func cosmosAccountKey() string { - return getRequiredEnv(cosmosAccountKeyEnvVar) -} - -func storageAccountKey() string { - return getRequiredEnv(storageAccountKeyEnvVar) -} - -func storageEndpointSuffix() string { - suffix, ok := os.LookupEnv(storageEndpointSuffixEnvVar) - if ok { - return suffix - } else { - return DefaultStorageSuffix - } -} - -func cosmosEndpointSuffix() string { - suffix, ok := os.LookupEnv(cosmosEndpointSuffix()) - if ok { - return suffix - } else { - return DefaultCosmosSuffix - } -} - -func createTableClient(endpointType EndpointType) (*TableClient, error) { - if endpointType == StorageEndpoint { - storageCred, _ := NewSharedKeyCredential(storageAccountName(), storageAccountKey()) - return NewTableClient(storageURI(), storageCred, nil) - } else { - cosmosCred, _ := NewSharedKeyCredential(cosmosAccountName(), cosmosAccountKey()) - return NewTableClient(cosmosURI(), cosmosCred, nil) - } -} - -func getGenericCredential(accountType string) (*SharedKeyCredential, error) { - - accountName, accountKey := getRequiredEnv(storageAccountNameEnvVar), getRequiredEnv(accountKeyEnvVar) - if accountName == "" || accountKey == "" { - return nil, errors.New(storageAccountNameEnvVar + " and/or " + accountKeyEnvVar + " environment variables not specified.") - } - return NewSharedKeyCredential(accountName, accountKey) -} - -func generateName() string { - currentTime := time.Now() - name := fmt.Sprintf("%s%d%d%d", tableNamePrefix, currentTime.Minute(), currentTime.Second(), currentTime.Nanosecond()) - return name -} diff --git a/sdk/tables/aztables/zz_generated_connection.go b/sdk/tables/aztables/zz_generated_connection.go index 325fa053b1bd..188d3c30126a 100644 --- a/sdk/tables/aztables/zz_generated_connection.go +++ b/sdk/tables/aztables/zz_generated_connection.go @@ -12,8 +12,8 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" ) -const scope = "foo" -const telemetryInfo = "azsdk-go-tables/" +const scope = "none" +const telemetryInfo = "azsdk-go-aztables/" // connectionOptions contains configuration settings for the connection's pipeline. // All zero-value fields will be initialized with their default values. @@ -26,6 +26,12 @@ type connectionOptions struct { Telemetry azcore.TelemetryOptions // Logging configures the built-in logging policy behavior. Logging azcore.LogOptions + // PerCallPolicies contains custom policies to inject into the pipeline. + // Each policy is executed once per request. + PerCallPolicies []azcore.Policy + // PerRetryPolicies contains custom policies to inject into the pipeline. + // Each policy is executed once per request, and for each retry request. + PerRetryPolicies []azcore.Policy } func (c *connectionOptions) telemetryOptions() *azcore.TelemetryOptions { @@ -49,17 +55,15 @@ func newConnection(endpoint string, cred azcore.Credential, options *connectionO if options == nil { options = &connectionOptions{} } - p := azcore.NewPipeline(options.HTTPClient, + policies := []azcore.Policy{ azcore.NewTelemetryPolicy(options.telemetryOptions()), - azcore.NewRetryPolicy(&options.Retry), - cred.AuthenticationPolicy(azcore.AuthenticationPolicyOptions{Options: azcore.TokenRequestOptions{Scopes: []string{scope}}}), - azcore.NewLogPolicy(&options.Logging)) - return newConnectionWithPipeline(endpoint, p) -} - -// newConnectionWithPipeline creates an instance of the connection type with the specified endpoint and pipeline. -func newConnectionWithPipeline(endpoint string, p azcore.Pipeline) *connection { - return &connection{u: endpoint, p: p} + } + policies = append(policies, options.PerCallPolicies...) + policies = append(policies, azcore.NewRetryPolicy(&options.Retry)) + policies = append(policies, options.PerRetryPolicies...) + policies = append(policies, cred.AuthenticationPolicy(azcore.AuthenticationPolicyOptions{Options: azcore.TokenRequestOptions{Scopes: []string{scope}}})) + policies = append(policies, azcore.NewLogPolicy(&options.Logging)) + return &connection{u: endpoint, p: azcore.NewPipeline(options.HTTPClient, policies...)} } // Endpoint returns the connection's endpoint. diff --git a/sdk/tables/aztables/zz_generated_constants.go b/sdk/tables/aztables/zz_generated_constants.go index f117e6efcbe9..2b5930e1e9bc 100644 --- a/sdk/tables/aztables/zz_generated_constants.go +++ b/sdk/tables/aztables/zz_generated_constants.go @@ -25,7 +25,7 @@ func PossibleGeoReplicationStatusTypeValues() []GeoReplicationStatusType { } } -// ToPtr() returns a *GeoReplicationStatusType pointing to the current value. +// ToPtr returns a *GeoReplicationStatusType pointing to the current value. func (c GeoReplicationStatusType) ToPtr() *GeoReplicationStatusType { return &c } @@ -47,7 +47,7 @@ func PossibleOdataMetadataFormatValues() []OdataMetadataFormat { } } -// ToPtr() returns a *OdataMetadataFormat pointing to the current value. +// ToPtr returns a *OdataMetadataFormat pointing to the current value. func (c OdataMetadataFormat) ToPtr() *OdataMetadataFormat { return &c } @@ -67,7 +67,7 @@ func PossibleResponseFormatValues() []ResponseFormat { } } -// ToPtr() returns a *ResponseFormat pointing to the current value. +// ToPtr returns a *ResponseFormat pointing to the current value. func (c ResponseFormat) ToPtr() *ResponseFormat { return &c } diff --git a/sdk/tables/aztables/zz_generated_models.go b/sdk/tables/aztables/zz_generated_models.go index 00bbe531834a..d855a4d87bd4 100644 --- a/sdk/tables/aztables/zz_generated_models.go +++ b/sdk/tables/aztables/zz_generated_models.go @@ -8,21 +8,22 @@ package aztables import ( + "encoding/json" "encoding/xml" - "fmt" - "net/http" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "reflect" "time" ) -// An Access policy. +// AccessPolicy - An Access policy. type AccessPolicy struct { - // The datetime that the policy expires. + // REQUIRED; The datetime that the policy expires. Expiry *time.Time `xml:"Expiry"` - // The permissions for the acl policy. + // REQUIRED; The permissions for the acl policy. Permission *string `xml:"Permission"` - // The start datetime from which the policy is active. + // REQUIRED; The start datetime from which the policy is active. Start *time.Time `xml:"Start"` } @@ -59,37 +60,37 @@ func (a *AccessPolicy) UnmarshalXML(d *xml.Decoder, start xml.StartElement) erro return nil } -// CORS is an HTTP feature that enables a web application running under one domain to access resources in another domain. Web browsers implement a security -// restriction known as same-origin policy that +// CorsRule - CORS is an HTTP feature that enables a web application running under one domain to access resources in another domain. Web browsers implement +// a security restriction known as same-origin policy that // prevents a web page from calling APIs in a different domain; CORS provides a secure way to allow one domain (the origin domain) to call APIs in another // domain. type CorsRule struct { - // The request headers that the origin domain may specify on the CORS request. + // REQUIRED; The request headers that the origin domain may specify on the CORS request. AllowedHeaders *string `xml:"AllowedHeaders"` - // The methods (HTTP request verbs) that the origin domain may use for a CORS request. (comma separated) + // REQUIRED; The methods (HTTP request verbs) that the origin domain may use for a CORS request. (comma separated) AllowedMethods *string `xml:"AllowedMethods"` - // The origin domains that are permitted to make a request against the service via CORS. The origin domain is the domain from which the request originates. - // Note that the origin must be an exact + // REQUIRED; The origin domains that are permitted to make a request against the service via CORS. The origin domain is the domain from which the request + // originates. Note that the origin must be an exact // case-sensitive match with the origin that the user age sends to the service. You can also use the wildcard character '*' to allow all origin domains // to make requests via CORS. AllowedOrigins *string `xml:"AllowedOrigins"` - // The response headers that may be sent in the response to the CORS request and exposed by the browser to the request issuer. + // REQUIRED; The response headers that may be sent in the response to the CORS request and exposed by the browser to the request issuer. ExposedHeaders *string `xml:"ExposedHeaders"` - // The maximum amount time that a browser should cache the preflight OPTIONS request. + // REQUIRED; The maximum amount time that a browser should cache the preflight OPTIONS request. MaxAgeInSeconds *int32 `xml:"MaxAgeInSeconds"` } type GeoReplication struct { - // A GMT date/time value, to the second. All primary writes preceding this value are guaranteed to be available for read operations at the secondary. Primary - // writes after this point in time may or may + // REQUIRED; A GMT date/time value, to the second. All primary writes preceding this value are guaranteed to be available for read operations at the secondary. + // Primary writes after this point in time may or may // not be available for reads. LastSyncTime *time.Time `xml:"LastSyncTime"` - // The status of the secondary location. + // REQUIRED; The status of the secondary location. Status *GeoReplicationStatusType `xml:"Status"` } @@ -122,56 +123,26 @@ func (g *GeoReplication) UnmarshalXML(d *xml.Decoder, start xml.StartElement) er return nil } -// Azure Analytics Logging settings. +// Logging - Azure Analytics Logging settings. type Logging struct { - // Indicates whether all delete requests should be logged. + // REQUIRED; Indicates whether all delete requests should be logged. Delete *bool `xml:"Delete"` - // Indicates whether all read requests should be logged. + // REQUIRED; Indicates whether all read requests should be logged. Read *bool `xml:"Read"` - // The retention policy. + // REQUIRED; The retention policy. RetentionPolicy *RetentionPolicy `xml:"RetentionPolicy"` - // The version of Analytics to configure. + // REQUIRED; The version of Analytics to configure. Version *string `xml:"Version"` - // Indicates whether all write requests should be logged. + // REQUIRED; Indicates whether all write requests should be logged. Write *bool `xml:"Write"` } -// MapOfInterfaceResponse is the response envelope for operations that return a map[string]interface{} type. -type MapOfInterfaceResponse struct { - // ClientRequestID contains the information returned from the x-ms-client-request-id header response. - ClientRequestID *string - - // ContentType contains the information returned from the Content-Type header response. - ContentType *string - - // Date contains the information returned from the Date header response. - Date *time.Time - - // ETag contains the information returned from the ETag header response. - ETag *string - - // PreferenceApplied contains the information returned from the Preference-Applied header response. - PreferenceApplied *string - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response - - // RequestID contains the information returned from the x-ms-request-id header response. - RequestID *string - - // The other properties of the table entity. - Value map[string]interface{} - - // Version contains the information returned from the x-ms-version header response. - Version *string -} - type Metrics struct { - // Indicates whether metrics are enabled for the Table service. + // REQUIRED; Indicates whether metrics are enabled for the Table service. Enabled *bool `xml:"Enabled"` // Indicates whether metrics should generate summary statistics for called API operations. @@ -196,13 +167,13 @@ type QueryOptions struct { Top *int32 } -// The retention policy. +// RetentionPolicy - The retention policy. type RetentionPolicy struct { + // REQUIRED; Indicates whether a retention policy is enabled for the service. + Enabled *bool `xml:"Enabled"` + // Indicates the number of days that metrics or logging or soft-deleted data should be retained. All data older than this value will be deleted. Days *int32 `xml:"Days"` - - // Indicates whether a retention policy is enabled for the service. - Enabled *bool `xml:"Enabled"` } // ServiceGetPropertiesOptions contains the optional parameters for the Service.GetProperties method. @@ -229,51 +200,15 @@ type ServiceSetPropertiesOptions struct { Timeout *int32 } -// ServiceSetPropertiesResponse contains the response from method Service.SetProperties. -type ServiceSetPropertiesResponse struct { - // ClientRequestID contains the information returned from the x-ms-client-request-id header response. - ClientRequestID *string - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response - - // RequestID contains the information returned from the x-ms-request-id header response. - RequestID *string - - // Version contains the information returned from the x-ms-version header response. - Version *string -} - -// A signed identifier. +// SignedIdentifier - A signed identifier. type SignedIdentifier struct { - // The access policy. + // REQUIRED; The access policy. AccessPolicy *AccessPolicy `xml:"AccessPolicy"` - // A unique id. + // REQUIRED; A unique id. ID *string `xml:"Id"` } -// SignedIdentifierArrayResponse is the response envelope for operations that return a []SignedIdentifier type. -type SignedIdentifierArrayResponse struct { - // ClientRequestID contains the information returned from the x-ms-client-request-id header response. - ClientRequestID *string `xml:"ClientRequestID"` - - // Date contains the information returned from the Date header response. - Date *time.Time `xml:"Date"` - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response - - // RequestID contains the information returned from the x-ms-request-id header response. - RequestID *string `xml:"RequestID"` - - // A collection of signed identifiers. - SignedIdentifiers []SignedIdentifier `xml:"SignedIdentifier"` - - // Version contains the information returned from the x-ms-version header response. - Version *string `xml:"Version"` -} - // TableCreateOptions contains the optional parameters for the Table.Create method. type TableCreateOptions struct { // Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when analytics logging is enabled. @@ -282,27 +217,6 @@ type TableCreateOptions struct { ResponsePreference *ResponseFormat } -// TableCreateResponse contains the response from method Table.Create. -type TableCreateResponse struct { - // ClientRequestID contains the information returned from the x-ms-client-request-id header response. - ClientRequestID *string - - // Date contains the information returned from the Date header response. - Date *time.Time - - // PreferenceApplied contains the information returned from the Preference-Applied header response. - PreferenceApplied *string - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response - - // RequestID contains the information returned from the x-ms-request-id header response. - RequestID *string - - // Version contains the information returned from the x-ms-version header response. - Version *string -} - // TableDeleteEntityOptions contains the optional parameters for the Table.DeleteEntity method. type TableDeleteEntityOptions struct { // Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when analytics logging is enabled. @@ -311,85 +225,27 @@ type TableDeleteEntityOptions struct { Timeout *int32 } -// TableDeleteEntityResponse contains the response from method Table.DeleteEntity. -type TableDeleteEntityResponse struct { - // ClientRequestID contains the information returned from the x-ms-client-request-id header response. - ClientRequestID *string - - // Date contains the information returned from the Date header response. - Date *time.Time - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response - - // RequestID contains the information returned from the x-ms-request-id header response. - RequestID *string - - // Version contains the information returned from the x-ms-version header response. - Version *string -} - // TableDeleteOptions contains the optional parameters for the Table.Delete method. type TableDeleteOptions struct { // Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when analytics logging is enabled. RequestID *string } -// TableDeleteResponse contains the response from method Table.Delete. -type TableDeleteResponse struct { - // ClientRequestID contains the information returned from the x-ms-client-request-id header response. - ClientRequestID *string - - // Date contains the information returned from the Date header response. - Date *time.Time - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response - - // RequestID contains the information returned from the x-ms-request-id header response. - RequestID *string - - // Version contains the information returned from the x-ms-version header response. - Version *string -} - -// The properties for the table entity query response. +// TableEntityQueryResponse - The properties for the table entity query response. type TableEntityQueryResponse struct { // The metadata response of the table. OdataMetadata *string `json:"odata.metadata,omitempty"` // List of table entities. - Value *[]map[string]interface{} `json:"value,omitempty"` + Value []map[string]interface{} `json:"value,omitempty"` } -// TableEntityQueryResponseResponse is the response envelope for operations that return a TableEntityQueryResponse type. -type TableEntityQueryResponseResponse struct { - // ClientRequestID contains the information returned from the x-ms-client-request-id header response. - ClientRequestID *string - - // Date contains the information returned from the Date header response. - Date *time.Time - - // ETag contains the information returned from the ETag header response. - ETag *string - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response - - // RequestID contains the information returned from the x-ms-request-id header response. - RequestID *string - - // The properties for the table entity query response. - TableEntityQueryResponse *TableEntityQueryResponse - - // Version contains the information returned from the x-ms-version header response. - Version *string - - // XMSContinuationNextPartitionKey contains the information returned from the x-ms-continuation-NextPartitionKey header response. - XMSContinuationNextPartitionKey *string - - // XMSContinuationNextRowKey contains the information returned from the x-ms-continuation-NextRowKey header response. - XMSContinuationNextRowKey *string +// MarshalJSON implements the json.Marshaller interface for type TableEntityQueryResponse. +func (t TableEntityQueryResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "odata.metadata", t.OdataMetadata) + populate(objectMap, "value", t.Value) + return json.Marshal(objectMap) } // TableGetAccessPolicyOptions contains the optional parameters for the Table.GetAccessPolicy method. @@ -407,38 +263,11 @@ type TableInsertEntityOptions struct { // Specifies whether the response should include the inserted entity in the payload. Possible values are return-no-content and return-content. ResponsePreference *ResponseFormat // The properties for the table entity. - TableEntityProperties *map[string]interface{} + TableEntityProperties map[string]interface{} // The timeout parameter is expressed in seconds. Timeout *int32 } -// TableInsertEntityResponse contains the response from method Table.InsertEntity. -type TableInsertEntityResponse struct { - // ClientRequestID contains the information returned from the x-ms-client-request-id header response. - ClientRequestID *string - - // ContentType contains the information returned from the Content-Type header response. - ContentType *string - - // Date contains the information returned from the Date header response. - Date *time.Time - - // ETag contains the information returned from the ETag header response. - ETag *string - - // PreferenceApplied contains the information returned from the Preference-Applied header response. - PreferenceApplied *string - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response - - // RequestID contains the information returned from the x-ms-request-id header response. - RequestID *string - - // Version contains the information returned from the x-ms-version header response. - Version *string -} - // TableMergeEntityOptions contains the optional parameters for the Table.MergeEntity method. type TableMergeEntityOptions struct { // Match condition for an entity to be updated. If specified and a matching entity is not found, an error will be raised. To force an unconditional update, @@ -448,33 +277,12 @@ type TableMergeEntityOptions struct { // Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when analytics logging is enabled. RequestID *string // The properties for the table entity. - TableEntityProperties *map[string]interface{} + TableEntityProperties map[string]interface{} // The timeout parameter is expressed in seconds. Timeout *int32 } -// TableMergeEntityResponse contains the response from method Table.MergeEntity. -type TableMergeEntityResponse struct { - // ClientRequestID contains the information returned from the x-ms-client-request-id header response. - ClientRequestID *string - - // Date contains the information returned from the Date header response. - Date *time.Time - - // ETag contains the information returned from the ETag header response. - ETag *string - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response - - // RequestID contains the information returned from the x-ms-request-id header response. - RequestID *string - - // Version contains the information returned from the x-ms-version header response. - Version *string -} - -// The properties for creating a table. +// TableProperties - The properties for creating a table. type TableProperties struct { // The name of the table to create. TableName *string `json:"TableName,omitempty"` @@ -492,8 +300,8 @@ type TableQueryEntitiesOptions struct { Timeout *int32 } -// TableQueryEntitiesWithPartitionAndRowKeyOptions contains the optional parameters for the Table.QueryEntitiesWithPartitionAndRowKey method. -type TableQueryEntitiesWithPartitionAndRowKeyOptions struct { +// TableQueryEntityWithPartitionAndRowKeyOptions contains the optional parameters for the Table.QueryEntityWithPartitionAndRowKey method. +type TableQueryEntityWithPartitionAndRowKeyOptions struct { // Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when analytics logging is enabled. RequestID *string // The timeout parameter is expressed in seconds. @@ -508,47 +316,31 @@ type TableQueryOptions struct { RequestID *string } -// The properties for the table query response. +// TableQueryResponse - The properties for the table query response. type TableQueryResponse struct { // The metadata response of the table. OdataMetadata *string `json:"odata.metadata,omitempty"` // List of tables. - Value *[]TableResponseProperties `json:"value,omitempty"` + Value []*TableResponseProperties `json:"value,omitempty"` } -// TableQueryResponseResponse is the response envelope for operations that return a TableQueryResponse type. -type TableQueryResponseResponse struct { - // ClientRequestID contains the information returned from the x-ms-client-request-id header response. - ClientRequestID *string - - // Date contains the information returned from the Date header response. - Date *time.Time - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response - - // RequestID contains the information returned from the x-ms-request-id header response. - RequestID *string - - // The properties for the table query response. - TableQueryResponse *TableQueryResponse - - // Version contains the information returned from the x-ms-version header response. - Version *string - - // XMSContinuationNextTableName contains the information returned from the x-ms-continuation-NextTableName header response. - XMSContinuationNextTableName *string +// MarshalJSON implements the json.Marshaller interface for type TableQueryResponse. +func (t TableQueryResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "odata.metadata", t.OdataMetadata) + populate(objectMap, "value", t.Value) + return json.Marshal(objectMap) } -// The response for a single table. +// TableResponse - The response for a single table. type TableResponse struct { TableResponseProperties // The metadata response of the table. OdataMetadata *string `json:"odata.metadata,omitempty"` } -// The properties for the table response. +// TableResponseProperties - The properties for the table response. type TableResponseProperties struct { // The edit link of the table. OdataEditLink *string `json:"odata.editLink,omitempty"` @@ -563,52 +355,24 @@ type TableResponseProperties struct { TableName *string `json:"TableName,omitempty"` } -// TableResponseResponse is the response envelope for operations that return a TableResponse type. -type TableResponseResponse struct { - // ClientRequestID contains the information returned from the x-ms-client-request-id header response. - ClientRequestID *string - - // Date contains the information returned from the Date header response. - Date *time.Time - - // PreferenceApplied contains the information returned from the Preference-Applied header response. - PreferenceApplied *string - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response - - // RequestID contains the information returned from the x-ms-request-id header response. - RequestID *string - - // The response for a single table. - TableResponse *TableResponse - - // Version contains the information returned from the x-ms-version header response. - Version *string -} - -// Table Service error. +// TableServiceError - Table Service error. +// Implements the error and azcore.HTTPResponse interfaces. type TableServiceError struct { + raw string // The error message. Message *string `json:"Message,omitempty"` } // Error implements the error interface for type TableServiceError. +// The contents of the error text are not contractual and subject to change. func (e TableServiceError) Error() string { - msg := "" - if e.Message != nil { - msg += fmt.Sprintf("Message: %v\n", *e.Message) - } - if msg == "" { - msg = "missing error info" - } - return msg + return e.raw } -// Table Service Properties. +// TableServiceProperties - Table Service Properties. type TableServiceProperties struct { // The set of CORS rules. - Cors *[]CorsRule `xml:"Cors>CorsRule"` + Cors []*CorsRule `xml:"Cors>CorsRule"` // A summary of request statistics grouped by API in hourly aggregates for tables. HourMetrics *Metrics `xml:"HourMetrics"` @@ -626,85 +390,32 @@ func (t TableServiceProperties) MarshalXML(e *xml.Encoder, start xml.StartElemen type alias TableServiceProperties aux := &struct { *alias + Cors *[]*CorsRule `xml:"Cors>CorsRule"` }{ alias: (*alias)(&t), } + if t.Cors != nil { + aux.Cors = &t.Cors + } return e.EncodeElement(aux, start) } -// TableServicePropertiesResponse is the response envelope for operations that return a TableServiceProperties type. -type TableServicePropertiesResponse struct { - // ClientRequestID contains the information returned from the x-ms-client-request-id header response. - ClientRequestID *string `xml:"ClientRequestID"` - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response - - // RequestID contains the information returned from the x-ms-request-id header response. - RequestID *string `xml:"RequestID"` - - // Table Service Properties. - StorageServiceProperties *TableServiceProperties `xml:"StorageServiceProperties"` - - // Version contains the information returned from the x-ms-version header response. - Version *string `xml:"Version"` -} - -// Stats for the service. +// TableServiceStats - Stats for the service. type TableServiceStats struct { // Geo-Replication information for the Secondary Storage Service. GeoReplication *GeoReplication `xml:"GeoReplication"` } -// TableServiceStatsResponse is the response envelope for operations that return a TableServiceStats type. -type TableServiceStatsResponse struct { - // ClientRequestID contains the information returned from the x-ms-client-request-id header response. - ClientRequestID *string `xml:"ClientRequestID"` - - // Date contains the information returned from the Date header response. - Date *time.Time `xml:"Date"` - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response - - // RequestID contains the information returned from the x-ms-request-id header response. - RequestID *string `xml:"RequestID"` - - // Stats for the service. - StorageServiceStats *TableServiceStats `xml:"StorageServiceStats"` - - // Version contains the information returned from the x-ms-version header response. - Version *string `xml:"Version"` -} - // TableSetAccessPolicyOptions contains the optional parameters for the Table.SetAccessPolicy method. type TableSetAccessPolicyOptions struct { // Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when analytics logging is enabled. RequestID *string // The acls for the table. - TableACL *[]SignedIdentifier + TableACL []*SignedIdentifier // The timeout parameter is expressed in seconds. Timeout *int32 } -// TableSetAccessPolicyResponse contains the response from method Table.SetAccessPolicy. -type TableSetAccessPolicyResponse struct { - // ClientRequestID contains the information returned from the x-ms-client-request-id header response. - ClientRequestID *string - - // Date contains the information returned from the Date header response. - Date *time.Time - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response - - // RequestID contains the information returned from the x-ms-request-id header response. - RequestID *string - - // Version contains the information returned from the x-ms-version header response. - Version *string -} - // TableUpdateEntityOptions contains the optional parameters for the Table.UpdateEntity method. type TableUpdateEntityOptions struct { // Match condition for an entity to be updated. If specified and a matching entity is not found, an error will be raised. To force an unconditional update, @@ -714,28 +425,17 @@ type TableUpdateEntityOptions struct { // Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when analytics logging is enabled. RequestID *string // The properties for the table entity. - TableEntityProperties *map[string]interface{} + TableEntityProperties map[string]interface{} // The timeout parameter is expressed in seconds. Timeout *int32 } -// TableUpdateEntityResponse contains the response from method Table.UpdateEntity. -type TableUpdateEntityResponse struct { - // ClientRequestID contains the information returned from the x-ms-client-request-id header response. - ClientRequestID *string - - // Date contains the information returned from the Date header response. - Date *time.Time - - // ETag contains the information returned from the ETag header response. - ETag *string - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response - - // RequestID contains the information returned from the x-ms-request-id header response. - RequestID *string - - // Version contains the information returned from the x-ms-version header response. - Version *string +func populate(m map[string]interface{}, k string, v interface{}) { + if v == nil { + return + } else if azcore.IsNullValue(v) { + m[k] = nil + } else if !reflect.ValueOf(v).IsNil() { + m[k] = v + } } diff --git a/sdk/tables/aztables/zz_generated_response_types.go b/sdk/tables/aztables/zz_generated_response_types.go new file mode 100644 index 000000000000..ec81d9e0ca7b --- /dev/null +++ b/sdk/tables/aztables/zz_generated_response_types.go @@ -0,0 +1,343 @@ +// +build go1.13 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package aztables + +import ( + "net/http" + "time" +) + +// MapOfInterfaceResponse is the response envelope for operations that return a map[string]interface{} type. +type MapOfInterfaceResponse struct { + // ClientRequestID contains the information returned from the x-ms-client-request-id header response. + ClientRequestID *string + + // ContentType contains the information returned from the Content-Type header response. + ContentType *string + + // Date contains the information returned from the Date header response. + Date *time.Time + + // ETag contains the information returned from the ETag header response. + ETag *string + + // PreferenceApplied contains the information returned from the Preference-Applied header response. + PreferenceApplied *string + + // RawResponse contains the underlying HTTP response. + RawResponse *http.Response + + // RequestID contains the information returned from the x-ms-request-id header response. + RequestID *string + + // The other properties of the table entity. + Value map[string]interface{} + + // Version contains the information returned from the x-ms-version header response. + Version *string + + // XMSContinuationNextPartitionKey contains the information returned from the x-ms-continuation-NextPartitionKey header response. + XMSContinuationNextPartitionKey *string + + // XMSContinuationNextRowKey contains the information returned from the x-ms-continuation-NextRowKey header response. + XMSContinuationNextRowKey *string +} + +// ServiceSetPropertiesResponse contains the response from method Service.SetProperties. +type ServiceSetPropertiesResponse struct { + // ClientRequestID contains the information returned from the x-ms-client-request-id header response. + ClientRequestID *string + + // RawResponse contains the underlying HTTP response. + RawResponse *http.Response + + // RequestID contains the information returned from the x-ms-request-id header response. + RequestID *string + + // Version contains the information returned from the x-ms-version header response. + Version *string +} + +// SignedIdentifierArrayResponse is the response envelope for operations that return a []*SignedIdentifier type. +type SignedIdentifierArrayResponse struct { + // ClientRequestID contains the information returned from the x-ms-client-request-id header response. + ClientRequestID *string `xml:"ClientRequestID"` + + // Date contains the information returned from the Date header response. + Date *time.Time `xml:"Date"` + + // RawResponse contains the underlying HTTP response. + RawResponse *http.Response + + // RequestID contains the information returned from the x-ms-request-id header response. + RequestID *string `xml:"RequestID"` + + // A collection of signed identifiers. + SignedIdentifiers []*SignedIdentifier `xml:"SignedIdentifier"` + + // Version contains the information returned from the x-ms-version header response. + Version *string `xml:"Version"` +} + +// TableCreateResponse contains the response from method Table.Create. +type TableCreateResponse struct { + // ClientRequestID contains the information returned from the x-ms-client-request-id header response. + ClientRequestID *string + + // Date contains the information returned from the Date header response. + Date *time.Time + + // PreferenceApplied contains the information returned from the Preference-Applied header response. + PreferenceApplied *string + + // RawResponse contains the underlying HTTP response. + RawResponse *http.Response + + // RequestID contains the information returned from the x-ms-request-id header response. + RequestID *string + + // Version contains the information returned from the x-ms-version header response. + Version *string +} + +// TableDeleteEntityResponse contains the response from method Table.DeleteEntity. +type TableDeleteEntityResponse struct { + // ClientRequestID contains the information returned from the x-ms-client-request-id header response. + ClientRequestID *string + + // Date contains the information returned from the Date header response. + Date *time.Time + + // RawResponse contains the underlying HTTP response. + RawResponse *http.Response + + // RequestID contains the information returned from the x-ms-request-id header response. + RequestID *string + + // Version contains the information returned from the x-ms-version header response. + Version *string +} + +// TableDeleteResponse contains the response from method Table.Delete. +type TableDeleteResponse struct { + // ClientRequestID contains the information returned from the x-ms-client-request-id header response. + ClientRequestID *string + + // Date contains the information returned from the Date header response. + Date *time.Time + + // RawResponse contains the underlying HTTP response. + RawResponse *http.Response + + // RequestID contains the information returned from the x-ms-request-id header response. + RequestID *string + + // Version contains the information returned from the x-ms-version header response. + Version *string +} + +// TableEntityQueryResponseResponse is the response envelope for operations that return a TableEntityQueryResponse type. +type TableEntityQueryResponseResponse struct { + // ClientRequestID contains the information returned from the x-ms-client-request-id header response. + ClientRequestID *string + + // Date contains the information returned from the Date header response. + Date *time.Time + + // RawResponse contains the underlying HTTP response. + RawResponse *http.Response + + // RequestID contains the information returned from the x-ms-request-id header response. + RequestID *string + + // The properties for the table entity query response. + TableEntityQueryResponse *TableEntityQueryResponse + + // Version contains the information returned from the x-ms-version header response. + Version *string + + // XMSContinuationNextPartitionKey contains the information returned from the x-ms-continuation-NextPartitionKey header response. + XMSContinuationNextPartitionKey *string + + // XMSContinuationNextRowKey contains the information returned from the x-ms-continuation-NextRowKey header response. + XMSContinuationNextRowKey *string +} + +// TableInsertEntityResponse contains the response from method Table.InsertEntity. +type TableInsertEntityResponse struct { + // ClientRequestID contains the information returned from the x-ms-client-request-id header response. + ClientRequestID *string + + // ContentType contains the information returned from the Content-Type header response. + ContentType *string + + // Date contains the information returned from the Date header response. + Date *time.Time + + // ETag contains the information returned from the ETag header response. + ETag *string + + // PreferenceApplied contains the information returned from the Preference-Applied header response. + PreferenceApplied *string + + // RawResponse contains the underlying HTTP response. + RawResponse *http.Response + + // RequestID contains the information returned from the x-ms-request-id header response. + RequestID *string + + // Version contains the information returned from the x-ms-version header response. + Version *string +} + +// TableMergeEntityResponse contains the response from method Table.MergeEntity. +type TableMergeEntityResponse struct { + // ClientRequestID contains the information returned from the x-ms-client-request-id header response. + ClientRequestID *string + + // Date contains the information returned from the Date header response. + Date *time.Time + + // ETag contains the information returned from the ETag header response. + ETag *string + + // RawResponse contains the underlying HTTP response. + RawResponse *http.Response + + // RequestID contains the information returned from the x-ms-request-id header response. + RequestID *string + + // Version contains the information returned from the x-ms-version header response. + Version *string +} + +// TableQueryResponseResponse is the response envelope for operations that return a TableQueryResponse type. +type TableQueryResponseResponse struct { + // ClientRequestID contains the information returned from the x-ms-client-request-id header response. + ClientRequestID *string + + // Date contains the information returned from the Date header response. + Date *time.Time + + // RawResponse contains the underlying HTTP response. + RawResponse *http.Response + + // RequestID contains the information returned from the x-ms-request-id header response. + RequestID *string + + // The properties for the table query response. + TableQueryResponse *TableQueryResponse + + // Version contains the information returned from the x-ms-version header response. + Version *string + + // XMSContinuationNextTableName contains the information returned from the x-ms-continuation-NextTableName header response. + XMSContinuationNextTableName *string +} + +// TableResponseResponse is the response envelope for operations that return a TableResponse type. +type TableResponseResponse struct { + // ClientRequestID contains the information returned from the x-ms-client-request-id header response. + ClientRequestID *string + + // Date contains the information returned from the Date header response. + Date *time.Time + + // PreferenceApplied contains the information returned from the Preference-Applied header response. + PreferenceApplied *string + + // RawResponse contains the underlying HTTP response. + RawResponse *http.Response + + // RequestID contains the information returned from the x-ms-request-id header response. + RequestID *string + + // The response for a single table. + TableResponse *TableResponse + + // Version contains the information returned from the x-ms-version header response. + Version *string +} + +// TableServicePropertiesResponse is the response envelope for operations that return a TableServiceProperties type. +type TableServicePropertiesResponse struct { + // ClientRequestID contains the information returned from the x-ms-client-request-id header response. + ClientRequestID *string `xml:"ClientRequestID"` + + // RawResponse contains the underlying HTTP response. + RawResponse *http.Response + + // RequestID contains the information returned from the x-ms-request-id header response. + RequestID *string `xml:"RequestID"` + + // Table Service Properties. + StorageServiceProperties *TableServiceProperties `xml:"StorageServiceProperties"` + + // Version contains the information returned from the x-ms-version header response. + Version *string `xml:"Version"` +} + +// TableServiceStatsResponse is the response envelope for operations that return a TableServiceStats type. +type TableServiceStatsResponse struct { + // ClientRequestID contains the information returned from the x-ms-client-request-id header response. + ClientRequestID *string `xml:"ClientRequestID"` + + // Date contains the information returned from the Date header response. + Date *time.Time `xml:"Date"` + + // RawResponse contains the underlying HTTP response. + RawResponse *http.Response + + // RequestID contains the information returned from the x-ms-request-id header response. + RequestID *string `xml:"RequestID"` + + // Stats for the service. + StorageServiceStats *TableServiceStats `xml:"StorageServiceStats"` + + // Version contains the information returned from the x-ms-version header response. + Version *string `xml:"Version"` +} + +// TableSetAccessPolicyResponse contains the response from method Table.SetAccessPolicy. +type TableSetAccessPolicyResponse struct { + // ClientRequestID contains the information returned from the x-ms-client-request-id header response. + ClientRequestID *string + + // Date contains the information returned from the Date header response. + Date *time.Time + + // RawResponse contains the underlying HTTP response. + RawResponse *http.Response + + // RequestID contains the information returned from the x-ms-request-id header response. + RequestID *string + + // Version contains the information returned from the x-ms-version header response. + Version *string +} + +// TableUpdateEntityResponse contains the response from method Table.UpdateEntity. +type TableUpdateEntityResponse struct { + // ClientRequestID contains the information returned from the x-ms-client-request-id header response. + ClientRequestID *string + + // Date contains the information returned from the Date header response. + Date *time.Time + + // ETag contains the information returned from the ETag header response. + ETag *string + + // RawResponse contains the underlying HTTP response. + RawResponse *http.Response + + // RequestID contains the information returned from the x-ms-request-id header response. + RequestID *string + + // Version contains the information returned from the x-ms-version header response. + Version *string +} diff --git a/sdk/tables/aztables/zz_generated_service.go b/sdk/tables/aztables/zz_generated_service_client.go similarity index 79% rename from sdk/tables/aztables/zz_generated_service.go rename to sdk/tables/aztables/zz_generated_service_client.go index 182f446e1484..014bdf4fee9e 100644 --- a/sdk/tables/aztables/zz_generated_service.go +++ b/sdk/tables/aztables/zz_generated_service_client.go @@ -9,11 +9,11 @@ package aztables import ( "context" + "fmt" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" "net/http" "strconv" "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore" ) type serviceClient struct { @@ -21,6 +21,7 @@ type serviceClient struct { } // GetProperties - Gets the properties of an account's Table service, including properties for Analytics and CORS (Cross-Origin Resource Sharing) rules. +// If the operation fails it returns the *TableServiceError error type. func (client *serviceClient) GetProperties(ctx context.Context, options *ServiceGetPropertiesOptions) (TableServicePropertiesResponse, error) { req, err := client.getPropertiesCreateRequest(ctx, options) if err != nil { @@ -43,13 +44,13 @@ func (client *serviceClient) getPropertiesCreateRequest(ctx context.Context, opt return nil, err } req.Telemetry(telemetryInfo) - query := req.URL.Query() - query.Set("restype", "service") - query.Set("comp", "properties") + reqQP := req.URL.Query() + reqQP.Set("restype", "service") + reqQP.Set("comp", "properties") if options != nil && options.Timeout != nil { - query.Set("timeout", strconv.FormatInt(int64(*options.Timeout), 10)) + reqQP.Set("timeout", strconv.FormatInt(int64(*options.Timeout), 10)) } - req.URL.RawQuery = query.Encode() + req.URL.RawQuery = reqQP.Encode() req.Header.Set("x-ms-version", "2019-02-02") if options != nil && options.RequestID != nil { req.Header.Set("x-ms-client-request-id", *options.RequestID) @@ -79,15 +80,20 @@ func (client *serviceClient) getPropertiesHandleResponse(resp *azcore.Response) // getPropertiesHandleError handles the GetProperties error response. func (client *serviceClient) getPropertiesHandleError(resp *azcore.Response) error { - var err TableServiceError - if err := resp.UnmarshalAsJSON(&err); err != nil { - return err + body, err := resp.Payload() + if err != nil { + return azcore.NewResponseError(err, resp.Response) + } + errType := TableServiceError{raw: string(body)} + if err := resp.UnmarshalAsJSON(&errType); err != nil { + return azcore.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp.Response) } - return azcore.NewResponseError(&err, resp.Response) + return azcore.NewResponseError(&errType, resp.Response) } // GetStatistics - Retrieves statistics related to replication for the Table service. It is only available on the secondary location endpoint when read-access // geo-redundant replication is enabled for the account. +// If the operation fails it returns the *TableServiceError error type. func (client *serviceClient) GetStatistics(ctx context.Context, options *ServiceGetStatisticsOptions) (TableServiceStatsResponse, error) { req, err := client.getStatisticsCreateRequest(ctx, options) if err != nil { @@ -110,13 +116,13 @@ func (client *serviceClient) getStatisticsCreateRequest(ctx context.Context, opt return nil, err } req.Telemetry(telemetryInfo) - query := req.URL.Query() - query.Set("restype", "service") - query.Set("comp", "stats") + reqQP := req.URL.Query() + reqQP.Set("restype", "service") + reqQP.Set("comp", "stats") if options != nil && options.Timeout != nil { - query.Set("timeout", strconv.FormatInt(int64(*options.Timeout), 10)) + reqQP.Set("timeout", strconv.FormatInt(int64(*options.Timeout), 10)) } - req.URL.RawQuery = query.Encode() + req.URL.RawQuery = reqQP.Encode() req.Header.Set("x-ms-version", "2019-02-02") if options != nil && options.RequestID != nil { req.Header.Set("x-ms-client-request-id", *options.RequestID) @@ -153,15 +159,20 @@ func (client *serviceClient) getStatisticsHandleResponse(resp *azcore.Response) // getStatisticsHandleError handles the GetStatistics error response. func (client *serviceClient) getStatisticsHandleError(resp *azcore.Response) error { - var err TableServiceError - if err := resp.UnmarshalAsJSON(&err); err != nil { - return err + body, err := resp.Payload() + if err != nil { + return azcore.NewResponseError(err, resp.Response) + } + errType := TableServiceError{raw: string(body)} + if err := resp.UnmarshalAsJSON(&errType); err != nil { + return azcore.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp.Response) } - return azcore.NewResponseError(&err, resp.Response) + return azcore.NewResponseError(&errType, resp.Response) } // SetProperties - Sets properties for an account's Table service endpoint, including properties for Analytics and CORS (Cross-Origin Resource Sharing) // rules. +// If the operation fails it returns the *TableServiceError error type. func (client *serviceClient) SetProperties(ctx context.Context, tableServiceProperties TableServiceProperties, options *ServiceSetPropertiesOptions) (ServiceSetPropertiesResponse, error) { req, err := client.setPropertiesCreateRequest(ctx, tableServiceProperties, options) if err != nil { @@ -184,13 +195,13 @@ func (client *serviceClient) setPropertiesCreateRequest(ctx context.Context, tab return nil, err } req.Telemetry(telemetryInfo) - query := req.URL.Query() - query.Set("restype", "service") - query.Set("comp", "properties") + reqQP := req.URL.Query() + reqQP.Set("restype", "service") + reqQP.Set("comp", "properties") if options != nil && options.Timeout != nil { - query.Set("timeout", strconv.FormatInt(int64(*options.Timeout), 10)) + reqQP.Set("timeout", strconv.FormatInt(int64(*options.Timeout), 10)) } - req.URL.RawQuery = query.Encode() + req.URL.RawQuery = reqQP.Encode() req.Header.Set("x-ms-version", "2019-02-02") if options != nil && options.RequestID != nil { req.Header.Set("x-ms-client-request-id", *options.RequestID) @@ -216,9 +227,13 @@ func (client *serviceClient) setPropertiesHandleResponse(resp *azcore.Response) // setPropertiesHandleError handles the SetProperties error response. func (client *serviceClient) setPropertiesHandleError(resp *azcore.Response) error { - var err TableServiceError - if err := resp.UnmarshalAsJSON(&err); err != nil { - return err + body, err := resp.Payload() + if err != nil { + return azcore.NewResponseError(err, resp.Response) + } + errType := TableServiceError{raw: string(body)} + if err := resp.UnmarshalAsJSON(&errType); err != nil { + return azcore.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp.Response) } - return azcore.NewResponseError(&err, resp.Response) + return azcore.NewResponseError(&errType, resp.Response) } diff --git a/sdk/tables/aztables/zz_generated_table.go b/sdk/tables/aztables/zz_generated_table_client.go similarity index 74% rename from sdk/tables/aztables/zz_generated_table.go rename to sdk/tables/aztables/zz_generated_table_client.go index b7bf3cd8a88d..322ff68c7481 100644 --- a/sdk/tables/aztables/zz_generated_table.go +++ b/sdk/tables/aztables/zz_generated_table_client.go @@ -12,7 +12,6 @@ import ( "encoding/xml" "errors" "fmt" - "io/ioutil" "net/http" "net/url" "strconv" @@ -27,6 +26,7 @@ type tableClient struct { } // Create - Creates a new table under the given account. +// If the operation fails it returns the *TableServiceError error type. // Possible return types are *TableResponseResponse, *TableCreateResponse func (client *tableClient) Create(ctx context.Context, tableProperties TableProperties, tableCreateOptions *TableCreateOptions, queryOptions *QueryOptions) (interface{}, error) { req, err := client.createCreateRequest(ctx, tableProperties, tableCreateOptions, queryOptions) @@ -51,11 +51,11 @@ func (client *tableClient) createCreateRequest(ctx context.Context, tablePropert return nil, err } req.Telemetry(telemetryInfo) - query := req.URL.Query() + reqQP := req.URL.Query() if queryOptions != nil && queryOptions.Format != nil { - query.Set("$format", string(*queryOptions.Format)) + reqQP.Set("$format", string(*queryOptions.Format)) } - req.URL.RawQuery = query.Encode() + req.URL.RawQuery = reqQP.Encode() req.Header.Set("x-ms-version", "2019-02-02") if tableCreateOptions != nil && tableCreateOptions.RequestID != nil { req.Header.Set("x-ms-client-request-id", *tableCreateOptions.RequestID) @@ -126,14 +126,19 @@ func (client *tableClient) createHandleResponse(resp *azcore.Response) (interfac // createHandleError handles the Create error response. func (client *tableClient) createHandleError(resp *azcore.Response) error { - var err TableServiceError - if err := resp.UnmarshalAsJSON(&err); err != nil { - return err + body, err := resp.Payload() + if err != nil { + return azcore.NewResponseError(err, resp.Response) + } + errType := TableServiceError{raw: string(body)} + if err := resp.UnmarshalAsJSON(&errType); err != nil { + return azcore.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp.Response) } - return azcore.NewResponseError(&err, resp.Response) + return azcore.NewResponseError(&errType, resp.Response) } // Delete - Operation permanently deletes the specified table. +// If the operation fails it returns the *TableServiceError error type. func (client *tableClient) Delete(ctx context.Context, table string, options *TableDeleteOptions) (TableDeleteResponse, error) { req, err := client.deleteCreateRequest(ctx, table, options) if err != nil { @@ -152,6 +157,9 @@ func (client *tableClient) Delete(ctx context.Context, table string, options *Ta // deleteCreateRequest creates the Delete request. func (client *tableClient) deleteCreateRequest(ctx context.Context, table string, options *TableDeleteOptions) (*azcore.Request, error) { urlPath := "/Tables('{table}')" + if table == "" { + return nil, errors.New("parameter table cannot be empty") + } urlPath = strings.ReplaceAll(urlPath, "{table}", url.PathEscape(table)) req, err := azcore.NewRequest(ctx, http.MethodDelete, azcore.JoinPaths(client.con.Endpoint(), urlPath)) if err != nil { @@ -190,14 +198,19 @@ func (client *tableClient) deleteHandleResponse(resp *azcore.Response) (TableDel // deleteHandleError handles the Delete error response. func (client *tableClient) deleteHandleError(resp *azcore.Response) error { - var err TableServiceError - if err := resp.UnmarshalAsJSON(&err); err != nil { - return err + body, err := resp.Payload() + if err != nil { + return azcore.NewResponseError(err, resp.Response) } - return azcore.NewResponseError(&err, resp.Response) + errType := TableServiceError{raw: string(body)} + if err := resp.UnmarshalAsJSON(&errType); err != nil { + return azcore.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp.Response) + } + return azcore.NewResponseError(&errType, resp.Response) } // DeleteEntity - Deletes the specified entity in a table. +// If the operation fails it returns the *TableServiceError error type. func (client *tableClient) DeleteEntity(ctx context.Context, table string, partitionKey string, rowKey string, ifMatch string, tableDeleteEntityOptions *TableDeleteEntityOptions, queryOptions *QueryOptions) (TableDeleteEntityResponse, error) { req, err := client.deleteEntityCreateRequest(ctx, table, partitionKey, rowKey, ifMatch, tableDeleteEntityOptions, queryOptions) if err != nil { @@ -216,22 +229,31 @@ func (client *tableClient) DeleteEntity(ctx context.Context, table string, parti // deleteEntityCreateRequest creates the DeleteEntity request. func (client *tableClient) deleteEntityCreateRequest(ctx context.Context, table string, partitionKey string, rowKey string, ifMatch string, tableDeleteEntityOptions *TableDeleteEntityOptions, queryOptions *QueryOptions) (*azcore.Request, error) { urlPath := "/{table}(PartitionKey='{partitionKey}',RowKey='{rowKey}')" + if table == "" { + return nil, errors.New("parameter table cannot be empty") + } urlPath = strings.ReplaceAll(urlPath, "{table}", url.PathEscape(table)) + if partitionKey == "" { + return nil, errors.New("parameter partitionKey cannot be empty") + } urlPath = strings.ReplaceAll(urlPath, "{partitionKey}", url.PathEscape(partitionKey)) + if rowKey == "" { + return nil, errors.New("parameter rowKey cannot be empty") + } urlPath = strings.ReplaceAll(urlPath, "{rowKey}", url.PathEscape(rowKey)) req, err := azcore.NewRequest(ctx, http.MethodDelete, azcore.JoinPaths(client.con.Endpoint(), urlPath)) if err != nil { return nil, err } req.Telemetry(telemetryInfo) - query := req.URL.Query() + reqQP := req.URL.Query() if tableDeleteEntityOptions != nil && tableDeleteEntityOptions.Timeout != nil { - query.Set("timeout", strconv.FormatInt(int64(*tableDeleteEntityOptions.Timeout), 10)) + reqQP.Set("timeout", strconv.FormatInt(int64(*tableDeleteEntityOptions.Timeout), 10)) } if queryOptions != nil && queryOptions.Format != nil { - query.Set("$format", string(*queryOptions.Format)) + reqQP.Set("$format", string(*queryOptions.Format)) } - req.URL.RawQuery = query.Encode() + req.URL.RawQuery = reqQP.Encode() req.Header.Set("x-ms-version", "2019-02-02") if tableDeleteEntityOptions != nil && tableDeleteEntityOptions.RequestID != nil { req.Header.Set("x-ms-client-request-id", *tableDeleteEntityOptions.RequestID) @@ -266,14 +288,19 @@ func (client *tableClient) deleteEntityHandleResponse(resp *azcore.Response) (Ta // deleteEntityHandleError handles the DeleteEntity error response. func (client *tableClient) deleteEntityHandleError(resp *azcore.Response) error { - var err TableServiceError - if err := resp.UnmarshalAsJSON(&err); err != nil { - return err + body, err := resp.Payload() + if err != nil { + return azcore.NewResponseError(err, resp.Response) } - return azcore.NewResponseError(&err, resp.Response) + errType := TableServiceError{raw: string(body)} + if err := resp.UnmarshalAsJSON(&errType); err != nil { + return azcore.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp.Response) + } + return azcore.NewResponseError(&errType, resp.Response) } // GetAccessPolicy - Retrieves details about any stored access policies specified on the table that may be used with Shared Access Signatures. +// If the operation fails it returns the *TableServiceError error type. func (client *tableClient) GetAccessPolicy(ctx context.Context, table string, options *TableGetAccessPolicyOptions) (SignedIdentifierArrayResponse, error) { req, err := client.getAccessPolicyCreateRequest(ctx, table, options) if err != nil { @@ -292,18 +319,21 @@ func (client *tableClient) GetAccessPolicy(ctx context.Context, table string, op // getAccessPolicyCreateRequest creates the GetAccessPolicy request. func (client *tableClient) getAccessPolicyCreateRequest(ctx context.Context, table string, options *TableGetAccessPolicyOptions) (*azcore.Request, error) { urlPath := "/{table}" + if table == "" { + return nil, errors.New("parameter table cannot be empty") + } urlPath = strings.ReplaceAll(urlPath, "{table}", url.PathEscape(table)) req, err := azcore.NewRequest(ctx, http.MethodGet, azcore.JoinPaths(client.con.Endpoint(), urlPath)) if err != nil { return nil, err } req.Telemetry(telemetryInfo) - query := req.URL.Query() + reqQP := req.URL.Query() if options != nil && options.Timeout != nil { - query.Set("timeout", strconv.FormatInt(int64(*options.Timeout), 10)) + reqQP.Set("timeout", strconv.FormatInt(int64(*options.Timeout), 10)) } - query.Set("comp", "acl") - req.URL.RawQuery = query.Encode() + reqQP.Set("comp", "acl") + req.URL.RawQuery = reqQP.Encode() req.Header.Set("x-ms-version", "2019-02-02") if options != nil && options.RequestID != nil { req.Header.Set("x-ms-client-request-id", *options.RequestID) @@ -339,14 +369,19 @@ func (client *tableClient) getAccessPolicyHandleResponse(resp *azcore.Response) // getAccessPolicyHandleError handles the GetAccessPolicy error response. func (client *tableClient) getAccessPolicyHandleError(resp *azcore.Response) error { - var err TableServiceError - if err := resp.UnmarshalAsJSON(&err); err != nil { - return err + body, err := resp.Payload() + if err != nil { + return azcore.NewResponseError(err, resp.Response) + } + errType := TableServiceError{raw: string(body)} + if err := resp.UnmarshalAsJSON(&errType); err != nil { + return azcore.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp.Response) } - return azcore.NewResponseError(&err, resp.Response) + return azcore.NewResponseError(&errType, resp.Response) } // InsertEntity - Insert entity in a table. +// If the operation fails it returns the *TableServiceError error type. // Possible return types are *MapOfInterfaceResponse, *TableInsertEntityResponse func (client *tableClient) InsertEntity(ctx context.Context, table string, tableInsertEntityOptions *TableInsertEntityOptions, queryOptions *QueryOptions) (interface{}, error) { req, err := client.insertEntityCreateRequest(ctx, table, tableInsertEntityOptions, queryOptions) @@ -366,20 +401,23 @@ func (client *tableClient) InsertEntity(ctx context.Context, table string, table // insertEntityCreateRequest creates the InsertEntity request. func (client *tableClient) insertEntityCreateRequest(ctx context.Context, table string, tableInsertEntityOptions *TableInsertEntityOptions, queryOptions *QueryOptions) (*azcore.Request, error) { urlPath := "/{table}" + if table == "" { + return nil, errors.New("parameter table cannot be empty") + } urlPath = strings.ReplaceAll(urlPath, "{table}", url.PathEscape(table)) req, err := azcore.NewRequest(ctx, http.MethodPost, azcore.JoinPaths(client.con.Endpoint(), urlPath)) if err != nil { return nil, err } req.Telemetry(telemetryInfo) - query := req.URL.Query() + reqQP := req.URL.Query() if tableInsertEntityOptions != nil && tableInsertEntityOptions.Timeout != nil { - query.Set("timeout", strconv.FormatInt(int64(*tableInsertEntityOptions.Timeout), 10)) + reqQP.Set("timeout", strconv.FormatInt(int64(*tableInsertEntityOptions.Timeout), 10)) } if queryOptions != nil && queryOptions.Format != nil { - query.Set("$format", string(*queryOptions.Format)) + reqQP.Set("$format", string(*queryOptions.Format)) } - req.URL.RawQuery = query.Encode() + req.URL.RawQuery = reqQP.Encode() req.Header.Set("x-ms-version", "2019-02-02") if tableInsertEntityOptions != nil && tableInsertEntityOptions.RequestID != nil { req.Header.Set("x-ms-client-request-id", *tableInsertEntityOptions.RequestID) @@ -389,7 +427,7 @@ func (client *tableClient) insertEntityCreateRequest(ctx context.Context, table req.Header.Set("Prefer", string(*tableInsertEntityOptions.ResponsePreference)) } req.Header.Set("Accept", "application/json;odata=minimalmetadata") - if tableInsertEntityOptions != nil { + if tableInsertEntityOptions != nil && tableInsertEntityOptions.TableEntityProperties != nil { return req, req.MarshalAsJSON(tableInsertEntityOptions.TableEntityProperties) } return req, nil @@ -423,6 +461,12 @@ func (client *tableClient) insertEntityHandleResponse(resp *azcore.Response) (in if val := resp.Header.Get("ETag"); val != "" { result.ETag = &val } + if val := resp.Header.Get("x-ms-continuation-NextPartitionKey"); val != "" { + result.XMSContinuationNextPartitionKey = &val + } + if val := resp.Header.Get("x-ms-continuation-NextRowKey"); val != "" { + result.XMSContinuationNextRowKey = &val + } if val := resp.Header.Get("Preference-Applied"); val != "" { result.PreferenceApplied = &val } @@ -465,14 +509,19 @@ func (client *tableClient) insertEntityHandleResponse(resp *azcore.Response) (in // insertEntityHandleError handles the InsertEntity error response. func (client *tableClient) insertEntityHandleError(resp *azcore.Response) error { - var err TableServiceError - if err := resp.UnmarshalAsJSON(&err); err != nil { - return err + body, err := resp.Payload() + if err != nil { + return azcore.NewResponseError(err, resp.Response) + } + errType := TableServiceError{raw: string(body)} + if err := resp.UnmarshalAsJSON(&errType); err != nil { + return azcore.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp.Response) } - return azcore.NewResponseError(&err, resp.Response) + return azcore.NewResponseError(&errType, resp.Response) } // MergeEntity - Merge entity in a table. +// If the operation fails it returns the *TableServiceError error type. func (client *tableClient) MergeEntity(ctx context.Context, table string, partitionKey string, rowKey string, tableMergeEntityOptions *TableMergeEntityOptions, queryOptions *QueryOptions) (TableMergeEntityResponse, error) { req, err := client.mergeEntityCreateRequest(ctx, table, partitionKey, rowKey, tableMergeEntityOptions, queryOptions) if err != nil { @@ -491,22 +540,31 @@ func (client *tableClient) MergeEntity(ctx context.Context, table string, partit // mergeEntityCreateRequest creates the MergeEntity request. func (client *tableClient) mergeEntityCreateRequest(ctx context.Context, table string, partitionKey string, rowKey string, tableMergeEntityOptions *TableMergeEntityOptions, queryOptions *QueryOptions) (*azcore.Request, error) { urlPath := "/{table}(PartitionKey='{partitionKey}',RowKey='{rowKey}')" + if table == "" { + return nil, errors.New("parameter table cannot be empty") + } urlPath = strings.ReplaceAll(urlPath, "{table}", url.PathEscape(table)) + if partitionKey == "" { + return nil, errors.New("parameter partitionKey cannot be empty") + } urlPath = strings.ReplaceAll(urlPath, "{partitionKey}", url.PathEscape(partitionKey)) + if rowKey == "" { + return nil, errors.New("parameter rowKey cannot be empty") + } urlPath = strings.ReplaceAll(urlPath, "{rowKey}", url.PathEscape(rowKey)) req, err := azcore.NewRequest(ctx, http.MethodPatch, azcore.JoinPaths(client.con.Endpoint(), urlPath)) if err != nil { return nil, err } req.Telemetry(telemetryInfo) - query := req.URL.Query() + reqQP := req.URL.Query() if tableMergeEntityOptions != nil && tableMergeEntityOptions.Timeout != nil { - query.Set("timeout", strconv.FormatInt(int64(*tableMergeEntityOptions.Timeout), 10)) + reqQP.Set("timeout", strconv.FormatInt(int64(*tableMergeEntityOptions.Timeout), 10)) } if queryOptions != nil && queryOptions.Format != nil { - query.Set("$format", string(*queryOptions.Format)) + reqQP.Set("$format", string(*queryOptions.Format)) } - req.URL.RawQuery = query.Encode() + req.URL.RawQuery = reqQP.Encode() req.Header.Set("x-ms-version", "2019-02-02") if tableMergeEntityOptions != nil && tableMergeEntityOptions.RequestID != nil { req.Header.Set("x-ms-client-request-id", *tableMergeEntityOptions.RequestID) @@ -516,7 +574,7 @@ func (client *tableClient) mergeEntityCreateRequest(ctx context.Context, table s req.Header.Set("If-Match", *tableMergeEntityOptions.IfMatch) } req.Header.Set("Accept", "application/json") - if tableMergeEntityOptions != nil { + if tableMergeEntityOptions != nil && tableMergeEntityOptions.TableEntityProperties != nil { return req, req.MarshalAsJSON(tableMergeEntityOptions.TableEntityProperties) } return req, nil @@ -549,14 +607,19 @@ func (client *tableClient) mergeEntityHandleResponse(resp *azcore.Response) (Tab // mergeEntityHandleError handles the MergeEntity error response. func (client *tableClient) mergeEntityHandleError(resp *azcore.Response) error { - var err TableServiceError - if err := resp.UnmarshalAsJSON(&err); err != nil { - return err + body, err := resp.Payload() + if err != nil { + return azcore.NewResponseError(err, resp.Response) + } + errType := TableServiceError{raw: string(body)} + if err := resp.UnmarshalAsJSON(&errType); err != nil { + return azcore.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp.Response) } - return azcore.NewResponseError(&err, resp.Response) + return azcore.NewResponseError(&errType, resp.Response) } // Query - Queries tables under the given account. +// If the operation fails it returns a generic error. func (client *tableClient) Query(ctx context.Context, tableQueryOptions *TableQueryOptions, queryOptions *QueryOptions) (TableQueryResponseResponse, error) { req, err := client.queryCreateRequest(ctx, tableQueryOptions, queryOptions) if err != nil { @@ -580,23 +643,23 @@ func (client *tableClient) queryCreateRequest(ctx context.Context, tableQueryOpt return nil, err } req.Telemetry(telemetryInfo) - query := req.URL.Query() + reqQP := req.URL.Query() if queryOptions != nil && queryOptions.Format != nil { - query.Set("$format", string(*queryOptions.Format)) + reqQP.Set("$format", string(*queryOptions.Format)) } if queryOptions != nil && queryOptions.Top != nil { - query.Set("$top", strconv.FormatInt(int64(*queryOptions.Top), 10)) + reqQP.Set("$top", strconv.FormatInt(int64(*queryOptions.Top), 10)) } if queryOptions != nil && queryOptions.Select != nil { - query.Set("$select", *queryOptions.Select) + reqQP.Set("$select", *queryOptions.Select) } if queryOptions != nil && queryOptions.Filter != nil { - query.Set("$filter", *queryOptions.Filter) + reqQP.Set("$filter", *queryOptions.Filter) } if tableQueryOptions != nil && tableQueryOptions.NextTableName != nil { - query.Set("NextTableName", *tableQueryOptions.NextTableName) + reqQP.Set("NextTableName", *tableQueryOptions.NextTableName) } - req.URL.RawQuery = query.Encode() + req.URL.RawQuery = reqQP.Encode() req.Header.Set("x-ms-version", "2019-02-02") if tableQueryOptions != nil && tableQueryOptions.RequestID != nil { req.Header.Set("x-ms-client-request-id", *tableQueryOptions.RequestID) @@ -637,9 +700,9 @@ func (client *tableClient) queryHandleResponse(resp *azcore.Response) (TableQuer // queryHandleError handles the Query error response. func (client *tableClient) queryHandleError(resp *azcore.Response) error { - body, err := ioutil.ReadAll(resp.Body) + body, err := resp.Payload() if err != nil { - return fmt.Errorf("%s; failed to read response body: %w", resp.Status, err) + return azcore.NewResponseError(err, resp.Response) } if len(body) == 0 { return azcore.NewResponseError(errors.New(resp.Status), resp.Response) @@ -648,6 +711,7 @@ func (client *tableClient) queryHandleError(resp *azcore.Response) error { } // QueryEntities - Queries entities in a table. +// If the operation fails it returns the *TableServiceError error type. func (client *tableClient) QueryEntities(ctx context.Context, table string, tableQueryEntitiesOptions *TableQueryEntitiesOptions, queryOptions *QueryOptions) (TableEntityQueryResponseResponse, error) { req, err := client.queryEntitiesCreateRequest(ctx, table, tableQueryEntitiesOptions, queryOptions) if err != nil { @@ -666,35 +730,38 @@ func (client *tableClient) QueryEntities(ctx context.Context, table string, tabl // queryEntitiesCreateRequest creates the QueryEntities request. func (client *tableClient) queryEntitiesCreateRequest(ctx context.Context, table string, tableQueryEntitiesOptions *TableQueryEntitiesOptions, queryOptions *QueryOptions) (*azcore.Request, error) { urlPath := "/{table}()" + if table == "" { + return nil, errors.New("parameter table cannot be empty") + } urlPath = strings.ReplaceAll(urlPath, "{table}", url.PathEscape(table)) req, err := azcore.NewRequest(ctx, http.MethodGet, azcore.JoinPaths(client.con.Endpoint(), urlPath)) if err != nil { return nil, err } req.Telemetry(telemetryInfo) - query := req.URL.Query() + reqQP := req.URL.Query() if tableQueryEntitiesOptions != nil && tableQueryEntitiesOptions.Timeout != nil { - query.Set("timeout", strconv.FormatInt(int64(*tableQueryEntitiesOptions.Timeout), 10)) + reqQP.Set("timeout", strconv.FormatInt(int64(*tableQueryEntitiesOptions.Timeout), 10)) } if queryOptions != nil && queryOptions.Format != nil { - query.Set("$format", string(*queryOptions.Format)) + reqQP.Set("$format", string(*queryOptions.Format)) } if queryOptions != nil && queryOptions.Top != nil { - query.Set("$top", strconv.FormatInt(int64(*queryOptions.Top), 10)) + reqQP.Set("$top", strconv.FormatInt(int64(*queryOptions.Top), 10)) } if queryOptions != nil && queryOptions.Select != nil { - query.Set("$select", *queryOptions.Select) + reqQP.Set("$select", *queryOptions.Select) } if queryOptions != nil && queryOptions.Filter != nil { - query.Set("$filter", *queryOptions.Filter) + reqQP.Set("$filter", *queryOptions.Filter) } if tableQueryEntitiesOptions != nil && tableQueryEntitiesOptions.NextPartitionKey != nil { - query.Set("NextPartitionKey", *tableQueryEntitiesOptions.NextPartitionKey) + reqQP.Set("NextPartitionKey", *tableQueryEntitiesOptions.NextPartitionKey) } if tableQueryEntitiesOptions != nil && tableQueryEntitiesOptions.NextRowKey != nil { - query.Set("NextRowKey", *tableQueryEntitiesOptions.NextRowKey) + reqQP.Set("NextRowKey", *tableQueryEntitiesOptions.NextRowKey) } - req.URL.RawQuery = query.Encode() + req.URL.RawQuery = reqQP.Encode() req.Header.Set("x-ms-version", "2019-02-02") if tableQueryEntitiesOptions != nil && tableQueryEntitiesOptions.RequestID != nil { req.Header.Set("x-ms-client-request-id", *tableQueryEntitiesOptions.RequestID) @@ -733,78 +800,89 @@ func (client *tableClient) queryEntitiesHandleResponse(resp *azcore.Response) (T if val := resp.Header.Get("x-ms-continuation-NextRowKey"); val != "" { result.XMSContinuationNextRowKey = &val } - if val := resp.Header.Get("ETag"); val != "" { - result.ETag = &val - } return result, nil } // queryEntitiesHandleError handles the QueryEntities error response. func (client *tableClient) queryEntitiesHandleError(resp *azcore.Response) error { - var err TableServiceError - if err := resp.UnmarshalAsJSON(&err); err != nil { - return err + body, err := resp.Payload() + if err != nil { + return azcore.NewResponseError(err, resp.Response) + } + errType := TableServiceError{raw: string(body)} + if err := resp.UnmarshalAsJSON(&errType); err != nil { + return azcore.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp.Response) } - return azcore.NewResponseError(&err, resp.Response) + return azcore.NewResponseError(&errType, resp.Response) } -// QueryEntitiesWithPartitionAndRowKey - Queries entities in a table. -func (client *tableClient) QueryEntitiesWithPartitionAndRowKey(ctx context.Context, table string, partitionKey string, rowKey string, tableQueryEntitiesWithPartitionAndRowKeyOptions *TableQueryEntitiesWithPartitionAndRowKeyOptions, queryOptions *QueryOptions) (TableEntityQueryResponseResponse, error) { - req, err := client.queryEntitiesWithPartitionAndRowKeyCreateRequest(ctx, table, partitionKey, rowKey, tableQueryEntitiesWithPartitionAndRowKeyOptions, queryOptions) +// QueryEntityWithPartitionAndRowKey - Queries a single entity in a table. +// If the operation fails it returns the *TableServiceError error type. +func (client *tableClient) QueryEntityWithPartitionAndRowKey(ctx context.Context, table string, partitionKey string, rowKey string, tableQueryEntityWithPartitionAndRowKeyOptions *TableQueryEntityWithPartitionAndRowKeyOptions, queryOptions *QueryOptions) (MapOfInterfaceResponse, error) { + req, err := client.queryEntityWithPartitionAndRowKeyCreateRequest(ctx, table, partitionKey, rowKey, tableQueryEntityWithPartitionAndRowKeyOptions, queryOptions) if err != nil { - return TableEntityQueryResponseResponse{}, err + return MapOfInterfaceResponse{}, err } resp, err := client.con.Pipeline().Do(req) if err != nil { - return TableEntityQueryResponseResponse{}, err + return MapOfInterfaceResponse{}, err } if !resp.HasStatusCode(http.StatusOK) { - return TableEntityQueryResponseResponse{}, client.queryEntitiesWithPartitionAndRowKeyHandleError(resp) + return MapOfInterfaceResponse{}, client.queryEntityWithPartitionAndRowKeyHandleError(resp) } - return client.queryEntitiesWithPartitionAndRowKeyHandleResponse(resp) + return client.queryEntityWithPartitionAndRowKeyHandleResponse(resp) } -// queryEntitiesWithPartitionAndRowKeyCreateRequest creates the QueryEntitiesWithPartitionAndRowKey request. -func (client *tableClient) queryEntitiesWithPartitionAndRowKeyCreateRequest(ctx context.Context, table string, partitionKey string, rowKey string, tableQueryEntitiesWithPartitionAndRowKeyOptions *TableQueryEntitiesWithPartitionAndRowKeyOptions, queryOptions *QueryOptions) (*azcore.Request, error) { +// queryEntityWithPartitionAndRowKeyCreateRequest creates the QueryEntityWithPartitionAndRowKey request. +func (client *tableClient) queryEntityWithPartitionAndRowKeyCreateRequest(ctx context.Context, table string, partitionKey string, rowKey string, tableQueryEntityWithPartitionAndRowKeyOptions *TableQueryEntityWithPartitionAndRowKeyOptions, queryOptions *QueryOptions) (*azcore.Request, error) { urlPath := "/{table}(PartitionKey='{partitionKey}',RowKey='{rowKey}')" + if table == "" { + return nil, errors.New("parameter table cannot be empty") + } urlPath = strings.ReplaceAll(urlPath, "{table}", url.PathEscape(table)) + if partitionKey == "" { + return nil, errors.New("parameter partitionKey cannot be empty") + } urlPath = strings.ReplaceAll(urlPath, "{partitionKey}", url.PathEscape(partitionKey)) + if rowKey == "" { + return nil, errors.New("parameter rowKey cannot be empty") + } urlPath = strings.ReplaceAll(urlPath, "{rowKey}", url.PathEscape(rowKey)) req, err := azcore.NewRequest(ctx, http.MethodGet, azcore.JoinPaths(client.con.Endpoint(), urlPath)) if err != nil { return nil, err } req.Telemetry(telemetryInfo) - query := req.URL.Query() - if tableQueryEntitiesWithPartitionAndRowKeyOptions != nil && tableQueryEntitiesWithPartitionAndRowKeyOptions.Timeout != nil { - query.Set("timeout", strconv.FormatInt(int64(*tableQueryEntitiesWithPartitionAndRowKeyOptions.Timeout), 10)) + reqQP := req.URL.Query() + if tableQueryEntityWithPartitionAndRowKeyOptions != nil && tableQueryEntityWithPartitionAndRowKeyOptions.Timeout != nil { + reqQP.Set("timeout", strconv.FormatInt(int64(*tableQueryEntityWithPartitionAndRowKeyOptions.Timeout), 10)) } if queryOptions != nil && queryOptions.Format != nil { - query.Set("$format", string(*queryOptions.Format)) + reqQP.Set("$format", string(*queryOptions.Format)) } if queryOptions != nil && queryOptions.Select != nil { - query.Set("$select", *queryOptions.Select) + reqQP.Set("$select", *queryOptions.Select) } if queryOptions != nil && queryOptions.Filter != nil { - query.Set("$filter", *queryOptions.Filter) + reqQP.Set("$filter", *queryOptions.Filter) } - req.URL.RawQuery = query.Encode() + req.URL.RawQuery = reqQP.Encode() req.Header.Set("x-ms-version", "2019-02-02") - if tableQueryEntitiesWithPartitionAndRowKeyOptions != nil && tableQueryEntitiesWithPartitionAndRowKeyOptions.RequestID != nil { - req.Header.Set("x-ms-client-request-id", *tableQueryEntitiesWithPartitionAndRowKeyOptions.RequestID) + if tableQueryEntityWithPartitionAndRowKeyOptions != nil && tableQueryEntityWithPartitionAndRowKeyOptions.RequestID != nil { + req.Header.Set("x-ms-client-request-id", *tableQueryEntityWithPartitionAndRowKeyOptions.RequestID) } req.Header.Set("DataServiceVersion", "3.0") req.Header.Set("Accept", "application/json;odata=minimalmetadata") return req, nil } -// queryEntitiesWithPartitionAndRowKeyHandleResponse handles the QueryEntitiesWithPartitionAndRowKey response. -func (client *tableClient) queryEntitiesWithPartitionAndRowKeyHandleResponse(resp *azcore.Response) (TableEntityQueryResponseResponse, error) { - var val *TableEntityQueryResponse +// queryEntityWithPartitionAndRowKeyHandleResponse handles the QueryEntityWithPartitionAndRowKey response. +func (client *tableClient) queryEntityWithPartitionAndRowKeyHandleResponse(resp *azcore.Response) (MapOfInterfaceResponse, error) { + var val map[string]interface{} if err := resp.UnmarshalAsJSON(&val); err != nil { - return TableEntityQueryResponseResponse{}, err + return MapOfInterfaceResponse{}, err } - result := TableEntityQueryResponseResponse{RawResponse: resp.Response, TableEntityQueryResponse: val} + result := MapOfInterfaceResponse{RawResponse: resp.Response, Value: val} if val := resp.Header.Get("x-ms-client-request-id"); val != "" { result.ClientRequestID = &val } @@ -817,32 +895,43 @@ func (client *tableClient) queryEntitiesWithPartitionAndRowKeyHandleResponse(res if val := resp.Header.Get("Date"); val != "" { date, err := time.Parse(time.RFC1123, val) if err != nil { - return TableEntityQueryResponseResponse{}, err + return MapOfInterfaceResponse{}, err } result.Date = &date } + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } if val := resp.Header.Get("x-ms-continuation-NextPartitionKey"); val != "" { result.XMSContinuationNextPartitionKey = &val } if val := resp.Header.Get("x-ms-continuation-NextRowKey"); val != "" { result.XMSContinuationNextRowKey = &val } - if val := resp.Header.Get("ETag"); val != "" { - result.ETag = &val + if val := resp.Header.Get("Preference-Applied"); val != "" { + result.PreferenceApplied = &val + } + if val := resp.Header.Get("Content-Type"); val != "" { + result.ContentType = &val } return result, nil } -// queryEntitiesWithPartitionAndRowKeyHandleError handles the QueryEntitiesWithPartitionAndRowKey error response. -func (client *tableClient) queryEntitiesWithPartitionAndRowKeyHandleError(resp *azcore.Response) error { - var err TableServiceError - if err := resp.UnmarshalAsJSON(&err); err != nil { - return err +// queryEntityWithPartitionAndRowKeyHandleError handles the QueryEntityWithPartitionAndRowKey error response. +func (client *tableClient) queryEntityWithPartitionAndRowKeyHandleError(resp *azcore.Response) error { + body, err := resp.Payload() + if err != nil { + return azcore.NewResponseError(err, resp.Response) } - return azcore.NewResponseError(&err, resp.Response) + errType := TableServiceError{raw: string(body)} + if err := resp.UnmarshalAsJSON(&errType); err != nil { + return azcore.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp.Response) + } + return azcore.NewResponseError(&errType, resp.Response) } // SetAccessPolicy - Sets stored access policies for the table that may be used with Shared Access Signatures. +// If the operation fails it returns the *TableServiceError error type. func (client *tableClient) SetAccessPolicy(ctx context.Context, table string, options *TableSetAccessPolicyOptions) (TableSetAccessPolicyResponse, error) { req, err := client.setAccessPolicyCreateRequest(ctx, table, options) if err != nil { @@ -861,29 +950,32 @@ func (client *tableClient) SetAccessPolicy(ctx context.Context, table string, op // setAccessPolicyCreateRequest creates the SetAccessPolicy request. func (client *tableClient) setAccessPolicyCreateRequest(ctx context.Context, table string, options *TableSetAccessPolicyOptions) (*azcore.Request, error) { urlPath := "/{table}" + if table == "" { + return nil, errors.New("parameter table cannot be empty") + } urlPath = strings.ReplaceAll(urlPath, "{table}", url.PathEscape(table)) req, err := azcore.NewRequest(ctx, http.MethodPut, azcore.JoinPaths(client.con.Endpoint(), urlPath)) if err != nil { return nil, err } req.Telemetry(telemetryInfo) - query := req.URL.Query() + reqQP := req.URL.Query() if options != nil && options.Timeout != nil { - query.Set("timeout", strconv.FormatInt(int64(*options.Timeout), 10)) + reqQP.Set("timeout", strconv.FormatInt(int64(*options.Timeout), 10)) } - query.Set("comp", "acl") - req.URL.RawQuery = query.Encode() + reqQP.Set("comp", "acl") + req.URL.RawQuery = reqQP.Encode() req.Header.Set("x-ms-version", "2019-02-02") if options != nil && options.RequestID != nil { req.Header.Set("x-ms-client-request-id", *options.RequestID) } req.Header.Set("Accept", "application/xml") type wrapper struct { - XMLName xml.Name `xml:"SignedIdentifiers"` - TableACL *[]SignedIdentifier `xml:"SignedIdentifier"` + XMLName xml.Name `xml:"SignedIdentifiers"` + TableACL *[]*SignedIdentifier `xml:"SignedIdentifier"` } - if options != nil { - return req, req.MarshalAsXML(wrapper{TableACL: options.TableACL}) + if options != nil && options.TableACL != nil { + return req, req.MarshalAsXML(wrapper{TableACL: &options.TableACL}) } return req, nil } @@ -912,14 +1004,19 @@ func (client *tableClient) setAccessPolicyHandleResponse(resp *azcore.Response) // setAccessPolicyHandleError handles the SetAccessPolicy error response. func (client *tableClient) setAccessPolicyHandleError(resp *azcore.Response) error { - var err TableServiceError - if err := resp.UnmarshalAsJSON(&err); err != nil { - return err + body, err := resp.Payload() + if err != nil { + return azcore.NewResponseError(err, resp.Response) } - return azcore.NewResponseError(&err, resp.Response) + errType := TableServiceError{raw: string(body)} + if err := resp.UnmarshalAsJSON(&errType); err != nil { + return azcore.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp.Response) + } + return azcore.NewResponseError(&errType, resp.Response) } // UpdateEntity - Update entity in a table. +// If the operation fails it returns the *TableServiceError error type. func (client *tableClient) UpdateEntity(ctx context.Context, table string, partitionKey string, rowKey string, tableUpdateEntityOptions *TableUpdateEntityOptions, queryOptions *QueryOptions) (TableUpdateEntityResponse, error) { req, err := client.updateEntityCreateRequest(ctx, table, partitionKey, rowKey, tableUpdateEntityOptions, queryOptions) if err != nil { @@ -938,22 +1035,31 @@ func (client *tableClient) UpdateEntity(ctx context.Context, table string, parti // updateEntityCreateRequest creates the UpdateEntity request. func (client *tableClient) updateEntityCreateRequest(ctx context.Context, table string, partitionKey string, rowKey string, tableUpdateEntityOptions *TableUpdateEntityOptions, queryOptions *QueryOptions) (*azcore.Request, error) { urlPath := "/{table}(PartitionKey='{partitionKey}',RowKey='{rowKey}')" + if table == "" { + return nil, errors.New("parameter table cannot be empty") + } urlPath = strings.ReplaceAll(urlPath, "{table}", url.PathEscape(table)) + if partitionKey == "" { + return nil, errors.New("parameter partitionKey cannot be empty") + } urlPath = strings.ReplaceAll(urlPath, "{partitionKey}", url.PathEscape(partitionKey)) + if rowKey == "" { + return nil, errors.New("parameter rowKey cannot be empty") + } urlPath = strings.ReplaceAll(urlPath, "{rowKey}", url.PathEscape(rowKey)) req, err := azcore.NewRequest(ctx, http.MethodPut, azcore.JoinPaths(client.con.Endpoint(), urlPath)) if err != nil { return nil, err } req.Telemetry(telemetryInfo) - query := req.URL.Query() + reqQP := req.URL.Query() if tableUpdateEntityOptions != nil && tableUpdateEntityOptions.Timeout != nil { - query.Set("timeout", strconv.FormatInt(int64(*tableUpdateEntityOptions.Timeout), 10)) + reqQP.Set("timeout", strconv.FormatInt(int64(*tableUpdateEntityOptions.Timeout), 10)) } if queryOptions != nil && queryOptions.Format != nil { - query.Set("$format", string(*queryOptions.Format)) + reqQP.Set("$format", string(*queryOptions.Format)) } - req.URL.RawQuery = query.Encode() + req.URL.RawQuery = reqQP.Encode() req.Header.Set("x-ms-version", "2019-02-02") if tableUpdateEntityOptions != nil && tableUpdateEntityOptions.RequestID != nil { req.Header.Set("x-ms-client-request-id", *tableUpdateEntityOptions.RequestID) @@ -963,7 +1069,7 @@ func (client *tableClient) updateEntityCreateRequest(ctx context.Context, table req.Header.Set("If-Match", *tableUpdateEntityOptions.IfMatch) } req.Header.Set("Accept", "application/json") - if tableUpdateEntityOptions != nil { + if tableUpdateEntityOptions != nil && tableUpdateEntityOptions.TableEntityProperties != nil { return req, req.MarshalAsJSON(tableUpdateEntityOptions.TableEntityProperties) } return req, nil @@ -996,9 +1102,13 @@ func (client *tableClient) updateEntityHandleResponse(resp *azcore.Response) (Ta // updateEntityHandleError handles the UpdateEntity error response. func (client *tableClient) updateEntityHandleError(resp *azcore.Response) error { - var err TableServiceError - if err := resp.UnmarshalAsJSON(&err); err != nil { - return err + body, err := resp.Payload() + if err != nil { + return azcore.NewResponseError(err, resp.Response) + } + errType := TableServiceError{raw: string(body)} + if err := resp.UnmarshalAsJSON(&errType); err != nil { + return azcore.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp.Response) } - return azcore.NewResponseError(&err, resp.Response) + return azcore.NewResponseError(&errType, resp.Response) } From b606abd89d22acd12565b212c988dd7bb9913b92 Mon Sep 17 00:00:00 2001 From: Christopher Scott Date: Fri, 28 May 2021 13:33:50 -0500 Subject: [PATCH 06/42] AsModels --- sdk/tables/aztables/ci.yml | 4 +- .../aztables/cosmos_patch_transform_policy.go | 2 +- .../shared_policy_shared_key_credential.go | 2 +- sdk/tables/aztables/table_client.go | 30 ++-- sdk/tables/aztables/table_client_test.go | 28 +++- sdk/tables/aztables/table_pagers.go | 142 ++++-------------- sdk/tables/aztables/table_pagers_test.go | 19 ++- sdk/tables/aztables/table_service_client.go | 29 +--- .../aztables/table_service_client_test.go | 8 +- .../aztables/table_transactional_batch.go | 2 +- sdk/tables/aztables/zc_client_options.go | 2 +- sdk/tables/aztables/zc_tableConstants.go | 2 +- sdk/tables/aztables/zt_tableRecordedTests.go | 14 +- .../aztables/zz_generated_connection.go | 3 +- sdk/tables/aztables/zz_generated_constants.go | 2 +- sdk/tables/aztables/zz_generated_models.go | 5 +- .../aztables/zz_generated_response_types.go | 2 +- .../aztables/zz_generated_service_client.go | 5 +- .../aztables/zz_generated_table_client.go | 2 +- .../aztables/zz_generated_time_rfc1123.go | 2 +- .../aztables/zz_generated_time_rfc3339.go | 2 +- 21 files changed, 123 insertions(+), 184 deletions(-) diff --git a/sdk/tables/aztables/ci.yml b/sdk/tables/aztables/ci.yml index 176bc16e42c8..1e3a644b906c 100644 --- a/sdk/tables/aztables/ci.yml +++ b/sdk/tables/aztables/ci.yml @@ -2,12 +2,12 @@ trigger: paths: include: - - sdk/tables/aztables/ + - sdk/tables/aztable/ pr: paths: include: - - sdk/tables/aztables/ + - sdk/tables/aztable/ stages: - template: ../../../eng/pipelines/templates/jobs/archetype-sdk-client.yml diff --git a/sdk/tables/aztables/cosmos_patch_transform_policy.go b/sdk/tables/aztables/cosmos_patch_transform_policy.go index 93e8ffa9d61b..b7b339221717 100644 --- a/sdk/tables/aztables/cosmos_patch_transform_policy.go +++ b/sdk/tables/aztables/cosmos_patch_transform_policy.go @@ -3,7 +3,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package aztables +package aztable import ( "net/http" diff --git a/sdk/tables/aztables/shared_policy_shared_key_credential.go b/sdk/tables/aztables/shared_policy_shared_key_credential.go index 88745e14f667..c9c2d7beeb1a 100644 --- a/sdk/tables/aztables/shared_policy_shared_key_credential.go +++ b/sdk/tables/aztables/shared_policy_shared_key_credential.go @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package aztables +package aztable import ( "bytes" diff --git a/sdk/tables/aztables/table_client.go b/sdk/tables/aztables/table_client.go index ec4a3e16819c..46ee1dea1174 100644 --- a/sdk/tables/aztables/table_client.go +++ b/sdk/tables/aztables/table_client.go @@ -1,14 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package aztables +package aztable import ( "context" "errors" "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/internal/runtime" ) // A TableClient represents a URL to an Azure Storage blob; the blob may be a block blob, append blob, or page blob. @@ -27,18 +26,18 @@ const ( ) // NewTableClient creates a TableClient object using the specified URL and request policy pipeline. -func NewTableClient(tableName string, serviceURL string, cred azcore.Credential, options *TableClientOptions) (*TableClient, error) { +func NewTableClient(tableName string, serviceURL string, cred azcore.Credential, options TableClientOptions) (*TableClient, error) { s, err := NewTableServiceClient(serviceURL, cred, options) - return s.GetTableClient(tableName), err + return s.NewTableClient(tableName), err } // Create creates the table with the name specified in NewTableClient -func (t *TableClient) Create(ctx context.Context) (*TableResponseResponse, *runtime.ResponseError) { +func (t *TableClient) Create(ctx context.Context) (TableResponseResponse, error) { return t.service.Create(ctx, t.Name) } // Delete deletes the current table -func (t *TableClient) Delete(ctx context.Context) (*TableDeleteResponse, *runtime.ResponseError) { +func (t *TableClient) Delete(ctx context.Context) (TableDeleteResponse, error) { return t.service.Delete(ctx, t.Name) } @@ -47,11 +46,6 @@ func (t *TableClient) Query(queryOptions QueryOptions) TableEntityQueryResponseP return &tableEntityQueryResponsePager{tableClient: t, queryOptions: &queryOptions, tableQueryOptions: &TableQueryEntitiesOptions{}} } -// QueryAsModel queries the table using the specified QueryOptions and attempts to serialize the response as the supplied interface type -func (t *TableClient) QueryAsModel(opt QueryOptions, s FromMapper) StructEntityQueryResponsePager { - return &structQueryResponsePager{mapper: s, tableClient: t, queryOptions: &opt, tableQueryOptions: &TableQueryEntitiesOptions{}} -} - func (t *TableClient) GetEntity(ctx context.Context, partitionKey string, rowKey string) (MapOfInterfaceResponse, error) { resp, err := t.client.QueryEntityWithPartitionAndRowKey(ctx, t.Name, partitionKey, rowKey, &TableQueryEntityWithPartitionAndRowKeyOptions{}, &QueryOptions{}) if err != nil { @@ -62,29 +56,29 @@ func (t *TableClient) GetEntity(ctx context.Context, partitionKey string, rowKey } // AddEntity Creates an entity from a map value. -func (t *TableClient) AddEntity(ctx context.Context, entity map[string]interface{}) (*TableInsertEntityResponse, *runtime.ResponseError) { +func (t *TableClient) AddEntity(ctx context.Context, entity map[string]interface{}) (TableInsertEntityResponse, error) { toOdataAnnotatedDictionary(&entity) resp, err := t.client.InsertEntity(ctx, t.Name, &TableInsertEntityOptions{TableEntityProperties: entity, ResponsePreference: ResponseFormatReturnNoContent.ToPtr()}, &QueryOptions{}) if err == nil { insertResp := resp.(TableInsertEntityResponse) - return &insertResp, nil + return insertResp, nil } else { - return nil, convertErr(err) + return TableInsertEntityResponse{}, err } } // AddModelEntity creates an entity from an arbitrary struct value. -func (t *TableClient) AddModelEntity(ctx context.Context, entity interface{}) (*TableInsertEntityResponse, *runtime.ResponseError) { +func (t *TableClient) AddModelEntity(ctx context.Context, entity interface{}) (TableInsertEntityResponse, error) { entmap, err := toMap(entity) if err != nil { - return nil, azcore.NewResponseError(err, nil).(*runtime.ResponseError) + return TableInsertEntityResponse{}, azcore.NewResponseError(err, nil) } resp, err := t.client.InsertEntity(ctx, t.Name, &TableInsertEntityOptions{TableEntityProperties: *entmap, ResponsePreference: ResponseFormatReturnNoContent.ToPtr()}, &QueryOptions{}) if err == nil { insertResp := resp.(TableInsertEntityResponse) - return &insertResp, nil + return insertResp, nil } else { - return nil, convertErr(err) + return TableInsertEntityResponse{}, err } } diff --git a/sdk/tables/aztables/table_client_test.go b/sdk/tables/aztables/table_client_test.go index 3d07b0cba508..a2b2d339050b 100644 --- a/sdk/tables/aztables/table_client_test.go +++ b/sdk/tables/aztables/table_client_test.go @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package aztables +package aztable import ( "bytes" + "errors" "io/ioutil" "net/http" "testing" @@ -42,7 +43,9 @@ func (s *tableClientLiveTests) TestServiceErrors() { // Create a duplicate table to produce an error _, err := client.Create(ctx) - assert.Equal(s.T(), err.RawResponse().StatusCode, http.StatusConflict) + var svcErr *runtime.ResponseError + errors.As(err, &svcErr) + assert.Equal(s.T(), svcErr.RawResponse().StatusCode, http.StatusConflict) } func (s *tableClientLiveTests) TestCreateTable() { @@ -77,7 +80,9 @@ func (s *tableClientLiveTests) TestAddComplexEntity() { for _, e := range *entitiesToCreate { _, err := client.AddModelEntity(ctx, e) - assert.Nilf(err, getStringFromBody(err)) + var svcErr *runtime.ResponseError + errors.As(err, &svcErr) + assert.Nilf(err, getStringFromBody(svcErr)) } } @@ -223,28 +228,37 @@ func (s *tableClientLiveTests) TestQuerySimpleEntity() { filter := "RowKey lt '5'" expectedCount := 4 var resp TableEntityQueryResponseResponse + var models []simpleEntity pager := client.Query(QueryOptions{Filter: &filter}) for pager.NextPage(ctx) { resp = pager.PageResponse() + models = make([]simpleEntity, len(resp.TableEntityQueryResponse.Value)) + resp.TableEntityQueryResponse.AsModels(&models) assert.Equal(len(resp.TableEntityQueryResponse.Value), expectedCount) } resp = pager.PageResponse() assert.Nil(pager.Err()) - for _, e := range resp.TableEntityQueryResponse.Value { + for i, e := range resp.TableEntityQueryResponse.Value { _, ok := e[partitionKey].(string) assert.True(ok) + assert.Equal(e[partitionKey], models[i].PartitionKey) _, ok = e[rowKey].(string) assert.True(ok) + assert.Equal(e[rowKey], models[i].RowKey) _, ok = e[timestamp].(string) assert.True(ok) _, ok = e[etagOdata].(string) assert.True(ok) + assert.Equal(e[etagOdata], models[i].ETag) _, ok = e["StringProp"].(string) assert.True(ok) //TODO: fix when serialization is implemented _, ok = e["IntProp"].(float64) + assert.Equal(int(e["IntProp"].(float64)), models[i].IntProp) assert.True(ok) _, ok = e["BoolProp"].(bool) + assert.Equal((*entitiesToCreate)[i]["BoolProp"], e["BoolProp"]) + assert.Equal(e["BoolProp"], models[i].BoolProp) assert.True(ok) } } @@ -458,11 +472,13 @@ func (s *tableClientLiveTests) init(doCreate bool) (*TableClient, func()) { assert := assert.New(s.T()) context := getTestContext(s.T().Name()) tableName, _ := getTableName(context) - client := context.client.GetTableClient(tableName) + client := context.client.NewTableClient(tableName) if doCreate { _, err := client.Create(ctx) if err != nil { - assert.FailNow(getStringFromBody(err)) + var svcErr *runtime.ResponseError + errors.As(err, &svcErr) + assert.FailNow(getStringFromBody(svcErr)) } } return client, func() { diff --git a/sdk/tables/aztables/table_pagers.go b/sdk/tables/aztables/table_pagers.go index d73de8a8f5c3..3ed7e9c18c19 100644 --- a/sdk/tables/aztables/table_pagers.go +++ b/sdk/tables/aztables/table_pagers.go @@ -1,76 +1,28 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package aztables +package aztable import ( "context" "encoding/base64" "errors" "fmt" - "net/http" "reflect" "strconv" "strings" "time" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/internal/uuid" ) -// Pager for Table entity queries +// TableEntityQueryResponsePager is a Pager for Table entity query results. type TableEntityQueryResponsePager interface { - // NextPage returns true if the pager advanced to the next page. - // Returns false if there are no more pages or an error occurred. - NextPage(context.Context) bool + azcore.Pager - // Page returns the current TableQueryResponseResponse. + // PageResponse returns the current TableQueryResponseResponse. PageResponse() TableEntityQueryResponseResponse - - // Err returns the last error encountered while paging. - Err() error -} - -type StructEntityQueryResponsePager interface { - NextPage(context.Context) bool - PageResponse() StructQueryResponseResponse - Err() error -} - -type StructQueryResponseResponse struct { - // ClientRequestID contains the information returned from the x-ms-client-request-id header response. - ClientRequestID *string - - // Date contains the information returned from the Date header response. - Date *time.Time - - // ETag contains the information returned from the ETag header response. - ETag *string - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response - - // RequestID contains the information returned from the x-ms-request-id header response. - RequestID *string - - // The properties for the table entity query response. - StructQueryResponse *StructQueryResponse - - // Version contains the information returned from the x-ms-version header response. - Version *string - - // XMSContinuationNextPartitionKey contains the information returned from the x-ms-continuation-NextPartitionKey header response. - XMSContinuationNextPartitionKey *string - - // XMSContinuationNextRowKey contains the information returned from the x-ms-continuation-NextRowKey header response. - XMSContinuationNextRowKey *string -} - -type StructQueryResponse struct { - // The metadata response of the table. - OdataMetadata *string `json:"odata.metadata,omitempty"` - - // List of table entities. - Value *[]interface{} `json:"value,omitempty"` } type tableEntityQueryResponsePager struct { @@ -102,56 +54,28 @@ func (p *tableEntityQueryResponsePager) Err() error { return p.err } -type structQueryResponsePager struct { - mapper FromMapper - tableClient *TableClient - current *StructQueryResponseResponse - tableQueryOptions *TableQueryEntitiesOptions - queryOptions *QueryOptions - err error -} - -func (p *structQueryResponsePager) NextPage(ctx context.Context) bool { - if p.err != nil || (p.current != nil && p.current.XMSContinuationNextPartitionKey == nil && p.current.XMSContinuationNextRowKey == nil) { - return false - } - var resp TableEntityQueryResponseResponse - resp, p.err = p.tableClient.client.QueryEntities(ctx, p.tableClient.Name, p.tableQueryOptions, p.queryOptions) - castAndRemoveAnnotationsSlice(&resp.TableEntityQueryResponse.Value) - //p.current = &resp - r := make([]interface{}, 0, len(resp.TableEntityQueryResponse.Value)) - for _, e := range resp.TableEntityQueryResponse.Value { - r = append(r, p.mapper.FromMap(&e)) - } - p.current = &StructQueryResponseResponse{StructQueryResponse: &StructQueryResponse{Value: &r}} - p.tableQueryOptions.NextPartitionKey = resp.XMSContinuationNextPartitionKey - p.tableQueryOptions.NextRowKey = resp.XMSContinuationNextRowKey - return p.err == nil && resp.TableEntityQueryResponse.Value != nil && len(resp.TableEntityQueryResponse.Value) > 0 -} - -func (p *structQueryResponsePager) PageResponse() StructQueryResponseResponse { - return *p.current -} - -func (p *structQueryResponsePager) Err() error { - return p.err -} - -// Pager for Table Queries +// TableQueryResponsePager is a Pager for Table Queries type TableQueryResponsePager interface { - // NextPage returns true if the pager advanced to the next page. - // Returns false if there are no more pages or an error occurred. - NextPage(context.Context) bool + azcore.Pager - // Page returns the current TableQueryResponseResponse. + // PageResponse returns the current TableQueryResponseResponse. PageResponse() TableQueryResponseResponse - - // Err returns the last error encountered while paging. - Err() error } -type FromMapper interface { - FromMap(e *map[string]interface{}) interface{} +// AsModels converts each map[string]interface{} entity result into a strongly slice of strongly typed models +// The modelSlice parameter should be a pointer to a slice of stuct types that match the entity model type in the table response. +func (r *TableEntityQueryResponse) AsModels(modelSlice interface{}) error { + models := reflect.ValueOf(modelSlice).Elem() + tt := GetTypeArray(models.Interface()) + fmap := getTypeValueMap(tt) + for i, e := range r.Value { + err := fromMap(tt, fmap, &e, models.Index(i)) + if err != nil { + return nil + } + } + + return nil } type tableQueryResponsePager struct { @@ -349,11 +273,8 @@ func toMap(ent interface{}) (*map[string]interface{}, error) { return &entMap, nil } -func fromMap(src interface{}, fmap *map[string]int, m *map[string]interface{}) (interface{}, error) { - tt := reflect.TypeOf(src) - srcVal := reflect.New(tt).Elem() - - for k, v := range *m { +func fromMap(tt reflect.Type, fmap *map[string]int, src *map[string]interface{}, srcVal reflect.Value) error { + for k, v := range *src { // skip if this is an OData type descriptor iSuffix := strings.Index(k, OdataType) if iSuffix > 0 { @@ -367,6 +288,8 @@ func fromMap(src interface{}, fmap *map[string]int, m *map[string]interface{}) ( switch val.Kind() { case reflect.String: val.SetString(v.(string)) + case reflect.Bool: + val.SetBool(v.(bool)) case reflect.Float64: val.SetFloat(v.(float64)) case reflect.Int: @@ -374,7 +297,7 @@ func fromMap(src interface{}, fmap *map[string]int, m *map[string]interface{}) ( case reflect.Int64: i64, err := strconv.ParseInt(v.(string), 10, 64) if err != nil { - return nil, err + return err } val.SetInt(i64) case reflect.Struct: @@ -382,7 +305,7 @@ func fromMap(src interface{}, fmap *map[string]int, m *map[string]interface{}) ( case "time.Time": t, err := time.Parse(ISO8601, v.(string)) if err != nil { - return nil, err + return err } val.Set(reflect.ValueOf(t)) } @@ -395,7 +318,7 @@ func fromMap(src interface{}, fmap *map[string]int, m *map[string]interface{}) ( } case reflect.Array, reflect.Map, reflect.Slice: if GetTypeArray(val.Interface()) != reflect.TypeOf(byte(0)) { - return nil, errors.New("arrays and slices must be of type byte") + return errors.New("arrays and slices must be of type byte") } // // check if this is a uuid field as decorated by a tag if _, ok := tt.Field(fIndex).Tag.Lookup("uuid"); ok { @@ -404,18 +327,17 @@ func fromMap(src interface{}, fmap *map[string]int, m *map[string]interface{}) ( } else { b, err := base64.StdEncoding.DecodeString(v.(string)) if err != nil { - return nil, err + return err } val.SetBytes(b) } } } - return srcVal.Interface(), nil + return nil } // getTypeValueMap - builds a map of Field names to their Field index for the given interface{} -func getTypeValueMap(i interface{}) *map[string]int { - tt := reflect.TypeOf(complexEntity{}) +func getTypeValueMap(tt reflect.Type) *map[string]int { nf := tt.NumField() fmap := make(map[string]int) // build a map of field types diff --git a/sdk/tables/aztables/table_pagers_test.go b/sdk/tables/aztables/table_pagers_test.go index 92b06191ad4f..606884fce573 100644 --- a/sdk/tables/aztables/table_pagers_test.go +++ b/sdk/tables/aztables/table_pagers_test.go @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package aztables +package aztable import ( "encoding/base64" @@ -11,6 +11,7 @@ import ( "io/ioutil" "math" "net/http" + "reflect" "strconv" "strings" "testing" @@ -83,15 +84,16 @@ func BenchmarkUnMarshal_AsJson_CastAndRemove_Map(b *testing.B) { func BenchmarkUnMarshal_FromMap_Entity(b *testing.B) { assert := assert.New(b) - fmap := getTypeValueMap(complexEntity{}) + tt := reflect.TypeOf(complexEntity{}) + fmap := getTypeValueMap(tt) bt := []byte(complexPayload) for i := 0; i < b.N; i++ { var val = make(map[string]interface{}) json.Unmarshal(bt, &val) - result, err := fromMap(complexEntity{}, fmap, &val) + result := complexEntity{} + err := fromMap(tt, fmap, &val, reflect.ValueOf(&result).Elem()) assert.Nil(err) - ent := result.(complexEntity) - assert.Equal("somePartition", ent.PartitionKey) + assert.Equal("somePartition", result.PartitionKey) } } @@ -163,10 +165,11 @@ func TestDeserializeFromMap(t *testing.T) { bt := []byte(complexPayload) var val = make(map[string]interface{}) json.Unmarshal(bt, &val) - result, err := fromMap(complexEntity{}, getTypeValueMap(complexEntity{}), &val) + var result complexEntity = complexEntity{} + tt := reflect.TypeOf(complexEntity{}) + err := fromMap(tt, getTypeValueMap(tt), &val, reflect.ValueOf(&result).Elem()) assert.Nil(err) - ent := result.(complexEntity) - assert.EqualValues(expected, ent) + assert.EqualValues(expected, result) } func createComplexEntity() complexEntity { diff --git a/sdk/tables/aztables/table_service_client.go b/sdk/tables/aztables/table_service_client.go index 63dc45093e93..59dc7267cfc7 100644 --- a/sdk/tables/aztables/table_service_client.go +++ b/sdk/tables/aztables/table_service_client.go @@ -1,15 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package aztables +package aztable import ( "context" - "errors" "strings" "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/internal/runtime" ) const ( @@ -25,7 +23,7 @@ type TableServiceClient struct { } // NewTableServiceClient creates a TableClient object using the specified URL and request policy pipeline. -func NewTableServiceClient(serviceURL string, cred azcore.Credential, options *TableClientOptions) (*TableServiceClient, error) { +func NewTableServiceClient(serviceURL string, cred azcore.Credential, options TableClientOptions) (*TableServiceClient, error) { conOptions := options.getConnectionOptions() if isCosmosEndpoint(serviceURL) { conOptions.PerCallPolicies = []azcore.Policy{CosmosPatchTransformPolicy{}} @@ -36,25 +34,23 @@ func NewTableServiceClient(serviceURL string, cred azcore.Credential, options *T } // Gets a TableClient affinitzed to the specified table name and initialized with the same serviceURL and credentials as this TableServiceClient -func (t *TableServiceClient) GetTableClient(tableName string) *TableClient { +func (t *TableServiceClient) NewTableClient(tableName string) *TableClient { return &TableClient{client: t.client, cred: t.cred, Name: tableName, service: t} } // Creates a table with the specified name -func (t *TableServiceClient) Create(ctx context.Context, name string) (*TableResponseResponse, *runtime.ResponseError) { - var r *TableResponseResponse = nil +func (t *TableServiceClient) Create(ctx context.Context, name string) (TableResponseResponse, error) { resp, err := t.client.Create(ctx, TableProperties{&name}, new(TableCreateOptions), new(QueryOptions)) if err == nil { tableResp := resp.(TableResponseResponse) - r = &tableResp + return tableResp, nil } - return r, convertErr(err) + return TableResponseResponse{}, err } // Deletes a table by name -func (t *TableServiceClient) Delete(ctx context.Context, name string) (*TableDeleteResponse, *runtime.ResponseError) { - resp, err := t.client.Delete(ctx, name, nil) - return &resp, convertErr(err) +func (t *TableServiceClient) Delete(ctx context.Context, name string) (TableDeleteResponse, error) { + return t.client.Delete(ctx, name, nil) } // Queries the tables using the specified QueryOptions @@ -68,12 +64,3 @@ func isCosmosEndpoint(url string) bool { strings.Index(url, CosmosTableDomain) >= 0 || strings.Index(url, LegacyCosmosTableDomain) >= 0 } - -func convertErr(err error) *runtime.ResponseError { - var e *runtime.ResponseError - if err == nil || !errors.As(err, &e) { - return nil - } else { - return e - } -} diff --git a/sdk/tables/aztables/table_service_client_test.go b/sdk/tables/aztables/table_service_client_test.go index a1f728789ebe..286c55f76abf 100644 --- a/sdk/tables/aztables/table_service_client_test.go +++ b/sdk/tables/aztables/table_service_client_test.go @@ -1,13 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package aztables +package aztable import ( + "errors" "fmt" "net/http" "testing" + "github.com/Azure/azure-sdk-for-go/sdk/internal/runtime" "github.com/Azure/azure-sdk-for-go/sdk/internal/testframework" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/suite" @@ -41,7 +43,9 @@ func (s *tableServiceClientLiveTests) TestServiceErrors() { assert.Nil(err) // Create a duplicate table to produce an error - _, svcErr := context.client.Create(ctx, tableName) + _, err = context.client.Create(ctx, tableName) + var svcErr *runtime.ResponseError + errors.As(err, &svcErr) assert.Equal(svcErr.RawResponse().StatusCode, http.StatusConflict) } diff --git a/sdk/tables/aztables/table_transactional_batch.go b/sdk/tables/aztables/table_transactional_batch.go index f208725c3a39..82801a8ca12f 100644 --- a/sdk/tables/aztables/table_transactional_batch.go +++ b/sdk/tables/aztables/table_transactional_batch.go @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package aztables +package aztable import ( "bufio" diff --git a/sdk/tables/aztables/zc_client_options.go b/sdk/tables/aztables/zc_client_options.go index f0a7200fd141..e06d97d51dc8 100644 --- a/sdk/tables/aztables/zc_client_options.go +++ b/sdk/tables/aztables/zc_client_options.go @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package aztables +package aztable import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" diff --git a/sdk/tables/aztables/zc_tableConstants.go b/sdk/tables/aztables/zc_tableConstants.go index 69d77706df20..3514394724d2 100644 --- a/sdk/tables/aztables/zc_tableConstants.go +++ b/sdk/tables/aztables/zc_tableConstants.go @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package aztables +package aztable const ( timestamp = "Timestamp" diff --git a/sdk/tables/aztables/zt_tableRecordedTests.go b/sdk/tables/aztables/zt_tableRecordedTests.go index 1141e42396fc..6ec06393392c 100644 --- a/sdk/tables/aztables/zt_tableRecordedTests.go +++ b/sdk/tables/aztables/zt_tableRecordedTests.go @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package aztables +package aztable import ( "context" @@ -81,7 +81,7 @@ func recordedTestSetup(t *testing.T, testName string, endpointType EndpointType, uri = cosmosURI(accountName, suffix) } - client, err := NewTableServiceClient(uri, cred, &TableClientOptions{HTTPClient: recording, Retry: azcore.RetryOptions{MaxRetries: -1}}) + client, err := NewTableServiceClient(uri, cred, TableClientOptions{HTTPClient: recording, Retry: azcore.RetryOptions{MaxRetries: -1}}) assert.Nil(err) clientsMap[testName] = &testContext{client: client, recording: recording, context: &context} } @@ -186,6 +186,16 @@ func createComplexEntities(context *testContext, count int, pk string) *[]comple return &result } +type simpleEntity struct { + ETag string + PartitionKey string + RowKey string + Timestamp time.Time + IntProp int + BoolProp bool + StringProp string +} + type complexEntity struct { ETag string PartitionKey string diff --git a/sdk/tables/aztables/zz_generated_connection.go b/sdk/tables/aztables/zz_generated_connection.go index 188d3c30126a..b7bb8ee32351 100644 --- a/sdk/tables/aztables/zz_generated_connection.go +++ b/sdk/tables/aztables/zz_generated_connection.go @@ -5,10 +5,11 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -package aztables +package aztable import ( "fmt" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" ) diff --git a/sdk/tables/aztables/zz_generated_constants.go b/sdk/tables/aztables/zz_generated_constants.go index 2b5930e1e9bc..ea93a2783c11 100644 --- a/sdk/tables/aztables/zz_generated_constants.go +++ b/sdk/tables/aztables/zz_generated_constants.go @@ -5,7 +5,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -package aztables +package aztable // GeoReplicationStatusType - The status of the secondary location. type GeoReplicationStatusType string diff --git a/sdk/tables/aztables/zz_generated_models.go b/sdk/tables/aztables/zz_generated_models.go index d855a4d87bd4..3daf1c657f99 100644 --- a/sdk/tables/aztables/zz_generated_models.go +++ b/sdk/tables/aztables/zz_generated_models.go @@ -5,14 +5,15 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -package aztables +package aztable import ( "encoding/json" "encoding/xml" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" "reflect" "time" + + "github.com/Azure/azure-sdk-for-go/sdk/azcore" ) // AccessPolicy - An Access policy. diff --git a/sdk/tables/aztables/zz_generated_response_types.go b/sdk/tables/aztables/zz_generated_response_types.go index ec81d9e0ca7b..e962b27b4774 100644 --- a/sdk/tables/aztables/zz_generated_response_types.go +++ b/sdk/tables/aztables/zz_generated_response_types.go @@ -5,7 +5,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -package aztables +package aztable import ( "net/http" diff --git a/sdk/tables/aztables/zz_generated_service_client.go b/sdk/tables/aztables/zz_generated_service_client.go index 014bdf4fee9e..7408d632f177 100644 --- a/sdk/tables/aztables/zz_generated_service_client.go +++ b/sdk/tables/aztables/zz_generated_service_client.go @@ -5,15 +5,16 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -package aztables +package aztable import ( "context" "fmt" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" "net/http" "strconv" "time" + + "github.com/Azure/azure-sdk-for-go/sdk/azcore" ) type serviceClient struct { diff --git a/sdk/tables/aztables/zz_generated_table_client.go b/sdk/tables/aztables/zz_generated_table_client.go index 322ff68c7481..2f5529190ac3 100644 --- a/sdk/tables/aztables/zz_generated_table_client.go +++ b/sdk/tables/aztables/zz_generated_table_client.go @@ -5,7 +5,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -package aztables +package aztable import ( "context" diff --git a/sdk/tables/aztables/zz_generated_time_rfc1123.go b/sdk/tables/aztables/zz_generated_time_rfc1123.go index 618f7cf33fb5..e8cd4d9053de 100644 --- a/sdk/tables/aztables/zz_generated_time_rfc1123.go +++ b/sdk/tables/aztables/zz_generated_time_rfc1123.go @@ -5,7 +5,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -package aztables +package aztable import ( "strings" diff --git a/sdk/tables/aztables/zz_generated_time_rfc3339.go b/sdk/tables/aztables/zz_generated_time_rfc3339.go index f4161ad815bb..dadfddb3cbd3 100644 --- a/sdk/tables/aztables/zz_generated_time_rfc3339.go +++ b/sdk/tables/aztables/zz_generated_time_rfc3339.go @@ -5,7 +5,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -package aztables +package aztable import ( "regexp" From 8e109309d42aa7d0c02412b4fecfe2beb01f0531 Mon Sep 17 00:00:00 2001 From: Christopher Scott Date: Fri, 28 May 2021 13:39:51 -0500 Subject: [PATCH 07/42] rename --- sdk/tables/{aztables => aztable}/CHANGELOG.md | 0 sdk/tables/{aztables => aztable}/LICENSE | 0 sdk/tables/{aztables => aztable}/README.md | 2 +- sdk/tables/{aztables => aztable}/ci.yml | 0 .../{aztables => aztable}/cosmos_patch_transform_policy.go | 0 sdk/tables/{aztables => aztable}/go.mod | 2 +- sdk/tables/{aztables => aztable}/go.sum | 0 .../TestServiceClient_Cosmos/TestCreateTable-variables.yaml | 0 .../recordings/TestServiceClient_Cosmos/TestCreateTable.yaml | 0 .../TestServiceClient_Cosmos/TestQueryTable-variables.yaml | 0 .../recordings/TestServiceClient_Cosmos/TestQueryTable.yaml | 0 .../TestServiceClient_Cosmos/TestServiceErrors-variables.yaml | 0 .../recordings/TestServiceClient_Cosmos/TestServiceErrors.yaml | 0 .../TestServiceClient_Storage/TestCreateTable-variables.yaml | 0 .../recordings/TestServiceClient_Storage/TestCreateTable.yaml | 0 .../TestServiceClient_Storage/TestQueryTable-variables.yaml | 0 .../recordings/TestServiceClient_Storage/TestQueryTable.yaml | 0 .../TestServiceClient_Storage/TestServiceErrors-variables.yaml | 0 .../recordings/TestServiceClient_Storage/TestServiceErrors.yaml | 0 .../TestTableClient_Cosmos/TestAddComplexEntity-variables.yaml | 0 .../recordings/TestTableClient_Cosmos/TestAddComplexEntity.yaml | 0 .../TestTableClient_Cosmos/TestAddEntity-variables.yaml | 0 .../recordings/TestTableClient_Cosmos/TestAddEntity.yaml | 0 .../TestTableClient_Cosmos/TestBatchAdd-variables.yaml | 0 .../recordings/TestTableClient_Cosmos/TestBatchAdd.yaml | 0 .../TestTableClient_Cosmos/TestBatchError-variables.yaml | 0 .../recordings/TestTableClient_Cosmos/TestBatchError.yaml | 0 .../TestTableClient_Cosmos/TestBatchMixed-variables.yaml | 0 .../recordings/TestTableClient_Cosmos/TestBatchMixed.yaml | 0 .../TestTableClient_Cosmos/TestCreateTable-variables.yaml | 0 .../recordings/TestTableClient_Cosmos/TestCreateTable.yaml | 0 .../TestTableClient_Cosmos/TestDeleteEntity-variables.yaml | 0 .../recordings/TestTableClient_Cosmos/TestDeleteEntity.yaml | 0 .../TestTableClient_Cosmos/TestGetEntity-variables.yaml | 0 .../recordings/TestTableClient_Cosmos/TestGetEntity.yaml | 0 .../TestTableClient_Cosmos/TestMergeEntity-variables.yaml | 0 .../recordings/TestTableClient_Cosmos/TestMergeEntity.yaml | 0 .../TestQueryComplexEntity-variables.yaml | 0 .../TestTableClient_Cosmos/TestQueryComplexEntity.yaml | 0 .../TestTableClient_Cosmos/TestQuerySimpleEntity-variables.yaml | 0 .../TestTableClient_Cosmos/TestQuerySimpleEntity.yaml | 0 .../TestTableClient_Cosmos/TestServiceErrors-variables.yaml | 0 .../recordings/TestTableClient_Cosmos/TestServiceErrors.yaml | 0 .../TestTableClient_Cosmos/TestUpsertEntity-variables.yaml | 0 .../recordings/TestTableClient_Cosmos/TestUpsertEntity.yaml | 0 .../TestTableClient_Storage/TestAddComplexEntity-variables.yaml | 0 .../TestTableClient_Storage/TestAddComplexEntity.yaml | 0 .../TestTableClient_Storage/TestAddEntity-variables.yaml | 0 .../recordings/TestTableClient_Storage/TestAddEntity.yaml | 0 .../TestTableClient_Storage/TestBatchAdd-variables.yaml | 0 .../recordings/TestTableClient_Storage/TestBatchAdd.yaml | 0 .../TestTableClient_Storage/TestBatchError-variables.yaml | 0 .../recordings/TestTableClient_Storage/TestBatchError.yaml | 0 .../TestTableClient_Storage/TestBatchMixed-variables.yaml | 0 .../recordings/TestTableClient_Storage/TestBatchMixed.yaml | 0 .../TestTableClient_Storage/TestCreateTable-variables.yaml | 0 .../recordings/TestTableClient_Storage/TestCreateTable.yaml | 0 .../TestTableClient_Storage/TestDeleteEntity-variables.yaml | 0 .../recordings/TestTableClient_Storage/TestDeleteEntity.yaml | 0 .../TestTableClient_Storage/TestGetEntity-variables.yaml | 0 .../recordings/TestTableClient_Storage/TestGetEntity.yaml | 0 .../TestTableClient_Storage/TestMergeEntity-variables.yaml | 0 .../recordings/TestTableClient_Storage/TestMergeEntity.yaml | 0 .../TestQueryComplexEntity-variables.yaml | 0 .../TestTableClient_Storage/TestQueryComplexEntity.yaml | 0 .../TestQuerySimpleEntity-variables.yaml | 0 .../TestTableClient_Storage/TestQuerySimpleEntity.yaml | 0 .../TestTableClient_Storage/TestServiceErrors-variables.yaml | 0 .../recordings/TestTableClient_Storage/TestServiceErrors.yaml | 0 .../TestTableClient_Storage/TestUpsertEntity-variables.yaml | 0 .../recordings/TestTableClient_Storage/TestUpsertEntity.yaml | 0 .../shared_policy_shared_key_credential.go | 0 sdk/tables/{aztables => aztable}/table_client.go | 0 sdk/tables/{aztables => aztable}/table_client_test.go | 0 sdk/tables/{aztables => aztable}/table_pagers.go | 0 sdk/tables/{aztables => aztable}/table_pagers_test.go | 0 sdk/tables/{aztables => aztable}/table_service_client.go | 0 sdk/tables/{aztables => aztable}/table_service_client_test.go | 0 sdk/tables/{aztables => aztable}/table_transactional_batch.go | 0 sdk/tables/{aztables => aztable}/zc_client_options.go | 0 sdk/tables/{aztables => aztable}/zc_tableConstants.go | 0 sdk/tables/{aztables => aztable}/zt_tableRecordedTests.go | 0 sdk/tables/{aztables => aztable}/zz_generated_connection.go | 2 +- sdk/tables/{aztables => aztable}/zz_generated_constants.go | 0 sdk/tables/{aztables => aztable}/zz_generated_models.go | 0 sdk/tables/{aztables => aztable}/zz_generated_response_types.go | 0 sdk/tables/{aztables => aztable}/zz_generated_service_client.go | 0 sdk/tables/{aztables => aztable}/zz_generated_table_client.go | 0 sdk/tables/{aztables => aztable}/zz_generated_time_rfc1123.go | 0 sdk/tables/{aztables => aztable}/zz_generated_time_rfc3339.go | 0 90 files changed, 3 insertions(+), 3 deletions(-) rename sdk/tables/{aztables => aztable}/CHANGELOG.md (100%) rename sdk/tables/{aztables => aztable}/LICENSE (100%) rename sdk/tables/{aztables => aztable}/README.md (97%) rename sdk/tables/{aztables => aztable}/ci.yml (100%) rename sdk/tables/{aztables => aztable}/cosmos_patch_transform_policy.go (100%) rename sdk/tables/{aztables => aztable}/go.mod (85%) rename sdk/tables/{aztables => aztable}/go.sum (100%) rename sdk/tables/{aztables => aztable}/recordings/TestServiceClient_Cosmos/TestCreateTable-variables.yaml (100%) rename sdk/tables/{aztables => aztable}/recordings/TestServiceClient_Cosmos/TestCreateTable.yaml (100%) rename sdk/tables/{aztables => aztable}/recordings/TestServiceClient_Cosmos/TestQueryTable-variables.yaml (100%) rename sdk/tables/{aztables => aztable}/recordings/TestServiceClient_Cosmos/TestQueryTable.yaml (100%) rename sdk/tables/{aztables => aztable}/recordings/TestServiceClient_Cosmos/TestServiceErrors-variables.yaml (100%) rename sdk/tables/{aztables => aztable}/recordings/TestServiceClient_Cosmos/TestServiceErrors.yaml (100%) rename sdk/tables/{aztables => aztable}/recordings/TestServiceClient_Storage/TestCreateTable-variables.yaml (100%) rename sdk/tables/{aztables => aztable}/recordings/TestServiceClient_Storage/TestCreateTable.yaml (100%) rename sdk/tables/{aztables => aztable}/recordings/TestServiceClient_Storage/TestQueryTable-variables.yaml (100%) rename sdk/tables/{aztables => aztable}/recordings/TestServiceClient_Storage/TestQueryTable.yaml (100%) rename sdk/tables/{aztables => aztable}/recordings/TestServiceClient_Storage/TestServiceErrors-variables.yaml (100%) rename sdk/tables/{aztables => aztable}/recordings/TestServiceClient_Storage/TestServiceErrors.yaml (100%) rename sdk/tables/{aztables => aztable}/recordings/TestTableClient_Cosmos/TestAddComplexEntity-variables.yaml (100%) rename sdk/tables/{aztables => aztable}/recordings/TestTableClient_Cosmos/TestAddComplexEntity.yaml (100%) rename sdk/tables/{aztables => aztable}/recordings/TestTableClient_Cosmos/TestAddEntity-variables.yaml (100%) rename sdk/tables/{aztables => aztable}/recordings/TestTableClient_Cosmos/TestAddEntity.yaml (100%) rename sdk/tables/{aztables => aztable}/recordings/TestTableClient_Cosmos/TestBatchAdd-variables.yaml (100%) rename sdk/tables/{aztables => aztable}/recordings/TestTableClient_Cosmos/TestBatchAdd.yaml (100%) rename sdk/tables/{aztables => aztable}/recordings/TestTableClient_Cosmos/TestBatchError-variables.yaml (100%) rename sdk/tables/{aztables => aztable}/recordings/TestTableClient_Cosmos/TestBatchError.yaml (100%) rename sdk/tables/{aztables => aztable}/recordings/TestTableClient_Cosmos/TestBatchMixed-variables.yaml (100%) rename sdk/tables/{aztables => aztable}/recordings/TestTableClient_Cosmos/TestBatchMixed.yaml (100%) rename sdk/tables/{aztables => aztable}/recordings/TestTableClient_Cosmos/TestCreateTable-variables.yaml (100%) rename sdk/tables/{aztables => aztable}/recordings/TestTableClient_Cosmos/TestCreateTable.yaml (100%) rename sdk/tables/{aztables => aztable}/recordings/TestTableClient_Cosmos/TestDeleteEntity-variables.yaml (100%) rename sdk/tables/{aztables => aztable}/recordings/TestTableClient_Cosmos/TestDeleteEntity.yaml (100%) rename sdk/tables/{aztables => aztable}/recordings/TestTableClient_Cosmos/TestGetEntity-variables.yaml (100%) rename sdk/tables/{aztables => aztable}/recordings/TestTableClient_Cosmos/TestGetEntity.yaml (100%) rename sdk/tables/{aztables => aztable}/recordings/TestTableClient_Cosmos/TestMergeEntity-variables.yaml (100%) rename sdk/tables/{aztables => aztable}/recordings/TestTableClient_Cosmos/TestMergeEntity.yaml (100%) rename sdk/tables/{aztables => aztable}/recordings/TestTableClient_Cosmos/TestQueryComplexEntity-variables.yaml (100%) rename sdk/tables/{aztables => aztable}/recordings/TestTableClient_Cosmos/TestQueryComplexEntity.yaml (100%) rename sdk/tables/{aztables => aztable}/recordings/TestTableClient_Cosmos/TestQuerySimpleEntity-variables.yaml (100%) rename sdk/tables/{aztables => aztable}/recordings/TestTableClient_Cosmos/TestQuerySimpleEntity.yaml (100%) rename sdk/tables/{aztables => aztable}/recordings/TestTableClient_Cosmos/TestServiceErrors-variables.yaml (100%) rename sdk/tables/{aztables => aztable}/recordings/TestTableClient_Cosmos/TestServiceErrors.yaml (100%) rename sdk/tables/{aztables => aztable}/recordings/TestTableClient_Cosmos/TestUpsertEntity-variables.yaml (100%) rename sdk/tables/{aztables => aztable}/recordings/TestTableClient_Cosmos/TestUpsertEntity.yaml (100%) rename sdk/tables/{aztables => aztable}/recordings/TestTableClient_Storage/TestAddComplexEntity-variables.yaml (100%) rename sdk/tables/{aztables => aztable}/recordings/TestTableClient_Storage/TestAddComplexEntity.yaml (100%) rename sdk/tables/{aztables => aztable}/recordings/TestTableClient_Storage/TestAddEntity-variables.yaml (100%) rename sdk/tables/{aztables => aztable}/recordings/TestTableClient_Storage/TestAddEntity.yaml (100%) rename sdk/tables/{aztables => aztable}/recordings/TestTableClient_Storage/TestBatchAdd-variables.yaml (100%) rename sdk/tables/{aztables => aztable}/recordings/TestTableClient_Storage/TestBatchAdd.yaml (100%) rename sdk/tables/{aztables => aztable}/recordings/TestTableClient_Storage/TestBatchError-variables.yaml (100%) rename sdk/tables/{aztables => aztable}/recordings/TestTableClient_Storage/TestBatchError.yaml (100%) rename sdk/tables/{aztables => aztable}/recordings/TestTableClient_Storage/TestBatchMixed-variables.yaml (100%) rename sdk/tables/{aztables => aztable}/recordings/TestTableClient_Storage/TestBatchMixed.yaml (100%) rename sdk/tables/{aztables => aztable}/recordings/TestTableClient_Storage/TestCreateTable-variables.yaml (100%) rename sdk/tables/{aztables => aztable}/recordings/TestTableClient_Storage/TestCreateTable.yaml (100%) rename sdk/tables/{aztables => aztable}/recordings/TestTableClient_Storage/TestDeleteEntity-variables.yaml (100%) rename sdk/tables/{aztables => aztable}/recordings/TestTableClient_Storage/TestDeleteEntity.yaml (100%) rename sdk/tables/{aztables => aztable}/recordings/TestTableClient_Storage/TestGetEntity-variables.yaml (100%) rename sdk/tables/{aztables => aztable}/recordings/TestTableClient_Storage/TestGetEntity.yaml (100%) rename sdk/tables/{aztables => aztable}/recordings/TestTableClient_Storage/TestMergeEntity-variables.yaml (100%) rename sdk/tables/{aztables => aztable}/recordings/TestTableClient_Storage/TestMergeEntity.yaml (100%) rename sdk/tables/{aztables => aztable}/recordings/TestTableClient_Storage/TestQueryComplexEntity-variables.yaml (100%) rename sdk/tables/{aztables => aztable}/recordings/TestTableClient_Storage/TestQueryComplexEntity.yaml (100%) rename sdk/tables/{aztables => aztable}/recordings/TestTableClient_Storage/TestQuerySimpleEntity-variables.yaml (100%) rename sdk/tables/{aztables => aztable}/recordings/TestTableClient_Storage/TestQuerySimpleEntity.yaml (100%) rename sdk/tables/{aztables => aztable}/recordings/TestTableClient_Storage/TestServiceErrors-variables.yaml (100%) rename sdk/tables/{aztables => aztable}/recordings/TestTableClient_Storage/TestServiceErrors.yaml (100%) rename sdk/tables/{aztables => aztable}/recordings/TestTableClient_Storage/TestUpsertEntity-variables.yaml (100%) rename sdk/tables/{aztables => aztable}/recordings/TestTableClient_Storage/TestUpsertEntity.yaml (100%) rename sdk/tables/{aztables => aztable}/shared_policy_shared_key_credential.go (100%) rename sdk/tables/{aztables => aztable}/table_client.go (100%) rename sdk/tables/{aztables => aztable}/table_client_test.go (100%) rename sdk/tables/{aztables => aztable}/table_pagers.go (100%) rename sdk/tables/{aztables => aztable}/table_pagers_test.go (100%) rename sdk/tables/{aztables => aztable}/table_service_client.go (100%) rename sdk/tables/{aztables => aztable}/table_service_client_test.go (100%) rename sdk/tables/{aztables => aztable}/table_transactional_batch.go (100%) rename sdk/tables/{aztables => aztable}/zc_client_options.go (100%) rename sdk/tables/{aztables => aztable}/zc_tableConstants.go (100%) rename sdk/tables/{aztables => aztable}/zt_tableRecordedTests.go (100%) rename sdk/tables/{aztables => aztable}/zz_generated_connection.go (98%) rename sdk/tables/{aztables => aztable}/zz_generated_constants.go (100%) rename sdk/tables/{aztables => aztable}/zz_generated_models.go (100%) rename sdk/tables/{aztables => aztable}/zz_generated_response_types.go (100%) rename sdk/tables/{aztables => aztable}/zz_generated_service_client.go (100%) rename sdk/tables/{aztables => aztable}/zz_generated_table_client.go (100%) rename sdk/tables/{aztables => aztable}/zz_generated_time_rfc1123.go (100%) rename sdk/tables/{aztables => aztable}/zz_generated_time_rfc3339.go (100%) diff --git a/sdk/tables/aztables/CHANGELOG.md b/sdk/tables/aztable/CHANGELOG.md similarity index 100% rename from sdk/tables/aztables/CHANGELOG.md rename to sdk/tables/aztable/CHANGELOG.md diff --git a/sdk/tables/aztables/LICENSE b/sdk/tables/aztable/LICENSE similarity index 100% rename from sdk/tables/aztables/LICENSE rename to sdk/tables/aztable/LICENSE diff --git a/sdk/tables/aztables/README.md b/sdk/tables/aztable/README.md similarity index 97% rename from sdk/tables/aztables/README.md rename to sdk/tables/aztable/README.md index ffcd20626bea..68e18a8eadd5 100644 --- a/sdk/tables/aztables/README.md +++ b/sdk/tables/aztable/README.md @@ -133,7 +133,7 @@ For more information see the [Code of Conduct FAQ][coc_faq] or contact From the tables dir: -autorest --use=@autorest/go@4.0.0-preview.20 https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/cosmos-db/data-plane/readme.md --tag=package-2019-02 --file-prefix="zz_generated_" --modelerfour.lenient-model-deduplication --license-header=MICROSOFT_MIT_NO_VERSION --output-folder=aztables --module=aztables --openapi-type="data-plane" --credential-scope=none +autorest --use=@autorest/go@4.0.0-preview.20 https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/cosmos-db/data-plane/readme.md --tag=package-2019-02 --file-prefix="zz_generated_" --modelerfour.lenient-model-deduplication --license-header=MICROSOFT_MIT_NO_VERSION --output-folder=aztable --module=aztable --openapi-type="data-plane" --credential-scope=none [tables_rest]: https://docs.microsoft.com/rest/api/storageservices/table-service-rest-api diff --git a/sdk/tables/aztables/ci.yml b/sdk/tables/aztable/ci.yml similarity index 100% rename from sdk/tables/aztables/ci.yml rename to sdk/tables/aztable/ci.yml diff --git a/sdk/tables/aztables/cosmos_patch_transform_policy.go b/sdk/tables/aztable/cosmos_patch_transform_policy.go similarity index 100% rename from sdk/tables/aztables/cosmos_patch_transform_policy.go rename to sdk/tables/aztable/cosmos_patch_transform_policy.go diff --git a/sdk/tables/aztables/go.mod b/sdk/tables/aztable/go.mod similarity index 85% rename from sdk/tables/aztables/go.mod rename to sdk/tables/aztable/go.mod index 2992eb5c22c4..452e0af7ec46 100644 --- a/sdk/tables/aztables/go.mod +++ b/sdk/tables/aztable/go.mod @@ -1,4 +1,4 @@ -module github.com/Azure/azure-sdk-for-go/sdk/tables/aztables +module github.com/Azure/azure-sdk-for-go/sdk/tables/aztable go 1.13 diff --git a/sdk/tables/aztables/go.sum b/sdk/tables/aztable/go.sum similarity index 100% rename from sdk/tables/aztables/go.sum rename to sdk/tables/aztable/go.sum diff --git a/sdk/tables/aztables/recordings/TestServiceClient_Cosmos/TestCreateTable-variables.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestCreateTable-variables.yaml similarity index 100% rename from sdk/tables/aztables/recordings/TestServiceClient_Cosmos/TestCreateTable-variables.yaml rename to sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestCreateTable-variables.yaml diff --git a/sdk/tables/aztables/recordings/TestServiceClient_Cosmos/TestCreateTable.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestCreateTable.yaml similarity index 100% rename from sdk/tables/aztables/recordings/TestServiceClient_Cosmos/TestCreateTable.yaml rename to sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestCreateTable.yaml diff --git a/sdk/tables/aztables/recordings/TestServiceClient_Cosmos/TestQueryTable-variables.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestQueryTable-variables.yaml similarity index 100% rename from sdk/tables/aztables/recordings/TestServiceClient_Cosmos/TestQueryTable-variables.yaml rename to sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestQueryTable-variables.yaml diff --git a/sdk/tables/aztables/recordings/TestServiceClient_Cosmos/TestQueryTable.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestQueryTable.yaml similarity index 100% rename from sdk/tables/aztables/recordings/TestServiceClient_Cosmos/TestQueryTable.yaml rename to sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestQueryTable.yaml diff --git a/sdk/tables/aztables/recordings/TestServiceClient_Cosmos/TestServiceErrors-variables.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestServiceErrors-variables.yaml similarity index 100% rename from sdk/tables/aztables/recordings/TestServiceClient_Cosmos/TestServiceErrors-variables.yaml rename to sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestServiceErrors-variables.yaml diff --git a/sdk/tables/aztables/recordings/TestServiceClient_Cosmos/TestServiceErrors.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestServiceErrors.yaml similarity index 100% rename from sdk/tables/aztables/recordings/TestServiceClient_Cosmos/TestServiceErrors.yaml rename to sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestServiceErrors.yaml diff --git a/sdk/tables/aztables/recordings/TestServiceClient_Storage/TestCreateTable-variables.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestCreateTable-variables.yaml similarity index 100% rename from sdk/tables/aztables/recordings/TestServiceClient_Storage/TestCreateTable-variables.yaml rename to sdk/tables/aztable/recordings/TestServiceClient_Storage/TestCreateTable-variables.yaml diff --git a/sdk/tables/aztables/recordings/TestServiceClient_Storage/TestCreateTable.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestCreateTable.yaml similarity index 100% rename from sdk/tables/aztables/recordings/TestServiceClient_Storage/TestCreateTable.yaml rename to sdk/tables/aztable/recordings/TestServiceClient_Storage/TestCreateTable.yaml diff --git a/sdk/tables/aztables/recordings/TestServiceClient_Storage/TestQueryTable-variables.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestQueryTable-variables.yaml similarity index 100% rename from sdk/tables/aztables/recordings/TestServiceClient_Storage/TestQueryTable-variables.yaml rename to sdk/tables/aztable/recordings/TestServiceClient_Storage/TestQueryTable-variables.yaml diff --git a/sdk/tables/aztables/recordings/TestServiceClient_Storage/TestQueryTable.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestQueryTable.yaml similarity index 100% rename from sdk/tables/aztables/recordings/TestServiceClient_Storage/TestQueryTable.yaml rename to sdk/tables/aztable/recordings/TestServiceClient_Storage/TestQueryTable.yaml diff --git a/sdk/tables/aztables/recordings/TestServiceClient_Storage/TestServiceErrors-variables.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestServiceErrors-variables.yaml similarity index 100% rename from sdk/tables/aztables/recordings/TestServiceClient_Storage/TestServiceErrors-variables.yaml rename to sdk/tables/aztable/recordings/TestServiceClient_Storage/TestServiceErrors-variables.yaml diff --git a/sdk/tables/aztables/recordings/TestServiceClient_Storage/TestServiceErrors.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestServiceErrors.yaml similarity index 100% rename from sdk/tables/aztables/recordings/TestServiceClient_Storage/TestServiceErrors.yaml rename to sdk/tables/aztable/recordings/TestServiceClient_Storage/TestServiceErrors.yaml diff --git a/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestAddComplexEntity-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddComplexEntity-variables.yaml similarity index 100% rename from sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestAddComplexEntity-variables.yaml rename to sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddComplexEntity-variables.yaml diff --git a/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestAddComplexEntity.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddComplexEntity.yaml similarity index 100% rename from sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestAddComplexEntity.yaml rename to sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddComplexEntity.yaml diff --git a/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestAddEntity-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddEntity-variables.yaml similarity index 100% rename from sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestAddEntity-variables.yaml rename to sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddEntity-variables.yaml diff --git a/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestAddEntity.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddEntity.yaml similarity index 100% rename from sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestAddEntity.yaml rename to sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddEntity.yaml diff --git a/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestBatchAdd-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchAdd-variables.yaml similarity index 100% rename from sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestBatchAdd-variables.yaml rename to sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchAdd-variables.yaml diff --git a/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestBatchAdd.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchAdd.yaml similarity index 100% rename from sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestBatchAdd.yaml rename to sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchAdd.yaml diff --git a/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestBatchError-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchError-variables.yaml similarity index 100% rename from sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestBatchError-variables.yaml rename to sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchError-variables.yaml diff --git a/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestBatchError.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchError.yaml similarity index 100% rename from sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestBatchError.yaml rename to sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchError.yaml diff --git a/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestBatchMixed-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchMixed-variables.yaml similarity index 100% rename from sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestBatchMixed-variables.yaml rename to sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchMixed-variables.yaml diff --git a/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestBatchMixed.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchMixed.yaml similarity index 100% rename from sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestBatchMixed.yaml rename to sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchMixed.yaml diff --git a/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestCreateTable-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestCreateTable-variables.yaml similarity index 100% rename from sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestCreateTable-variables.yaml rename to sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestCreateTable-variables.yaml diff --git a/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestCreateTable.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestCreateTable.yaml similarity index 100% rename from sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestCreateTable.yaml rename to sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestCreateTable.yaml diff --git a/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestDeleteEntity-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestDeleteEntity-variables.yaml similarity index 100% rename from sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestDeleteEntity-variables.yaml rename to sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestDeleteEntity-variables.yaml diff --git a/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestDeleteEntity.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestDeleteEntity.yaml similarity index 100% rename from sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestDeleteEntity.yaml rename to sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestDeleteEntity.yaml diff --git a/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestGetEntity-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestGetEntity-variables.yaml similarity index 100% rename from sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestGetEntity-variables.yaml rename to sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestGetEntity-variables.yaml diff --git a/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestGetEntity.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestGetEntity.yaml similarity index 100% rename from sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestGetEntity.yaml rename to sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestGetEntity.yaml diff --git a/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestMergeEntity-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestMergeEntity-variables.yaml similarity index 100% rename from sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestMergeEntity-variables.yaml rename to sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestMergeEntity-variables.yaml diff --git a/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestMergeEntity.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestMergeEntity.yaml similarity index 100% rename from sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestMergeEntity.yaml rename to sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestMergeEntity.yaml diff --git a/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestQueryComplexEntity-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestQueryComplexEntity-variables.yaml similarity index 100% rename from sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestQueryComplexEntity-variables.yaml rename to sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestQueryComplexEntity-variables.yaml diff --git a/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestQueryComplexEntity.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestQueryComplexEntity.yaml similarity index 100% rename from sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestQueryComplexEntity.yaml rename to sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestQueryComplexEntity.yaml diff --git a/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestQuerySimpleEntity-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestQuerySimpleEntity-variables.yaml similarity index 100% rename from sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestQuerySimpleEntity-variables.yaml rename to sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestQuerySimpleEntity-variables.yaml diff --git a/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestQuerySimpleEntity.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestQuerySimpleEntity.yaml similarity index 100% rename from sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestQuerySimpleEntity.yaml rename to sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestQuerySimpleEntity.yaml diff --git a/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestServiceErrors-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestServiceErrors-variables.yaml similarity index 100% rename from sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestServiceErrors-variables.yaml rename to sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestServiceErrors-variables.yaml diff --git a/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestServiceErrors.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestServiceErrors.yaml similarity index 100% rename from sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestServiceErrors.yaml rename to sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestServiceErrors.yaml diff --git a/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestUpsertEntity-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestUpsertEntity-variables.yaml similarity index 100% rename from sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestUpsertEntity-variables.yaml rename to sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestUpsertEntity-variables.yaml diff --git a/sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestUpsertEntity.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestUpsertEntity.yaml similarity index 100% rename from sdk/tables/aztables/recordings/TestTableClient_Cosmos/TestUpsertEntity.yaml rename to sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestUpsertEntity.yaml diff --git a/sdk/tables/aztables/recordings/TestTableClient_Storage/TestAddComplexEntity-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestAddComplexEntity-variables.yaml similarity index 100% rename from sdk/tables/aztables/recordings/TestTableClient_Storage/TestAddComplexEntity-variables.yaml rename to sdk/tables/aztable/recordings/TestTableClient_Storage/TestAddComplexEntity-variables.yaml diff --git a/sdk/tables/aztables/recordings/TestTableClient_Storage/TestAddComplexEntity.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestAddComplexEntity.yaml similarity index 100% rename from sdk/tables/aztables/recordings/TestTableClient_Storage/TestAddComplexEntity.yaml rename to sdk/tables/aztable/recordings/TestTableClient_Storage/TestAddComplexEntity.yaml diff --git a/sdk/tables/aztables/recordings/TestTableClient_Storage/TestAddEntity-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestAddEntity-variables.yaml similarity index 100% rename from sdk/tables/aztables/recordings/TestTableClient_Storage/TestAddEntity-variables.yaml rename to sdk/tables/aztable/recordings/TestTableClient_Storage/TestAddEntity-variables.yaml diff --git a/sdk/tables/aztables/recordings/TestTableClient_Storage/TestAddEntity.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestAddEntity.yaml similarity index 100% rename from sdk/tables/aztables/recordings/TestTableClient_Storage/TestAddEntity.yaml rename to sdk/tables/aztable/recordings/TestTableClient_Storage/TestAddEntity.yaml diff --git a/sdk/tables/aztables/recordings/TestTableClient_Storage/TestBatchAdd-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchAdd-variables.yaml similarity index 100% rename from sdk/tables/aztables/recordings/TestTableClient_Storage/TestBatchAdd-variables.yaml rename to sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchAdd-variables.yaml diff --git a/sdk/tables/aztables/recordings/TestTableClient_Storage/TestBatchAdd.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchAdd.yaml similarity index 100% rename from sdk/tables/aztables/recordings/TestTableClient_Storage/TestBatchAdd.yaml rename to sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchAdd.yaml diff --git a/sdk/tables/aztables/recordings/TestTableClient_Storage/TestBatchError-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchError-variables.yaml similarity index 100% rename from sdk/tables/aztables/recordings/TestTableClient_Storage/TestBatchError-variables.yaml rename to sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchError-variables.yaml diff --git a/sdk/tables/aztables/recordings/TestTableClient_Storage/TestBatchError.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchError.yaml similarity index 100% rename from sdk/tables/aztables/recordings/TestTableClient_Storage/TestBatchError.yaml rename to sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchError.yaml diff --git a/sdk/tables/aztables/recordings/TestTableClient_Storage/TestBatchMixed-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchMixed-variables.yaml similarity index 100% rename from sdk/tables/aztables/recordings/TestTableClient_Storage/TestBatchMixed-variables.yaml rename to sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchMixed-variables.yaml diff --git a/sdk/tables/aztables/recordings/TestTableClient_Storage/TestBatchMixed.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchMixed.yaml similarity index 100% rename from sdk/tables/aztables/recordings/TestTableClient_Storage/TestBatchMixed.yaml rename to sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchMixed.yaml diff --git a/sdk/tables/aztables/recordings/TestTableClient_Storage/TestCreateTable-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestCreateTable-variables.yaml similarity index 100% rename from sdk/tables/aztables/recordings/TestTableClient_Storage/TestCreateTable-variables.yaml rename to sdk/tables/aztable/recordings/TestTableClient_Storage/TestCreateTable-variables.yaml diff --git a/sdk/tables/aztables/recordings/TestTableClient_Storage/TestCreateTable.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestCreateTable.yaml similarity index 100% rename from sdk/tables/aztables/recordings/TestTableClient_Storage/TestCreateTable.yaml rename to sdk/tables/aztable/recordings/TestTableClient_Storage/TestCreateTable.yaml diff --git a/sdk/tables/aztables/recordings/TestTableClient_Storage/TestDeleteEntity-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestDeleteEntity-variables.yaml similarity index 100% rename from sdk/tables/aztables/recordings/TestTableClient_Storage/TestDeleteEntity-variables.yaml rename to sdk/tables/aztable/recordings/TestTableClient_Storage/TestDeleteEntity-variables.yaml diff --git a/sdk/tables/aztables/recordings/TestTableClient_Storage/TestDeleteEntity.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestDeleteEntity.yaml similarity index 100% rename from sdk/tables/aztables/recordings/TestTableClient_Storage/TestDeleteEntity.yaml rename to sdk/tables/aztable/recordings/TestTableClient_Storage/TestDeleteEntity.yaml diff --git a/sdk/tables/aztables/recordings/TestTableClient_Storage/TestGetEntity-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestGetEntity-variables.yaml similarity index 100% rename from sdk/tables/aztables/recordings/TestTableClient_Storage/TestGetEntity-variables.yaml rename to sdk/tables/aztable/recordings/TestTableClient_Storage/TestGetEntity-variables.yaml diff --git a/sdk/tables/aztables/recordings/TestTableClient_Storage/TestGetEntity.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestGetEntity.yaml similarity index 100% rename from sdk/tables/aztables/recordings/TestTableClient_Storage/TestGetEntity.yaml rename to sdk/tables/aztable/recordings/TestTableClient_Storage/TestGetEntity.yaml diff --git a/sdk/tables/aztables/recordings/TestTableClient_Storage/TestMergeEntity-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestMergeEntity-variables.yaml similarity index 100% rename from sdk/tables/aztables/recordings/TestTableClient_Storage/TestMergeEntity-variables.yaml rename to sdk/tables/aztable/recordings/TestTableClient_Storage/TestMergeEntity-variables.yaml diff --git a/sdk/tables/aztables/recordings/TestTableClient_Storage/TestMergeEntity.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestMergeEntity.yaml similarity index 100% rename from sdk/tables/aztables/recordings/TestTableClient_Storage/TestMergeEntity.yaml rename to sdk/tables/aztable/recordings/TestTableClient_Storage/TestMergeEntity.yaml diff --git a/sdk/tables/aztables/recordings/TestTableClient_Storage/TestQueryComplexEntity-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestQueryComplexEntity-variables.yaml similarity index 100% rename from sdk/tables/aztables/recordings/TestTableClient_Storage/TestQueryComplexEntity-variables.yaml rename to sdk/tables/aztable/recordings/TestTableClient_Storage/TestQueryComplexEntity-variables.yaml diff --git a/sdk/tables/aztables/recordings/TestTableClient_Storage/TestQueryComplexEntity.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestQueryComplexEntity.yaml similarity index 100% rename from sdk/tables/aztables/recordings/TestTableClient_Storage/TestQueryComplexEntity.yaml rename to sdk/tables/aztable/recordings/TestTableClient_Storage/TestQueryComplexEntity.yaml diff --git a/sdk/tables/aztables/recordings/TestTableClient_Storage/TestQuerySimpleEntity-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestQuerySimpleEntity-variables.yaml similarity index 100% rename from sdk/tables/aztables/recordings/TestTableClient_Storage/TestQuerySimpleEntity-variables.yaml rename to sdk/tables/aztable/recordings/TestTableClient_Storage/TestQuerySimpleEntity-variables.yaml diff --git a/sdk/tables/aztables/recordings/TestTableClient_Storage/TestQuerySimpleEntity.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestQuerySimpleEntity.yaml similarity index 100% rename from sdk/tables/aztables/recordings/TestTableClient_Storage/TestQuerySimpleEntity.yaml rename to sdk/tables/aztable/recordings/TestTableClient_Storage/TestQuerySimpleEntity.yaml diff --git a/sdk/tables/aztables/recordings/TestTableClient_Storage/TestServiceErrors-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestServiceErrors-variables.yaml similarity index 100% rename from sdk/tables/aztables/recordings/TestTableClient_Storage/TestServiceErrors-variables.yaml rename to sdk/tables/aztable/recordings/TestTableClient_Storage/TestServiceErrors-variables.yaml diff --git a/sdk/tables/aztables/recordings/TestTableClient_Storage/TestServiceErrors.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestServiceErrors.yaml similarity index 100% rename from sdk/tables/aztables/recordings/TestTableClient_Storage/TestServiceErrors.yaml rename to sdk/tables/aztable/recordings/TestTableClient_Storage/TestServiceErrors.yaml diff --git a/sdk/tables/aztables/recordings/TestTableClient_Storage/TestUpsertEntity-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestUpsertEntity-variables.yaml similarity index 100% rename from sdk/tables/aztables/recordings/TestTableClient_Storage/TestUpsertEntity-variables.yaml rename to sdk/tables/aztable/recordings/TestTableClient_Storage/TestUpsertEntity-variables.yaml diff --git a/sdk/tables/aztables/recordings/TestTableClient_Storage/TestUpsertEntity.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestUpsertEntity.yaml similarity index 100% rename from sdk/tables/aztables/recordings/TestTableClient_Storage/TestUpsertEntity.yaml rename to sdk/tables/aztable/recordings/TestTableClient_Storage/TestUpsertEntity.yaml diff --git a/sdk/tables/aztables/shared_policy_shared_key_credential.go b/sdk/tables/aztable/shared_policy_shared_key_credential.go similarity index 100% rename from sdk/tables/aztables/shared_policy_shared_key_credential.go rename to sdk/tables/aztable/shared_policy_shared_key_credential.go diff --git a/sdk/tables/aztables/table_client.go b/sdk/tables/aztable/table_client.go similarity index 100% rename from sdk/tables/aztables/table_client.go rename to sdk/tables/aztable/table_client.go diff --git a/sdk/tables/aztables/table_client_test.go b/sdk/tables/aztable/table_client_test.go similarity index 100% rename from sdk/tables/aztables/table_client_test.go rename to sdk/tables/aztable/table_client_test.go diff --git a/sdk/tables/aztables/table_pagers.go b/sdk/tables/aztable/table_pagers.go similarity index 100% rename from sdk/tables/aztables/table_pagers.go rename to sdk/tables/aztable/table_pagers.go diff --git a/sdk/tables/aztables/table_pagers_test.go b/sdk/tables/aztable/table_pagers_test.go similarity index 100% rename from sdk/tables/aztables/table_pagers_test.go rename to sdk/tables/aztable/table_pagers_test.go diff --git a/sdk/tables/aztables/table_service_client.go b/sdk/tables/aztable/table_service_client.go similarity index 100% rename from sdk/tables/aztables/table_service_client.go rename to sdk/tables/aztable/table_service_client.go diff --git a/sdk/tables/aztables/table_service_client_test.go b/sdk/tables/aztable/table_service_client_test.go similarity index 100% rename from sdk/tables/aztables/table_service_client_test.go rename to sdk/tables/aztable/table_service_client_test.go diff --git a/sdk/tables/aztables/table_transactional_batch.go b/sdk/tables/aztable/table_transactional_batch.go similarity index 100% rename from sdk/tables/aztables/table_transactional_batch.go rename to sdk/tables/aztable/table_transactional_batch.go diff --git a/sdk/tables/aztables/zc_client_options.go b/sdk/tables/aztable/zc_client_options.go similarity index 100% rename from sdk/tables/aztables/zc_client_options.go rename to sdk/tables/aztable/zc_client_options.go diff --git a/sdk/tables/aztables/zc_tableConstants.go b/sdk/tables/aztable/zc_tableConstants.go similarity index 100% rename from sdk/tables/aztables/zc_tableConstants.go rename to sdk/tables/aztable/zc_tableConstants.go diff --git a/sdk/tables/aztables/zt_tableRecordedTests.go b/sdk/tables/aztable/zt_tableRecordedTests.go similarity index 100% rename from sdk/tables/aztables/zt_tableRecordedTests.go rename to sdk/tables/aztable/zt_tableRecordedTests.go diff --git a/sdk/tables/aztables/zz_generated_connection.go b/sdk/tables/aztable/zz_generated_connection.go similarity index 98% rename from sdk/tables/aztables/zz_generated_connection.go rename to sdk/tables/aztable/zz_generated_connection.go index b7bb8ee32351..cd1a38ffeee2 100644 --- a/sdk/tables/aztables/zz_generated_connection.go +++ b/sdk/tables/aztable/zz_generated_connection.go @@ -14,7 +14,7 @@ import ( ) const scope = "none" -const telemetryInfo = "azsdk-go-aztables/" +const telemetryInfo = "azsdk-go-aztable/" // connectionOptions contains configuration settings for the connection's pipeline. // All zero-value fields will be initialized with their default values. diff --git a/sdk/tables/aztables/zz_generated_constants.go b/sdk/tables/aztable/zz_generated_constants.go similarity index 100% rename from sdk/tables/aztables/zz_generated_constants.go rename to sdk/tables/aztable/zz_generated_constants.go diff --git a/sdk/tables/aztables/zz_generated_models.go b/sdk/tables/aztable/zz_generated_models.go similarity index 100% rename from sdk/tables/aztables/zz_generated_models.go rename to sdk/tables/aztable/zz_generated_models.go diff --git a/sdk/tables/aztables/zz_generated_response_types.go b/sdk/tables/aztable/zz_generated_response_types.go similarity index 100% rename from sdk/tables/aztables/zz_generated_response_types.go rename to sdk/tables/aztable/zz_generated_response_types.go diff --git a/sdk/tables/aztables/zz_generated_service_client.go b/sdk/tables/aztable/zz_generated_service_client.go similarity index 100% rename from sdk/tables/aztables/zz_generated_service_client.go rename to sdk/tables/aztable/zz_generated_service_client.go diff --git a/sdk/tables/aztables/zz_generated_table_client.go b/sdk/tables/aztable/zz_generated_table_client.go similarity index 100% rename from sdk/tables/aztables/zz_generated_table_client.go rename to sdk/tables/aztable/zz_generated_table_client.go diff --git a/sdk/tables/aztables/zz_generated_time_rfc1123.go b/sdk/tables/aztable/zz_generated_time_rfc1123.go similarity index 100% rename from sdk/tables/aztables/zz_generated_time_rfc1123.go rename to sdk/tables/aztable/zz_generated_time_rfc1123.go diff --git a/sdk/tables/aztables/zz_generated_time_rfc3339.go b/sdk/tables/aztable/zz_generated_time_rfc3339.go similarity index 100% rename from sdk/tables/aztables/zz_generated_time_rfc3339.go rename to sdk/tables/aztable/zz_generated_time_rfc3339.go From c39e2ca8935205d28486720b9293a6327ae3d34b Mon Sep 17 00:00:00 2001 From: Christopher Scott Date: Tue, 1 Jun 2021 18:33:18 -0500 Subject: [PATCH 08/42] comments --- sdk/tables/aztable/go.mod | 4 +-- sdk/tables/aztable/go.sum | 4 +++ sdk/tables/aztable/table_client.go | 32 +++++++++++++------ sdk/tables/aztable/table_pagers.go | 32 ++++++++++++++++--- sdk/tables/aztable/table_service_client.go | 21 ++++++++---- .../aztable/table_service_client_test.go | 4 +-- sdk/tables/aztable/zt_tableRecordedTests.go | 2 +- 7 files changed, 73 insertions(+), 26 deletions(-) diff --git a/sdk/tables/aztable/go.mod b/sdk/tables/aztable/go.mod index 452e0af7ec46..96d1ccf79b28 100644 --- a/sdk/tables/aztable/go.mod +++ b/sdk/tables/aztable/go.mod @@ -5,9 +5,9 @@ go 1.13 replace github.com/Azure/azure-sdk-for-go/sdk/internal => ../../internal require ( - github.com/Azure/azure-sdk-for-go/sdk/azcore v0.16.1 + github.com/Azure/azure-sdk-for-go/sdk/azcore v0.16.2 github.com/Azure/azure-sdk-for-go/sdk/internal v0.5.1 github.com/stretchr/testify v1.7.0 - golang.org/x/net v0.0.0-20210510120150-4163338589ed // indirect + golang.org/x/net v0.0.0-20210525063256-abc453219eb5 // indirect gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect ) diff --git a/sdk/tables/aztable/go.sum b/sdk/tables/aztable/go.sum index 6de49c407854..0cf6242f1895 100644 --- a/sdk/tables/aztable/go.sum +++ b/sdk/tables/aztable/go.sum @@ -1,5 +1,7 @@ github.com/Azure/azure-sdk-for-go/sdk/azcore v0.16.1 h1:yQw8Ah26gBP4dv66ZNjZpRBRV+gaHH/0TLn1taU4FZ4= github.com/Azure/azure-sdk-for-go/sdk/azcore v0.16.1/go.mod h1:MVdrcUC4Hup35qHym3VdzoW+NBgBxrta9Vei97jRtM8= +github.com/Azure/azure-sdk-for-go/sdk/azcore v0.16.2 h1:UC4vfOhW2l0f2QOCQpOxJS4/K6oKFy2tQZE+uWU1MEo= +github.com/Azure/azure-sdk-for-go/sdk/azcore v0.16.2/go.mod h1:MVdrcUC4Hup35qHym3VdzoW+NBgBxrta9Vei97jRtM8= github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dnaeon/go-vcr v1.1.0 h1:ReYa/UBrRyQdant9B4fNHGoCNKw6qh6P0fsdGmZpR7c= @@ -17,6 +19,8 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20201010224723-4f7140c49acb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210510120150-4163338589ed h1:p9UgmWI9wKpfYmgaV/IZKGdXc5qEK45tDwwwDyjS26I= golang.org/x/net v0.0.0-20210510120150-4163338589ed/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210525063256-abc453219eb5 h1:wjuX4b5yYQnEQHzd+CBcrcC6OVR2J1CN6mUy0oSxIPo= +golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= diff --git a/sdk/tables/aztable/table_client.go b/sdk/tables/aztable/table_client.go index 46ee1dea1174..488bb2d97681 100644 --- a/sdk/tables/aztable/table_client.go +++ b/sdk/tables/aztable/table_client.go @@ -10,7 +10,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" ) -// A TableClient represents a URL to an Azure Storage blob; the blob may be a block blob, append blob, or page blob. +// A TableClient represents a client to the tables service affinitized to a specific table. type TableClient struct { client *tableClient service *TableServiceClient @@ -25,27 +25,39 @@ const ( Merge TableUpdateMode = "merge" ) -// NewTableClient creates a TableClient object using the specified URL and request policy pipeline. +// NewTableClient creates a TableClient struct in the context of the table speecified in tableName, using the specified serviceURL, credential, and options. func NewTableClient(tableName string, serviceURL string, cred azcore.Credential, options TableClientOptions) (*TableClient, error) { s, err := NewTableServiceClient(serviceURL, cred, options) return s.NewTableClient(tableName), err } -// Create creates the table with the name specified in NewTableClient +// Create creates the table with the tableName specified when NewTableClient was called. func (t *TableClient) Create(ctx context.Context) (TableResponseResponse, error) { return t.service.Create(ctx, t.Name) } -// Delete deletes the current table +// Delete deletes the table with the tableName specified when NewTableClient was called. func (t *TableClient) Delete(ctx context.Context) (TableDeleteResponse, error) { return t.service.Delete(ctx, t.Name) } -// Query queries the tables using the specified QueryOptions +// Query queries the tables using the specified QueryOptions. +// QueryOptions can specify the following properties to affect the query results returned: +// +// Filter: An Odata filter expression that limits results to those entities that satisfy the filter expression. +// For example, the following expression would return only entities with a PartitionKey of 'foo': "PartitionKey eq 'foo'" +// +// Select: A comma delimited list of entity property names that selects which set of entity properties to return in the result set. +// For example, the following value would return results containing only the PartitionKey and RowKey properties: "PartitionKey, RowKey" +// +// Top: The maximum number of entities that will be returned per page of results. +// Note: This value does not limit the total number of results if NextPage is called on the returned Pager until it returns false. + func (t *TableClient) Query(queryOptions QueryOptions) TableEntityQueryResponsePager { return &tableEntityQueryResponsePager{tableClient: t, queryOptions: &queryOptions, tableQueryOptions: &TableQueryEntitiesOptions{}} } +// GetEntity retrieves a specific entity from the service using the specified partitionKey and rowKey values. func (t *TableClient) GetEntity(ctx context.Context, partitionKey string, rowKey string) (MapOfInterfaceResponse, error) { resp, err := t.client.QueryEntityWithPartitionAndRowKey(ctx, t.Name, partitionKey, rowKey, &TableQueryEntityWithPartitionAndRowKeyOptions{}, &QueryOptions{}) if err != nil { @@ -55,7 +67,7 @@ func (t *TableClient) GetEntity(ctx context.Context, partitionKey string, rowKey return resp, err } -// AddEntity Creates an entity from a map value. +// AddEntity adds an entity to the table. func (t *TableClient) AddEntity(ctx context.Context, entity map[string]interface{}) (TableInsertEntityResponse, error) { toOdataAnnotatedDictionary(&entity) resp, err := t.client.InsertEntity(ctx, t.Name, &TableInsertEntityOptions{TableEntityProperties: entity, ResponsePreference: ResponseFormatReturnNoContent.ToPtr()}, &QueryOptions{}) @@ -67,7 +79,7 @@ func (t *TableClient) AddEntity(ctx context.Context, entity map[string]interface } } -// AddModelEntity creates an entity from an arbitrary struct value. +// AddModelEntity adds an entity from an arbitrary interface value to the table. func (t *TableClient) AddModelEntity(ctx context.Context, entity interface{}) (TableInsertEntityResponse, error) { entmap, err := toMap(entity) if err != nil { @@ -82,13 +94,15 @@ func (t *TableClient) AddModelEntity(ctx context.Context, entity interface{}) (T } } +// DeleteEntity deletes the entity with the specified partitionKey and rowKey from the table. func (t *TableClient) DeleteEntity(ctx context.Context, partitionKey string, rowKey string, etag string) (TableDeleteEntityResponse, error) { return t.client.DeleteEntity(ctx, t.Name, partitionKey, rowKey, etag, nil, &QueryOptions{}) } // UpdateEntity updates the specified table entity if it exists. -// If updateMode is Replace, the entity will be replaced. -// If updateMode is Merge, the property values present in the specified entity will be merged with the existing entity. +// If updateMode is Replace, the entity will be replaced. This is the only way to remove properties from an existing entity. +// If updateMode is Merge, the property values present in the specified entity will be merged with the existing entity. Properties not specified in the merge will be unaffected. +// The specified etag value will be used for optimistic concurrency. If the etag does not match the value of the entity in the table, the operation will fail. // The response type will be TableEntityMergeResponse if updateMode is Merge and TableEntityUpdateResponse if updateMode is Replace. func (t *TableClient) UpdateEntity(ctx context.Context, entity map[string]interface{}, etag *string, updateMode TableUpdateMode) (interface{}, error) { pk := entity[partitionKey].(string) diff --git a/sdk/tables/aztable/table_pagers.go b/sdk/tables/aztable/table_pagers.go index 3ed7e9c18c19..803d3ed7eb81 100644 --- a/sdk/tables/aztable/table_pagers.go +++ b/sdk/tables/aztable/table_pagers.go @@ -33,6 +33,9 @@ type tableEntityQueryResponsePager struct { err error } +// NextPage fetches the next available page of results from the service. +// If the fetched page contains results, the return value is true, else false. +// Results fetched from the service can be evaulated by calling PageResponse on this Pager. func (p *tableEntityQueryResponsePager) NextPage(ctx context.Context) bool { if p.err != nil || (p.current != nil && p.current.XMSContinuationNextPartitionKey == nil && p.current.XMSContinuationNextRowKey == nil) { return false @@ -46,10 +49,18 @@ func (p *tableEntityQueryResponsePager) NextPage(ctx context.Context) bool { return p.err == nil && resp.TableEntityQueryResponse.Value != nil && len(resp.TableEntityQueryResponse.Value) > 0 } +// PageResponse returns the results from the page most recently fetched from the service. +// Example usage of this in combination with NextPage would look like the following: +// +// for pager.NextPage(ctx) { +// resp = pager.PageResponse() +// fmt.sprintf("The page contains %i results", len(resp.TableEntityQueryResponse.Value)) +// } func (p *tableEntityQueryResponsePager) PageResponse() TableEntityQueryResponseResponse { return *p.current } +// Err returns an error value if the most recent call to NextPage was not successful, else nil. func (p *tableEntityQueryResponsePager) Err() error { return p.err } @@ -66,7 +77,7 @@ type TableQueryResponsePager interface { // The modelSlice parameter should be a pointer to a slice of stuct types that match the entity model type in the table response. func (r *TableEntityQueryResponse) AsModels(modelSlice interface{}) error { models := reflect.ValueOf(modelSlice).Elem() - tt := GetTypeArray(models.Interface()) + tt := getTypeArray(models.Interface()) fmap := getTypeValueMap(tt) for i, e := range r.Value { err := fromMap(tt, fmap, &e, models.Index(i)) @@ -86,6 +97,9 @@ type tableQueryResponsePager struct { err error } +// NextPage fetches the next available page of results from the service. +// If the fetched page contains results, the return value is true, else false. +// Results fetched from the service can be evaulated by calling PageResponse on this Pager. func (p *tableQueryResponsePager) NextPage(ctx context.Context) bool { if p.err != nil || (p.current != nil && p.current.XMSContinuationNextTableName == nil) { return false @@ -97,10 +111,18 @@ func (p *tableQueryResponsePager) NextPage(ctx context.Context) bool { return p.err == nil && resp.TableQueryResponse.Value != nil && len(resp.TableQueryResponse.Value) > 0 } +// PageResponse returns the results from the page most recently fetched from the service. +// Example usage of this in combination with NextPage would look like the following: +// +// for pager.NextPage(ctx) { +// resp = pager.PageResponse() +// fmt.sprintf("The page contains %i results", len(resp.TableEntityQueryResponse.Value)) +// } func (p *tableQueryResponsePager) PageResponse() TableQueryResponseResponse { return *p.current } +// Err returns an error value if the most recent call to NextPage was not successful, else nil. func (p *tableQueryResponsePager) Err() error { return p.err } @@ -159,7 +181,7 @@ func toOdataAnnotatedDictionary(entity *map[string]interface{}) error { Switch: switch t.Kind() { case reflect.Slice, reflect.Array: - if GetTypeArray(v) != reflect.TypeOf(byte(0)) { + if getTypeArray(v) != reflect.TypeOf(byte(0)) { return errors.New("arrays and slices must be of type byte") } // check if this is a uuid @@ -224,7 +246,7 @@ func toMap(ent interface{}) (*map[string]interface{}, error) { // add odata annotations for the types that require it. switch k := v.Type().Kind(); k { case reflect.Array, reflect.Slice: - if GetTypeArray(v.Interface()) != reflect.TypeOf(byte(0)) { + if getTypeArray(v.Interface()) != reflect.TypeOf(byte(0)) { return nil, errors.New("arrays and slices must be of type byte") } // check if this is a uuid field as decorated by a tag @@ -317,7 +339,7 @@ func fromMap(tt reflect.Type, fmap *map[string]int, src *map[string]interface{}, goto Switch } case reflect.Array, reflect.Map, reflect.Slice: - if GetTypeArray(val.Interface()) != reflect.TypeOf(byte(0)) { + if getTypeArray(val.Interface()) != reflect.TypeOf(byte(0)) { return errors.New("arrays and slices must be of type byte") } // // check if this is a uuid field as decorated by a tag @@ -359,6 +381,6 @@ func odataType(n string) string { return b.String() } -func GetTypeArray(arr interface{}) reflect.Type { +func getTypeArray(arr interface{}) reflect.Type { return reflect.TypeOf(arr).Elem() } diff --git a/sdk/tables/aztable/table_service_client.go b/sdk/tables/aztable/table_service_client.go index 59dc7267cfc7..b6c3cab35efd 100644 --- a/sdk/tables/aztable/table_service_client.go +++ b/sdk/tables/aztable/table_service_client.go @@ -15,14 +15,14 @@ const ( CosmosTableDomain = ".table.cosmos." ) -// A TableServiceClient represents a URL to an Azure Storage blob; the blob may be a block blob, append blob, or page blob. +// A TableServiceClient represents a client to the table service. It can be used to query the available tables, add/remove tables, and various other service level operations. type TableServiceClient struct { client *tableClient service *serviceClient cred SharedKeyCredential } -// NewTableServiceClient creates a TableClient object using the specified URL and request policy pipeline. +// NewTableServiceClient creates a TableServiceClient struct using the specified serviceURL, credential, and options. func NewTableServiceClient(serviceURL string, cred azcore.Credential, options TableClientOptions) (*TableServiceClient, error) { conOptions := options.getConnectionOptions() if isCosmosEndpoint(serviceURL) { @@ -33,12 +33,12 @@ func NewTableServiceClient(serviceURL string, cred azcore.Credential, options Ta return &TableServiceClient{client: &tableClient{con}, service: &serviceClient{con}, cred: *c}, nil } -// Gets a TableClient affinitzed to the specified table name and initialized with the same serviceURL and credentials as this TableServiceClient +// NewTableClient returns a pointer to a TableClient affinitzed to the specified table name and initialized with the same serviceURL and credentials as this TableServiceClient func (t *TableServiceClient) NewTableClient(tableName string) *TableClient { return &TableClient{client: t.client, cred: t.cred, Name: tableName, service: t} } -// Creates a table with the specified name +// Create creates a table with the specified name. func (t *TableServiceClient) Create(ctx context.Context, name string) (TableResponseResponse, error) { resp, err := t.client.Create(ctx, TableProperties{&name}, new(TableCreateOptions), new(QueryOptions)) if err == nil { @@ -48,13 +48,20 @@ func (t *TableServiceClient) Create(ctx context.Context, name string) (TableResp return TableResponseResponse{}, err } -// Deletes a table by name +// Delete deletes a table by name. func (t *TableServiceClient) Delete(ctx context.Context, name string) (TableDeleteResponse, error) { return t.client.Delete(ctx, name, nil) } -// Queries the tables using the specified QueryOptions -func (t *TableServiceClient) QueryTables(queryOptions QueryOptions) TableQueryResponsePager { +// Query queries the existing tables using the specified QueryOptions. +// QueryOptions can specify the following properties to affect the query results returned: +// +// Filter: An Odata filter expression that limits results to those tables that satisfy the filter expression. +// For example, the following expression would return only tables with a TableName of 'foo': "TableName eq 'foo'" +// +// Top: The maximum number of tables that will be returned per page of results. +// Note: This value does not limit the total number of results if NextPage is called on the returned Pager until it returns false. +func (t *TableServiceClient) Query(queryOptions QueryOptions) TableQueryResponsePager { return &tableQueryResponsePager{client: t.client, queryOptions: &queryOptions, tableQueryOptions: new(TableQueryOptions)} } diff --git a/sdk/tables/aztable/table_service_client_test.go b/sdk/tables/aztable/table_service_client_test.go index 286c55f76abf..c55e60489cf6 100644 --- a/sdk/tables/aztable/table_service_client_test.go +++ b/sdk/tables/aztable/table_service_client_test.go @@ -85,7 +85,7 @@ func (s *tableServiceClientLiveTests) TestQueryTable() { // Query for tables with no pagination. The filter should exclude one table from the results filter := fmt.Sprintf("TableName ge '%s' and TableName lt '%s'", prefix1, prefix2) - pager := context.client.QueryTables(QueryOptions{Filter: &filter}) + pager := context.client.Query(QueryOptions{Filter: &filter}) resultCount := 0 for pager.NextPage(ctx) { @@ -98,7 +98,7 @@ func (s *tableServiceClientLiveTests) TestQueryTable() { // Query for tables with pagination top := int32(2) - pager = context.client.QueryTables(QueryOptions{Filter: &filter, Top: &top}) + pager = context.client.Query(QueryOptions{Filter: &filter, Top: &top}) resultCount = 0 pageCount := 0 diff --git a/sdk/tables/aztable/zt_tableRecordedTests.go b/sdk/tables/aztable/zt_tableRecordedTests.go index 6ec06393392c..22d8dd70bf95 100644 --- a/sdk/tables/aztable/zt_tableRecordedTests.go +++ b/sdk/tables/aztable/zt_tableRecordedTests.go @@ -97,7 +97,7 @@ func recordedTestTeardown(key string) { func cleanupTables(context *testContext, tables *[]string) { c := context.client if tables == nil { - pager := c.QueryTables(QueryOptions{}) + pager := c.Query(QueryOptions{}) for pager.NextPage(ctx) { for _, t := range pager.PageResponse().TableQueryResponse.Value { c.Delete(ctx, *t.TableName) From c9d0dd3e7c8a2a7d13516880032070e338ed0c3c Mon Sep 17 00:00:00 2001 From: Christopher Scott Date: Thu, 3 Jun 2021 09:10:31 -0500 Subject: [PATCH 09/42] comment tweaks, options as pointer --- sdk/tables/aztable/table_client.go | 21 ++++++++++++++------- sdk/tables/aztable/table_client_test.go | 16 ++++++++-------- sdk/tables/aztable/table_service_client.go | 10 +++++++++- sdk/tables/aztable/zt_tableRecordedTests.go | 2 +- 4 files changed, 32 insertions(+), 17 deletions(-) diff --git a/sdk/tables/aztable/table_client.go b/sdk/tables/aztable/table_client.go index 488bb2d97681..af6ffa12c11c 100644 --- a/sdk/tables/aztable/table_client.go +++ b/sdk/tables/aztable/table_client.go @@ -25,8 +25,8 @@ const ( Merge TableUpdateMode = "merge" ) -// NewTableClient creates a TableClient struct in the context of the table speecified in tableName, using the specified serviceURL, credential, and options. -func NewTableClient(tableName string, serviceURL string, cred azcore.Credential, options TableClientOptions) (*TableClient, error) { +// NewTableClient creates a TableClient struct in the context of the table specified in tableName, using the specified serviceURL, credential, and options. +func NewTableClient(tableName string, serviceURL string, cred azcore.Credential, options *TableClientOptions) (*TableClient, error) { s, err := NewTableServiceClient(serviceURL, cred, options) return s.NewTableClient(tableName), err } @@ -52,7 +52,14 @@ func (t *TableClient) Delete(ctx context.Context) (TableDeleteResponse, error) { // // Top: The maximum number of entities that will be returned per page of results. // Note: This value does not limit the total number of results if NextPage is called on the returned Pager until it returns false. - +// +// Query returns a Pager, which allows iteration through each page of results. Example: +// +// pager := client.Query() +// for pager.NextPage(ctx) { +// resp = pager.PageResponse() +// fmt.sprintf("The page contains %i results", len(resp.TableEntityQueryResponse.Value)) +// } func (t *TableClient) Query(queryOptions QueryOptions) TableEntityQueryResponsePager { return &tableEntityQueryResponsePager{tableClient: t, queryOptions: &queryOptions, tableQueryOptions: &TableQueryEntitiesOptions{}} } @@ -67,8 +74,8 @@ func (t *TableClient) GetEntity(ctx context.Context, partitionKey string, rowKey return resp, err } -// AddEntity adds an entity to the table. -func (t *TableClient) AddEntity(ctx context.Context, entity map[string]interface{}) (TableInsertEntityResponse, error) { +// AddMapEntity adds an entity to the table. +func (t *TableClient) AddMapEntity(ctx context.Context, entity map[string]interface{}) (TableInsertEntityResponse, error) { toOdataAnnotatedDictionary(&entity) resp, err := t.client.InsertEntity(ctx, t.Name, &TableInsertEntityOptions{TableEntityProperties: entity, ResponsePreference: ResponseFormatReturnNoContent.ToPtr()}, &QueryOptions{}) if err == nil { @@ -79,8 +86,8 @@ func (t *TableClient) AddEntity(ctx context.Context, entity map[string]interface } } -// AddModelEntity adds an entity from an arbitrary interface value to the table. -func (t *TableClient) AddModelEntity(ctx context.Context, entity interface{}) (TableInsertEntityResponse, error) { +// AddEntity adds an entity from an arbitrary interface value to the table. +func (t *TableClient) AddEntity(ctx context.Context, entity interface{}) (TableInsertEntityResponse, error) { entmap, err := toMap(entity) if err != nil { return TableInsertEntityResponse{}, azcore.NewResponseError(err, nil) diff --git a/sdk/tables/aztable/table_client_test.go b/sdk/tables/aztable/table_client_test.go index a2b2d339050b..09a010a81ce8 100644 --- a/sdk/tables/aztable/table_client_test.go +++ b/sdk/tables/aztable/table_client_test.go @@ -66,7 +66,7 @@ func (s *tableClientLiveTests) TestAddEntity() { entitiesToCreate := createSimpleEntities(1, "partition") - _, err := client.AddEntity(ctx, (*entitiesToCreate)[0]) + _, err := client.AddMapEntity(ctx, (*entitiesToCreate)[0]) assert.Nil(err) } @@ -79,7 +79,7 @@ func (s *tableClientLiveTests) TestAddComplexEntity() { entitiesToCreate := createComplexEntities(context, 1, "partition") for _, e := range *entitiesToCreate { - _, err := client.AddModelEntity(ctx, e) + _, err := client.AddEntity(ctx, e) var svcErr *runtime.ResponseError errors.As(err, &svcErr) assert.Nilf(err, getStringFromBody(svcErr)) @@ -93,7 +93,7 @@ func (s *tableClientLiveTests) TestDeleteEntity() { entitiesToCreate := createSimpleEntities(1, "partition") - _, err := client.AddEntity(ctx, (*entitiesToCreate)[0]) + _, err := client.AddMapEntity(ctx, (*entitiesToCreate)[0]) assert.Nil(err) _, delErr := client.DeleteEntity(ctx, (*entitiesToCreate)[0][partitionKey].(string), (*entitiesToCreate)[0][rowKey].(string), "*") assert.Nil(delErr) @@ -106,7 +106,7 @@ func (s *tableClientLiveTests) TestMergeEntity() { entitiesToCreate := createSimpleEntities(1, "partition") - _, err := client.AddEntity(ctx, (*entitiesToCreate)[0]) + _, err := client.AddMapEntity(ctx, (*entitiesToCreate)[0]) assert.Nil(err) var qResp TableEntityQueryResponseResponse @@ -189,7 +189,7 @@ func (s *tableClientLiveTests) _TestGetEntity() { // Add 5 entities entitiesToCreate := createSimpleEntities(1, "partition") for _, e := range *entitiesToCreate { - _, err := client.AddEntity(ctx, e) + _, err := client.AddMapEntity(ctx, e) assert.Nil(err) } @@ -221,7 +221,7 @@ func (s *tableClientLiveTests) TestQuerySimpleEntity() { // Add 5 entities entitiesToCreate := createSimpleEntities(5, "partition") for _, e := range *entitiesToCreate { - _, err := client.AddEntity(ctx, e) + _, err := client.AddMapEntity(ctx, e) assert.Nil(err) } @@ -272,7 +272,7 @@ func (s *tableClientLiveTests) TestQueryComplexEntity() { // Add 5 entities entitiesToCreate := createComplexMapEntities(context, 5, "partition") for _, e := range *entitiesToCreate { - _, err := client.AddEntity(ctx, e) + _, err := client.AddMapEntity(ctx, e) assert.Nil(err) } @@ -442,7 +442,7 @@ func (s *tableClientLiveTests) TestBatchError() { assert.Equal(error_empty_transaction, err.Error()) // Add the last entity to the table prior to adding it as part of the batch to cause a batch failure. - client.AddEntity(ctx, (*entitiesToCreate)[2]) + client.AddMapEntity(ctx, (*entitiesToCreate)[2]) // Add the entities to the batch for i := 0; i < cap(batch); i++ { diff --git a/sdk/tables/aztable/table_service_client.go b/sdk/tables/aztable/table_service_client.go index b6c3cab35efd..5c663ae24d5b 100644 --- a/sdk/tables/aztable/table_service_client.go +++ b/sdk/tables/aztable/table_service_client.go @@ -23,7 +23,7 @@ type TableServiceClient struct { } // NewTableServiceClient creates a TableServiceClient struct using the specified serviceURL, credential, and options. -func NewTableServiceClient(serviceURL string, cred azcore.Credential, options TableClientOptions) (*TableServiceClient, error) { +func NewTableServiceClient(serviceURL string, cred azcore.Credential, options *TableClientOptions) (*TableServiceClient, error) { conOptions := options.getConnectionOptions() if isCosmosEndpoint(serviceURL) { conOptions.PerCallPolicies = []azcore.Policy{CosmosPatchTransformPolicy{}} @@ -61,6 +61,14 @@ func (t *TableServiceClient) Delete(ctx context.Context, name string) (TableDele // // Top: The maximum number of tables that will be returned per page of results. // Note: This value does not limit the total number of results if NextPage is called on the returned Pager until it returns false. +// +// Query returns a Pager, which allows iteration through each page of results. Example: +// +// pager := client.Query() +// for pager.NextPage(ctx) { +// resp = pager.PageResponse() +// fmt.sprintf("The page contains %i results", len(resp.TableEntityQueryResponse.Value)) +// } func (t *TableServiceClient) Query(queryOptions QueryOptions) TableQueryResponsePager { return &tableQueryResponsePager{client: t.client, queryOptions: &queryOptions, tableQueryOptions: new(TableQueryOptions)} } diff --git a/sdk/tables/aztable/zt_tableRecordedTests.go b/sdk/tables/aztable/zt_tableRecordedTests.go index 22d8dd70bf95..e39cdd6a3c5c 100644 --- a/sdk/tables/aztable/zt_tableRecordedTests.go +++ b/sdk/tables/aztable/zt_tableRecordedTests.go @@ -81,7 +81,7 @@ func recordedTestSetup(t *testing.T, testName string, endpointType EndpointType, uri = cosmosURI(accountName, suffix) } - client, err := NewTableServiceClient(uri, cred, TableClientOptions{HTTPClient: recording, Retry: azcore.RetryOptions{MaxRetries: -1}}) + client, err := NewTableServiceClient(uri, cred, &TableClientOptions{HTTPClient: recording, Retry: azcore.RetryOptions{MaxRetries: -1}}) assert.Nil(err) clientsMap[testName] = &testContext{client: client, recording: recording, context: &context} } From b427598bc1ca2306da0b297ba4dadbc5892483f9 Mon Sep 17 00:00:00 2001 From: Christopher Scott Date: Thu, 3 Jun 2021 09:54:56 -0500 Subject: [PATCH 10/42] add EntityMapAsModel --- sdk/tables/aztable/table_pagers.go | 21 +++++++++++++++++++++ sdk/tables/aztable/table_pagers_test.go | 13 ++++++------- 2 files changed, 27 insertions(+), 7 deletions(-) diff --git a/sdk/tables/aztable/table_pagers.go b/sdk/tables/aztable/table_pagers.go index 803d3ed7eb81..ea81a8914072 100644 --- a/sdk/tables/aztable/table_pagers.go +++ b/sdk/tables/aztable/table_pagers.go @@ -89,6 +89,22 @@ func (r *TableEntityQueryResponse) AsModels(modelSlice interface{}) error { return nil } +// EntityMapAsModel converts a table entity in the form of map[string]interface{} and converts it to a strongly typed model. +// +// Example: +// mapEntity, err := client.GetEntity("somePartition", "someRow") +// myEntityModel := MyModel{} +// err = EntityMapAsModel(mapEntity, &myEntityModel) +func EntityMapAsModel(entityMap map[string]interface{}, model interface{}) error { + tt := getTypeArray(model) + fmap := getTypeValueMap(tt) + err := fromMap(reflect.TypeOf(model).Elem(), fmap, &entityMap, reflect.ValueOf(model).Elem()) + if err != nil { + return nil + } + return err +} + type tableQueryResponsePager struct { client *tableClient current *TableQueryResponseResponse @@ -295,6 +311,11 @@ func toMap(ent interface{}) (*map[string]interface{}, error) { return &entMap, nil } +// fromMap converts an entity map to a strongly typed model interface +// tt is the type of the model +// fmap is the result of getTypeValueMap for the model type +// src is the source map value +// srcVal is the the Value of the source map value func fromMap(tt reflect.Type, fmap *map[string]int, src *map[string]interface{}, srcVal reflect.Value) error { for k, v := range *src { // skip if this is an OData type descriptor diff --git a/sdk/tables/aztable/table_pagers_test.go b/sdk/tables/aztable/table_pagers_test.go index 606884fce573..bb807cf1311d 100644 --- a/sdk/tables/aztable/table_pagers_test.go +++ b/sdk/tables/aztable/table_pagers_test.go @@ -11,7 +11,6 @@ import ( "io/ioutil" "math" "net/http" - "reflect" "strconv" "strings" "testing" @@ -84,14 +83,13 @@ func BenchmarkUnMarshal_AsJson_CastAndRemove_Map(b *testing.B) { func BenchmarkUnMarshal_FromMap_Entity(b *testing.B) { assert := assert.New(b) - tt := reflect.TypeOf(complexEntity{}) - fmap := getTypeValueMap(tt) + bt := []byte(complexPayload) for i := 0; i < b.N; i++ { var val = make(map[string]interface{}) json.Unmarshal(bt, &val) result := complexEntity{} - err := fromMap(tt, fmap, &val, reflect.ValueOf(&result).Elem()) + err := EntityMapAsModel(val, &result) assert.Nil(err) assert.Equal("somePartition", result.PartitionKey) } @@ -165,9 +163,10 @@ func TestDeserializeFromMap(t *testing.T) { bt := []byte(complexPayload) var val = make(map[string]interface{}) json.Unmarshal(bt, &val) - var result complexEntity = complexEntity{} - tt := reflect.TypeOf(complexEntity{}) - err := fromMap(tt, getTypeValueMap(tt), &val, reflect.ValueOf(&result).Elem()) + result := complexEntity{} + // tt := reflect.TypeOf(complexEntity{}) + // err := fromMap(tt, getTypeValueMap(tt), &val, reflect.ValueOf(&result).Elem()) + err := EntityMapAsModel(val, &result) assert.Nil(err) assert.EqualValues(expected, result) } From 9747f1d95b6d02a82625c2d40230b734dd022d02 Mon Sep 17 00:00:00 2001 From: Christopher Scott Date: Thu, 3 Jun 2021 13:16:15 -0500 Subject: [PATCH 11/42] refactors to AddEntity --- sdk/tables/aztable/table_client.go | 22 +++++++++++----------- sdk/tables/aztable/table_client_test.go | 14 +++++++------- sdk/tables/aztable/table_pagers.go | 14 +++++++++----- sdk/tables/aztable/table_pagers_test.go | 18 ++++++++++++++++++ 4 files changed, 45 insertions(+), 23 deletions(-) diff --git a/sdk/tables/aztable/table_client.go b/sdk/tables/aztable/table_client.go index af6ffa12c11c..889d50c6b2c9 100644 --- a/sdk/tables/aztable/table_client.go +++ b/sdk/tables/aztable/table_client.go @@ -74,17 +74,17 @@ func (t *TableClient) GetEntity(ctx context.Context, partitionKey string, rowKey return resp, err } -// AddMapEntity adds an entity to the table. -func (t *TableClient) AddMapEntity(ctx context.Context, entity map[string]interface{}) (TableInsertEntityResponse, error) { - toOdataAnnotatedDictionary(&entity) - resp, err := t.client.InsertEntity(ctx, t.Name, &TableInsertEntityOptions{TableEntityProperties: entity, ResponsePreference: ResponseFormatReturnNoContent.ToPtr()}, &QueryOptions{}) - if err == nil { - insertResp := resp.(TableInsertEntityResponse) - return insertResp, nil - } else { - return TableInsertEntityResponse{}, err - } -} +// // AddMapEntity adds an entity to the table. +// func (t *TableClient) AddMapEntity(ctx context.Context, entity map[string]interface{}) (TableInsertEntityResponse, error) { +// toOdataAnnotatedDictionary(&entity) +// resp, err := t.client.InsertEntity(ctx, t.Name, &TableInsertEntityOptions{TableEntityProperties: entity, ResponsePreference: ResponseFormatReturnNoContent.ToPtr()}, &QueryOptions{}) +// if err == nil { +// insertResp := resp.(TableInsertEntityResponse) +// return insertResp, nil +// } else { +// return TableInsertEntityResponse{}, err +// } +// } // AddEntity adds an entity from an arbitrary interface value to the table. func (t *TableClient) AddEntity(ctx context.Context, entity interface{}) (TableInsertEntityResponse, error) { diff --git a/sdk/tables/aztable/table_client_test.go b/sdk/tables/aztable/table_client_test.go index 09a010a81ce8..718f8928da26 100644 --- a/sdk/tables/aztable/table_client_test.go +++ b/sdk/tables/aztable/table_client_test.go @@ -66,7 +66,7 @@ func (s *tableClientLiveTests) TestAddEntity() { entitiesToCreate := createSimpleEntities(1, "partition") - _, err := client.AddMapEntity(ctx, (*entitiesToCreate)[0]) + _, err := client.AddEntity(ctx, (*entitiesToCreate)[0]) assert.Nil(err) } @@ -93,7 +93,7 @@ func (s *tableClientLiveTests) TestDeleteEntity() { entitiesToCreate := createSimpleEntities(1, "partition") - _, err := client.AddMapEntity(ctx, (*entitiesToCreate)[0]) + _, err := client.AddEntity(ctx, (*entitiesToCreate)[0]) assert.Nil(err) _, delErr := client.DeleteEntity(ctx, (*entitiesToCreate)[0][partitionKey].(string), (*entitiesToCreate)[0][rowKey].(string), "*") assert.Nil(delErr) @@ -106,7 +106,7 @@ func (s *tableClientLiveTests) TestMergeEntity() { entitiesToCreate := createSimpleEntities(1, "partition") - _, err := client.AddMapEntity(ctx, (*entitiesToCreate)[0]) + _, err := client.AddEntity(ctx, (*entitiesToCreate)[0]) assert.Nil(err) var qResp TableEntityQueryResponseResponse @@ -189,7 +189,7 @@ func (s *tableClientLiveTests) _TestGetEntity() { // Add 5 entities entitiesToCreate := createSimpleEntities(1, "partition") for _, e := range *entitiesToCreate { - _, err := client.AddMapEntity(ctx, e) + _, err := client.AddEntity(ctx, e) assert.Nil(err) } @@ -221,7 +221,7 @@ func (s *tableClientLiveTests) TestQuerySimpleEntity() { // Add 5 entities entitiesToCreate := createSimpleEntities(5, "partition") for _, e := range *entitiesToCreate { - _, err := client.AddMapEntity(ctx, e) + _, err := client.AddEntity(ctx, e) assert.Nil(err) } @@ -272,7 +272,7 @@ func (s *tableClientLiveTests) TestQueryComplexEntity() { // Add 5 entities entitiesToCreate := createComplexMapEntities(context, 5, "partition") for _, e := range *entitiesToCreate { - _, err := client.AddMapEntity(ctx, e) + _, err := client.AddEntity(ctx, e) assert.Nil(err) } @@ -442,7 +442,7 @@ func (s *tableClientLiveTests) TestBatchError() { assert.Equal(error_empty_transaction, err.Error()) // Add the last entity to the table prior to adding it as part of the batch to cause a batch failure. - client.AddMapEntity(ctx, (*entitiesToCreate)[2]) + client.AddEntity(ctx, (*entitiesToCreate)[2]) // Add the entities to the batch for i := 0; i < cap(batch); i++ { diff --git a/sdk/tables/aztable/table_pagers.go b/sdk/tables/aztable/table_pagers.go index ea81a8914072..09096ef3b54a 100644 --- a/sdk/tables/aztable/table_pagers.go +++ b/sdk/tables/aztable/table_pagers.go @@ -240,12 +240,16 @@ func toOdataAnnotatedDictionary(entity *map[string]interface{}) error { } func toMap(ent interface{}) (*map[string]interface{}, error) { - var s reflect.Value - if reflect.ValueOf(ent).Kind() == reflect.Ptr { - s = reflect.ValueOf(ent).Elem() - } else { - s = reflect.ValueOf(&ent).Elem().Elem() + // If we were provided a map already, send that back. + if reflect.ValueOf(ent).Kind() == reflect.Map { + entMap := ent.(map[string]interface{}) + err := toOdataAnnotatedDictionary(&entMap) + if err != nil { + return nil, err + } + return &entMap, nil } + s := reflect.ValueOf(&ent).Elem().Elem() typeOfT := s.Type() nf := s.NumField() entMap := make(map[string]interface{}, nf) diff --git a/sdk/tables/aztable/table_pagers_test.go b/sdk/tables/aztable/table_pagers_test.go index bb807cf1311d..23641cb50dec 100644 --- a/sdk/tables/aztable/table_pagers_test.go +++ b/sdk/tables/aztable/table_pagers_test.go @@ -143,6 +143,24 @@ func TestToMap(t *testing.T) { assert.Equal(*ent.SomePtrStringProperty, (*entMap)["SomePtrStringProperty"]) } +func TestToMapWithMap(t *testing.T) { + assert := assert.New(t) + + ent := createComplexEntityMap() + + entMap, err := toMap(ent) + assert.Nil(err) + + // Validate that we have all the @odata.type properties for types []byte, int64, float64, time.Time, and uuid + for k, v := range odataHintProps { + vv, ok := (*entMap)[odataType(k)] + assert.Truef(ok, "Should have found map key of name '%s'", odataType(k)) + assert.Equal(v, vv) + } + + assert.Equal(&ent, entMap) +} + func TestEntitySerialization(t *testing.T) { assert := assert.New(t) From 02b61fb99b52168ce9f097f90d6cb6db4a9ebfe5 Mon Sep 17 00:00:00 2001 From: Christopher Scott Date: Fri, 4 Jun 2021 09:45:17 -0500 Subject: [PATCH 12/42] update some code docs --- sdk/tables/aztable/table_client.go | 15 ++---------- sdk/tables/aztable/table_pagers.go | 39 +++++++++++++++++++++++++++--- 2 files changed, 37 insertions(+), 17 deletions(-) diff --git a/sdk/tables/aztable/table_client.go b/sdk/tables/aztable/table_client.go index 889d50c6b2c9..e16b71d50add 100644 --- a/sdk/tables/aztable/table_client.go +++ b/sdk/tables/aztable/table_client.go @@ -55,11 +55,12 @@ func (t *TableClient) Delete(ctx context.Context) (TableDeleteResponse, error) { // // Query returns a Pager, which allows iteration through each page of results. Example: // -// pager := client.Query() +// pager := client.Query(QueryOptions{}) // for pager.NextPage(ctx) { // resp = pager.PageResponse() // fmt.sprintf("The page contains %i results", len(resp.TableEntityQueryResponse.Value)) // } +// err := pager.Err() func (t *TableClient) Query(queryOptions QueryOptions) TableEntityQueryResponsePager { return &tableEntityQueryResponsePager{tableClient: t, queryOptions: &queryOptions, tableQueryOptions: &TableQueryEntitiesOptions{}} } @@ -74,18 +75,6 @@ func (t *TableClient) GetEntity(ctx context.Context, partitionKey string, rowKey return resp, err } -// // AddMapEntity adds an entity to the table. -// func (t *TableClient) AddMapEntity(ctx context.Context, entity map[string]interface{}) (TableInsertEntityResponse, error) { -// toOdataAnnotatedDictionary(&entity) -// resp, err := t.client.InsertEntity(ctx, t.Name, &TableInsertEntityOptions{TableEntityProperties: entity, ResponsePreference: ResponseFormatReturnNoContent.ToPtr()}, &QueryOptions{}) -// if err == nil { -// insertResp := resp.(TableInsertEntityResponse) -// return insertResp, nil -// } else { -// return TableInsertEntityResponse{}, err -// } -// } - // AddEntity adds an entity from an arbitrary interface value to the table. func (t *TableClient) AddEntity(ctx context.Context, entity interface{}) (TableInsertEntityResponse, error) { entmap, err := toMap(entity) diff --git a/sdk/tables/aztable/table_pagers.go b/sdk/tables/aztable/table_pagers.go index 09096ef3b54a..c5c54d408f4d 100644 --- a/sdk/tables/aztable/table_pagers.go +++ b/sdk/tables/aztable/table_pagers.go @@ -18,6 +18,20 @@ import ( ) // TableEntityQueryResponsePager is a Pager for Table entity query results. +// +// NextPage should be called first. It fetches the next available page of results from the service. +// If the fetched page contains results, the return value is true, else false. +// Results fetched from the service can be evaluated by calling PageResponse on this Pager. +// If the result is false, the value of Err() will indicate if an error occurred. +// +// PageResponse returns the results from the page most recently fetched from the service. +// Example usage of this in combination with NextPage would look like the following: +// +// for pager.NextPage(ctx) { +// resp = pager.PageResponse() +// fmt.sprintf("The page contains %i results", len(resp.TableEntityQueryResponse.Value)) +// } +// err := pager.Err() type TableEntityQueryResponsePager interface { azcore.Pager @@ -35,18 +49,20 @@ type tableEntityQueryResponsePager struct { // NextPage fetches the next available page of results from the service. // If the fetched page contains results, the return value is true, else false. -// Results fetched from the service can be evaulated by calling PageResponse on this Pager. +// Results fetched from the service can be evaluated by calling PageResponse on this Pager. func (p *tableEntityQueryResponsePager) NextPage(ctx context.Context) bool { if p.err != nil || (p.current != nil && p.current.XMSContinuationNextPartitionKey == nil && p.current.XMSContinuationNextRowKey == nil) { return false } var resp TableEntityQueryResponseResponse resp, p.err = p.tableClient.client.QueryEntities(ctx, p.tableClient.Name, p.tableQueryOptions, p.queryOptions) - castAndRemoveAnnotationsSlice(&resp.TableEntityQueryResponse.Value) + if p.err == nil { + castAndRemoveAnnotationsSlice(&resp.TableEntityQueryResponse.Value) + } p.current = &resp p.tableQueryOptions.NextPartitionKey = resp.XMSContinuationNextPartitionKey p.tableQueryOptions.NextRowKey = resp.XMSContinuationNextRowKey - return p.err == nil && resp.TableEntityQueryResponse.Value != nil && len(resp.TableEntityQueryResponse.Value) > 0 + return p.err == nil && resp.TableEntityQueryResponse != nil && len(resp.TableEntityQueryResponse.Value) > 0 } // PageResponse returns the results from the page most recently fetched from the service. @@ -56,6 +72,7 @@ func (p *tableEntityQueryResponsePager) NextPage(ctx context.Context) bool { // resp = pager.PageResponse() // fmt.sprintf("The page contains %i results", len(resp.TableEntityQueryResponse.Value)) // } +// err := pager.Err() func (p *tableEntityQueryResponsePager) PageResponse() TableEntityQueryResponseResponse { return *p.current } @@ -66,6 +83,20 @@ func (p *tableEntityQueryResponsePager) Err() error { } // TableQueryResponsePager is a Pager for Table Queries +// +// NextPage should be called first. It fetches the next available page of results from the service. +// If the fetched page contains results, the return value is true, else false. +// Results fetched from the service can be evaluated by calling PageResponse on this Pager. +// If the result is false, the value of Err() will indicate if an error occurred. +// +// PageResponse returns the results from the page most recently fetched from the service. +// Example usage of this in combination with NextPage would look like the following: +// +// for pager.NextPage(ctx) { +// resp = pager.PageResponse() +// fmt.sprintf("The page contains %i results", len(resp.TableEntityQueryResponse.Value)) +// } +// err := pager.Err() type TableQueryResponsePager interface { azcore.Pager @@ -74,7 +105,7 @@ type TableQueryResponsePager interface { } // AsModels converts each map[string]interface{} entity result into a strongly slice of strongly typed models -// The modelSlice parameter should be a pointer to a slice of stuct types that match the entity model type in the table response. +// The modelSlice parameter should be a pointer to a slice of struct types that match the entity model type in the table response. func (r *TableEntityQueryResponse) AsModels(modelSlice interface{}) error { models := reflect.ValueOf(modelSlice).Elem() tt := getTypeArray(models.Interface()) From d21b6342494e43e8b0f7588a63405cb419b1c62c Mon Sep 17 00:00:00 2001 From: Christopher Scott Date: Fri, 4 Jun 2021 11:35:13 -0500 Subject: [PATCH 13/42] doc fixes --- sdk/tables/aztable/table_service_client.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sdk/tables/aztable/table_service_client.go b/sdk/tables/aztable/table_service_client.go index 5c663ae24d5b..1298780757af 100644 --- a/sdk/tables/aztable/table_service_client.go +++ b/sdk/tables/aztable/table_service_client.go @@ -64,11 +64,12 @@ func (t *TableServiceClient) Delete(ctx context.Context, name string) (TableDele // // Query returns a Pager, which allows iteration through each page of results. Example: // -// pager := client.Query() +// pager := client.Query(QueryOptions{}) // for pager.NextPage(ctx) { // resp = pager.PageResponse() // fmt.sprintf("The page contains %i results", len(resp.TableEntityQueryResponse.Value)) // } +// err := pager.Err() func (t *TableServiceClient) Query(queryOptions QueryOptions) TableQueryResponsePager { return &tableQueryResponsePager{client: t.client, queryOptions: &queryOptions, tableQueryOptions: new(TableQueryOptions)} } From 1b06de5cd986ab0512babfbbe2f4a5bb7390999c Mon Sep 17 00:00:00 2001 From: Christopher Scott Date: Fri, 4 Jun 2021 11:42:36 -0500 Subject: [PATCH 14/42] doc fixes --- sdk/tables/aztable/table_service_client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/tables/aztable/table_service_client.go b/sdk/tables/aztable/table_service_client.go index 1298780757af..f22a3c16e6b8 100644 --- a/sdk/tables/aztable/table_service_client.go +++ b/sdk/tables/aztable/table_service_client.go @@ -67,7 +67,7 @@ func (t *TableServiceClient) Delete(ctx context.Context, name string) (TableDele // pager := client.Query(QueryOptions{}) // for pager.NextPage(ctx) { // resp = pager.PageResponse() -// fmt.sprintf("The page contains %i results", len(resp.TableEntityQueryResponse.Value)) +// fmt.sprintf("The page contains %i results", len(resp.TableQueryResponse.Value)) // } // err := pager.Err() func (t *TableServiceClient) Query(queryOptions QueryOptions) TableQueryResponsePager { From 09e4fb64a03c030a31ebce5bb4bdcc44105309d5 Mon Sep 17 00:00:00 2001 From: Christopher Scott Date: Fri, 4 Jun 2021 16:46:22 -0500 Subject: [PATCH 15/42] doc improvements --- sdk/tables/aztable/table_client.go | 1 + sdk/tables/aztable/zz_generated_models.go | 12 +++++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/sdk/tables/aztable/table_client.go b/sdk/tables/aztable/table_client.go index e16b71d50add..55e1490defa2 100644 --- a/sdk/tables/aztable/table_client.go +++ b/sdk/tables/aztable/table_client.go @@ -76,6 +76,7 @@ func (t *TableClient) GetEntity(ctx context.Context, partitionKey string, rowKey } // AddEntity adds an entity from an arbitrary interface value to the table. +// An entity must have at least a PartionKey and RowKey property. func (t *TableClient) AddEntity(ctx context.Context, entity interface{}) (TableInsertEntityResponse, error) { entmap, err := toMap(entity) if err != nil { diff --git a/sdk/tables/aztable/zz_generated_models.go b/sdk/tables/aztable/zz_generated_models.go index 3daf1c657f99..308254266891 100644 --- a/sdk/tables/aztable/zz_generated_models.go +++ b/sdk/tables/aztable/zz_generated_models.go @@ -158,13 +158,19 @@ type Metrics struct { // QueryOptions contains a group of parameters for the Table.Query method. type QueryOptions struct { - // OData filter expression. + // An Odata filter expression that limits results to those entities that satisfy the filter expression. + // For example, the following expression would return only entities with a PartitionKey of 'foo': "PartitionKey eq 'foo'" Filter *string + // Specifies the media type for the response. Format *OdataMetadataFormat - // Select expression using OData notation. Limits the columns on each record to just those requested, e.g. "$select=PolicyAssignmentId, ResourceId". + + // Select: A comma delimited list of entity property names that selects which set of entity properties to return in the result set. + // For example, the following value would return results containing only the PartitionKey and RowKey properties: "PartitionKey, RowKey" Select *string - // Maximum number of records to return. + + // Top: The maximum number of entities that will be returned per page of results. + // Note: This value does not limit the total number of results if NextPage is called on the returned Pager until it returns false. Top *int32 } From 63e05668f26708db4ddcf66fe8c4464cc6d5c912 Mon Sep 17 00:00:00 2001 From: Christopher Scott Date: Tue, 22 Jun 2021 12:16:54 -0500 Subject: [PATCH 16/42] rename testframework to recording --- sdk/internal/recording/recording.go | 32 +- sdk/internal/recording/recording_test.go | 14 +- sdk/internal/recording/request_matcher.go | 149 ++----- .../recording/request_matcher_test.go | 30 +- sdk/internal/recording/sanitizer.go | 16 +- sdk/internal/recording/sanitizer_test.go | 6 +- sdk/internal/testframework/recording.go | 414 ------------------ .../testframework/recording_sanitizer.go | 83 ---- .../testframework/recording_sanitizer_test.go | 157 ------- sdk/internal/testframework/recording_test.go | 356 --------------- sdk/internal/testframework/request_matcher.go | 111 ----- .../testframework/request_matcher_test.go | 193 -------- sdk/internal/testframework/testcontext.go | 50 --- 13 files changed, 78 insertions(+), 1533 deletions(-) delete mode 100644 sdk/internal/testframework/recording.go delete mode 100644 sdk/internal/testframework/recording_sanitizer.go delete mode 100644 sdk/internal/testframework/recording_sanitizer_test.go delete mode 100644 sdk/internal/testframework/recording_test.go delete mode 100644 sdk/internal/testframework/request_matcher.go delete mode 100644 sdk/internal/testframework/request_matcher_test.go delete mode 100644 sdk/internal/testframework/testcontext.go diff --git a/sdk/internal/recording/recording.go b/sdk/internal/recording/recording.go index c9a4110ac6dc..27e48e10b19f 100644 --- a/sdk/internal/recording/recording.go +++ b/sdk/internal/recording/recording.go @@ -34,7 +34,6 @@ type Recording struct { src rand.Source now *time.Time Sanitizer *Sanitizer - Matcher *RequestMatcher c TestContext } @@ -64,11 +63,8 @@ const ( type VariableType string const ( - // NoSanitization indicates that the recorded value should not be sanitized. - NoSanitization VariableType = "default" - // Secret_String indicates that the recorded value should be replaced with a sanitized value. - Secret_String VariableType = "secret_string" - // Secret_Base64String indicates that the recorded value should be replaced with a sanitized valid base-64 string value. + Default VariableType = "default" + Secret_String VariableType = "secret_string" Secret_Base64String VariableType = "secret_base64String" ) @@ -105,18 +101,17 @@ func NewRecording(c TestContext, mode RecordMode) (*Recording, error) { } // set the recorder Matcher - recording.Matcher = defaultMatcher(c) rec.SetMatcher(recording.matchRequest) // wire up the sanitizer - recording.Sanitizer = defaultSanitizer(rec) + recording.Sanitizer = DefaultSanitizer(rec) return recording, err } -// GetEnvVar returns a recorded environment variable. If the variable is not found we return an error. -// variableType determines how the recorded variable will be saved. -func (r *Recording) GetEnvVar(name string, variableType VariableType) (string, error) { +// GetRecordedVariable returns a recorded variable. If the variable is not found we return an error +// variableType determines how the recorded variable will be saved. Default indicates that the value should be saved without any sanitation. +func (r *Recording) GetRecordedVariable(name string, variableType VariableType) (string, error) { var err error result, ok := r.previousSessionVariables[name] if !ok || r.Mode == Live { @@ -131,10 +126,9 @@ func (r *Recording) GetEnvVar(name string, variableType VariableType) (string, e return *result, err } -// GetOptionalEnvVar returns a recorded environment variable with a fallback default value. -// default Value configures the fallback value to be returned if the environment variable is not set. -// variableType determines how the recorded variable will be saved. -func (r *Recording) GetOptionalEnvVar(name string, defaultValue string, variableType VariableType) string { +// GetOptionalRecordedVariable returns a recorded variable with a fallback default value +// variableType determines how the recorded variable will be saved. Default indicates that the value should be saved without any sanitation. +func (r *Recording) GetOptionalRecordedVariable(name string, defaultValue string, variableType VariableType) string { result, ok := r.previousSessionVariables[name] if !ok || r.Mode == Live { result = getOptionalEnv(name, defaultValue) @@ -269,10 +263,10 @@ func getOptionalEnv(name string, defaultValue string) *string { } func (r *Recording) matchRequest(req *http.Request, rec cassette.Request) bool { - isMatch := r.Matcher.compareMethods(req, rec.Method) && - r.Matcher.compareURLs(req, rec.URL) && - r.Matcher.compareHeaders(req, rec) && - r.Matcher.compareBodies(req, rec.Body) + isMatch := compareMethods(req, rec, r.c) && + compareURLs(req, rec, r.c) && + compareHeaders(req, rec, r.c) && + compareBodies(req, rec, r.c) return isMatch } diff --git a/sdk/internal/recording/recording_test.go b/sdk/internal/recording/recording_test.go index 41c52e141560..40d1a1421e7a 100644 --- a/sdk/internal/recording/recording_test.go +++ b/sdk/internal/recording/recording_test.go @@ -70,17 +70,17 @@ func (s *recordingTests) TestRecordedVariables() { assert.Nil(err) // optional variables always succeed. - assert.Equal(expectedVariableValue, target.GetOptionalEnvVar(nonExistingEnvVar, expectedVariableValue, NoSanitization)) + assert.Equal(expectedVariableValue, target.GetOptionalRecordedVariable(nonExistingEnvVar, expectedVariableValue, Default)) // non existent variables return an error - val, err := target.GetEnvVar(nonExistingEnvVar, NoSanitization) + val, err := target.GetRecordedVariable(nonExistingEnvVar, Default) // mark test as succeeded assert.Equal(envNotExistsError(nonExistingEnvVar), err.Error()) // now create the env variable and check that it can be fetched os.Setenv(nonExistingEnvVar, expectedVariableValue) defer os.Unsetenv(nonExistingEnvVar) - val, err = target.GetEnvVar(nonExistingEnvVar, NoSanitization) + val, err = target.GetRecordedVariable(nonExistingEnvVar, Default) assert.Equal(expectedVariableValue, val) err = target.Stop() @@ -107,10 +107,10 @@ func (s *recordingTests) TestRecordedVariablesSanitized() { assert.Nil(err) // call GetOptionalRecordedVariable with the Secret_String VariableType arg - assert.Equal(secret, target.GetOptionalEnvVar(SanitizedStringVar, secret, Secret_String)) + assert.Equal(secret, target.GetOptionalRecordedVariable(SanitizedStringVar, secret, Secret_String)) // call GetOptionalRecordedVariable with the Secret_Base64String VariableType arg - assert.Equal(secretBase64, target.GetOptionalEnvVar(SanitizedBase64StrigVar, secretBase64, Secret_Base64String)) + assert.Equal(secretBase64, target.GetOptionalRecordedVariable(SanitizedBase64StrigVar, secretBase64, Secret_Base64String)) // Calling Stop will save the variables and apply the sanitization options err = target.Stop() @@ -143,7 +143,7 @@ func (s *recordingTests) TestStopSavesVariablesIfExistAndReadsPreviousVariables( target, err := NewRecording(context, Playback) assert.Nil(err) - target.GetOptionalEnvVar(expectedVariableName, expectedVariableValue, NoSanitization) + target.GetOptionalRecordedVariable(expectedVariableName, expectedVariableValue, Default) err = target.Stop() assert.Nil(err) @@ -159,7 +159,7 @@ func (s *recordingTests) TestStopSavesVariablesIfExistAndReadsPreviousVariables( assert.Nil(err) // add a new variable to the existing batch - target2.GetOptionalEnvVar(addedVariableName, addedVariableValue, NoSanitization) + target2.GetOptionalRecordedVariable(addedVariableName, addedVariableValue, Default) err = target2.Stop() assert.Nil(err) diff --git a/sdk/internal/recording/request_matcher.go b/sdk/internal/recording/request_matcher.go index fafff7eee83c..0fac84f07ff2 100644 --- a/sdk/internal/recording/request_matcher.go +++ b/sdk/internal/recording/request_matcher.go @@ -16,131 +16,60 @@ import ( ) type RequestMatcher struct { - context TestContext - // IgnoredHeaders is a map acting as a hash set of the header names that will be ignored for matching. - // Modifying the keys in the map will affect how headers are matched for recordings. - IgnoredHeaders map[string]struct{} - bodyMatcher StringMatcher - urlMatcher StringMatcher - methodMatcher StringMatcher + ignoredHeaders map[string]*string } -type StringMatcher func(reqVal string, recVal string) bool -type matcherWrapper func(matcher StringMatcher, testContext TestContext) bool - -var ignoredHeaders = map[string]struct{}{ - "Date": {}, - "X-Ms-Date": {}, - "x-ms-date": {}, - "x-ms-client-request-id": {}, - "User-Agent": {}, - "Request-Id": {}, - "traceparent": {}, - "Authorization": {}, -} - -const ( - recordingHeaderMissing = "Test recording headers do not match. Header '%s' is present in request but not in recording." - requestHeaderMissing = "Test recording headers do not match. Header '%s' is present in recording but not in request." - headerValuesMismatch = "Test recording header '%s' does not match. request: %s, recording: %s" - methodMismatch = "Test recording methods do not match. request: %s, recording: %s" - urlMismatch = "Test recording URLs do not match. request: %s, recording: %s" - bodiesMismatch = "Test recording bodies do not match.\nrequest: %s\nrecording: %s" -) - -// defaultMatcher returns a new RequestMatcher configured with the default matching behavior. -func defaultMatcher(testContext TestContext) *RequestMatcher { - // The default sanitizer sanitizes the Authorization header - matcher := &RequestMatcher{ - context: testContext, - IgnoredHeaders: ignoredHeaders, - } - matcher.SetBodyMatcher(func(req string, rec string) bool { - return defaultStringMatcher(req, rec) - }) - matcher.SetURLMatcher(func(req string, rec string) bool { - return defaultStringMatcher(req, rec) - }) - matcher.SetMethodMatcher(func(req string, rec string) bool { - return defaultStringMatcher(req, rec) - }) - - return matcher -} - -// SetBodyMatcher replaces the default matching behavior with a custom StringMatcher that compares the string value of the request body payload with the string value of the recorded body payload. -func (m *RequestMatcher) SetBodyMatcher(matcher StringMatcher) { - m.bodyMatcher = func(reqVal string, recVal string) bool { - isMatch := matcher(reqVal, recVal) - if !isMatch { - m.context.Log(fmt.Sprintf(bodiesMismatch, recVal, recVal)) - } - return isMatch - } -} - -// SetURLMatcher replaces the default matching behavior with a custom StringMatcher that compares the string value of the request URL with the string value of the recorded URL -func (m *RequestMatcher) SetURLMatcher(matcher StringMatcher) { - m.urlMatcher = func(reqVal string, recVal string) bool { - isMatch := matcher(reqVal, recVal) - if !isMatch { - m.context.Log(fmt.Sprintf(urlMismatch, recVal, recVal)) - } - return isMatch - } -} - -// SetMethodMatcher replaces the default matching behavior with a custom StringMatcher that compares the string value of the request method with the string value of the recorded method -func (m *RequestMatcher) SetMethodMatcher(matcher StringMatcher) { - m.methodMatcher = func(reqVal string, recVal string) bool { - isMatch := matcher(reqVal, recVal) - if !isMatch { - m.context.Log(fmt.Sprintf(methodMismatch, recVal, recVal)) - } - return isMatch - } +var ignoredHeaders = map[string]*string{ + "Date": nil, + "X-Ms-Date": nil, + "x-ms-date": nil, + "x-ms-client-request-id": nil, + "User-Agent": nil, + "Request-Id": nil, + "traceparent": nil, + "Authorization": nil, } -func defaultStringMatcher(s1 string, s2 string) bool { - return s1 == s2 -} +var recordingHeaderMissing = "Test recording headers do not match. Header '%s' is present in request but not in recording." +var requestHeaderMissing = "Test recording headers do not match. Header '%s' is present in recording but not in request." +var headerValuesMismatch = "Test recording header '%s' does not match. request: %s, recording: %s" +var methodMismatch = "Test recording methods do not match. request: %s, recording: %s" +var urlMismatch = "Test recording URLs do not match. request: %s, recording: %s" +var bodiesMismatch = "Test recording bodies do not match.\nrequest: %s\nrecording: %s" -func getBody(r *http.Request) string { +func compareBodies(r *http.Request, i cassette.Request, c TestContext) bool { body := bytes.Buffer{} if r.Body != nil { _, err := body.ReadFrom(r.Body) if err != nil { - return "could not parse body: " + err.Error() + return false } r.Body = ioutil.NopCloser(&body) } - return body.String() -} - -func getUrl(r *http.Request) string { - return r.URL.String() -} - -func getMethod(r *http.Request) string { - return r.Method -} - -func (m *RequestMatcher) compareBodies(r *http.Request, recordedBody string) bool { - body := getBody(r) - return m.bodyMatcher(body, recordedBody) + bodiesMatch := body.String() == i.Body + if !bodiesMatch { + c.Log(fmt.Sprintf(bodiesMismatch, body.String(), i.Body)) + } + return bodiesMatch } -func (m *RequestMatcher) compareURLs(r *http.Request, recordedUrl string) bool { - url := getUrl(r) - return m.urlMatcher(url, recordedUrl) +func compareURLs(r *http.Request, i cassette.Request, c TestContext) bool { + if r.URL.String() != i.URL { + c.Log(fmt.Sprintf(urlMismatch, r.URL.String(), i.URL)) + return false + } + return true } -func (m *RequestMatcher) compareMethods(r *http.Request, recordedMethod string) bool { - method := getMethod(r) - return m.methodMatcher(method, recordedMethod) +func compareMethods(r *http.Request, i cassette.Request, c TestContext) bool { + if r.Method != i.Method { + c.Log(fmt.Sprintf(methodMismatch, r.Method, i.Method)) + return false + } + return true } -func (m *RequestMatcher) compareHeaders(r *http.Request, i cassette.Request) bool { +func compareHeaders(r *http.Request, i cassette.Request, c TestContext) bool { unVisitedCassetteKeys := make(map[string]*string, len(i.Headers)) // clone the cassette keys to track which we have seen for k := range i.Headers { @@ -161,20 +90,20 @@ func (m *RequestMatcher) compareHeaders(r *http.Request, i cassette.Request) boo headersMatch := reflect.DeepEqual(requestHeader, recordedHeader) if !headersMatch { // headers don't match - m.context.Log(fmt.Sprintf(headerValuesMismatch, key, requestHeader, recordedHeader)) + c.Log(fmt.Sprintf(headerValuesMismatch, key, requestHeader, recordedHeader)) return false } } else { // header not found - m.context.Log(fmt.Sprintf(recordingHeaderMissing, key)) + c.Log(fmt.Sprintf(recordingHeaderMissing, key)) return false } } if len(unVisitedCassetteKeys) > 0 { // headers exist in the recording that do not exist in the request for headerName := range unVisitedCassetteKeys { - m.context.Log(fmt.Sprintf(requestHeaderMissing, headerName)) + c.Log(fmt.Sprintf(requestHeaderMissing, headerName)) } return false } diff --git a/sdk/internal/recording/request_matcher_test.go b/sdk/internal/recording/request_matcher_test.go index d9027c2fce59..b7aad9b7df1c 100644 --- a/sdk/internal/recording/request_matcher_test.go +++ b/sdk/internal/recording/request_matcher_test.go @@ -33,19 +33,18 @@ const unMatchedBody string = "This body does not match." func (s *requestMatcherTests) TestCompareBodies() { assert := assert.New(s.T()) context := NewTestContext(func(msg string) { assert.FailNow(msg) }, func(msg string) { s.T().Log(msg) }, func() string { return s.T().Name() }) - matcher := defaultMatcher(context) req := http.Request{Body: closerFromString(matchedBody)} recReq := cassette.Request{Body: matchedBody} - isMatch := matcher.compareBodies(&req, recReq.Body) + isMatch := compareBodies(&req, recReq, context) assert.Equal(true, isMatch) // make the requests mis-match req.Body = closerFromString((unMatchedBody)) - isMatch = matcher.compareBodies(&req, recReq.Body) + isMatch = compareBodies(&req, recReq, context) assert.False(isMatch) } @@ -53,7 +52,6 @@ func (s *requestMatcherTests) TestCompareBodies() { func (s *requestMatcherTests) TestCompareHeadersIgnoresIgnoredHeaders() { assert := assert.New(s.T()) context := NewTestContext(func(msg string) { assert.FailNow(msg) }, func(msg string) { s.T().Log(msg) }, func() string { return s.T().Name() }) - matcher := defaultMatcher(context) // populate only ignored headers that do not match reqHeaders := make(http.Header) @@ -67,13 +65,12 @@ func (s *requestMatcherTests) TestCompareHeadersIgnoresIgnoredHeaders() { recReq := cassette.Request{Headers: recordedHeaders} // All headers match - assert.True(matcher.compareHeaders(&req, recReq)) + assert.True(compareHeaders(&req, recReq, context)) } func (s *requestMatcherTests) TestCompareHeadersMatchesHeaders() { assert := assert.New(s.T()) context := NewTestContext(func(msg string) { assert.FailNow(msg) }, func(msg string) { s.T().Log(msg) }, func() string { return s.T().Name() }) - matcher := defaultMatcher(context) // populate only ignored headers that do not match reqHeaders := make(http.Header) @@ -87,13 +84,12 @@ func (s *requestMatcherTests) TestCompareHeadersMatchesHeaders() { req := http.Request{Header: reqHeaders} recReq := cassette.Request{Headers: recordedHeaders} - assert.True(matcher.compareHeaders(&req, recReq)) + assert.True(compareHeaders(&req, recReq, context)) } func (s *requestMatcherTests) TestCompareHeadersFailsMissingRecHeader() { assert := assert.New(s.T()) context := NewTestContext(func(msg string) { assert.FailNow(msg) }, func(msg string) { s.T().Log(msg) }, func() string { return s.T().Name() }) - matcher := defaultMatcher(context) // populate only ignored headers that do not match reqHeaders := make(http.Header) @@ -111,13 +107,12 @@ func (s *requestMatcherTests) TestCompareHeadersFailsMissingRecHeader() { // add a new header to the just req reqHeaders[header2] = headerValue - assert.False(matcher.compareHeaders(&req, recReq)) + assert.False(compareHeaders(&req, recReq, context)) } func (s *requestMatcherTests) TestCompareHeadersFailsMissingReqHeader() { assert := assert.New(s.T()) context := NewTestContext(func(msg string) { assert.FailNow(msg) }, func(msg string) { s.T().Log(msg) }, func() string { return s.T().Name() }) - matcher := defaultMatcher(context) // populate only ignored headers that do not match reqHeaders := make(http.Header) @@ -135,13 +130,12 @@ func (s *requestMatcherTests) TestCompareHeadersFailsMissingReqHeader() { // add a new header to just the recording recordedHeaders[header2] = headerValue - assert.False(matcher.compareHeaders(&req, recReq)) + assert.False(compareHeaders(&req, recReq, context)) } func (s *requestMatcherTests) TestCompareHeadersFailsMismatchedValues() { assert := assert.New(s.T()) context := NewTestContext(func(msg string) { assert.FailNow(msg) }, func(msg string) { s.T().Log(msg) }, func() string { return s.T().Name() }) - matcher := defaultMatcher(context) // populate only ignored headers that do not match reqHeaders := make(http.Header) @@ -161,7 +155,7 @@ func (s *requestMatcherTests) TestCompareHeadersFailsMismatchedValues() { recordedHeaders[header2] = headerValue reqHeaders[header2] = mismatch - assert.False(matcher.compareHeaders(&req, recReq)) + assert.False(compareHeaders(&req, recReq, context)) } func (s *requestMatcherTests) TestCompareURLs() { @@ -171,13 +165,12 @@ func (s *requestMatcherTests) TestCompareURLs() { host := "foo.bar" req := http.Request{URL: &url.URL{Scheme: scheme, Host: host}} recReq := cassette.Request{URL: scheme + "://" + host} - matcher := defaultMatcher(context) - assert.True(matcher.compareURLs(&req, recReq.URL)) + assert.True(compareURLs(&req, recReq, context)) req.URL.Path = "noMatch" - assert.False(matcher.compareURLs(&req, recReq.URL)) + assert.False(compareURLs(&req, recReq, context)) } func (s *requestMatcherTests) TestCompareMethods() { @@ -187,13 +180,12 @@ func (s *requestMatcherTests) TestCompareMethods() { methodPatch := "PATCH" req := http.Request{Method: methodPost} recReq := cassette.Request{Method: methodPost} - matcher := defaultMatcher(context) - assert.True(matcher.compareMethods(&req, recReq.Method)) + assert.True(compareMethods(&req, recReq, context)) req.Method = methodPatch - assert.False(matcher.compareMethods(&req, recReq.Method)) + assert.False(compareMethods(&req, recReq, context)) } func closerFromString(content string) io.ReadCloser { diff --git a/sdk/internal/recording/sanitizer.go b/sdk/internal/recording/sanitizer.go index c53c90edf899..53787ad8b081 100644 --- a/sdk/internal/recording/sanitizer.go +++ b/sdk/internal/recording/sanitizer.go @@ -14,27 +14,21 @@ import ( type Sanitizer struct { recorder *recorder.Recorder - headersToSanitize []string + headersToSanitize map[string]*string urlSanitizer StringSanitizer bodySanitizer StringSanitizer } -// StringSanitizer is a func that will modify the string pointed to by the parameter into a sanitized value. type StringSanitizer func(*string) -// SanitizedValue is the default placeholder value to be used for sanitized strings. const SanitizedValue string = "sanitized" - -// SanitizedBase64Value is the default placeholder value to be used for sanitized base-64 encoded strings. const SanitizedBase64Value string = "Kg==" var sanitizedValueSlice = []string{SanitizedValue} -// defaultSanitizer returns a new RecordingSanitizer with the default sanitizing behavior. -// To customize sanitization, call AddSanitizedHeaders, AddBodySanitizer, or AddUrlSanitizer. -func defaultSanitizer(recorder *recorder.Recorder) *Sanitizer { +func DefaultSanitizer(recorder *recorder.Recorder) *Sanitizer { // The default sanitizer sanitizes the Authorization header - s := &Sanitizer{headersToSanitize: []string{"Authorization"}, recorder: recorder, urlSanitizer: DefaultStringSanitizer, bodySanitizer: DefaultStringSanitizer} + s := &Sanitizer{headersToSanitize: map[string]*string{"Authorization": nil}, recorder: recorder, urlSanitizer: DefaultStringSanitizer, bodySanitizer: DefaultStringSanitizer} recorder.AddSaveFilter(s.applySaveFilter) return s @@ -43,7 +37,7 @@ func defaultSanitizer(recorder *recorder.Recorder) *Sanitizer { // AddSanitizedHeaders adds the supplied header names to the list of headers to be sanitized on request and response recordings. func (s *Sanitizer) AddSanitizedHeaders(headers ...string) { for _, headerName := range headers { - s.headersToSanitize = append(s.headersToSanitize, headerName) + s.headersToSanitize[headerName] = nil } } @@ -58,7 +52,7 @@ func (s *Sanitizer) AddUrlSanitizer(sanitizer StringSanitizer) { } func (s *Sanitizer) sanitizeHeaders(header http.Header) { - for _, headerName := range s.headersToSanitize { + for headerName := range s.headersToSanitize { if _, ok := header[headerName]; ok { header[headerName] = sanitizedValueSlice } diff --git a/sdk/internal/recording/sanitizer_test.go b/sdk/internal/recording/sanitizer_test.go index 8b57be2027ef..774a6fcbd93e 100644 --- a/sdk/internal/recording/sanitizer_test.go +++ b/sdk/internal/recording/sanitizer_test.go @@ -39,7 +39,7 @@ func (s *sanitizerTests) TestDefaultSanitizerSanitizesAuthHeader() { rt := NewMockRoundTripper(server) r, _ := recorder.NewAsMode(getTestFileName(s.T(), false), recorder.ModeRecording, rt) - defaultSanitizer(r) + DefaultSanitizer(r) req, _ := http.NewRequest(http.MethodPost, server.URL(), nil) req.Header.Add(authHeader, "superSecret") @@ -65,7 +65,7 @@ func (s *sanitizerTests) TestAddSanitizedHeadersSanitizes() { rt := NewMockRoundTripper(server) r, _ := recorder.NewAsMode(getTestFileName(s.T(), false), recorder.ModeRecording, rt) - target := defaultSanitizer(r) + target := DefaultSanitizer(r) target.AddSanitizedHeaders(customHeader1, customHeader2) req, _ := http.NewRequest(http.MethodPost, server.URL(), nil) @@ -103,7 +103,7 @@ func (s *sanitizerTests) TestAddUrlSanitizerSanitizes() { baseUrl := server.URL() + "/" - target := defaultSanitizer(r) + target := DefaultSanitizer(r) target.AddUrlSanitizer(func(url *string) { *url = strings.Replace(*url, secret, SanitizedValue, -1) }) diff --git a/sdk/internal/testframework/recording.go b/sdk/internal/testframework/recording.go deleted file mode 100644 index 2b008d55f3f8..000000000000 --- a/sdk/internal/testframework/recording.go +++ /dev/null @@ -1,414 +0,0 @@ -// +build go1.13 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package testframework - -import ( - "errors" - "fmt" - "io/ioutil" - "math/rand" - "net/http" - "os" - "path/filepath" - "strconv" - "strings" - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/internal/uuid" - "github.com/dnaeon/go-vcr/cassette" - "github.com/dnaeon/go-vcr/recorder" - "gopkg.in/yaml.v2" -) - -type Recording struct { - SessionName string - RecordingFile string - VariablesFile string - Mode RecordMode - variables map[string]*string `yaml:"variables"` - previousSessionVariables map[string]*string `yaml:"variables"` - recorder *recorder.Recorder - src rand.Source - now *time.Time - Sanitizer *RecordingSanitizer - c TestContext -} - -const ( - alphanumericBytes = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890" - alphanumericLowercaseBytes = "abcdefghijklmnopqrstuvwxyz1234567890" - randomSeedVariableName = "randomSeed" - nowVariableName = "now" - ModeEnvironmentVariableName = "AZURE_TEST_MODE" -) - -// Inspired by https://stackoverflow.com/questions/22892120/how-to-generate-a-random-string-of-a-fixed-length-in-go -const ( - letterIdxBits = 6 // 6 bits to represent a letter index - letterIdxMask = 1< 0 { - // Merge values from previousVariables that are not in variables to variables - for k, v := range r.previousSessionVariables { - if _, ok := r.variables[k]; ok { - // skip variables that were new in the current session - continue - } - r.variables[k] = v - } - - // Marshal to YAML and save variables - data, err := yaml.Marshal(r.variables) - if err != nil { - return err - } - - f, err := r.createVariablesFileIfNotExists() - if err != nil { - return err - } - - defer f.Close() - - // http://www.yaml.org/spec/1.2/spec.html#id2760395 - _, err = f.Write([]byte("---\n")) - if err != nil { - return err - } - - _, err = f.Write(data) - if err != nil { - return err - } - } - return nil -} - -func (r *Recording) Now() time.Time { - r.initNow() - - return *r.now -} - -func (r *Recording) UUID() uuid.UUID { - r.initRandomSource() - - return uuid.FromSource(r.src) -} - -// GenerateAlphaNumericID will generate a recorded random alpha numeric id -// if the recording has a randomSeed already set, the value will be generated from that seed, else a new random seed will be used -func (r *Recording) GenerateAlphaNumericID(prefix string, length int, lowercaseOnly bool) (string, error) { - - if length <= len(prefix) { - return "", errors.New("length must be greater than prefix") - } - - r.initRandomSource() - - sb := strings.Builder{} - sb.Grow(length) - sb.WriteString(prefix) - i := length - len(prefix) - 1 - // A src.Int63() generates 63 random bits, enough for letterIdxMax characters! - for cache, remain := r.src.Int63(), letterIdxMax; i >= 0; { - if remain == 0 { - cache, remain = r.src.Int63(), letterIdxMax - } - if lowercaseOnly { - if idx := int(cache & letterIdxMask); idx < len(alphanumericLowercaseBytes) { - sb.WriteByte(alphanumericLowercaseBytes[idx]) - i-- - } - } else { - if idx := int(cache & letterIdxMask); idx < len(alphanumericBytes) { - sb.WriteByte(alphanumericBytes[idx]) - i-- - } - } - cache >>= letterIdxBits - remain-- - } - str := sb.String() - return str, nil -} - -// getRequiredEnv gets an environment variable by name and returns an error if it is not found -func getRequiredEnv(name string) (*string, error) { - env, ok := os.LookupEnv(name) - if ok { - return &env, nil - } else { - return nil, errors.New(envNotExistsError(name)) - } -} - -// getOptionalEnv gets an environment variable by name and returns the defaultValue if not found -func getOptionalEnv(name string, defaultValue string) *string { - env, ok := os.LookupEnv(name) - if ok { - return &env - } else { - return &defaultValue - } -} - -func (r *Recording) matchRequest(req *http.Request, rec cassette.Request) bool { - isMatch := compareMethods(req, rec, r.c) && - compareURLs(req, rec, r.c) && - compareHeaders(req, rec, r.c) && - compareBodies(req, rec, r.c) - - return isMatch -} - -func missingRequestError(req *http.Request) string { - reqUrl := req.URL.String() - return fmt.Sprintf("\nNo matching recorded request found.\nRequest: [%s] %s\n", req.Method, reqUrl) -} - -func envNotExistsError(varName string) string { - return "Required environment variable not set: " + varName -} - -// applyVariableOptions applies the VariableType transform to the value -// If variableType is not provided or Default, return result -// If variableType is Secret_String, return SanitizedValue -// If variableType isSecret_Base64String return SanitizedBase64Value -func applyVariableOptions(val *string, variableType VariableType) *string { - var ret string - - switch variableType { - case Secret_String: - ret = SanitizedValue - return &ret - case Secret_Base64String: - ret = SanitizedBase64Value - return &ret - default: - return val - } -} - -// initRandomSource initializes the Source to be used for random value creation in this Recording -func (r *Recording) initRandomSource() { - // if we already have a Source generated, return immediately - if r.src != nil { - return - } - - var seed int64 - var err error - - // check to see if we already have a random seed stored, use that if so - seedString, ok := r.previousSessionVariables[randomSeedVariableName] - if ok { - seed, err = strconv.ParseInt(*seedString, 10, 64) - } - - // We did not have a random seed already stored; create a new one - if !ok || err != nil || r.Mode == Live { - seed = time.Now().Unix() - val := strconv.FormatInt(seed, 10) - r.variables[randomSeedVariableName] = &val - } - - // create a Source with the seed - r.src = rand.NewSource(seed) -} - -// initNow initializes the Source to be used for random value creation in this Recording -func (r *Recording) initNow() { - // if we already have a now generated, return immediately - if r.now != nil { - return - } - - var err error - var nowStr *string - var newNow time.Time - - // check to see if we already have a random seed stored, use that if so - nowStr, ok := r.previousSessionVariables[nowVariableName] - if ok { - newNow, err = time.Parse(time.RFC3339Nano, *nowStr) - } - - // We did not have a random seed already stored; create a new one - if !ok || err != nil || r.Mode == Live { - newNow = time.Now() - nowStr = new(string) - *nowStr = newNow.Format(time.RFC3339Nano) - r.variables[nowVariableName] = nowStr - } - - // save the now value. - r.now = &newNow -} - -// getFilePaths returns (recordingFilePath, variablesFilePath) -func getFilePaths(name string) (string, string) { - recPath := "recordings/" + name - varPath := fmt.Sprintf("%s-variables.yaml", recPath) - return recPath, varPath -} - -// createVariablesFileIfNotExists calls os.Create on the VariablesFile and creates it if it or the path does not exist -// Callers must call Close on the result -func (r *Recording) createVariablesFileIfNotExists() (*os.File, error) { - f, err := os.Create(r.VariablesFile) - if err != nil { - if !os.IsNotExist(err) { - return nil, err - } - // Create directory for the variables if missing - variablesDir := filepath.Dir(r.VariablesFile) - if _, err := os.Stat(variablesDir); os.IsNotExist(err) { - if err = os.MkdirAll(variablesDir, 0755); err != nil { - return nil, err - } - } - - f, err = os.Create(r.VariablesFile) - if err != nil { - return nil, err - } - } - - return f, nil -} - -func (r *Recording) unmarshalVariablesFile(out interface{}) error { - data, err := ioutil.ReadFile(r.VariablesFile) - if err != nil { - // If the file or dir do not exist, this is not an error to report - if os.IsNotExist(err) { - r.c.Log(fmt.Sprintf("Did not find recording for test '%s'", r.RecordingFile)) - return nil - } else { - return err - } - } else { - err = yaml.Unmarshal(data, out) - } - return nil -} - -func (r *Recording) initVariables() error { - return r.unmarshalVariablesFile(r.previousSessionVariables) -} - -var modeMap = map[RecordMode]recorder.Mode{ - Record: recorder.ModeRecording, - Live: recorder.ModeDisabled, - Playback: recorder.ModeReplaying, -} diff --git a/sdk/internal/testframework/recording_sanitizer.go b/sdk/internal/testframework/recording_sanitizer.go deleted file mode 100644 index 873844b7703b..000000000000 --- a/sdk/internal/testframework/recording_sanitizer.go +++ /dev/null @@ -1,83 +0,0 @@ -// +build go1.13 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package testframework - -import ( - "net/http" - - "github.com/dnaeon/go-vcr/cassette" - "github.com/dnaeon/go-vcr/recorder" -) - -type RecordingSanitizer struct { - recorder *recorder.Recorder - headersToSanitize map[string]*string - urlSanitizer StringSanitizer - bodySanitizer StringSanitizer -} - -type StringSanitizer func(*string) - -const SanitizedValue string = "sanitized" -const SanitizedBase64Value string = "Kg==" - -var sanitizedValueSlice = []string{SanitizedValue} - -func DefaultSanitizer(recorder *recorder.Recorder) *RecordingSanitizer { - // The default sanitizer sanitizes the Authorization header - s := &RecordingSanitizer{headersToSanitize: map[string]*string{"Authorization": nil}, recorder: recorder, urlSanitizer: DefaultStringSanitizer, bodySanitizer: DefaultStringSanitizer} - recorder.AddSaveFilter(s.applySaveFilter) - - return s -} - -// AddSanitizedHeaders adds the supplied header names to the list of headers to be sanitized on request and response recordings. -func (s *RecordingSanitizer) AddSanitizedHeaders(headers ...string) { - for _, headerName := range headers { - s.headersToSanitize[headerName] = nil - } -} - -// AddBodysanitizer configures the supplied StringSanitizer to sanitize recording request and response bodies -func (s *RecordingSanitizer) AddBodysanitizer(sanitizer StringSanitizer) { - s.bodySanitizer = sanitizer -} - -// AddUriSanitizer configures the supplied StringSanitizer to sanitize recording request and response URLs -func (s *RecordingSanitizer) AddUrlSanitizer(sanitizer StringSanitizer) { - s.urlSanitizer = sanitizer -} - -func (s *RecordingSanitizer) sanitizeHeaders(header http.Header) { - for headerName := range s.headersToSanitize { - if _, ok := header[headerName]; ok { - header[headerName] = sanitizedValueSlice - } - } -} - -func (s *RecordingSanitizer) sanitizeBodies(body *string) { - s.bodySanitizer(body) -} - -func (s *RecordingSanitizer) sanitizeURL(url *string) { - s.urlSanitizer(url) -} - -func (s *RecordingSanitizer) applySaveFilter(i *cassette.Interaction) error { - s.sanitizeHeaders(i.Request.Headers) - s.sanitizeHeaders(i.Response.Headers) - s.sanitizeURL(&i.Request.URL) - if len(i.Request.Body) > 0 { - s.sanitizeBodies(&i.Request.Body) - } - if len(i.Response.Body) > 0 { - s.sanitizeBodies(&i.Response.Body) - } - return nil -} - -func DefaultStringSanitizer(s *string) {} diff --git a/sdk/internal/testframework/recording_sanitizer_test.go b/sdk/internal/testframework/recording_sanitizer_test.go deleted file mode 100644 index 570dfb3b005b..000000000000 --- a/sdk/internal/testframework/recording_sanitizer_test.go +++ /dev/null @@ -1,157 +0,0 @@ -// +build go1.13 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package testframework - -import ( - "net/http" - "os" - "strings" - "testing" - - "github.com/Azure/azure-sdk-for-go/sdk/internal/mock" - "github.com/dnaeon/go-vcr/cassette" - "github.com/dnaeon/go-vcr/recorder" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/suite" -) - -type recordingSanitizerTests struct { - suite.Suite -} - -const authHeader string = "Authorization" -const customHeader1 string = "Fooheader" -const customHeader2 string = "Barheader" -const nonSanitizedHeader string = "notsanitized" - -func TestRecordingSanitizer(t *testing.T) { - suite.Run(t, new(recordingSanitizerTests)) -} - -func (s *recordingSanitizerTests) TestDefaultSanitizerSanitizesAuthHeader() { - assert := assert.New(s.T()) - server, cleanup := mock.NewServer() - server.SetResponse() - defer cleanup() - rt := NewMockRoundTripper(server) - r, _ := recorder.NewAsMode(getTestFileName(s.T(), false), recorder.ModeRecording, rt) - - DefaultSanitizer(r) - - req, _ := http.NewRequest(http.MethodPost, server.URL(), nil) - req.Header.Add(authHeader, "superSecret") - - r.RoundTrip(req) - r.Stop() - - assert.Equal(SanitizedValue, req.Header.Get(authHeader)) - - rec, err := cassette.Load(getTestFileName(s.T(), false)) - assert.Nil(err) - - for _, i := range rec.Interactions { - assert.Equal(SanitizedValue, i.Request.Headers.Get(authHeader)) - } -} - -func (s *recordingSanitizerTests) TestAddSanitizedHeadersSanitizes() { - assert := assert.New(s.T()) - server, cleanup := mock.NewServer() - server.SetResponse() - defer cleanup() - rt := NewMockRoundTripper(server) - r, _ := recorder.NewAsMode(getTestFileName(s.T(), false), recorder.ModeRecording, rt) - - target := DefaultSanitizer(r) - target.AddSanitizedHeaders(customHeader1, customHeader2) - - req, _ := http.NewRequest(http.MethodPost, server.URL(), nil) - req.Header.Add(customHeader1, "superSecret") - req.Header.Add(customHeader2, "verySecret") - safeValue := "safeValue" - req.Header.Add(nonSanitizedHeader, safeValue) - - r.RoundTrip(req) - r.Stop() - - assert.Equal(SanitizedValue, req.Header.Get(customHeader1)) - assert.Equal(SanitizedValue, req.Header.Get(customHeader2)) - assert.Equal(safeValue, req.Header.Get(nonSanitizedHeader)) - - rec, err := cassette.Load(getTestFileName(s.T(), false)) - assert.Nil(err) - - for _, i := range rec.Interactions { - assert.Equal(SanitizedValue, i.Request.Headers.Get(customHeader1)) - assert.Equal(SanitizedValue, i.Request.Headers.Get(customHeader2)) - assert.Equal(safeValue, i.Request.Headers.Get(nonSanitizedHeader)) - } -} - -func (s *recordingSanitizerTests) TestAddUrlSanitizerSanitizes() { - assert := assert.New(s.T()) - secret := "secretvalue" - secretBody := "some body content that contains a " + secret - server, cleanup := mock.NewServer() - server.SetResponse(mock.WithStatusCode(http.StatusCreated), mock.WithBody([]byte(secretBody))) - defer cleanup() - rt := NewMockRoundTripper(server) - r, _ := recorder.NewAsMode(getTestFileName(s.T(), false), recorder.ModeRecording, rt) - - baseUrl := server.URL() + "/" - - target := DefaultSanitizer(r) - target.AddUrlSanitizer(func(url *string) { - *url = strings.Replace(*url, secret, SanitizedValue, -1) - }) - target.AddBodysanitizer(func(body *string) { - *body = strings.Replace(*body, secret, SanitizedValue, -1) - }) - - req, _ := http.NewRequest(http.MethodPost, baseUrl+secret, closerFromString(secretBody)) - - r.RoundTrip(req) - r.Stop() - - rec, err := cassette.Load(getTestFileName(s.T(), false)) - assert.Nil(err) - - for _, i := range rec.Interactions { - assert.NotContains(i.Response.Body, secret) - assert.NotContains(i.Request.URL, secret) - assert.NotContains(i.Request.Body, secret) - assert.Contains(i.Request.URL, SanitizedValue) - assert.Contains(i.Request.Body, SanitizedValue) - assert.Contains(i.Response.Body, SanitizedValue) - } -} - -func (s *recordingSanitizerTests) TearDownSuite() { - assert := assert.New(s.T()) - // cleanup test files - err := os.RemoveAll("testfiles") - assert.Nil(err) -} - -func getTestFileName(t *testing.T, addSuffix bool) string { - name := "testfiles/" + t.Name() - if addSuffix { - name = name + ".yaml" - } - return name -} - -type mockRoundTripper struct { - server *mock.Server -} - -func NewMockRoundTripper(server *mock.Server) *mockRoundTripper { - return &mockRoundTripper{server: server} -} - -func (m *mockRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) { - return m.server.Do(req) -} diff --git a/sdk/internal/testframework/recording_test.go b/sdk/internal/testframework/recording_test.go deleted file mode 100644 index 4ed73f5805ce..000000000000 --- a/sdk/internal/testframework/recording_test.go +++ /dev/null @@ -1,356 +0,0 @@ -// +build go1.13 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package testframework - -import ( - "fmt" - "io/ioutil" - "net/http" - "os" - "strings" - "testing" - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/internal/mock" - "github.com/dnaeon/go-vcr/cassette" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/suite" -) - -type recordingTests struct { - suite.Suite -} - -func TestRecording(t *testing.T) { - suite.Run(t, new(recordingTests)) -} - -func (s *recordingTests) TestInitializeRecording() { - assert := assert.New(s.T()) - context := NewTestContext(func(msg string) { assert.FailNow(msg) }, func(msg string) { s.T().Log(msg) }, func() string { return s.T().Name() }) - - expectedMode := Playback - - target, err := NewRecording(context, expectedMode) - assert.Nil(err) - assert.NotNil(target.RecordingFile) - assert.NotNil(target.VariablesFile) - assert.Equal(expectedMode, target.Mode) - - err = target.Stop() - assert.Nil(err) -} - -func (s *recordingTests) TestStopDoesNotSaveVariablesWhenNoVariablesExist() { - assert := assert.New(s.T()) - context := NewTestContext(func(msg string) { assert.FailNow(msg) }, func(msg string) { s.T().Log(msg) }, func() string { return s.T().Name() }) - - target, err := NewRecording(context, Playback) - assert.Nil(err) - - err = target.Stop() - assert.Nil(err) - - _, err = ioutil.ReadFile(target.VariablesFile) - assert.Equal(true, os.IsNotExist(err)) -} - -func (s *recordingTests) TestRecordedVariables() { - assert := assert.New(s.T()) - context := NewTestContext(func(msg string) { s.T().Log(msg) }, func(msg string) { s.T().Log(msg) }, func() string { return s.T().Name() }) - - nonExistingEnvVar := "nonExistingEnvVar" - expectedVariableValue := "foobar" - variablesMap := map[string]string{} - - target, err := NewRecording(context, Playback) - assert.Nil(err) - - // optional variables always succeed. - assert.Equal(expectedVariableValue, target.GetOptionalRecordedVariable(nonExistingEnvVar, expectedVariableValue, Default)) - - // non existent variables return an error - val, err := target.GetRecordedVariable(nonExistingEnvVar, Default) - // mark test as succeeded - assert.Equal(envNotExistsError(nonExistingEnvVar), err.Error()) - - // now create the env variable and check that it can be fetched - os.Setenv(nonExistingEnvVar, expectedVariableValue) - defer os.Unsetenv(nonExistingEnvVar) - val, err = target.GetRecordedVariable(nonExistingEnvVar, Default) - assert.Equal(expectedVariableValue, val) - - err = target.Stop() - assert.Nil(err) - - // check that a variables file was created with the correct variable - target.unmarshalVariablesFile(variablesMap) - actualValue, ok := variablesMap[nonExistingEnvVar] - assert.Equal(true, ok) - assert.Equal(expectedVariableValue, actualValue) -} - -func (s *recordingTests) TestRecordedVariablesSanitized() { - assert := assert.New(s.T()) - context := NewTestContext(func(msg string) { assert.FailNow(msg) }, func(msg string) { s.T().Log(msg) }, func() string { return s.T().Name() }) - - SanitizedStringVar := "sanitizedvar" - SanitizedBase64StrigVar := "sanitizedbase64var" - secret := "secretstring" - secretBase64 := "asdfasdf==" - variablesMap := map[string]string{} - - target, err := NewRecording(context, Playback) - assert.Nil(err) - - // call GetOptionalRecordedVariable with the Secret_String VariableType arg - assert.Equal(secret, target.GetOptionalRecordedVariable(SanitizedStringVar, secret, Secret_String)) - - // call GetOptionalRecordedVariable with the Secret_Base64String VariableType arg - assert.Equal(secretBase64, target.GetOptionalRecordedVariable(SanitizedBase64StrigVar, secretBase64, Secret_Base64String)) - - // Calling Stop will save the variables and apply the sanitization options - err = target.Stop() - assert.Nil(err) - - // check that a variables file was created with the correct variables - target.unmarshalVariablesFile(variablesMap) - actualValue, ok := variablesMap[SanitizedStringVar] - assert.Equal(true, ok) - // the saved value is sanitized - assert.Equal(SanitizedValue, actualValue) - - target.unmarshalVariablesFile(variablesMap) - actualValue, ok = variablesMap[SanitizedBase64StrigVar] - assert.Equal(true, ok) - // the saved value is sanitized - assert.Equal(SanitizedBase64Value, actualValue) -} - -func (s *recordingTests) TestStopSavesVariablesIfExistAndReadsPreviousVariables() { - assert := assert.New(s.T()) - context := NewTestContext(func(msg string) { assert.FailNow(msg) }, func(msg string) { s.T().Log(msg) }, func() string { return s.T().Name() }) - - expectedVariableName := "someVariable" - expectedVariableValue := "foobar" - addedVariableName := "addedVariable" - addedVariableValue := "fizzbuzz" - variablesMap := map[string]string{} - - target, err := NewRecording(context, Playback) - assert.Nil(err) - - target.GetOptionalRecordedVariable(expectedVariableName, expectedVariableValue, Default) - - err = target.Stop() - assert.Nil(err) - - // check that a variables file was created with the correct variable - target.unmarshalVariablesFile(variablesMap) - actualValue, ok := variablesMap[expectedVariableName] - assert.True(ok) - assert.Equal(expectedVariableValue, actualValue) - - variablesMap = map[string]string{} - target2, err := NewRecording(context, Playback) - assert.Nil(err) - - // add a new variable to the existing batch - target2.GetOptionalRecordedVariable(addedVariableName, addedVariableValue, Default) - - err = target2.Stop() - assert.Nil(err) - - // check that a variables file was created with the variables loaded from the previous recording - target2.unmarshalVariablesFile(variablesMap) - actualValue, ok = variablesMap[addedVariableName] - assert.Truef(ok, fmt.Sprintf("Should have found %s", addedVariableName)) - assert.Equal(addedVariableValue, actualValue) - actualValue, ok = variablesMap[expectedVariableName] - assert.Truef(ok, fmt.Sprintf("Should have found %s", expectedVariableName)) - assert.Equal(expectedVariableValue, actualValue) -} - -func (s *recordingTests) TestUUID() { - assert := assert.New(s.T()) - context := NewTestContext(func(msg string) { assert.FailNow(msg) }, func(msg string) { s.T().Log(msg) }, func() string { return s.T().Name() }) - - target, err := NewRecording(context, Playback) - assert.Nil(err) - - recordedUUID1 := target.UUID() - recordedUUID1a := target.UUID() - assert.NotEqual(recordedUUID1.String(), recordedUUID1a.String()) - - err = target.Stop() - assert.Nil(err) - - target2, err := NewRecording(context, Playback) - assert.Nil(err) - - recordedUUID2 := target2.UUID() - - // The two generated UUIDs should be the same since target2 loaded the saved random seed from target - assert.Equal(recordedUUID1.String(), recordedUUID2.String()) - - err = target.Stop() - assert.Nil(err) -} - -func (s *recordingTests) TestNow() { - assert := assert.New(s.T()) - context := NewTestContext(func(msg string) { assert.FailNow(msg) }, func(msg string) { s.T().Log(msg) }, func() string { return s.T().Name() }) - - target, err := NewRecording(context, Playback) - assert.Nil(err) - - recordedNow1 := target.Now() - - time.Sleep(time.Millisecond * 100) - - recordedNow1a := target.Now() - assert.Equal(recordedNow1.UnixNano(), recordedNow1a.UnixNano()) - - err = target.Stop() - assert.Nil(err) - - target2, err := NewRecording(context, Playback) - assert.Nil(err) - - recordedNow2 := target2.Now() - - // The two generated nows should be the same since target2 loaded the saved random seed from target - assert.Equal(recordedNow1.UnixNano(), recordedNow2.UnixNano()) - - err = target.Stop() - assert.Nil(err) -} - -func (s *recordingTests) TestGenerateAlphaNumericID() { - assert := assert.New(s.T()) - context := NewTestContext(func(msg string) { assert.FailNow(msg) }, func(msg string) { s.T().Log(msg) }, func() string { return s.T().Name() }) - - prefix := "myprefix" - - target, err := NewRecording(context, Playback) - assert.Nil(err) - - generated1, err := target.GenerateAlphaNumericID(prefix, 10, true) - - assert.Equal(10, len(generated1)) - assert.Equal(true, strings.HasPrefix(generated1, prefix)) - - generated1a, err := target.GenerateAlphaNumericID(prefix, 10, true) - assert.NotEqual(generated1, generated1a) - - err = target.Stop() - assert.Nil(err) - - target2, err := NewRecording(context, Playback) - assert.Nil(err) - - generated2, err := target2.GenerateAlphaNumericID(prefix, 10, true) - - // The two generated Ids should be the same since target2 loaded the saved random seed from target - assert.Equal(generated2, generated1) - - err = target.Stop() - assert.Nil(err) -} - -func (s *recordingTests) TestRecordRequestsAndDoMatching() { - assert := assert.New(s.T()) - context := NewTestContext(func(msg string) { assert.FailNow(msg) }, func(msg string) { s.T().Log(msg) }, func() string { return s.T().Name() }) - server, cleanup := mock.NewServer() - server.SetResponse() - defer cleanup() - rt := NewMockRoundTripper(server) - - target, err := NewRecording(context, Playback) - target.recorder.SetTransport(rt) - - path, err := target.GenerateAlphaNumericID("", 5, true) - reqUrl := server.URL() + "/" + path - - req, _ := http.NewRequest(http.MethodPost, reqUrl, nil) - - // record the request - target.Do(req) - err = target.Stop() - assert.Nil(err) - - rec, err := cassette.Load(target.SessionName) - assert.Nil(err) - - for _, i := range rec.Interactions { - assert.Equal(reqUrl, i.Request.URL) - } - - // re-initialize the recording - target, err = NewRecording(context, Playback) - target.recorder.SetTransport(rt) - - // re-create the random url using the recorded variables - path, err = target.GenerateAlphaNumericID("", 5, true) - reqUrl = server.URL() + "/" + path - req, _ = http.NewRequest(http.MethodPost, reqUrl, nil) - - // playback the request - target.Do(req) - err = target.Stop() - assert.Nil(err) -} - -func (s *recordingTests) TestRecordRequestsAndFailMatchingForMissingRecording() { - assert := assert.New(s.T()) - context := NewTestContext(func(msg string) { s.T().Log(msg) }, func(msg string) { s.T().Log(msg) }, func() string { return s.T().Name() }) - server, cleanup := mock.NewServer() - server.SetResponse() - defer cleanup() - rt := NewMockRoundTripper(server) - - target, err := NewRecording(context, Playback) - target.recorder.SetTransport(rt) - - path, err := target.GenerateAlphaNumericID("", 5, true) - reqUrl := server.URL() + "/" + path - - req, _ := http.NewRequest(http.MethodPost, reqUrl, nil) - - // record the request - target.Do(req) - err = target.Stop() - assert.Nil(err) - - rec, err := cassette.Load(target.SessionName) - assert.Nil(err) - - for _, i := range rec.Interactions { - assert.Equal(reqUrl, i.Request.URL) - } - - // re-initialize the recording - target, err = NewRecording(context, Playback) - target.recorder.SetTransport(rt) - - // re-create the random url using the recorded variables - reqUrl = server.URL() + "/" + "mismatchedRequest" - req, _ = http.NewRequest(http.MethodPost, reqUrl, nil) - - // playback the request - _, err = target.Do(req) - assert.Equal(missingRequestError(req), err.Error()) - // mark succeeded - err = target.Stop() - assert.Nil(err) -} - -func (s *recordingTests) TearDownSuite() { - - // cleanup test files - err := os.RemoveAll("recordings") - assert.Nil(s.T(), err) -} diff --git a/sdk/internal/testframework/request_matcher.go b/sdk/internal/testframework/request_matcher.go deleted file mode 100644 index 38997a5ffa50..000000000000 --- a/sdk/internal/testframework/request_matcher.go +++ /dev/null @@ -1,111 +0,0 @@ -// +build go1.13 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package testframework - -import ( - "bytes" - "fmt" - "io/ioutil" - "net/http" - "reflect" - - "github.com/dnaeon/go-vcr/cassette" -) - -type RequestMatcher struct { - ignoredHeaders map[string]*string -} - -var ignoredHeaders = map[string]*string{ - "Date": nil, - "X-Ms-Date": nil, - "x-ms-date": nil, - "x-ms-client-request-id": nil, - "User-Agent": nil, - "Request-Id": nil, - "traceparent": nil, - "Authorization": nil, -} - -var recordingHeaderMissing = "Test recording headers do not match. Header '%s' is present in request but not in recording." -var requestHeaderMissing = "Test recording headers do not match. Header '%s' is present in recording but not in request." -var headerValuesMismatch = "Test recording header '%s' does not match. request: %s, recording: %s" -var methodMismatch = "Test recording methods do not match. request: %s, recording: %s" -var urlMismatch = "Test recording URLs do not match. request: %s, recording: %s" -var bodiesMismatch = "Test recording bodies do not match.\nrequest: %s\nrecording: %s" - -func compareBodies(r *http.Request, i cassette.Request, c TestContext) bool { - body := bytes.Buffer{} - if r.Body != nil { - _, err := body.ReadFrom(r.Body) - if err != nil { - return false - } - r.Body = ioutil.NopCloser(&body) - } - bodiesMatch := body.String() == i.Body - if !bodiesMatch { - c.Log(fmt.Sprintf(bodiesMismatch, body.String(), i.Body)) - } - return bodiesMatch -} - -func compareURLs(r *http.Request, i cassette.Request, c TestContext) bool { - if r.URL.String() != i.URL { - c.Log(fmt.Sprintf(urlMismatch, r.URL.String(), i.URL)) - return false - } - return true -} - -func compareMethods(r *http.Request, i cassette.Request, c TestContext) bool { - if r.Method != i.Method { - c.Log(fmt.Sprintf(methodMismatch, r.Method, i.Method)) - return false - } - return true -} - -func compareHeaders(r *http.Request, i cassette.Request, c TestContext) bool { - unVisitedCassetteKeys := make(map[string]*string, len(i.Headers)) - // clone the cassette keys to track which we have seen - for k := range i.Headers { - if _, ignore := ignoredHeaders[k]; ignore { - // don't copy ignored headers - continue - } - unVisitedCassetteKeys[k] = nil - } - //iterate through all the request headers to compare them to cassette headers - for key, requestHeader := range r.Header { - if _, ignore := ignoredHeaders[key]; ignore { - // this is an ignorable header - continue - } - delete(unVisitedCassetteKeys, key) - if recordedHeader, foundMatch := i.Headers[key]; foundMatch { - headersMatch := reflect.DeepEqual(requestHeader, recordedHeader) - if !headersMatch { - // headers don't match - c.Log(fmt.Sprintf(headerValuesMismatch, key, requestHeader, recordedHeader)) - return false - } - - } else { - // header not found - c.Log(fmt.Sprintf(recordingHeaderMissing, key)) - return false - } - } - if len(unVisitedCassetteKeys) > 0 { - // headers exist in the recording that do not exist in the request - for headerName := range unVisitedCassetteKeys { - c.Log(fmt.Sprintf(requestHeaderMissing, headerName)) - } - return false - } - return true -} diff --git a/sdk/internal/testframework/request_matcher_test.go b/sdk/internal/testframework/request_matcher_test.go deleted file mode 100644 index 90c945458917..000000000000 --- a/sdk/internal/testframework/request_matcher_test.go +++ /dev/null @@ -1,193 +0,0 @@ -// +build go1.13 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package testframework - -import ( - "io" - "io/ioutil" - "net/http" - "net/url" - "strings" - "testing" - - "github.com/Azure/azure-sdk-for-go/sdk/internal/uuid" - "github.com/dnaeon/go-vcr/cassette" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/suite" -) - -type requestMatcherTests struct { - suite.Suite -} - -func TestRequestMatcher(t *testing.T) { - suite.Run(t, new(requestMatcherTests)) -} - -const matchedBody string = "Matching body." -const unMatchedBody string = "This body does not match." - -func (s *requestMatcherTests) TestCompareBodies() { - assert := assert.New(s.T()) - context := NewTestContext(func(msg string) { assert.FailNow(msg) }, func(msg string) { s.T().Log(msg) }, func() string { return s.T().Name() }) - - req := http.Request{Body: closerFromString(matchedBody)} - recReq := cassette.Request{Body: matchedBody} - - isMatch := compareBodies(&req, recReq, context) - - assert.Equal(true, isMatch) - - // make the requests mis-match - req.Body = closerFromString((unMatchedBody)) - - isMatch = compareBodies(&req, recReq, context) - - assert.False(isMatch) -} - -func (s *requestMatcherTests) TestCompareHeadersIgnoresIgnoredHeaders() { - assert := assert.New(s.T()) - context := NewTestContext(func(msg string) { assert.FailNow(msg) }, func(msg string) { s.T().Log(msg) }, func() string { return s.T().Name() }) - - // populate only ignored headers that do not match - reqHeaders := make(http.Header) - recordedHeaders := make(http.Header) - for headerName := range ignoredHeaders { - reqHeaders[headerName] = []string{uuid.New().String()} - recordedHeaders[headerName] = []string{uuid.New().String()} - } - - req := http.Request{Header: reqHeaders} - recReq := cassette.Request{Headers: recordedHeaders} - - // All headers match - assert.True(compareHeaders(&req, recReq, context)) -} - -func (s *requestMatcherTests) TestCompareHeadersMatchesHeaders() { - assert := assert.New(s.T()) - context := NewTestContext(func(msg string) { assert.FailNow(msg) }, func(msg string) { s.T().Log(msg) }, func() string { return s.T().Name() }) - - // populate only ignored headers that do not match - reqHeaders := make(http.Header) - recordedHeaders := make(http.Header) - header1 := "header1" - headerValue := []string{"some value"} - - reqHeaders[header1] = headerValue - recordedHeaders[header1] = headerValue - - req := http.Request{Header: reqHeaders} - recReq := cassette.Request{Headers: recordedHeaders} - - assert.True(compareHeaders(&req, recReq, context)) -} - -func (s *requestMatcherTests) TestCompareHeadersFailsMissingRecHeader() { - assert := assert.New(s.T()) - context := NewTestContext(func(msg string) { assert.FailNow(msg) }, func(msg string) { s.T().Log(msg) }, func() string { return s.T().Name() }) - - // populate only ignored headers that do not match - reqHeaders := make(http.Header) - recordedHeaders := make(http.Header) - header1 := "header1" - header2 := "header2" - headerValue := []string{"some value"} - - reqHeaders[header1] = headerValue - recordedHeaders[header1] = headerValue - - req := http.Request{Header: reqHeaders} - recReq := cassette.Request{Headers: recordedHeaders} - - // add a new header to the just req - reqHeaders[header2] = headerValue - - assert.False(compareHeaders(&req, recReq, context)) -} - -func (s *requestMatcherTests) TestCompareHeadersFailsMissingReqHeader() { - assert := assert.New(s.T()) - context := NewTestContext(func(msg string) { assert.FailNow(msg) }, func(msg string) { s.T().Log(msg) }, func() string { return s.T().Name() }) - - // populate only ignored headers that do not match - reqHeaders := make(http.Header) - recordedHeaders := make(http.Header) - header1 := "header1" - header2 := "header2" - headerValue := []string{"some value"} - - reqHeaders[header1] = headerValue - recordedHeaders[header1] = headerValue - - req := http.Request{Header: reqHeaders} - recReq := cassette.Request{Headers: recordedHeaders} - - // add a new header to just the recording - recordedHeaders[header2] = headerValue - - assert.False(compareHeaders(&req, recReq, context)) -} - -func (s *requestMatcherTests) TestCompareHeadersFailsMismatchedValues() { - assert := assert.New(s.T()) - context := NewTestContext(func(msg string) { assert.FailNow(msg) }, func(msg string) { s.T().Log(msg) }, func() string { return s.T().Name() }) - - // populate only ignored headers that do not match - reqHeaders := make(http.Header) - recordedHeaders := make(http.Header) - header1 := "header1" - header2 := "header2" - headerValue := []string{"some value"} - mismatch := []string{"mismatch"} - - reqHeaders[header1] = headerValue - recordedHeaders[header1] = headerValue - - req := http.Request{Header: reqHeaders} - recReq := cassette.Request{Headers: recordedHeaders} - - // header names match but values are different - recordedHeaders[header2] = headerValue - reqHeaders[header2] = mismatch - - assert.False(compareHeaders(&req, recReq, context)) -} - -func (s *requestMatcherTests) TestCompareURLs() { - assert := assert.New(s.T()) - context := NewTestContext(func(msg string) { assert.FailNow(msg) }, func(msg string) { s.T().Log(msg) }, func() string { return s.T().Name() }) - scheme := "https" - host := "foo.bar" - req := http.Request{URL: &url.URL{Scheme: scheme, Host: host}} - recReq := cassette.Request{URL: scheme + "://" + host} - - assert.True(compareURLs(&req, recReq, context)) - - req.URL.Path = "noMatch" - - assert.False(compareURLs(&req, recReq, context)) -} - -func (s *requestMatcherTests) TestCompareMethods() { - assert := assert.New(s.T()) - context := NewTestContext(func(msg string) { assert.FailNow(msg) }, func(msg string) { s.T().Log(msg) }, func() string { return s.T().Name() }) - methodPost := "POST" - methodPatch := "PATCH" - req := http.Request{Method: methodPost} - recReq := cassette.Request{Method: methodPost} - - assert.True(compareMethods(&req, recReq, context)) - - req.Method = methodPatch - - assert.False(compareMethods(&req, recReq, context)) -} - -func closerFromString(content string) io.ReadCloser { - return ioutil.NopCloser(strings.NewReader(content)) -} diff --git a/sdk/internal/testframework/testcontext.go b/sdk/internal/testframework/testcontext.go deleted file mode 100644 index 97bcc132e5ef..000000000000 --- a/sdk/internal/testframework/testcontext.go +++ /dev/null @@ -1,50 +0,0 @@ -// +build go1.13 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package testframework - -type TestContext interface { - Fail(string) - Log(string) - Name() string - IsFailed() bool -} - -type testContext struct { - failed bool - fail Failer - log Logger - name string -} - -type Failer func(string) -type Logger func(string) -type Name func() string - -// NewTestContext initializes a new TestContext -func NewTestContext(failer Failer, logger Logger, name Name) TestContext { - return &testContext{fail: failer, log: logger, name: name()} -} - -// Fail calls the Failer func and makes IsFailed return true. -func (c *testContext) Fail(msg string) { - c.failed = true - c.fail(msg) -} - -// Log calls the Logger func. -func (c *testContext) Log(msg string) { - c.log(msg) -} - -// Name calls the Name func and returns the result. -func (c *testContext) Name() string { - return c.name -} - -// IsFailed returns true if the Failer has been called. -func (c *testContext) IsFailed() bool { - return c.failed -} From 67fa153bf9e8c12c09ac0dd9afc13a48b23e128e Mon Sep 17 00:00:00 2001 From: Christopher Scott Date: Mon, 28 Jun 2021 13:27:06 -0500 Subject: [PATCH 17/42] move ci.yml --- sdk/tables/{aztable => }/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename sdk/tables/{aztable => }/ci.yml (84%) diff --git a/sdk/tables/aztable/ci.yml b/sdk/tables/ci.yml similarity index 84% rename from sdk/tables/aztable/ci.yml rename to sdk/tables/ci.yml index 1e3a644b906c..02d8ba7c8216 100644 --- a/sdk/tables/aztable/ci.yml +++ b/sdk/tables/ci.yml @@ -2,12 +2,12 @@ trigger: paths: include: - - sdk/tables/aztable/ + - sdk/tables/ pr: paths: include: - - sdk/tables/aztable/ + - sdk/tables/ stages: - template: ../../../eng/pipelines/templates/jobs/archetype-sdk-client.yml From e743034cb81ef12f4cb68d5c3eaa95e2e99d2016 Mon Sep 17 00:00:00 2001 From: Christopher Scott Date: Mon, 28 Jun 2021 14:07:05 -0500 Subject: [PATCH 18/42] ci path --- sdk/internal/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/internal/ci.yml b/sdk/internal/ci.yml index 2e4d1a250ed3..cccb55d1a2a9 100644 --- a/sdk/internal/ci.yml +++ b/sdk/internal/ci.yml @@ -10,6 +10,6 @@ pr: - sdk/internal/ stages: -- template: ../../eng/pipelines/templates/jobs/archetype-sdk-client.yml +- template: ../eng/pipelines/templates/jobs/archetype-sdk-client.yml parameters: ServiceDirectory: 'internal' From f2d1250d3ede7a88a4277d36d31e6e4a8dc69563 Mon Sep 17 00:00:00 2001 From: Christopher Scott Date: Mon, 28 Jun 2021 14:10:36 -0500 Subject: [PATCH 19/42] ci path --- sdk/internal/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/internal/ci.yml b/sdk/internal/ci.yml index cccb55d1a2a9..2e4d1a250ed3 100644 --- a/sdk/internal/ci.yml +++ b/sdk/internal/ci.yml @@ -10,6 +10,6 @@ pr: - sdk/internal/ stages: -- template: ../eng/pipelines/templates/jobs/archetype-sdk-client.yml +- template: ../../eng/pipelines/templates/jobs/archetype-sdk-client.yml parameters: ServiceDirectory: 'internal' From 274d7acc40f7e98a4a0c193b9fb37724415fe95e Mon Sep 17 00:00:00 2001 From: Sean Kane <68240067+seankane-msft@users.noreply.github.com> Date: Wed, 30 Jun 2021 17:57:43 -0400 Subject: [PATCH 20/42] [Tables] Update from testframework -> recording (#14888) * Initial generation of the aztables module (#14441) * initial generation * Update ci.yml * Introduce internal/testFramework and test aztables with it (#14491) * testFramework initial implementation * sanitizer fixes (#14600) * Progress on aztables (#14676) * implement batch operations and all entity operations * AsModels * rename * comments * comment tweaks, options as pointer * add EntityMapAsModel * refactors to AddEntity * update some code docs * doc fixes * doc fixes * doc improvements * rename testframework to recording * fixing tables to go from testframework -> recording * renaming recordingInstance -> r * file name change Co-authored-by: Christopher Scott Co-authored-by: catalinaperalta --- sdk/tables/aztable/ci.yml | 15 ++++++++++ sdk/tables/aztable/table_client_test.go | 8 +++--- .../aztable/table_service_client_test.go | 8 +++--- ...dedTests.go => zt_table_recorded_tests.go} | 28 +++++++++---------- 4 files changed, 37 insertions(+), 22 deletions(-) create mode 100644 sdk/tables/aztable/ci.yml rename sdk/tables/aztable/{zt_tableRecordedTests.go => zt_table_recorded_tests.go} (82%) diff --git a/sdk/tables/aztable/ci.yml b/sdk/tables/aztable/ci.yml new file mode 100644 index 000000000000..1e3a644b906c --- /dev/null +++ b/sdk/tables/aztable/ci.yml @@ -0,0 +1,15 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. +trigger: + paths: + include: + - sdk/tables/aztable/ + +pr: + paths: + include: + - sdk/tables/aztable/ + +stages: +- template: ../../../eng/pipelines/templates/jobs/archetype-sdk-client.yml + parameters: + ServiceDirectory: 'tables' diff --git a/sdk/tables/aztable/table_client_test.go b/sdk/tables/aztable/table_client_test.go index 718f8928da26..17fd0560dc5c 100644 --- a/sdk/tables/aztable/table_client_test.go +++ b/sdk/tables/aztable/table_client_test.go @@ -11,8 +11,8 @@ import ( "testing" "time" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/internal/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/internal/testframework" "github.com/Azure/azure-sdk-for-go/sdk/internal/uuid" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -22,18 +22,18 @@ import ( type tableClientLiveTests struct { suite.Suite endpointType EndpointType - mode testframework.RecordMode + mode recording.RecordMode } // Hookup to the testing framework func TestTableClient_Storage(t *testing.T) { - storage := tableClientLiveTests{endpointType: StorageEndpoint, mode: testframework.Playback /* change to Record to re-record tests */} + storage := tableClientLiveTests{endpointType: StorageEndpoint, mode: recording.Playback /* change to Record to re-record tests */} suite.Run(t, &storage) } // Hookup to the testing framework func TestTableClient_Cosmos(t *testing.T) { - cosmos := tableClientLiveTests{endpointType: CosmosEndpoint, mode: testframework.Playback /* change to Record to re-record tests */} + cosmos := tableClientLiveTests{endpointType: CosmosEndpoint, mode: recording.Playback /* change to Record to re-record tests */} suite.Run(t, &cosmos) } diff --git a/sdk/tables/aztable/table_service_client_test.go b/sdk/tables/aztable/table_service_client_test.go index c55e60489cf6..2c4d55f006df 100644 --- a/sdk/tables/aztable/table_service_client_test.go +++ b/sdk/tables/aztable/table_service_client_test.go @@ -9,8 +9,8 @@ import ( "net/http" "testing" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/internal/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/internal/testframework" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/suite" ) @@ -18,18 +18,18 @@ import ( type tableServiceClientLiveTests struct { suite.Suite endpointType EndpointType - mode testframework.RecordMode + mode recording.RecordMode } // Hookup to the testing framework func TestServiceClient_Storage(t *testing.T) { - storage := tableServiceClientLiveTests{endpointType: StorageEndpoint, mode: testframework.Playback /* change to Record to re-record tests */} + storage := tableServiceClientLiveTests{endpointType: StorageEndpoint, mode: recording.Playback /* change to Record to re-record tests */} suite.Run(t, &storage) } // Hookup to the testing framework func TestServiceClient_Cosmos(t *testing.T) { - cosmos := tableServiceClientLiveTests{endpointType: CosmosEndpoint, mode: testframework.Playback /* change to Record to re-record tests */} + cosmos := tableServiceClientLiveTests{endpointType: CosmosEndpoint, mode: recording.Playback /* change to Record to re-record tests */} suite.Run(t, &cosmos) } diff --git a/sdk/tables/aztable/zt_tableRecordedTests.go b/sdk/tables/aztable/zt_table_recorded_tests.go similarity index 82% rename from sdk/tables/aztable/zt_tableRecordedTests.go rename to sdk/tables/aztable/zt_table_recorded_tests.go index e39cdd6a3c5c..257bef5e34fe 100644 --- a/sdk/tables/aztable/zt_tableRecordedTests.go +++ b/sdk/tables/aztable/zt_table_recorded_tests.go @@ -11,16 +11,16 @@ import ( "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/internal/testframework" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/stretchr/testify/assert" ) type tablesRecordedTests struct{} type testContext struct { - recording *testframework.Recording + recording *recording.Recording client *TableServiceClient - context *testframework.TestContext + context *recording.TestContext } const ( @@ -54,7 +54,7 @@ func cosmosURI(accountName string, endpointSuffix string) string { } // create the test specific TableClient and wire it up to recordings -func recordedTestSetup(t *testing.T, testName string, endpointType EndpointType, mode testframework.RecordMode) { +func recordedTestSetup(t *testing.T, testName string, endpointType EndpointType, mode recording.RecordMode) { var accountName string var suffix string var cred *SharedKeyCredential @@ -63,27 +63,27 @@ func recordedTestSetup(t *testing.T, testName string, endpointType EndpointType, assert := assert.New(t) // init the test framework - context := testframework.NewTestContext(func(msg string) { assert.FailNow(msg) }, func(msg string) { t.Log(msg) }, func() string { return testName }) - recording, err := testframework.NewRecording(context, mode) + context := recording.NewTestContext(func(msg string) { assert.FailNow(msg) }, func(msg string) { t.Log(msg) }, func() string { return testName }) + r, err := recording.NewRecording(context, mode) assert.Nil(err) if endpointType == StorageEndpoint { - accountName, err = recording.GetRecordedVariable(storageAccountNameEnvVar, testframework.Default) - suffix = recording.GetOptionalRecordedVariable(storageEndpointSuffixEnvVar, DefaultStorageSuffix, testframework.Default) - secret, err = recording.GetRecordedVariable(storageAccountKeyEnvVar, testframework.Secret_Base64String) + accountName, err = r.GetRecordedVariable(storageAccountNameEnvVar, recording.Default) + suffix = r.GetOptionalRecordedVariable(storageEndpointSuffixEnvVar, DefaultStorageSuffix, recording.Default) + secret, err = r.GetRecordedVariable(storageAccountKeyEnvVar, recording.Secret_Base64String) cred, _ = NewSharedKeyCredential(accountName, secret) uri = storageURI(accountName, suffix) } else { - accountName, err = recording.GetRecordedVariable(cosmosAccountNameEnnVar, testframework.Default) - suffix = recording.GetOptionalRecordedVariable(cosmosEndpointSuffixEnvVar, DefaultCosmosSuffix, testframework.Default) - secret, err = recording.GetRecordedVariable(cosmosAccountKeyEnvVar, testframework.Secret_Base64String) + accountName, err = r.GetRecordedVariable(cosmosAccountNameEnnVar, recording.Default) + suffix = r.GetOptionalRecordedVariable(cosmosEndpointSuffixEnvVar, DefaultCosmosSuffix, recording.Default) + secret, err = r.GetRecordedVariable(cosmosAccountKeyEnvVar, recording.Secret_Base64String) cred, _ = NewSharedKeyCredential(accountName, secret) uri = cosmosURI(accountName, suffix) } - client, err := NewTableServiceClient(uri, cred, &TableClientOptions{HTTPClient: recording, Retry: azcore.RetryOptions{MaxRetries: -1}}) + client, err := NewTableServiceClient(uri, cred, &TableClientOptions{HTTPClient: r, Retry: azcore.RetryOptions{MaxRetries: -1}}) assert.Nil(err) - clientsMap[testName] = &testContext{client: client, recording: recording, context: &context} + clientsMap[testName] = &testContext{client: client, recording: r, context: &context} } func recordedTestTeardown(key string) { From ef7030925064318e3b9942cdb68d03c7cfff6762 Mon Sep 17 00:00:00 2001 From: Sean Kane <68240067+seankane-msft@users.noreply.github.com> Date: Thu, 1 Jul 2021 13:22:05 -0400 Subject: [PATCH 21/42] [Tables] ci fix (#14956) --- sdk/tables/aztable/ci.yml | 15 --------------- sdk/tables/ci.yml | 2 +- 2 files changed, 1 insertion(+), 16 deletions(-) delete mode 100644 sdk/tables/aztable/ci.yml diff --git a/sdk/tables/aztable/ci.yml b/sdk/tables/aztable/ci.yml deleted file mode 100644 index 1e3a644b906c..000000000000 --- a/sdk/tables/aztable/ci.yml +++ /dev/null @@ -1,15 +0,0 @@ -# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. -trigger: - paths: - include: - - sdk/tables/aztable/ - -pr: - paths: - include: - - sdk/tables/aztable/ - -stages: -- template: ../../../eng/pipelines/templates/jobs/archetype-sdk-client.yml - parameters: - ServiceDirectory: 'tables' diff --git a/sdk/tables/ci.yml b/sdk/tables/ci.yml index 02d8ba7c8216..3e9703ae327e 100644 --- a/sdk/tables/ci.yml +++ b/sdk/tables/ci.yml @@ -10,6 +10,6 @@ pr: - sdk/tables/ stages: -- template: ../../../eng/pipelines/templates/jobs/archetype-sdk-client.yml +- template: /eng/pipelines/templates/jobs/archetype-sdk-client.yml parameters: ServiceDirectory: 'tables' From 31a726757dbe04a947a2ce7763edee488a39c9fa Mon Sep 17 00:00:00 2001 From: Sean Kane <68240067+seankane-msft@users.noreply.github.com> Date: Fri, 2 Jul 2021 12:19:21 -0400 Subject: [PATCH 22/42] [Tables] Add post-request validation of entity (#14960) * adds a secondary validation if the entity doesnt have pk/rk * creating an errors file just for handling errors * removing extra line * moving error to constants file, renaming constants file * improving test --- sdk/tables/aztable/errors.go | 16 +++ .../TestInvalidEntity-variables.yaml | 5 + .../TestInvalidEntity.yaml | 108 ++++++++++++++ .../TestInvalidEntity-variables.yaml | 5 + .../TestInvalidEntity.yaml | 133 ++++++++++++++++++ sdk/tables/aztable/table_client.go | 3 +- sdk/tables/aztable/table_client_test.go | 16 +++ ...ableConstants.go => zc_table_constants.go} | 4 + 8 files changed, 289 insertions(+), 1 deletion(-) create mode 100644 sdk/tables/aztable/errors.go create mode 100644 sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestInvalidEntity-variables.yaml create mode 100644 sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestInvalidEntity.yaml create mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestInvalidEntity-variables.yaml create mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestInvalidEntity.yaml rename sdk/tables/aztable/{zc_tableConstants.go => zc_table_constants.go} (85%) diff --git a/sdk/tables/aztable/errors.go b/sdk/tables/aztable/errors.go new file mode 100644 index 000000000000..17aeabca6d8f --- /dev/null +++ b/sdk/tables/aztable/errors.go @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package aztable + +func checkEntityForPkRk(entity *map[string]interface{}, err error) error { + if _, ok := (*entity)[partitionKey]; !ok { + return partitionKeyRowKeyError + } + + if _, ok := (*entity)[rowKey]; !ok { + return partitionKeyRowKeyError + } + + return err +} diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestInvalidEntity-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestInvalidEntity-variables.yaml new file mode 100644 index 000000000000..dddafd0a9358 --- /dev/null +++ b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestInvalidEntity-variables.yaml @@ -0,0 +1,5 @@ +--- +COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com +TABLES_COSMOS_ACCOUNT_NAME: seankaneprim +TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== +randomSeed: "1625174648" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestInvalidEntity.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestInvalidEntity.yaml new file mode 100644 index 000000000000..f7d6ce7cd31d --- /dev/null +++ b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestInvalidEntity.yaml @@ -0,0 +1,108 @@ +--- +version: 1 +interactions: +- request: + body: '{"TableName":"gotabley4974nkcrqrre"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "36" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Thu, 01 Jul 2021 21:24:08 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.cosmos.azure.com/Tables + method: POST + response: + body: '{"TableName":"gotabley4974nkcrqrre","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' + headers: + Content-Type: + - application/json;odata=minimalmetadata + Date: + - Thu, 01 Jul 2021 21:24:10 GMT + Etag: + - W/"datetime'2021-07-01T21%3A24%3A10.2885384Z'" + Location: + - https://seankaneprim.table.cosmos.azure.com/Tables('gotabley4974nkcrqrre') + X-Ms-Request-Id: + - 26fb80e3-75f9-42b4-b9a9-7a3d6a937b7b + status: 201 Created + code: 201 + duration: "" +- request: + body: '{"String":"stringystring","Value":10}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "37" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + Prefer: + - return-no-content + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Thu, 01 Jul 2021 21:24:09 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.cosmos.azure.com/gotabley4974nkcrqrre + method: POST + response: + body: "{\"odata.error\":{\"code\":\"PropertiesNeedValue\",\"message\":{\"lang\":\"en-us\",\"value\":\"PartitionKey/RowKey + cannot be empty\\r\\nActivityId: f63a01ba-3218-4ad3-bc69-a5dc878e37d4, documentdb-dotnet-sdk/2.14.0 + Host/64-bit MicrosoftWindowsNT/6.2.9200.0\\nRequestID:f63a01ba-3218-4ad3-bc69-a5dc878e37d4\\n\"}}}\r\n" + headers: + Content-Type: + - application/json;odata=fullmetadata + Date: + - Thu, 01 Jul 2021 21:24:10 GMT + X-Ms-Request-Id: + - f63a01ba-3218-4ad3-bc69-a5dc878e37d4 + status: 400 Bad Request + code: 400 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Thu, 01 Jul 2021 21:24:09 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.cosmos.azure.com/Tables('gotabley4974nkcrqrre') + method: DELETE + response: + body: "" + headers: + Date: + - Thu, 01 Jul 2021 21:24:11 GMT + X-Ms-Request-Id: + - f9c8bf95-0696-44cb-85fb-860689bb1da0 + status: 204 No Content + code: 204 + duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestInvalidEntity-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestInvalidEntity-variables.yaml new file mode 100644 index 000000000000..48013f45c805 --- /dev/null +++ b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestInvalidEntity-variables.yaml @@ -0,0 +1,5 @@ +--- +STORAGE_ENDPOINT_SUFFIX: core.windows.net +TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== +TABLES_STORAGE_ACCOUNT_NAME: seankaneprim +randomSeed: "1625174623" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestInvalidEntity.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestInvalidEntity.yaml new file mode 100644 index 000000000000..a309d8dd3067 --- /dev/null +++ b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestInvalidEntity.yaml @@ -0,0 +1,133 @@ +--- +version: 1 +interactions: +- request: + body: '{"TableName":"gotablen0ipkkd8ohqoy"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "36" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Thu, 01 Jul 2021 21:23:43 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/Tables + method: POST + response: + body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotablen0ipkkd8ohqoy"}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + Date: + - Thu, 01 Jul 2021 21:23:44 GMT + Location: + - https://seankaneprim.table.core.windows.net/Tables('gotablen0ipkkd8ohqoy') + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - 767eaafb-2002-0052-0bbf-6e949d000000 + X-Ms-Version: + - "2019-02-02" + status: 201 Created + code: 201 + duration: "" +- request: + body: '{"String":"stringystring","Value":10}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "37" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + Prefer: + - return-no-content + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Thu, 01 Jul 2021 21:23:44 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/gotablen0ipkkd8ohqoy + method: POST + response: + body: '{"odata.error":{"code":"PropertiesNeedValue","message":{"lang":"en-US","value":"The + values are not specified for all properties in the entity.\nRequestId:767eab30-2002-0052-3dbf-6e949d000000\nTime:2021-07-01T21:23:45.3479288Z"}}}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + Date: + - Thu, 01 Jul 2021 21:23:44 GMT + Preference-Applied: + - return-no-content + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - 767eab30-2002-0052-3dbf-6e949d000000 + X-Ms-Version: + - "2019-02-02" + status: 400 Bad Request + code: 400 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Thu, 01 Jul 2021 21:23:44 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/Tables('gotablen0ipkkd8ohqoy') + method: DELETE + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Date: + - Thu, 01 Jul 2021 21:23:44 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - 767eab70-2002-0052-7bbf-6e949d000000 + X-Ms-Version: + - "2019-02-02" + status: 204 No Content + code: 204 + duration: "" diff --git a/sdk/tables/aztable/table_client.go b/sdk/tables/aztable/table_client.go index 55e1490defa2..3a5fc2d9de22 100644 --- a/sdk/tables/aztable/table_client.go +++ b/sdk/tables/aztable/table_client.go @@ -76,7 +76,7 @@ func (t *TableClient) GetEntity(ctx context.Context, partitionKey string, rowKey } // AddEntity adds an entity from an arbitrary interface value to the table. -// An entity must have at least a PartionKey and RowKey property. +// An entity must have at least a PartitionKey and RowKey property. func (t *TableClient) AddEntity(ctx context.Context, entity interface{}) (TableInsertEntityResponse, error) { entmap, err := toMap(entity) if err != nil { @@ -87,6 +87,7 @@ func (t *TableClient) AddEntity(ctx context.Context, entity interface{}) (TableI insertResp := resp.(TableInsertEntityResponse) return insertResp, nil } else { + err = checkEntityForPkRk(entmap, err) return TableInsertEntityResponse{}, err } } diff --git a/sdk/tables/aztable/table_client_test.go b/sdk/tables/aztable/table_client_test.go index 17fd0560dc5c..ca84adf6daca 100644 --- a/sdk/tables/aztable/table_client_test.go +++ b/sdk/tables/aztable/table_client_test.go @@ -458,6 +458,22 @@ func (s *tableClientLiveTests) TestBatchError() { assert.Equal(http.StatusConflict, (*resp.TransactionResponses)[0].StatusCode) } +func (s *tableClientLiveTests) TestInvalidEntity() { + assert := assert.New(s.T()) + client, delete := s.init(true) + defer delete() + + badEntity := &map[string]interface{}{ + "Value": 10, + "String": "stringystring", + } + + _, err := client.AddEntity(ctx, *badEntity) + + assert.NotNil(err) + assert.Contains(err.Error(), partitionKeyRowKeyError.Error()) +} + // setup the test environment func (s *tableClientLiveTests) BeforeTest(suite string, test string) { recordedTestSetup(s.T(), s.T().Name(), s.endpointType, s.mode) diff --git a/sdk/tables/aztable/zc_tableConstants.go b/sdk/tables/aztable/zc_table_constants.go similarity index 85% rename from sdk/tables/aztable/zc_tableConstants.go rename to sdk/tables/aztable/zc_table_constants.go index 3514394724d2..ee29206d8195 100644 --- a/sdk/tables/aztable/zc_tableConstants.go +++ b/sdk/tables/aztable/zc_table_constants.go @@ -3,6 +3,8 @@ package aztable +import "errors" + const ( timestamp = "Timestamp" partitionKey = "PartitionKey" @@ -21,3 +23,5 @@ const ( edmString = "Edm.String" ISO8601 = "2006-01-02T15:04:05.9999999Z" ) + +var partitionKeyRowKeyError = errors.New("Entity must have a PartitionKey and RowKey") From 6bc983b1c42913255daf140aa91c12eb6bf8fe48 Mon Sep 17 00:00:00 2001 From: Sean Kane <68240067+seankane-msft@users.noreply.github.com> Date: Thu, 8 Jul 2021 12:27:17 -0400 Subject: [PATCH 23/42] [Tables] changing QueryOptions param to be a ptr (#14961) * changing QueryOptions param to be a ptr * feedback from catalina --- sdk/tables/aztable/table_client.go | 23 +++++++++++-------- sdk/tables/aztable/table_client_test.go | 16 ++++++------- sdk/tables/aztable/table_service_client.go | 6 ++--- .../aztable/table_service_client_test.go | 4 ++-- sdk/tables/aztable/zt_table_recorded_tests.go | 2 +- 5 files changed, 27 insertions(+), 24 deletions(-) diff --git a/sdk/tables/aztable/table_client.go b/sdk/tables/aztable/table_client.go index 3a5fc2d9de22..21f9959f7f79 100644 --- a/sdk/tables/aztable/table_client.go +++ b/sdk/tables/aztable/table_client.go @@ -55,19 +55,22 @@ func (t *TableClient) Delete(ctx context.Context) (TableDeleteResponse, error) { // // Query returns a Pager, which allows iteration through each page of results. Example: // -// pager := client.Query(QueryOptions{}) +// pager := client.Query(nil) // for pager.NextPage(ctx) { // resp = pager.PageResponse() // fmt.sprintf("The page contains %i results", len(resp.TableEntityQueryResponse.Value)) // } // err := pager.Err() -func (t *TableClient) Query(queryOptions QueryOptions) TableEntityQueryResponsePager { - return &tableEntityQueryResponsePager{tableClient: t, queryOptions: &queryOptions, tableQueryOptions: &TableQueryEntitiesOptions{}} +func (t *TableClient) Query(queryOptions *QueryOptions) TableEntityQueryResponsePager { + if queryOptions == nil { + queryOptions = &QueryOptions{} + } + return &tableEntityQueryResponsePager{tableClient: t, queryOptions: queryOptions, tableQueryOptions: &TableQueryEntitiesOptions{}} } // GetEntity retrieves a specific entity from the service using the specified partitionKey and rowKey values. func (t *TableClient) GetEntity(ctx context.Context, partitionKey string, rowKey string) (MapOfInterfaceResponse, error) { - resp, err := t.client.QueryEntityWithPartitionAndRowKey(ctx, t.Name, partitionKey, rowKey, &TableQueryEntityWithPartitionAndRowKeyOptions{}, &QueryOptions{}) + resp, err := t.client.QueryEntityWithPartitionAndRowKey(ctx, t.Name, partitionKey, rowKey, &TableQueryEntityWithPartitionAndRowKeyOptions{}, nil) if err != nil { return resp, err } @@ -82,7 +85,7 @@ func (t *TableClient) AddEntity(ctx context.Context, entity interface{}) (TableI if err != nil { return TableInsertEntityResponse{}, azcore.NewResponseError(err, nil) } - resp, err := t.client.InsertEntity(ctx, t.Name, &TableInsertEntityOptions{TableEntityProperties: *entmap, ResponsePreference: ResponseFormatReturnNoContent.ToPtr()}, &QueryOptions{}) + resp, err := t.client.InsertEntity(ctx, t.Name, &TableInsertEntityOptions{TableEntityProperties: *entmap, ResponsePreference: ResponseFormatReturnNoContent.ToPtr()}, nil) if err == nil { insertResp := resp.(TableInsertEntityResponse) return insertResp, nil @@ -94,7 +97,7 @@ func (t *TableClient) AddEntity(ctx context.Context, entity interface{}) (TableI // DeleteEntity deletes the entity with the specified partitionKey and rowKey from the table. func (t *TableClient) DeleteEntity(ctx context.Context, partitionKey string, rowKey string, etag string) (TableDeleteEntityResponse, error) { - return t.client.DeleteEntity(ctx, t.Name, partitionKey, rowKey, etag, nil, &QueryOptions{}) + return t.client.DeleteEntity(ctx, t.Name, partitionKey, rowKey, etag, nil, nil) } // UpdateEntity updates the specified table entity if it exists. @@ -111,9 +114,9 @@ func (t *TableClient) UpdateEntity(ctx context.Context, entity map[string]interf } switch updateMode { case Merge: - return t.client.MergeEntity(ctx, t.Name, pk, rk, &TableMergeEntityOptions{IfMatch: &ifMatch, TableEntityProperties: entity}, &QueryOptions{}) + return t.client.MergeEntity(ctx, t.Name, pk, rk, &TableMergeEntityOptions{IfMatch: &ifMatch, TableEntityProperties: entity}, nil) case Replace: - return t.client.UpdateEntity(ctx, t.Name, pk, rk, &TableUpdateEntityOptions{IfMatch: &ifMatch, TableEntityProperties: entity}, &QueryOptions{}) + return t.client.UpdateEntity(ctx, t.Name, pk, rk, &TableUpdateEntityOptions{IfMatch: &ifMatch, TableEntityProperties: entity}, nil) } return nil, errors.New("Invalid TableUpdateMode") } @@ -127,9 +130,9 @@ func (t *TableClient) UpsertEntity(ctx context.Context, entity map[string]interf switch updateMode { case Merge: - return t.client.MergeEntity(ctx, t.Name, pk, rk, &TableMergeEntityOptions{TableEntityProperties: entity}, &QueryOptions{}) + return t.client.MergeEntity(ctx, t.Name, pk, rk, &TableMergeEntityOptions{TableEntityProperties: entity}, nil) case Replace: - return t.client.UpdateEntity(ctx, t.Name, pk, rk, &TableUpdateEntityOptions{TableEntityProperties: entity}, &QueryOptions{}) + return t.client.UpdateEntity(ctx, t.Name, pk, rk, &TableUpdateEntityOptions{TableEntityProperties: entity}, nil) } return nil, errors.New("Invalid TableUpdateMode") } diff --git a/sdk/tables/aztable/table_client_test.go b/sdk/tables/aztable/table_client_test.go index ca84adf6daca..d5e297971a67 100644 --- a/sdk/tables/aztable/table_client_test.go +++ b/sdk/tables/aztable/table_client_test.go @@ -111,7 +111,7 @@ func (s *tableClientLiveTests) TestMergeEntity() { var qResp TableEntityQueryResponseResponse filter := "RowKey eq '1'" - pager := client.Query(QueryOptions{Filter: &filter}) + pager := client.Query(&QueryOptions{Filter: &filter}) for pager.NextPage(ctx) { qResp = pager.PageResponse() } @@ -128,7 +128,7 @@ func (s *tableClientLiveTests) TestMergeEntity() { _, updateErr := client.UpdateEntity(ctx, mergeProperty, nil, Merge) assert.Nil(updateErr) - pager = client.Query(QueryOptions{Filter: &filter}) + pager = client.Query(&QueryOptions{Filter: &filter}) for pager.NextPage(ctx) { qResp = pager.PageResponse() } @@ -152,7 +152,7 @@ func (s *tableClientLiveTests) TestUpsertEntity() { var qResp TableEntityQueryResponseResponse filter := "RowKey eq '1'" - pager := client.Query(QueryOptions{Filter: &filter}) + pager := client.Query(&QueryOptions{Filter: &filter}) for pager.NextPage(ctx) { qResp = pager.PageResponse() } @@ -169,7 +169,7 @@ func (s *tableClientLiveTests) TestUpsertEntity() { _, updateErr := client.UpsertEntity(ctx, mergeProperty, Replace) require.Nil(updateErr) - pager = client.Query(QueryOptions{Filter: &filter}) + pager = client.Query(&QueryOptions{Filter: &filter}) for pager.NextPage(ctx) { qResp = pager.PageResponse() } @@ -229,7 +229,7 @@ func (s *tableClientLiveTests) TestQuerySimpleEntity() { expectedCount := 4 var resp TableEntityQueryResponseResponse var models []simpleEntity - pager := client.Query(QueryOptions{Filter: &filter}) + pager := client.Query(&QueryOptions{Filter: &filter}) for pager.NextPage(ctx) { resp = pager.PageResponse() models = make([]simpleEntity, len(resp.TableEntityQueryResponse.Value)) @@ -279,7 +279,7 @@ func (s *tableClientLiveTests) TestQueryComplexEntity() { filter := "RowKey lt '5'" expectedCount := 4 var resp TableEntityQueryResponseResponse - pager := client.Query(QueryOptions{Filter: &filter}) + pager := client.Query(&QueryOptions{Filter: &filter}) for pager.NextPage(ctx) { resp = pager.PageResponse() assert.Equal(expectedCount, len(resp.TableEntityQueryResponse.Value)) @@ -367,7 +367,7 @@ func (s *tableClientLiveTests) TestBatchMixed() { var qResp TableEntityQueryResponseResponse filter := "RowKey eq '1'" - pager := client.Query(QueryOptions{Filter: &filter}) + pager := client.Query(&QueryOptions{Filter: &filter}) for pager.NextPage(ctx) { qResp = pager.PageResponse() } @@ -413,7 +413,7 @@ func (s *tableClientLiveTests) TestBatchMixed() { } - pager = client.Query(QueryOptions{Filter: &filter}) + pager = client.Query(&QueryOptions{Filter: &filter}) for pager.NextPage(ctx) { qResp = pager.PageResponse() } diff --git a/sdk/tables/aztable/table_service_client.go b/sdk/tables/aztable/table_service_client.go index f22a3c16e6b8..c74dbff76e66 100644 --- a/sdk/tables/aztable/table_service_client.go +++ b/sdk/tables/aztable/table_service_client.go @@ -64,14 +64,14 @@ func (t *TableServiceClient) Delete(ctx context.Context, name string) (TableDele // // Query returns a Pager, which allows iteration through each page of results. Example: // -// pager := client.Query(QueryOptions{}) +// pager := client.Query(nil) // for pager.NextPage(ctx) { // resp = pager.PageResponse() // fmt.sprintf("The page contains %i results", len(resp.TableQueryResponse.Value)) // } // err := pager.Err() -func (t *TableServiceClient) Query(queryOptions QueryOptions) TableQueryResponsePager { - return &tableQueryResponsePager{client: t.client, queryOptions: &queryOptions, tableQueryOptions: new(TableQueryOptions)} +func (t *TableServiceClient) Query(queryOptions *QueryOptions) TableQueryResponsePager { + return &tableQueryResponsePager{client: t.client, queryOptions: queryOptions, tableQueryOptions: new(TableQueryOptions)} } func isCosmosEndpoint(url string) bool { diff --git a/sdk/tables/aztable/table_service_client_test.go b/sdk/tables/aztable/table_service_client_test.go index 2c4d55f006df..62af3cfd42b0 100644 --- a/sdk/tables/aztable/table_service_client_test.go +++ b/sdk/tables/aztable/table_service_client_test.go @@ -85,7 +85,7 @@ func (s *tableServiceClientLiveTests) TestQueryTable() { // Query for tables with no pagination. The filter should exclude one table from the results filter := fmt.Sprintf("TableName ge '%s' and TableName lt '%s'", prefix1, prefix2) - pager := context.client.Query(QueryOptions{Filter: &filter}) + pager := context.client.Query(&QueryOptions{Filter: &filter}) resultCount := 0 for pager.NextPage(ctx) { @@ -98,7 +98,7 @@ func (s *tableServiceClientLiveTests) TestQueryTable() { // Query for tables with pagination top := int32(2) - pager = context.client.Query(QueryOptions{Filter: &filter, Top: &top}) + pager = context.client.Query(&QueryOptions{Filter: &filter, Top: &top}) resultCount = 0 pageCount := 0 diff --git a/sdk/tables/aztable/zt_table_recorded_tests.go b/sdk/tables/aztable/zt_table_recorded_tests.go index 257bef5e34fe..8af8521fec02 100644 --- a/sdk/tables/aztable/zt_table_recorded_tests.go +++ b/sdk/tables/aztable/zt_table_recorded_tests.go @@ -97,7 +97,7 @@ func recordedTestTeardown(key string) { func cleanupTables(context *testContext, tables *[]string) { c := context.client if tables == nil { - pager := c.Query(QueryOptions{}) + pager := c.Query(nil) for pager.NextPage(ctx) { for _, t := range pager.PageResponse().TableQueryResponse.Value { c.Delete(ctx, *t.TableName) From 3d6b5ce0709ed44cfdfc56b0b044110d6cbcf31b Mon Sep 17 00:00:00 2001 From: Sean Kane <68240067+seankane-msft@users.noreply.github.com> Date: Fri, 9 Jul 2021 16:32:10 -0400 Subject: [PATCH 24/42] [Tables] linting Fixes (#15028) * small fixes * small fixes * small fixes * small fixes * small fixes * small fixes * adding error checking to transactional batching * adding error checking to test set up * adding more error checking * adding more error checking * fixing two tests * fixing error reporting * fixing error reporting * fixing error reporting * fixing last lint failure --- .../shared_policy_shared_key_credential.go | 20 ++--- sdk/tables/aztable/table_client.go | 2 +- sdk/tables/aztable/table_client_test.go | 16 ++-- sdk/tables/aztable/table_pagers.go | 8 +- sdk/tables/aztable/table_pagers_test.go | 38 ++++++--- sdk/tables/aztable/table_service_client.go | 6 +- .../aztable/table_service_client_test.go | 22 +++++- .../aztable/table_transactional_batch.go | 79 +++++++++++++++---- sdk/tables/aztable/zc_table_constants.go | 1 + sdk/tables/aztable/zt_table_recorded_tests.go | 33 ++++++-- 10 files changed, 162 insertions(+), 63 deletions(-) diff --git a/sdk/tables/aztable/shared_policy_shared_key_credential.go b/sdk/tables/aztable/shared_policy_shared_key_credential.go index c9c2d7beeb1a..ca011f0b5240 100644 --- a/sdk/tables/aztable/shared_policy_shared_key_credential.go +++ b/sdk/tables/aztable/shared_policy_shared_key_credential.go @@ -53,19 +53,15 @@ func (c *SharedKeyCredential) SetAccountKey(accountKey string) error { } // computeHMACSHA256 generates a hash signature for an HTTP request or for a SAS. -func (c *SharedKeyCredential) ComputeHMACSHA256(message string) (base64String string) { +func (c *SharedKeyCredential) ComputeHMACSHA256(message string) (string, error) { h := hmac.New(sha256.New, c.accountKey.Load().([]byte)) - h.Write([]byte(message)) - return base64.StdEncoding.EncodeToString(h.Sum(nil)) + _, err := h.Write([]byte(message)) + return base64.StdEncoding.EncodeToString(h.Sum(nil)), err } func (c *SharedKeyCredential) buildStringToSign(req *http.Request) (string, error) { // https://docs.microsoft.com/en-us/rest/api/storageservices/authentication-for-the-azure-storage-services headers := req.Header - contentLength := headers.Get(azcore.HeaderContentLength) - if contentLength == "0" { - contentLength = "" - } canonicalizedResource, err := c.buildCanonicalizedResource(req.URL) if err != nil { @@ -79,6 +75,7 @@ func (c *SharedKeyCredential) buildStringToSign(req *http.Request) (string, erro return stringToSign, nil } +//nolint func (c *SharedKeyCredential) buildCanonicalizedHeader(headers http.Header) string { cm := map[string][]string{} for k, v := range headers { @@ -105,7 +102,7 @@ func (c *SharedKeyCredential) buildCanonicalizedHeader(headers http.Header) stri ch.WriteRune(':') ch.WriteString(strings.Join(cm[key], ",")) } - return string(ch.Bytes()) + return ch.String() } func (c *SharedKeyCredential) buildCanonicalizedResource(u *url.URL) (string, error) { @@ -133,7 +130,7 @@ func (c *SharedKeyCredential) buildCanonicalizedResource(u *url.URL) (string, er //do something here cr.WriteString("?" + "comp=" + compVal[0]) } - return string(cr.Bytes()), nil + return cr.String(), nil } // AuthenticationPolicy implements the Credential interface on SharedKeyCredential. @@ -147,7 +144,10 @@ func (c *SharedKeyCredential) AuthenticationPolicy(azcore.AuthenticationPolicyOp if err != nil { return nil, err } - signature := c.ComputeHMACSHA256(stringToSign) + signature, err := c.ComputeHMACSHA256(stringToSign) + if err != nil { + return nil, err + } authHeader := strings.Join([]string{"SharedKeyLite ", c.AccountName(), ":", signature}, "") req.Request.Header.Set(azcore.HeaderAuthorization, authHeader) diff --git a/sdk/tables/aztable/table_client.go b/sdk/tables/aztable/table_client.go index 21f9959f7f79..88f199249a78 100644 --- a/sdk/tables/aztable/table_client.go +++ b/sdk/tables/aztable/table_client.go @@ -74,7 +74,7 @@ func (t *TableClient) GetEntity(ctx context.Context, partitionKey string, rowKey if err != nil { return resp, err } - castAndRemoveAnnotations(&resp.Value) + err = castAndRemoveAnnotations(&resp.Value) return resp, err } diff --git a/sdk/tables/aztable/table_client_test.go b/sdk/tables/aztable/table_client_test.go index d5e297971a67..98b0cd8fa1ca 100644 --- a/sdk/tables/aztable/table_client_test.go +++ b/sdk/tables/aztable/table_client_test.go @@ -6,6 +6,7 @@ package aztable import ( "bytes" "errors" + "fmt" "io/ioutil" "net/http" "testing" @@ -180,7 +181,7 @@ func (s *tableClientLiveTests) TestUpsertEntity() { assert.Equalf(postMerge[mergeProp], val, "%s property should equal %s", mergeProp, val) } -func (s *tableClientLiveTests) _TestGetEntity() { +func (s *tableClientLiveTests) TestGetEntity() { assert := assert.New(s.T()) require := require.New(s.T()) client, delete := s.init(true) @@ -233,7 +234,8 @@ func (s *tableClientLiveTests) TestQuerySimpleEntity() { for pager.NextPage(ctx) { resp = pager.PageResponse() models = make([]simpleEntity, len(resp.TableEntityQueryResponse.Value)) - resp.TableEntityQueryResponse.AsModels(&models) + err := resp.TableEntityQueryResponse.AsModels(&models) + assert.Nil(err) assert.Equal(len(resp.TableEntityQueryResponse.Value), expectedCount) } resp = pager.PageResponse() @@ -442,7 +444,8 @@ func (s *tableClientLiveTests) TestBatchError() { assert.Equal(error_empty_transaction, err.Error()) // Add the last entity to the table prior to adding it as part of the batch to cause a batch failure. - client.AddEntity(ctx, (*entitiesToCreate)[2]) + _, err = client.AddEntity(ctx, (*entitiesToCreate)[2]) + assert.Nil(err) // Add the entities to the batch for i := 0; i < cap(batch); i++ { @@ -498,7 +501,10 @@ func (s *tableClientLiveTests) init(doCreate bool) (*TableClient, func()) { } } return client, func() { - client.Delete(ctx) + _, err := client.Delete(ctx) + if err != nil { + fmt.Printf("Error deleting table. %v\n", err.Error()) + } } } @@ -515,7 +521,7 @@ func getStringFromBody(e *runtime.ResponseError) string { if err != nil { return "" } - b = ioutil.NopCloser(&body) + _ = ioutil.NopCloser(&body) } return body.String() } diff --git a/sdk/tables/aztable/table_pagers.go b/sdk/tables/aztable/table_pagers.go index c5c54d408f4d..1f275ca15f21 100644 --- a/sdk/tables/aztable/table_pagers.go +++ b/sdk/tables/aztable/table_pagers.go @@ -176,7 +176,7 @@ func (p *tableQueryResponsePager) Err() error { func castAndRemoveAnnotationsSlice(entities *[]map[string]interface{}) { for _, e := range *entities { - castAndRemoveAnnotations(&e) + castAndRemoveAnnotations(&e) //nolint:errcheck } } @@ -212,7 +212,7 @@ func castAndRemoveAnnotations(entity *map[string]interface{}) error { } value[valueKey] = i default: - return errors.New(fmt.Sprintf("unsupported annotation found: %s", k)) + return fmt.Errorf("unsupported annotation found: %s", k) } // remove the annotation key delete(value, k) @@ -249,7 +249,7 @@ func toOdataAnnotatedDictionary(entity *map[string]interface{}) error { entMap[k] = time.UTC().Format(ISO8601) continue default: - return errors.New(fmt.Sprintf("Invalid struct for entity field '%s' of type '%s'", k, tn)) + return fmt.Errorf("Invalid struct for entity field '%s' of type '%s'", k, tn) } case reflect.Float32, reflect.Float64: entMap[odataType(k)] = edmDouble @@ -321,7 +321,7 @@ func toMap(ent interface{}) (*map[string]interface{}, error) { entMap[name] = time.UTC().Format(ISO8601) continue default: - return nil, errors.New(fmt.Sprintf("Invalid struct for entity field '%s' of type '%s'", typeOfT.Field(i).Name, tn)) + return nil, fmt.Errorf("Invalid struct for entity field '%s' of type '%s'", typeOfT.Field(i).Name, tn) } case reflect.Float32, reflect.Float64: entMap[odataType(name)] = edmDouble diff --git a/sdk/tables/aztable/table_pagers_test.go b/sdk/tables/aztable/table_pagers_test.go index 23641cb50dec..7bb923567b83 100644 --- a/sdk/tables/aztable/table_pagers_test.go +++ b/sdk/tables/aztable/table_pagers_test.go @@ -21,8 +21,6 @@ import ( "github.com/stretchr/testify/assert" ) -type pagerTests struct{} - func TestCastAndRemoveAnnotations(t *testing.T) { assert := assert.New(t) @@ -75,8 +73,10 @@ func BenchmarkUnMarshal_AsJson_CastAndRemove_Map(b *testing.B) { bt := []byte(complexPayload) for i := 0; i < b.N; i++ { var val = make(map[string]interface{}) - json.Unmarshal(bt, &val) - castAndRemoveAnnotations(&val) + err := json.Unmarshal(bt, &val) + assert.Nil(err) + err = castAndRemoveAnnotations(&val) + assert.Nil(err) assert.Equal("somePartition", val["PartitionKey"]) } } @@ -87,28 +87,41 @@ func BenchmarkUnMarshal_FromMap_Entity(b *testing.B) { bt := []byte(complexPayload) for i := 0; i < b.N; i++ { var val = make(map[string]interface{}) - json.Unmarshal(bt, &val) + err := json.Unmarshal(bt, &val) + if err != nil { + panic(err) + } result := complexEntity{} - err := EntityMapAsModel(val, &result) + err = EntityMapAsModel(val, &result) assert.Nil(err) assert.Equal("somePartition", result.PartitionKey) } } +func check(e error) { + if e != nil { + panic(e) + } +} + func BenchmarkMarshal_Entity_ToMap_ToOdataDict_Map(b *testing.B) { ent := createComplexEntity() for i := 0; i < b.N; i++ { m, _ := toMap(ent) - toOdataAnnotatedDictionary(m) - json.Marshal(m) + err := toOdataAnnotatedDictionary(m) + check(err) + _, err = json.Marshal(m) + check(err) } } func BenchmarkMarshal_Map_ToOdataDict_Map(b *testing.B) { ent := createComplexEntityMap() for i := 0; i < b.N; i++ { - toOdataAnnotatedDictionary(&ent) - json.Marshal(ent) + err := toOdataAnnotatedDictionary(&ent) + check(err) + _, err = json.Marshal(ent) + check(err) } } @@ -180,11 +193,12 @@ func TestDeserializeFromMap(t *testing.T) { expected := createComplexEntity() bt := []byte(complexPayload) var val = make(map[string]interface{}) - json.Unmarshal(bt, &val) + err := json.Unmarshal(bt, &val) + assert.Nil(err) result := complexEntity{} // tt := reflect.TypeOf(complexEntity{}) // err := fromMap(tt, getTypeValueMap(tt), &val, reflect.ValueOf(&result).Elem()) - err := EntityMapAsModel(val, &result) + err = EntityMapAsModel(val, &result) assert.Nil(err) assert.EqualValues(expected, result) } diff --git a/sdk/tables/aztable/table_service_client.go b/sdk/tables/aztable/table_service_client.go index c74dbff76e66..7907eef6963b 100644 --- a/sdk/tables/aztable/table_service_client.go +++ b/sdk/tables/aztable/table_service_client.go @@ -75,8 +75,6 @@ func (t *TableServiceClient) Query(queryOptions *QueryOptions) TableQueryRespons } func isCosmosEndpoint(url string) bool { - isCosmosEmulator := strings.Index(url, "localhost") >= 0 && strings.Index(url, "8902") >= 0 - return isCosmosEmulator || - strings.Index(url, CosmosTableDomain) >= 0 || - strings.Index(url, LegacyCosmosTableDomain) >= 0 + isCosmosEmulator := strings.Contains(url, "localhost") && strings.Contains(url, "8902") + return isCosmosEmulator || strings.Contains(url, CosmosTableDomain) || strings.Contains(url, LegacyCosmosTableDomain) } diff --git a/sdk/tables/aztable/table_service_client_test.go b/sdk/tables/aztable/table_service_client_test.go index 62af3cfd42b0..bfba4026dd94 100644 --- a/sdk/tables/aztable/table_service_client_test.go +++ b/sdk/tables/aztable/table_service_client_test.go @@ -37,10 +37,17 @@ func (s *tableServiceClientLiveTests) TestServiceErrors() { assert := assert.New(s.T()) context := getTestContext(s.T().Name()) tableName, err := getTableName(context) + failIfNotNil(assert, err) _, err = context.client.Create(ctx, tableName) - defer context.client.Delete(ctx, tableName) - assert.Nil(err) + delete := func() { + _, err := context.client.Delete(ctx, tableName) + if err != nil { + fmt.Printf("Error cleaning up test. %v\n", err.Error()) + } + } + defer delete() + failIfNotNil(assert, err) // Create a duplicate table to produce an error _, err = context.client.Create(ctx, tableName) @@ -53,11 +60,18 @@ func (s *tableServiceClientLiveTests) TestCreateTable() { assert := assert.New(s.T()) context := getTestContext(s.T().Name()) tableName, err := getTableName(context) + failIfNotNil(assert, err) resp, err := context.client.Create(ctx, tableName) - defer context.client.Delete(ctx, tableName) + delete := func() { + _, err := context.client.Delete(ctx, tableName) + if err != nil { + fmt.Printf("Error cleaning up test. %v\n", err.Error()) + } + } + defer delete() - assert.Nil(err) + failIfNotNil(assert, err) assert.Equal(*resp.TableResponse.TableName, tableName) } diff --git a/sdk/tables/aztable/table_transactional_batch.go b/sdk/tables/aztable/table_transactional_batch.go index 82801a8ca12f..3336f3b84943 100644 --- a/sdk/tables/aztable/table_transactional_batch.go +++ b/sdk/tables/aztable/table_transactional_batch.go @@ -96,6 +96,7 @@ type TableSubmitTransactionOptions struct { RequestID *string } +//nolint var defaultChangesetHeaders = map[string]string{ "Accept": "application/json;odata=minimalmetadata", "Content-Type": "application/json", @@ -131,17 +132,26 @@ func (t *TableClient) submitTransactionInternal(ctx context.Context, transaction boundary := fmt.Sprintf("batch_%s", batchUuid.String()) body := new(bytes.Buffer) writer := multipart.NewWriter(body) - writer.SetBoundary(boundary) + err = writer.SetBoundary(boundary) + if err != nil { + return TableTransactionResponse{}, err + } h := make(textproto.MIMEHeader) h.Set(headerContentType, fmt.Sprintf("multipart/mixed; boundary=%s", changesetBoundary)) batchWriter, err := writer.CreatePart(h) if err != nil { return TableTransactionResponse{}, err } - batchWriter.Write(changeSetBody.Bytes()) + _, err = batchWriter.Write(changeSetBody.Bytes()) + if err != nil { + return TableTransactionResponse{}, err + } writer.Close() - req.SetBody(azcore.NopCloser(bytes.NewReader(body.Bytes())), fmt.Sprintf("multipart/mixed; boundary=%s", boundary)) + err = req.SetBody(azcore.NopCloser(bytes.NewReader(body.Bytes())), fmt.Sprintf("multipart/mixed; boundary=%s", boundary)) + if err != nil { + return TableTransactionResponse{}, err + } resp, err := t.client.con.Pipeline().Do(req) if err != nil { @@ -198,8 +208,8 @@ func buildTransactionResponse(req *azcore.Request, resp *azcore.Response, itemCo } outerBoundary := getBoundaryName(bytesBody) mpReader := multipart.NewReader(reader, outerBoundary) - outerPart, err := mpReader.NextPart() - innerBytes, err := ioutil.ReadAll(outerPart) + outerPart, err := mpReader.NextPart() //nolint There is an error here + innerBytes, err := ioutil.ReadAll(outerPart) //nolint There is an error here innerBoundary := getBoundaryName(innerBytes) reader = bytes.NewReader(innerBytes) mpReader = multipart.NewReader(reader, innerBoundary) @@ -258,7 +268,10 @@ func (t *TableClient) generateChangesetBody(changesetBoundary string, transactio body := new(bytes.Buffer) writer := multipart.NewWriter(body) - writer.SetBoundary(changesetBoundary) + err := writer.SetBoundary(changesetBoundary) + if err != nil { + return nil, err + } for _, be := range *transactionActions { err := t.generateEntitySubset(&be, writer) @@ -300,47 +313,81 @@ func (t *TableClient) generateEntitySubset(transactionAction *TableTransactionAc switch transactionAction.ActionType { case Delete: req, err = t.client.deleteEntityCreateRequest(ctx, t.Name, entity[partitionKey].(string), entity[rowKey].(string), transactionAction.ETag, &TableDeleteEntityOptions{}, qo) + if err != nil { + return err + } case Add: - toOdataAnnotatedDictionary(&entity) + err = toOdataAnnotatedDictionary(&entity) + if err != nil { + return err + } req, err = t.client.insertEntityCreateRequest(ctx, t.Name, &TableInsertEntityOptions{TableEntityProperties: entity, ResponsePreference: ResponseFormatReturnNoContent.ToPtr()}, qo) + if err != nil { + return err + } case UpdateMerge: fallthrough case UpsertMerge: - toOdataAnnotatedDictionary(&entity) + err = toOdataAnnotatedDictionary(&entity) + if err != nil { + return err + } opts := &TableMergeEntityOptions{TableEntityProperties: entity} if len(transactionAction.ETag) > 0 { opts.IfMatch = &transactionAction.ETag } req, err = t.client.mergeEntityCreateRequest(ctx, t.Name, entity[partitionKey].(string), entity[rowKey].(string), opts, qo) + if err != nil { + return err + } if isCosmosEndpoint(t.client.con.Endpoint()) { transformPatchToCosmosPost(req) } case UpdateReplace: fallthrough case UpsertReplace: - toOdataAnnotatedDictionary(&entity) + err = toOdataAnnotatedDictionary(&entity) + if err != nil { + return err + } req, err = t.client.updateEntityCreateRequest(ctx, t.Name, entity[partitionKey].(string), entity[rowKey].(string), &TableUpdateEntityOptions{TableEntityProperties: entity, IfMatch: &transactionAction.ETag}, qo) + if err != nil { + return err + } } urlAndVerb := fmt.Sprintf("%s %s HTTP/1.1\r\n", req.Method, req.URL) - operationWriter.Write([]byte(urlAndVerb)) - writeHeaders(req.Header, &operationWriter) - operationWriter.Write([]byte("\r\n")) // additional \r\n is needed per changeset separating the "headers" and the body. + _, err = operationWriter.Write([]byte(urlAndVerb)) + if err != nil { + return err + } + err = writeHeaders(req.Header, &operationWriter) + if err != nil { + return err + } + _, err = operationWriter.Write([]byte("\r\n")) // additional \r\n is needed per changeset separating the "headers" and the body. + if err != nil { + return err + } if req.Body != nil { - io.Copy(operationWriter, req.Body) + _, err = io.Copy(operationWriter, req.Body) + } - return nil + return err } -func writeHeaders(h http.Header, writer *io.Writer) { +func writeHeaders(h http.Header, writer *io.Writer) error { // This way it is guaranteed the headers will be written in a sorted order var keys []string for k := range h { keys = append(keys, k) } sort.Strings(keys) + var err error for _, k := range keys { - (*writer).Write([]byte(fmt.Sprintf("%s: %s\r\n", k, h.Get(k)))) + _, err = (*writer).Write([]byte(fmt.Sprintf("%s: %s\r\n", k, h.Get(k)))) + } + return err } diff --git a/sdk/tables/aztable/zc_table_constants.go b/sdk/tables/aztable/zc_table_constants.go index ee29206d8195..cd265edf81fb 100644 --- a/sdk/tables/aztable/zc_table_constants.go +++ b/sdk/tables/aztable/zc_table_constants.go @@ -5,6 +5,7 @@ package aztable import "errors" +//nolint const ( timestamp = "Timestamp" partitionKey = "PartitionKey" diff --git a/sdk/tables/aztable/zt_table_recorded_tests.go b/sdk/tables/aztable/zt_table_recorded_tests.go index 8af8521fec02..d39371813473 100644 --- a/sdk/tables/aztable/zt_table_recorded_tests.go +++ b/sdk/tables/aztable/zt_table_recorded_tests.go @@ -15,8 +15,6 @@ import ( "github.com/stretchr/testify/assert" ) -type tablesRecordedTests struct{} - type testContext struct { recording *recording.Recording client *TableServiceClient @@ -53,6 +51,12 @@ func cosmosURI(accountName string, endpointSuffix string) string { return "https://" + accountName + ".table." + endpointSuffix } +func failIfNotNil(a *assert.Assertions, e error) { + if e != nil { + a.FailNow(e.Error()) + } +} + // create the test specific TableClient and wire it up to recordings func recordedTestSetup(t *testing.T, testName string, endpointType EndpointType, mode recording.RecordMode) { var accountName string @@ -69,15 +73,21 @@ func recordedTestSetup(t *testing.T, testName string, endpointType EndpointType, if endpointType == StorageEndpoint { accountName, err = r.GetRecordedVariable(storageAccountNameEnvVar, recording.Default) + failIfNotNil(assert, err) suffix = r.GetOptionalRecordedVariable(storageEndpointSuffixEnvVar, DefaultStorageSuffix, recording.Default) secret, err = r.GetRecordedVariable(storageAccountKeyEnvVar, recording.Secret_Base64String) - cred, _ = NewSharedKeyCredential(accountName, secret) + failIfNotNil(assert, err) + cred, err = NewSharedKeyCredential(accountName, secret) + failIfNotNil(assert, err) uri = storageURI(accountName, suffix) } else { accountName, err = r.GetRecordedVariable(cosmosAccountNameEnnVar, recording.Default) + failIfNotNil(assert, err) suffix = r.GetOptionalRecordedVariable(cosmosEndpointSuffixEnvVar, DefaultCosmosSuffix, recording.Default) secret, err = r.GetRecordedVariable(cosmosAccountKeyEnvVar, recording.Secret_Base64String) - cred, _ = NewSharedKeyCredential(accountName, secret) + failIfNotNil(assert, err) + cred, err = NewSharedKeyCredential(accountName, secret) + failIfNotNil(assert, err) uri = cosmosURI(accountName, suffix) } @@ -89,7 +99,10 @@ func recordedTestSetup(t *testing.T, testName string, endpointType EndpointType, func recordedTestTeardown(key string) { context, ok := clientsMap[key] if ok && !(*context.context).IsFailed() { - context.recording.Stop() + err := context.recording.Stop() + if err != nil { + fmt.Printf("Error tearing down tests. %v\n", err.Error()) + } } } @@ -100,12 +113,18 @@ func cleanupTables(context *testContext, tables *[]string) { pager := c.Query(nil) for pager.NextPage(ctx) { for _, t := range pager.PageResponse().TableQueryResponse.Value { - c.Delete(ctx, *t.TableName) + _, err := c.Delete(ctx, *t.TableName) + if err != nil { + fmt.Printf("Error cleaning up tables. %v\n", err.Error()) + } } } } else { for _, t := range *tables { - c.Delete(ctx, t) + _, err := c.Delete(ctx, t) + if err != nil { + fmt.Printf("There was an error cleaning up tests. %v\n", err.Error()) + } } } } From 658d8c542a562cbd028d6dbb6217d71c21e234f8 Mon Sep 17 00:00:00 2001 From: Sean Kane <68240067+seankane-msft@users.noreply.github.com> Date: Wed, 14 Jul 2021 11:40:28 -0400 Subject: [PATCH 25/42] [Tables] Adding swagger.md (#15016) * adding swagger * updating swagger with autorest command * more fixes * fixing directive * updating swagger.md * fixed swagger * fixing directive * add dataplane flag * updating swagger * commented out tests, passes remaining * addressing chris hamons feedback * undoing changes * undoing the rest of changes * updating generated code * formatting gen code * more formatting corrections * one last formatting correction --- sdk/tables/autorest.md | 41 +++++++++++++++++++ sdk/tables/aztable/table_service_client.go | 3 +- sdk/tables/aztable/zz_generated_connection.go | 6 +-- sdk/tables/aztable/zz_generated_constants.go | 2 + sdk/tables/aztable/zz_generated_models.go | 12 ++---- 5 files changed, 49 insertions(+), 15 deletions(-) create mode 100644 sdk/tables/autorest.md diff --git a/sdk/tables/autorest.md b/sdk/tables/autorest.md new file mode 100644 index 000000000000..9b55f2592ae0 --- /dev/null +++ b/sdk/tables/autorest.md @@ -0,0 +1,41 @@ +## Go + +These settings apply only when `--go` is specified on the command line. + + + + +``` yaml +go: true +version: "^3.0.0" +input-file: https://github.com/Azure/azure-rest-api-specs/blob/d744b6bcb95ab4034832ded556dbbe58f4287c5b/specification/cosmos-db/data-plane/Microsoft.Tables/preview/2019-02-02/table.json +license-header: MICROSOFT_MIT_NO_VERSION +clear-output-folder: false +output-folder: aztable +file-prefix: "zz_generated_" +# namespace: aztable +tag: package-2019-02 +credential-scope: none +use: "@autorest/go@4.0.0-preview.23" +openapi-type: data-plane +``` + + + + +### Go multi-api + +``` yaml $(go) && $(multiapi) +batch: + - tag: package-2019-02 +``` \ No newline at end of file diff --git a/sdk/tables/aztable/table_service_client.go b/sdk/tables/aztable/table_service_client.go index 7907eef6963b..90d560afd3e7 100644 --- a/sdk/tables/aztable/table_service_client.go +++ b/sdk/tables/aztable/table_service_client.go @@ -28,7 +28,8 @@ func NewTableServiceClient(serviceURL string, cred azcore.Credential, options *T if isCosmosEndpoint(serviceURL) { conOptions.PerCallPolicies = []azcore.Policy{CosmosPatchTransformPolicy{}} } - con := newConnection(serviceURL, cred, conOptions) + conOptions.PerCallPolicies = append(conOptions.PerCallPolicies, cred.AuthenticationPolicy(azcore.AuthenticationPolicyOptions{Options: azcore.TokenRequestOptions{Scopes: []string{"none"}}})) + con := newConnection(serviceURL, conOptions) c, _ := cred.(*SharedKeyCredential) return &TableServiceClient{client: &tableClient{con}, service: &serviceClient{con}, cred: *c}, nil } diff --git a/sdk/tables/aztable/zz_generated_connection.go b/sdk/tables/aztable/zz_generated_connection.go index cd1a38ffeee2..6aa8ad00d8b3 100644 --- a/sdk/tables/aztable/zz_generated_connection.go +++ b/sdk/tables/aztable/zz_generated_connection.go @@ -13,9 +13,6 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" ) -const scope = "none" -const telemetryInfo = "azsdk-go-aztable/" - // connectionOptions contains configuration settings for the connection's pipeline. // All zero-value fields will be initialized with their default values. type connectionOptions struct { @@ -52,7 +49,7 @@ type connection struct { // newConnection creates an instance of the connection type with the specified endpoint. // Pass nil to accept the default options; this is the same as passing a zero-value options. -func newConnection(endpoint string, cred azcore.Credential, options *connectionOptions) *connection { +func newConnection(endpoint string, options *connectionOptions) *connection { if options == nil { options = &connectionOptions{} } @@ -62,7 +59,6 @@ func newConnection(endpoint string, cred azcore.Credential, options *connectionO policies = append(policies, options.PerCallPolicies...) policies = append(policies, azcore.NewRetryPolicy(&options.Retry)) policies = append(policies, options.PerRetryPolicies...) - policies = append(policies, cred.AuthenticationPolicy(azcore.AuthenticationPolicyOptions{Options: azcore.TokenRequestOptions{Scopes: []string{scope}}})) policies = append(policies, azcore.NewLogPolicy(&options.Logging)) return &connection{u: endpoint, p: azcore.NewPipeline(options.HTTPClient, policies...)} } diff --git a/sdk/tables/aztable/zz_generated_constants.go b/sdk/tables/aztable/zz_generated_constants.go index ea93a2783c11..3e7b261c70c7 100644 --- a/sdk/tables/aztable/zz_generated_constants.go +++ b/sdk/tables/aztable/zz_generated_constants.go @@ -7,6 +7,8 @@ package aztable +const telemetryInfo = "azsdk-go-aztable/" + // GeoReplicationStatusType - The status of the secondary location. type GeoReplicationStatusType string diff --git a/sdk/tables/aztable/zz_generated_models.go b/sdk/tables/aztable/zz_generated_models.go index 308254266891..3daf1c657f99 100644 --- a/sdk/tables/aztable/zz_generated_models.go +++ b/sdk/tables/aztable/zz_generated_models.go @@ -158,19 +158,13 @@ type Metrics struct { // QueryOptions contains a group of parameters for the Table.Query method. type QueryOptions struct { - // An Odata filter expression that limits results to those entities that satisfy the filter expression. - // For example, the following expression would return only entities with a PartitionKey of 'foo': "PartitionKey eq 'foo'" + // OData filter expression. Filter *string - // Specifies the media type for the response. Format *OdataMetadataFormat - - // Select: A comma delimited list of entity property names that selects which set of entity properties to return in the result set. - // For example, the following value would return results containing only the PartitionKey and RowKey properties: "PartitionKey, RowKey" + // Select expression using OData notation. Limits the columns on each record to just those requested, e.g. "$select=PolicyAssignmentId, ResourceId". Select *string - - // Top: The maximum number of entities that will be returned per page of results. - // Note: This value does not limit the total number of results if NextPage is called on the returned Pager until it returns false. + // Maximum number of records to return. Top *int32 } From 8d1167ebcbaf46d1ee8c4d3ffa167138e6bf8ce5 Mon Sep 17 00:00:00 2001 From: Sean Kane <68240067+seankane-msft@users.noreply.github.com> Date: Tue, 20 Jul 2021 11:34:27 -0400 Subject: [PATCH 26/42] [Tables] Add get/set access policy (#15027) * adding a way to skip cosmos tests, adding access policies * adding support for getting/setting access policies * tests working * does not work for multiple access policies * adding post validation * added error validation, note about possible issue * set policy works * removing table access policy file --- .../TestSetAccessPolicy-variables.yaml | 4 + .../TestSetEmptyAccessPolicy-variables.yaml | 4 + ...stSetMultipleAccessPolicies-variables.yaml | 4 + .../TestSetNullAccessPolicy-variables.yaml | 4 + ...estSetTooManyAccessPolicies-variables.yaml | 4 + .../TestSetAccessPolicy-variables.yaml | 5 + .../TestSetAccessPolicy.yaml | 122 ++++++++++++ .../TestSetEmptyAccessPolicy-variables.yaml | 5 + .../TestSetEmptyAccessPolicy.yaml | 118 ++++++++++++ ...stSetMultipleAccessPolicies-variables.yaml | 5 + .../TestSetMultipleAccessPolicies.yaml | 155 +++++++++++++++ .../TestSetNullAccessPolicy-variables.yaml | 5 + .../TestSetNullAccessPolicy.yaml | 155 +++++++++++++++ ...estSetTooManyAccessPolicies-variables.yaml | 5 + .../TestSetTooManyAccessPolicies.yaml | 129 +++++++++++++ .../aztable/table_access_policy_test.go | 181 ++++++++++++++++++ sdk/tables/aztable/table_client.go | 14 ++ sdk/tables/aztable/zc_table_constants.go | 1 + sdk/tables/aztable/zt_table_recorded_tests.go | 2 + 19 files changed, 922 insertions(+) create mode 100644 sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestSetAccessPolicy-variables.yaml create mode 100644 sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestSetEmptyAccessPolicy-variables.yaml create mode 100644 sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestSetMultipleAccessPolicies-variables.yaml create mode 100644 sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestSetNullAccessPolicy-variables.yaml create mode 100644 sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestSetTooManyAccessPolicies-variables.yaml create mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestSetAccessPolicy-variables.yaml create mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestSetAccessPolicy.yaml create mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestSetEmptyAccessPolicy-variables.yaml create mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestSetEmptyAccessPolicy.yaml create mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestSetMultipleAccessPolicies-variables.yaml create mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestSetMultipleAccessPolicies.yaml create mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestSetNullAccessPolicy-variables.yaml create mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestSetNullAccessPolicy.yaml create mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestSetTooManyAccessPolicies-variables.yaml create mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestSetTooManyAccessPolicies.yaml create mode 100644 sdk/tables/aztable/table_access_policy_test.go diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestSetAccessPolicy-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestSetAccessPolicy-variables.yaml new file mode 100644 index 000000000000..4944bc270a8f --- /dev/null +++ b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestSetAccessPolicy-variables.yaml @@ -0,0 +1,4 @@ +--- +COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com +TABLES_COSMOS_ACCOUNT_NAME: seankaneprim +TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestSetEmptyAccessPolicy-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestSetEmptyAccessPolicy-variables.yaml new file mode 100644 index 000000000000..4944bc270a8f --- /dev/null +++ b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestSetEmptyAccessPolicy-variables.yaml @@ -0,0 +1,4 @@ +--- +COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com +TABLES_COSMOS_ACCOUNT_NAME: seankaneprim +TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestSetMultipleAccessPolicies-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestSetMultipleAccessPolicies-variables.yaml new file mode 100644 index 000000000000..4944bc270a8f --- /dev/null +++ b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestSetMultipleAccessPolicies-variables.yaml @@ -0,0 +1,4 @@ +--- +COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com +TABLES_COSMOS_ACCOUNT_NAME: seankaneprim +TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestSetNullAccessPolicy-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestSetNullAccessPolicy-variables.yaml new file mode 100644 index 000000000000..4944bc270a8f --- /dev/null +++ b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestSetNullAccessPolicy-variables.yaml @@ -0,0 +1,4 @@ +--- +COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com +TABLES_COSMOS_ACCOUNT_NAME: seankaneprim +TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestSetTooManyAccessPolicies-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestSetTooManyAccessPolicies-variables.yaml new file mode 100644 index 000000000000..4944bc270a8f --- /dev/null +++ b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestSetTooManyAccessPolicies-variables.yaml @@ -0,0 +1,4 @@ +--- +COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com +TABLES_COSMOS_ACCOUNT_NAME: seankaneprim +TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestSetAccessPolicy-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestSetAccessPolicy-variables.yaml new file mode 100644 index 000000000000..f41dcb551e19 --- /dev/null +++ b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestSetAccessPolicy-variables.yaml @@ -0,0 +1,5 @@ +--- +STORAGE_ENDPOINT_SUFFIX: core.windows.net +TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== +TABLES_STORAGE_ACCOUNT_NAME: seankaneprim +randomSeed: "1625849358" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestSetAccessPolicy.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestSetAccessPolicy.yaml new file mode 100644 index 000000000000..370066baf737 --- /dev/null +++ b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestSetAccessPolicy.yaml @@ -0,0 +1,122 @@ +--- +version: 1 +interactions: +- request: + body: '{"TableName":"gotable0qolgueqbqo8m"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "36" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Fri, 09 Jul 2021 16:49:18 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/Tables + method: POST + response: + body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotable0qolgueqbqo8m"}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + Date: + - Fri, 09 Jul 2021 16:49:18 GMT + Location: + - https://seankaneprim.table.core.windows.net/Tables('gotable0qolgueqbqo8m') + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - 77af8ed1-c002-0081-0ce2-7448af000000 + X-Ms-Version: + - "2019-02-02" + status: 201 Created + code: 201 + duration: "" +- request: + body: r2024-01-01T00:00:00Z2020-01-01T00:00:00Z1 + form: {} + headers: + Accept: + - application/xml + Authorization: + - sanitized + Content-Length: + - "213" + Content-Type: + - application/xml + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Fri, 09 Jul 2021 16:49:19 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/gotable0qolgueqbqo8m?comp=acl + method: PUT + response: + body: "" + headers: + Content-Length: + - "0" + Date: + - Fri, 09 Jul 2021 16:49:18 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - 77af8f20-c002-0081-58e2-7448af000000 + X-Ms-Version: + - "2019-02-02" + status: 204 No Content + code: 204 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Fri, 09 Jul 2021 16:49:19 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/Tables('gotable0qolgueqbqo8m') + method: DELETE + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Date: + - Fri, 09 Jul 2021 16:49:18 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - 77af8f95-c002-0081-4ae2-7448af000000 + X-Ms-Version: + - "2019-02-02" + status: 204 No Content + code: 204 + duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestSetEmptyAccessPolicy-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestSetEmptyAccessPolicy-variables.yaml new file mode 100644 index 000000000000..75da5d52f9a0 --- /dev/null +++ b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestSetEmptyAccessPolicy-variables.yaml @@ -0,0 +1,5 @@ +--- +STORAGE_ENDPOINT_SUFFIX: core.windows.net +TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== +TABLES_STORAGE_ACCOUNT_NAME: seankaneprim +randomSeed: "1625242264" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestSetEmptyAccessPolicy.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestSetEmptyAccessPolicy.yaml new file mode 100644 index 000000000000..78cfefca3141 --- /dev/null +++ b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestSetEmptyAccessPolicy.yaml @@ -0,0 +1,118 @@ +--- +version: 1 +interactions: +- request: + body: '{"TableName":"gotablemp92a68btv51b"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "36" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Fri, 02 Jul 2021 16:11:04 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/Tables + method: POST + response: + body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotablemp92a68btv51b"}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + Date: + - Fri, 02 Jul 2021 16:11:04 GMT + Location: + - https://seankaneprim.table.core.windows.net/Tables('gotablemp92a68btv51b') + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - 6acd05cd-4002-006b-295c-6f6f81000000 + X-Ms-Version: + - "2019-02-02" + status: 201 Created + code: 201 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/xml + Authorization: + - sanitized + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Fri, 02 Jul 2021 16:11:04 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/gotablemp92a68btv51b?comp=acl + method: PUT + response: + body: "" + headers: + Content-Length: + - "0" + Date: + - Fri, 02 Jul 2021 16:11:04 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - 6acd0623-4002-006b-7c5c-6f6f81000000 + X-Ms-Version: + - "2019-02-02" + status: 204 No Content + code: 204 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Fri, 02 Jul 2021 16:11:05 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/Tables('gotablemp92a68btv51b') + method: DELETE + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Date: + - Fri, 02 Jul 2021 16:11:04 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - 6acd066d-4002-006b-405c-6f6f81000000 + X-Ms-Version: + - "2019-02-02" + status: 204 No Content + code: 204 + duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestSetMultipleAccessPolicies-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestSetMultipleAccessPolicies-variables.yaml new file mode 100644 index 000000000000..546d40d8997e --- /dev/null +++ b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestSetMultipleAccessPolicies-variables.yaml @@ -0,0 +1,5 @@ +--- +STORAGE_ENDPOINT_SUFFIX: core.windows.net +TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== +TABLES_STORAGE_ACCOUNT_NAME: seankaneprim +randomSeed: "1625849315" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestSetMultipleAccessPolicies.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestSetMultipleAccessPolicies.yaml new file mode 100644 index 000000000000..84feff7b92a6 --- /dev/null +++ b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestSetMultipleAccessPolicies.yaml @@ -0,0 +1,155 @@ +--- +version: 1 +interactions: +- request: + body: '{"TableName":"gotable4rpn1oqouhbus"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "36" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Fri, 09 Jul 2021 16:48:35 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/Tables + method: POST + response: + body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotable4rpn1oqouhbus"}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + Date: + - Fri, 09 Jul 2021 16:48:34 GMT + Location: + - https://seankaneprim.table.core.windows.net/Tables('gotable4rpn1oqouhbus') + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - eeaea336-1002-0014-1be2-74a01a000000 + X-Ms-Version: + - "2019-02-02" + status: 201 Created + code: 201 + duration: "" +- request: + body: emptyrpartialr2021-06-08T02:10:09Z2021-06-08T02:10:09Zfull + form: {} + headers: + Accept: + - application/xml + Authorization: + - sanitized + Content-Length: + - "375" + Content-Type: + - application/xml + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Fri, 09 Jul 2021 16:48:35 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/gotable4rpn1oqouhbus?comp=acl + method: PUT + response: + body: "" + headers: + Content-Length: + - "0" + Date: + - Fri, 09 Jul 2021 16:48:34 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - eeaea364-1002-0014-47e2-74a01a000000 + X-Ms-Version: + - "2019-02-02" + status: 204 No Content + code: 204 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/xml + Authorization: + - sanitized + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Fri, 09 Jul 2021 16:48:36 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/gotable4rpn1oqouhbus?comp=acl + method: GET + response: + body: "\uFEFF\x3C\x3F\x78\x6D\x6C\x20\x76\x65\x72\x73\x69\x6F\x6E\x3D\"\x31\x2E\x30\"\x20\x65\x6E\x63\x6F\x64\x69\x6E\x67\x3D\"\x75\x74\x66\x2D\x38\"\x3F\x3E\x3C\x53\x69\x67\x6E\x65\x64\x49\x64\x65\x6E\x74\x69\x66\x69\x65\x72\x73\x3E\x3C\x53\x69\x67\x6E\x65\x64\x49\x64\x65\x6E\x74\x69\x66\x69\x65\x72\x3E\x3C\x49\x64\x3E\x65\x6D\x70\x74\x79\x3C\x2F\x49\x64\x3E\x3C\x2F\x53\x69\x67\x6E\x65\x64\x49\x64\x65\x6E\x74\x69\x66\x69\x65\x72\x3E\x3C\x53\x69\x67\x6E\x65\x64\x49\x64\x65\x6E\x74\x69\x66\x69\x65\x72\x3E\x3C\x49\x64\x3E\x70\x61\x72\x74\x69\x61\x6C\x3C\x2F\x49\x64\x3E\x3C\x41\x63\x63\x65\x73\x73\x50\x6F\x6C\x69\x63\x79\x3E\x3C\x50\x65\x72\x6D\x69\x73\x73\x69\x6F\x6E\x3E\x72\x3C\x2F\x50\x65\x72\x6D\x69\x73\x73\x69\x6F\x6E\x3E\x3C\x2F\x41\x63\x63\x65\x73\x73\x50\x6F\x6C\x69\x63\x79\x3E\x3C\x2F\x53\x69\x67\x6E\x65\x64\x49\x64\x65\x6E\x74\x69\x66\x69\x65\x72\x3E\x3C\x53\x69\x67\x6E\x65\x64\x49\x64\x65\x6E\x74\x69\x66\x69\x65\x72\x3E\x3C\x49\x64\x3E\x66\x75\x6C\x6C\x3C\x2F\x49\x64\x3E\x3C\x41\x63\x63\x65\x73\x73\x50\x6F\x6C\x69\x63\x79\x3E\x3C\x53\x74\x61\x72\x74\x3E\x32\x30\x32\x31\x2D\x30\x36\x2D\x30\x38\x54\x30\x32\x3A\x31\x30\x3A\x30\x39\x2E\x30\x30\x30\x30\x30\x30\x30\x5A\x3C\x2F\x53\x74\x61\x72\x74\x3E\x3C\x45\x78\x70\x69\x72\x79\x3E\x32\x30\x32\x31\x2D\x30\x36\x2D\x30\x38\x54\x30\x32\x3A\x31\x30\x3A\x30\x39\x2E\x30\x30\x30\x30\x30\x30\x30\x5A\x3C\x2F\x45\x78\x70\x69\x72\x79\x3E\x3C\x50\x65\x72\x6D\x69\x73\x73\x69\x6F\x6E\x3E\x72\x3C\x2F\x50\x65\x72\x6D\x69\x73\x73\x69\x6F\x6E\x3E\x3C\x2F\x41\x63\x63\x65\x73\x73\x50\x6F\x6C\x69\x63\x79\x3E\x3C\x2F\x53\x69\x67\x6E\x65\x64\x49\x64\x65\x6E\x74\x69\x66\x69\x65\x72\x3E\x3C\x2F\x53\x69\x67\x6E\x65\x64\x49\x64\x65\x6E\x74\x69\x66\x69\x65\x72\x73\x3E" + headers: + Content-Type: + - application/xml + Date: + - Fri, 09 Jul 2021 16:48:35 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - eeaea3c2-1002-0014-24e2-74a01a000000 + X-Ms-Version: + - "2019-02-02" + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Fri, 09 Jul 2021 16:48:36 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/Tables('gotable4rpn1oqouhbus') + method: DELETE + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Date: + - Fri, 09 Jul 2021 16:48:35 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - eeaea417-1002-0014-77e2-74a01a000000 + X-Ms-Version: + - "2019-02-02" + status: 204 No Content + code: 204 + duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestSetNullAccessPolicy-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestSetNullAccessPolicy-variables.yaml new file mode 100644 index 000000000000..1182b61d3747 --- /dev/null +++ b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestSetNullAccessPolicy-variables.yaml @@ -0,0 +1,5 @@ +--- +STORAGE_ENDPOINT_SUFFIX: core.windows.net +TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== +TABLES_STORAGE_ACCOUNT_NAME: seankaneprim +randomSeed: "1625849998" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestSetNullAccessPolicy.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestSetNullAccessPolicy.yaml new file mode 100644 index 000000000000..e3ae9a2c669f --- /dev/null +++ b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestSetNullAccessPolicy.yaml @@ -0,0 +1,155 @@ +--- +version: 1 +interactions: +- request: + body: '{"TableName":"gotableuz6wghsqjmdrx"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "36" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Fri, 09 Jul 2021 16:59:58 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/Tables + method: POST + response: + body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotableuz6wghsqjmdrx"}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + Date: + - Fri, 09 Jul 2021 16:59:57 GMT + Location: + - https://seankaneprim.table.core.windows.net/Tables('gotableuz6wghsqjmdrx') + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - b41c3fb8-5002-0015-22e3-74ffc6000000 + X-Ms-Version: + - "2019-02-02" + status: 201 Created + code: 201 + duration: "" +- request: + body: null + form: {} + headers: + Accept: + - application/xml + Authorization: + - sanitized + Content-Length: + - "89" + Content-Type: + - application/xml + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Fri, 09 Jul 2021 16:59:59 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/gotableuz6wghsqjmdrx?comp=acl + method: PUT + response: + body: "" + headers: + Content-Length: + - "0" + Date: + - Fri, 09 Jul 2021 16:59:58 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - b41c3ff7-5002-0015-5de3-74ffc6000000 + X-Ms-Version: + - "2019-02-02" + status: 204 No Content + code: 204 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/xml + Authorization: + - sanitized + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Fri, 09 Jul 2021 16:59:59 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/gotableuz6wghsqjmdrx?comp=acl + method: GET + response: + body: "\uFEFF\x3C\x3F\x78\x6D\x6C\x20\x76\x65\x72\x73\x69\x6F\x6E\x3D\"\x31\x2E\x30\"\x20\x65\x6E\x63\x6F\x64\x69\x6E\x67\x3D\"\x75\x74\x66\x2D\x38\"\x3F\x3E\x3C\x53\x69\x67\x6E\x65\x64\x49\x64\x65\x6E\x74\x69\x66\x69\x65\x72\x73\x3E\x3C\x53\x69\x67\x6E\x65\x64\x49\x64\x65\x6E\x74\x69\x66\x69\x65\x72\x3E\x3C\x49\x64\x3E\x6E\x75\x6C\x6C\x3C\x2F\x49\x64\x3E\x3C\x2F\x53\x69\x67\x6E\x65\x64\x49\x64\x65\x6E\x74\x69\x66\x69\x65\x72\x3E\x3C\x2F\x53\x69\x67\x6E\x65\x64\x49\x64\x65\x6E\x74\x69\x66\x69\x65\x72\x73\x3E" + headers: + Content-Type: + - application/xml + Date: + - Fri, 09 Jul 2021 16:59:58 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - b41c401f-5002-0015-05e3-74ffc6000000 + X-Ms-Version: + - "2019-02-02" + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Fri, 09 Jul 2021 16:59:59 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/Tables('gotableuz6wghsqjmdrx') + method: DELETE + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Date: + - Fri, 09 Jul 2021 16:59:58 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - b41c4068-5002-0015-4ce3-74ffc6000000 + X-Ms-Version: + - "2019-02-02" + status: 204 No Content + code: 204 + duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestSetTooManyAccessPolicies-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestSetTooManyAccessPolicies-variables.yaml new file mode 100644 index 000000000000..f429532bb617 --- /dev/null +++ b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestSetTooManyAccessPolicies-variables.yaml @@ -0,0 +1,5 @@ +--- +STORAGE_ENDPOINT_SUFFIX: core.windows.net +TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== +TABLES_STORAGE_ACCOUNT_NAME: seankaneprim +randomSeed: "1625849388" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestSetTooManyAccessPolicies.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestSetTooManyAccessPolicies.yaml new file mode 100644 index 000000000000..22521cfec224 --- /dev/null +++ b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestSetTooManyAccessPolicies.yaml @@ -0,0 +1,129 @@ +--- +version: 1 +interactions: +- request: + body: '{"TableName":"gotableal7ltzl6kugfg"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "36" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Fri, 09 Jul 2021 16:49:48 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/Tables + method: POST + response: + body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotableal7ltzl6kugfg"}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + Date: + - Fri, 09 Jul 2021 16:49:48 GMT + Location: + - https://seankaneprim.table.core.windows.net/Tables('gotableal7ltzl6kugfg') + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - 86dd59fb-e002-0086-56e2-7424cc000000 + X-Ms-Version: + - "2019-02-02" + status: 201 Created + code: 201 + duration: "" +- request: + body: r2029-01-01T00:00:00Z2020-01-01T00:00:00Z5r2029-01-01T00:00:00Z2020-01-01T00:00:00Z5r2029-01-01T00:00:00Z2020-01-01T00:00:00Z5r2029-01-01T00:00:00Z2020-01-01T00:00:00Z5r2029-01-01T00:00:00Z2020-01-01T00:00:00Z5r2029-01-01T00:00:00Z2020-01-01T00:00:00Z5 + form: {} + headers: + Accept: + - application/xml + Authorization: + - sanitized + Content-Length: + - "1083" + Content-Type: + - application/xml + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Fri, 09 Jul 2021 16:49:49 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/gotableal7ltzl6kugfg?comp=acl + method: PUT + response: + body: |- + InvalidXmlDocumentXML specified is not syntactically valid. + RequestId:86dd5a4e-e002-0086-23e2-7424cc000000 + Time:2021-07-09T16:49:48.6605382Z + headers: + Content-Length: + - "327" + Content-Type: + - application/xml + Date: + - Fri, 09 Jul 2021 16:49:48 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Ms-Error-Code: + - InvalidXmlDocument + X-Ms-Request-Id: + - 86dd5a4e-e002-0086-23e2-7424cc000000 + X-Ms-Version: + - "2019-02-02" + status: 400 XML specified is not syntactically valid. + code: 400 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Fri, 09 Jul 2021 16:49:49 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/Tables('gotableal7ltzl6kugfg') + method: DELETE + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Date: + - Fri, 09 Jul 2021 16:49:48 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - 86dd5a85-e002-0086-57e2-7424cc000000 + X-Ms-Version: + - "2019-02-02" + status: 204 No Content + code: 204 + duration: "" diff --git a/sdk/tables/aztable/table_access_policy_test.go b/sdk/tables/aztable/table_access_policy_test.go new file mode 100644 index 000000000000..d5b9813725f1 --- /dev/null +++ b/sdk/tables/aztable/table_access_policy_test.go @@ -0,0 +1,181 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package aztable + +import ( + "strconv" + "time" + + "github.com/stretchr/testify/assert" +) + +func (s *tableClientLiveTests) TestSetEmptyAccessPolicy() { + if _, ok := cosmosTestsMap[s.T().Name()]; ok { + s.T().Skip("TableAccessPolicies are not available on Cosmos Accounts") + } + + assert := assert.New(s.T()) + client, delete := s.init(true) + defer delete() + + _, err := client.SetAccessPolicy(ctx, &TableSetAccessPolicyOptions{}) + assert.Nil(err, "Set access policy failed") +} + +func (s *tableClientLiveTests) TestSetAccessPolicy() { + if _, ok := cosmosTestsMap[s.T().Name()]; ok { + s.T().Skip("TableAccessPolicies are not available on Cosmos Accounts") + } + + assert := assert.New(s.T()) + // context := getTestContext(s.T().Name()) + client, delete := s.init(true) + defer delete() + + start := time.Date(2020, 1, 1, 0, 0, 0, 0, time.UTC) + expiration := time.Date(2024, 1, 1, 0, 0, 0, 0, time.UTC) + permission := "r" + id := "1" + + signedIdentifiers := make([]*SignedIdentifier, 0) + + signedIdentifiers = append(signedIdentifiers, &SignedIdentifier{ + AccessPolicy: &AccessPolicy{ + Expiry: &expiration, + Start: &start, + Permission: &permission, + }, + ID: &id, + }) + + param := TableSetAccessPolicyOptions{ + TableACL: signedIdentifiers, + } + + _, err := client.SetAccessPolicy(ctx, ¶m) + assert.Nil(err, "Set access policy failed") +} + +func (s *tableClientLiveTests) TestSetMultipleAccessPolicies() { + if _, ok := cosmosTestsMap[s.T().Name()]; ok { + s.T().Skip("TableAccessPolicies are not available on Cosmos Accounts") + } + + assert := assert.New(s.T()) + client, delete := s.init(true) + defer delete() + + id := "empty" + + signedIdentifiers := make([]*SignedIdentifier, 0) + signedIdentifiers = append(signedIdentifiers, &SignedIdentifier{ + ID: &id, + }) + + permission2 := "r" + id2 := "partial" + + signedIdentifiers = append(signedIdentifiers, &SignedIdentifier{ + ID: &id2, + AccessPolicy: &AccessPolicy{ + Permission: &permission2, + }, + }) + + id3 := "full" + permission3 := "r" + start := time.Date(2021, 6, 8, 2, 10, 9, 0, time.UTC) + expiry := time.Date(2021, 6, 8, 2, 10, 9, 0, time.UTC) + + signedIdentifiers = append(signedIdentifiers, &SignedIdentifier{ + ID: &id3, + AccessPolicy: &AccessPolicy{ + Start: &start, + Expiry: &expiry, + Permission: &permission3, + }, + }) + + param := TableSetAccessPolicyOptions{ + TableACL: signedIdentifiers, + } + + _, err := client.SetAccessPolicy(ctx, ¶m) + if err != nil { + assert.FailNow("Set access policy failed") + } + + // Make a Get to assert two access policies + resp, err := client.GetAccessPolicy(ctx) + assert.Nil(err, "Get Access Policy failed") + assert.Equal(len(resp.SignedIdentifiers), 3) +} + +func (s *tableClientLiveTests) TestSetTooManyAccessPolicies() { + if _, ok := cosmosTestsMap[s.T().Name()]; ok { + s.T().Skip("TableAccessPolicies are not available on Cosmos Accounts") + } + + assert := assert.New(s.T()) + // context := getTestContext(s.T().Name()) + client, delete := s.init(true) + defer delete() + + start := time.Date(2020, 1, 1, 0, 0, 0, 0, time.UTC) + expiration := time.Date(2024, 1, 1, 0, 0, 0, 0, time.UTC) + permission := "r" + id := "1" + signedIdentifiers := make([]*SignedIdentifier, 0) + + for i := 0; i < 6; i++ { + expiration = time.Date(2024+i, 1, 1, 0, 0, 0, 0, time.UTC) + id = strconv.Itoa(i) + + signedIdentifiers = append(signedIdentifiers, &SignedIdentifier{ + AccessPolicy: &AccessPolicy{ + Expiry: &expiration, + Start: &start, + Permission: &permission, + }, + ID: &id, + }) + + } + + param := TableSetAccessPolicyOptions{TableACL: signedIdentifiers} + + _, err := client.SetAccessPolicy(ctx, ¶m) + assert.NotNil(err, "Set access policy succeeded but should have failed") + assert.Contains(err.Error(), tooManyAccessPoliciesError.Error()) +} + +func (s *tableClientLiveTests) TestSetNullAccessPolicy() { + if _, ok := cosmosTestsMap[s.T().Name()]; ok { + s.T().Skip("TableAccessPolicies are not available on Cosmos Accounts") + } + + assert := assert.New(s.T()) + client, delete := s.init(true) + defer delete() + + id := "null" + + signedIdentifiers := make([]*SignedIdentifier, 0) + signedIdentifiers = append(signedIdentifiers, &SignedIdentifier{ + ID: &id, + }) + + param := TableSetAccessPolicyOptions{ + TableACL: signedIdentifiers, + } + + _, err := client.SetAccessPolicy(ctx, ¶m) + if err != nil { + assert.FailNow("Set access policy failed") + } + + resp, err := client.GetAccessPolicy(ctx) + assert.Nil(err, "Get Access Policy failed") + assert.Equal(len(resp.SignedIdentifiers), 1) +} diff --git a/sdk/tables/aztable/table_client.go b/sdk/tables/aztable/table_client.go index 88f199249a78..6a93eae67a83 100644 --- a/sdk/tables/aztable/table_client.go +++ b/sdk/tables/aztable/table_client.go @@ -136,3 +136,17 @@ func (t *TableClient) UpsertEntity(ctx context.Context, entity map[string]interf } return nil, errors.New("Invalid TableUpdateMode") } + +// GetAccessPolicy retrieves details about any stored access policies specified on the table that may be used with the Shared Access Signature +func (t *TableClient) GetAccessPolicy(ctx context.Context) (SignedIdentifierArrayResponse, error) { + return t.client.GetAccessPolicy(ctx, t.Name, nil) +} + +// SetAccessPolicy sets stored access policies for the table that may be used with SharedAccessSignature +func (t *TableClient) SetAccessPolicy(ctx context.Context, options *TableSetAccessPolicyOptions) (TableSetAccessPolicyResponse, error) { + response, err := t.client.SetAccessPolicy(ctx, t.Name, options) + if len(*&options.TableACL) > 5 { + err = tooManyAccessPoliciesError + } + return response, err +} diff --git a/sdk/tables/aztable/zc_table_constants.go b/sdk/tables/aztable/zc_table_constants.go index cd265edf81fb..d7d04897ecde 100644 --- a/sdk/tables/aztable/zc_table_constants.go +++ b/sdk/tables/aztable/zc_table_constants.go @@ -26,3 +26,4 @@ const ( ) var partitionKeyRowKeyError = errors.New("Entity must have a PartitionKey and RowKey") +var tooManyAccessPoliciesError = errors.New("You cannot set more than five (5) access policies at a time.") diff --git a/sdk/tables/aztable/zt_table_recorded_tests.go b/sdk/tables/aztable/zt_table_recorded_tests.go index d39371813473..6f90551b0104 100644 --- a/sdk/tables/aztable/zt_table_recorded_tests.go +++ b/sdk/tables/aztable/zt_table_recorded_tests.go @@ -42,6 +42,7 @@ const ( var ctx = context.Background() var clientsMap map[string]*testContext = make(map[string]*testContext) +var cosmosTestsMap map[string]bool = make(map[string]bool) func storageURI(accountName string, endpointSuffix string) string { return "https://" + accountName + ".table." + endpointSuffix @@ -89,6 +90,7 @@ func recordedTestSetup(t *testing.T, testName string, endpointType EndpointType, cred, err = NewSharedKeyCredential(accountName, secret) failIfNotNil(assert, err) uri = cosmosURI(accountName, suffix) + cosmosTestsMap[testName] = true } client, err := NewTableServiceClient(uri, cred, &TableClientOptions{HTTPClient: r, Retry: azcore.RetryOptions{MaxRetries: -1}}) From 88aa7f21e22146057c1e3831502d6252bcf032b0 Mon Sep 17 00:00:00 2001 From: Sean Kane <68240067+seankane-msft@users.noreply.github.com> Date: Wed, 21 Jul 2021 17:38:18 -0400 Subject: [PATCH 27/42] [Tables] Add GetStats, GetProperties, and SetProperties methods (#15112) * adding GetProperties * basic test of set properties * added logging and metrics tests * tests for setting service properties * adding test for retention too long * adding samples and docs --- sdk/tables/aztable/go.mod | 1 + sdk/tables/aztable/go.sum | 2 + .../TestGetProperties-variables.yaml | 4 + .../TestGetStatistics-variables.yaml | 4 + .../TestRetentionTooLong-variables.yaml | 4 + .../TestSetCors-variables.yaml | 4 + .../TestSetHoursMetrics-variables.yaml | 4 + .../TestSetLogging-variables.yaml | 4 + .../TestSetMinuteMetrics-variables.yaml | 4 + .../TestSetProperties-variables.yaml | 4 + .../TestSetTooManyCors-variables.yaml | 4 + .../TestGetProperties-variables.yaml | 4 + .../TestGetProperties.yaml | 36 +++ .../TestGetStatistics-variables.yaml | 4 + .../TestGetStatistics.yaml | 44 ++++ .../TestRetentionTooLong-variables.yaml | 4 + .../TestRetentionTooLong.yaml | 47 ++++ .../TestSetCors-variables.yaml | 4 + .../TestSetCors.yaml | 73 +++++++ .../TestSetHoursMetrics-variables.yaml | 4 + .../TestSetHoursMetrics.yaml | 71 ++++++ .../TestSetLogging-variables.yaml | 4 + .../TestSetLogging.yaml | 71 ++++++ .../TestSetMinuteMetrics-variables.yaml | 4 + .../TestSetMinuteMetrics.yaml | 71 ++++++ .../TestSetProperties-variables.yaml | 4 + .../TestSetProperties.yaml | 71 ++++++ .../TestSetTooManyCors-variables.yaml | 4 + .../TestSetTooManyCors.yaml | 47 ++++ sdk/tables/aztable/table_service_client.go | 59 +++++ .../aztable/table_service_client_test.go | 206 ++++++++++++++++++ sdk/tables/aztable/zt_table_recorded_tests.go | 4 +- 32 files changed, 873 insertions(+), 2 deletions(-) create mode 100644 sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestGetProperties-variables.yaml create mode 100644 sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestGetStatistics-variables.yaml create mode 100644 sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestRetentionTooLong-variables.yaml create mode 100644 sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestSetCors-variables.yaml create mode 100644 sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestSetHoursMetrics-variables.yaml create mode 100644 sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestSetLogging-variables.yaml create mode 100644 sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestSetMinuteMetrics-variables.yaml create mode 100644 sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestSetProperties-variables.yaml create mode 100644 sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestSetTooManyCors-variables.yaml create mode 100644 sdk/tables/aztable/recordings/TestServiceClient_Storage/TestGetProperties-variables.yaml create mode 100644 sdk/tables/aztable/recordings/TestServiceClient_Storage/TestGetProperties.yaml create mode 100644 sdk/tables/aztable/recordings/TestServiceClient_Storage/TestGetStatistics-variables.yaml create mode 100644 sdk/tables/aztable/recordings/TestServiceClient_Storage/TestGetStatistics.yaml create mode 100644 sdk/tables/aztable/recordings/TestServiceClient_Storage/TestRetentionTooLong-variables.yaml create mode 100644 sdk/tables/aztable/recordings/TestServiceClient_Storage/TestRetentionTooLong.yaml create mode 100644 sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetCors-variables.yaml create mode 100644 sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetCors.yaml create mode 100644 sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetHoursMetrics-variables.yaml create mode 100644 sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetHoursMetrics.yaml create mode 100644 sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetLogging-variables.yaml create mode 100644 sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetLogging.yaml create mode 100644 sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetMinuteMetrics-variables.yaml create mode 100644 sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetMinuteMetrics.yaml create mode 100644 sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetProperties-variables.yaml create mode 100644 sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetProperties.yaml create mode 100644 sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetTooManyCors-variables.yaml create mode 100644 sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetTooManyCors.yaml diff --git a/sdk/tables/aztable/go.mod b/sdk/tables/aztable/go.mod index 96d1ccf79b28..a90efb0685b8 100644 --- a/sdk/tables/aztable/go.mod +++ b/sdk/tables/aztable/go.mod @@ -7,6 +7,7 @@ replace github.com/Azure/azure-sdk-for-go/sdk/internal => ../../internal require ( github.com/Azure/azure-sdk-for-go/sdk/azcore v0.16.2 github.com/Azure/azure-sdk-for-go/sdk/internal v0.5.1 + github.com/Azure/azure-sdk-for-go/sdk/to v0.1.4 // indirect github.com/stretchr/testify v1.7.0 golang.org/x/net v0.0.0-20210525063256-abc453219eb5 // indirect gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect diff --git a/sdk/tables/aztable/go.sum b/sdk/tables/aztable/go.sum index 0cf6242f1895..a34bb673bf5f 100644 --- a/sdk/tables/aztable/go.sum +++ b/sdk/tables/aztable/go.sum @@ -2,6 +2,8 @@ github.com/Azure/azure-sdk-for-go/sdk/azcore v0.16.1 h1:yQw8Ah26gBP4dv66ZNjZpRBR github.com/Azure/azure-sdk-for-go/sdk/azcore v0.16.1/go.mod h1:MVdrcUC4Hup35qHym3VdzoW+NBgBxrta9Vei97jRtM8= github.com/Azure/azure-sdk-for-go/sdk/azcore v0.16.2 h1:UC4vfOhW2l0f2QOCQpOxJS4/K6oKFy2tQZE+uWU1MEo= github.com/Azure/azure-sdk-for-go/sdk/azcore v0.16.2/go.mod h1:MVdrcUC4Hup35qHym3VdzoW+NBgBxrta9Vei97jRtM8= +github.com/Azure/azure-sdk-for-go/sdk/to v0.1.4 h1:3w4gk+uYOwplGhID1fDP305/8bI5Aug3URoC1V493KU= +github.com/Azure/azure-sdk-for-go/sdk/to v0.1.4/go.mod h1:UL/d4lvWAzSJUuX+19uKdN0ktyjoOyQhgY+HWNgtIYI= github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dnaeon/go-vcr v1.1.0 h1:ReYa/UBrRyQdant9B4fNHGoCNKw6qh6P0fsdGmZpR7c= diff --git a/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestGetProperties-variables.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestGetProperties-variables.yaml new file mode 100644 index 000000000000..4944bc270a8f --- /dev/null +++ b/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestGetProperties-variables.yaml @@ -0,0 +1,4 @@ +--- +COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com +TABLES_COSMOS_ACCOUNT_NAME: seankaneprim +TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== diff --git a/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestGetStatistics-variables.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestGetStatistics-variables.yaml new file mode 100644 index 000000000000..4944bc270a8f --- /dev/null +++ b/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestGetStatistics-variables.yaml @@ -0,0 +1,4 @@ +--- +COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com +TABLES_COSMOS_ACCOUNT_NAME: seankaneprim +TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== diff --git a/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestRetentionTooLong-variables.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestRetentionTooLong-variables.yaml new file mode 100644 index 000000000000..4944bc270a8f --- /dev/null +++ b/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestRetentionTooLong-variables.yaml @@ -0,0 +1,4 @@ +--- +COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com +TABLES_COSMOS_ACCOUNT_NAME: seankaneprim +TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== diff --git a/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestSetCors-variables.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestSetCors-variables.yaml new file mode 100644 index 000000000000..4944bc270a8f --- /dev/null +++ b/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestSetCors-variables.yaml @@ -0,0 +1,4 @@ +--- +COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com +TABLES_COSMOS_ACCOUNT_NAME: seankaneprim +TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== diff --git a/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestSetHoursMetrics-variables.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestSetHoursMetrics-variables.yaml new file mode 100644 index 000000000000..4944bc270a8f --- /dev/null +++ b/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestSetHoursMetrics-variables.yaml @@ -0,0 +1,4 @@ +--- +COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com +TABLES_COSMOS_ACCOUNT_NAME: seankaneprim +TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== diff --git a/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestSetLogging-variables.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestSetLogging-variables.yaml new file mode 100644 index 000000000000..4944bc270a8f --- /dev/null +++ b/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestSetLogging-variables.yaml @@ -0,0 +1,4 @@ +--- +COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com +TABLES_COSMOS_ACCOUNT_NAME: seankaneprim +TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== diff --git a/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestSetMinuteMetrics-variables.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestSetMinuteMetrics-variables.yaml new file mode 100644 index 000000000000..4944bc270a8f --- /dev/null +++ b/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestSetMinuteMetrics-variables.yaml @@ -0,0 +1,4 @@ +--- +COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com +TABLES_COSMOS_ACCOUNT_NAME: seankaneprim +TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== diff --git a/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestSetProperties-variables.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestSetProperties-variables.yaml new file mode 100644 index 000000000000..4944bc270a8f --- /dev/null +++ b/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestSetProperties-variables.yaml @@ -0,0 +1,4 @@ +--- +COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com +TABLES_COSMOS_ACCOUNT_NAME: seankaneprim +TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== diff --git a/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestSetTooManyCors-variables.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestSetTooManyCors-variables.yaml new file mode 100644 index 000000000000..4944bc270a8f --- /dev/null +++ b/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestSetTooManyCors-variables.yaml @@ -0,0 +1,4 @@ +--- +COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com +TABLES_COSMOS_ACCOUNT_NAME: seankaneprim +TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== diff --git a/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestGetProperties-variables.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestGetProperties-variables.yaml new file mode 100644 index 000000000000..57d67241a73e --- /dev/null +++ b/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestGetProperties-variables.yaml @@ -0,0 +1,4 @@ +--- +STORAGE_ENDPOINT_SUFFIX: core.windows.net +TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== +TABLES_STORAGE_ACCOUNT_NAME: seankaneprim diff --git a/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestGetProperties.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestGetProperties.yaml new file mode 100644 index 000000000000..84c6e1de98a2 --- /dev/null +++ b/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestGetProperties.yaml @@ -0,0 +1,36 @@ +--- +version: 1 +interactions: +- request: + body: "" + form: {} + headers: + Accept: + - application/xml + Authorization: + - sanitized + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Wed, 21 Jul 2021 17:18:23 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/?comp=properties&restype=service + method: GET + response: + body: "\uFEFF\x3C\x3F\x78\x6D\x6C\x20\x76\x65\x72\x73\x69\x6F\x6E\x3D\"\x31\x2E\x30\"\x20\x65\x6E\x63\x6F\x64\x69\x6E\x67\x3D\"\x75\x74\x66\x2D\x38\"\x3F\x3E\x3C\x53\x74\x6F\x72\x61\x67\x65\x53\x65\x72\x76\x69\x63\x65\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x3E\x3C\x4C\x6F\x67\x67\x69\x6E\x67\x3E\x3C\x56\x65\x72\x73\x69\x6F\x6E\x3E\x31\x2E\x30\x3C\x2F\x56\x65\x72\x73\x69\x6F\x6E\x3E\x3C\x52\x65\x61\x64\x3E\x66\x61\x6C\x73\x65\x3C\x2F\x52\x65\x61\x64\x3E\x3C\x57\x72\x69\x74\x65\x3E\x74\x72\x75\x65\x3C\x2F\x57\x72\x69\x74\x65\x3E\x3C\x44\x65\x6C\x65\x74\x65\x3E\x66\x61\x6C\x73\x65\x3C\x2F\x44\x65\x6C\x65\x74\x65\x3E\x3C\x52\x65\x74\x65\x6E\x74\x69\x6F\x6E\x50\x6F\x6C\x69\x63\x79\x3E\x3C\x45\x6E\x61\x62\x6C\x65\x64\x3E\x66\x61\x6C\x73\x65\x3C\x2F\x45\x6E\x61\x62\x6C\x65\x64\x3E\x3C\x2F\x52\x65\x74\x65\x6E\x74\x69\x6F\x6E\x50\x6F\x6C\x69\x63\x79\x3E\x3C\x2F\x4C\x6F\x67\x67\x69\x6E\x67\x3E\x3C\x48\x6F\x75\x72\x4D\x65\x74\x72\x69\x63\x73\x3E\x3C\x56\x65\x72\x73\x69\x6F\x6E\x3E\x31\x2E\x30\x3C\x2F\x56\x65\x72\x73\x69\x6F\x6E\x3E\x3C\x45\x6E\x61\x62\x6C\x65\x64\x3E\x74\x72\x75\x65\x3C\x2F\x45\x6E\x61\x62\x6C\x65\x64\x3E\x3C\x49\x6E\x63\x6C\x75\x64\x65\x41\x50\x49\x73\x3E\x74\x72\x75\x65\x3C\x2F\x49\x6E\x63\x6C\x75\x64\x65\x41\x50\x49\x73\x3E\x3C\x52\x65\x74\x65\x6E\x74\x69\x6F\x6E\x50\x6F\x6C\x69\x63\x79\x3E\x3C\x45\x6E\x61\x62\x6C\x65\x64\x3E\x74\x72\x75\x65\x3C\x2F\x45\x6E\x61\x62\x6C\x65\x64\x3E\x3C\x44\x61\x79\x73\x3E\x37\x3C\x2F\x44\x61\x79\x73\x3E\x3C\x2F\x52\x65\x74\x65\x6E\x74\x69\x6F\x6E\x50\x6F\x6C\x69\x63\x79\x3E\x3C\x2F\x48\x6F\x75\x72\x4D\x65\x74\x72\x69\x63\x73\x3E\x3C\x4D\x69\x6E\x75\x74\x65\x4D\x65\x74\x72\x69\x63\x73\x3E\x3C\x56\x65\x72\x73\x69\x6F\x6E\x3E\x31\x2E\x30\x3C\x2F\x56\x65\x72\x73\x69\x6F\x6E\x3E\x3C\x45\x6E\x61\x62\x6C\x65\x64\x3E\x74\x72\x75\x65\x3C\x2F\x45\x6E\x61\x62\x6C\x65\x64\x3E\x3C\x49\x6E\x63\x6C\x75\x64\x65\x41\x50\x49\x73\x3E\x74\x72\x75\x65\x3C\x2F\x49\x6E\x63\x6C\x75\x64\x65\x41\x50\x49\x73\x3E\x3C\x52\x65\x74\x65\x6E\x74\x69\x6F\x6E\x50\x6F\x6C\x69\x63\x79\x3E\x3C\x45\x6E\x61\x62\x6C\x65\x64\x3E\x74\x72\x75\x65\x3C\x2F\x45\x6E\x61\x62\x6C\x65\x64\x3E\x3C\x44\x61\x79\x73\x3E\x35\x3C\x2F\x44\x61\x79\x73\x3E\x3C\x2F\x52\x65\x74\x65\x6E\x74\x69\x6F\x6E\x50\x6F\x6C\x69\x63\x79\x3E\x3C\x2F\x4D\x69\x6E\x75\x74\x65\x4D\x65\x74\x72\x69\x63\x73\x3E\x3C\x43\x6F\x72\x73\x20\x2F\x3E\x3C\x2F\x53\x74\x6F\x72\x61\x67\x65\x53\x65\x72\x76\x69\x63\x65\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x3E" + headers: + Content-Type: + - application/xml + Date: + - Wed, 21 Jul 2021 17:18:24 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - 09d89e8d-5002-0005-4254-7e3aae000000 + X-Ms-Version: + - "2019-02-02" + status: 200 OK + code: 200 + duration: "" diff --git a/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestGetStatistics-variables.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestGetStatistics-variables.yaml new file mode 100644 index 000000000000..57d67241a73e --- /dev/null +++ b/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestGetStatistics-variables.yaml @@ -0,0 +1,4 @@ +--- +STORAGE_ENDPOINT_SUFFIX: core.windows.net +TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== +TABLES_STORAGE_ACCOUNT_NAME: seankaneprim diff --git a/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestGetStatistics.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestGetStatistics.yaml new file mode 100644 index 000000000000..43e184ead2dc --- /dev/null +++ b/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestGetStatistics.yaml @@ -0,0 +1,44 @@ +--- +version: 1 +interactions: +- request: + body: "" + form: {} + headers: + Accept: + - application/xml + Authorization: + - sanitized + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Wed, 21 Jul 2021 17:03:47 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/?comp=stats&restype=service + method: GET + response: + body: |- + InvalidQueryParameterValueValue for one of the query parameters specified in the request URI is invalid. + RequestId:6dee6431-9002-009c-7552-7e4513000000 + Time:2021-07-21T17:03:47.8339546Z + headers: + Content-Length: + - "372" + Content-Type: + - application/xml + Date: + - Wed, 21 Jul 2021 17:03:47 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Ms-Error-Code: + - InvalidQueryParameterValue + X-Ms-Request-Id: + - 6dee6431-9002-009c-7552-7e4513000000 + X-Ms-Version: + - "2019-02-02" + status: 400 Value for one of the query parameters specified in the request URI + is invalid. + code: 400 + duration: "" diff --git a/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestRetentionTooLong-variables.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestRetentionTooLong-variables.yaml new file mode 100644 index 000000000000..57d67241a73e --- /dev/null +++ b/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestRetentionTooLong-variables.yaml @@ -0,0 +1,4 @@ +--- +STORAGE_ENDPOINT_SUFFIX: core.windows.net +TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== +TABLES_STORAGE_ACCOUNT_NAME: seankaneprim diff --git a/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestRetentionTooLong.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestRetentionTooLong.yaml new file mode 100644 index 000000000000..2f20077eaa17 --- /dev/null +++ b/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestRetentionTooLong.yaml @@ -0,0 +1,47 @@ +--- +version: 1 +interactions: +- request: + body: truetruetrue3661.0 + form: {} + headers: + Accept: + - application/xml + Authorization: + - sanitized + Content-Length: + - "234" + Content-Type: + - application/xml + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Wed, 21 Jul 2021 18:51:15 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/?comp=properties&restype=service + method: PUT + response: + body: |- + InvalidXmlDocumentXML specified is not syntactically valid. + RequestId:3ef1f362-6002-00a7-5261-7e00b7000000 + Time:2021-07-21T18:51:16.5818083Z + headers: + Content-Length: + - "327" + Content-Type: + - application/xml + Date: + - Wed, 21 Jul 2021 18:51:15 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Ms-Error-Code: + - InvalidXmlDocument + X-Ms-Request-Id: + - 3ef1f362-6002-00a7-5261-7e00b7000000 + X-Ms-Version: + - "2019-02-02" + status: 400 XML specified is not syntactically valid. + code: 400 + duration: "" diff --git a/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetCors-variables.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetCors-variables.yaml new file mode 100644 index 000000000000..57d67241a73e --- /dev/null +++ b/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetCors-variables.yaml @@ -0,0 +1,4 @@ +--- +STORAGE_ENDPOINT_SUFFIX: core.windows.net +TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== +TABLES_STORAGE_ACCOUNT_NAME: seankaneprim diff --git a/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetCors.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetCors.yaml new file mode 100644 index 000000000000..5dac8cff5084 --- /dev/null +++ b/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetCors.yaml @@ -0,0 +1,73 @@ +--- +version: 1 +interactions: +- request: + body: x-ms-meta-data*PUTwww.xyz.comx-ms-meta-source*500 + form: {} + headers: + Accept: + - application/xml + Authorization: + - sanitized + Content-Length: + - "303" + Content-Type: + - application/xml + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Wed, 21 Jul 2021 18:41:41 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/?comp=properties&restype=service + method: PUT + response: + body: "" + headers: + Date: + - Wed, 21 Jul 2021 18:41:42 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - 4e9e991e-b002-006f-7560-7ee286000000 + X-Ms-Version: + - "2019-02-02" + status: 202 Accepted + code: 202 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/xml + Authorization: + - sanitized + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Wed, 21 Jul 2021 18:42:27 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/?comp=properties&restype=service + method: GET + response: + body: "\uFEFF\x3C\x3F\x78\x6D\x6C\x20\x76\x65\x72\x73\x69\x6F\x6E\x3D\"\x31\x2E\x30\"\x20\x65\x6E\x63\x6F\x64\x69\x6E\x67\x3D\"\x75\x74\x66\x2D\x38\"\x3F\x3E\x3C\x53\x74\x6F\x72\x61\x67\x65\x53\x65\x72\x76\x69\x63\x65\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x3E\x3C\x4C\x6F\x67\x67\x69\x6E\x67\x3E\x3C\x56\x65\x72\x73\x69\x6F\x6E\x3E\x31\x2E\x30\x3C\x2F\x56\x65\x72\x73\x69\x6F\x6E\x3E\x3C\x52\x65\x61\x64\x3E\x74\x72\x75\x65\x3C\x2F\x52\x65\x61\x64\x3E\x3C\x57\x72\x69\x74\x65\x3E\x74\x72\x75\x65\x3C\x2F\x57\x72\x69\x74\x65\x3E\x3C\x44\x65\x6C\x65\x74\x65\x3E\x74\x72\x75\x65\x3C\x2F\x44\x65\x6C\x65\x74\x65\x3E\x3C\x52\x65\x74\x65\x6E\x74\x69\x6F\x6E\x50\x6F\x6C\x69\x63\x79\x3E\x3C\x45\x6E\x61\x62\x6C\x65\x64\x3E\x74\x72\x75\x65\x3C\x2F\x45\x6E\x61\x62\x6C\x65\x64\x3E\x3C\x44\x61\x79\x73\x3E\x35\x3C\x2F\x44\x61\x79\x73\x3E\x3C\x2F\x52\x65\x74\x65\x6E\x74\x69\x6F\x6E\x50\x6F\x6C\x69\x63\x79\x3E\x3C\x2F\x4C\x6F\x67\x67\x69\x6E\x67\x3E\x3C\x48\x6F\x75\x72\x4D\x65\x74\x72\x69\x63\x73\x3E\x3C\x56\x65\x72\x73\x69\x6F\x6E\x3E\x31\x2E\x30\x3C\x2F\x56\x65\x72\x73\x69\x6F\x6E\x3E\x3C\x45\x6E\x61\x62\x6C\x65\x64\x3E\x74\x72\x75\x65\x3C\x2F\x45\x6E\x61\x62\x6C\x65\x64\x3E\x3C\x49\x6E\x63\x6C\x75\x64\x65\x41\x50\x49\x73\x3E\x74\x72\x75\x65\x3C\x2F\x49\x6E\x63\x6C\x75\x64\x65\x41\x50\x49\x73\x3E\x3C\x52\x65\x74\x65\x6E\x74\x69\x6F\x6E\x50\x6F\x6C\x69\x63\x79\x3E\x3C\x45\x6E\x61\x62\x6C\x65\x64\x3E\x74\x72\x75\x65\x3C\x2F\x45\x6E\x61\x62\x6C\x65\x64\x3E\x3C\x44\x61\x79\x73\x3E\x35\x3C\x2F\x44\x61\x79\x73\x3E\x3C\x2F\x52\x65\x74\x65\x6E\x74\x69\x6F\x6E\x50\x6F\x6C\x69\x63\x79\x3E\x3C\x2F\x48\x6F\x75\x72\x4D\x65\x74\x72\x69\x63\x73\x3E\x3C\x4D\x69\x6E\x75\x74\x65\x4D\x65\x74\x72\x69\x63\x73\x3E\x3C\x56\x65\x72\x73\x69\x6F\x6E\x3E\x31\x2E\x30\x3C\x2F\x56\x65\x72\x73\x69\x6F\x6E\x3E\x3C\x45\x6E\x61\x62\x6C\x65\x64\x3E\x74\x72\x75\x65\x3C\x2F\x45\x6E\x61\x62\x6C\x65\x64\x3E\x3C\x49\x6E\x63\x6C\x75\x64\x65\x41\x50\x49\x73\x3E\x74\x72\x75\x65\x3C\x2F\x49\x6E\x63\x6C\x75\x64\x65\x41\x50\x49\x73\x3E\x3C\x52\x65\x74\x65\x6E\x74\x69\x6F\x6E\x50\x6F\x6C\x69\x63\x79\x3E\x3C\x45\x6E\x61\x62\x6C\x65\x64\x3E\x74\x72\x75\x65\x3C\x2F\x45\x6E\x61\x62\x6C\x65\x64\x3E\x3C\x44\x61\x79\x73\x3E\x35\x3C\x2F\x44\x61\x79\x73\x3E\x3C\x2F\x52\x65\x74\x65\x6E\x74\x69\x6F\x6E\x50\x6F\x6C\x69\x63\x79\x3E\x3C\x2F\x4D\x69\x6E\x75\x74\x65\x4D\x65\x74\x72\x69\x63\x73\x3E\x3C\x43\x6F\x72\x73\x3E\x3C\x43\x6F\x72\x73\x52\x75\x6C\x65\x3E\x3C\x41\x6C\x6C\x6F\x77\x65\x64\x4D\x65\x74\x68\x6F\x64\x73\x3E\x50\x55\x54\x3C\x2F\x41\x6C\x6C\x6F\x77\x65\x64\x4D\x65\x74\x68\x6F\x64\x73\x3E\x3C\x41\x6C\x6C\x6F\x77\x65\x64\x4F\x72\x69\x67\x69\x6E\x73\x3E\x77\x77\x77\x2E\x78\x79\x7A\x2E\x63\x6F\x6D\x3C\x2F\x41\x6C\x6C\x6F\x77\x65\x64\x4F\x72\x69\x67\x69\x6E\x73\x3E\x3C\x41\x6C\x6C\x6F\x77\x65\x64\x48\x65\x61\x64\x65\x72\x73\x3E\x78\x2D\x6D\x73\x2D\x6D\x65\x74\x61\x2D\x64\x61\x74\x61\x2A\x3C\x2F\x41\x6C\x6C\x6F\x77\x65\x64\x48\x65\x61\x64\x65\x72\x73\x3E\x3C\x45\x78\x70\x6F\x73\x65\x64\x48\x65\x61\x64\x65\x72\x73\x3E\x78\x2D\x6D\x73\x2D\x6D\x65\x74\x61\x2D\x73\x6F\x75\x72\x63\x65\x2A\x3C\x2F\x45\x78\x70\x6F\x73\x65\x64\x48\x65\x61\x64\x65\x72\x73\x3E\x3C\x4D\x61\x78\x41\x67\x65\x49\x6E\x53\x65\x63\x6F\x6E\x64\x73\x3E\x35\x30\x30\x3C\x2F\x4D\x61\x78\x41\x67\x65\x49\x6E\x53\x65\x63\x6F\x6E\x64\x73\x3E\x3C\x2F\x43\x6F\x72\x73\x52\x75\x6C\x65\x3E\x3C\x2F\x43\x6F\x72\x73\x3E\x3C\x2F\x53\x74\x6F\x72\x61\x67\x65\x53\x65\x72\x76\x69\x63\x65\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x3E" + headers: + Content-Type: + - application/xml + Date: + - Wed, 21 Jul 2021 18:42:27 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + Vary: + - Origin + X-Ms-Request-Id: + - 4e9f1573-b002-006f-5a60-7ee286000000 + X-Ms-Version: + - "2019-02-02" + status: 200 OK + code: 200 + duration: "" diff --git a/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetHoursMetrics-variables.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetHoursMetrics-variables.yaml new file mode 100644 index 000000000000..57d67241a73e --- /dev/null +++ b/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetHoursMetrics-variables.yaml @@ -0,0 +1,4 @@ +--- +STORAGE_ENDPOINT_SUFFIX: core.windows.net +TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== +TABLES_STORAGE_ACCOUNT_NAME: seankaneprim diff --git a/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetHoursMetrics.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetHoursMetrics.yaml new file mode 100644 index 000000000000..2145855a36a6 --- /dev/null +++ b/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetHoursMetrics.yaml @@ -0,0 +1,71 @@ +--- +version: 1 +interactions: +- request: + body: truetruetrue51.0 + form: {} + headers: + Accept: + - application/xml + Authorization: + - sanitized + Content-Length: + - "228" + Content-Type: + - application/xml + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Wed, 21 Jul 2021 18:28:42 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/?comp=properties&restype=service + method: PUT + response: + body: "" + headers: + Date: + - Wed, 21 Jul 2021 18:28:43 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - b3e7e057-f002-0033-575e-7eb7de000000 + X-Ms-Version: + - "2019-02-02" + status: 202 Accepted + code: 202 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/xml + Authorization: + - sanitized + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Wed, 21 Jul 2021 18:29:29 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/?comp=properties&restype=service + method: GET + response: + body: "\uFEFF\x3C\x3F\x78\x6D\x6C\x20\x76\x65\x72\x73\x69\x6F\x6E\x3D\"\x31\x2E\x30\"\x20\x65\x6E\x63\x6F\x64\x69\x6E\x67\x3D\"\x75\x74\x66\x2D\x38\"\x3F\x3E\x3C\x53\x74\x6F\x72\x61\x67\x65\x53\x65\x72\x76\x69\x63\x65\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x3E\x3C\x4C\x6F\x67\x67\x69\x6E\x67\x3E\x3C\x56\x65\x72\x73\x69\x6F\x6E\x3E\x31\x2E\x30\x3C\x2F\x56\x65\x72\x73\x69\x6F\x6E\x3E\x3C\x52\x65\x61\x64\x3E\x74\x72\x75\x65\x3C\x2F\x52\x65\x61\x64\x3E\x3C\x57\x72\x69\x74\x65\x3E\x74\x72\x75\x65\x3C\x2F\x57\x72\x69\x74\x65\x3E\x3C\x44\x65\x6C\x65\x74\x65\x3E\x74\x72\x75\x65\x3C\x2F\x44\x65\x6C\x65\x74\x65\x3E\x3C\x52\x65\x74\x65\x6E\x74\x69\x6F\x6E\x50\x6F\x6C\x69\x63\x79\x3E\x3C\x45\x6E\x61\x62\x6C\x65\x64\x3E\x74\x72\x75\x65\x3C\x2F\x45\x6E\x61\x62\x6C\x65\x64\x3E\x3C\x44\x61\x79\x73\x3E\x35\x3C\x2F\x44\x61\x79\x73\x3E\x3C\x2F\x52\x65\x74\x65\x6E\x74\x69\x6F\x6E\x50\x6F\x6C\x69\x63\x79\x3E\x3C\x2F\x4C\x6F\x67\x67\x69\x6E\x67\x3E\x3C\x48\x6F\x75\x72\x4D\x65\x74\x72\x69\x63\x73\x3E\x3C\x56\x65\x72\x73\x69\x6F\x6E\x3E\x31\x2E\x30\x3C\x2F\x56\x65\x72\x73\x69\x6F\x6E\x3E\x3C\x45\x6E\x61\x62\x6C\x65\x64\x3E\x74\x72\x75\x65\x3C\x2F\x45\x6E\x61\x62\x6C\x65\x64\x3E\x3C\x49\x6E\x63\x6C\x75\x64\x65\x41\x50\x49\x73\x3E\x74\x72\x75\x65\x3C\x2F\x49\x6E\x63\x6C\x75\x64\x65\x41\x50\x49\x73\x3E\x3C\x52\x65\x74\x65\x6E\x74\x69\x6F\x6E\x50\x6F\x6C\x69\x63\x79\x3E\x3C\x45\x6E\x61\x62\x6C\x65\x64\x3E\x74\x72\x75\x65\x3C\x2F\x45\x6E\x61\x62\x6C\x65\x64\x3E\x3C\x44\x61\x79\x73\x3E\x35\x3C\x2F\x44\x61\x79\x73\x3E\x3C\x2F\x52\x65\x74\x65\x6E\x74\x69\x6F\x6E\x50\x6F\x6C\x69\x63\x79\x3E\x3C\x2F\x48\x6F\x75\x72\x4D\x65\x74\x72\x69\x63\x73\x3E\x3C\x4D\x69\x6E\x75\x74\x65\x4D\x65\x74\x72\x69\x63\x73\x3E\x3C\x56\x65\x72\x73\x69\x6F\x6E\x3E\x31\x2E\x30\x3C\x2F\x56\x65\x72\x73\x69\x6F\x6E\x3E\x3C\x45\x6E\x61\x62\x6C\x65\x64\x3E\x74\x72\x75\x65\x3C\x2F\x45\x6E\x61\x62\x6C\x65\x64\x3E\x3C\x49\x6E\x63\x6C\x75\x64\x65\x41\x50\x49\x73\x3E\x74\x72\x75\x65\x3C\x2F\x49\x6E\x63\x6C\x75\x64\x65\x41\x50\x49\x73\x3E\x3C\x52\x65\x74\x65\x6E\x74\x69\x6F\x6E\x50\x6F\x6C\x69\x63\x79\x3E\x3C\x45\x6E\x61\x62\x6C\x65\x64\x3E\x74\x72\x75\x65\x3C\x2F\x45\x6E\x61\x62\x6C\x65\x64\x3E\x3C\x44\x61\x79\x73\x3E\x35\x3C\x2F\x44\x61\x79\x73\x3E\x3C\x2F\x52\x65\x74\x65\x6E\x74\x69\x6F\x6E\x50\x6F\x6C\x69\x63\x79\x3E\x3C\x2F\x4D\x69\x6E\x75\x74\x65\x4D\x65\x74\x72\x69\x63\x73\x3E\x3C\x43\x6F\x72\x73\x20\x2F\x3E\x3C\x2F\x53\x74\x6F\x72\x61\x67\x65\x53\x65\x72\x76\x69\x63\x65\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x3E" + headers: + Content-Type: + - application/xml + Date: + - Wed, 21 Jul 2021 18:29:30 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - b3e84299-f002-0033-435e-7eb7de000000 + X-Ms-Version: + - "2019-02-02" + status: 200 OK + code: 200 + duration: "" diff --git a/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetLogging-variables.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetLogging-variables.yaml new file mode 100644 index 000000000000..57d67241a73e --- /dev/null +++ b/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetLogging-variables.yaml @@ -0,0 +1,4 @@ +--- +STORAGE_ENDPOINT_SUFFIX: core.windows.net +TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== +TABLES_STORAGE_ACCOUNT_NAME: seankaneprim diff --git a/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetLogging.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetLogging.yaml new file mode 100644 index 000000000000..dd68a1837ce1 --- /dev/null +++ b/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetLogging.yaml @@ -0,0 +1,71 @@ +--- +version: 1 +interactions: +- request: + body: truetruetrue51.0true + form: {} + headers: + Accept: + - application/xml + Authorization: + - sanitized + Content-Length: + - "223" + Content-Type: + - application/xml + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Wed, 21 Jul 2021 18:29:29 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/?comp=properties&restype=service + method: PUT + response: + body: "" + headers: + Date: + - Wed, 21 Jul 2021 18:29:30 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - b3e842e4-f002-0033-0b5e-7eb7de000000 + X-Ms-Version: + - "2019-02-02" + status: 202 Accepted + code: 202 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/xml + Authorization: + - sanitized + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Wed, 21 Jul 2021 18:30:15 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/?comp=properties&restype=service + method: GET + response: + body: "\uFEFF\x3C\x3F\x78\x6D\x6C\x20\x76\x65\x72\x73\x69\x6F\x6E\x3D\"\x31\x2E\x30\"\x20\x65\x6E\x63\x6F\x64\x69\x6E\x67\x3D\"\x75\x74\x66\x2D\x38\"\x3F\x3E\x3C\x53\x74\x6F\x72\x61\x67\x65\x53\x65\x72\x76\x69\x63\x65\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x3E\x3C\x4C\x6F\x67\x67\x69\x6E\x67\x3E\x3C\x56\x65\x72\x73\x69\x6F\x6E\x3E\x31\x2E\x30\x3C\x2F\x56\x65\x72\x73\x69\x6F\x6E\x3E\x3C\x52\x65\x61\x64\x3E\x74\x72\x75\x65\x3C\x2F\x52\x65\x61\x64\x3E\x3C\x57\x72\x69\x74\x65\x3E\x74\x72\x75\x65\x3C\x2F\x57\x72\x69\x74\x65\x3E\x3C\x44\x65\x6C\x65\x74\x65\x3E\x74\x72\x75\x65\x3C\x2F\x44\x65\x6C\x65\x74\x65\x3E\x3C\x52\x65\x74\x65\x6E\x74\x69\x6F\x6E\x50\x6F\x6C\x69\x63\x79\x3E\x3C\x45\x6E\x61\x62\x6C\x65\x64\x3E\x74\x72\x75\x65\x3C\x2F\x45\x6E\x61\x62\x6C\x65\x64\x3E\x3C\x44\x61\x79\x73\x3E\x35\x3C\x2F\x44\x61\x79\x73\x3E\x3C\x2F\x52\x65\x74\x65\x6E\x74\x69\x6F\x6E\x50\x6F\x6C\x69\x63\x79\x3E\x3C\x2F\x4C\x6F\x67\x67\x69\x6E\x67\x3E\x3C\x48\x6F\x75\x72\x4D\x65\x74\x72\x69\x63\x73\x3E\x3C\x56\x65\x72\x73\x69\x6F\x6E\x3E\x31\x2E\x30\x3C\x2F\x56\x65\x72\x73\x69\x6F\x6E\x3E\x3C\x45\x6E\x61\x62\x6C\x65\x64\x3E\x74\x72\x75\x65\x3C\x2F\x45\x6E\x61\x62\x6C\x65\x64\x3E\x3C\x49\x6E\x63\x6C\x75\x64\x65\x41\x50\x49\x73\x3E\x74\x72\x75\x65\x3C\x2F\x49\x6E\x63\x6C\x75\x64\x65\x41\x50\x49\x73\x3E\x3C\x52\x65\x74\x65\x6E\x74\x69\x6F\x6E\x50\x6F\x6C\x69\x63\x79\x3E\x3C\x45\x6E\x61\x62\x6C\x65\x64\x3E\x74\x72\x75\x65\x3C\x2F\x45\x6E\x61\x62\x6C\x65\x64\x3E\x3C\x44\x61\x79\x73\x3E\x35\x3C\x2F\x44\x61\x79\x73\x3E\x3C\x2F\x52\x65\x74\x65\x6E\x74\x69\x6F\x6E\x50\x6F\x6C\x69\x63\x79\x3E\x3C\x2F\x48\x6F\x75\x72\x4D\x65\x74\x72\x69\x63\x73\x3E\x3C\x4D\x69\x6E\x75\x74\x65\x4D\x65\x74\x72\x69\x63\x73\x3E\x3C\x56\x65\x72\x73\x69\x6F\x6E\x3E\x31\x2E\x30\x3C\x2F\x56\x65\x72\x73\x69\x6F\x6E\x3E\x3C\x45\x6E\x61\x62\x6C\x65\x64\x3E\x74\x72\x75\x65\x3C\x2F\x45\x6E\x61\x62\x6C\x65\x64\x3E\x3C\x49\x6E\x63\x6C\x75\x64\x65\x41\x50\x49\x73\x3E\x74\x72\x75\x65\x3C\x2F\x49\x6E\x63\x6C\x75\x64\x65\x41\x50\x49\x73\x3E\x3C\x52\x65\x74\x65\x6E\x74\x69\x6F\x6E\x50\x6F\x6C\x69\x63\x79\x3E\x3C\x45\x6E\x61\x62\x6C\x65\x64\x3E\x74\x72\x75\x65\x3C\x2F\x45\x6E\x61\x62\x6C\x65\x64\x3E\x3C\x44\x61\x79\x73\x3E\x35\x3C\x2F\x44\x61\x79\x73\x3E\x3C\x2F\x52\x65\x74\x65\x6E\x74\x69\x6F\x6E\x50\x6F\x6C\x69\x63\x79\x3E\x3C\x2F\x4D\x69\x6E\x75\x74\x65\x4D\x65\x74\x72\x69\x63\x73\x3E\x3C\x43\x6F\x72\x73\x20\x2F\x3E\x3C\x2F\x53\x74\x6F\x72\x61\x67\x65\x53\x65\x72\x76\x69\x63\x65\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x3E" + headers: + Content-Type: + - application/xml + Date: + - Wed, 21 Jul 2021 18:30:15 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - b3e89cec-f002-0033-515e-7eb7de000000 + X-Ms-Version: + - "2019-02-02" + status: 200 OK + code: 200 + duration: "" diff --git a/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetMinuteMetrics-variables.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetMinuteMetrics-variables.yaml new file mode 100644 index 000000000000..57d67241a73e --- /dev/null +++ b/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetMinuteMetrics-variables.yaml @@ -0,0 +1,4 @@ +--- +STORAGE_ENDPOINT_SUFFIX: core.windows.net +TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== +TABLES_STORAGE_ACCOUNT_NAME: seankaneprim diff --git a/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetMinuteMetrics.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetMinuteMetrics.yaml new file mode 100644 index 000000000000..c088bcbc6646 --- /dev/null +++ b/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetMinuteMetrics.yaml @@ -0,0 +1,71 @@ +--- +version: 1 +interactions: +- request: + body: truetruetrue51.0 + form: {} + headers: + Accept: + - application/xml + Authorization: + - sanitized + Content-Length: + - "232" + Content-Type: + - application/xml + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Wed, 21 Jul 2021 18:30:15 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/?comp=properties&restype=service + method: PUT + response: + body: "" + headers: + Date: + - Wed, 21 Jul 2021 18:30:15 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - b3e89d7a-f002-0033-595e-7eb7de000000 + X-Ms-Version: + - "2019-02-02" + status: 202 Accepted + code: 202 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/xml + Authorization: + - sanitized + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Wed, 21 Jul 2021 18:31:00 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/?comp=properties&restype=service + method: GET + response: + body: "\uFEFF\x3C\x3F\x78\x6D\x6C\x20\x76\x65\x72\x73\x69\x6F\x6E\x3D\"\x31\x2E\x30\"\x20\x65\x6E\x63\x6F\x64\x69\x6E\x67\x3D\"\x75\x74\x66\x2D\x38\"\x3F\x3E\x3C\x53\x74\x6F\x72\x61\x67\x65\x53\x65\x72\x76\x69\x63\x65\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x3E\x3C\x4C\x6F\x67\x67\x69\x6E\x67\x3E\x3C\x56\x65\x72\x73\x69\x6F\x6E\x3E\x31\x2E\x30\x3C\x2F\x56\x65\x72\x73\x69\x6F\x6E\x3E\x3C\x52\x65\x61\x64\x3E\x74\x72\x75\x65\x3C\x2F\x52\x65\x61\x64\x3E\x3C\x57\x72\x69\x74\x65\x3E\x74\x72\x75\x65\x3C\x2F\x57\x72\x69\x74\x65\x3E\x3C\x44\x65\x6C\x65\x74\x65\x3E\x74\x72\x75\x65\x3C\x2F\x44\x65\x6C\x65\x74\x65\x3E\x3C\x52\x65\x74\x65\x6E\x74\x69\x6F\x6E\x50\x6F\x6C\x69\x63\x79\x3E\x3C\x45\x6E\x61\x62\x6C\x65\x64\x3E\x74\x72\x75\x65\x3C\x2F\x45\x6E\x61\x62\x6C\x65\x64\x3E\x3C\x44\x61\x79\x73\x3E\x35\x3C\x2F\x44\x61\x79\x73\x3E\x3C\x2F\x52\x65\x74\x65\x6E\x74\x69\x6F\x6E\x50\x6F\x6C\x69\x63\x79\x3E\x3C\x2F\x4C\x6F\x67\x67\x69\x6E\x67\x3E\x3C\x48\x6F\x75\x72\x4D\x65\x74\x72\x69\x63\x73\x3E\x3C\x56\x65\x72\x73\x69\x6F\x6E\x3E\x31\x2E\x30\x3C\x2F\x56\x65\x72\x73\x69\x6F\x6E\x3E\x3C\x45\x6E\x61\x62\x6C\x65\x64\x3E\x74\x72\x75\x65\x3C\x2F\x45\x6E\x61\x62\x6C\x65\x64\x3E\x3C\x49\x6E\x63\x6C\x75\x64\x65\x41\x50\x49\x73\x3E\x74\x72\x75\x65\x3C\x2F\x49\x6E\x63\x6C\x75\x64\x65\x41\x50\x49\x73\x3E\x3C\x52\x65\x74\x65\x6E\x74\x69\x6F\x6E\x50\x6F\x6C\x69\x63\x79\x3E\x3C\x45\x6E\x61\x62\x6C\x65\x64\x3E\x74\x72\x75\x65\x3C\x2F\x45\x6E\x61\x62\x6C\x65\x64\x3E\x3C\x44\x61\x79\x73\x3E\x35\x3C\x2F\x44\x61\x79\x73\x3E\x3C\x2F\x52\x65\x74\x65\x6E\x74\x69\x6F\x6E\x50\x6F\x6C\x69\x63\x79\x3E\x3C\x2F\x48\x6F\x75\x72\x4D\x65\x74\x72\x69\x63\x73\x3E\x3C\x4D\x69\x6E\x75\x74\x65\x4D\x65\x74\x72\x69\x63\x73\x3E\x3C\x56\x65\x72\x73\x69\x6F\x6E\x3E\x31\x2E\x30\x3C\x2F\x56\x65\x72\x73\x69\x6F\x6E\x3E\x3C\x45\x6E\x61\x62\x6C\x65\x64\x3E\x74\x72\x75\x65\x3C\x2F\x45\x6E\x61\x62\x6C\x65\x64\x3E\x3C\x49\x6E\x63\x6C\x75\x64\x65\x41\x50\x49\x73\x3E\x74\x72\x75\x65\x3C\x2F\x49\x6E\x63\x6C\x75\x64\x65\x41\x50\x49\x73\x3E\x3C\x52\x65\x74\x65\x6E\x74\x69\x6F\x6E\x50\x6F\x6C\x69\x63\x79\x3E\x3C\x45\x6E\x61\x62\x6C\x65\x64\x3E\x74\x72\x75\x65\x3C\x2F\x45\x6E\x61\x62\x6C\x65\x64\x3E\x3C\x44\x61\x79\x73\x3E\x35\x3C\x2F\x44\x61\x79\x73\x3E\x3C\x2F\x52\x65\x74\x65\x6E\x74\x69\x6F\x6E\x50\x6F\x6C\x69\x63\x79\x3E\x3C\x2F\x4D\x69\x6E\x75\x74\x65\x4D\x65\x74\x72\x69\x63\x73\x3E\x3C\x43\x6F\x72\x73\x20\x2F\x3E\x3C\x2F\x53\x74\x6F\x72\x61\x67\x65\x53\x65\x72\x76\x69\x63\x65\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x3E" + headers: + Content-Type: + - application/xml + Date: + - Wed, 21 Jul 2021 18:31:01 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - b3e8f8da-f002-0033-5c5e-7eb7de000000 + X-Ms-Version: + - "2019-02-02" + status: 200 OK + code: 200 + duration: "" diff --git a/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetProperties-variables.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetProperties-variables.yaml new file mode 100644 index 000000000000..57d67241a73e --- /dev/null +++ b/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetProperties-variables.yaml @@ -0,0 +1,4 @@ +--- +STORAGE_ENDPOINT_SUFFIX: core.windows.net +TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== +TABLES_STORAGE_ACCOUNT_NAME: seankaneprim diff --git a/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetProperties.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetProperties.yaml new file mode 100644 index 000000000000..51c92a3c9064 --- /dev/null +++ b/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetProperties.yaml @@ -0,0 +1,71 @@ +--- +version: 1 +interactions: +- request: + body: truetruefalse1.0true + form: {} + headers: + Accept: + - application/xml + Authorization: + - sanitized + Content-Length: + - "210" + Content-Type: + - application/xml + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Wed, 21 Jul 2021 17:38:34 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/?comp=properties&restype=service + method: PUT + response: + body: "" + headers: + Date: + - Wed, 21 Jul 2021 17:38:35 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - 1d06287b-a002-0097-3657-7ebe78000000 + X-Ms-Version: + - "2019-02-02" + status: 202 Accepted + code: 202 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/xml + Authorization: + - sanitized + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Wed, 21 Jul 2021 17:38:35 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/?comp=properties&restype=service + method: GET + response: + body: "\uFEFF\x3C\x3F\x78\x6D\x6C\x20\x76\x65\x72\x73\x69\x6F\x6E\x3D\"\x31\x2E\x30\"\x20\x65\x6E\x63\x6F\x64\x69\x6E\x67\x3D\"\x75\x74\x66\x2D\x38\"\x3F\x3E\x3C\x53\x74\x6F\x72\x61\x67\x65\x53\x65\x72\x76\x69\x63\x65\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x3E\x3C\x4C\x6F\x67\x67\x69\x6E\x67\x3E\x3C\x56\x65\x72\x73\x69\x6F\x6E\x3E\x31\x2E\x30\x3C\x2F\x56\x65\x72\x73\x69\x6F\x6E\x3E\x3C\x52\x65\x61\x64\x3E\x66\x61\x6C\x73\x65\x3C\x2F\x52\x65\x61\x64\x3E\x3C\x57\x72\x69\x74\x65\x3E\x74\x72\x75\x65\x3C\x2F\x57\x72\x69\x74\x65\x3E\x3C\x44\x65\x6C\x65\x74\x65\x3E\x66\x61\x6C\x73\x65\x3C\x2F\x44\x65\x6C\x65\x74\x65\x3E\x3C\x52\x65\x74\x65\x6E\x74\x69\x6F\x6E\x50\x6F\x6C\x69\x63\x79\x3E\x3C\x45\x6E\x61\x62\x6C\x65\x64\x3E\x66\x61\x6C\x73\x65\x3C\x2F\x45\x6E\x61\x62\x6C\x65\x64\x3E\x3C\x2F\x52\x65\x74\x65\x6E\x74\x69\x6F\x6E\x50\x6F\x6C\x69\x63\x79\x3E\x3C\x2F\x4C\x6F\x67\x67\x69\x6E\x67\x3E\x3C\x48\x6F\x75\x72\x4D\x65\x74\x72\x69\x63\x73\x3E\x3C\x56\x65\x72\x73\x69\x6F\x6E\x3E\x31\x2E\x30\x3C\x2F\x56\x65\x72\x73\x69\x6F\x6E\x3E\x3C\x45\x6E\x61\x62\x6C\x65\x64\x3E\x74\x72\x75\x65\x3C\x2F\x45\x6E\x61\x62\x6C\x65\x64\x3E\x3C\x49\x6E\x63\x6C\x75\x64\x65\x41\x50\x49\x73\x3E\x74\x72\x75\x65\x3C\x2F\x49\x6E\x63\x6C\x75\x64\x65\x41\x50\x49\x73\x3E\x3C\x52\x65\x74\x65\x6E\x74\x69\x6F\x6E\x50\x6F\x6C\x69\x63\x79\x3E\x3C\x45\x6E\x61\x62\x6C\x65\x64\x3E\x74\x72\x75\x65\x3C\x2F\x45\x6E\x61\x62\x6C\x65\x64\x3E\x3C\x44\x61\x79\x73\x3E\x37\x3C\x2F\x44\x61\x79\x73\x3E\x3C\x2F\x52\x65\x74\x65\x6E\x74\x69\x6F\x6E\x50\x6F\x6C\x69\x63\x79\x3E\x3C\x2F\x48\x6F\x75\x72\x4D\x65\x74\x72\x69\x63\x73\x3E\x3C\x4D\x69\x6E\x75\x74\x65\x4D\x65\x74\x72\x69\x63\x73\x3E\x3C\x56\x65\x72\x73\x69\x6F\x6E\x3E\x31\x2E\x30\x3C\x2F\x56\x65\x72\x73\x69\x6F\x6E\x3E\x3C\x45\x6E\x61\x62\x6C\x65\x64\x3E\x74\x72\x75\x65\x3C\x2F\x45\x6E\x61\x62\x6C\x65\x64\x3E\x3C\x49\x6E\x63\x6C\x75\x64\x65\x41\x50\x49\x73\x3E\x74\x72\x75\x65\x3C\x2F\x49\x6E\x63\x6C\x75\x64\x65\x41\x50\x49\x73\x3E\x3C\x52\x65\x74\x65\x6E\x74\x69\x6F\x6E\x50\x6F\x6C\x69\x63\x79\x3E\x3C\x45\x6E\x61\x62\x6C\x65\x64\x3E\x74\x72\x75\x65\x3C\x2F\x45\x6E\x61\x62\x6C\x65\x64\x3E\x3C\x44\x61\x79\x73\x3E\x35\x3C\x2F\x44\x61\x79\x73\x3E\x3C\x2F\x52\x65\x74\x65\x6E\x74\x69\x6F\x6E\x50\x6F\x6C\x69\x63\x79\x3E\x3C\x2F\x4D\x69\x6E\x75\x74\x65\x4D\x65\x74\x72\x69\x63\x73\x3E\x3C\x43\x6F\x72\x73\x20\x2F\x3E\x3C\x2F\x53\x74\x6F\x72\x61\x67\x65\x53\x65\x72\x76\x69\x63\x65\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x3E" + headers: + Content-Type: + - application/xml + Date: + - Wed, 21 Jul 2021 17:38:35 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - 1d0628fb-a002-0097-2957-7ebe78000000 + X-Ms-Version: + - "2019-02-02" + status: 200 OK + code: 200 + duration: "" diff --git a/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetTooManyCors-variables.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetTooManyCors-variables.yaml new file mode 100644 index 000000000000..57d67241a73e --- /dev/null +++ b/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetTooManyCors-variables.yaml @@ -0,0 +1,4 @@ +--- +STORAGE_ENDPOINT_SUFFIX: core.windows.net +TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== +TABLES_STORAGE_ACCOUNT_NAME: seankaneprim diff --git a/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetTooManyCors.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetTooManyCors.yaml new file mode 100644 index 000000000000..5ba450161551 --- /dev/null +++ b/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetTooManyCors.yaml @@ -0,0 +1,47 @@ +--- +version: 1 +interactions: +- request: + body: x-ms-meta-data*PUTwww.xyz.comx-ms-meta-source*500x-ms-meta-data*PUTwww.xyz.comx-ms-meta-source*500x-ms-meta-data*PUTwww.xyz.comx-ms-meta-source*500x-ms-meta-data*PUTwww.xyz.comx-ms-meta-source*500x-ms-meta-data*PUTwww.xyz.comx-ms-meta-source*500x-ms-meta-data*PUTwww.xyz.comx-ms-meta-source*500 + form: {} + headers: + Accept: + - application/xml + Authorization: + - sanitized + Content-Length: + - "1488" + Content-Type: + - application/xml + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Wed, 21 Jul 2021 18:46:03 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/?comp=properties&restype=service + method: PUT + response: + body: |- + InvalidXmlDocumentXML specified is not syntactically valid. + RequestId:a3fe73f8-7002-0084-4b60-7e9a74000000 + Time:2021-07-21T18:46:04.7286836Z + headers: + Content-Length: + - "327" + Content-Type: + - application/xml + Date: + - Wed, 21 Jul 2021 18:46:03 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Ms-Error-Code: + - InvalidXmlDocument + X-Ms-Request-Id: + - a3fe73f8-7002-0084-4b60-7e9a74000000 + X-Ms-Version: + - "2019-02-02" + status: 400 XML specified is not syntactically valid. + code: 400 + duration: "" diff --git a/sdk/tables/aztable/table_service_client.go b/sdk/tables/aztable/table_service_client.go index 90d560afd3e7..4f5fa650d5fc 100644 --- a/sdk/tables/aztable/table_service_client.go +++ b/sdk/tables/aztable/table_service_client.go @@ -75,6 +75,65 @@ func (t *TableServiceClient) Query(queryOptions *QueryOptions) TableQueryRespons return &tableQueryResponsePager{client: t.client, queryOptions: queryOptions, tableQueryOptions: new(TableQueryOptions)} } +// GetStatistics retrieves all the statistics for an account with Geo-redundancy established. +// +// response, err := client.GetStatistics(context.Background, nil) +// handle(err) +// fmt.Println("Status: ", response.StorageServiceStats.GeoReplication.Status) +// fmt.Println(Last Sync Time: ", response.StorageServiceStats.GeoReplication.LastSyncTime) +func (t *TableServiceClient) GetStatistics(ctx context.Context, options *ServiceGetStatisticsOptions) (TableServiceStatsResponse, error) { + if options == nil { + options = &ServiceGetStatisticsOptions{} + } + return t.service.GetStatistics(ctx, options) +} + +// GetProperties retrieves the properties for an account including the metrics, logging, and cors rules established. +// +// response, err := client.GetProperties(context.Background, nil) +// handle(err) +// fmt.Println(resopnse.StorageServiceStats.Cors) +// fmt.Println(resopnse.StorageServiceStats.HourMetrics) +// fmt.Println(resopnse.StorageServiceStats.Logging) +// fmt.Println(resopnse.StorageServiceStats.MinuteMetrics) +func (t *TableServiceClient) GetProperties(ctx context.Context, options *ServiceGetPropertiesOptions) (TableServicePropertiesResponse, error) { + if options == nil { + options = &ServiceGetPropertiesOptions{} + } + return t.service.GetProperties(ctx, options) +} + +// SetProperties allows the user to set cors , metrics, and logging rules for the account. +// +// Cors: A slice of CorsRules. +// +// HoursMetrics: A summary of request statistics grouped in hourly aggregatess for tables +// +// HoursMetrics: A summary of request statistics grouped in minute aggregates for tables +// +// Logging: Azure Analytics logging settings +// +// +// logging := Logging{ +// Read: to.BoolPtr(true), +// Write: to.BoolPtr(true), +// Delete: to.BoolPtr(true), +// Version: to.StringPtr("1.0"), +// RetentionPolicy: &RetentionPolicy{ +// Enabled: to.BoolPtr(true), +// Days: to.Int32Ptr(5), +// }, +// } +// props := TableServiceProperties{Logging: &logging} +// resp, err := context.client.SetProperties(ctx, props, nil) +// handle(err) +func (t *TableServiceClient) SetProperties(ctx context.Context, properties TableServiceProperties, options *ServiceSetPropertiesOptions) (ServiceSetPropertiesResponse, error) { + if options == nil { + options = &ServiceSetPropertiesOptions{} + } + return t.service.SetProperties(ctx, properties, options) +} + func isCosmosEndpoint(url string) bool { isCosmosEmulator := strings.Contains(url, "localhost") && strings.Contains(url, "8902") return isCosmosEmulator || strings.Contains(url, CosmosTableDomain) || strings.Contains(url, LegacyCosmosTableDomain) diff --git a/sdk/tables/aztable/table_service_client_test.go b/sdk/tables/aztable/table_service_client_test.go index bfba4026dd94..33dcef2a3da0 100644 --- a/sdk/tables/aztable/table_service_client_test.go +++ b/sdk/tables/aztable/table_service_client_test.go @@ -8,10 +8,13 @@ import ( "fmt" "net/http" "testing" + "time" "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/internal/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/to" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" ) @@ -127,6 +130,209 @@ func (s *tableServiceClientLiveTests) TestQueryTable() { assert.Equal(pageCount, int(top)) } +func (s *tableServiceClientLiveTests) TestGetStatistics() { + require := require.New(s.T()) + context := getTestContext(s.T().Name()) + if _, ok := cosmosTestsMap[s.T().Name()]; ok { + s.T().Skip() + } + + s.T().Skip() // TODO: need to change URL to -secondary https://docs.microsoft.com/en-us/rest/api/storageservices/get-table-service-stats + resp, err := context.client.GetStatistics(ctx, nil) + require.NoError(err) + require.NotNil(resp) +} + +func (s *tableServiceClientLiveTests) TestGetProperties() { + require := require.New(s.T()) + context := getTestContext(s.T().Name()) + if _, ok := cosmosTestsMap[s.T().Name()]; ok { + s.T().Skip() + } + + resp, err := context.client.GetProperties(ctx, nil) + require.NoError(err) + require.NotNil(resp) +} + +func (s *tableServiceClientLiveTests) TestSetLogging() { + require := require.New(s.T()) + context := getTestContext(s.T().Name()) + if _, ok := cosmosTestsMap[s.T().Name()]; ok { + s.T().Skip() + } + + logging := Logging{ + Read: to.BoolPtr(true), + Write: to.BoolPtr(true), + Delete: to.BoolPtr(true), + Version: to.StringPtr("1.0"), + RetentionPolicy: &RetentionPolicy{ + Enabled: to.BoolPtr(true), + Days: to.Int32Ptr(5), + }, + } + props := TableServiceProperties{Logging: &logging} + + resp, err := context.client.SetProperties(ctx, props, nil) + require.NoError(err) + require.NotNil(resp) + + time.Sleep(45 * time.Second) + + received, err := context.client.GetProperties(ctx, nil) + require.NoError(err) + + require.Equal(*props.Logging.Read, *received.StorageServiceProperties.Logging.Read) + require.Equal(*props.Logging.Write, *received.StorageServiceProperties.Logging.Write) + require.Equal(*props.Logging.Delete, *received.StorageServiceProperties.Logging.Delete) + require.Equal(*props.Logging.RetentionPolicy.Enabled, *received.StorageServiceProperties.Logging.RetentionPolicy.Enabled) + require.Equal(*props.Logging.RetentionPolicy.Days, *received.StorageServiceProperties.Logging.RetentionPolicy.Days) +} + +func (s *tableServiceClientLiveTests) TestSetHoursMetrics() { + require := require.New(s.T()) + context := getTestContext(s.T().Name()) + if _, ok := cosmosTestsMap[s.T().Name()]; ok { + s.T().Skip() + } + + metrics := Metrics{ + Enabled: to.BoolPtr(true), + IncludeAPIs: to.BoolPtr(true), + RetentionPolicy: &RetentionPolicy{ + Enabled: to.BoolPtr(true), + Days: to.Int32Ptr(5), + }, + Version: to.StringPtr("1.0"), + } + props := TableServiceProperties{HourMetrics: &metrics} + + resp, err := context.client.SetProperties(ctx, props, nil) + require.NoError(err) + require.NotNil(resp) + + time.Sleep(45 * time.Second) + + received, err := context.client.GetProperties(ctx, nil) + require.NoError(err) + + require.Equal(*props.HourMetrics.Enabled, *received.StorageServiceProperties.HourMetrics.Enabled) + require.Equal(*props.HourMetrics.IncludeAPIs, *received.StorageServiceProperties.HourMetrics.IncludeAPIs) + require.Equal(*props.HourMetrics.RetentionPolicy.Days, *received.StorageServiceProperties.HourMetrics.RetentionPolicy.Days) + require.Equal(*props.HourMetrics.RetentionPolicy.Enabled, *received.StorageServiceProperties.HourMetrics.RetentionPolicy.Enabled) +} + +func (s *tableServiceClientLiveTests) TestSetMinuteMetrics() { + require := require.New(s.T()) + context := getTestContext(s.T().Name()) + if _, ok := cosmosTestsMap[s.T().Name()]; ok { + s.T().Skip() + } + + metrics := Metrics{ + Enabled: to.BoolPtr(true), + IncludeAPIs: to.BoolPtr(true), + RetentionPolicy: &RetentionPolicy{ + Enabled: to.BoolPtr(true), + Days: to.Int32Ptr(5), + }, + Version: to.StringPtr("1.0"), + } + props := TableServiceProperties{MinuteMetrics: &metrics} + + resp, err := context.client.SetProperties(ctx, props, nil) + require.NoError(err) + require.NotNil(resp) + + time.Sleep(45 * time.Second) + + received, err := context.client.GetProperties(ctx, nil) + require.NoError(err) + + require.Equal(*props.MinuteMetrics.Enabled, *received.StorageServiceProperties.MinuteMetrics.Enabled) + require.Equal(*props.MinuteMetrics.IncludeAPIs, *received.StorageServiceProperties.MinuteMetrics.IncludeAPIs) + require.Equal(*props.MinuteMetrics.RetentionPolicy.Days, *received.StorageServiceProperties.MinuteMetrics.RetentionPolicy.Days) + require.Equal(*props.MinuteMetrics.RetentionPolicy.Enabled, *received.StorageServiceProperties.MinuteMetrics.RetentionPolicy.Enabled) +} + +func (s *tableServiceClientLiveTests) TestSetCors() { + require := require.New(s.T()) + context := getTestContext(s.T().Name()) + if _, ok := cosmosTestsMap[s.T().Name()]; ok { + s.T().Skip() + } + + corsRules1 := CorsRule{ + AllowedHeaders: to.StringPtr("x-ms-meta-data*"), + AllowedMethods: to.StringPtr("PUT"), + AllowedOrigins: to.StringPtr("www.xyz.com"), + ExposedHeaders: to.StringPtr("x-ms-meta-source*"), + MaxAgeInSeconds: to.Int32Ptr(500), + } + props := TableServiceProperties{Cors: []*CorsRule{&corsRules1}} + + resp, err := context.client.SetProperties(ctx, props, nil) + require.NoError(err) + require.NotNil(resp) + + time.Sleep(45 * time.Second) + + received, err := context.client.GetProperties(ctx, nil) + require.NoError(err) + + require.Equal(*props.Cors[0].AllowedHeaders, *received.StorageServiceProperties.Cors[0].AllowedHeaders) + require.Equal(*props.Cors[0].AllowedMethods, *received.StorageServiceProperties.Cors[0].AllowedMethods) + require.Equal(*props.Cors[0].AllowedOrigins, *received.StorageServiceProperties.Cors[0].AllowedOrigins) + require.Equal(*props.Cors[0].ExposedHeaders, *received.StorageServiceProperties.Cors[0].ExposedHeaders) + require.Equal(*props.Cors[0].MaxAgeInSeconds, *received.StorageServiceProperties.Cors[0].MaxAgeInSeconds) +} + +func (s *tableServiceClientLiveTests) TestSetTooManyCors() { + require := require.New(s.T()) + context := getTestContext(s.T().Name()) + if _, ok := cosmosTestsMap[s.T().Name()]; ok { + s.T().Skip() + } + + corsRules1 := CorsRule{ + AllowedHeaders: to.StringPtr("x-ms-meta-data*"), + AllowedMethods: to.StringPtr("PUT"), + AllowedOrigins: to.StringPtr("www.xyz.com"), + ExposedHeaders: to.StringPtr("x-ms-meta-source*"), + MaxAgeInSeconds: to.Int32Ptr(500), + } + props := TableServiceProperties{Cors: make([]*CorsRule, 0)} + for i := 0; i < 6; i++ { + props.Cors = append(props.Cors, &corsRules1) + } + + _, err := context.client.SetProperties(ctx, props, nil) + require.Error(err) +} + +func (s *tableServiceClientLiveTests) TestRetentionTooLong() { + require := require.New(s.T()) + context := getTestContext(s.T().Name()) + if _, ok := cosmosTestsMap[s.T().Name()]; ok { + s.T().Skip() + } + + metrics := Metrics{ + Enabled: to.BoolPtr(true), + IncludeAPIs: to.BoolPtr(true), + RetentionPolicy: &RetentionPolicy{ + Enabled: to.BoolPtr(true), + Days: to.Int32Ptr(366), + }, + Version: to.StringPtr("1.0"), + } + props := TableServiceProperties{MinuteMetrics: &metrics} + + _, err := context.client.SetProperties(ctx, props, nil) + require.Error(err) +} + func (s *tableServiceClientLiveTests) BeforeTest(suite string, test string) { // setup the test environment recordedTestSetup(s.T(), s.T().Name(), s.endpointType, s.mode) diff --git a/sdk/tables/aztable/zt_table_recorded_tests.go b/sdk/tables/aztable/zt_table_recorded_tests.go index 6f90551b0104..6d632e616f6c 100644 --- a/sdk/tables/aztable/zt_table_recorded_tests.go +++ b/sdk/tables/aztable/zt_table_recorded_tests.go @@ -45,11 +45,11 @@ var clientsMap map[string]*testContext = make(map[string]*testContext) var cosmosTestsMap map[string]bool = make(map[string]bool) func storageURI(accountName string, endpointSuffix string) string { - return "https://" + accountName + ".table." + endpointSuffix + return fmt.Sprintf("https://%v.table.%v/", accountName, endpointSuffix) } func cosmosURI(accountName string, endpointSuffix string) string { - return "https://" + accountName + ".table." + endpointSuffix + return fmt.Sprintf("https://%v.table.%v/", accountName, endpointSuffix) } func failIfNotNil(a *assert.Assertions, e error) { From e2244444773e373a0adc5bac4e3450b828760615 Mon Sep 17 00:00:00 2001 From: Sean Kane <68240067+seankane-msft@users.noreply.github.com> Date: Mon, 26 Jul 2021 15:53:54 -0400 Subject: [PATCH 28/42] [Tables] Add support for Entity struct (#15003) * adding test for custom entity * further * starting access policy * working for basic entity * adding to test * new generated code, removed one more test * AddEntity now takes []bytes * adding directive to change entity to []byte, changes to compile and be able to pass * converting Value map[string]interface{} -> []byte in convenience layer * paging works the same way now too * fixing two tests, update complex and basic test entities, need to add type hints for int64/float64 types * adding test for delete method, changed delete etag to be nil * working test for merge * Added Merge test * fix up test query simple entity * complex query test * everything except for batch tests * basic batch functionality * fixing batch mixed test * fixed last batch test * added separate file for testing batch actions * fixing query on table service client to take a pointer as well * working on annotating entities * fixing recordings * working with odata annotations * working test for using odata to annotate entity * adding options to get * working with embedded entity now too * adding to entity, peeling off prints * converted to a type * first change to add EdmEntity type * updated unmarshalling * removing two files * fix editLink * removing sample * cleaning up * removing more code * cleaning up * formatting * formatting --- sdk/tables/autorest.md | 14 - sdk/tables/aztable/byte_array_response.go | 129 +++++ sdk/tables/aztable/entity.go | 186 +++++++ sdk/tables/aztable/entity_test.go | 136 +++++ ... => TestAddAnnotatedEntity-variables.yaml} | 4 +- .../TestAddAnnotatedEntity.yaml | 174 +++++++ .../TestAddBasicEntity-variables.yaml | 5 + .../TestAddBasicEntity.yaml | 174 +++++++ .../TestAddComplexEntity-variables.yaml | 5 +- .../TestAddComplexEntity.yaml | 57 +-- .../TestAddEntity-variables.yaml | 4 +- .../TestTableClient_Cosmos/TestAddEntity.yaml | 58 +-- .../TestBatchAdd-variables.yaml | 5 +- .../TestTableClient_Cosmos/TestBatchAdd.yaml | 223 ++++---- .../TestBatchError-variables.yaml | 5 +- .../TestBatchError.yaml | 108 ++-- .../TestBatchMixed-variables.yaml | 5 +- .../TestBatchMixed.yaml | 207 ++++---- .../TestCreateTable-variables.yaml | 4 +- .../TestCreateTable.yaml | 34 +- .../TestDeleteEntity-variables.yaml | 4 +- .../TestDeleteEntity.yaml | 74 ++- .../TestEdmMarshalling-variables.yaml | 5 + .../TestEdmMarshalling.yaml | 143 ++++++ .../TestTableClient_Cosmos/TestGetEntity.yaml | 157 ------ .../TestInvalidEntity-variables.yaml | 2 +- .../TestInvalidEntity.yaml | 34 +- .../TestMergeEntity-variables.yaml | 4 +- .../TestMergeEntity.yaml | 119 ++--- .../TestQueryComplexEntity-variables.yaml | 5 +- .../TestQueryComplexEntity.yaml | 171 +++---- .../TestQuerySimpleEntity-variables.yaml | 4 +- .../TestQuerySimpleEntity.yaml | 176 +++---- .../TestServiceErrors-variables.yaml | 4 +- .../TestServiceErrors.yaml | 50 +- .../TestUpsertEntity-variables.yaml | 4 +- .../TestUpsertEntity.yaml | 116 ++--- .../TestAddAnnotatedEntity-variables.yaml | 5 + .../TestAddAnnotatedEntity.yaml | 218 ++++++++ .../TestAddBasicEntity-variables.yaml | 5 + .../TestAddBasicEntity.yaml | 218 ++++++++ .../TestAddComplexEntity-variables.yaml | 5 +- .../TestAddComplexEntity.yaml | 47 +- .../TestAddEntity-variables.yaml | 4 +- .../TestAddEntity.yaml | 48 +- .../TestBatchAdd-variables.yaml | 5 +- .../TestTableClient_Storage/TestBatchAdd.yaml | 219 ++++---- .../TestBatchError-variables.yaml | 5 +- .../TestBatchError.yaml | 94 ++-- .../TestBatchMixed-variables.yaml | 5 +- .../TestBatchMixed.yaml | 185 ++++--- .../TestCustomEntity-variables.yaml | 5 + .../TestCustomEntity.yaml | 125 +++++ .../TestDeleteEntity-variables.yaml | 4 +- .../TestDeleteEntity.yaml | 58 +-- .../TestEdmMarshalling-variables.yaml | 5 + .../TestEdmMarshalling.yaml | 179 +++++++ .../TestGetAccessPolicy-variables.yaml | 5 + .../TestGetAccessPolicy.yaml | 118 +++++ .../TestMergeEntity-variables.yaml | 4 +- .../TestMergeEntity.yaml | 93 ++-- .../TestQueryComplexEntity-variables.yaml | 5 +- .../TestQueryComplexEntity.yaml | 147 +++--- .../TestQuerySimpleEntity-variables.yaml | 4 +- .../TestQuerySimpleEntity.yaml | 154 +++--- .../TestUpsertEntity-variables.yaml | 4 +- .../TestUpsertEntity.yaml | 90 ++-- .../aztable/table_access_policy_test.go | 36 +- sdk/tables/aztable/table_batch_test.go | 176 +++++++ sdk/tables/aztable/table_client.go | 76 ++- sdk/tables/aztable/table_client_responses.go | 18 + sdk/tables/aztable/table_client_test.go | 483 ++++++------------ sdk/tables/aztable/table_pagers.go | 256 +--------- sdk/tables/aztable/table_pagers_test.go | 236 --------- .../aztable/table_service_client_test.go | 31 +- .../aztable/table_transactional_batch.go | 8 +- sdk/tables/aztable/zt_table_recorded_tests.go | 144 +++--- sdk/tables/aztable/zz_generated_connection.go | 1 - sdk/tables/aztable/zz_generated_models.go | 3 +- .../aztable/zz_generated_service_client.go | 3 +- .../aztable/zz_generated_table_client.go | 3 +- 81 files changed, 3627 insertions(+), 2519 deletions(-) create mode 100644 sdk/tables/aztable/byte_array_response.go create mode 100644 sdk/tables/aztable/entity.go create mode 100644 sdk/tables/aztable/entity_test.go rename sdk/tables/aztable/recordings/TestTableClient_Cosmos/{TestGetEntity-variables.yaml => TestAddAnnotatedEntity-variables.yaml} (56%) create mode 100644 sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddAnnotatedEntity.yaml create mode 100644 sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddBasicEntity-variables.yaml create mode 100644 sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddBasicEntity.yaml create mode 100644 sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestEdmMarshalling-variables.yaml create mode 100644 sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestEdmMarshalling.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestGetEntity.yaml create mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestAddAnnotatedEntity-variables.yaml create mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestAddAnnotatedEntity.yaml create mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestAddBasicEntity-variables.yaml create mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestAddBasicEntity.yaml create mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestCustomEntity-variables.yaml create mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestCustomEntity.yaml create mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestEdmMarshalling-variables.yaml create mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestEdmMarshalling.yaml create mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestGetAccessPolicy-variables.yaml create mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestGetAccessPolicy.yaml create mode 100644 sdk/tables/aztable/table_batch_test.go create mode 100644 sdk/tables/aztable/table_client_responses.go diff --git a/sdk/tables/autorest.md b/sdk/tables/autorest.md index 9b55f2592ae0..ca2060b6b671 100644 --- a/sdk/tables/autorest.md +++ b/sdk/tables/autorest.md @@ -13,26 +13,12 @@ license-header: MICROSOFT_MIT_NO_VERSION clear-output-folder: false output-folder: aztable file-prefix: "zz_generated_" -# namespace: aztable tag: package-2019-02 credential-scope: none use: "@autorest/go@4.0.0-preview.23" openapi-type: data-plane ``` - - - ### Go multi-api ``` yaml $(go) && $(multiapi) diff --git a/sdk/tables/aztable/byte_array_response.go b/sdk/tables/aztable/byte_array_response.go new file mode 100644 index 000000000000..cc0ee76a8916 --- /dev/null +++ b/sdk/tables/aztable/byte_array_response.go @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package aztable + +import ( + "encoding/json" + "net/http" + "time" +) + +// ByteArrayResponse converts the MapOfInterfaceResponse.Value from a map[string]interface{} to a []byte +type ByteArrayResponse struct { + // ClientRequestID contains the information returned from the x-ms-client-request-id header response. + ClientRequestID *string + + // ContentType contains the information returned from the Content-Type header response. + ContentType *string + + // Date contains the information returned from the Date header response. + Date *time.Time + + // ETag contains the information returned from the ETag header response. + ETag *string + + // PreferenceApplied contains the information returned from the Preference-Applied header response. + PreferenceApplied *string + + // RawResponse contains the underlying HTTP response. + RawResponse *http.Response + + // RequestID contains the information returned from the x-ms-request-id header response. + RequestID *string + + // The other properties of the table entity. + Value []byte + + // Version contains the information returned from the x-ms-version header response. + Version *string + + // XMSContinuationNextPartitionKey contains the information returned from the x-ms-continuation-NextPartitionKey header response. + XMSContinuationNextPartitionKey *string + + // XMSContinuationNextRowKey contains the information returned from the x-ms-continuation-NextRowKey header response. + XMSContinuationNextRowKey *string +} + +func newByteArrayResponse(m MapOfInterfaceResponse) (ByteArrayResponse, error) { + marshalledValue, err := json.Marshal(m.Value) + if err != nil { + return ByteArrayResponse{}, err + } + return ByteArrayResponse{ + ClientRequestID: m.ClientRequestID, + ContentType: m.ContentType, + Date: m.Date, + ETag: m.ETag, + PreferenceApplied: m.PreferenceApplied, + RawResponse: m.RawResponse, + RequestID: m.RequestID, + Value: marshalledValue, + Version: m.Version, + XMSContinuationNextPartitionKey: m.XMSContinuationNextPartitionKey, + XMSContinuationNextRowKey: m.XMSContinuationNextRowKey, + }, nil +} + +// TableEntityQueryByteResponseResponse is the response envelope for operations that return a TableEntityQueryResponse type. +type TableEntityQueryByteResponseResponse struct { + // ClientRequestID contains the information returned from the x-ms-client-request-id header response. + ClientRequestID *string + + // Date contains the information returned from the Date header response. + Date *time.Time + + // RawResponse contains the underlying HTTP response. + RawResponse *http.Response + + // RequestID contains the information returned from the x-ms-request-id header response. + RequestID *string + + // The properties for the table entity query response. + TableEntityQueryResponse *TableEntityQueryByteResponse + + // Version contains the information returned from the x-ms-version header response. + Version *string + + // XMSContinuationNextPartitionKey contains the information returned from the x-ms-continuation-NextPartitionKey header response. + XMSContinuationNextPartitionKey *string + + // XMSContinuationNextRowKey contains the information returned from the x-ms-continuation-NextRowKey header response. + XMSContinuationNextRowKey *string +} + +// TableEntityQueryByteResponse - The properties for the table entity query response. +type TableEntityQueryByteResponse struct { + // The metadata response of the table. + OdataMetadata *string + + // List of table entities. + Value [][]byte +} + +func castToByteResponse(resp *TableEntityQueryResponseResponse) (TableEntityQueryByteResponseResponse, error) { + marshalledValue := make([][]byte, 0) + for _, e := range resp.TableEntityQueryResponse.Value { + m, err := json.Marshal(e) + if err != nil { + return TableEntityQueryByteResponseResponse{}, err + } + marshalledValue = append(marshalledValue, m) + } + + t := TableEntityQueryByteResponse{ + OdataMetadata: resp.TableEntityQueryResponse.OdataMetadata, + Value: marshalledValue, + } + + return TableEntityQueryByteResponseResponse{ + ClientRequestID: resp.ClientRequestID, + Date: resp.Date, + RawResponse: resp.RawResponse, + RequestID: resp.RequestID, + TableEntityQueryResponse: &t, + Version: resp.Version, + XMSContinuationNextPartitionKey: resp.XMSContinuationNextPartitionKey, + XMSContinuationNextRowKey: resp.XMSContinuationNextRowKey, + }, nil +} diff --git a/sdk/tables/aztable/entity.go b/sdk/tables/aztable/entity.go new file mode 100644 index 000000000000..509cb7fd5945 --- /dev/null +++ b/sdk/tables/aztable/entity.go @@ -0,0 +1,186 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package aztable + +import ( + "encoding/base64" + "encoding/json" + "strconv" + "strings" + "time" +) + +// https://docs.microsoft.com/en-us/rest/api/storageservices/payload-format-for-table-service-operations + +type Entity struct { + PartitionKey string + RowKey string + Timestamp EdmDateTime +} + +type EdmEntity struct { + Metadata string `json:"odata.metadata"` + Id string `json:"odata.id"` + EditLink string `json:"odata.editLink"` + Type string `json:"odata.type"` + Etag string `json:"odata.etag"` + Entity + Properties map[string]interface{} // Type assert the value to 1 of these: bool, int32, float64, string, EdmDateTime, EdmBinary, EdmGuid, EdmInt64 +} + +func (e EdmEntity) MarshalJSON() ([]byte, error) { + entity := map[string]interface{}{} + entity["PartitionKey"], entity["RowKey"] = e.PartitionKey, e.RowKey + + for propName, propValue := range e.Properties { + entity[propName] = propValue + edmType := "" + switch propValue.(type) { + case EdmDateTime: + edmType = "Edm.DateTime" + case EdmBinary: + edmType = "Edm.Binary" + case EdmGuid: + edmType = "Edm.Guid" + case EdmInt64: + edmType = "Edm.Int64" + } + if edmType != "" { + entity[propName+"@odata.type"] = edmType + } + } + return json.Marshal(entity) +} + +func (e *EdmEntity) UnmarshalJSON(data []byte) (err error) { + var entity map[string]json.RawMessage + err = json.Unmarshal(data, &entity) + if err != nil { + return + } + e.Properties = map[string]interface{}{} + for propName, propRawValue := range entity { + if strings.Contains(propName, "@odata.type") { + continue // Skip the @odata.type properties; we look them up explicitly later + } + switch propName { + // Look for EdmEntity's specific fields first + case "odata.metadata": + err = json.Unmarshal(propRawValue, &e.Metadata) + case "odata.id": + err = json.Unmarshal(propRawValue, &e.Id) + case "odata.editLink": + err = json.Unmarshal(propRawValue, &e.EditLink) + case "odata.type": + err = json.Unmarshal(propRawValue, &e.Type) + case "odata.etag": + err = json.Unmarshal(propRawValue, &e.Etag) + case "PartitionKey": + err = json.Unmarshal(propRawValue, &e.PartitionKey) + case "RowKey": + err = json.Unmarshal(propRawValue, &e.RowKey) + case "Timestamp": + err = json.Unmarshal(propRawValue, &e.Timestamp) + default: + // Try to find the EDM type for this property & get it's value + var propertyEdmTypeValue string = "" + if propertyEdmTypeRawValue, ok := entity[propName+"@odata.type"]; ok { + if err = json.Unmarshal(propertyEdmTypeRawValue, &propertyEdmTypeValue); err != nil { + return + } + } + + var propValue interface{} = nil + switch propertyEdmTypeValue { + case "": // "@odata.type" doesn't exist, infer the EDM type from the JSON type + // Try to unmarshal this property value as an int32 first + var i32 int32 + if err = json.Unmarshal(propRawValue, &i32); err == nil { + propValue = i32 + } else { // Failed to parse number as an int32; unmarshal as usual + err = json.Unmarshal(propRawValue, &propValue) + } + case "Edm.DateTime": + var v EdmDateTime + err = json.Unmarshal(propRawValue, &v) + propValue = v + case "Edm.Binary": + var v EdmBinary + err = json.Unmarshal(propRawValue, &v) + propValue = v + case "Edm.Guid": + var v EdmGuid + err = json.Unmarshal(propRawValue, &v) + propValue = v + case "Edm.Int64": + var v EdmInt64 + err = json.Unmarshal(propRawValue, &v) + propValue = v + } + if err != nil { + return + } + e.Properties[propName] = propValue + } + } + return +} + +type EdmBinary []byte + +func (e EdmBinary) MarshalText() ([]byte, error) { + return ([]byte)(base64.StdEncoding.EncodeToString(([]byte)(e))), nil +} + +func (e *EdmBinary) UnmarshalText(data []byte) error { + decoded, err := base64.StdEncoding.DecodeString(string(data)) + if err != nil { + return err + } + *e = EdmBinary(decoded) + return nil +} + +type EdmInt64 int64 + +func (e EdmInt64) MarshalText() ([]byte, error) { + return []byte(strconv.FormatInt(int64(e), 10)), nil +} + +func (e *EdmInt64) UnmarshalText(data []byte) error { + i, err := strconv.ParseInt(string(data), 10, 64) + if err != nil { + return err + } + *e = EdmInt64(i) + return nil +} + +type EdmGuid string + +func (e EdmGuid) MarshalText() ([]byte, error) { + return ([]byte)(e), nil +} + +func (e *EdmGuid) UnmarshalText(data []byte) error { + *e = EdmGuid(string(data)) + return nil +} + +type EdmDateTime time.Time + +const rfc3339 = "2006-01-02T15:04:05.9999999Z" + +func (e EdmDateTime) MarshalText() ([]byte, error) { + return ([]byte)(time.Time(e).Format(rfc3339)), nil +} + +func (e *EdmDateTime) UnmarshalText(data []byte) error { + t, err := time.Parse(rfc3339, string(data)) + if err != nil { + return err + } + *e = EdmDateTime(t) + return nil +} diff --git a/sdk/tables/aztable/entity_test.go b/sdk/tables/aztable/entity_test.go new file mode 100644 index 000000000000..cf247a50bc42 --- /dev/null +++ b/sdk/tables/aztable/entity_test.go @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package aztable + +import ( + "encoding/json" + "fmt" + "time" + + "github.com/stretchr/testify/require" +) + +func (s *tableClientLiveTests) TestAddBasicEntity() { + require := require.New(s.T()) + client, delete := s.init(true) + defer delete() + + basicEntity := basicTestEntity{ + Entity: Entity{ + PartitionKey: "pk001", + RowKey: "rk001", + }, + Integer: 10, + String: "abcdef", + Bool: true, + } + + marshalled, err := json.Marshal(basicEntity) + require.Nil(err) + _, err = client.AddEntity(ctx, marshalled) + require.Nil(err) + + resp, err := client.GetEntity(ctx, "pk001", "rk001", nil) + require.Nil(err) + + receivedEntity := basicTestEntity{} + err = json.Unmarshal(resp.Value, &receivedEntity) + require.Nil(err) + require.Equal(receivedEntity.PartitionKey, "pk001") + require.Equal(receivedEntity.RowKey, "rk001") + + queryString := "PartitionKey eq 'pk001'" + queryOptions := QueryOptions{Filter: &queryString} + pager := client.Query(&queryOptions) + count := 0 + for pager.NextPage(ctx) { + resp := pager.PageResponse() + for _, e := range resp.TableEntityQueryResponse.Value { + err = json.Unmarshal(e, &receivedEntity) + require.NoError(err) + require.Equal(receivedEntity.PartitionKey, "pk001") + require.Equal(receivedEntity.RowKey, "rk001") + count += 1 + } + } + + require.Equal(count, 1) +} + +func createEdmEntity(count int, pk string) EdmEntity { + return EdmEntity{ + Entity: Entity{ + PartitionKey: pk, + RowKey: fmt.Sprint(count), + }, + Properties: map[string]interface{}{ + "Bool": false, + "Int32": int32(1234), + "Int64": EdmInt64(123456789012), + "Double": 1234.1234, + "String": "test", + "Guid": EdmGuid("4185404a-5818-48c3-b9be-f217df0dba6f"), + "DateTime": EdmDateTime(time.Date(2013, time.August, 02, 17, 37, 43, 9004348, time.UTC)), + "Binary": EdmBinary("SomeBinary"), + }, + } +} + +func requireSameDateTime(r *require.Assertions, time1, time2 interface{}) { + t1 := time.Time(time1.(EdmDateTime)) + t2 := time.Time(time2.(EdmDateTime)) + r.Equal(t1.Year(), t2.Year()) + r.Equal(t1.Month(), t2.Month()) + r.Equal(t1.Day(), t2.Day()) + r.Equal(t1.Hour(), t2.Hour()) + r.Equal(t1.Minute(), t2.Minute()) + r.Equal(t1.Second(), t2.Second()) + z1, _ := t1.Zone() + z2, _ := t2.Zone() + r.Equal(z1, z2) +} + +func (s *tableClientLiveTests) TestEdmMarshalling() { + require := require.New(s.T()) + client, delete := s.init(true) + defer delete() + + edmEntity := createEdmEntity(1, "partition") + + marshalled, err := json.Marshal(edmEntity) + require.Nil(err) + _, err = client.AddEntity(ctx, marshalled) + require.Nil(err) + + fullMetadata := &QueryOptions{ + Format: OdataMetadataFormatApplicationJSONOdataFullmetadata.ToPtr(), + } + + resp, err := client.GetEntity(ctx, "partition", fmt.Sprint(1), fullMetadata) + require.Nil(err) + var receivedEntity EdmEntity + err = json.Unmarshal(resp.Value, &receivedEntity) + require.Nil(err) + + require.Equal(edmEntity.PartitionKey, receivedEntity.PartitionKey) + require.Equal(edmEntity.RowKey, receivedEntity.RowKey) + require.Equal(edmEntity.Properties["Bool"], receivedEntity.Properties["Bool"]) + require.Equal(edmEntity.Properties["Int32"], receivedEntity.Properties["Int32"]) + require.Equal(edmEntity.Properties["Int64"], receivedEntity.Properties["Int64"]) + require.Equal(edmEntity.Properties["Double"], receivedEntity.Properties["Double"]) + require.Equal(edmEntity.Properties["String"], receivedEntity.Properties["String"]) + require.Equal(edmEntity.Properties["Guid"], receivedEntity.Properties["Guid"]) + require.Equal(edmEntity.Properties["Binary"], receivedEntity.Properties["Binary"]) + requireSameDateTime(require, edmEntity.Properties["DateTime"], receivedEntity.Properties["DateTime"]) + + // Unmarshal to raw json + var received2 map[string]json.RawMessage + err = json.Unmarshal(resp.Value, &received2) + require.Nil(err) + + // Unmarshal to plain map + var received3 map[string]interface{} + err = json.Unmarshal(resp.Value, &received3) + require.Nil(err) +} diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestGetEntity-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddAnnotatedEntity-variables.yaml similarity index 56% rename from sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestGetEntity-variables.yaml rename to sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddAnnotatedEntity-variables.yaml index 4caa11ec87e2..efec267f5948 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestGetEntity-variables.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddAnnotatedEntity-variables.yaml @@ -1,5 +1,5 @@ --- COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com -TABLES_COSMOS_ACCOUNT_NAME: chrisstablesprim +TABLES_COSMOS_ACCOUNT_NAME: seankaneprim TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== -randomSeed: "1621634379" +randomSeed: "1626389924" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddAnnotatedEntity.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddAnnotatedEntity.yaml new file mode 100644 index 000000000000..fd3217ac9531 --- /dev/null +++ b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddAnnotatedEntity.yaml @@ -0,0 +1,174 @@ +--- +version: 1 +interactions: +- request: + body: '{"TableName":"gotablepallqj0201avk"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "36" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Thu, 15 Jul 2021 22:58:44 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.cosmos.azure.com/Tables + method: POST + response: + body: '{"TableName":"gotablepallqj0201avk","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' + headers: + Content-Type: + - application/json;odata=minimalmetadata + Date: + - Thu, 15 Jul 2021 22:58:44 GMT + Etag: + - W/"datetime'2021-07-15T22%3A58%3A45.2678664Z'" + Location: + - https://seankaneprim.table.cosmos.azure.com/Tables('gotablepallqj0201avk') + X-Ms-Request-Id: + - 3404ad65-df83-4669-a67e-d92d53a646a6 + status: 201 Created + code: 201 + duration: "" +- request: + body: '{"Binary":"YmluYXJ5","Binary@odata.type":"Edm.Binary","Bool":true,"Bool@odata.type":"Edm.Boolean","DateType":"2021-04-01T01:01:01.000000001Z","DateType@odata.type":"Edm.DateTime","FloatType":8589934592,"FloatType@odata.type":"Edm.Double","PartitionKey":"partition","RowKey":"1","Small":10,"Small@odata.type":"Edm.Int32","Stringy":"somestring","Stringy@odata.type":"Edm.String","Timestamp":"0001-01-01T00:00:00Z","large":"1125899906842624","large@odata.type":"Edm.Int64"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "470" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + Prefer: + - return-no-content + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Thu, 15 Jul 2021 22:58:45 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.cosmos.azure.com/gotablepallqj0201avk + method: POST + response: + body: "" + headers: + Date: + - Thu, 15 Jul 2021 22:58:45 GMT + Etag: + - W/"datetime'2021-07-15T22%3A58%3A45.8681352Z'" + Location: + - https://seankaneprim.table.cosmos.azure.com/gotablepallqj0201avk(PartitionKey='partition',RowKey='1') + Preference-Applied: + - return-no-content + X-Ms-Request-Id: + - a6db774e-808f-4f3e-b391-749ca5c2f3d8 + status: 204 No Content + code: 204 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Thu, 15 Jul 2021 22:58:45 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.cosmos.azure.com/gotablepallqj0201avk(PartitionKey='partition',RowKey='1')?%24format=application%2Fjson%3Bodata%3Dfullmetadata + method: GET + response: + body: '{"odata.metadata":"https://seankaneprim.table.cosmos.azure.com/gotablepallqj0201avk/$metadata#gotablepallqj0201avk/@Element","odata.etag":"W/\"datetime''2021-07-15T22%3A58%3A45.8681352Z''\"","Binary@odata.type":"Edm.Binary","Binary":"YmluYXJ5","Bool":true,"DateType@odata.type":"Edm.DateTime","DateType":"2021-04-01T01:01:01.0000000Z","FloatType":8589934592.0,"PartitionKey":"partition","RowKey":"1","Small":10,"Stringy":"somestring","large@odata.type":"Edm.Int64","large":"1125899906842624","Timestamp":"2021-07-15T22:58:45.8681352Z"}' + headers: + Content-Type: + - application/json;odata=minimalmetadata + Date: + - Thu, 15 Jul 2021 22:58:45 GMT + Etag: + - W/"datetime'2021-07-15T22%3A58%3A45.8681352Z'" + X-Ms-Request-Id: + - 24c82b14-f148-47b0-b6ef-c6b7523a8e5b + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Thu, 15 Jul 2021 22:58:46 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.cosmos.azure.com/gotablepallqj0201avk()?%24filter=PartitionKey+eq+%27partition%27 + method: GET + response: + body: '{"value":[{"odata.etag":"W/\"datetime''2021-07-15T22%3A58%3A45.8681352Z''\"","Binary@odata.type":"Edm.Binary","Binary":"YmluYXJ5","Bool":true,"DateType@odata.type":"Edm.DateTime","DateType":"2021-04-01T01:01:01.0000000Z","FloatType":8589934592.0,"PartitionKey":"partition","RowKey":"1","Small":10,"Stringy":"somestring","large@odata.type":"Edm.Int64","large":"1125899906842624","Timestamp":"2021-07-15T22:58:45.8681352Z"}],"odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#gotablepallqj0201avk"}' + headers: + Content-Type: + - application/json;odata=minimalmetadata + Date: + - Thu, 15 Jul 2021 22:58:45 GMT + X-Ms-Request-Id: + - 84a2c26f-242e-4766-93f7-a4d0ea6066e2 + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Thu, 15 Jul 2021 22:58:46 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.cosmos.azure.com/Tables('gotablepallqj0201avk') + method: DELETE + response: + body: "" + headers: + Date: + - Thu, 15 Jul 2021 22:58:45 GMT + X-Ms-Request-Id: + - 89a2a4a0-0431-420b-849a-ba02de9e4846 + status: 204 No Content + code: 204 + duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddBasicEntity-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddBasicEntity-variables.yaml new file mode 100644 index 000000000000..c5b43dc020c5 --- /dev/null +++ b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddBasicEntity-variables.yaml @@ -0,0 +1,5 @@ +--- +COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com +TABLES_COSMOS_ACCOUNT_NAME: seankaneprim +TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== +randomSeed: "1626385589" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddBasicEntity.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddBasicEntity.yaml new file mode 100644 index 000000000000..76ca94d73a1d --- /dev/null +++ b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddBasicEntity.yaml @@ -0,0 +1,174 @@ +--- +version: 1 +interactions: +- request: + body: '{"TableName":"gotablebl2ap6whow6mv"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "36" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Thu, 15 Jul 2021 21:46:29 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.cosmos.azure.com/Tables + method: POST + response: + body: '{"TableName":"gotablebl2ap6whow6mv","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' + headers: + Content-Type: + - application/json;odata=minimalmetadata + Date: + - Thu, 15 Jul 2021 21:46:28 GMT + Etag: + - W/"datetime'2021-07-15T21%3A46%3A28.6970888Z'" + Location: + - https://seankaneprim.table.cosmos.azure.com/Tables('gotablebl2ap6whow6mv') + X-Ms-Request-Id: + - a63137b5-a058-4c62-9cf7-3889816a1196 + status: 201 Created + code: 201 + duration: "" +- request: + body: '{"Bool":true,"Integer":10,"PartitionKey":"pk001","RowKey":"rk001","String":"abcdef","Timestamp":"0001-01-01T00:00:00Z"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "119" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + Prefer: + - return-no-content + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Thu, 15 Jul 2021 21:46:30 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.cosmos.azure.com/gotablebl2ap6whow6mv + method: POST + response: + body: "" + headers: + Date: + - Thu, 15 Jul 2021 21:46:28 GMT + Etag: + - W/"datetime'2021-07-15T21%3A46%3A29.5142408Z'" + Location: + - https://seankaneprim.table.cosmos.azure.com/gotablebl2ap6whow6mv(PartitionKey='pk001',RowKey='rk001') + Preference-Applied: + - return-no-content + X-Ms-Request-Id: + - 53a948f0-da61-4e8c-bfa9-2e34faaff714 + status: 204 No Content + code: 204 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Thu, 15 Jul 2021 21:46:30 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.cosmos.azure.com/gotablebl2ap6whow6mv(PartitionKey='pk001',RowKey='rk001') + method: GET + response: + body: '{"odata.metadata":"https://seankaneprim.table.cosmos.azure.com/gotablebl2ap6whow6mv/$metadata#gotablebl2ap6whow6mv/@Element","odata.etag":"W/\"datetime''2021-07-15T21%3A46%3A29.5142408Z''\"","Bool":true,"Integer":10,"PartitionKey":"pk001","RowKey":"rk001","String":"abcdef","Timestamp":"2021-07-15T21:46:29.5142408Z"}' + headers: + Content-Type: + - application/json;odata=minimalmetadata + Date: + - Thu, 15 Jul 2021 21:46:28 GMT + Etag: + - W/"datetime'2021-07-15T21%3A46%3A29.5142408Z'" + X-Ms-Request-Id: + - b54a013c-816b-4546-8a60-5288a2abfafb + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Thu, 15 Jul 2021 21:46:30 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.cosmos.azure.com/gotablebl2ap6whow6mv()?%24filter=PartitionKey+eq+%27pk001%27 + method: GET + response: + body: '{"value":[{"odata.etag":"W/\"datetime''2021-07-15T21%3A46%3A29.5142408Z''\"","Bool":true,"Integer":10,"PartitionKey":"pk001","RowKey":"rk001","String":"abcdef","Timestamp":"2021-07-15T21:46:29.5142408Z"}],"odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#gotablebl2ap6whow6mv"}' + headers: + Content-Type: + - application/json;odata=minimalmetadata + Date: + - Thu, 15 Jul 2021 21:46:28 GMT + X-Ms-Request-Id: + - a3244a69-0715-4c4f-8b35-bc3b49dcbc1c + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Thu, 15 Jul 2021 21:46:30 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.cosmos.azure.com/Tables('gotablebl2ap6whow6mv') + method: DELETE + response: + body: "" + headers: + Date: + - Thu, 15 Jul 2021 21:46:29 GMT + X-Ms-Request-Id: + - 75dc3bcf-da16-4f8d-bed2-eff9981af61c + status: 204 No Content + code: 204 + duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddComplexEntity-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddComplexEntity-variables.yaml index a5295bc78865..4d621b700683 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddComplexEntity-variables.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddComplexEntity-variables.yaml @@ -1,6 +1,5 @@ --- COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com -TABLES_COSMOS_ACCOUNT_NAME: chrisstablesprim +TABLES_COSMOS_ACCOUNT_NAME: seankaneprim TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== -now: "2021-04-10T19:18:39.9706889-05:00" -randomSeed: "1618100318" +randomSeed: "1626385591" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddComplexEntity.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddComplexEntity.yaml index a90bdd2b73da..911e1d284fbf 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddComplexEntity.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddComplexEntity.yaml @@ -2,7 +2,7 @@ version: 1 interactions: - request: - body: '{"TableName":"gotablexiw8zfw9mws0q"}' + body: '{"TableName":"gotable7yilahvs8t936"}' form: {} headers: Accept: @@ -16,35 +16,32 @@ interactions: Dataserviceversion: - "3.0" User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Sun, 11 Apr 2021 00:18:38 GMT + - Thu, 15 Jul 2021 21:46:31 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.cosmos.azure.com/Tables + url: https://seankaneprim.table.cosmos.azure.com/Tables method: POST response: - body: '{"TableName":"gotablexiw8zfw9mws0q","odata.metadata":"https://chrisstablesprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' + body: '{"TableName":"gotable7yilahvs8t936","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' headers: Content-Type: - application/json;odata=minimalmetadata Date: - - Sun, 11 Apr 2021 00:18:39 GMT + - Thu, 15 Jul 2021 21:46:30 GMT Etag: - - W/"datetime'2021-04-11T00%3A18%3A39.0866952Z'" + - W/"datetime'2021-07-15T21%3A46%3A30.2801928Z'" Location: - - https://chrisstablesprim.table.cosmos.azure.com/Tables('gotablexiw8zfw9mws0q') - Server: - - Microsoft-HTTPAPI/2.0 + - https://seankaneprim.table.cosmos.azure.com/Tables('gotable7yilahvs8t936') X-Ms-Request-Id: - - 8d38468e-c994-404d-90cc-925db534f55f + - bb09c7ae-a419-404c-9f5d-991fb636b92c status: 201 Created code: 201 duration: "" - request: - body: '{"PartitionKey":"partition","RowKey":"row","SomeBinaryProperty":"c29tZSBieXRlcw==","SomeBinaryProperty@odata.type":"Edm.Binary","SomeDateProperty":"2021-04-11T00:18:39.9706889Z","SomeDateProperty@odata.type":"Edm.DateTime","SomeDoubleProperty0":1,"SomeDoubleProperty0@odata.type":"Edm.Double","SomeDoubleProperty1":1.2345,"SomeDoubleProperty1@odata.type":"Edm.Double","SomeGuidProperty":"4346b1a2-6141-483a-779b-1332da28b7d5","SomeGuidProperty@odata.type":"Edm.Guid","SomeInt64Property":"9223372036854775807","SomeInt64Property@odata.type":"Edm.Int64","SomeIntProperty":42,"SomePtrStringProperty":"some - pointer to string","SomeStringProperty":"some string"}' + body: '{"Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":1,"PartitionKey":"partition","RowKey":"1","String":"someString","Timestamp":"0001-01-01T00:00:00Z"}' form: {} headers: Accept: @@ -52,7 +49,7 @@ interactions: Authorization: - sanitized Content-Length: - - "657" + - "194" Content-Type: - application/json Dataserviceversion: @@ -60,31 +57,27 @@ interactions: Prefer: - return-no-content User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Sun, 11 Apr 2021 00:18:39 GMT + - Thu, 15 Jul 2021 21:46:32 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.cosmos.azure.com/gotablexiw8zfw9mws0q + url: https://seankaneprim.table.cosmos.azure.com/gotable7yilahvs8t936 method: POST response: body: "" headers: - Content-Length: - - "0" Date: - - Sun, 11 Apr 2021 00:18:39 GMT + - Thu, 15 Jul 2021 21:46:30 GMT Etag: - - W/"datetime'2021-04-11T00%3A18%3A39.7189128Z'" + - W/"datetime'2021-07-15T21%3A46%3A31.0695944Z'" Location: - - https://chrisstablesprim.table.cosmos.azure.com/gotablexiw8zfw9mws0q(PartitionKey='partition',RowKey='row') + - https://seankaneprim.table.cosmos.azure.com/gotable7yilahvs8t936(PartitionKey='partition',RowKey='1') Preference-Applied: - return-no-content - Server: - - Microsoft-HTTPAPI/2.0 X-Ms-Request-Id: - - cec68903-00ae-4306-ae0a-5200c5f8bb60 + - 6c95cb60-29ef-4e61-8e49-6dffff0f3350 status: 204 No Content code: 204 duration: "" @@ -97,25 +90,21 @@ interactions: Authorization: - sanitized User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Sun, 11 Apr 2021 00:18:40 GMT + - Thu, 15 Jul 2021 21:46:32 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.cosmos.azure.com/Tables('gotablexiw8zfw9mws0q') + url: https://seankaneprim.table.cosmos.azure.com/Tables('gotable7yilahvs8t936') method: DELETE response: body: "" headers: - Content-Length: - - "0" Date: - - Sun, 11 Apr 2021 00:18:39 GMT - Server: - - Microsoft-HTTPAPI/2.0 + - Thu, 15 Jul 2021 21:46:30 GMT X-Ms-Request-Id: - - ef2e97eb-017c-458b-be6d-9c130a33dfa6 + - c4afe428-9568-453b-8fde-6cf596df1317 status: 204 No Content code: 204 duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddEntity-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddEntity-variables.yaml index dd3226b5e15b..b70ba076bf9d 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddEntity-variables.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddEntity-variables.yaml @@ -1,5 +1,5 @@ --- COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com -TABLES_COSMOS_ACCOUNT_NAME: chrisstablesprim +TABLES_COSMOS_ACCOUNT_NAME: seankaneprim TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== -randomSeed: "1617580856" +randomSeed: "1626385592" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddEntity.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddEntity.yaml index f8993d0f4f77..31b78fcf9b21 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddEntity.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddEntity.yaml @@ -2,7 +2,7 @@ version: 1 interactions: - request: - body: '{"TableName":"gotable7ws4xms1mzf9z"}' + body: '{"TableName":"gotablersiz9waigs6h9"}' form: {} headers: Accept: @@ -16,35 +16,33 @@ interactions: Dataserviceversion: - "3.0" User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Mon, 05 Apr 2021 00:00:56 GMT + - Thu, 15 Jul 2021 21:46:32 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.cosmos.azure.com/Tables + url: https://seankaneprim.table.cosmos.azure.com/Tables method: POST response: - body: '{"TableName":"gotable7ws4xms1mzf9z","odata.metadata":"https://chrisstablesprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' + body: '{"TableName":"gotablersiz9waigs6h9","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' headers: Content-Type: - application/json;odata=minimalmetadata Date: - - Mon, 05 Apr 2021 00:00:56 GMT + - Thu, 15 Jul 2021 21:46:31 GMT Etag: - - W/"datetime'2021-04-05T00%3A00%3A56.5521416Z'" + - W/"datetime'2021-07-15T21%3A46%3A31.5985928Z'" Location: - - https://chrisstablesprim.table.cosmos.azure.com/Tables('gotable7ws4xms1mzf9z') - Server: - - Microsoft-HTTPAPI/2.0 + - https://seankaneprim.table.cosmos.azure.com/Tables('gotablersiz9waigs6h9') X-Ms-Request-Id: - - 9ca87b9a-5e66-4ec1-97d0-0ea03fd04375 + - e6b60e7d-aec5-490b-a551-ea75d7e9488e status: 201 Created code: 201 duration: "" - request: - body: '{"BoolProp":true,"IntProp":1,"PartitionKey":"partition","RowKey":"1","StringProp":"some - string 1"}' + body: '{"Bool":true,"Integer":1,"PartitionKey":"partition","RowKey":"1","String":"some + string 1","Timestamp":"0001-01-01T00:00:00Z"}' form: {} headers: Accept: @@ -52,7 +50,7 @@ interactions: Authorization: - sanitized Content-Length: - - "98" + - "125" Content-Type: - application/json Dataserviceversion: @@ -60,31 +58,27 @@ interactions: Prefer: - return-no-content User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Mon, 05 Apr 2021 00:00:57 GMT + - Thu, 15 Jul 2021 21:46:33 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.cosmos.azure.com/gotable7ws4xms1mzf9z + url: https://seankaneprim.table.cosmos.azure.com/gotablersiz9waigs6h9 method: POST response: body: "" headers: - Content-Length: - - "0" Date: - - Mon, 05 Apr 2021 00:00:56 GMT + - Thu, 15 Jul 2021 21:46:31 GMT Etag: - - W/"datetime'2021-04-05T00%3A00%3A57.0277896Z'" + - W/"datetime'2021-07-15T21%3A46%3A32.4243464Z'" Location: - - https://chrisstablesprim.table.cosmos.azure.com/gotable7ws4xms1mzf9z(PartitionKey='partition',RowKey='1') + - https://seankaneprim.table.cosmos.azure.com/gotablersiz9waigs6h9(PartitionKey='partition',RowKey='1') Preference-Applied: - return-no-content - Server: - - Microsoft-HTTPAPI/2.0 X-Ms-Request-Id: - - 57a01ccb-9f82-4e3c-a2be-601d4ed96b9d + - 2fcc82d0-5505-44fe-8724-2cd3eb64c98f status: 204 No Content code: 204 duration: "" @@ -97,25 +91,21 @@ interactions: Authorization: - sanitized User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Mon, 05 Apr 2021 00:00:57 GMT + - Thu, 15 Jul 2021 21:46:33 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.cosmos.azure.com/Tables('gotable7ws4xms1mzf9z') + url: https://seankaneprim.table.cosmos.azure.com/Tables('gotablersiz9waigs6h9') method: DELETE response: body: "" headers: - Content-Length: - - "0" Date: - - Mon, 05 Apr 2021 00:00:56 GMT - Server: - - Microsoft-HTTPAPI/2.0 + - Thu, 15 Jul 2021 21:46:31 GMT X-Ms-Request-Id: - - a515445a-2616-4e51-a4ea-bf4a788ad138 + - d9e09a7f-27ae-4253-8e93-55a78b78ba6d status: 204 No Content code: 204 duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchAdd-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchAdd-variables.yaml index 1d74b5b453b7..ed2ac535e948 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchAdd-variables.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchAdd-variables.yaml @@ -1,6 +1,5 @@ --- COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com -TABLES_COSMOS_ACCOUNT_NAME: chrisstablesprim +TABLES_COSMOS_ACCOUNT_NAME: seankaneprim TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== -now: "2021-05-18T10:39:59.9902777-05:00" -randomSeed: "1621352398" +randomSeed: "1626385593" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchAdd.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchAdd.yaml index 633e16370940..1f2c41363877 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchAdd.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchAdd.yaml @@ -2,7 +2,7 @@ version: 1 interactions: - request: - body: '{"TableName":"gotable9m3drbgv2znqx"}' + body: '{"TableName":"gotableou5gp39mzhtrm"}' form: {} headers: Accept: @@ -16,85 +16,73 @@ interactions: Dataserviceversion: - "3.0" User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Tue, 18 May 2021 15:39:58 GMT + - Thu, 15 Jul 2021 21:46:33 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.cosmos.azure.com/Tables + url: https://seankaneprim.table.cosmos.azure.com/Tables method: POST response: - body: '{"TableName":"gotable9m3drbgv2znqx","odata.metadata":"https://chrisstablesprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' + body: '{"TableName":"gotableou5gp39mzhtrm","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' headers: Content-Type: - application/json;odata=minimalmetadata Date: - - Tue, 18 May 2021 15:40:00 GMT + - Thu, 15 Jul 2021 21:46:32 GMT Etag: - - W/"datetime'2021-05-18T15%3A40%3A00.0075784Z'" + - W/"datetime'2021-07-15T21%3A46%3A32.9673736Z'" Location: - - https://chrisstablesprim.table.cosmos.azure.com/Tables('gotable9m3drbgv2znqx') - Server: - - Microsoft-HTTPAPI/2.0 + - https://seankaneprim.table.cosmos.azure.com/Tables('gotableou5gp39mzhtrm') X-Ms-Request-Id: - - 85c6b886-4404-4b2e-865e-266f59837b2a - status: 201 Ok + - f2758fe6-476a-48f0-8012-c9005d4e08b8 + status: 201 Created code: 201 duration: "" - request: - body: "--batch_bae5ce88-edc3-4b25-7b33-be5c7454aefc\r\nContent-Type: multipart/mixed; - boundary=changeset_dd23acc5-a2fb-419d-5006-1de1ca035a9f\r\n\r\n--changeset_dd23acc5-a2fb-419d-5006-1de1ca035a9f\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://chrisstablesprim.table.cosmos.azure.com/gotable9m3drbgv2znqx?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + body: "--batch_93140bc0-6825-4bb0-42e6-8b82f5540c8d\r\nContent-Type: multipart/mixed; + boundary=changeset_9590c14c-3aa5-4815-72f4-da7c90c37e9e\r\n\r\n--changeset_9590c14c-3aa5-4815-72f4-da7c90c37e9e\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotableou5gp39mzhtrm?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 663\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"BoolProp\":true,\"IntProp\":1,\"PartitionKey\":\"partition\",\"RowKey\":\"1\",\"SomeBinaryProperty\":\"c29tZSBieXRlcw==\",\"SomeBinaryProperty@odata.type\":\"Edm.Binary\",\"SomeDateProperty\":\"2021-05-18T15:39:59.9902777Z\",\"SomeDateProperty@odata.type\":\"Edm.DateTime\",\"SomeDoubleProperty0\":1,\"SomeDoubleProperty0@odata.type\":\"Edm.Double\",\"SomeDoubleProperty1\":1.2345,\"SomeDoubleProperty1@odata.type\":\"Edm.Double\",\"SomeGuidProperty\":\"1fb643ec-1e6e-4fc0-5606-be23d98cef50\",\"SomeGuidProperty@odata.type\":\"Edm.Guid\",\"SomeInt64Property\":\"9223372036854775807\",\"SomeInt64Property@odata.type\":\"Edm.Int64\",\"SomeIntProperty\":42,\"SomeStringProperty\":\"some - string\",\"StringProp\":\"some string 1\"}\r\n--changeset_dd23acc5-a2fb-419d-5006-1de1ca035a9f\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://chrisstablesprim.table.cosmos.azure.com/gotable9m3drbgv2znqx?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + 260\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Float@odata.type\":\"Edm.Double\",\"Integer\":1,\"Integer@odata.type\":\"Edm.Double\",\"PartitionKey\":\"partition\",\"RowKey\":\"1\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_9590c14c-3aa5-4815-72f4-da7c90c37e9e\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotableou5gp39mzhtrm?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 663\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"BoolProp\":true,\"IntProp\":2,\"PartitionKey\":\"partition\",\"RowKey\":\"2\",\"SomeBinaryProperty\":\"c29tZSBieXRlcw==\",\"SomeBinaryProperty@odata.type\":\"Edm.Binary\",\"SomeDateProperty\":\"2021-05-18T15:39:59.9902777Z\",\"SomeDateProperty@odata.type\":\"Edm.DateTime\",\"SomeDoubleProperty0\":1,\"SomeDoubleProperty0@odata.type\":\"Edm.Double\",\"SomeDoubleProperty1\":1.2345,\"SomeDoubleProperty1@odata.type\":\"Edm.Double\",\"SomeGuidProperty\":\"24d3bd3d-3e02-4411-580f-5a3a8146d1ed\",\"SomeGuidProperty@odata.type\":\"Edm.Guid\",\"SomeInt64Property\":\"9223372036854775807\",\"SomeInt64Property@odata.type\":\"Edm.Int64\",\"SomeIntProperty\":42,\"SomeStringProperty\":\"some - string\",\"StringProp\":\"some string 2\"}\r\n--changeset_dd23acc5-a2fb-419d-5006-1de1ca035a9f\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://chrisstablesprim.table.cosmos.azure.com/gotable9m3drbgv2znqx?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + 260\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Float@odata.type\":\"Edm.Double\",\"Integer\":2,\"Integer@odata.type\":\"Edm.Double\",\"PartitionKey\":\"partition\",\"RowKey\":\"2\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_9590c14c-3aa5-4815-72f4-da7c90c37e9e\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotableou5gp39mzhtrm?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 663\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"BoolProp\":true,\"IntProp\":3,\"PartitionKey\":\"partition\",\"RowKey\":\"3\",\"SomeBinaryProperty\":\"c29tZSBieXRlcw==\",\"SomeBinaryProperty@odata.type\":\"Edm.Binary\",\"SomeDateProperty\":\"2021-05-18T15:39:59.9902777Z\",\"SomeDateProperty@odata.type\":\"Edm.DateTime\",\"SomeDoubleProperty0\":1,\"SomeDoubleProperty0@odata.type\":\"Edm.Double\",\"SomeDoubleProperty1\":1.2345,\"SomeDoubleProperty1@odata.type\":\"Edm.Double\",\"SomeGuidProperty\":\"84d4e62a-f422-4b27-6dc2-6c322e138b6d\",\"SomeGuidProperty@odata.type\":\"Edm.Guid\",\"SomeInt64Property\":\"9223372036854775807\",\"SomeInt64Property@odata.type\":\"Edm.Int64\",\"SomeIntProperty\":42,\"SomeStringProperty\":\"some - string\",\"StringProp\":\"some string 3\"}\r\n--changeset_dd23acc5-a2fb-419d-5006-1de1ca035a9f\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://chrisstablesprim.table.cosmos.azure.com/gotable9m3drbgv2znqx?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + 260\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Float@odata.type\":\"Edm.Double\",\"Integer\":3,\"Integer@odata.type\":\"Edm.Double\",\"PartitionKey\":\"partition\",\"RowKey\":\"3\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_9590c14c-3aa5-4815-72f4-da7c90c37e9e\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotableou5gp39mzhtrm?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 663\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"BoolProp\":true,\"IntProp\":4,\"PartitionKey\":\"partition\",\"RowKey\":\"4\",\"SomeBinaryProperty\":\"c29tZSBieXRlcw==\",\"SomeBinaryProperty@odata.type\":\"Edm.Binary\",\"SomeDateProperty\":\"2021-05-18T15:39:59.9902777Z\",\"SomeDateProperty@odata.type\":\"Edm.DateTime\",\"SomeDoubleProperty0\":1,\"SomeDoubleProperty0@odata.type\":\"Edm.Double\",\"SomeDoubleProperty1\":1.2345,\"SomeDoubleProperty1@odata.type\":\"Edm.Double\",\"SomeGuidProperty\":\"76ce5e7d-a431-4b17-472c-2a589bf333cf\",\"SomeGuidProperty@odata.type\":\"Edm.Guid\",\"SomeInt64Property\":\"9223372036854775807\",\"SomeInt64Property@odata.type\":\"Edm.Int64\",\"SomeIntProperty\":42,\"SomeStringProperty\":\"some - string\",\"StringProp\":\"some string 4\"}\r\n--changeset_dd23acc5-a2fb-419d-5006-1de1ca035a9f\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://chrisstablesprim.table.cosmos.azure.com/gotable9m3drbgv2znqx?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + 260\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Float@odata.type\":\"Edm.Double\",\"Integer\":4,\"Integer@odata.type\":\"Edm.Double\",\"PartitionKey\":\"partition\",\"RowKey\":\"4\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_9590c14c-3aa5-4815-72f4-da7c90c37e9e\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotableou5gp39mzhtrm?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 663\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"BoolProp\":true,\"IntProp\":5,\"PartitionKey\":\"partition\",\"RowKey\":\"5\",\"SomeBinaryProperty\":\"c29tZSBieXRlcw==\",\"SomeBinaryProperty@odata.type\":\"Edm.Binary\",\"SomeDateProperty\":\"2021-05-18T15:39:59.9902777Z\",\"SomeDateProperty@odata.type\":\"Edm.DateTime\",\"SomeDoubleProperty0\":1,\"SomeDoubleProperty0@odata.type\":\"Edm.Double\",\"SomeDoubleProperty1\":1.2345,\"SomeDoubleProperty1@odata.type\":\"Edm.Double\",\"SomeGuidProperty\":\"39afa2e2-8d46-446d-4141-034427ec5a5c\",\"SomeGuidProperty@odata.type\":\"Edm.Guid\",\"SomeInt64Property\":\"9223372036854775807\",\"SomeInt64Property@odata.type\":\"Edm.Int64\",\"SomeIntProperty\":42,\"SomeStringProperty\":\"some - string\",\"StringProp\":\"some string 5\"}\r\n--changeset_dd23acc5-a2fb-419d-5006-1de1ca035a9f\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://chrisstablesprim.table.cosmos.azure.com/gotable9m3drbgv2znqx?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + 260\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Float@odata.type\":\"Edm.Double\",\"Integer\":5,\"Integer@odata.type\":\"Edm.Double\",\"PartitionKey\":\"partition\",\"RowKey\":\"5\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_9590c14c-3aa5-4815-72f4-da7c90c37e9e\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotableou5gp39mzhtrm?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 663\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"BoolProp\":true,\"IntProp\":6,\"PartitionKey\":\"partition\",\"RowKey\":\"6\",\"SomeBinaryProperty\":\"c29tZSBieXRlcw==\",\"SomeBinaryProperty@odata.type\":\"Edm.Binary\",\"SomeDateProperty\":\"2021-05-18T15:39:59.9902777Z\",\"SomeDateProperty@odata.type\":\"Edm.DateTime\",\"SomeDoubleProperty0\":1,\"SomeDoubleProperty0@odata.type\":\"Edm.Double\",\"SomeDoubleProperty1\":1.2345,\"SomeDoubleProperty1@odata.type\":\"Edm.Double\",\"SomeGuidProperty\":\"b0bcacc3-0388-4bf4-6e61-0e60dfa720f3\",\"SomeGuidProperty@odata.type\":\"Edm.Guid\",\"SomeInt64Property\":\"9223372036854775807\",\"SomeInt64Property@odata.type\":\"Edm.Int64\",\"SomeIntProperty\":42,\"SomeStringProperty\":\"some - string\",\"StringProp\":\"some string 6\"}\r\n--changeset_dd23acc5-a2fb-419d-5006-1de1ca035a9f\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://chrisstablesprim.table.cosmos.azure.com/gotable9m3drbgv2znqx?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + 260\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Float@odata.type\":\"Edm.Double\",\"Integer\":6,\"Integer@odata.type\":\"Edm.Double\",\"PartitionKey\":\"partition\",\"RowKey\":\"6\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_9590c14c-3aa5-4815-72f4-da7c90c37e9e\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotableou5gp39mzhtrm?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 663\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"BoolProp\":true,\"IntProp\":7,\"PartitionKey\":\"partition\",\"RowKey\":\"7\",\"SomeBinaryProperty\":\"c29tZSBieXRlcw==\",\"SomeBinaryProperty@odata.type\":\"Edm.Binary\",\"SomeDateProperty\":\"2021-05-18T15:39:59.9902777Z\",\"SomeDateProperty@odata.type\":\"Edm.DateTime\",\"SomeDoubleProperty0\":1,\"SomeDoubleProperty0@odata.type\":\"Edm.Double\",\"SomeDoubleProperty1\":1.2345,\"SomeDoubleProperty1@odata.type\":\"Edm.Double\",\"SomeGuidProperty\":\"6f8a8185-7c64-437c-451b-3dcde76a19d1\",\"SomeGuidProperty@odata.type\":\"Edm.Guid\",\"SomeInt64Property\":\"9223372036854775807\",\"SomeInt64Property@odata.type\":\"Edm.Int64\",\"SomeIntProperty\":42,\"SomeStringProperty\":\"some - string\",\"StringProp\":\"some string 7\"}\r\n--changeset_dd23acc5-a2fb-419d-5006-1de1ca035a9f\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://chrisstablesprim.table.cosmos.azure.com/gotable9m3drbgv2znqx?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + 260\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Float@odata.type\":\"Edm.Double\",\"Integer\":7,\"Integer@odata.type\":\"Edm.Double\",\"PartitionKey\":\"partition\",\"RowKey\":\"7\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_9590c14c-3aa5-4815-72f4-da7c90c37e9e\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotableou5gp39mzhtrm?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 663\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"BoolProp\":true,\"IntProp\":8,\"PartitionKey\":\"partition\",\"RowKey\":\"8\",\"SomeBinaryProperty\":\"c29tZSBieXRlcw==\",\"SomeBinaryProperty@odata.type\":\"Edm.Binary\",\"SomeDateProperty\":\"2021-05-18T15:39:59.9902777Z\",\"SomeDateProperty@odata.type\":\"Edm.DateTime\",\"SomeDoubleProperty0\":1,\"SomeDoubleProperty0@odata.type\":\"Edm.Double\",\"SomeDoubleProperty1\":1.2345,\"SomeDoubleProperty1@odata.type\":\"Edm.Double\",\"SomeGuidProperty\":\"3d524c9f-5e29-42bf-5626-8d39c21fb846\",\"SomeGuidProperty@odata.type\":\"Edm.Guid\",\"SomeInt64Property\":\"9223372036854775807\",\"SomeInt64Property@odata.type\":\"Edm.Int64\",\"SomeIntProperty\":42,\"SomeStringProperty\":\"some - string\",\"StringProp\":\"some string 8\"}\r\n--changeset_dd23acc5-a2fb-419d-5006-1de1ca035a9f\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://chrisstablesprim.table.cosmos.azure.com/gotable9m3drbgv2znqx?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + 260\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Float@odata.type\":\"Edm.Double\",\"Integer\":8,\"Integer@odata.type\":\"Edm.Double\",\"PartitionKey\":\"partition\",\"RowKey\":\"8\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_9590c14c-3aa5-4815-72f4-da7c90c37e9e\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotableou5gp39mzhtrm?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 663\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"BoolProp\":true,\"IntProp\":9,\"PartitionKey\":\"partition\",\"RowKey\":\"9\",\"SomeBinaryProperty\":\"c29tZSBieXRlcw==\",\"SomeBinaryProperty@odata.type\":\"Edm.Binary\",\"SomeDateProperty\":\"2021-05-18T15:39:59.9902777Z\",\"SomeDateProperty@odata.type\":\"Edm.DateTime\",\"SomeDoubleProperty0\":1,\"SomeDoubleProperty0@odata.type\":\"Edm.Double\",\"SomeDoubleProperty1\":1.2345,\"SomeDoubleProperty1@odata.type\":\"Edm.Double\",\"SomeGuidProperty\":\"8b8c218f-b30b-40bc-62c0-92f1c52bebf9\",\"SomeGuidProperty@odata.type\":\"Edm.Guid\",\"SomeInt64Property\":\"9223372036854775807\",\"SomeInt64Property@odata.type\":\"Edm.Int64\",\"SomeIntProperty\":42,\"SomeStringProperty\":\"some - string\",\"StringProp\":\"some string 9\"}\r\n--changeset_dd23acc5-a2fb-419d-5006-1de1ca035a9f\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://chrisstablesprim.table.cosmos.azure.com/gotable9m3drbgv2znqx?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + 260\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Float@odata.type\":\"Edm.Double\",\"Integer\":9,\"Integer@odata.type\":\"Edm.Double\",\"PartitionKey\":\"partition\",\"RowKey\":\"9\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_9590c14c-3aa5-4815-72f4-da7c90c37e9e\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotableou5gp39mzhtrm?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 666\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"BoolProp\":true,\"IntProp\":10,\"PartitionKey\":\"partition\",\"RowKey\":\"10\",\"SomeBinaryProperty\":\"c29tZSBieXRlcw==\",\"SomeBinaryProperty@odata.type\":\"Edm.Binary\",\"SomeDateProperty\":\"2021-05-18T15:39:59.9902777Z\",\"SomeDateProperty@odata.type\":\"Edm.DateTime\",\"SomeDoubleProperty0\":1,\"SomeDoubleProperty0@odata.type\":\"Edm.Double\",\"SomeDoubleProperty1\":1.2345,\"SomeDoubleProperty1@odata.type\":\"Edm.Double\",\"SomeGuidProperty\":\"c1891fd1-e63b-4c16-7b74-1502bcab7668\",\"SomeGuidProperty@odata.type\":\"Edm.Guid\",\"SomeInt64Property\":\"9223372036854775807\",\"SomeInt64Property@odata.type\":\"Edm.Int64\",\"SomeIntProperty\":42,\"SomeStringProperty\":\"some - string\",\"StringProp\":\"some string 10\"}\r\n--changeset_dd23acc5-a2fb-419d-5006-1de1ca035a9f--\r\n\r\n--batch_bae5ce88-edc3-4b25-7b33-be5c7454aefc--\r\n" + 262\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Float@odata.type\":\"Edm.Double\",\"Integer\":10,\"Integer@odata.type\":\"Edm.Double\",\"PartitionKey\":\"partition\",\"RowKey\":\"10\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_9590c14c-3aa5-4815-72f4-da7c90c37e9e--\r\n\r\n--batch_93140bc0-6825-4bb0-42e6-8b82f5540c8d--\r\n" form: {} headers: Accept: @@ -102,74 +90,103 @@ interactions: Authorization: - sanitized Content-Length: - - "11281" + - "7210" Content-Type: - - multipart/mixed; boundary=batch_bae5ce88-edc3-4b25-7b33-be5c7454aefc + - multipart/mixed; boundary=batch_93140bc0-6825-4bb0-42e6-8b82f5540c8d Dataserviceversion: - "3.0" User-Agent: - - azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; Windows_NT) + - azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Tue, 18 May 2021 15:39:59 GMT + - Thu, 15 Jul 2021 21:46:34 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.cosmos.azure.com/$batch + url: https://seankaneprim.table.cosmos.azure.com/$batch method: POST response: - body: "--batchresponse_38a3240d-92fd-45d7-a9f4-1507ec60bf61\r\nContent-Type: multipart/mixed; - boundary=changesetresponse_69a6b8e4-6cec-4fb2-a7f3-975a3df93882\r\n\r\n--changesetresponse_69a6b8e4-6cec-4fb2-a7f3-975a3df93882\nContent-Type: + body: "--batchresponse_5d29f480-28d5-485d-931f-483d0770524f\r\nContent-Type: multipart/mixed; + boundary=changesetresponse_3e0b5204-2bd4-48b6-8463-e562b19d401c\r\n\r\n--changesetresponse_3e0b5204-2bd4-48b6-8463-e562b19d401c\nContent-Type: application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: - W/\"datetime'2021-05-18T15%3A40%3A00.4656136Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: - https://chrisstablesprim.table.cosmos.azure.com/gotable9m3drbgv2znqx(PartitionKey='partition',RowKey='1')\r\nContent-ID: - 1\r\n\r\n\r\n--changesetresponse_69a6b8e4-6cec-4fb2-a7f3-975a3df93882\nContent-Type: + W/\"datetime'2021-07-15T21%3A46%3A33.8196488Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: + https://seankaneprim.table.cosmos.azure.com/gotableou5gp39mzhtrm(PartitionKey='partition',RowKey='1')\r\nContent-ID: + 1\r\n\r\n\r\n--changesetresponse_3e0b5204-2bd4-48b6-8463-e562b19d401c\nContent-Type: application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: - W/\"datetime'2021-05-18T15%3A40%3A00.4663304Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: - https://chrisstablesprim.table.cosmos.azure.com/gotable9m3drbgv2znqx(PartitionKey='partition',RowKey='2')\r\nContent-ID: - 2\r\n\r\n\r\n--changesetresponse_69a6b8e4-6cec-4fb2-a7f3-975a3df93882\nContent-Type: + W/\"datetime'2021-07-15T21%3A46%3A33.8203656Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: + https://seankaneprim.table.cosmos.azure.com/gotableou5gp39mzhtrm(PartitionKey='partition',RowKey='2')\r\nContent-ID: + 2\r\n\r\n\r\n--changesetresponse_3e0b5204-2bd4-48b6-8463-e562b19d401c\nContent-Type: application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: - W/\"datetime'2021-05-18T15%3A40%3A00.4669448Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: - https://chrisstablesprim.table.cosmos.azure.com/gotable9m3drbgv2znqx(PartitionKey='partition',RowKey='3')\r\nContent-ID: - 3\r\n\r\n\r\n--changesetresponse_69a6b8e4-6cec-4fb2-a7f3-975a3df93882\nContent-Type: + W/\"datetime'2021-07-15T21%3A46%3A33.8208776Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: + https://seankaneprim.table.cosmos.azure.com/gotableou5gp39mzhtrm(PartitionKey='partition',RowKey='3')\r\nContent-ID: + 3\r\n\r\n\r\n--changesetresponse_3e0b5204-2bd4-48b6-8463-e562b19d401c\nContent-Type: application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: - W/\"datetime'2021-05-18T15%3A40%3A00.4675592Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: - https://chrisstablesprim.table.cosmos.azure.com/gotable9m3drbgv2znqx(PartitionKey='partition',RowKey='4')\r\nContent-ID: - 4\r\n\r\n\r\n--changesetresponse_69a6b8e4-6cec-4fb2-a7f3-975a3df93882\nContent-Type: + W/\"datetime'2021-07-15T21%3A46%3A33.8213896Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: + https://seankaneprim.table.cosmos.azure.com/gotableou5gp39mzhtrm(PartitionKey='partition',RowKey='4')\r\nContent-ID: + 4\r\n\r\n\r\n--changesetresponse_3e0b5204-2bd4-48b6-8463-e562b19d401c\nContent-Type: application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: - W/\"datetime'2021-05-18T15%3A40%3A00.4680712Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: - https://chrisstablesprim.table.cosmos.azure.com/gotable9m3drbgv2znqx(PartitionKey='partition',RowKey='5')\r\nContent-ID: - 5\r\n\r\n\r\n--changesetresponse_69a6b8e4-6cec-4fb2-a7f3-975a3df93882\nContent-Type: + W/\"datetime'2021-07-15T21%3A46%3A33.8220040Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: + https://seankaneprim.table.cosmos.azure.com/gotableou5gp39mzhtrm(PartitionKey='partition',RowKey='5')\r\nContent-ID: + 5\r\n\r\n\r\n--changesetresponse_3e0b5204-2bd4-48b6-8463-e562b19d401c\nContent-Type: application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: - W/\"datetime'2021-05-18T15%3A40%3A00.4685832Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: - https://chrisstablesprim.table.cosmos.azure.com/gotable9m3drbgv2znqx(PartitionKey='partition',RowKey='6')\r\nContent-ID: - 6\r\n\r\n\r\n--changesetresponse_69a6b8e4-6cec-4fb2-a7f3-975a3df93882\nContent-Type: + W/\"datetime'2021-07-15T21%3A46%3A33.8226184Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: + https://seankaneprim.table.cosmos.azure.com/gotableou5gp39mzhtrm(PartitionKey='partition',RowKey='6')\r\nContent-ID: + 6\r\n\r\n\r\n--changesetresponse_3e0b5204-2bd4-48b6-8463-e562b19d401c\nContent-Type: application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: - W/\"datetime'2021-05-18T15%3A40%3A00.4689928Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: - https://chrisstablesprim.table.cosmos.azure.com/gotable9m3drbgv2znqx(PartitionKey='partition',RowKey='7')\r\nContent-ID: - 7\r\n\r\n\r\n--changesetresponse_69a6b8e4-6cec-4fb2-a7f3-975a3df93882\nContent-Type: + W/\"datetime'2021-07-15T21%3A46%3A33.8233352Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: + https://seankaneprim.table.cosmos.azure.com/gotableou5gp39mzhtrm(PartitionKey='partition',RowKey='7')\r\nContent-ID: + 7\r\n\r\n\r\n--changesetresponse_3e0b5204-2bd4-48b6-8463-e562b19d401c\nContent-Type: application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: - W/\"datetime'2021-05-18T15%3A40%3A00.4695048Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: - https://chrisstablesprim.table.cosmos.azure.com/gotable9m3drbgv2znqx(PartitionKey='partition',RowKey='8')\r\nContent-ID: - 8\r\n\r\n\r\n--changesetresponse_69a6b8e4-6cec-4fb2-a7f3-975a3df93882\nContent-Type: + W/\"datetime'2021-07-15T21%3A46%3A33.8238472Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: + https://seankaneprim.table.cosmos.azure.com/gotableou5gp39mzhtrm(PartitionKey='partition',RowKey='8')\r\nContent-ID: + 8\r\n\r\n\r\n--changesetresponse_3e0b5204-2bd4-48b6-8463-e562b19d401c\nContent-Type: application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: - W/\"datetime'2021-05-18T15%3A40%3A00.4699144Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: - https://chrisstablesprim.table.cosmos.azure.com/gotable9m3drbgv2znqx(PartitionKey='partition',RowKey='9')\r\nContent-ID: - 9\r\n\r\n\r\n--changesetresponse_69a6b8e4-6cec-4fb2-a7f3-975a3df93882\nContent-Type: + W/\"datetime'2021-07-15T21%3A46%3A33.8244616Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: + https://seankaneprim.table.cosmos.azure.com/gotableou5gp39mzhtrm(PartitionKey='partition',RowKey='9')\r\nContent-ID: + 9\r\n\r\n\r\n--changesetresponse_3e0b5204-2bd4-48b6-8463-e562b19d401c\nContent-Type: application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: - W/\"datetime'2021-05-18T15%3A40%3A00.4703240Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: - https://chrisstablesprim.table.cosmos.azure.com/gotable9m3drbgv2znqx(PartitionKey='partition',RowKey='10')\r\nContent-ID: - 10\r\n\r\n\r\n--changesetresponse_69a6b8e4-6cec-4fb2-a7f3-975a3df93882--\n--batchresponse_38a3240d-92fd-45d7-a9f4-1507ec60bf61--\r\n" + W/\"datetime'2021-07-15T21%3A46%3A33.8250760Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: + https://seankaneprim.table.cosmos.azure.com/gotableou5gp39mzhtrm(PartitionKey='partition',RowKey='10')\r\nContent-ID: + 10\r\n\r\n\r\n--changesetresponse_3e0b5204-2bd4-48b6-8463-e562b19d401c--\n--batchresponse_5d29f480-28d5-485d-931f-483d0770524f--\r\n" headers: Content-Type: - - multipart/mixed; boundary=batchresponse_38a3240d-92fd-45d7-a9f4-1507ec60bf61 + - multipart/mixed; boundary=batchresponse_5d29f480-28d5-485d-931f-483d0770524f Date: - - Tue, 18 May 2021 15:40:00 GMT - Server: - - Microsoft-HTTPAPI/2.0 + - Thu, 15 Jul 2021 21:46:32 GMT X-Ms-Request-Id: - - 24146f57-712a-4890-923b-e24eb0f41461 + - ba96f63e-8fd8-49d7-aeba-f2dd976bdf56 status: 202 Accepted code: 202 duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Thu, 15 Jul 2021 21:46:34 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.cosmos.azure.com/gotableou5gp39mzhtrm() + method: GET + response: + body: '{"value":[{"odata.etag":"W/\"datetime''2021-07-15T21%3A46%3A33.8196488Z''\"","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":1.0,"PartitionKey":"partition","RowKey":"1","String":"someString","Timestamp":"2021-07-15T21:46:33.8196488Z"},{"odata.etag":"W/\"datetime''2021-07-15T21%3A46%3A33.8203656Z''\"","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":2.0,"PartitionKey":"partition","RowKey":"2","String":"someString","Timestamp":"2021-07-15T21:46:33.8203656Z"},{"odata.etag":"W/\"datetime''2021-07-15T21%3A46%3A33.8208776Z''\"","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":3.0,"PartitionKey":"partition","RowKey":"3","String":"someString","Timestamp":"2021-07-15T21:46:33.8208776Z"},{"odata.etag":"W/\"datetime''2021-07-15T21%3A46%3A33.8213896Z''\"","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":4.0,"PartitionKey":"partition","RowKey":"4","String":"someString","Timestamp":"2021-07-15T21:46:33.8213896Z"},{"odata.etag":"W/\"datetime''2021-07-15T21%3A46%3A33.8220040Z''\"","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":5.0,"PartitionKey":"partition","RowKey":"5","String":"someString","Timestamp":"2021-07-15T21:46:33.8220040Z"},{"odata.etag":"W/\"datetime''2021-07-15T21%3A46%3A33.8226184Z''\"","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":6.0,"PartitionKey":"partition","RowKey":"6","String":"someString","Timestamp":"2021-07-15T21:46:33.8226184Z"},{"odata.etag":"W/\"datetime''2021-07-15T21%3A46%3A33.8233352Z''\"","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":7.0,"PartitionKey":"partition","RowKey":"7","String":"someString","Timestamp":"2021-07-15T21:46:33.8233352Z"},{"odata.etag":"W/\"datetime''2021-07-15T21%3A46%3A33.8238472Z''\"","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":8.0,"PartitionKey":"partition","RowKey":"8","String":"someString","Timestamp":"2021-07-15T21:46:33.8238472Z"},{"odata.etag":"W/\"datetime''2021-07-15T21%3A46%3A33.8244616Z''\"","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":9.0,"PartitionKey":"partition","RowKey":"9","String":"someString","Timestamp":"2021-07-15T21:46:33.8244616Z"},{"odata.etag":"W/\"datetime''2021-07-15T21%3A46%3A33.8250760Z''\"","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":10.0,"PartitionKey":"partition","RowKey":"10","String":"someString","Timestamp":"2021-07-15T21:46:33.8250760Z"}],"odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#gotableou5gp39mzhtrm"}' + headers: + Content-Type: + - application/json;odata=minimalmetadata + Date: + - Thu, 15 Jul 2021 21:46:33 GMT + X-Ms-Request-Id: + - 86e0b857-3c49-4826-a96f-c0be4794f97e + status: 200 OK + code: 200 + duration: "" - request: body: "" form: {} @@ -179,25 +196,21 @@ interactions: Authorization: - sanitized User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Tue, 18 May 2021 15:40:00 GMT + - Thu, 15 Jul 2021 21:46:35 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.cosmos.azure.com/Tables('gotable9m3drbgv2znqx') + url: https://seankaneprim.table.cosmos.azure.com/Tables('gotableou5gp39mzhtrm') method: DELETE response: body: "" headers: - Content-Length: - - "0" Date: - - Tue, 18 May 2021 15:40:00 GMT - Server: - - Microsoft-HTTPAPI/2.0 + - Thu, 15 Jul 2021 21:46:33 GMT X-Ms-Request-Id: - - 51bb42ce-1f87-455b-a029-6d83ef15ef14 + - 87e59e4c-0496-4dde-85f6-4c7312a51fc4 status: 204 No Content code: 204 duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchError-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchError-variables.yaml index 62baaafd7ab9..2fce65d45767 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchError-variables.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchError-variables.yaml @@ -1,6 +1,5 @@ --- COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com -TABLES_COSMOS_ACCOUNT_NAME: chrisstablesprim +TABLES_COSMOS_ACCOUNT_NAME: seankaneprim TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== -now: "2021-05-21T13:23:34.3457407-05:00" -randomSeed: "1621621412" +randomSeed: "1626385595" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchError.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchError.yaml index 1957a9d8bae5..4c0473248785 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchError.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchError.yaml @@ -2,7 +2,7 @@ version: 1 interactions: - request: - body: '{"TableName":"gotabletzmby34yuxg6n"}' + body: '{"TableName":"gotable92fb9791byr9z"}' form: {} headers: Accept: @@ -16,35 +16,32 @@ interactions: Dataserviceversion: - "3.0" User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Fri, 21 May 2021 18:23:32 GMT + - Thu, 15 Jul 2021 21:46:35 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.cosmos.azure.com/Tables + url: https://seankaneprim.table.cosmos.azure.com/Tables method: POST response: - body: '{"TableName":"gotabletzmby34yuxg6n","odata.metadata":"https://chrisstablesprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' + body: '{"TableName":"gotable92fb9791byr9z","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' headers: Content-Type: - application/json;odata=minimalmetadata Date: - - Fri, 21 May 2021 18:23:34 GMT + - Thu, 15 Jul 2021 21:46:34 GMT Etag: - - W/"datetime'2021-05-21T18%3A23%3A34.0203016Z'" + - W/"datetime'2021-07-15T21%3A46%3A34.5025544Z'" Location: - - https://chrisstablesprim.table.cosmos.azure.com/Tables('gotabletzmby34yuxg6n') - Server: - - Microsoft-HTTPAPI/2.0 + - https://seankaneprim.table.cosmos.azure.com/Tables('gotable92fb9791byr9z') X-Ms-Request-Id: - - fc4b4542-c0a5-4264-a7ee-fecd96b9b9b4 - status: 201 Ok + - 780b7b43-fabf-41d4-afae-eb61c75544a3 + status: 201 Created code: 201 duration: "" - request: - body: '{"BoolProp":true,"IntProp":3,"PartitionKey":"partition","RowKey":"3","SomeBinaryProperty":"c29tZSBieXRlcw==","SomeBinaryProperty@odata.type":"Edm.Binary","SomeDateProperty":"2021-05-21T18:23:34.3457407Z","SomeDateProperty@odata.type":"Edm.DateTime","SomeDoubleProperty0":1,"SomeDoubleProperty0@odata.type":"Edm.Double","SomeDoubleProperty1":1.2345,"SomeDoubleProperty1@odata.type":"Edm.Double","SomeGuidProperty":"4d7bd7de-2c53-477c-4d41-30b23d6c6016","SomeGuidProperty@odata.type":"Edm.Guid","SomeInt64Property":"9223372036854775807","SomeInt64Property@odata.type":"Edm.Int64","SomeIntProperty":42,"SomeStringProperty":"some - string","StringProp":"some string 3"}' + body: '{"Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":3,"PartitionKey":"partition","RowKey":"3","String":"someString","Timestamp":"0001-01-01T00:00:00Z"}' form: {} headers: Accept: @@ -52,7 +49,7 @@ interactions: Authorization: - sanitized Content-Length: - - "663" + - "194" Content-Type: - application/json Dataserviceversion: @@ -60,52 +57,45 @@ interactions: Prefer: - return-no-content User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Fri, 21 May 2021 18:23:34 GMT + - Thu, 15 Jul 2021 21:46:36 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.cosmos.azure.com/gotabletzmby34yuxg6n + url: https://seankaneprim.table.cosmos.azure.com/gotable92fb9791byr9z method: POST response: body: "" headers: - Content-Length: - - "0" Date: - - Fri, 21 May 2021 18:23:34 GMT + - Thu, 15 Jul 2021 21:46:34 GMT Etag: - - W/"datetime'2021-05-21T18%3A23%3A34.5252360Z'" + - W/"datetime'2021-07-15T21%3A46%3A35.3062920Z'" Location: - - https://chrisstablesprim.table.cosmos.azure.com/gotabletzmby34yuxg6n(PartitionKey='partition',RowKey='3') + - https://seankaneprim.table.cosmos.azure.com/gotable92fb9791byr9z(PartitionKey='partition',RowKey='3') Preference-Applied: - return-no-content - Server: - - Microsoft-HTTPAPI/2.0 X-Ms-Request-Id: - - 86973fa6-1d80-4ca1-ab39-2af2c5bf73a5 + - aadac6be-e040-446c-a8ac-171cfe8b2524 status: 204 No Content code: 204 duration: "" - request: - body: "--batch_9e5262f4-1bac-49aa-5e98-659e96cc8629\r\nContent-Type: multipart/mixed; - boundary=changeset_03f12eec-7a2f-46c8-78a3-30799f56b3c0\r\n\r\n--changeset_03f12eec-7a2f-46c8-78a3-30799f56b3c0\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://chrisstablesprim.table.cosmos.azure.com/gotabletzmby34yuxg6n?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + body: "--batch_0c3821ee-c9f1-4c30-50f3-83663f3867d5\r\nContent-Type: multipart/mixed; + boundary=changeset_f2399351-bd25-407b-5a4a-b6665e2f87ba\r\n\r\n--changeset_f2399351-bd25-407b-5a4a-b6665e2f87ba\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotable92fb9791byr9z?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 663\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"BoolProp\":true,\"IntProp\":1,\"PartitionKey\":\"partition\",\"RowKey\":\"1\",\"SomeBinaryProperty\":\"c29tZSBieXRlcw==\",\"SomeBinaryProperty@odata.type\":\"Edm.Binary\",\"SomeDateProperty\":\"2021-05-21T18:23:34.3457407Z\",\"SomeDateProperty@odata.type\":\"Edm.DateTime\",\"SomeDoubleProperty0\":1,\"SomeDoubleProperty0@odata.type\":\"Edm.Double\",\"SomeDoubleProperty1\":1.2345,\"SomeDoubleProperty1@odata.type\":\"Edm.Double\",\"SomeGuidProperty\":\"b5d5aa35-2089-4822-604b-edcdba3d0e2e\",\"SomeGuidProperty@odata.type\":\"Edm.Guid\",\"SomeInt64Property\":\"9223372036854775807\",\"SomeInt64Property@odata.type\":\"Edm.Int64\",\"SomeIntProperty\":42,\"SomeStringProperty\":\"some - string\",\"StringProp\":\"some string 1\"}\r\n--changeset_03f12eec-7a2f-46c8-78a3-30799f56b3c0\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://chrisstablesprim.table.cosmos.azure.com/gotabletzmby34yuxg6n?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + 260\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Float@odata.type\":\"Edm.Double\",\"Integer\":1,\"Integer@odata.type\":\"Edm.Double\",\"PartitionKey\":\"partition\",\"RowKey\":\"1\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_f2399351-bd25-407b-5a4a-b6665e2f87ba\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotable92fb9791byr9z?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 663\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"BoolProp\":true,\"IntProp\":2,\"PartitionKey\":\"partition\",\"RowKey\":\"2\",\"SomeBinaryProperty\":\"c29tZSBieXRlcw==\",\"SomeBinaryProperty@odata.type\":\"Edm.Binary\",\"SomeDateProperty\":\"2021-05-21T18:23:34.3457407Z\",\"SomeDateProperty@odata.type\":\"Edm.DateTime\",\"SomeDoubleProperty0\":1,\"SomeDoubleProperty0@odata.type\":\"Edm.Double\",\"SomeDoubleProperty1\":1.2345,\"SomeDoubleProperty1@odata.type\":\"Edm.Double\",\"SomeGuidProperty\":\"e88aeec4-8336-490d-5024-b16bb25b3a57\",\"SomeGuidProperty@odata.type\":\"Edm.Guid\",\"SomeInt64Property\":\"9223372036854775807\",\"SomeInt64Property@odata.type\":\"Edm.Int64\",\"SomeIntProperty\":42,\"SomeStringProperty\":\"some - string\",\"StringProp\":\"some string 2\"}\r\n--changeset_03f12eec-7a2f-46c8-78a3-30799f56b3c0\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://chrisstablesprim.table.cosmos.azure.com/gotabletzmby34yuxg6n?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + 260\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Float@odata.type\":\"Edm.Double\",\"Integer\":2,\"Integer@odata.type\":\"Edm.Double\",\"PartitionKey\":\"partition\",\"RowKey\":\"2\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_f2399351-bd25-407b-5a4a-b6665e2f87ba\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotable92fb9791byr9z?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 663\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"BoolProp\":true,\"IntProp\":3,\"PartitionKey\":\"partition\",\"RowKey\":\"3\",\"SomeBinaryProperty\":\"c29tZSBieXRlcw==\",\"SomeBinaryProperty@odata.type\":\"Edm.Binary\",\"SomeDateProperty\":\"2021-05-21T18:23:34.3457407Z\",\"SomeDateProperty@odata.type\":\"Edm.DateTime\",\"SomeDoubleProperty0\":1,\"SomeDoubleProperty0@odata.type\":\"Edm.Double\",\"SomeDoubleProperty1\":1.2345,\"SomeDoubleProperty1@odata.type\":\"Edm.Double\",\"SomeGuidProperty\":\"4d7bd7de-2c53-477c-4d41-30b23d6c6016\",\"SomeGuidProperty@odata.type\":\"Edm.Guid\",\"SomeInt64Property\":\"9223372036854775807\",\"SomeInt64Property@odata.type\":\"Edm.Int64\",\"SomeIntProperty\":42,\"SomeStringProperty\":\"some - string\",\"StringProp\":\"some string 3\"}\r\n--changeset_03f12eec-7a2f-46c8-78a3-30799f56b3c0--\r\n\r\n--batch_9e5262f4-1bac-49aa-5e98-659e96cc8629--\r\n" + 260\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Float@odata.type\":\"Edm.Double\",\"Integer\":3,\"Integer@odata.type\":\"Edm.Double\",\"PartitionKey\":\"partition\",\"RowKey\":\"3\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_f2399351-bd25-407b-5a4a-b6665e2f87ba--\r\n\r\n--batch_0c3821ee-c9f1-4c30-50f3-83663f3867d5--\r\n" form: {} headers: Accept: @@ -113,34 +103,32 @@ interactions: Authorization: - sanitized Content-Length: - - "3550" + - "2329" Content-Type: - - multipart/mixed; boundary=batch_9e5262f4-1bac-49aa-5e98-659e96cc8629 + - multipart/mixed; boundary=batch_0c3821ee-c9f1-4c30-50f3-83663f3867d5 Dataserviceversion: - "3.0" User-Agent: - - azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; Windows_NT) + - azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Fri, 21 May 2021 18:23:34 GMT + - Thu, 15 Jul 2021 21:46:36 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.cosmos.azure.com/$batch + url: https://seankaneprim.table.cosmos.azure.com/$batch method: POST response: - body: "--batchresponse_2c374acb-11fe-45dd-abb9-b8fa0285e378\r\nContent-Type: multipart/mixed; - boundary=changesetresponse_2a51fb17-83d0-47ff-ab71-943237da06ed\r\n\r\n--changesetresponse_2a51fb17-83d0-47ff-ab71-943237da06ed\nContent-Type: + body: "--batchresponse_79394d2a-f4f9-485c-b2ee-3bba69b4fc96\r\nContent-Type: multipart/mixed; + boundary=changesetresponse_ae0312c9-5b67-4c3c-aaa6-0db271ea07b1\r\n\r\n--changesetresponse_ae0312c9-5b67-4c3c-aaa6-0db271ea07b1\nContent-Type: application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 409 Conflict\r\nContent-Type: application/json;odata=fullmetadata\r\n\r\n{\"odata.error\":{\"code\":\"EntityAlreadyExists\",\"message\":{\"lang\":\"en-us\",\"value\":\"2:The - specified entity already exists.\\n\\nRequestID:d2475065-a351-4a8b-92cc-ad5777e346de\\n\"}}}\r\n--changesetresponse_2a51fb17-83d0-47ff-ab71-943237da06ed--\n--batchresponse_2c374acb-11fe-45dd-abb9-b8fa0285e378--\r\n" + specified entity already exists.\\n\\nRequestID:5485e5be-2e9a-413c-aeca-68da50a5d9e8\\n\"}}}\r\n--changesetresponse_ae0312c9-5b67-4c3c-aaa6-0db271ea07b1--\n--batchresponse_79394d2a-f4f9-485c-b2ee-3bba69b4fc96--\r\n" headers: Content-Type: - - multipart/mixed; boundary=batchresponse_2c374acb-11fe-45dd-abb9-b8fa0285e378 + - multipart/mixed; boundary=batchresponse_79394d2a-f4f9-485c-b2ee-3bba69b4fc96 Date: - - Fri, 21 May 2021 18:23:34 GMT - Server: - - Microsoft-HTTPAPI/2.0 + - Thu, 15 Jul 2021 21:46:34 GMT X-Ms-Request-Id: - - d2475065-a351-4a8b-92cc-ad5777e346de + - 5485e5be-2e9a-413c-aeca-68da50a5d9e8 status: 202 Accepted code: 202 duration: "" @@ -153,25 +141,21 @@ interactions: Authorization: - sanitized User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Fri, 21 May 2021 18:23:34 GMT + - Thu, 15 Jul 2021 21:46:36 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.cosmos.azure.com/Tables('gotabletzmby34yuxg6n') + url: https://seankaneprim.table.cosmos.azure.com/Tables('gotable92fb9791byr9z') method: DELETE response: body: "" headers: - Content-Length: - - "0" Date: - - Fri, 21 May 2021 18:23:34 GMT - Server: - - Microsoft-HTTPAPI/2.0 + - Thu, 15 Jul 2021 21:46:34 GMT X-Ms-Request-Id: - - 4005b91f-1bc7-4149-9f87-9ed556c393de + - 0d632f65-2a93-4b75-ae7c-7c53cd79e3c0 status: 204 No Content code: 204 duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchMixed-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchMixed-variables.yaml index b41be654bf47..05bdc8abfa7a 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchMixed-variables.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchMixed-variables.yaml @@ -1,6 +1,5 @@ --- COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com -TABLES_COSMOS_ACCOUNT_NAME: chrisstablesprim +TABLES_COSMOS_ACCOUNT_NAME: seankaneprim TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== -now: "2021-05-21T14:41:05.1021027-05:00" -randomSeed: "1621626063" +randomSeed: "1626385596" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchMixed.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchMixed.yaml index 376c67befeb3..34c1f0e5b4af 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchMixed.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchMixed.yaml @@ -2,7 +2,7 @@ version: 1 interactions: - request: - body: '{"TableName":"gotable3m8dvqbvcbgmg"}' + body: '{"TableName":"gotablex1913nmx6e729"}' form: {} headers: Accept: @@ -16,50 +16,45 @@ interactions: Dataserviceversion: - "3.0" User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Fri, 21 May 2021 19:41:03 GMT + - Thu, 15 Jul 2021 21:46:36 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.cosmos.azure.com/Tables + url: https://seankaneprim.table.cosmos.azure.com/Tables method: POST response: - body: '{"TableName":"gotable3m8dvqbvcbgmg","odata.metadata":"https://chrisstablesprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' + body: '{"TableName":"gotablex1913nmx6e729","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' headers: Content-Type: - application/json;odata=minimalmetadata Date: - - Fri, 21 May 2021 19:41:04 GMT + - Thu, 15 Jul 2021 21:46:35 GMT Etag: - - W/"datetime'2021-05-21T19%3A41%3A04.7087112Z'" + - W/"datetime'2021-07-15T21%3A46%3A36.0097800Z'" Location: - - https://chrisstablesprim.table.cosmos.azure.com/Tables('gotable3m8dvqbvcbgmg') - Server: - - Microsoft-HTTPAPI/2.0 + - https://seankaneprim.table.cosmos.azure.com/Tables('gotablex1913nmx6e729') X-Ms-Request-Id: - - 3f6441cb-4700-494e-9552-bfe42d0f6ce0 - status: 201 Ok + - c6ab05f4-3e40-484a-bd24-0073e2759e22 + status: 201 Created code: 201 duration: "" - request: - body: "--batch_80320635-4aac-4149-7852-98d9c153d70c\r\nContent-Type: multipart/mixed; - boundary=changeset_f291243d-1675-4bd4-7c0d-8f9c37b602db\r\n\r\n--changeset_f291243d-1675-4bd4-7c0d-8f9c37b602db\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://chrisstablesprim.table.cosmos.azure.com/gotable3m8dvqbvcbgmg?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + body: "--batch_91789fa1-7728-4b0a-4ef7-bf84cd1ef031\r\nContent-Type: multipart/mixed; + boundary=changeset_9e4ef1fe-196d-4d54-402d-71975aeaaca1\r\n\r\n--changeset_9e4ef1fe-196d-4d54-402d-71975aeaaca1\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotablex1913nmx6e729?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 663\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"BoolProp\":true,\"IntProp\":1,\"PartitionKey\":\"partition\",\"RowKey\":\"1\",\"SomeBinaryProperty\":\"c29tZSBieXRlcw==\",\"SomeBinaryProperty@odata.type\":\"Edm.Binary\",\"SomeDateProperty\":\"2021-05-21T19:41:05.1021027Z\",\"SomeDateProperty@odata.type\":\"Edm.DateTime\",\"SomeDoubleProperty0\":1,\"SomeDoubleProperty0@odata.type\":\"Edm.Double\",\"SomeDoubleProperty1\":1.2345,\"SomeDoubleProperty1@odata.type\":\"Edm.Double\",\"SomeGuidProperty\":\"c4d3ae3f-7292-4e24-6ba8-2e7aeb230a6a\",\"SomeGuidProperty@odata.type\":\"Edm.Guid\",\"SomeInt64Property\":\"9223372036854775807\",\"SomeInt64Property@odata.type\":\"Edm.Int64\",\"SomeIntProperty\":42,\"SomeStringProperty\":\"some - string\",\"StringProp\":\"some string 1\"}\r\n--changeset_f291243d-1675-4bd4-7c0d-8f9c37b602db\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://chrisstablesprim.table.cosmos.azure.com/gotable3m8dvqbvcbgmg?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + 260\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Float@odata.type\":\"Edm.Double\",\"Integer\":1,\"Integer@odata.type\":\"Edm.Double\",\"PartitionKey\":\"partition\",\"RowKey\":\"1\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_9e4ef1fe-196d-4d54-402d-71975aeaaca1\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotablex1913nmx6e729?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 663\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"BoolProp\":true,\"IntProp\":2,\"PartitionKey\":\"partition\",\"RowKey\":\"2\",\"SomeBinaryProperty\":\"c29tZSBieXRlcw==\",\"SomeBinaryProperty@odata.type\":\"Edm.Binary\",\"SomeDateProperty\":\"2021-05-21T19:41:05.1021027Z\",\"SomeDateProperty@odata.type\":\"Edm.DateTime\",\"SomeDoubleProperty0\":1,\"SomeDoubleProperty0@odata.type\":\"Edm.Double\",\"SomeDoubleProperty1\":1.2345,\"SomeDoubleProperty1@odata.type\":\"Edm.Double\",\"SomeGuidProperty\":\"1180f1b3-b1de-48ad-71c4-ef4f70b3b49a\",\"SomeGuidProperty@odata.type\":\"Edm.Guid\",\"SomeInt64Property\":\"9223372036854775807\",\"SomeInt64Property@odata.type\":\"Edm.Int64\",\"SomeIntProperty\":42,\"SomeStringProperty\":\"some - string\",\"StringProp\":\"some string 2\"}\r\n--changeset_f291243d-1675-4bd4-7c0d-8f9c37b602db\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://chrisstablesprim.table.cosmos.azure.com/gotable3m8dvqbvcbgmg?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + 260\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Float@odata.type\":\"Edm.Double\",\"Integer\":2,\"Integer@odata.type\":\"Edm.Double\",\"PartitionKey\":\"partition\",\"RowKey\":\"2\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_9e4ef1fe-196d-4d54-402d-71975aeaaca1\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotablex1913nmx6e729?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 663\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"BoolProp\":true,\"IntProp\":3,\"PartitionKey\":\"partition\",\"RowKey\":\"3\",\"SomeBinaryProperty\":\"c29tZSBieXRlcw==\",\"SomeBinaryProperty@odata.type\":\"Edm.Binary\",\"SomeDateProperty\":\"2021-05-21T19:41:05.1021027Z\",\"SomeDateProperty@odata.type\":\"Edm.DateTime\",\"SomeDoubleProperty0\":1,\"SomeDoubleProperty0@odata.type\":\"Edm.Double\",\"SomeDoubleProperty1\":1.2345,\"SomeDoubleProperty1@odata.type\":\"Edm.Double\",\"SomeGuidProperty\":\"51d51f9f-3692-4675-7e9b-8ee1a704204f\",\"SomeGuidProperty@odata.type\":\"Edm.Guid\",\"SomeInt64Property\":\"9223372036854775807\",\"SomeInt64Property@odata.type\":\"Edm.Int64\",\"SomeIntProperty\":42,\"SomeStringProperty\":\"some - string\",\"StringProp\":\"some string 3\"}\r\n--changeset_f291243d-1675-4bd4-7c0d-8f9c37b602db--\r\n\r\n--batch_80320635-4aac-4149-7852-98d9c153d70c--\r\n" + 260\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Float@odata.type\":\"Edm.Double\",\"Integer\":3,\"Integer@odata.type\":\"Edm.Double\",\"PartitionKey\":\"partition\",\"RowKey\":\"3\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_9e4ef1fe-196d-4d54-402d-71975aeaaca1--\r\n\r\n--batch_91789fa1-7728-4b0a-4ef7-bf84cd1ef031--\r\n" form: {} headers: Accept: @@ -67,43 +62,41 @@ interactions: Authorization: - sanitized Content-Length: - - "3550" + - "2329" Content-Type: - - multipart/mixed; boundary=batch_80320635-4aac-4149-7852-98d9c153d70c + - multipart/mixed; boundary=batch_91789fa1-7728-4b0a-4ef7-bf84cd1ef031 Dataserviceversion: - "3.0" User-Agent: - - azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; Windows_NT) + - azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Fri, 21 May 2021 19:41:05 GMT + - Thu, 15 Jul 2021 21:46:37 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.cosmos.azure.com/$batch + url: https://seankaneprim.table.cosmos.azure.com/$batch method: POST response: - body: "--batchresponse_a9702722-351c-4503-882c-974676140382\r\nContent-Type: multipart/mixed; - boundary=changesetresponse_01d951c7-cf0c-4ef5-a40a-38b651d346bf\r\n\r\n--changesetresponse_01d951c7-cf0c-4ef5-a40a-38b651d346bf\nContent-Type: + body: "--batchresponse_70883b2c-556a-465f-a880-896fcb616cfa\r\nContent-Type: multipart/mixed; + boundary=changesetresponse_d0697195-10b8-4309-a866-e5e2e8f7904a\r\n\r\n--changesetresponse_d0697195-10b8-4309-a866-e5e2e8f7904a\nContent-Type: application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: - W/\"datetime'2021-05-21T19%3A41%3A05.3346824Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: - https://chrisstablesprim.table.cosmos.azure.com/gotable3m8dvqbvcbgmg(PartitionKey='partition',RowKey='1')\r\nContent-ID: - 1\r\n\r\n\r\n--changesetresponse_01d951c7-cf0c-4ef5-a40a-38b651d346bf\nContent-Type: + W/\"datetime'2021-07-15T21%3A46%3A36.8018440Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: + https://seankaneprim.table.cosmos.azure.com/gotablex1913nmx6e729(PartitionKey='partition',RowKey='1')\r\nContent-ID: + 1\r\n\r\n\r\n--changesetresponse_d0697195-10b8-4309-a866-e5e2e8f7904a\nContent-Type: application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: - W/\"datetime'2021-05-21T19%3A41%3A05.3356040Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: - https://chrisstablesprim.table.cosmos.azure.com/gotable3m8dvqbvcbgmg(PartitionKey='partition',RowKey='2')\r\nContent-ID: - 2\r\n\r\n\r\n--changesetresponse_01d951c7-cf0c-4ef5-a40a-38b651d346bf\nContent-Type: + W/\"datetime'2021-07-15T21%3A46%3A36.8025608Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: + https://seankaneprim.table.cosmos.azure.com/gotablex1913nmx6e729(PartitionKey='partition',RowKey='2')\r\nContent-ID: + 2\r\n\r\n\r\n--changesetresponse_d0697195-10b8-4309-a866-e5e2e8f7904a\nContent-Type: application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: - W/\"datetime'2021-05-21T19%3A41%3A05.3362184Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: - https://chrisstablesprim.table.cosmos.azure.com/gotable3m8dvqbvcbgmg(PartitionKey='partition',RowKey='3')\r\nContent-ID: - 3\r\n\r\n\r\n--changesetresponse_01d951c7-cf0c-4ef5-a40a-38b651d346bf--\n--batchresponse_a9702722-351c-4503-882c-974676140382--\r\n" + W/\"datetime'2021-07-15T21%3A46%3A36.8030728Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: + https://seankaneprim.table.cosmos.azure.com/gotablex1913nmx6e729(PartitionKey='partition',RowKey='3')\r\nContent-ID: + 3\r\n\r\n\r\n--changesetresponse_d0697195-10b8-4309-a866-e5e2e8f7904a--\n--batchresponse_70883b2c-556a-465f-a880-896fcb616cfa--\r\n" headers: Content-Type: - - multipart/mixed; boundary=batchresponse_a9702722-351c-4503-882c-974676140382 + - multipart/mixed; boundary=batchresponse_70883b2c-556a-465f-a880-896fcb616cfa Date: - - Fri, 21 May 2021 19:41:04 GMT - Server: - - Microsoft-HTTPAPI/2.0 + - Thu, 15 Jul 2021 21:46:35 GMT X-Ms-Request-Id: - - 94500c18-401b-4b44-9882-f954843f31bd + - 54bd46ee-12aa-4a94-91da-5e15b4181d90 status: 202 Accepted code: 202 duration: "" @@ -118,53 +111,48 @@ interactions: Dataserviceversion: - "3.0" User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Fri, 21 May 2021 19:41:05 GMT + - Thu, 15 Jul 2021 21:46:37 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.cosmos.azure.com/gotable3m8dvqbvcbgmg()?%24filter=RowKey+eq+%271%27 + url: https://seankaneprim.table.cosmos.azure.com/gotablex1913nmx6e729()?%24filter=RowKey+eq+%271%27 method: GET response: - body: '{"value":[{"odata.etag":"W/\"datetime''2021-05-21T19%3A41%3A05.3346824Z''\"","BoolProp":true,"IntProp":1,"PartitionKey":"partition","RowKey":"1","SomeBinaryProperty@odata.type":"Edm.Binary","SomeBinaryProperty":"c29tZSBieXRlcw==","SomeDateProperty@odata.type":"Edm.DateTime","SomeDateProperty":"2021-05-21T19:41:05.1021027Z","SomeDoubleProperty0":1.0,"SomeDoubleProperty1":1.2345,"SomeGuidProperty@odata.type":"Edm.Guid","SomeGuidProperty":"c4d3ae3f-7292-4e24-6ba8-2e7aeb230a6a","SomeInt64Property@odata.type":"Edm.Int64","SomeInt64Property":"9223372036854775807","SomeIntProperty":42,"SomeStringProperty":"some - string","StringProp":"some string 1","Timestamp":"2021-05-21T19:41:05.3346824Z"}],"odata.metadata":"https://chrisstablesprim.table.cosmos.azure.com/$metadata#gotable3m8dvqbvcbgmg"}' + body: '{"value":[{"odata.etag":"W/\"datetime''2021-07-15T21%3A46%3A36.8018440Z''\"","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":1.0,"PartitionKey":"partition","RowKey":"1","String":"someString","Timestamp":"2021-07-15T21:46:36.8018440Z"}],"odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#gotablex1913nmx6e729"}' headers: Content-Type: - application/json;odata=minimalmetadata Date: - - Fri, 21 May 2021 19:41:04 GMT - Server: - - Microsoft-HTTPAPI/2.0 + - Thu, 15 Jul 2021 21:46:36 GMT X-Ms-Request-Id: - - 938e335a-d6f0-4d10-904f-ea9f7800149c - status: 200 Ok + - 330a2821-a9dc-4478-a54e-c44cfe68fc97 + status: 200 OK code: 200 duration: "" - request: - body: "--batch_1de6d73d-d2eb-4a17-7801-13a2879cfa9c\r\nContent-Type: multipart/mixed; - boundary=changeset_f6299849-8235-4d0c-757f-95ac2ffe2db7\r\n\r\n--changeset_f6299849-8235-4d0c-757f-95ac2ffe2db7\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://chrisstablesprim.table.cosmos.azure.com/gotable3m8dvqbvcbgmg(PartitionKey='partition',RowKey='1')?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + body: "--batch_8fa36a09-2e86-404c-6f73-a7feb9ec183b\r\nContent-Type: multipart/mixed; + boundary=changeset_b7546f22-aa51-481e-6b67-4722dc3666fc\r\n\r\n--changeset_b7546f22-aa51-481e-6b67-4722dc3666fc\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotablex1913nmx6e729(PartitionKey='partition',RowKey='1')?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json\r\nContent-Length: 63\r\nContent-Type: - application/json\r\nDataserviceversion: 3.0\r\nIf-Match: W/\"datetime'2021-05-21T19%3A41%3A05.3346824Z'\"\r\nX-Http-Method: - MERGE\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"MergeProperty\":\"foo\",\"PartitionKey\":\"partition\",\"RowKey\":\"1\"}\r\n--changeset_f6299849-8235-4d0c-757f-95ac2ffe2db7\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nDELETE https://chrisstablesprim.table.cosmos.azure.com/gotable3m8dvqbvcbgmg(PartitionKey='partition',RowKey='2')?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + application/json\r\nDataserviceversion: 3.0\r\nIf-Match: W/\"datetime'2021-07-15T21%3A46%3A36.8018440Z'\"\r\nX-Http-Method: + MERGE\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"MergeProperty\":\"foo\",\"PartitionKey\":\"partition\",\"RowKey\":\"1\"}\r\n--changeset_b7546f22-aa51-481e-6b67-4722dc3666fc\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nDELETE https://seankaneprim.table.cosmos.azure.com/gotablex1913nmx6e729(PartitionKey='partition',RowKey='2')?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nDataserviceversion: - 3.0\r\nIf-Match: *\r\nX-Ms-Version: 2019-02-02\r\n\r\n\r\n--changeset_f6299849-8235-4d0c-757f-95ac2ffe2db7\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPUT https://chrisstablesprim.table.cosmos.azure.com/gotable3m8dvqbvcbgmg(PartitionKey='partition',RowKey='3')?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + 3.0\r\nIf-Match: *\r\nX-Ms-Version: 2019-02-02\r\n\r\n\r\n--changeset_b7546f22-aa51-481e-6b67-4722dc3666fc\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPUT https://seankaneprim.table.cosmos.azure.com/gotablex1913nmx6e729(PartitionKey='partition',RowKey='3')?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json\r\nContent-Length: 65\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nIf-Match: *\r\nX-Ms-Version: - 2019-02-02\r\n\r\n{\"PartitionKey\":\"partition\",\"ReplaceProperty\":\"foo\",\"RowKey\":\"3\"}\r\n--changeset_f6299849-8235-4d0c-757f-95ac2ffe2db7\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://chrisstablesprim.table.cosmos.azure.com/gotable3m8dvqbvcbgmg?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + 2019-02-02\r\n\r\n{\"PartitionKey\":\"partition\",\"ReplaceProperty\":\"foo\",\"RowKey\":\"3\"}\r\n--changeset_b7546f22-aa51-481e-6b67-4722dc3666fc\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotablex1913nmx6e729?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 663\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"BoolProp\":true,\"IntProp\":4,\"PartitionKey\":\"partition\",\"RowKey\":\"4\",\"SomeBinaryProperty\":\"c29tZSBieXRlcw==\",\"SomeBinaryProperty@odata.type\":\"Edm.Binary\",\"SomeDateProperty\":\"2021-05-21T19:41:05.1021027Z\",\"SomeDateProperty@odata.type\":\"Edm.DateTime\",\"SomeDoubleProperty0\":1,\"SomeDoubleProperty0@odata.type\":\"Edm.Double\",\"SomeDoubleProperty1\":1.2345,\"SomeDoubleProperty1@odata.type\":\"Edm.Double\",\"SomeGuidProperty\":\"e08237e7-441b-4d89-7e71-dc8cd8dd82fb\",\"SomeGuidProperty@odata.type\":\"Edm.Guid\",\"SomeInt64Property\":\"9223372036854775807\",\"SomeInt64Property@odata.type\":\"Edm.Int64\",\"SomeIntProperty\":42,\"SomeStringProperty\":\"some - string\",\"StringProp\":\"some string 4\"}\r\n--changeset_f6299849-8235-4d0c-757f-95ac2ffe2db7\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://chrisstablesprim.table.cosmos.azure.com/gotable3m8dvqbvcbgmg?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + 260\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Float@odata.type\":\"Edm.Double\",\"Integer\":4,\"Integer@odata.type\":\"Edm.Double\",\"PartitionKey\":\"partition\",\"RowKey\":\"4\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_b7546f22-aa51-481e-6b67-4722dc3666fc\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotablex1913nmx6e729?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 663\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"BoolProp\":true,\"IntProp\":5,\"PartitionKey\":\"partition\",\"RowKey\":\"5\",\"SomeBinaryProperty\":\"c29tZSBieXRlcw==\",\"SomeBinaryProperty@odata.type\":\"Edm.Binary\",\"SomeDateProperty\":\"2021-05-21T19:41:05.1021027Z\",\"SomeDateProperty@odata.type\":\"Edm.DateTime\",\"SomeDoubleProperty0\":1,\"SomeDoubleProperty0@odata.type\":\"Edm.Double\",\"SomeDoubleProperty1\":1.2345,\"SomeDoubleProperty1@odata.type\":\"Edm.Double\",\"SomeGuidProperty\":\"b486e769-b01f-4a13-5231-bca1795f2797\",\"SomeGuidProperty@odata.type\":\"Edm.Guid\",\"SomeInt64Property\":\"9223372036854775807\",\"SomeInt64Property@odata.type\":\"Edm.Int64\",\"SomeIntProperty\":42,\"SomeStringProperty\":\"some - string\",\"StringProp\":\"some string 5\"}\r\n--changeset_f6299849-8235-4d0c-757f-95ac2ffe2db7--\r\n\r\n--batch_1de6d73d-d2eb-4a17-7801-13a2879cfa9c--\r\n" + 260\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Float@odata.type\":\"Edm.Double\",\"Integer\":5,\"Integer@odata.type\":\"Edm.Double\",\"PartitionKey\":\"partition\",\"RowKey\":\"5\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_b7546f22-aa51-481e-6b67-4722dc3666fc--\r\n\r\n--batch_8fa36a09-2e86-404c-6f73-a7feb9ec183b--\r\n" form: {} headers: Accept: @@ -172,45 +160,43 @@ interactions: Authorization: - sanitized Content-Length: - - "3935" + - "3109" Content-Type: - - multipart/mixed; boundary=batch_1de6d73d-d2eb-4a17-7801-13a2879cfa9c + - multipart/mixed; boundary=batch_8fa36a09-2e86-404c-6f73-a7feb9ec183b Dataserviceversion: - "3.0" User-Agent: - - azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; Windows_NT) + - azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Fri, 21 May 2021 19:41:05 GMT + - Thu, 15 Jul 2021 21:46:38 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.cosmos.azure.com/$batch + url: https://seankaneprim.table.cosmos.azure.com/$batch method: POST response: - body: "--batchresponse_26ff053e-5a43-4bed-9fee-351647f22cb8\r\nContent-Type: multipart/mixed; - boundary=changesetresponse_7bd4dd3f-b230-48aa-93a0-659d19e94058\r\n\r\n--changesetresponse_7bd4dd3f-b230-48aa-93a0-659d19e94058\nContent-Type: + body: "--batchresponse_45d324a2-01ff-4d5a-bb35-afdec77dcd6f\r\nContent-Type: multipart/mixed; + boundary=changesetresponse_bcb7aed4-3456-4ea5-8487-99ca22e577d7\r\n\r\n--changesetresponse_bcb7aed4-3456-4ea5-8487-99ca22e577d7\nContent-Type: application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: - W/\"datetime'2021-05-21T19%3A41%3A05.5514632Z'\"\r\nContent-ID: 1\r\n\r\n\r\n--changesetresponse_7bd4dd3f-b230-48aa-93a0-659d19e94058\nContent-Type: + W/\"datetime'2021-07-15T21%3A46%3A37.0683912Z'\"\r\nContent-ID: 1\r\n\r\n\r\n--changesetresponse_bcb7aed4-3456-4ea5-8487-99ca22e577d7\nContent-Type: application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nContent-ID: - 2\r\n\r\n\r\n--changesetresponse_7bd4dd3f-b230-48aa-93a0-659d19e94058\nContent-Type: + 2\r\n\r\n\r\n--changesetresponse_bcb7aed4-3456-4ea5-8487-99ca22e577d7\nContent-Type: application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: - W/\"datetime'2021-05-21T19%3A41%3A05.5545352Z'\"\r\nContent-ID: 3\r\n\r\n\r\n--changesetresponse_7bd4dd3f-b230-48aa-93a0-659d19e94058\nContent-Type: + W/\"datetime'2021-07-15T21%3A46%3A37.0716680Z'\"\r\nContent-ID: 3\r\n\r\n\r\n--changesetresponse_bcb7aed4-3456-4ea5-8487-99ca22e577d7\nContent-Type: application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: - W/\"datetime'2021-05-21T19%3A41%3A05.5551496Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: - https://chrisstablesprim.table.cosmos.azure.com/gotable3m8dvqbvcbgmg(PartitionKey='partition',RowKey='4')\r\nContent-ID: - 4\r\n\r\n\r\n--changesetresponse_7bd4dd3f-b230-48aa-93a0-659d19e94058\nContent-Type: + W/\"datetime'2021-07-15T21%3A46%3A37.0725896Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: + https://seankaneprim.table.cosmos.azure.com/gotablex1913nmx6e729(PartitionKey='partition',RowKey='4')\r\nContent-ID: + 4\r\n\r\n\r\n--changesetresponse_bcb7aed4-3456-4ea5-8487-99ca22e577d7\nContent-Type: application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: - W/\"datetime'2021-05-21T19%3A41%3A05.5557640Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: - https://chrisstablesprim.table.cosmos.azure.com/gotable3m8dvqbvcbgmg(PartitionKey='partition',RowKey='5')\r\nContent-ID: - 5\r\n\r\n\r\n--changesetresponse_7bd4dd3f-b230-48aa-93a0-659d19e94058--\n--batchresponse_26ff053e-5a43-4bed-9fee-351647f22cb8--\r\n" + W/\"datetime'2021-07-15T21%3A46%3A37.0732040Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: + https://seankaneprim.table.cosmos.azure.com/gotablex1913nmx6e729(PartitionKey='partition',RowKey='5')\r\nContent-ID: + 5\r\n\r\n\r\n--changesetresponse_bcb7aed4-3456-4ea5-8487-99ca22e577d7--\n--batchresponse_45d324a2-01ff-4d5a-bb35-afdec77dcd6f--\r\n" headers: Content-Type: - - multipart/mixed; boundary=batchresponse_26ff053e-5a43-4bed-9fee-351647f22cb8 + - multipart/mixed; boundary=batchresponse_45d324a2-01ff-4d5a-bb35-afdec77dcd6f Date: - - Fri, 21 May 2021 19:41:04 GMT - Server: - - Microsoft-HTTPAPI/2.0 + - Thu, 15 Jul 2021 21:46:36 GMT X-Ms-Request-Id: - - 1fdc1f60-328f-4921-aa92-4daa90d9d983 + - 62b06f3d-91a5-4e05-8a62-24437e1b09de status: 202 Accepted code: 202 duration: "" @@ -225,27 +211,24 @@ interactions: Dataserviceversion: - "3.0" User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Fri, 21 May 2021 19:41:05 GMT + - Thu, 15 Jul 2021 21:46:38 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.cosmos.azure.com/gotable3m8dvqbvcbgmg()?%24filter=RowKey+eq+%271%27 + url: https://seankaneprim.table.cosmos.azure.com/gotablex1913nmx6e729()?%24filter=RowKey+eq+%271%27 method: GET response: - body: '{"value":[{"odata.etag":"W/\"datetime''2021-05-21T19%3A41%3A05.5514632Z''\"","BoolProp":true,"IntProp":1,"PartitionKey":"partition","RowKey":"1","SomeBinaryProperty@odata.type":"Edm.Binary","SomeBinaryProperty":"c29tZSBieXRlcw==","SomeDateProperty@odata.type":"Edm.DateTime","SomeDateProperty":"2021-05-21T19:41:05.1021027Z","SomeDoubleProperty0":1.0,"SomeDoubleProperty1":1.2345,"SomeGuidProperty@odata.type":"Edm.Guid","SomeGuidProperty":"c4d3ae3f-7292-4e24-6ba8-2e7aeb230a6a","SomeInt64Property@odata.type":"Edm.Int64","SomeInt64Property":"9223372036854775807","SomeIntProperty":42,"SomeStringProperty":"some - string","StringProp":"some string 1","MergeProperty":"foo","Timestamp":"2021-05-21T19:41:05.5514632Z"}],"odata.metadata":"https://chrisstablesprim.table.cosmos.azure.com/$metadata#gotable3m8dvqbvcbgmg"}' + body: '{"value":[{"odata.etag":"W/\"datetime''2021-07-15T21%3A46%3A37.0683912Z''\"","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":1.0,"PartitionKey":"partition","RowKey":"1","String":"someString","MergeProperty":"foo","Timestamp":"2021-07-15T21:46:37.0683912Z"}],"odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#gotablex1913nmx6e729"}' headers: Content-Type: - application/json;odata=minimalmetadata Date: - - Fri, 21 May 2021 19:41:04 GMT - Server: - - Microsoft-HTTPAPI/2.0 + - Thu, 15 Jul 2021 21:46:36 GMT X-Ms-Request-Id: - - 36f8f06d-a7db-40ca-a5c3-9995d9921dc2 - status: 200 Ok + - 7c4cbf31-6135-4146-8f87-6a3b2a229886 + status: 200 OK code: 200 duration: "" - request: @@ -257,25 +240,21 @@ interactions: Authorization: - sanitized User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Fri, 21 May 2021 19:41:05 GMT + - Thu, 15 Jul 2021 21:46:38 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.cosmos.azure.com/Tables('gotable3m8dvqbvcbgmg') + url: https://seankaneprim.table.cosmos.azure.com/Tables('gotablex1913nmx6e729') method: DELETE response: body: "" headers: - Content-Length: - - "0" Date: - - Fri, 21 May 2021 19:41:06 GMT - Server: - - Microsoft-HTTPAPI/2.0 + - Thu, 15 Jul 2021 21:46:36 GMT X-Ms-Request-Id: - - a468a3f2-b961-4185-9082-454f33840250 + - 88d98517-9416-448a-92fc-e6cdb15089ef status: 204 No Content code: 204 duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestCreateTable-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestCreateTable-variables.yaml index 5a403251353a..9cb772c7e072 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestCreateTable-variables.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestCreateTable-variables.yaml @@ -1,5 +1,5 @@ --- COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com -TABLES_COSMOS_ACCOUNT_NAME: chrisstablesprim +TABLES_COSMOS_ACCOUNT_NAME: seankaneprim TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== -randomSeed: "1617573289" +randomSeed: "1626385598" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestCreateTable.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestCreateTable.yaml index a60e34d514b1..2cf293b24ea2 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestCreateTable.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestCreateTable.yaml @@ -2,7 +2,7 @@ version: 1 interactions: - request: - body: '{"TableName":"gotable3atc3ia9qkkbd"}' + body: '{"TableName":"gotablesu1uux0ofb68c"}' form: {} headers: Accept: @@ -16,29 +16,27 @@ interactions: Dataserviceversion: - "3.0" User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Sun, 04 Apr 2021 21:54:49 GMT + - Thu, 15 Jul 2021 21:46:38 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.cosmos.azure.com/Tables + url: https://seankaneprim.table.cosmos.azure.com/Tables method: POST response: - body: '{"TableName":"gotable3atc3ia9qkkbd","odata.metadata":"https://chrisstablesprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' + body: '{"TableName":"gotablesu1uux0ofb68c","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' headers: Content-Type: - application/json;odata=minimalmetadata Date: - - Sun, 04 Apr 2021 21:54:50 GMT + - Thu, 15 Jul 2021 21:46:37 GMT Etag: - - W/"datetime'2021-04-04T21%3A54%3A49.7968136Z'" + - W/"datetime'2021-07-15T21%3A46%3A37.7185288Z'" Location: - - https://chrisstablesprim.table.cosmos.azure.com/Tables('gotable3atc3ia9qkkbd') - Server: - - Microsoft-HTTPAPI/2.0 + - https://seankaneprim.table.cosmos.azure.com/Tables('gotablesu1uux0ofb68c') X-Ms-Request-Id: - - b9386c93-2228-4a78-bcab-652c24994580 + - 6fad68ed-652d-4b1e-b4bf-7d3ab629c35d status: 201 Created code: 201 duration: "" @@ -51,25 +49,21 @@ interactions: Authorization: - sanitized User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Sun, 04 Apr 2021 21:54:50 GMT + - Thu, 15 Jul 2021 21:46:39 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.cosmos.azure.com/Tables('gotable3atc3ia9qkkbd') + url: https://seankaneprim.table.cosmos.azure.com/Tables('gotablesu1uux0ofb68c') method: DELETE response: body: "" headers: - Content-Length: - - "0" Date: - - Sun, 04 Apr 2021 21:54:50 GMT - Server: - - Microsoft-HTTPAPI/2.0 + - Thu, 15 Jul 2021 21:46:37 GMT X-Ms-Request-Id: - - f8cecc20-febd-48ed-950f-6fb532eb326d + - bd81926c-6e0e-4345-bfbd-784e058c0e5b status: 204 No Content code: 204 duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestDeleteEntity-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestDeleteEntity-variables.yaml index 4c7074f25ef1..dc2cd9b83089 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestDeleteEntity-variables.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestDeleteEntity-variables.yaml @@ -1,5 +1,5 @@ --- COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com -TABLES_COSMOS_ACCOUNT_NAME: chrisstablesprim +TABLES_COSMOS_ACCOUNT_NAME: seankaneprim TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== -randomSeed: "1621624378" +randomSeed: "1626385599" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestDeleteEntity.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestDeleteEntity.yaml index dbdadd952053..598664d91821 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestDeleteEntity.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestDeleteEntity.yaml @@ -2,7 +2,7 @@ version: 1 interactions: - request: - body: '{"TableName":"gotablezdpmnyzkryrie"}' + body: '{"TableName":"gotableiw13ixxtlwtnx"}' form: {} headers: Accept: @@ -16,35 +16,33 @@ interactions: Dataserviceversion: - "3.0" User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Fri, 21 May 2021 19:12:58 GMT + - Thu, 15 Jul 2021 21:46:39 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.cosmos.azure.com/Tables + url: https://seankaneprim.table.cosmos.azure.com/Tables method: POST response: - body: '{"TableName":"gotablezdpmnyzkryrie","odata.metadata":"https://chrisstablesprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' + body: '{"TableName":"gotableiw13ixxtlwtnx","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' headers: Content-Type: - application/json;odata=minimalmetadata Date: - - Fri, 21 May 2021 19:12:59 GMT + - Thu, 15 Jul 2021 21:46:38 GMT Etag: - - W/"datetime'2021-05-21T19%3A12%3A59.2534536Z'" + - W/"datetime'2021-07-15T21%3A46%3A38.8518920Z'" Location: - - https://chrisstablesprim.table.cosmos.azure.com/Tables('gotablezdpmnyzkryrie') - Server: - - Microsoft-HTTPAPI/2.0 + - https://seankaneprim.table.cosmos.azure.com/Tables('gotableiw13ixxtlwtnx') X-Ms-Request-Id: - - 7c429f5f-dca8-4df1-bd4b-f5bc1fde8790 - status: 201 Ok + - 24b0da8b-5e18-4c1f-b6db-fa0c1439530e + status: 201 Created code: 201 duration: "" - request: - body: '{"BoolProp":true,"IntProp":1,"PartitionKey":"partition","RowKey":"1","StringProp":"some - string 1"}' + body: '{"Bool":true,"Integer":1,"PartitionKey":"partition","RowKey":"1","String":"some + string 1","Timestamp":"0001-01-01T00:00:00Z"}' form: {} headers: Accept: @@ -52,7 +50,7 @@ interactions: Authorization: - sanitized Content-Length: - - "98" + - "125" Content-Type: - application/json Dataserviceversion: @@ -60,31 +58,27 @@ interactions: Prefer: - return-no-content User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Fri, 21 May 2021 19:12:59 GMT + - Thu, 15 Jul 2021 21:46:40 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.cosmos.azure.com/gotablezdpmnyzkryrie + url: https://seankaneprim.table.cosmos.azure.com/gotableiw13ixxtlwtnx method: POST response: body: "" headers: - Content-Length: - - "0" Date: - - Fri, 21 May 2021 19:12:59 GMT + - Thu, 15 Jul 2021 21:46:38 GMT Etag: - - W/"datetime'2021-05-21T19%3A12%3A59.7676040Z'" + - W/"datetime'2021-07-15T21%3A46%3A39.6188680Z'" Location: - - https://chrisstablesprim.table.cosmos.azure.com/gotablezdpmnyzkryrie(PartitionKey='partition',RowKey='1') + - https://seankaneprim.table.cosmos.azure.com/gotableiw13ixxtlwtnx(PartitionKey='partition',RowKey='1') Preference-Applied: - return-no-content - Server: - - Microsoft-HTTPAPI/2.0 X-Ms-Request-Id: - - 44675488-a37b-4fe1-b501-0e28dbe55652 + - 379d9f0b-f2b2-4d80-b27d-8edb7565baf5 status: 204 No Content code: 204 duration: "" @@ -101,25 +95,21 @@ interactions: If-Match: - '*' User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Fri, 21 May 2021 19:12:59 GMT + - Thu, 15 Jul 2021 21:46:40 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.cosmos.azure.com/gotablezdpmnyzkryrie(PartitionKey='partition',RowKey='1') + url: https://seankaneprim.table.cosmos.azure.com/gotableiw13ixxtlwtnx(PartitionKey='partition',RowKey='1') method: DELETE response: body: "" headers: - Content-Length: - - "0" Date: - - Fri, 21 May 2021 19:12:59 GMT - Server: - - Microsoft-HTTPAPI/2.0 + - Thu, 15 Jul 2021 21:46:38 GMT X-Ms-Request-Id: - - 34dc8550-34e5-45c7-9625-0f5ba9721089 + - 2ad39a11-c825-459c-a301-f67973a0788d status: 204 No Content code: 204 duration: "" @@ -132,25 +122,21 @@ interactions: Authorization: - sanitized User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Fri, 21 May 2021 19:12:59 GMT + - Thu, 15 Jul 2021 21:46:40 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.cosmos.azure.com/Tables('gotablezdpmnyzkryrie') + url: https://seankaneprim.table.cosmos.azure.com/Tables('gotableiw13ixxtlwtnx') method: DELETE response: body: "" headers: - Content-Length: - - "0" Date: - - Fri, 21 May 2021 19:12:59 GMT - Server: - - Microsoft-HTTPAPI/2.0 + - Thu, 15 Jul 2021 21:46:39 GMT X-Ms-Request-Id: - - 56f22cb9-bf6b-4764-8f79-2afa92a5c479 + - 98c27751-7675-40af-9204-2e0f99701583 status: 204 No Content code: 204 duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestEdmMarshalling-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestEdmMarshalling-variables.yaml new file mode 100644 index 000000000000..9f52abfdd234 --- /dev/null +++ b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestEdmMarshalling-variables.yaml @@ -0,0 +1,5 @@ +--- +COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com +TABLES_COSMOS_ACCOUNT_NAME: seankaneprim +TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== +randomSeed: "1626705440" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestEdmMarshalling.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestEdmMarshalling.yaml new file mode 100644 index 000000000000..8834a9c23d28 --- /dev/null +++ b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestEdmMarshalling.yaml @@ -0,0 +1,143 @@ +--- +version: 1 +interactions: +- request: + body: '{"TableName":"gotableymm29p39v3dmt"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "36" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Mon, 19 Jul 2021 14:37:20 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.cosmos.azure.com/Tables + method: POST + response: + body: '{"TableName":"gotableymm29p39v3dmt","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' + headers: + Content-Type: + - application/json;odata=minimalmetadata + Date: + - Mon, 19 Jul 2021 14:37:13 GMT + Etag: + - W/"datetime'2021-07-19T14%3A37%3A13.8914312Z'" + Location: + - https://seankaneprim.table.cosmos.azure.com/Tables('gotableymm29p39v3dmt') + X-Ms-Request-Id: + - 0a694e62-7be5-4885-8232-d4f6264846bb + status: 201 Created + code: 201 + duration: "" +- request: + body: '{"Binary":"U29tZUJpbmFyeQ==","Binary@odata.type":"Edm.Binary","Bool":false,"DateTime":"2013-08-02T17:37:43.0090043Z","DateTime@odata.type":"Edm.DateTime","Double":1234.1234,"Guid":"4185404a-5818-48c3-b9be-f217df0dba6f","Guid@odata.type":"Edm.Guid","Int32":1234,"Int64":"123456789012","Int64@odata.type":"Edm.Int64","PartitionKey":"partition","RowKey":"1","String":"test"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "371" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + Prefer: + - return-no-content + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Mon, 19 Jul 2021 14:37:21 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.cosmos.azure.com/gotableymm29p39v3dmt + method: POST + response: + body: "" + headers: + Date: + - Mon, 19 Jul 2021 14:37:14 GMT + Etag: + - W/"datetime'2021-07-19T14%3A37%3A14.8523528Z'" + Location: + - https://seankaneprim.table.cosmos.azure.com/gotableymm29p39v3dmt(PartitionKey='partition',RowKey='1') + Preference-Applied: + - return-no-content + X-Ms-Request-Id: + - 48e97267-ccab-4b5d-bb13-45a18fdd78be + status: 204 No Content + code: 204 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Mon, 19 Jul 2021 14:37:21 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.cosmos.azure.com/gotableymm29p39v3dmt(PartitionKey='partition',RowKey='1')?%24format=application%2Fjson%3Bodata%3Dfullmetadata + method: GET + response: + body: '{"odata.metadata":"https://seankaneprim.table.cosmos.azure.com/gotableymm29p39v3dmt/$metadata#gotableymm29p39v3dmt/@Element","odata.etag":"W/\"datetime''2021-07-19T14%3A37%3A14.8523528Z''\"","Binary@odata.type":"Edm.Binary","Binary":"U29tZUJpbmFyeQ==","Bool":false,"DateTime@odata.type":"Edm.DateTime","DateTime":"2013-08-02T17:37:43.0090043Z","Double":1234.1234,"Guid@odata.type":"Edm.Guid","Guid":"4185404a-5818-48c3-b9be-f217df0dba6f","Int32":1234,"Int64@odata.type":"Edm.Int64","Int64":"123456789012","PartitionKey":"partition","RowKey":"1","String":"test","Timestamp":"2021-07-19T14:37:14.8523528Z"}' + headers: + Content-Type: + - application/json;odata=minimalmetadata + Date: + - Mon, 19 Jul 2021 14:37:14 GMT + Etag: + - W/"datetime'2021-07-19T14%3A37%3A14.8523528Z'" + X-Ms-Request-Id: + - 565a0152-1211-4117-8df7-f5d2258f1950 + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Mon, 19 Jul 2021 14:37:22 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.cosmos.azure.com/Tables('gotableymm29p39v3dmt') + method: DELETE + response: + body: "" + headers: + Date: + - Mon, 19 Jul 2021 14:37:14 GMT + X-Ms-Request-Id: + - a19b0489-e9e1-41dd-8e9b-14bdc8554320 + status: 204 No Content + code: 204 + duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestGetEntity.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestGetEntity.yaml deleted file mode 100644 index 8d9555ed484a..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestGetEntity.yaml +++ /dev/null @@ -1,157 +0,0 @@ ---- -version: 1 -interactions: -- request: - body: '{"TableName":"gotable6durux9k2gsr8"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "36" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; - Windows_NT) - X-Ms-Date: - - Fri, 21 May 2021 21:59:39 GMT - X-Ms-Version: - - "2019-02-02" - url: https://chrisstablesprim.table.cosmos.azure.com/Tables - method: POST - response: - body: '{"TableName":"gotable6durux9k2gsr8","odata.metadata":"https://chrisstablesprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' - headers: - Content-Type: - - application/json;odata=minimalmetadata - Date: - - Fri, 21 May 2021 21:59:40 GMT - Etag: - - W/"datetime'2021-05-21T21%3A59%3A40.3318280Z'" - Location: - - https://chrisstablesprim.table.cosmos.azure.com/Tables('gotable6durux9k2gsr8') - Server: - - Microsoft-HTTPAPI/2.0 - X-Ms-Request-Id: - - c2e26f70-23d9-4093-a9a4-9540ad534c18 - status: 201 Ok - code: 201 - duration: "" -- request: - body: '{"BoolProp":true,"IntProp":1,"PartitionKey":"partition","RowKey":"1","StringProp":"some - string 1"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "98" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - Prefer: - - return-no-content - User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; - Windows_NT) - X-Ms-Date: - - Fri, 21 May 2021 21:59:40 GMT - X-Ms-Version: - - "2019-02-02" - url: https://chrisstablesprim.table.cosmos.azure.com/gotable6durux9k2gsr8 - method: POST - response: - body: "" - headers: - Content-Length: - - "0" - Date: - - Fri, 21 May 2021 21:59:40 GMT - Etag: - - W/"datetime'2021-05-21T21%3A59%3A40.8694280Z'" - Location: - - https://chrisstablesprim.table.cosmos.azure.com/gotable6durux9k2gsr8(PartitionKey='partition',RowKey='1') - Preference-Applied: - - return-no-content - Server: - - Microsoft-HTTPAPI/2.0 - X-Ms-Request-Id: - - 6c631ecc-f986-46a6-9fbb-7d3c853b0ed1 - status: 204 No Content - code: 204 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; - Windows_NT) - X-Ms-Date: - - Fri, 21 May 2021 21:59:40 GMT - X-Ms-Version: - - "2019-02-02" - url: https://chrisstablesprim.table.cosmos.azure.com/gotable6durux9k2gsr8(PartitionKey='partition',RowKey='1') - method: GET - response: - body: '{"odata.metadata":"https://chrisstablesprim.table.cosmos.azure.com/gotable6durux9k2gsr8/$metadata#gotable6durux9k2gsr8/@Element","odata.etag":"W/\"datetime''2021-05-21T21%3A59%3A40.8694280Z''\"","BoolProp":true,"IntProp":1,"PartitionKey":"partition","RowKey":"1","StringProp":"some - string 1","Timestamp":"2021-05-21T21:59:40.8694280Z"}' - headers: - Content-Type: - - application/json;odata=minimalmetadata - Date: - - Fri, 21 May 2021 21:59:40 GMT - Etag: - - W/"datetime'2021-05-21T21%3A59%3A40.8694280Z'" - Server: - - Microsoft-HTTPAPI/2.0 - X-Ms-Request-Id: - - fdfab123-339c-4d90-947e-caf22d86c87d - status: 200 Ok - code: 200 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; - Windows_NT) - X-Ms-Date: - - Fri, 21 May 2021 21:59:40 GMT - X-Ms-Version: - - "2019-02-02" - url: https://chrisstablesprim.table.cosmos.azure.com/Tables('gotable6durux9k2gsr8') - method: DELETE - response: - body: "" - headers: - Content-Length: - - "0" - Date: - - Fri, 21 May 2021 21:59:40 GMT - Server: - - Microsoft-HTTPAPI/2.0 - X-Ms-Request-Id: - - 8dd07d23-ae92-459a-bbb4-3f8575021ad5 - status: 204 No Content - code: 204 - duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestInvalidEntity-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestInvalidEntity-variables.yaml index dddafd0a9358..16a55d2ee5e6 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestInvalidEntity-variables.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestInvalidEntity-variables.yaml @@ -2,4 +2,4 @@ COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com TABLES_COSMOS_ACCOUNT_NAME: seankaneprim TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== -randomSeed: "1625174648" +randomSeed: "1626385601" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestInvalidEntity.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestInvalidEntity.yaml index f7d6ce7cd31d..1ac264e42f55 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestInvalidEntity.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestInvalidEntity.yaml @@ -2,7 +2,7 @@ version: 1 interactions: - request: - body: '{"TableName":"gotabley4974nkcrqrre"}' + body: '{"TableName":"gotableo26y3cx86ywa9"}' form: {} headers: Accept: @@ -19,24 +19,24 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 01 Jul 2021 21:24:08 GMT + - Thu, 15 Jul 2021 21:46:41 GMT X-Ms-Version: - "2019-02-02" url: https://seankaneprim.table.cosmos.azure.com/Tables method: POST response: - body: '{"TableName":"gotabley4974nkcrqrre","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' + body: '{"TableName":"gotableo26y3cx86ywa9","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' headers: Content-Type: - application/json;odata=minimalmetadata Date: - - Thu, 01 Jul 2021 21:24:10 GMT + - Thu, 15 Jul 2021 21:46:39 GMT Etag: - - W/"datetime'2021-07-01T21%3A24%3A10.2885384Z'" + - W/"datetime'2021-07-15T21%3A46%3A40.2601992Z'" Location: - - https://seankaneprim.table.cosmos.azure.com/Tables('gotabley4974nkcrqrre') + - https://seankaneprim.table.cosmos.azure.com/Tables('gotableo26y3cx86ywa9') X-Ms-Request-Id: - - 26fb80e3-75f9-42b4-b9a9-7a3d6a937b7b + - c93fefce-691a-4259-8277-b289a4f89f49 status: 201 Created code: 201 duration: "" @@ -60,22 +60,22 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 01 Jul 2021 21:24:09 GMT + - Thu, 15 Jul 2021 21:46:41 GMT X-Ms-Version: - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotabley4974nkcrqrre + url: https://seankaneprim.table.cosmos.azure.com/gotableo26y3cx86ywa9 method: POST response: body: "{\"odata.error\":{\"code\":\"PropertiesNeedValue\",\"message\":{\"lang\":\"en-us\",\"value\":\"PartitionKey/RowKey - cannot be empty\\r\\nActivityId: f63a01ba-3218-4ad3-bc69-a5dc878e37d4, documentdb-dotnet-sdk/2.14.0 - Host/64-bit MicrosoftWindowsNT/6.2.9200.0\\nRequestID:f63a01ba-3218-4ad3-bc69-a5dc878e37d4\\n\"}}}\r\n" + cannot be empty\\r\\nActivityId: 349fb529-6aab-4712-9363-dd5ad38fd531, documentdb-dotnet-sdk/2.14.0 + Host/64-bit MicrosoftWindowsNT/6.2.9200.0\\nRequestID:349fb529-6aab-4712-9363-dd5ad38fd531\\n\"}}}\r\n" headers: Content-Type: - application/json;odata=fullmetadata Date: - - Thu, 01 Jul 2021 21:24:10 GMT + - Thu, 15 Jul 2021 21:46:40 GMT X-Ms-Request-Id: - - f63a01ba-3218-4ad3-bc69-a5dc878e37d4 + - 349fb529-6aab-4712-9363-dd5ad38fd531 status: 400 Bad Request code: 400 duration: "" @@ -91,18 +91,18 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 01 Jul 2021 21:24:09 GMT + - Thu, 15 Jul 2021 21:46:42 GMT X-Ms-Version: - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/Tables('gotabley4974nkcrqrre') + url: https://seankaneprim.table.cosmos.azure.com/Tables('gotableo26y3cx86ywa9') method: DELETE response: body: "" headers: Date: - - Thu, 01 Jul 2021 21:24:11 GMT + - Thu, 15 Jul 2021 21:46:40 GMT X-Ms-Request-Id: - - f9c8bf95-0696-44cb-85fb-860689bb1da0 + - 79a76dc6-495b-45b9-a556-74b105b2b28a status: 204 No Content code: 204 duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestMergeEntity-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestMergeEntity-variables.yaml index db05ce09d74c..a75114e81e50 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestMergeEntity-variables.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestMergeEntity-variables.yaml @@ -1,5 +1,5 @@ --- COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com -TABLES_COSMOS_ACCOUNT_NAME: chrisstablesprim +TABLES_COSMOS_ACCOUNT_NAME: seankaneprim TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== -randomSeed: "1621628756" +randomSeed: "1626385602" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestMergeEntity.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestMergeEntity.yaml index 77bdca4ccce1..5ead71d39a1c 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestMergeEntity.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestMergeEntity.yaml @@ -2,7 +2,7 @@ version: 1 interactions: - request: - body: '{"TableName":"gotable6emf0bk6m2agc"}' + body: '{"TableName":"gotableywepa36ndzpzr"}' form: {} headers: Accept: @@ -16,35 +16,33 @@ interactions: Dataserviceversion: - "3.0" User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Fri, 21 May 2021 20:25:56 GMT + - Thu, 15 Jul 2021 21:46:42 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.cosmos.azure.com/Tables + url: https://seankaneprim.table.cosmos.azure.com/Tables method: POST response: - body: '{"TableName":"gotable6emf0bk6m2agc","odata.metadata":"https://chrisstablesprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' + body: '{"TableName":"gotableywepa36ndzpzr","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' headers: Content-Type: - application/json;odata=minimalmetadata Date: - - Fri, 21 May 2021 20:25:57 GMT + - Thu, 15 Jul 2021 21:46:41 GMT Etag: - - W/"datetime'2021-05-21T20%3A25%3A57.4829064Z'" + - W/"datetime'2021-07-15T21%3A46%3A41.4738440Z'" Location: - - https://chrisstablesprim.table.cosmos.azure.com/Tables('gotable6emf0bk6m2agc') - Server: - - Microsoft-HTTPAPI/2.0 + - https://seankaneprim.table.cosmos.azure.com/Tables('gotableywepa36ndzpzr') X-Ms-Request-Id: - - 5fa5b82f-551e-424c-8695-36d3099e2ec0 - status: 201 Ok + - 45bd7a97-85c0-4a53-b6c5-63f9061d4d55 + status: 201 Created code: 201 duration: "" - request: - body: '{"BoolProp":true,"IntProp":1,"PartitionKey":"partition","RowKey":"1","StringProp":"some - string 1"}' + body: '{"Bool":true,"Integer":1,"PartitionKey":"partition","RowKey":"1","String":"some + string 1","Timestamp":"0001-01-01T00:00:00Z"}' form: {} headers: Accept: @@ -52,7 +50,7 @@ interactions: Authorization: - sanitized Content-Length: - - "98" + - "125" Content-Type: - application/json Dataserviceversion: @@ -60,31 +58,27 @@ interactions: Prefer: - return-no-content User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Fri, 21 May 2021 20:25:57 GMT + - Thu, 15 Jul 2021 21:46:43 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.cosmos.azure.com/gotable6emf0bk6m2agc + url: https://seankaneprim.table.cosmos.azure.com/gotableywepa36ndzpzr method: POST response: body: "" headers: - Content-Length: - - "0" Date: - - Fri, 21 May 2021 20:25:57 GMT + - Thu, 15 Jul 2021 21:46:41 GMT Etag: - - W/"datetime'2021-05-21T20%3A25%3A58.0876808Z'" + - W/"datetime'2021-07-15T21%3A46%3A42.2534152Z'" Location: - - https://chrisstablesprim.table.cosmos.azure.com/gotable6emf0bk6m2agc(PartitionKey='partition',RowKey='1') + - https://seankaneprim.table.cosmos.azure.com/gotableywepa36ndzpzr(PartitionKey='partition',RowKey='1') Preference-Applied: - return-no-content - Server: - - Microsoft-HTTPAPI/2.0 X-Ms-Request-Id: - - 51bcbecc-ab8e-4c77-8f28-92843e3bd90c + - 937b0662-fd0a-4f27-8f52-258f81876137 status: 204 No Content code: 204 duration: "" @@ -99,31 +93,32 @@ interactions: Dataserviceversion: - "3.0" User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Fri, 21 May 2021 20:25:57 GMT + - Thu, 15 Jul 2021 21:46:43 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.cosmos.azure.com/gotable6emf0bk6m2agc()?%24filter=RowKey+eq+%271%27 + url: https://seankaneprim.table.cosmos.azure.com/gotableywepa36ndzpzr(PartitionKey='partition',RowKey='1') method: GET response: - body: '{"value":[{"odata.etag":"W/\"datetime''2021-05-21T20%3A25%3A58.0876808Z''\"","BoolProp":true,"IntProp":1,"PartitionKey":"partition","RowKey":"1","StringProp":"some - string 1","Timestamp":"2021-05-21T20:25:58.0876808Z"}],"odata.metadata":"https://chrisstablesprim.table.cosmos.azure.com/$metadata#gotable6emf0bk6m2agc"}' + body: '{"odata.metadata":"https://seankaneprim.table.cosmos.azure.com/gotableywepa36ndzpzr/$metadata#gotableywepa36ndzpzr/@Element","odata.etag":"W/\"datetime''2021-07-15T21%3A46%3A42.2534152Z''\"","Bool":true,"Integer":1,"PartitionKey":"partition","RowKey":"1","String":"some + string 1","Timestamp":"2021-07-15T21:46:42.2534152Z"}' headers: Content-Type: - application/json;odata=minimalmetadata Date: - - Fri, 21 May 2021 20:25:57 GMT - Server: - - Microsoft-HTTPAPI/2.0 + - Thu, 15 Jul 2021 21:46:41 GMT + Etag: + - W/"datetime'2021-07-15T21%3A46%3A42.2534152Z'" X-Ms-Request-Id: - - 82b460c2-5845-41f1-a62f-854fe69ac246 - status: 200 Ok + - 83d8b301-116d-4f1a-9920-2ba95888e6ff + status: 200 OK code: 200 duration: "" - request: - body: '{"MergeProperty":"foo","PartitionKey":"partition","RowKey":"1"}' + body: '{"Bool":true,"Integer":1,"MergeProperty":"foo","PartitionKey":"partition","RowKey":"1","String":"some + string 1","Timestamp":"0001-01-01T00:00:00Z"}' form: {} headers: Accept: @@ -131,7 +126,7 @@ interactions: Authorization: - sanitized Content-Length: - - "63" + - "147" Content-Type: - application/json Dataserviceversion: @@ -139,29 +134,25 @@ interactions: If-Match: - '*' User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Http-Method: - MERGE X-Ms-Date: - - Fri, 21 May 2021 20:25:58 GMT + - Thu, 15 Jul 2021 21:46:43 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.cosmos.azure.com/gotable6emf0bk6m2agc(PartitionKey='partition',RowKey='1') + url: https://seankaneprim.table.cosmos.azure.com/gotableywepa36ndzpzr(PartitionKey='partition',RowKey='1') method: POST response: body: "" headers: - Content-Length: - - "0" Date: - - Fri, 21 May 2021 20:25:58 GMT + - Thu, 15 Jul 2021 21:46:41 GMT Etag: - - W/"datetime'2021-05-21T20%3A25%3A58.2475272Z'" - Server: - - Microsoft-HTTPAPI/2.0 + - W/"datetime'2021-07-15T21%3A46%3A42.4934408Z'" X-Ms-Request-Id: - - 9dc5e715-8500-4ef9-a2d0-d26602a86f16 + - e3b0733d-5162-4aec-9bbd-b1407c8033dc status: 204 No Content code: 204 duration: "" @@ -176,27 +167,25 @@ interactions: Dataserviceversion: - "3.0" User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Fri, 21 May 2021 20:25:58 GMT + - Thu, 15 Jul 2021 21:46:43 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.cosmos.azure.com/gotable6emf0bk6m2agc()?%24filter=RowKey+eq+%271%27 + url: https://seankaneprim.table.cosmos.azure.com/gotableywepa36ndzpzr()?%24filter=RowKey+eq+%271%27 method: GET response: - body: '{"value":[{"odata.etag":"W/\"datetime''2021-05-21T20%3A25%3A58.2475272Z''\"","BoolProp":true,"IntProp":1,"PartitionKey":"partition","RowKey":"1","StringProp":"some - string 1","MergeProperty":"foo","Timestamp":"2021-05-21T20:25:58.2475272Z"}],"odata.metadata":"https://chrisstablesprim.table.cosmos.azure.com/$metadata#gotable6emf0bk6m2agc"}' + body: '{"value":[{"odata.etag":"W/\"datetime''2021-07-15T21%3A46%3A42.4934408Z''\"","Bool":true,"Integer":1,"PartitionKey":"partition","RowKey":"1","String":"some + string 1","MergeProperty":"foo","Timestamp":"2021-07-15T21:46:42.4934408Z"}],"odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#gotableywepa36ndzpzr"}' headers: Content-Type: - application/json;odata=minimalmetadata Date: - - Fri, 21 May 2021 20:25:58 GMT - Server: - - Microsoft-HTTPAPI/2.0 + - Thu, 15 Jul 2021 21:46:41 GMT X-Ms-Request-Id: - - 87e09a62-3363-49b8-bb37-9d68a981b6cd - status: 200 Ok + - addd730f-bdd2-42bf-85d6-af1be8c38861 + status: 200 OK code: 200 duration: "" - request: @@ -208,25 +197,21 @@ interactions: Authorization: - sanitized User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Fri, 21 May 2021 20:25:58 GMT + - Thu, 15 Jul 2021 21:46:43 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.cosmos.azure.com/Tables('gotable6emf0bk6m2agc') + url: https://seankaneprim.table.cosmos.azure.com/Tables('gotableywepa36ndzpzr') method: DELETE response: body: "" headers: - Content-Length: - - "0" Date: - - Fri, 21 May 2021 20:25:58 GMT - Server: - - Microsoft-HTTPAPI/2.0 + - Thu, 15 Jul 2021 21:46:42 GMT X-Ms-Request-Id: - - adb03d8d-0443-442d-99ed-1546b9f305dd + - 5d0bc5b2-21ab-4488-a11a-8469d0d128a9 status: 204 No Content code: 204 duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestQueryComplexEntity-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestQueryComplexEntity-variables.yaml index 1a38b8ca8f7c..de24a8dd2153 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestQueryComplexEntity-variables.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestQueryComplexEntity-variables.yaml @@ -1,6 +1,5 @@ --- COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com -TABLES_COSMOS_ACCOUNT_NAME: chrisstablesprim +TABLES_COSMOS_ACCOUNT_NAME: seankaneprim TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== -now: "2021-05-19T11:25:36.9614656-05:00" -randomSeed: "1621441535" +randomSeed: "1626385604" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestQueryComplexEntity.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestQueryComplexEntity.yaml index 2df9bc1de628..25b1e6079245 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestQueryComplexEntity.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestQueryComplexEntity.yaml @@ -2,7 +2,7 @@ version: 1 interactions: - request: - body: '{"TableName":"gotableerbzz3oh8axos"}' + body: '{"TableName":"gotablel4kmcyxdk8stw"}' form: {} headers: Accept: @@ -16,35 +16,32 @@ interactions: Dataserviceversion: - "3.0" User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Wed, 19 May 2021 16:25:35 GMT + - Thu, 15 Jul 2021 21:46:44 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.cosmos.azure.com/Tables + url: https://seankaneprim.table.cosmos.azure.com/Tables method: POST response: - body: '{"TableName":"gotableerbzz3oh8axos","odata.metadata":"https://chrisstablesprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' + body: '{"TableName":"gotablel4kmcyxdk8stw","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' headers: Content-Type: - application/json;odata=minimalmetadata Date: - - Wed, 19 May 2021 16:25:36 GMT + - Thu, 15 Jul 2021 21:46:42 GMT Etag: - - W/"datetime'2021-05-19T16%3A25%3A36.7447560Z'" + - W/"datetime'2021-07-15T21%3A46%3A43.1493128Z'" Location: - - https://chrisstablesprim.table.cosmos.azure.com/Tables('gotableerbzz3oh8axos') - Server: - - Microsoft-HTTPAPI/2.0 + - https://seankaneprim.table.cosmos.azure.com/Tables('gotablel4kmcyxdk8stw') X-Ms-Request-Id: - - 5c17ccda-a639-4be6-96cb-e8273c725aef - status: 201 Ok + - ec87c209-a925-4e3f-9741-daae9a61cfb2 + status: 201 Created code: 201 duration: "" - request: - body: '{"BoolProp":true,"IntProp":1,"PartitionKey":"partition","RowKey":"1","SomeBinaryProperty":"c29tZSBieXRlcw==","SomeBinaryProperty@odata.type":"Edm.Binary","SomeDateProperty":"2021-05-19T16:25:36.9614656Z","SomeDateProperty@odata.type":"Edm.DateTime","SomeDoubleProperty0":1,"SomeDoubleProperty0@odata.type":"Edm.Double","SomeDoubleProperty1":1.2345,"SomeDoubleProperty1@odata.type":"Edm.Double","SomeGuidProperty":"d043f74e-07ff-4cc6-466d-4a3e83bea7a6","SomeGuidProperty@odata.type":"Edm.Guid","SomeInt64Property":"9223372036854775807","SomeInt64Property@odata.type":"Edm.Int64","SomeIntProperty":42,"SomeStringProperty":"some - string","StringProp":"some string 1"}' + body: '{"Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":1,"PartitionKey":"partition","RowKey":"1","String":"someString","Timestamp":"0001-01-01T00:00:00Z"}' form: {} headers: Accept: @@ -52,7 +49,7 @@ interactions: Authorization: - sanitized Content-Length: - - "663" + - "194" Content-Type: - application/json Dataserviceversion: @@ -60,37 +57,32 @@ interactions: Prefer: - return-no-content User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Wed, 19 May 2021 16:25:36 GMT + - Thu, 15 Jul 2021 21:46:44 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.cosmos.azure.com/gotableerbzz3oh8axos + url: https://seankaneprim.table.cosmos.azure.com/gotablel4kmcyxdk8stw method: POST response: body: "" headers: - Content-Length: - - "0" Date: - - Wed, 19 May 2021 16:25:37 GMT + - Thu, 15 Jul 2021 21:46:43 GMT Etag: - - W/"datetime'2021-05-19T16%3A25%3A37.2379144Z'" + - W/"datetime'2021-07-15T21%3A46%3A43.9421960Z'" Location: - - https://chrisstablesprim.table.cosmos.azure.com/gotableerbzz3oh8axos(PartitionKey='partition',RowKey='1') + - https://seankaneprim.table.cosmos.azure.com/gotablel4kmcyxdk8stw(PartitionKey='partition',RowKey='1') Preference-Applied: - return-no-content - Server: - - Microsoft-HTTPAPI/2.0 X-Ms-Request-Id: - - 4bc36820-3f67-4d67-8498-614f874bdad2 + - 52dec415-e81d-4983-985a-42a2ca3aa918 status: 204 No Content code: 204 duration: "" - request: - body: '{"BoolProp":true,"IntProp":2,"PartitionKey":"partition","RowKey":"2","SomeBinaryProperty":"c29tZSBieXRlcw==","SomeBinaryProperty@odata.type":"Edm.Binary","SomeDateProperty":"2021-05-19T16:25:36.9614656Z","SomeDateProperty@odata.type":"Edm.DateTime","SomeDoubleProperty0":1,"SomeDoubleProperty0@odata.type":"Edm.Double","SomeDoubleProperty1":1.2345,"SomeDoubleProperty1@odata.type":"Edm.Double","SomeGuidProperty":"7ff97177-74be-48b0-6508-e241a43145ca","SomeGuidProperty@odata.type":"Edm.Guid","SomeInt64Property":"9223372036854775807","SomeInt64Property@odata.type":"Edm.Int64","SomeIntProperty":42,"SomeStringProperty":"some - string","StringProp":"some string 2"}' + body: '{"Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":2,"PartitionKey":"partition","RowKey":"2","String":"someString","Timestamp":"0001-01-01T00:00:00Z"}' form: {} headers: Accept: @@ -98,7 +90,7 @@ interactions: Authorization: - sanitized Content-Length: - - "663" + - "194" Content-Type: - application/json Dataserviceversion: @@ -106,37 +98,32 @@ interactions: Prefer: - return-no-content User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Wed, 19 May 2021 16:25:37 GMT + - Thu, 15 Jul 2021 21:46:45 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.cosmos.azure.com/gotableerbzz3oh8axos + url: https://seankaneprim.table.cosmos.azure.com/gotablel4kmcyxdk8stw method: POST response: body: "" headers: - Content-Length: - - "0" Date: - - Wed, 19 May 2021 16:25:37 GMT + - Thu, 15 Jul 2021 21:46:43 GMT Etag: - - W/"datetime'2021-05-19T16%3A25%3A37.3221896Z'" + - W/"datetime'2021-07-15T21%3A46%3A44.0593416Z'" Location: - - https://chrisstablesprim.table.cosmos.azure.com/gotableerbzz3oh8axos(PartitionKey='partition',RowKey='2') + - https://seankaneprim.table.cosmos.azure.com/gotablel4kmcyxdk8stw(PartitionKey='partition',RowKey='2') Preference-Applied: - return-no-content - Server: - - Microsoft-HTTPAPI/2.0 X-Ms-Request-Id: - - 6b425666-7fd5-48fb-a84b-43b4b0f282cb + - 0976bee4-8e5d-4af4-976b-b989ae9c83f1 status: 204 No Content code: 204 duration: "" - request: - body: '{"BoolProp":true,"IntProp":3,"PartitionKey":"partition","RowKey":"3","SomeBinaryProperty":"c29tZSBieXRlcw==","SomeBinaryProperty@odata.type":"Edm.Binary","SomeDateProperty":"2021-05-19T16:25:36.9614656Z","SomeDateProperty@odata.type":"Edm.DateTime","SomeDoubleProperty0":1,"SomeDoubleProperty0@odata.type":"Edm.Double","SomeDoubleProperty1":1.2345,"SomeDoubleProperty1@odata.type":"Edm.Double","SomeGuidProperty":"e3d25206-7ddd-45f3-5914-7324bcac30da","SomeGuidProperty@odata.type":"Edm.Guid","SomeInt64Property":"9223372036854775807","SomeInt64Property@odata.type":"Edm.Int64","SomeIntProperty":42,"SomeStringProperty":"some - string","StringProp":"some string 3"}' + body: '{"Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":3,"PartitionKey":"partition","RowKey":"3","String":"someString","Timestamp":"0001-01-01T00:00:00Z"}' form: {} headers: Accept: @@ -144,7 +131,7 @@ interactions: Authorization: - sanitized Content-Length: - - "663" + - "194" Content-Type: - application/json Dataserviceversion: @@ -152,37 +139,32 @@ interactions: Prefer: - return-no-content User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Wed, 19 May 2021 16:25:37 GMT + - Thu, 15 Jul 2021 21:46:45 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.cosmos.azure.com/gotableerbzz3oh8axos + url: https://seankaneprim.table.cosmos.azure.com/gotablel4kmcyxdk8stw method: POST response: body: "" headers: - Content-Length: - - "0" Date: - - Wed, 19 May 2021 16:25:37 GMT + - Thu, 15 Jul 2021 21:46:43 GMT Etag: - - W/"datetime'2021-05-19T16%3A25%3A37.3971464Z'" + - W/"datetime'2021-07-15T21%3A46%3A44.1717768Z'" Location: - - https://chrisstablesprim.table.cosmos.azure.com/gotableerbzz3oh8axos(PartitionKey='partition',RowKey='3') + - https://seankaneprim.table.cosmos.azure.com/gotablel4kmcyxdk8stw(PartitionKey='partition',RowKey='3') Preference-Applied: - return-no-content - Server: - - Microsoft-HTTPAPI/2.0 X-Ms-Request-Id: - - 37712eb5-d553-4201-8281-557bb6a05794 + - 6f388117-3ff5-4c6f-96b8-678776b47909 status: 204 No Content code: 204 duration: "" - request: - body: '{"BoolProp":true,"IntProp":4,"PartitionKey":"partition","RowKey":"4","SomeBinaryProperty":"c29tZSBieXRlcw==","SomeBinaryProperty@odata.type":"Edm.Binary","SomeDateProperty":"2021-05-19T16:25:36.9614656Z","SomeDateProperty@odata.type":"Edm.DateTime","SomeDoubleProperty0":1,"SomeDoubleProperty0@odata.type":"Edm.Double","SomeDoubleProperty1":1.2345,"SomeDoubleProperty1@odata.type":"Edm.Double","SomeGuidProperty":"10b21c2d-8c8a-4171-6d54-b3c3c44c5a13","SomeGuidProperty@odata.type":"Edm.Guid","SomeInt64Property":"9223372036854775807","SomeInt64Property@odata.type":"Edm.Int64","SomeIntProperty":42,"SomeStringProperty":"some - string","StringProp":"some string 4"}' + body: '{"Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":4,"PartitionKey":"partition","RowKey":"4","String":"someString","Timestamp":"0001-01-01T00:00:00Z"}' form: {} headers: Accept: @@ -190,7 +172,7 @@ interactions: Authorization: - sanitized Content-Length: - - "663" + - "194" Content-Type: - application/json Dataserviceversion: @@ -198,37 +180,32 @@ interactions: Prefer: - return-no-content User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Wed, 19 May 2021 16:25:37 GMT + - Thu, 15 Jul 2021 21:46:45 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.cosmos.azure.com/gotableerbzz3oh8axos + url: https://seankaneprim.table.cosmos.azure.com/gotablel4kmcyxdk8stw method: POST response: body: "" headers: - Content-Length: - - "0" Date: - - Wed, 19 May 2021 16:25:37 GMT + - Thu, 15 Jul 2021 21:46:43 GMT Etag: - - W/"datetime'2021-05-19T16%3A25%3A37.4755848Z'" + - W/"datetime'2021-07-15T21%3A46%3A44.2786824Z'" Location: - - https://chrisstablesprim.table.cosmos.azure.com/gotableerbzz3oh8axos(PartitionKey='partition',RowKey='4') + - https://seankaneprim.table.cosmos.azure.com/gotablel4kmcyxdk8stw(PartitionKey='partition',RowKey='4') Preference-Applied: - return-no-content - Server: - - Microsoft-HTTPAPI/2.0 X-Ms-Request-Id: - - 208c2931-b5c1-4d93-8608-1dd165a5cb9a + - e1516190-f048-4300-8ec3-39c7cbef499e status: 204 No Content code: 204 duration: "" - request: - body: '{"BoolProp":true,"IntProp":5,"PartitionKey":"partition","RowKey":"5","SomeBinaryProperty":"c29tZSBieXRlcw==","SomeBinaryProperty@odata.type":"Edm.Binary","SomeDateProperty":"2021-05-19T16:25:36.9614656Z","SomeDateProperty@odata.type":"Edm.DateTime","SomeDoubleProperty0":1,"SomeDoubleProperty0@odata.type":"Edm.Double","SomeDoubleProperty1":1.2345,"SomeDoubleProperty1@odata.type":"Edm.Double","SomeGuidProperty":"ac1bacb5-1e2a-453e-5410-2ba3ec3bcbf5","SomeGuidProperty@odata.type":"Edm.Guid","SomeInt64Property":"9223372036854775807","SomeInt64Property@odata.type":"Edm.Int64","SomeIntProperty":42,"SomeStringProperty":"some - string","StringProp":"some string 5"}' + body: '{"Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":5,"PartitionKey":"partition","RowKey":"5","String":"someString","Timestamp":"0001-01-01T00:00:00Z"}' form: {} headers: Accept: @@ -236,7 +213,7 @@ interactions: Authorization: - sanitized Content-Length: - - "663" + - "194" Content-Type: - application/json Dataserviceversion: @@ -244,31 +221,27 @@ interactions: Prefer: - return-no-content User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Wed, 19 May 2021 16:25:37 GMT + - Thu, 15 Jul 2021 21:46:45 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.cosmos.azure.com/gotableerbzz3oh8axos + url: https://seankaneprim.table.cosmos.azure.com/gotablel4kmcyxdk8stw method: POST response: body: "" headers: - Content-Length: - - "0" Date: - - Wed, 19 May 2021 16:25:37 GMT + - Thu, 15 Jul 2021 21:46:43 GMT Etag: - - W/"datetime'2021-05-19T16%3A25%3A37.5523848Z'" + - W/"datetime'2021-07-15T21%3A46%3A44.3910152Z'" Location: - - https://chrisstablesprim.table.cosmos.azure.com/gotableerbzz3oh8axos(PartitionKey='partition',RowKey='5') + - https://seankaneprim.table.cosmos.azure.com/gotablel4kmcyxdk8stw(PartitionKey='partition',RowKey='5') Preference-Applied: - return-no-content - Server: - - Microsoft-HTTPAPI/2.0 X-Ms-Request-Id: - - c720727d-3141-4628-9d6a-5fe36e7c1f3f + - 00030504-bf79-4cf8-a0cd-3a3c558406b9 status: 204 No Content code: 204 duration: "" @@ -283,30 +256,24 @@ interactions: Dataserviceversion: - "3.0" User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Wed, 19 May 2021 16:25:37 GMT + - Thu, 15 Jul 2021 21:46:45 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.cosmos.azure.com/gotableerbzz3oh8axos()?%24filter=RowKey+lt+%275%27 + url: https://seankaneprim.table.cosmos.azure.com/gotablel4kmcyxdk8stw()?%24filter=RowKey+lt+%275%27 method: GET response: - body: '{"value":[{"odata.etag":"W/\"datetime''2021-05-19T16%3A25%3A37.2379144Z''\"","BoolProp":true,"IntProp":1,"PartitionKey":"partition","RowKey":"1","SomeBinaryProperty@odata.type":"Edm.Binary","SomeBinaryProperty":"c29tZSBieXRlcw==","SomeDateProperty@odata.type":"Edm.DateTime","SomeDateProperty":"2021-05-19T16:25:36.9614656Z","SomeDoubleProperty0":1.0,"SomeDoubleProperty1":1.2345,"SomeGuidProperty@odata.type":"Edm.Guid","SomeGuidProperty":"d043f74e-07ff-4cc6-466d-4a3e83bea7a6","SomeInt64Property@odata.type":"Edm.Int64","SomeInt64Property":"9223372036854775807","SomeIntProperty":42,"SomeStringProperty":"some - string","StringProp":"some string 1","Timestamp":"2021-05-19T16:25:37.2379144Z"},{"odata.etag":"W/\"datetime''2021-05-19T16%3A25%3A37.3221896Z''\"","BoolProp":true,"IntProp":2,"PartitionKey":"partition","RowKey":"2","SomeBinaryProperty@odata.type":"Edm.Binary","SomeBinaryProperty":"c29tZSBieXRlcw==","SomeDateProperty@odata.type":"Edm.DateTime","SomeDateProperty":"2021-05-19T16:25:36.9614656Z","SomeDoubleProperty0":1.0,"SomeDoubleProperty1":1.2345,"SomeGuidProperty@odata.type":"Edm.Guid","SomeGuidProperty":"7ff97177-74be-48b0-6508-e241a43145ca","SomeInt64Property@odata.type":"Edm.Int64","SomeInt64Property":"9223372036854775807","SomeIntProperty":42,"SomeStringProperty":"some - string","StringProp":"some string 2","Timestamp":"2021-05-19T16:25:37.3221896Z"},{"odata.etag":"W/\"datetime''2021-05-19T16%3A25%3A37.3971464Z''\"","BoolProp":true,"IntProp":3,"PartitionKey":"partition","RowKey":"3","SomeBinaryProperty@odata.type":"Edm.Binary","SomeBinaryProperty":"c29tZSBieXRlcw==","SomeDateProperty@odata.type":"Edm.DateTime","SomeDateProperty":"2021-05-19T16:25:36.9614656Z","SomeDoubleProperty0":1.0,"SomeDoubleProperty1":1.2345,"SomeGuidProperty@odata.type":"Edm.Guid","SomeGuidProperty":"e3d25206-7ddd-45f3-5914-7324bcac30da","SomeInt64Property@odata.type":"Edm.Int64","SomeInt64Property":"9223372036854775807","SomeIntProperty":42,"SomeStringProperty":"some - string","StringProp":"some string 3","Timestamp":"2021-05-19T16:25:37.3971464Z"},{"odata.etag":"W/\"datetime''2021-05-19T16%3A25%3A37.4755848Z''\"","BoolProp":true,"IntProp":4,"PartitionKey":"partition","RowKey":"4","SomeBinaryProperty@odata.type":"Edm.Binary","SomeBinaryProperty":"c29tZSBieXRlcw==","SomeDateProperty@odata.type":"Edm.DateTime","SomeDateProperty":"2021-05-19T16:25:36.9614656Z","SomeDoubleProperty0":1.0,"SomeDoubleProperty1":1.2345,"SomeGuidProperty@odata.type":"Edm.Guid","SomeGuidProperty":"10b21c2d-8c8a-4171-6d54-b3c3c44c5a13","SomeInt64Property@odata.type":"Edm.Int64","SomeInt64Property":"9223372036854775807","SomeIntProperty":42,"SomeStringProperty":"some - string","StringProp":"some string 4","Timestamp":"2021-05-19T16:25:37.4755848Z"}],"odata.metadata":"https://chrisstablesprim.table.cosmos.azure.com/$metadata#gotableerbzz3oh8axos"}' + body: '{"value":[{"odata.etag":"W/\"datetime''2021-07-15T21%3A46%3A43.9421960Z''\"","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":1,"PartitionKey":"partition","RowKey":"1","String":"someString","Timestamp":"2021-07-15T21:46:43.9421960Z"},{"odata.etag":"W/\"datetime''2021-07-15T21%3A46%3A44.0593416Z''\"","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":2,"PartitionKey":"partition","RowKey":"2","String":"someString","Timestamp":"2021-07-15T21:46:44.0593416Z"},{"odata.etag":"W/\"datetime''2021-07-15T21%3A46%3A44.1717768Z''\"","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":3,"PartitionKey":"partition","RowKey":"3","String":"someString","Timestamp":"2021-07-15T21:46:44.1717768Z"},{"odata.etag":"W/\"datetime''2021-07-15T21%3A46%3A44.2786824Z''\"","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":4,"PartitionKey":"partition","RowKey":"4","String":"someString","Timestamp":"2021-07-15T21:46:44.2786824Z"}],"odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#gotablel4kmcyxdk8stw"}' headers: Content-Type: - application/json;odata=minimalmetadata Date: - - Wed, 19 May 2021 16:25:37 GMT - Server: - - Microsoft-HTTPAPI/2.0 + - Thu, 15 Jul 2021 21:46:43 GMT X-Ms-Request-Id: - - 3cdbe1a7-78e9-468f-97f3-ac9797a0b9d0 - status: 200 Ok + - b72877bb-39e1-493b-8eb2-bef79563fb95 + status: 200 OK code: 200 duration: "" - request: @@ -318,25 +285,21 @@ interactions: Authorization: - sanitized User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Wed, 19 May 2021 16:25:37 GMT + - Thu, 15 Jul 2021 21:46:45 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.cosmos.azure.com/Tables('gotableerbzz3oh8axos') + url: https://seankaneprim.table.cosmos.azure.com/Tables('gotablel4kmcyxdk8stw') method: DELETE response: body: "" headers: - Content-Length: - - "0" Date: - - Wed, 19 May 2021 16:25:37 GMT - Server: - - Microsoft-HTTPAPI/2.0 + - Thu, 15 Jul 2021 21:46:44 GMT X-Ms-Request-Id: - - 8bfec822-1a10-4c87-97ec-875c49da7acb + - 1793a9d0-e7ec-40a0-8f28-34367cebcf70 status: 204 No Content code: 204 duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestQuerySimpleEntity-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestQuerySimpleEntity-variables.yaml index 05898e645159..27d022080441 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestQuerySimpleEntity-variables.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestQuerySimpleEntity-variables.yaml @@ -1,5 +1,5 @@ --- COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com -TABLES_COSMOS_ACCOUNT_NAME: chrisstablesprim +TABLES_COSMOS_ACCOUNT_NAME: seankaneprim TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== -randomSeed: "1617598959" +randomSeed: "1626385605" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestQuerySimpleEntity.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestQuerySimpleEntity.yaml index 4cc2c9ff4295..c3e634120291 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestQuerySimpleEntity.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestQuerySimpleEntity.yaml @@ -2,7 +2,7 @@ version: 1 interactions: - request: - body: '{"TableName":"gotabledtlot4b2qfkop"}' + body: '{"TableName":"gotableas9dj7zb9zmt2"}' form: {} headers: Accept: @@ -16,35 +16,33 @@ interactions: Dataserviceversion: - "3.0" User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Mon, 05 Apr 2021 05:02:39 GMT + - Thu, 15 Jul 2021 21:46:45 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.cosmos.azure.com/Tables + url: https://seankaneprim.table.cosmos.azure.com/Tables method: POST response: - body: '{"TableName":"gotabledtlot4b2qfkop","odata.metadata":"https://chrisstablesprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' + body: '{"TableName":"gotableas9dj7zb9zmt2","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' headers: Content-Type: - application/json;odata=minimalmetadata Date: - - Mon, 05 Apr 2021 05:02:40 GMT + - Thu, 15 Jul 2021 21:46:44 GMT Etag: - - W/"datetime'2021-04-05T05%3A02%3A40.1485832Z'" + - W/"datetime'2021-07-15T21%3A46%3A45.0530312Z'" Location: - - https://chrisstablesprim.table.cosmos.azure.com/Tables('gotabledtlot4b2qfkop') - Server: - - Microsoft-HTTPAPI/2.0 + - https://seankaneprim.table.cosmos.azure.com/Tables('gotableas9dj7zb9zmt2') X-Ms-Request-Id: - - 0c4ccc90-a38a-47db-b904-ec327ee3f600 + - 203b31c5-58ec-488e-9019-bdc68437284b status: 201 Created code: 201 duration: "" - request: - body: '{"BoolProp":true,"IntProp":1,"PartitionKey":"partition","RowKey":"1","StringProp":"some - string 1"}' + body: '{"Bool":true,"Integer":1,"PartitionKey":"partition","RowKey":"1","String":"some + string 1","Timestamp":"0001-01-01T00:00:00Z"}' form: {} headers: Accept: @@ -52,7 +50,7 @@ interactions: Authorization: - sanitized Content-Length: - - "98" + - "125" Content-Type: - application/json Dataserviceversion: @@ -60,37 +58,33 @@ interactions: Prefer: - return-no-content User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Mon, 05 Apr 2021 05:02:40 GMT + - Thu, 15 Jul 2021 21:46:46 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.cosmos.azure.com/gotabledtlot4b2qfkop + url: https://seankaneprim.table.cosmos.azure.com/gotableas9dj7zb9zmt2 method: POST response: body: "" headers: - Content-Length: - - "0" Date: - - Mon, 05 Apr 2021 05:02:40 GMT + - Thu, 15 Jul 2021 21:46:44 GMT Etag: - - W/"datetime'2021-04-05T05%3A02%3A40.7371784Z'" + - W/"datetime'2021-07-15T21%3A46%3A45.8457096Z'" Location: - - https://chrisstablesprim.table.cosmos.azure.com/gotabledtlot4b2qfkop(PartitionKey='partition',RowKey='1') + - https://seankaneprim.table.cosmos.azure.com/gotableas9dj7zb9zmt2(PartitionKey='partition',RowKey='1') Preference-Applied: - return-no-content - Server: - - Microsoft-HTTPAPI/2.0 X-Ms-Request-Id: - - 40cfa5d5-3867-469b-a5fe-aa61bfdded39 + - b460e81c-d122-48e5-874e-be36884a0f09 status: 204 No Content code: 204 duration: "" - request: - body: '{"BoolProp":true,"IntProp":2,"PartitionKey":"partition","RowKey":"2","StringProp":"some - string 2"}' + body: '{"Bool":true,"Integer":2,"PartitionKey":"partition","RowKey":"2","String":"some + string 2","Timestamp":"0001-01-01T00:00:00Z"}' form: {} headers: Accept: @@ -98,7 +92,7 @@ interactions: Authorization: - sanitized Content-Length: - - "98" + - "125" Content-Type: - application/json Dataserviceversion: @@ -106,37 +100,33 @@ interactions: Prefer: - return-no-content User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Mon, 05 Apr 2021 05:02:40 GMT + - Thu, 15 Jul 2021 21:46:46 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.cosmos.azure.com/gotabledtlot4b2qfkop + url: https://seankaneprim.table.cosmos.azure.com/gotableas9dj7zb9zmt2 method: POST response: body: "" headers: - Content-Length: - - "0" Date: - - Mon, 05 Apr 2021 05:02:40 GMT + - Thu, 15 Jul 2021 21:46:45 GMT Etag: - - W/"datetime'2021-04-05T05%3A02%3A40.8410120Z'" + - W/"datetime'2021-07-15T21%3A46%3A45.9550728Z'" Location: - - https://chrisstablesprim.table.cosmos.azure.com/gotabledtlot4b2qfkop(PartitionKey='partition',RowKey='2') + - https://seankaneprim.table.cosmos.azure.com/gotableas9dj7zb9zmt2(PartitionKey='partition',RowKey='2') Preference-Applied: - return-no-content - Server: - - Microsoft-HTTPAPI/2.0 X-Ms-Request-Id: - - 3c31aac3-2859-47ad-abd7-8203e7f10b11 + - 97042963-c1df-44f4-9731-3757649977fa status: 204 No Content code: 204 duration: "" - request: - body: '{"BoolProp":true,"IntProp":3,"PartitionKey":"partition","RowKey":"3","StringProp":"some - string 3"}' + body: '{"Bool":true,"Integer":3,"PartitionKey":"partition","RowKey":"3","String":"some + string 3","Timestamp":"0001-01-01T00:00:00Z"}' form: {} headers: Accept: @@ -144,7 +134,7 @@ interactions: Authorization: - sanitized Content-Length: - - "98" + - "125" Content-Type: - application/json Dataserviceversion: @@ -152,37 +142,33 @@ interactions: Prefer: - return-no-content User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Mon, 05 Apr 2021 05:02:41 GMT + - Thu, 15 Jul 2021 21:46:47 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.cosmos.azure.com/gotabledtlot4b2qfkop + url: https://seankaneprim.table.cosmos.azure.com/gotableas9dj7zb9zmt2 method: POST response: body: "" headers: - Content-Length: - - "0" Date: - - Mon, 05 Apr 2021 05:02:40 GMT + - Thu, 15 Jul 2021 21:46:45 GMT Etag: - - W/"datetime'2021-04-05T05%3A02%3A40.9537544Z'" + - W/"datetime'2021-07-15T21%3A46%3A46.0663816Z'" Location: - - https://chrisstablesprim.table.cosmos.azure.com/gotabledtlot4b2qfkop(PartitionKey='partition',RowKey='3') + - https://seankaneprim.table.cosmos.azure.com/gotableas9dj7zb9zmt2(PartitionKey='partition',RowKey='3') Preference-Applied: - return-no-content - Server: - - Microsoft-HTTPAPI/2.0 X-Ms-Request-Id: - - 0cd7d680-2274-4e93-9b7f-4d44cacff771 + - 19050174-5c5e-4b2e-96d9-1e6d39f90e57 status: 204 No Content code: 204 duration: "" - request: - body: '{"BoolProp":true,"IntProp":4,"PartitionKey":"partition","RowKey":"4","StringProp":"some - string 4"}' + body: '{"Bool":true,"Integer":4,"PartitionKey":"partition","RowKey":"4","String":"some + string 4","Timestamp":"0001-01-01T00:00:00Z"}' form: {} headers: Accept: @@ -190,7 +176,7 @@ interactions: Authorization: - sanitized Content-Length: - - "98" + - "125" Content-Type: - application/json Dataserviceversion: @@ -198,37 +184,33 @@ interactions: Prefer: - return-no-content User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Mon, 05 Apr 2021 05:02:41 GMT + - Thu, 15 Jul 2021 21:46:47 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.cosmos.azure.com/gotabledtlot4b2qfkop + url: https://seankaneprim.table.cosmos.azure.com/gotableas9dj7zb9zmt2 method: POST response: body: "" headers: - Content-Length: - - "0" Date: - - Mon, 05 Apr 2021 05:02:40 GMT + - Thu, 15 Jul 2021 21:46:45 GMT Etag: - - W/"datetime'2021-04-05T05%3A02%3A41.0579976Z'" + - W/"datetime'2021-07-15T21%3A46%3A46.1749256Z'" Location: - - https://chrisstablesprim.table.cosmos.azure.com/gotabledtlot4b2qfkop(PartitionKey='partition',RowKey='4') + - https://seankaneprim.table.cosmos.azure.com/gotableas9dj7zb9zmt2(PartitionKey='partition',RowKey='4') Preference-Applied: - return-no-content - Server: - - Microsoft-HTTPAPI/2.0 X-Ms-Request-Id: - - 2c18f6d8-af7f-4533-bf30-9243a8e31e18 + - 3c94dbe9-44da-466b-907e-b099ec767086 status: 204 No Content code: 204 duration: "" - request: - body: '{"BoolProp":true,"IntProp":5,"PartitionKey":"partition","RowKey":"5","StringProp":"some - string 5"}' + body: '{"Bool":true,"Integer":5,"PartitionKey":"partition","RowKey":"5","String":"some + string 5","Timestamp":"0001-01-01T00:00:00Z"}' form: {} headers: Accept: @@ -236,7 +218,7 @@ interactions: Authorization: - sanitized Content-Length: - - "98" + - "125" Content-Type: - application/json Dataserviceversion: @@ -244,31 +226,27 @@ interactions: Prefer: - return-no-content User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Mon, 05 Apr 2021 05:02:41 GMT + - Thu, 15 Jul 2021 21:46:47 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.cosmos.azure.com/gotabledtlot4b2qfkop + url: https://seankaneprim.table.cosmos.azure.com/gotableas9dj7zb9zmt2 method: POST response: body: "" headers: - Content-Length: - - "0" Date: - - Mon, 05 Apr 2021 05:02:40 GMT + - Thu, 15 Jul 2021 21:46:45 GMT Etag: - - W/"datetime'2021-04-05T05%3A02%3A41.1676680Z'" + - W/"datetime'2021-07-15T21%3A46%3A46.2854152Z'" Location: - - https://chrisstablesprim.table.cosmos.azure.com/gotabledtlot4b2qfkop(PartitionKey='partition',RowKey='5') + - https://seankaneprim.table.cosmos.azure.com/gotableas9dj7zb9zmt2(PartitionKey='partition',RowKey='5') Preference-Applied: - return-no-content - Server: - - Microsoft-HTTPAPI/2.0 X-Ms-Request-Id: - - 6ca39a1d-05ef-4d68-bfc2-5a79a009fdeb + - 578f652c-8ea1-4c77-a479-4639a6255c73 status: 204 No Content code: 204 duration: "" @@ -283,29 +261,27 @@ interactions: Dataserviceversion: - "3.0" User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Mon, 05 Apr 2021 05:02:41 GMT + - Thu, 15 Jul 2021 21:46:47 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.cosmos.azure.com/gotabledtlot4b2qfkop()?%24filter=RowKey+lt+%275%27 + url: https://seankaneprim.table.cosmos.azure.com/gotableas9dj7zb9zmt2()?%24filter=RowKey+lt+%275%27 method: GET response: - body: '{"value":[{"odata.etag":"W/\"datetime''2021-04-05T05%3A02%3A40.7371784Z''\"","BoolProp":true,"IntProp":1,"PartitionKey":"partition","RowKey":"1","StringProp":"some - string 1","Timestamp":"2021-04-05T05:02:40.7371784Z"},{"odata.etag":"W/\"datetime''2021-04-05T05%3A02%3A40.8410120Z''\"","BoolProp":true,"IntProp":2,"PartitionKey":"partition","RowKey":"2","StringProp":"some - string 2","Timestamp":"2021-04-05T05:02:40.8410120Z"},{"odata.etag":"W/\"datetime''2021-04-05T05%3A02%3A40.9537544Z''\"","BoolProp":true,"IntProp":3,"PartitionKey":"partition","RowKey":"3","StringProp":"some - string 3","Timestamp":"2021-04-05T05:02:40.9537544Z"},{"odata.etag":"W/\"datetime''2021-04-05T05%3A02%3A41.0579976Z''\"","BoolProp":true,"IntProp":4,"PartitionKey":"partition","RowKey":"4","StringProp":"some - string 4","Timestamp":"2021-04-05T05:02:41.0579976Z"}],"odata.metadata":"https://chrisstablesprim.table.cosmos.azure.com/$metadata#gotabledtlot4b2qfkop"}' + body: '{"value":[{"odata.etag":"W/\"datetime''2021-07-15T21%3A46%3A45.8457096Z''\"","Bool":true,"Integer":1,"PartitionKey":"partition","RowKey":"1","String":"some + string 1","Timestamp":"2021-07-15T21:46:45.8457096Z"},{"odata.etag":"W/\"datetime''2021-07-15T21%3A46%3A45.9550728Z''\"","Bool":true,"Integer":2,"PartitionKey":"partition","RowKey":"2","String":"some + string 2","Timestamp":"2021-07-15T21:46:45.9550728Z"},{"odata.etag":"W/\"datetime''2021-07-15T21%3A46%3A46.0663816Z''\"","Bool":true,"Integer":3,"PartitionKey":"partition","RowKey":"3","String":"some + string 3","Timestamp":"2021-07-15T21:46:46.0663816Z"},{"odata.etag":"W/\"datetime''2021-07-15T21%3A46%3A46.1749256Z''\"","Bool":true,"Integer":4,"PartitionKey":"partition","RowKey":"4","String":"some + string 4","Timestamp":"2021-07-15T21:46:46.1749256Z"}],"odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#gotableas9dj7zb9zmt2"}' headers: Content-Type: - application/json;odata=minimalmetadata Date: - - Mon, 05 Apr 2021 05:02:40 GMT - Server: - - Microsoft-HTTPAPI/2.0 + - Thu, 15 Jul 2021 21:46:45 GMT X-Ms-Request-Id: - - 98466a7e-727a-4e2d-8f48-37039dae8f64 + - 8bb28038-8ffd-4697-b508-14cd085a8889 status: 200 OK code: 200 duration: "" @@ -318,25 +294,21 @@ interactions: Authorization: - sanitized User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Mon, 05 Apr 2021 05:02:41 GMT + - Thu, 15 Jul 2021 21:46:47 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.cosmos.azure.com/Tables('gotabledtlot4b2qfkop') + url: https://seankaneprim.table.cosmos.azure.com/Tables('gotableas9dj7zb9zmt2') method: DELETE response: body: "" headers: - Content-Length: - - "0" Date: - - Mon, 05 Apr 2021 05:02:41 GMT - Server: - - Microsoft-HTTPAPI/2.0 + - Thu, 15 Jul 2021 21:46:45 GMT X-Ms-Request-Id: - - d7fa3ec7-64ad-43a3-8444-9f567b156391 + - 7f1374ae-bb39-4218-825c-47cf63e069a8 status: 204 No Content code: 204 duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestServiceErrors-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestServiceErrors-variables.yaml index be617c45b1f0..641bc916158f 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestServiceErrors-variables.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestServiceErrors-variables.yaml @@ -1,5 +1,5 @@ --- COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com -TABLES_COSMOS_ACCOUNT_NAME: chrisstablesprim +TABLES_COSMOS_ACCOUNT_NAME: seankaneprim TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== -randomSeed: "1617580014" +randomSeed: "1626385607" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestServiceErrors.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestServiceErrors.yaml index 0a52371c64d2..88742dbee314 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestServiceErrors.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestServiceErrors.yaml @@ -2,7 +2,7 @@ version: 1 interactions: - request: - body: '{"TableName":"gotable85g6eby7icg1v"}' + body: '{"TableName":"gotable3lqp0ygfyeypr"}' form: {} headers: Accept: @@ -16,34 +16,32 @@ interactions: Dataserviceversion: - "3.0" User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Sun, 04 Apr 2021 23:46:54 GMT + - Thu, 15 Jul 2021 21:46:47 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.cosmos.azure.com/Tables + url: https://seankaneprim.table.cosmos.azure.com/Tables method: POST response: - body: '{"TableName":"gotable85g6eby7icg1v","odata.metadata":"https://chrisstablesprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' + body: '{"TableName":"gotable3lqp0ygfyeypr","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' headers: Content-Type: - application/json;odata=minimalmetadata Date: - - Sun, 04 Apr 2021 23:46:54 GMT + - Thu, 15 Jul 2021 21:46:46 GMT Etag: - - W/"datetime'2021-04-04T23%3A46%3A54.7914760Z'" + - W/"datetime'2021-07-15T21%3A46%3A46.9644296Z'" Location: - - https://chrisstablesprim.table.cosmos.azure.com/Tables('gotable85g6eby7icg1v') - Server: - - Microsoft-HTTPAPI/2.0 + - https://seankaneprim.table.cosmos.azure.com/Tables('gotable3lqp0ygfyeypr') X-Ms-Request-Id: - - 947f9642-3c9b-475a-b3a0-6c04b3c2d40b + - f66ed244-450e-475f-86d1-e0338722399f status: 201 Created code: 201 duration: "" - request: - body: '{"TableName":"gotable85g6eby7icg1v"}' + body: '{"TableName":"gotable3lqp0ygfyeypr"}' form: {} headers: Accept: @@ -57,26 +55,24 @@ interactions: Dataserviceversion: - "3.0" User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Sun, 04 Apr 2021 23:46:55 GMT + - Thu, 15 Jul 2021 21:46:48 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.cosmos.azure.com/Tables + url: https://seankaneprim.table.cosmos.azure.com/Tables method: POST response: body: "{\"odata.error\":{\"code\":\"TableAlreadyExists\",\"message\":{\"lang\":\"en-us\",\"value\":\"The - specified table already exists.\\nRequestID:58f7ef4b-3378-4612-8f88-7fad883916de\\n\"}}}\r\n" + specified table already exists.\\nRequestID:cd5b2bf8-283f-4f24-b66a-4f33a0dd58e3\\n\"}}}\r\n" headers: Content-Type: - application/json;odata=minimalmetadata Date: - - Sun, 04 Apr 2021 23:46:54 GMT - Server: - - Microsoft-HTTPAPI/2.0 + - Thu, 15 Jul 2021 21:46:46 GMT X-Ms-Request-Id: - - 58f7ef4b-3378-4612-8f88-7fad883916de + - cd5b2bf8-283f-4f24-b66a-4f33a0dd58e3 status: 409 Conflict code: 409 duration: "" @@ -89,25 +85,21 @@ interactions: Authorization: - sanitized User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Sun, 04 Apr 2021 23:46:55 GMT + - Thu, 15 Jul 2021 21:46:48 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.cosmos.azure.com/Tables('gotable85g6eby7icg1v') + url: https://seankaneprim.table.cosmos.azure.com/Tables('gotable3lqp0ygfyeypr') method: DELETE response: body: "" headers: - Content-Length: - - "0" Date: - - Sun, 04 Apr 2021 23:46:54 GMT - Server: - - Microsoft-HTTPAPI/2.0 + - Thu, 15 Jul 2021 21:46:47 GMT X-Ms-Request-Id: - - 40da51e2-3c50-4a09-a6e9-78663d0215c4 + - e89ea7d0-07bf-4d3c-bf75-2cd047256160 status: 204 No Content code: 204 duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestUpsertEntity-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestUpsertEntity-variables.yaml index c1db334f613b..6e8160d84853 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestUpsertEntity-variables.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestUpsertEntity-variables.yaml @@ -1,5 +1,5 @@ --- COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com -TABLES_COSMOS_ACCOUNT_NAME: chrisstablesprim +TABLES_COSMOS_ACCOUNT_NAME: seankaneprim TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== -randomSeed: "1621629299" +randomSeed: "1626385609" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestUpsertEntity.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestUpsertEntity.yaml index 6401f20d46cd..6b4ac0d82923 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestUpsertEntity.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestUpsertEntity.yaml @@ -2,7 +2,7 @@ version: 1 interactions: - request: - body: '{"TableName":"gotable1msfgttesz2cp"}' + body: '{"TableName":"gotableps3e7q02v0n3b"}' form: {} headers: Accept: @@ -16,35 +16,33 @@ interactions: Dataserviceversion: - "3.0" User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Fri, 21 May 2021 20:34:59 GMT + - Thu, 15 Jul 2021 21:46:49 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.cosmos.azure.com/Tables + url: https://seankaneprim.table.cosmos.azure.com/Tables method: POST response: - body: '{"TableName":"gotable1msfgttesz2cp","odata.metadata":"https://chrisstablesprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' + body: '{"TableName":"gotableps3e7q02v0n3b","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' headers: Content-Type: - application/json;odata=minimalmetadata Date: - - Fri, 21 May 2021 20:35:00 GMT + - Thu, 15 Jul 2021 21:46:48 GMT Etag: - - W/"datetime'2021-05-21T20%3A35%3A00.7158280Z'" + - W/"datetime'2021-07-15T21%3A46%3A48.2743304Z'" Location: - - https://chrisstablesprim.table.cosmos.azure.com/Tables('gotable1msfgttesz2cp') - Server: - - Microsoft-HTTPAPI/2.0 + - https://seankaneprim.table.cosmos.azure.com/Tables('gotableps3e7q02v0n3b') X-Ms-Request-Id: - - a06787e1-1d41-432c-92bc-45ab333cf72d - status: 201 Ok + - a4f889e8-1e83-4aeb-a292-7ce8efa86da9 + status: 201 Created code: 201 duration: "" - request: - body: '{"BoolProp":true,"IntProp":1,"PartitionKey":"partition","RowKey":"1","StringProp":"some - string 1"}' + body: '{"Bool":true,"Integer":1,"PartitionKey":"partition","RowKey":"1","String":"some + string 1","Timestamp":"0001-01-01T00:00:00Z"}' form: {} headers: Accept: @@ -52,35 +50,31 @@ interactions: Authorization: - sanitized Content-Length: - - "98" + - "125" Content-Type: - application/json Dataserviceversion: - "3.0" User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Fri, 21 May 2021 20:35:01 GMT + - Thu, 15 Jul 2021 21:46:49 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.cosmos.azure.com/gotable1msfgttesz2cp(PartitionKey='partition',RowKey='1') + url: https://seankaneprim.table.cosmos.azure.com/gotableps3e7q02v0n3b(PartitionKey='partition',RowKey='1') method: PUT response: body: "" headers: - Content-Length: - - "0" Content-Type: - application/json Date: - - Fri, 21 May 2021 20:35:00 GMT + - Thu, 15 Jul 2021 21:46:48 GMT Etag: - - W/"datetime'2021-05-21T20%3A35%3A01.3144584Z'" - Server: - - Microsoft-HTTPAPI/2.0 + - W/"datetime'2021-07-15T21%3A46%3A49.0265608Z'" X-Ms-Request-Id: - - ae166874-a09d-4ddb-83cf-72d2728bcbbc + - 4533f4f6-3628-486f-a87a-959a95e18288 status: 204 No Content code: 204 duration: "" @@ -95,31 +89,32 @@ interactions: Dataserviceversion: - "3.0" User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Fri, 21 May 2021 20:35:01 GMT + - Thu, 15 Jul 2021 21:46:50 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.cosmos.azure.com/gotable1msfgttesz2cp()?%24filter=RowKey+eq+%271%27 + url: https://seankaneprim.table.cosmos.azure.com/gotableps3e7q02v0n3b(PartitionKey='partition',RowKey='1') method: GET response: - body: '{"value":[{"odata.etag":"W/\"datetime''2021-05-21T20%3A35%3A01.3144584Z''\"","PartitionKey":"partition","RowKey":"1","BoolProp":true,"IntProp":1,"StringProp":"some - string 1","Timestamp":"2021-05-21T20:35:01.3144584Z"}],"odata.metadata":"https://chrisstablesprim.table.cosmos.azure.com/$metadata#gotable1msfgttesz2cp"}' + body: '{"odata.metadata":"https://seankaneprim.table.cosmos.azure.com/gotableps3e7q02v0n3b/$metadata#gotableps3e7q02v0n3b/@Element","odata.etag":"W/\"datetime''2021-07-15T21%3A46%3A49.0265608Z''\"","PartitionKey":"partition","RowKey":"1","Bool":true,"Integer":1,"String":"some + string 1","Timestamp":"2021-07-15T21:46:49.0265608Z"}' headers: Content-Type: - application/json;odata=minimalmetadata Date: - - Fri, 21 May 2021 20:35:00 GMT - Server: - - Microsoft-HTTPAPI/2.0 + - Thu, 15 Jul 2021 21:46:48 GMT + Etag: + - W/"datetime'2021-07-15T21%3A46%3A49.0265608Z'" X-Ms-Request-Id: - - d091e8e7-5c01-4fd7-8637-fc7960d805b2 - status: 200 Ok + - 1fd2baf0-db4c-4b8c-8f06-24fd9e5d7ffd + status: 200 OK code: 200 duration: "" - request: - body: '{"MergeProperty":"foo","PartitionKey":"partition","RowKey":"1"}' + body: '{"Integer":1,"MergeProperty":"foo","PartitionKey":"partition","RowKey":"1","String":"some + string 1"}' form: {} headers: Accept: @@ -127,35 +122,31 @@ interactions: Authorization: - sanitized Content-Length: - - "63" + - "100" Content-Type: - application/json Dataserviceversion: - "3.0" User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Fri, 21 May 2021 20:35:01 GMT + - Thu, 15 Jul 2021 21:46:50 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.cosmos.azure.com/gotable1msfgttesz2cp(PartitionKey='partition',RowKey='1') + url: https://seankaneprim.table.cosmos.azure.com/gotableps3e7q02v0n3b(PartitionKey='partition',RowKey='1') method: PUT response: body: "" headers: - Content-Length: - - "0" Content-Type: - application/json Date: - - Fri, 21 May 2021 20:35:00 GMT + - Thu, 15 Jul 2021 21:46:48 GMT Etag: - - W/"datetime'2021-05-21T20%3A35%3A01.4885384Z'" - Server: - - Microsoft-HTTPAPI/2.0 + - W/"datetime'2021-07-15T21%3A46%3A49.2600328Z'" X-Ms-Request-Id: - - 54960acf-d75a-4bf5-b2eb-b20a4e546c72 + - f59cdaf4-0a57-4010-89a2-05ffeb5c9954 status: 204 No Content code: 204 duration: "" @@ -170,26 +161,25 @@ interactions: Dataserviceversion: - "3.0" User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Fri, 21 May 2021 20:35:01 GMT + - Thu, 15 Jul 2021 21:46:50 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.cosmos.azure.com/gotable1msfgttesz2cp()?%24filter=RowKey+eq+%271%27 + url: https://seankaneprim.table.cosmos.azure.com/gotableps3e7q02v0n3b()?%24filter=RowKey+eq+%271%27 method: GET response: - body: '{"value":[{"odata.etag":"W/\"datetime''2021-05-21T20%3A35%3A01.4885384Z''\"","PartitionKey":"partition","RowKey":"1","MergeProperty":"foo","Timestamp":"2021-05-21T20:35:01.4885384Z"}],"odata.metadata":"https://chrisstablesprim.table.cosmos.azure.com/$metadata#gotable1msfgttesz2cp"}' + body: '{"value":[{"odata.etag":"W/\"datetime''2021-07-15T21%3A46%3A49.2600328Z''\"","PartitionKey":"partition","RowKey":"1","Integer":1,"MergeProperty":"foo","String":"some + string 1","Timestamp":"2021-07-15T21:46:49.2600328Z"}],"odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#gotableps3e7q02v0n3b"}' headers: Content-Type: - application/json;odata=minimalmetadata Date: - - Fri, 21 May 2021 20:35:00 GMT - Server: - - Microsoft-HTTPAPI/2.0 + - Thu, 15 Jul 2021 21:46:48 GMT X-Ms-Request-Id: - - 656e83b0-2e58-4c39-beec-116830e09468 - status: 200 Ok + - ac45b82d-f4e3-4fa7-849c-edd95107f111 + status: 200 OK code: 200 duration: "" - request: @@ -201,25 +191,21 @@ interactions: Authorization: - sanitized User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Fri, 21 May 2021 20:35:01 GMT + - Thu, 15 Jul 2021 21:46:50 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.cosmos.azure.com/Tables('gotable1msfgttesz2cp') + url: https://seankaneprim.table.cosmos.azure.com/Tables('gotableps3e7q02v0n3b') method: DELETE response: body: "" headers: - Content-Length: - - "0" Date: - - Fri, 21 May 2021 20:35:01 GMT - Server: - - Microsoft-HTTPAPI/2.0 + - Thu, 15 Jul 2021 21:46:48 GMT X-Ms-Request-Id: - - 6d490fec-695f-4191-9f6c-50c27bafe0ef + - 6dffaf18-6188-47c4-8899-68f0267e8a87 status: 204 No Content code: 204 duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestAddAnnotatedEntity-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestAddAnnotatedEntity-variables.yaml new file mode 100644 index 000000000000..331538565832 --- /dev/null +++ b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestAddAnnotatedEntity-variables.yaml @@ -0,0 +1,5 @@ +--- +STORAGE_ENDPOINT_SUFFIX: core.windows.net +TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== +TABLES_STORAGE_ACCOUNT_NAME: seankaneprim +randomSeed: "1626389965" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestAddAnnotatedEntity.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestAddAnnotatedEntity.yaml new file mode 100644 index 000000000000..0339bf6ce2f7 --- /dev/null +++ b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestAddAnnotatedEntity.yaml @@ -0,0 +1,218 @@ +--- +version: 1 +interactions: +- request: + body: '{"TableName":"gotablenlmsiw089e5um"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "36" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Thu, 15 Jul 2021 22:59:25 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/Tables + method: POST + response: + body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotablenlmsiw089e5um"}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + Date: + - Thu, 15 Jul 2021 22:59:25 GMT + Location: + - https://seankaneprim.table.core.windows.net/Tables('gotablenlmsiw089e5um') + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - 3a32c11b-f002-006e-57cd-79bd5a000000 + X-Ms-Version: + - "2019-02-02" + status: 201 Created + code: 201 + duration: "" +- request: + body: '{"Binary":"YmluYXJ5","Binary@odata.type":"Edm.Binary","Bool":true,"Bool@odata.type":"Edm.Boolean","DateType":"2021-04-01T01:01:01.000000001Z","DateType@odata.type":"Edm.DateTime","FloatType":8589934592,"FloatType@odata.type":"Edm.Double","PartitionKey":"partition","RowKey":"1","Small":10,"Small@odata.type":"Edm.Int32","Stringy":"somestring","Stringy@odata.type":"Edm.String","Timestamp":"0001-01-01T00:00:00Z","large":"1125899906842624","large@odata.type":"Edm.Int64"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "470" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + Prefer: + - return-no-content + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Thu, 15 Jul 2021 22:59:26 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/gotablenlmsiw089e5um + method: POST + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Dataserviceid: + - https://seankaneprim.table.core.windows.net/gotablenlmsiw089e5um(PartitionKey='partition',RowKey='1') + Date: + - Thu, 15 Jul 2021 22:59:25 GMT + Etag: + - W/"datetime'2021-07-15T22%3A59%3A26.079513Z'" + Location: + - https://seankaneprim.table.core.windows.net/gotablenlmsiw089e5um(PartitionKey='partition',RowKey='1') + Preference-Applied: + - return-no-content + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - 3a32c150-f002-006e-05cd-79bd5a000000 + X-Ms-Version: + - "2019-02-02" + status: 204 No Content + code: 204 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Thu, 15 Jul 2021 22:59:26 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/gotablenlmsiw089e5um(PartitionKey='partition',RowKey='1')?%24format=application%2Fjson%3Bodata%3Dfullmetadata + method: GET + response: + body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#gotablenlmsiw089e5um/@Element","odata.type":"seankaneprim.gotablenlmsiw089e5um","odata.id":"https://seankaneprim.table.core.windows.net/gotablenlmsiw089e5um(PartitionKey=''partition'',RowKey=''1'')","odata.etag":"W/\"datetime''2021-07-15T22%3A59%3A26.079513Z''\"","odata.editLink":"gotablenlmsiw089e5um(PartitionKey=''partition'',RowKey=''1'')","PartitionKey":"partition","RowKey":"1","Timestamp@odata.type":"Edm.DateTime","Timestamp":"2021-07-15T22:59:26.079513Z","Binary@odata.type":"Edm.Binary","Binary":"YmluYXJ5","Bool":true,"DateType@odata.type":"Edm.DateTime","DateType":"2021-04-01T01:01:01Z","FloatType":8589934592.0,"Small":10,"Stringy":"somestring","large@odata.type":"Edm.Int64","large":"1125899906842624"}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json;odata=fullmetadata;streaming=true;charset=utf-8 + Date: + - Thu, 15 Jul 2021 22:59:26 GMT + Etag: + - W/"datetime'2021-07-15T22%3A59%3A26.079513Z'" + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - 3a32c181-f002-006e-2ecd-79bd5a000000 + X-Ms-Version: + - "2019-02-02" + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Thu, 15 Jul 2021 22:59:26 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/gotablenlmsiw089e5um()?%24filter=PartitionKey+eq+%27partition%27 + method: GET + response: + body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#gotablenlmsiw089e5um","value":[{"odata.etag":"W/\"datetime''2021-07-15T22%3A59%3A26.079513Z''\"","PartitionKey":"partition","RowKey":"1","Timestamp":"2021-07-15T22:59:26.079513Z","Binary@odata.type":"Edm.Binary","Binary":"YmluYXJ5","Bool":true,"DateType@odata.type":"Edm.DateTime","DateType":"2021-04-01T01:01:01Z","FloatType":8589934592.0,"Small":10,"Stringy":"somestring","large@odata.type":"Edm.Int64","large":"1125899906842624"}]}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + Date: + - Thu, 15 Jul 2021 22:59:26 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - 3a32c1a5-f002-006e-4ecd-79bd5a000000 + X-Ms-Version: + - "2019-02-02" + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Thu, 15 Jul 2021 22:59:26 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/Tables('gotablenlmsiw089e5um') + method: DELETE + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Date: + - Thu, 15 Jul 2021 22:59:26 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - 3a32c1c6-f002-006e-6dcd-79bd5a000000 + X-Ms-Version: + - "2019-02-02" + status: 204 No Content + code: 204 + duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestAddBasicEntity-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestAddBasicEntity-variables.yaml new file mode 100644 index 000000000000..5b56622a377b --- /dev/null +++ b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestAddBasicEntity-variables.yaml @@ -0,0 +1,5 @@ +--- +STORAGE_ENDPOINT_SUFFIX: core.windows.net +TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== +TABLES_STORAGE_ACCOUNT_NAME: seankaneprim +randomSeed: "1626385900" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestAddBasicEntity.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestAddBasicEntity.yaml new file mode 100644 index 000000000000..f78f1906ec1b --- /dev/null +++ b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestAddBasicEntity.yaml @@ -0,0 +1,218 @@ +--- +version: 1 +interactions: +- request: + body: '{"TableName":"gotablezp1d18k5xiawn"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "36" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Thu, 15 Jul 2021 21:51:40 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/Tables + method: POST + response: + body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotablezp1d18k5xiawn"}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + Date: + - Thu, 15 Jul 2021 21:51:39 GMT + Location: + - https://seankaneprim.table.core.windows.net/Tables('gotablezp1d18k5xiawn') + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - 2eb5e556-0002-008e-52c3-793ec3000000 + X-Ms-Version: + - "2019-02-02" + status: 201 Created + code: 201 + duration: "" +- request: + body: '{"Bool":true,"Integer":10,"PartitionKey":"pk001","RowKey":"rk001","String":"abcdef","Timestamp":"0001-01-01T00:00:00Z"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "119" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + Prefer: + - return-no-content + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Thu, 15 Jul 2021 21:51:40 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/gotablezp1d18k5xiawn + method: POST + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Dataserviceid: + - https://seankaneprim.table.core.windows.net/gotablezp1d18k5xiawn(PartitionKey='pk001',RowKey='rk001') + Date: + - Thu, 15 Jul 2021 21:51:39 GMT + Etag: + - W/"datetime'2021-07-15T21%3A51%3A39.9360235Z'" + Location: + - https://seankaneprim.table.core.windows.net/gotablezp1d18k5xiawn(PartitionKey='pk001',RowKey='rk001') + Preference-Applied: + - return-no-content + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - 2eb5e589-0002-008e-02c3-793ec3000000 + X-Ms-Version: + - "2019-02-02" + status: 204 No Content + code: 204 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Thu, 15 Jul 2021 21:51:41 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/gotablezp1d18k5xiawn(PartitionKey='pk001',RowKey='rk001') + method: GET + response: + body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#gotablezp1d18k5xiawn/@Element","odata.etag":"W/\"datetime''2021-07-15T21%3A51%3A39.9360235Z''\"","PartitionKey":"pk001","RowKey":"rk001","Timestamp":"2021-07-15T21:51:39.9360235Z","Bool":true,"Integer":10,"String":"abcdef"}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + Date: + - Thu, 15 Jul 2021 21:51:39 GMT + Etag: + - W/"datetime'2021-07-15T21%3A51%3A39.9360235Z'" + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - 2eb5e5b9-0002-008e-32c3-793ec3000000 + X-Ms-Version: + - "2019-02-02" + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Thu, 15 Jul 2021 21:51:41 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/gotablezp1d18k5xiawn()?%24filter=PartitionKey+eq+%27pk001%27 + method: GET + response: + body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#gotablezp1d18k5xiawn","value":[{"odata.etag":"W/\"datetime''2021-07-15T21%3A51%3A39.9360235Z''\"","PartitionKey":"pk001","RowKey":"rk001","Timestamp":"2021-07-15T21:51:39.9360235Z","Bool":true,"Integer":10,"String":"abcdef"}]}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + Date: + - Thu, 15 Jul 2021 21:51:39 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - 2eb5e5f5-0002-008e-6ac3-793ec3000000 + X-Ms-Version: + - "2019-02-02" + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Thu, 15 Jul 2021 21:51:41 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/Tables('gotablezp1d18k5xiawn') + method: DELETE + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Date: + - Thu, 15 Jul 2021 21:51:39 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - 2eb5e617-0002-008e-0cc3-793ec3000000 + X-Ms-Version: + - "2019-02-02" + status: 204 No Content + code: 204 + duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestAddComplexEntity-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestAddComplexEntity-variables.yaml index f86a77d88694..6ffdde6abbca 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestAddComplexEntity-variables.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestAddComplexEntity-variables.yaml @@ -1,6 +1,5 @@ --- STORAGE_ENDPOINT_SUFFIX: core.windows.net TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== -TABLES_STORAGE_ACCOUNT_NAME: chrisstablesprim -now: "2021-04-10T19:18:38.5403201-05:00" -randomSeed: "1618100317" +TABLES_STORAGE_ACCOUNT_NAME: seankaneprim +randomSeed: "1626385877" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestAddComplexEntity.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestAddComplexEntity.yaml index 78e8e8f28f88..7139552a3594 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestAddComplexEntity.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestAddComplexEntity.yaml @@ -2,7 +2,7 @@ version: 1 interactions: - request: - body: '{"TableName":"gotableseqkydnlewbop"}' + body: '{"TableName":"gotablep6e6qfifgukvi"}' form: {} headers: Accept: @@ -16,39 +16,38 @@ interactions: Dataserviceversion: - "3.0" User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Sun, 11 Apr 2021 00:18:37 GMT + - Thu, 15 Jul 2021 21:51:17 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.core.windows.net/Tables + url: https://seankaneprim.table.core.windows.net/Tables method: POST response: - body: '{"odata.metadata":"https://chrisstablesprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotableseqkydnlewbop"}' + body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotablep6e6qfifgukvi"}' headers: Cache-Control: - no-cache Content-Type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 Date: - - Sun, 11 Apr 2021 00:18:38 GMT + - Thu, 15 Jul 2021 21:51:17 GMT Location: - - https://chrisstablesprim.table.core.windows.net/Tables('gotableseqkydnlewbop') + - https://seankaneprim.table.core.windows.net/Tables('gotablep6e6qfifgukvi') Server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 X-Content-Type-Options: - nosniff X-Ms-Request-Id: - - 91267bb0-7002-0034-4468-2e07dc000000 + - e67a0c95-2002-006d-35c3-795c3e000000 X-Ms-Version: - "2019-02-02" status: 201 Created code: 201 duration: "" - request: - body: '{"PartitionKey":"partition","RowKey":"row","SomeBinaryProperty":"c29tZSBieXRlcw==","SomeBinaryProperty@odata.type":"Edm.Binary","SomeDateProperty":"2021-04-11T00:18:38.5403201Z","SomeDateProperty@odata.type":"Edm.DateTime","SomeDoubleProperty0":1,"SomeDoubleProperty0@odata.type":"Edm.Double","SomeDoubleProperty1":1.2345,"SomeDoubleProperty1@odata.type":"Edm.Double","SomeGuidProperty":"bc08bdf6-10bd-4b3e-612f-62de19f57821","SomeGuidProperty@odata.type":"Edm.Guid","SomeInt64Property":"9223372036854775807","SomeInt64Property@odata.type":"Edm.Int64","SomeIntProperty":42,"SomePtrStringProperty":"some - pointer to string","SomeStringProperty":"some string"}' + body: '{"Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":1,"PartitionKey":"partition","RowKey":"1","String":"someString","Timestamp":"0001-01-01T00:00:00Z"}' form: {} headers: Accept: @@ -56,7 +55,7 @@ interactions: Authorization: - sanitized Content-Length: - - "657" + - "194" Content-Type: - application/json Dataserviceversion: @@ -64,13 +63,13 @@ interactions: Prefer: - return-no-content User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Sun, 11 Apr 2021 00:18:38 GMT + - Thu, 15 Jul 2021 21:51:18 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.core.windows.net/gotableseqkydnlewbop + url: https://seankaneprim.table.core.windows.net/gotablep6e6qfifgukvi method: POST response: body: "" @@ -80,13 +79,13 @@ interactions: Content-Length: - "0" Dataserviceid: - - https://chrisstablesprim.table.core.windows.net/gotableseqkydnlewbop(PartitionKey='partition',RowKey='row') + - https://seankaneprim.table.core.windows.net/gotablep6e6qfifgukvi(PartitionKey='partition',RowKey='1') Date: - - Sun, 11 Apr 2021 00:18:38 GMT + - Thu, 15 Jul 2021 21:51:17 GMT Etag: - - W/"datetime'2021-04-11T00%3A18%3A38.2407207Z'" + - W/"datetime'2021-07-15T21%3A51%3A17.2884107Z'" Location: - - https://chrisstablesprim.table.core.windows.net/gotableseqkydnlewbop(PartitionKey='partition',RowKey='row') + - https://seankaneprim.table.core.windows.net/gotablep6e6qfifgukvi(PartitionKey='partition',RowKey='1') Preference-Applied: - return-no-content Server: @@ -94,7 +93,7 @@ interactions: X-Content-Type-Options: - nosniff X-Ms-Request-Id: - - 91267bbe-7002-0034-5068-2e07dc000000 + - e67a0cf7-2002-006d-12c3-795c3e000000 X-Ms-Version: - "2019-02-02" status: 204 No Content @@ -109,13 +108,13 @@ interactions: Authorization: - sanitized User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Sun, 11 Apr 2021 00:18:38 GMT + - Thu, 15 Jul 2021 21:51:18 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.core.windows.net/Tables('gotableseqkydnlewbop') + url: https://seankaneprim.table.core.windows.net/Tables('gotablep6e6qfifgukvi') method: DELETE response: body: "" @@ -125,13 +124,13 @@ interactions: Content-Length: - "0" Date: - - Sun, 11 Apr 2021 00:18:38 GMT + - Thu, 15 Jul 2021 21:51:17 GMT Server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 X-Content-Type-Options: - nosniff X-Ms-Request-Id: - - 91267bc3-7002-0034-5568-2e07dc000000 + - e67a0d21-2002-006d-3bc3-795c3e000000 X-Ms-Version: - "2019-02-02" status: 204 No Content diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestAddEntity-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestAddEntity-variables.yaml index b2ce8f9f7145..1ad415da464b 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestAddEntity-variables.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestAddEntity-variables.yaml @@ -1,5 +1,5 @@ --- STORAGE_ENDPOINT_SUFFIX: core.windows.net TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== -TABLES_STORAGE_ACCOUNT_NAME: chrisstablesprim -randomSeed: "1617580855" +TABLES_STORAGE_ACCOUNT_NAME: seankaneprim +randomSeed: "1626385851" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestAddEntity.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestAddEntity.yaml index e5b71baad0b6..023a1b79f7dc 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestAddEntity.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestAddEntity.yaml @@ -2,7 +2,7 @@ version: 1 interactions: - request: - body: '{"TableName":"gotableldjhskq166plj"}' + body: '{"TableName":"gotable71ug01elhk9wn"}' form: {} headers: Accept: @@ -16,39 +16,39 @@ interactions: Dataserviceversion: - "3.0" User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Mon, 05 Apr 2021 00:00:55 GMT + - Thu, 15 Jul 2021 21:50:51 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.core.windows.net/Tables + url: https://seankaneprim.table.core.windows.net/Tables method: POST response: - body: '{"odata.metadata":"https://chrisstablesprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotableldjhskq166plj"}' + body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotable71ug01elhk9wn"}' headers: Cache-Control: - no-cache Content-Type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 Date: - - Mon, 05 Apr 2021 00:00:55 GMT + - Thu, 15 Jul 2021 21:50:51 GMT Location: - - https://chrisstablesprim.table.core.windows.net/Tables('gotableldjhskq166plj') + - https://seankaneprim.table.core.windows.net/Tables('gotable71ug01elhk9wn') Server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 X-Content-Type-Options: - nosniff X-Ms-Request-Id: - - 204673eb-b002-003b-64ae-2971b0000000 + - 985cf67b-f002-008a-26c3-79b3c4000000 X-Ms-Version: - "2019-02-02" status: 201 Created code: 201 duration: "" - request: - body: '{"BoolProp":true,"IntProp":1,"PartitionKey":"partition","RowKey":"1","StringProp":"some - string 1"}' + body: '{"Bool":true,"Integer":1,"PartitionKey":"partition","RowKey":"1","String":"some + string 1","Timestamp":"0001-01-01T00:00:00Z"}' form: {} headers: Accept: @@ -56,7 +56,7 @@ interactions: Authorization: - sanitized Content-Length: - - "98" + - "125" Content-Type: - application/json Dataserviceversion: @@ -64,13 +64,13 @@ interactions: Prefer: - return-no-content User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Mon, 05 Apr 2021 00:00:55 GMT + - Thu, 15 Jul 2021 21:50:52 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.core.windows.net/gotableldjhskq166plj + url: https://seankaneprim.table.core.windows.net/gotable71ug01elhk9wn method: POST response: body: "" @@ -80,13 +80,13 @@ interactions: Content-Length: - "0" Dataserviceid: - - https://chrisstablesprim.table.core.windows.net/gotableldjhskq166plj(PartitionKey='partition',RowKey='1') + - https://seankaneprim.table.core.windows.net/gotable71ug01elhk9wn(PartitionKey='partition',RowKey='1') Date: - - Mon, 05 Apr 2021 00:00:55 GMT + - Thu, 15 Jul 2021 21:50:51 GMT Etag: - - W/"datetime'2021-04-05T00%3A00%3A55.7477359Z'" + - W/"datetime'2021-07-15T21%3A50%3A51.4773752Z'" Location: - - https://chrisstablesprim.table.core.windows.net/gotableldjhskq166plj(PartitionKey='partition',RowKey='1') + - https://seankaneprim.table.core.windows.net/gotable71ug01elhk9wn(PartitionKey='partition',RowKey='1') Preference-Applied: - return-no-content Server: @@ -94,7 +94,7 @@ interactions: X-Content-Type-Options: - nosniff X-Ms-Request-Id: - - 204673f0-b002-003b-67ae-2971b0000000 + - 985cf6ca-f002-008a-73c3-79b3c4000000 X-Ms-Version: - "2019-02-02" status: 204 No Content @@ -109,13 +109,13 @@ interactions: Authorization: - sanitized User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Mon, 05 Apr 2021 00:00:55 GMT + - Thu, 15 Jul 2021 21:50:52 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.core.windows.net/Tables('gotableldjhskq166plj') + url: https://seankaneprim.table.core.windows.net/Tables('gotable71ug01elhk9wn') method: DELETE response: body: "" @@ -125,13 +125,13 @@ interactions: Content-Length: - "0" Date: - - Mon, 05 Apr 2021 00:00:55 GMT + - Thu, 15 Jul 2021 21:50:51 GMT Server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 X-Content-Type-Options: - nosniff X-Ms-Request-Id: - - 204673f1-b002-003b-68ae-2971b0000000 + - 985cf6f0-f002-008a-16c3-79b3c4000000 X-Ms-Version: - "2019-02-02" status: 204 No Content diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchAdd-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchAdd-variables.yaml index 6f3cfa81b06e..0b1642b367e2 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchAdd-variables.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchAdd-variables.yaml @@ -1,6 +1,5 @@ --- STORAGE_ENDPOINT_SUFFIX: core.windows.net TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== -TABLES_STORAGE_ACCOUNT_NAME: chrisstablesprim -now: "2021-05-18T10:39:58.4641986-05:00" -randomSeed: "1621352397" +TABLES_STORAGE_ACCOUNT_NAME: seankaneprim +randomSeed: "1626385830" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchAdd.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchAdd.yaml index ba8083378d10..d21415a42252 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchAdd.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchAdd.yaml @@ -2,7 +2,7 @@ version: 1 interactions: - request: - body: '{"TableName":"gotablenmikoizges9as"}' + body: '{"TableName":"gotable1aw91yk4gnxsv"}' form: {} headers: Accept: @@ -16,89 +16,79 @@ interactions: Dataserviceversion: - "3.0" User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Tue, 18 May 2021 15:39:57 GMT + - Thu, 15 Jul 2021 21:50:30 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.core.windows.net/Tables + url: https://seankaneprim.table.core.windows.net/Tables method: POST response: - body: '{"odata.metadata":"https://chrisstablesprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotablenmikoizges9as"}' + body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotable1aw91yk4gnxsv"}' headers: Cache-Control: - no-cache Content-Type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 Date: - - Tue, 18 May 2021 15:39:58 GMT + - Thu, 15 Jul 2021 21:50:29 GMT Location: - - https://chrisstablesprim.table.core.windows.net/Tables('gotablenmikoizges9as') + - https://seankaneprim.table.core.windows.net/Tables('gotable1aw91yk4gnxsv') Server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 X-Content-Type-Options: - nosniff X-Ms-Request-Id: - - 5375fa6b-7002-0024-30fc-4bc2b4000000 + - 51d65c8d-7002-002d-64c3-795b06000000 X-Ms-Version: - "2019-02-02" status: 201 Created code: 201 duration: "" - request: - body: "--batch_648025d9-6ce8-4fa4-5da7-940a633d3404\r\nContent-Type: multipart/mixed; - boundary=changeset_0f2514c8-6c9b-4052-78de-f6e2e355e3f3\r\n\r\n--changeset_0f2514c8-6c9b-4052-78de-f6e2e355e3f3\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://chrisstablesprim.table.core.windows.net/gotablenmikoizges9as?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + body: "--batch_517517d3-328a-434c-6249-4c7147146920\r\nContent-Type: multipart/mixed; + boundary=changeset_a8e2d1d0-0d7b-4c37-7399-f96e348a8270\r\n\r\n--changeset_a8e2d1d0-0d7b-4c37-7399-f96e348a8270\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotable1aw91yk4gnxsv?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 663\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"BoolProp\":true,\"IntProp\":1,\"PartitionKey\":\"partition\",\"RowKey\":\"1\",\"SomeBinaryProperty\":\"c29tZSBieXRlcw==\",\"SomeBinaryProperty@odata.type\":\"Edm.Binary\",\"SomeDateProperty\":\"2021-05-18T15:39:58.4641986Z\",\"SomeDateProperty@odata.type\":\"Edm.DateTime\",\"SomeDoubleProperty0\":1,\"SomeDoubleProperty0@odata.type\":\"Edm.Double\",\"SomeDoubleProperty1\":1.2345,\"SomeDoubleProperty1@odata.type\":\"Edm.Double\",\"SomeGuidProperty\":\"d2a8e9ac-0663-4275-5820-8cf92d76404b\",\"SomeGuidProperty@odata.type\":\"Edm.Guid\",\"SomeInt64Property\":\"9223372036854775807\",\"SomeInt64Property@odata.type\":\"Edm.Int64\",\"SomeIntProperty\":42,\"SomeStringProperty\":\"some - string\",\"StringProp\":\"some string 1\"}\r\n--changeset_0f2514c8-6c9b-4052-78de-f6e2e355e3f3\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://chrisstablesprim.table.core.windows.net/gotablenmikoizges9as?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + 260\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Float@odata.type\":\"Edm.Double\",\"Integer\":1,\"Integer@odata.type\":\"Edm.Double\",\"PartitionKey\":\"partition\",\"RowKey\":\"1\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_a8e2d1d0-0d7b-4c37-7399-f96e348a8270\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotable1aw91yk4gnxsv?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 663\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"BoolProp\":true,\"IntProp\":2,\"PartitionKey\":\"partition\",\"RowKey\":\"2\",\"SomeBinaryProperty\":\"c29tZSBieXRlcw==\",\"SomeBinaryProperty@odata.type\":\"Edm.Binary\",\"SomeDateProperty\":\"2021-05-18T15:39:58.4641986Z\",\"SomeDateProperty@odata.type\":\"Edm.DateTime\",\"SomeDoubleProperty0\":1,\"SomeDoubleProperty0@odata.type\":\"Edm.Double\",\"SomeDoubleProperty1\":1.2345,\"SomeDoubleProperty1@odata.type\":\"Edm.Double\",\"SomeGuidProperty\":\"bd350865-51bd-4c75-5d83-9b7096e127d1\",\"SomeGuidProperty@odata.type\":\"Edm.Guid\",\"SomeInt64Property\":\"9223372036854775807\",\"SomeInt64Property@odata.type\":\"Edm.Int64\",\"SomeIntProperty\":42,\"SomeStringProperty\":\"some - string\",\"StringProp\":\"some string 2\"}\r\n--changeset_0f2514c8-6c9b-4052-78de-f6e2e355e3f3\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://chrisstablesprim.table.core.windows.net/gotablenmikoizges9as?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + 260\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Float@odata.type\":\"Edm.Double\",\"Integer\":2,\"Integer@odata.type\":\"Edm.Double\",\"PartitionKey\":\"partition\",\"RowKey\":\"2\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_a8e2d1d0-0d7b-4c37-7399-f96e348a8270\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotable1aw91yk4gnxsv?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 663\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"BoolProp\":true,\"IntProp\":3,\"PartitionKey\":\"partition\",\"RowKey\":\"3\",\"SomeBinaryProperty\":\"c29tZSBieXRlcw==\",\"SomeBinaryProperty@odata.type\":\"Edm.Binary\",\"SomeDateProperty\":\"2021-05-18T15:39:58.4641986Z\",\"SomeDateProperty@odata.type\":\"Edm.DateTime\",\"SomeDoubleProperty0\":1,\"SomeDoubleProperty0@odata.type\":\"Edm.Double\",\"SomeDoubleProperty1\":1.2345,\"SomeDoubleProperty1@odata.type\":\"Edm.Double\",\"SomeGuidProperty\":\"07f327de-fc7c-4354-5ed6-4a0722415e8e\",\"SomeGuidProperty@odata.type\":\"Edm.Guid\",\"SomeInt64Property\":\"9223372036854775807\",\"SomeInt64Property@odata.type\":\"Edm.Int64\",\"SomeIntProperty\":42,\"SomeStringProperty\":\"some - string\",\"StringProp\":\"some string 3\"}\r\n--changeset_0f2514c8-6c9b-4052-78de-f6e2e355e3f3\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://chrisstablesprim.table.core.windows.net/gotablenmikoizges9as?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + 260\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Float@odata.type\":\"Edm.Double\",\"Integer\":3,\"Integer@odata.type\":\"Edm.Double\",\"PartitionKey\":\"partition\",\"RowKey\":\"3\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_a8e2d1d0-0d7b-4c37-7399-f96e348a8270\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotable1aw91yk4gnxsv?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 663\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"BoolProp\":true,\"IntProp\":4,\"PartitionKey\":\"partition\",\"RowKey\":\"4\",\"SomeBinaryProperty\":\"c29tZSBieXRlcw==\",\"SomeBinaryProperty@odata.type\":\"Edm.Binary\",\"SomeDateProperty\":\"2021-05-18T15:39:58.4641986Z\",\"SomeDateProperty@odata.type\":\"Edm.DateTime\",\"SomeDoubleProperty0\":1,\"SomeDoubleProperty0@odata.type\":\"Edm.Double\",\"SomeDoubleProperty1\":1.2345,\"SomeDoubleProperty1@odata.type\":\"Edm.Double\",\"SomeGuidProperty\":\"e59c88f8-9b85-4105-5557-82e7260ec226\",\"SomeGuidProperty@odata.type\":\"Edm.Guid\",\"SomeInt64Property\":\"9223372036854775807\",\"SomeInt64Property@odata.type\":\"Edm.Int64\",\"SomeIntProperty\":42,\"SomeStringProperty\":\"some - string\",\"StringProp\":\"some string 4\"}\r\n--changeset_0f2514c8-6c9b-4052-78de-f6e2e355e3f3\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://chrisstablesprim.table.core.windows.net/gotablenmikoizges9as?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + 260\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Float@odata.type\":\"Edm.Double\",\"Integer\":4,\"Integer@odata.type\":\"Edm.Double\",\"PartitionKey\":\"partition\",\"RowKey\":\"4\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_a8e2d1d0-0d7b-4c37-7399-f96e348a8270\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotable1aw91yk4gnxsv?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 663\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"BoolProp\":true,\"IntProp\":5,\"PartitionKey\":\"partition\",\"RowKey\":\"5\",\"SomeBinaryProperty\":\"c29tZSBieXRlcw==\",\"SomeBinaryProperty@odata.type\":\"Edm.Binary\",\"SomeDateProperty\":\"2021-05-18T15:39:58.4641986Z\",\"SomeDateProperty@odata.type\":\"Edm.DateTime\",\"SomeDoubleProperty0\":1,\"SomeDoubleProperty0@odata.type\":\"Edm.Double\",\"SomeDoubleProperty1\":1.2345,\"SomeDoubleProperty1@odata.type\":\"Edm.Double\",\"SomeGuidProperty\":\"89770aa3-03ca-42b6-65f8-5a125274b222\",\"SomeGuidProperty@odata.type\":\"Edm.Guid\",\"SomeInt64Property\":\"9223372036854775807\",\"SomeInt64Property@odata.type\":\"Edm.Int64\",\"SomeIntProperty\":42,\"SomeStringProperty\":\"some - string\",\"StringProp\":\"some string 5\"}\r\n--changeset_0f2514c8-6c9b-4052-78de-f6e2e355e3f3\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://chrisstablesprim.table.core.windows.net/gotablenmikoizges9as?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + 260\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Float@odata.type\":\"Edm.Double\",\"Integer\":5,\"Integer@odata.type\":\"Edm.Double\",\"PartitionKey\":\"partition\",\"RowKey\":\"5\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_a8e2d1d0-0d7b-4c37-7399-f96e348a8270\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotable1aw91yk4gnxsv?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 663\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"BoolProp\":true,\"IntProp\":6,\"PartitionKey\":\"partition\",\"RowKey\":\"6\",\"SomeBinaryProperty\":\"c29tZSBieXRlcw==\",\"SomeBinaryProperty@odata.type\":\"Edm.Binary\",\"SomeDateProperty\":\"2021-05-18T15:39:58.4641986Z\",\"SomeDateProperty@odata.type\":\"Edm.DateTime\",\"SomeDoubleProperty0\":1,\"SomeDoubleProperty0@odata.type\":\"Edm.Double\",\"SomeDoubleProperty1\":1.2345,\"SomeDoubleProperty1@odata.type\":\"Edm.Double\",\"SomeGuidProperty\":\"d19dcff6-9768-4ddf-71a6-55acc1a48e27\",\"SomeGuidProperty@odata.type\":\"Edm.Guid\",\"SomeInt64Property\":\"9223372036854775807\",\"SomeInt64Property@odata.type\":\"Edm.Int64\",\"SomeIntProperty\":42,\"SomeStringProperty\":\"some - string\",\"StringProp\":\"some string 6\"}\r\n--changeset_0f2514c8-6c9b-4052-78de-f6e2e355e3f3\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://chrisstablesprim.table.core.windows.net/gotablenmikoizges9as?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + 260\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Float@odata.type\":\"Edm.Double\",\"Integer\":6,\"Integer@odata.type\":\"Edm.Double\",\"PartitionKey\":\"partition\",\"RowKey\":\"6\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_a8e2d1d0-0d7b-4c37-7399-f96e348a8270\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotable1aw91yk4gnxsv?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 663\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"BoolProp\":true,\"IntProp\":7,\"PartitionKey\":\"partition\",\"RowKey\":\"7\",\"SomeBinaryProperty\":\"c29tZSBieXRlcw==\",\"SomeBinaryProperty@odata.type\":\"Edm.Binary\",\"SomeDateProperty\":\"2021-05-18T15:39:58.4641986Z\",\"SomeDateProperty@odata.type\":\"Edm.DateTime\",\"SomeDoubleProperty0\":1,\"SomeDoubleProperty0@odata.type\":\"Edm.Double\",\"SomeDoubleProperty1\":1.2345,\"SomeDoubleProperty1@odata.type\":\"Edm.Double\",\"SomeGuidProperty\":\"df72b407-50b5-49dc-6c76-75d1d1a9d347\",\"SomeGuidProperty@odata.type\":\"Edm.Guid\",\"SomeInt64Property\":\"9223372036854775807\",\"SomeInt64Property@odata.type\":\"Edm.Int64\",\"SomeIntProperty\":42,\"SomeStringProperty\":\"some - string\",\"StringProp\":\"some string 7\"}\r\n--changeset_0f2514c8-6c9b-4052-78de-f6e2e355e3f3\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://chrisstablesprim.table.core.windows.net/gotablenmikoizges9as?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + 260\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Float@odata.type\":\"Edm.Double\",\"Integer\":7,\"Integer@odata.type\":\"Edm.Double\",\"PartitionKey\":\"partition\",\"RowKey\":\"7\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_a8e2d1d0-0d7b-4c37-7399-f96e348a8270\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotable1aw91yk4gnxsv?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 663\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"BoolProp\":true,\"IntProp\":8,\"PartitionKey\":\"partition\",\"RowKey\":\"8\",\"SomeBinaryProperty\":\"c29tZSBieXRlcw==\",\"SomeBinaryProperty@odata.type\":\"Edm.Binary\",\"SomeDateProperty\":\"2021-05-18T15:39:58.4641986Z\",\"SomeDateProperty@odata.type\":\"Edm.DateTime\",\"SomeDoubleProperty0\":1,\"SomeDoubleProperty0@odata.type\":\"Edm.Double\",\"SomeDoubleProperty1\":1.2345,\"SomeDoubleProperty1@odata.type\":\"Edm.Double\",\"SomeGuidProperty\":\"5c09c881-918b-4a0d-5ad0-9f3e71a3d14b\",\"SomeGuidProperty@odata.type\":\"Edm.Guid\",\"SomeInt64Property\":\"9223372036854775807\",\"SomeInt64Property@odata.type\":\"Edm.Int64\",\"SomeIntProperty\":42,\"SomeStringProperty\":\"some - string\",\"StringProp\":\"some string 8\"}\r\n--changeset_0f2514c8-6c9b-4052-78de-f6e2e355e3f3\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://chrisstablesprim.table.core.windows.net/gotablenmikoizges9as?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + 260\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Float@odata.type\":\"Edm.Double\",\"Integer\":8,\"Integer@odata.type\":\"Edm.Double\",\"PartitionKey\":\"partition\",\"RowKey\":\"8\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_a8e2d1d0-0d7b-4c37-7399-f96e348a8270\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotable1aw91yk4gnxsv?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 663\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"BoolProp\":true,\"IntProp\":9,\"PartitionKey\":\"partition\",\"RowKey\":\"9\",\"SomeBinaryProperty\":\"c29tZSBieXRlcw==\",\"SomeBinaryProperty@odata.type\":\"Edm.Binary\",\"SomeDateProperty\":\"2021-05-18T15:39:58.4641986Z\",\"SomeDateProperty@odata.type\":\"Edm.DateTime\",\"SomeDoubleProperty0\":1,\"SomeDoubleProperty0@odata.type\":\"Edm.Double\",\"SomeDoubleProperty1\":1.2345,\"SomeDoubleProperty1@odata.type\":\"Edm.Double\",\"SomeGuidProperty\":\"d685a381-7648-4e16-74a5-c2c58f30d7b0\",\"SomeGuidProperty@odata.type\":\"Edm.Guid\",\"SomeInt64Property\":\"9223372036854775807\",\"SomeInt64Property@odata.type\":\"Edm.Int64\",\"SomeIntProperty\":42,\"SomeStringProperty\":\"some - string\",\"StringProp\":\"some string 9\"}\r\n--changeset_0f2514c8-6c9b-4052-78de-f6e2e355e3f3\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://chrisstablesprim.table.core.windows.net/gotablenmikoizges9as?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + 260\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Float@odata.type\":\"Edm.Double\",\"Integer\":9,\"Integer@odata.type\":\"Edm.Double\",\"PartitionKey\":\"partition\",\"RowKey\":\"9\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_a8e2d1d0-0d7b-4c37-7399-f96e348a8270\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotable1aw91yk4gnxsv?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 666\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"BoolProp\":true,\"IntProp\":10,\"PartitionKey\":\"partition\",\"RowKey\":\"10\",\"SomeBinaryProperty\":\"c29tZSBieXRlcw==\",\"SomeBinaryProperty@odata.type\":\"Edm.Binary\",\"SomeDateProperty\":\"2021-05-18T15:39:58.4641986Z\",\"SomeDateProperty@odata.type\":\"Edm.DateTime\",\"SomeDoubleProperty0\":1,\"SomeDoubleProperty0@odata.type\":\"Edm.Double\",\"SomeDoubleProperty1\":1.2345,\"SomeDoubleProperty1@odata.type\":\"Edm.Double\",\"SomeGuidProperty\":\"6fd6a8cb-a3c9-4a59-6648-0b7127b4d451\",\"SomeGuidProperty@odata.type\":\"Edm.Guid\",\"SomeInt64Property\":\"9223372036854775807\",\"SomeInt64Property@odata.type\":\"Edm.Int64\",\"SomeIntProperty\":42,\"SomeStringProperty\":\"some - string\",\"StringProp\":\"some string 10\"}\r\n--changeset_0f2514c8-6c9b-4052-78de-f6e2e355e3f3--\r\n\r\n--batch_648025d9-6ce8-4fa4-5da7-940a633d3404--\r\n" + 262\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Float@odata.type\":\"Edm.Double\",\"Integer\":10,\"Integer@odata.type\":\"Edm.Double\",\"PartitionKey\":\"partition\",\"RowKey\":\"10\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_a8e2d1d0-0d7b-4c37-7399-f96e348a8270--\r\n\r\n--batch_517517d3-328a-434c-6249-4c7147146920--\r\n" form: {} headers: Accept: @@ -106,90 +96,129 @@ interactions: Authorization: - sanitized Content-Length: - - "11281" + - "7210" Content-Type: - - multipart/mixed; boundary=batch_648025d9-6ce8-4fa4-5da7-940a633d3404 + - multipart/mixed; boundary=batch_517517d3-328a-434c-6249-4c7147146920 Dataserviceversion: - "3.0" User-Agent: - - azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; Windows_NT) + - azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Tue, 18 May 2021 15:39:58 GMT + - Thu, 15 Jul 2021 21:50:31 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.core.windows.net/$batch + url: https://seankaneprim.table.core.windows.net/$batch method: POST response: - body: "--batchresponse_68cd5b83-b388-4748-a611-24bdcdcb20e5\r\nContent-Type: multipart/mixed; - boundary=changesetresponse_48be468e-4dd0-4b63-aaab-535394c983c2\r\n\r\n--changesetresponse_48be468e-4dd0-4b63-aaab-535394c983c2\r\nContent-Type: + body: "--batchresponse_9eb910d6-b04b-453d-af1b-e4a186620bca\r\nContent-Type: multipart/mixed; + boundary=changesetresponse_277256ec-1385-4863-b3cd-baa3aca2f29b\r\n\r\n--changesetresponse_277256ec-1385-4863-b3cd-baa3aca2f29b\r\nContent-Type: application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nPreference-Applied: - return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://chrisstablesprim.table.core.windows.net/gotablenmikoizges9as(PartitionKey='partition',RowKey='1')\r\nDataServiceId: - https://chrisstablesprim.table.core.windows.net/gotablenmikoizges9as(PartitionKey='partition',RowKey='1')\r\nETag: - W/\"datetime'2021-05-18T15%3A39%3A58.8905171Z'\"\r\n\r\n\r\n--changesetresponse_48be468e-4dd0-4b63-aaab-535394c983c2\r\nContent-Type: + return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://seankaneprim.table.core.windows.net/gotable1aw91yk4gnxsv(PartitionKey='partition',RowKey='1')\r\nDataServiceId: + https://seankaneprim.table.core.windows.net/gotable1aw91yk4gnxsv(PartitionKey='partition',RowKey='1')\r\nETag: + W/\"datetime'2021-07-15T21%3A50%3A30.5388809Z'\"\r\n\r\n\r\n--changesetresponse_277256ec-1385-4863-b3cd-baa3aca2f29b\r\nContent-Type: application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nPreference-Applied: - return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://chrisstablesprim.table.core.windows.net/gotablenmikoizges9as(PartitionKey='partition',RowKey='2')\r\nDataServiceId: - https://chrisstablesprim.table.core.windows.net/gotablenmikoizges9as(PartitionKey='partition',RowKey='2')\r\nETag: - W/\"datetime'2021-05-18T15%3A39%3A58.8905171Z'\"\r\n\r\n\r\n--changesetresponse_48be468e-4dd0-4b63-aaab-535394c983c2\r\nContent-Type: + return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://seankaneprim.table.core.windows.net/gotable1aw91yk4gnxsv(PartitionKey='partition',RowKey='2')\r\nDataServiceId: + https://seankaneprim.table.core.windows.net/gotable1aw91yk4gnxsv(PartitionKey='partition',RowKey='2')\r\nETag: + W/\"datetime'2021-07-15T21%3A50%3A30.5388809Z'\"\r\n\r\n\r\n--changesetresponse_277256ec-1385-4863-b3cd-baa3aca2f29b\r\nContent-Type: application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nPreference-Applied: - return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://chrisstablesprim.table.core.windows.net/gotablenmikoizges9as(PartitionKey='partition',RowKey='3')\r\nDataServiceId: - https://chrisstablesprim.table.core.windows.net/gotablenmikoizges9as(PartitionKey='partition',RowKey='3')\r\nETag: - W/\"datetime'2021-05-18T15%3A39%3A58.8905171Z'\"\r\n\r\n\r\n--changesetresponse_48be468e-4dd0-4b63-aaab-535394c983c2\r\nContent-Type: + return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://seankaneprim.table.core.windows.net/gotable1aw91yk4gnxsv(PartitionKey='partition',RowKey='3')\r\nDataServiceId: + https://seankaneprim.table.core.windows.net/gotable1aw91yk4gnxsv(PartitionKey='partition',RowKey='3')\r\nETag: + W/\"datetime'2021-07-15T21%3A50%3A30.5388809Z'\"\r\n\r\n\r\n--changesetresponse_277256ec-1385-4863-b3cd-baa3aca2f29b\r\nContent-Type: application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nPreference-Applied: - return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://chrisstablesprim.table.core.windows.net/gotablenmikoizges9as(PartitionKey='partition',RowKey='4')\r\nDataServiceId: - https://chrisstablesprim.table.core.windows.net/gotablenmikoizges9as(PartitionKey='partition',RowKey='4')\r\nETag: - W/\"datetime'2021-05-18T15%3A39%3A58.8905171Z'\"\r\n\r\n\r\n--changesetresponse_48be468e-4dd0-4b63-aaab-535394c983c2\r\nContent-Type: + return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://seankaneprim.table.core.windows.net/gotable1aw91yk4gnxsv(PartitionKey='partition',RowKey='4')\r\nDataServiceId: + https://seankaneprim.table.core.windows.net/gotable1aw91yk4gnxsv(PartitionKey='partition',RowKey='4')\r\nETag: + W/\"datetime'2021-07-15T21%3A50%3A30.5388809Z'\"\r\n\r\n\r\n--changesetresponse_277256ec-1385-4863-b3cd-baa3aca2f29b\r\nContent-Type: application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nPreference-Applied: - return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://chrisstablesprim.table.core.windows.net/gotablenmikoizges9as(PartitionKey='partition',RowKey='5')\r\nDataServiceId: - https://chrisstablesprim.table.core.windows.net/gotablenmikoizges9as(PartitionKey='partition',RowKey='5')\r\nETag: - W/\"datetime'2021-05-18T15%3A39%3A58.8905171Z'\"\r\n\r\n\r\n--changesetresponse_48be468e-4dd0-4b63-aaab-535394c983c2\r\nContent-Type: + return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://seankaneprim.table.core.windows.net/gotable1aw91yk4gnxsv(PartitionKey='partition',RowKey='5')\r\nDataServiceId: + https://seankaneprim.table.core.windows.net/gotable1aw91yk4gnxsv(PartitionKey='partition',RowKey='5')\r\nETag: + W/\"datetime'2021-07-15T21%3A50%3A30.5388809Z'\"\r\n\r\n\r\n--changesetresponse_277256ec-1385-4863-b3cd-baa3aca2f29b\r\nContent-Type: application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nPreference-Applied: - return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://chrisstablesprim.table.core.windows.net/gotablenmikoizges9as(PartitionKey='partition',RowKey='6')\r\nDataServiceId: - https://chrisstablesprim.table.core.windows.net/gotablenmikoizges9as(PartitionKey='partition',RowKey='6')\r\nETag: - W/\"datetime'2021-05-18T15%3A39%3A58.8905171Z'\"\r\n\r\n\r\n--changesetresponse_48be468e-4dd0-4b63-aaab-535394c983c2\r\nContent-Type: + return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://seankaneprim.table.core.windows.net/gotable1aw91yk4gnxsv(PartitionKey='partition',RowKey='6')\r\nDataServiceId: + https://seankaneprim.table.core.windows.net/gotable1aw91yk4gnxsv(PartitionKey='partition',RowKey='6')\r\nETag: + W/\"datetime'2021-07-15T21%3A50%3A30.5388809Z'\"\r\n\r\n\r\n--changesetresponse_277256ec-1385-4863-b3cd-baa3aca2f29b\r\nContent-Type: application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nPreference-Applied: - return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://chrisstablesprim.table.core.windows.net/gotablenmikoizges9as(PartitionKey='partition',RowKey='7')\r\nDataServiceId: - https://chrisstablesprim.table.core.windows.net/gotablenmikoizges9as(PartitionKey='partition',RowKey='7')\r\nETag: - W/\"datetime'2021-05-18T15%3A39%3A58.8905171Z'\"\r\n\r\n\r\n--changesetresponse_48be468e-4dd0-4b63-aaab-535394c983c2\r\nContent-Type: + return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://seankaneprim.table.core.windows.net/gotable1aw91yk4gnxsv(PartitionKey='partition',RowKey='7')\r\nDataServiceId: + https://seankaneprim.table.core.windows.net/gotable1aw91yk4gnxsv(PartitionKey='partition',RowKey='7')\r\nETag: + W/\"datetime'2021-07-15T21%3A50%3A30.5388809Z'\"\r\n\r\n\r\n--changesetresponse_277256ec-1385-4863-b3cd-baa3aca2f29b\r\nContent-Type: application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nPreference-Applied: - return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://chrisstablesprim.table.core.windows.net/gotablenmikoizges9as(PartitionKey='partition',RowKey='8')\r\nDataServiceId: - https://chrisstablesprim.table.core.windows.net/gotablenmikoizges9as(PartitionKey='partition',RowKey='8')\r\nETag: - W/\"datetime'2021-05-18T15%3A39%3A58.8905171Z'\"\r\n\r\n\r\n--changesetresponse_48be468e-4dd0-4b63-aaab-535394c983c2\r\nContent-Type: + return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://seankaneprim.table.core.windows.net/gotable1aw91yk4gnxsv(PartitionKey='partition',RowKey='8')\r\nDataServiceId: + https://seankaneprim.table.core.windows.net/gotable1aw91yk4gnxsv(PartitionKey='partition',RowKey='8')\r\nETag: + W/\"datetime'2021-07-15T21%3A50%3A30.5388809Z'\"\r\n\r\n\r\n--changesetresponse_277256ec-1385-4863-b3cd-baa3aca2f29b\r\nContent-Type: application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nPreference-Applied: - return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://chrisstablesprim.table.core.windows.net/gotablenmikoizges9as(PartitionKey='partition',RowKey='9')\r\nDataServiceId: - https://chrisstablesprim.table.core.windows.net/gotablenmikoizges9as(PartitionKey='partition',RowKey='9')\r\nETag: - W/\"datetime'2021-05-18T15%3A39%3A58.8905171Z'\"\r\n\r\n\r\n--changesetresponse_48be468e-4dd0-4b63-aaab-535394c983c2\r\nContent-Type: + return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://seankaneprim.table.core.windows.net/gotable1aw91yk4gnxsv(PartitionKey='partition',RowKey='9')\r\nDataServiceId: + https://seankaneprim.table.core.windows.net/gotable1aw91yk4gnxsv(PartitionKey='partition',RowKey='9')\r\nETag: + W/\"datetime'2021-07-15T21%3A50%3A30.5388809Z'\"\r\n\r\n\r\n--changesetresponse_277256ec-1385-4863-b3cd-baa3aca2f29b\r\nContent-Type: application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nPreference-Applied: - return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://chrisstablesprim.table.core.windows.net/gotablenmikoizges9as(PartitionKey='partition',RowKey='10')\r\nDataServiceId: - https://chrisstablesprim.table.core.windows.net/gotablenmikoizges9as(PartitionKey='partition',RowKey='10')\r\nETag: - W/\"datetime'2021-05-18T15%3A39%3A58.8905171Z'\"\r\n\r\n\r\n--changesetresponse_48be468e-4dd0-4b63-aaab-535394c983c2--\r\n--batchresponse_68cd5b83-b388-4748-a611-24bdcdcb20e5--\r\n" + return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://seankaneprim.table.core.windows.net/gotable1aw91yk4gnxsv(PartitionKey='partition',RowKey='10')\r\nDataServiceId: + https://seankaneprim.table.core.windows.net/gotable1aw91yk4gnxsv(PartitionKey='partition',RowKey='10')\r\nETag: + W/\"datetime'2021-07-15T21%3A50%3A30.5388809Z'\"\r\n\r\n\r\n--changesetresponse_277256ec-1385-4863-b3cd-baa3aca2f29b--\r\n--batchresponse_9eb910d6-b04b-453d-af1b-e4a186620bca--\r\n" headers: Cache-Control: - no-cache Content-Type: - - multipart/mixed; boundary=batchresponse_68cd5b83-b388-4748-a611-24bdcdcb20e5 + - multipart/mixed; boundary=batchresponse_9eb910d6-b04b-453d-af1b-e4a186620bca Date: - - Tue, 18 May 2021 15:39:58 GMT + - Thu, 15 Jul 2021 21:50:29 GMT Server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 X-Content-Type-Options: - nosniff X-Ms-Request-Id: - - 5375fa87-7002-0024-46fc-4bc2b4000000 + - 51d65ca8-7002-002d-7dc3-795b06000000 X-Ms-Version: - "2019-02-02" status: 202 Accepted code: 202 duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Thu, 15 Jul 2021 21:50:31 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/gotable1aw91yk4gnxsv() + method: GET + response: + body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#gotable1aw91yk4gnxsv","value":[{"odata.etag":"W/\"datetime''2021-07-15T21%3A50%3A30.5388809Z''\"","PartitionKey":"partition","RowKey":"1","Timestamp":"2021-07-15T21:50:30.5388809Z","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":1.0,"String":"someString"},{"odata.etag":"W/\"datetime''2021-07-15T21%3A50%3A30.5388809Z''\"","PartitionKey":"partition","RowKey":"10","Timestamp":"2021-07-15T21:50:30.5388809Z","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":10.0,"String":"someString"},{"odata.etag":"W/\"datetime''2021-07-15T21%3A50%3A30.5388809Z''\"","PartitionKey":"partition","RowKey":"2","Timestamp":"2021-07-15T21:50:30.5388809Z","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":2.0,"String":"someString"},{"odata.etag":"W/\"datetime''2021-07-15T21%3A50%3A30.5388809Z''\"","PartitionKey":"partition","RowKey":"3","Timestamp":"2021-07-15T21:50:30.5388809Z","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":3.0,"String":"someString"},{"odata.etag":"W/\"datetime''2021-07-15T21%3A50%3A30.5388809Z''\"","PartitionKey":"partition","RowKey":"4","Timestamp":"2021-07-15T21:50:30.5388809Z","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":4.0,"String":"someString"},{"odata.etag":"W/\"datetime''2021-07-15T21%3A50%3A30.5388809Z''\"","PartitionKey":"partition","RowKey":"5","Timestamp":"2021-07-15T21:50:30.5388809Z","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":5.0,"String":"someString"},{"odata.etag":"W/\"datetime''2021-07-15T21%3A50%3A30.5388809Z''\"","PartitionKey":"partition","RowKey":"6","Timestamp":"2021-07-15T21:50:30.5388809Z","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":6.0,"String":"someString"},{"odata.etag":"W/\"datetime''2021-07-15T21%3A50%3A30.5388809Z''\"","PartitionKey":"partition","RowKey":"7","Timestamp":"2021-07-15T21:50:30.5388809Z","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":7.0,"String":"someString"},{"odata.etag":"W/\"datetime''2021-07-15T21%3A50%3A30.5388809Z''\"","PartitionKey":"partition","RowKey":"8","Timestamp":"2021-07-15T21:50:30.5388809Z","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":8.0,"String":"someString"},{"odata.etag":"W/\"datetime''2021-07-15T21%3A50%3A30.5388809Z''\"","PartitionKey":"partition","RowKey":"9","Timestamp":"2021-07-15T21:50:30.5388809Z","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":9.0,"String":"someString"}]}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + Date: + - Thu, 15 Jul 2021 21:50:30 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - 51d65ce1-7002-002d-34c3-795b06000000 + X-Ms-Version: + - "2019-02-02" + status: 200 OK + code: 200 + duration: "" - request: body: "" form: {} @@ -199,13 +228,13 @@ interactions: Authorization: - sanitized User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Tue, 18 May 2021 15:39:58 GMT + - Thu, 15 Jul 2021 21:50:32 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.core.windows.net/Tables('gotablenmikoizges9as') + url: https://seankaneprim.table.core.windows.net/Tables('gotable1aw91yk4gnxsv') method: DELETE response: body: "" @@ -215,13 +244,13 @@ interactions: Content-Length: - "0" Date: - - Tue, 18 May 2021 15:39:58 GMT + - Thu, 15 Jul 2021 21:50:30 GMT Server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 X-Content-Type-Options: - nosniff X-Ms-Request-Id: - - 5375fab1-7002-0024-70fc-4bc2b4000000 + - 51d65d2a-7002-002d-79c3-795b06000000 X-Ms-Version: - "2019-02-02" status: 204 No Content diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchError-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchError-variables.yaml index 5b36d6860273..ec8a5ad8fb99 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchError-variables.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchError-variables.yaml @@ -1,6 +1,5 @@ --- STORAGE_ENDPOINT_SUFFIX: core.windows.net TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== -TABLES_STORAGE_ACCOUNT_NAME: chrisstablesprim -now: "2021-05-21T13:23:32.659245-05:00" -randomSeed: "1621621411" +TABLES_STORAGE_ACCOUNT_NAME: seankaneprim +randomSeed: "1626385813" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchError.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchError.yaml index c6524481065f..9ddb017432d6 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchError.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchError.yaml @@ -2,7 +2,7 @@ version: 1 interactions: - request: - body: '{"TableName":"gotablepqb1rkgf82uab"}' + body: '{"TableName":"gotableonrrfq12v28e4"}' form: {} headers: Accept: @@ -16,39 +16,38 @@ interactions: Dataserviceversion: - "3.0" User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Fri, 21 May 2021 18:23:31 GMT + - Thu, 15 Jul 2021 21:50:13 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.core.windows.net/Tables + url: https://seankaneprim.table.core.windows.net/Tables method: POST response: - body: '{"odata.metadata":"https://chrisstablesprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotablepqb1rkgf82uab"}' + body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotableonrrfq12v28e4"}' headers: Cache-Control: - no-cache Content-Type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 Date: - - Fri, 21 May 2021 18:23:32 GMT + - Thu, 15 Jul 2021 21:50:12 GMT Location: - - https://chrisstablesprim.table.core.windows.net/Tables('gotablepqb1rkgf82uab') + - https://seankaneprim.table.core.windows.net/Tables('gotableonrrfq12v28e4') Server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 X-Content-Type-Options: - nosniff X-Ms-Request-Id: - - fef5bddc-1002-000d-2f6e-4efcc0000000 + - 919d9e74-3002-004e-6fc3-79c6fd000000 X-Ms-Version: - "2019-02-02" status: 201 Created code: 201 duration: "" - request: - body: '{"BoolProp":true,"IntProp":3,"PartitionKey":"partition","RowKey":"3","SomeBinaryProperty":"c29tZSBieXRlcw==","SomeBinaryProperty@odata.type":"Edm.Binary","SomeDateProperty":"2021-05-21T18:23:32.659245Z","SomeDateProperty@odata.type":"Edm.DateTime","SomeDoubleProperty0":1,"SomeDoubleProperty0@odata.type":"Edm.Double","SomeDoubleProperty1":1.2345,"SomeDoubleProperty1@odata.type":"Edm.Double","SomeGuidProperty":"4c51dc80-5e1c-4a79-4b58-8b5d1a887417","SomeGuidProperty@odata.type":"Edm.Guid","SomeInt64Property":"9223372036854775807","SomeInt64Property@odata.type":"Edm.Int64","SomeIntProperty":42,"SomeStringProperty":"some - string","StringProp":"some string 3"}' + body: '{"Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":3,"PartitionKey":"partition","RowKey":"3","String":"someString","Timestamp":"0001-01-01T00:00:00Z"}' form: {} headers: Accept: @@ -56,7 +55,7 @@ interactions: Authorization: - sanitized Content-Length: - - "662" + - "194" Content-Type: - application/json Dataserviceversion: @@ -64,13 +63,13 @@ interactions: Prefer: - return-no-content User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Fri, 21 May 2021 18:23:32 GMT + - Thu, 15 Jul 2021 21:50:14 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.core.windows.net/gotablepqb1rkgf82uab + url: https://seankaneprim.table.core.windows.net/gotableonrrfq12v28e4 method: POST response: body: "" @@ -80,13 +79,13 @@ interactions: Content-Length: - "0" Dataserviceid: - - https://chrisstablesprim.table.core.windows.net/gotablepqb1rkgf82uab(PartitionKey='partition',RowKey='3') + - https://seankaneprim.table.core.windows.net/gotableonrrfq12v28e4(PartitionKey='partition',RowKey='3') Date: - - Fri, 21 May 2021 18:23:32 GMT + - Thu, 15 Jul 2021 21:50:12 GMT Etag: - - W/"datetime'2021-05-21T18%3A23%3A32.8055163Z'" + - W/"datetime'2021-07-15T21%3A50%3A13.1513731Z'" Location: - - https://chrisstablesprim.table.core.windows.net/gotablepqb1rkgf82uab(PartitionKey='partition',RowKey='3') + - https://seankaneprim.table.core.windows.net/gotableonrrfq12v28e4(PartitionKey='partition',RowKey='3') Preference-Applied: - return-no-content Server: @@ -94,30 +93,27 @@ interactions: X-Content-Type-Options: - nosniff X-Ms-Request-Id: - - fef5bdf4-1002-000d-446e-4efcc0000000 + - 919d9f04-3002-004e-74c3-79c6fd000000 X-Ms-Version: - "2019-02-02" status: 204 No Content code: 204 duration: "" - request: - body: "--batch_082f04d4-15cc-43be-66be-49e083de268c\r\nContent-Type: multipart/mixed; - boundary=changeset_239ec220-4c24-4f16-5cbf-8fbd53fd6135\r\n\r\n--changeset_239ec220-4c24-4f16-5cbf-8fbd53fd6135\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://chrisstablesprim.table.core.windows.net/gotablepqb1rkgf82uab?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + body: "--batch_ebe3c2c9-e659-4741-4aa9-3cde003d089a\r\nContent-Type: multipart/mixed; + boundary=changeset_ac013381-52b5-4ade-74f1-c359107c6b47\r\n\r\n--changeset_ac013381-52b5-4ade-74f1-c359107c6b47\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotableonrrfq12v28e4?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 662\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"BoolProp\":true,\"IntProp\":1,\"PartitionKey\":\"partition\",\"RowKey\":\"1\",\"SomeBinaryProperty\":\"c29tZSBieXRlcw==\",\"SomeBinaryProperty@odata.type\":\"Edm.Binary\",\"SomeDateProperty\":\"2021-05-21T18:23:32.659245Z\",\"SomeDateProperty@odata.type\":\"Edm.DateTime\",\"SomeDoubleProperty0\":1,\"SomeDoubleProperty0@odata.type\":\"Edm.Double\",\"SomeDoubleProperty1\":1.2345,\"SomeDoubleProperty1@odata.type\":\"Edm.Double\",\"SomeGuidProperty\":\"24322eae-ac26-4914-7a51-4291c19121c7\",\"SomeGuidProperty@odata.type\":\"Edm.Guid\",\"SomeInt64Property\":\"9223372036854775807\",\"SomeInt64Property@odata.type\":\"Edm.Int64\",\"SomeIntProperty\":42,\"SomeStringProperty\":\"some - string\",\"StringProp\":\"some string 1\"}\r\n--changeset_239ec220-4c24-4f16-5cbf-8fbd53fd6135\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://chrisstablesprim.table.core.windows.net/gotablepqb1rkgf82uab?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + 260\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Float@odata.type\":\"Edm.Double\",\"Integer\":1,\"Integer@odata.type\":\"Edm.Double\",\"PartitionKey\":\"partition\",\"RowKey\":\"1\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_ac013381-52b5-4ade-74f1-c359107c6b47\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotableonrrfq12v28e4?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 662\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"BoolProp\":true,\"IntProp\":2,\"PartitionKey\":\"partition\",\"RowKey\":\"2\",\"SomeBinaryProperty\":\"c29tZSBieXRlcw==\",\"SomeBinaryProperty@odata.type\":\"Edm.Binary\",\"SomeDateProperty\":\"2021-05-21T18:23:32.659245Z\",\"SomeDateProperty@odata.type\":\"Edm.DateTime\",\"SomeDoubleProperty0\":1,\"SomeDoubleProperty0@odata.type\":\"Edm.Double\",\"SomeDoubleProperty1\":1.2345,\"SomeDoubleProperty1@odata.type\":\"Edm.Double\",\"SomeGuidProperty\":\"ea15bdd7-a18a-45f7-52b5-f2dafe05af3c\",\"SomeGuidProperty@odata.type\":\"Edm.Guid\",\"SomeInt64Property\":\"9223372036854775807\",\"SomeInt64Property@odata.type\":\"Edm.Int64\",\"SomeIntProperty\":42,\"SomeStringProperty\":\"some - string\",\"StringProp\":\"some string 2\"}\r\n--changeset_239ec220-4c24-4f16-5cbf-8fbd53fd6135\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://chrisstablesprim.table.core.windows.net/gotablepqb1rkgf82uab?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + 260\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Float@odata.type\":\"Edm.Double\",\"Integer\":2,\"Integer@odata.type\":\"Edm.Double\",\"PartitionKey\":\"partition\",\"RowKey\":\"2\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_ac013381-52b5-4ade-74f1-c359107c6b47\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotableonrrfq12v28e4?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 662\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"BoolProp\":true,\"IntProp\":3,\"PartitionKey\":\"partition\",\"RowKey\":\"3\",\"SomeBinaryProperty\":\"c29tZSBieXRlcw==\",\"SomeBinaryProperty@odata.type\":\"Edm.Binary\",\"SomeDateProperty\":\"2021-05-21T18:23:32.659245Z\",\"SomeDateProperty@odata.type\":\"Edm.DateTime\",\"SomeDoubleProperty0\":1,\"SomeDoubleProperty0@odata.type\":\"Edm.Double\",\"SomeDoubleProperty1\":1.2345,\"SomeDoubleProperty1@odata.type\":\"Edm.Double\",\"SomeGuidProperty\":\"4c51dc80-5e1c-4a79-4b58-8b5d1a887417\",\"SomeGuidProperty@odata.type\":\"Edm.Guid\",\"SomeInt64Property\":\"9223372036854775807\",\"SomeInt64Property@odata.type\":\"Edm.Int64\",\"SomeIntProperty\":42,\"SomeStringProperty\":\"some - string\",\"StringProp\":\"some string 3\"}\r\n--changeset_239ec220-4c24-4f16-5cbf-8fbd53fd6135--\r\n\r\n--batch_082f04d4-15cc-43be-66be-49e083de268c--\r\n" + 260\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Float@odata.type\":\"Edm.Double\",\"Integer\":3,\"Integer@odata.type\":\"Edm.Double\",\"PartitionKey\":\"partition\",\"RowKey\":\"3\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_ac013381-52b5-4ade-74f1-c359107c6b47--\r\n\r\n--batch_ebe3c2c9-e659-4741-4aa9-3cde003d089a--\r\n" form: {} headers: Accept: @@ -125,39 +121,39 @@ interactions: Authorization: - sanitized Content-Length: - - "3547" + - "2329" Content-Type: - - multipart/mixed; boundary=batch_082f04d4-15cc-43be-66be-49e083de268c + - multipart/mixed; boundary=batch_ebe3c2c9-e659-4741-4aa9-3cde003d089a Dataserviceversion: - "3.0" User-Agent: - - azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; Windows_NT) + - azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Fri, 21 May 2021 18:23:32 GMT + - Thu, 15 Jul 2021 21:50:14 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.core.windows.net/$batch + url: https://seankaneprim.table.core.windows.net/$batch method: POST response: - body: "--batchresponse_38af3102-a3c4-4d6b-9ad4-0d936fb607d7\r\nContent-Type: multipart/mixed; - boundary=changesetresponse_a33fe87c-1503-4bd5-971b-a32caf04061f\r\n\r\n--changesetresponse_a33fe87c-1503-4bd5-971b-a32caf04061f\r\nContent-Type: + body: "--batchresponse_61fdc5a5-761a-4a06-b2e2-46a04023783d\r\nContent-Type: multipart/mixed; + boundary=changesetresponse_a4bb513b-0239-47b0-aa39-43d5e59c46cf\r\n\r\n--changesetresponse_a4bb513b-0239-47b0-aa39-43d5e59c46cf\r\nContent-Type: application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 409 Conflict\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nPreference-Applied: return-no-content\r\nDataServiceVersion: 3.0;\r\nContent-Type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8\r\n\r\n{\"odata.error\":{\"code\":\"EntityAlreadyExists\",\"message\":{\"lang\":\"en-US\",\"value\":\"2:The - specified entity already exists.\\nRequestId:fef5be0e-1002-000d-5d6e-4efcc0000000\\nTime:2021-05-21T18:23:32.8905761Z\"}}}\r\n--changesetresponse_a33fe87c-1503-4bd5-971b-a32caf04061f--\r\n--batchresponse_38af3102-a3c4-4d6b-9ad4-0d936fb607d7--\r\n" + specified entity already exists.\\nRequestId:919d9f4d-3002-004e-3dc3-79c6fd000000\\nTime:2021-07-15T21:50:13.2804650Z\"}}}\r\n--changesetresponse_a4bb513b-0239-47b0-aa39-43d5e59c46cf--\r\n--batchresponse_61fdc5a5-761a-4a06-b2e2-46a04023783d--\r\n" headers: Cache-Control: - no-cache Content-Type: - - multipart/mixed; boundary=batchresponse_38af3102-a3c4-4d6b-9ad4-0d936fb607d7 + - multipart/mixed; boundary=batchresponse_61fdc5a5-761a-4a06-b2e2-46a04023783d Date: - - Fri, 21 May 2021 18:23:32 GMT + - Thu, 15 Jul 2021 21:50:12 GMT Server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 X-Content-Type-Options: - nosniff X-Ms-Request-Id: - - fef5be0e-1002-000d-5d6e-4efcc0000000 + - 919d9f4d-3002-004e-3dc3-79c6fd000000 X-Ms-Version: - "2019-02-02" status: 202 Accepted @@ -172,13 +168,13 @@ interactions: Authorization: - sanitized User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Fri, 21 May 2021 18:23:32 GMT + - Thu, 15 Jul 2021 21:50:14 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.core.windows.net/Tables('gotablepqb1rkgf82uab') + url: https://seankaneprim.table.core.windows.net/Tables('gotableonrrfq12v28e4') method: DELETE response: body: "" @@ -188,13 +184,13 @@ interactions: Content-Length: - "0" Date: - - Fri, 21 May 2021 18:23:32 GMT + - Thu, 15 Jul 2021 21:50:12 GMT Server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 X-Content-Type-Options: - nosniff X-Ms-Request-Id: - - fef5be1c-1002-000d-6b6e-4efcc0000000 + - 919d9fa1-3002-004e-10c3-79c6fd000000 X-Ms-Version: - "2019-02-02" status: 204 No Content diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchMixed-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchMixed-variables.yaml index 72609d6fa263..64ece4721b61 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchMixed-variables.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchMixed-variables.yaml @@ -1,6 +1,5 @@ --- STORAGE_ENDPOINT_SUFFIX: core.windows.net TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== -TABLES_STORAGE_ACCOUNT_NAME: chrisstablesprim -now: "2021-05-21T14:41:03.2032731-05:00" -randomSeed: "1621626062" +TABLES_STORAGE_ACCOUNT_NAME: seankaneprim +randomSeed: "1626385786" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchMixed.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchMixed.yaml index 171a61c4c7be..e195c1ad1ccf 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchMixed.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchMixed.yaml @@ -2,7 +2,7 @@ version: 1 interactions: - request: - body: '{"TableName":"gotableg8scudpw7lv7b"}' + body: '{"TableName":"gotable0qfinjf2fyabp"}' form: {} headers: Accept: @@ -16,54 +16,51 @@ interactions: Dataserviceversion: - "3.0" User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Fri, 21 May 2021 19:41:02 GMT + - Thu, 15 Jul 2021 21:49:46 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.core.windows.net/Tables + url: https://seankaneprim.table.core.windows.net/Tables method: POST response: - body: '{"odata.metadata":"https://chrisstablesprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotableg8scudpw7lv7b"}' + body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotable0qfinjf2fyabp"}' headers: Cache-Control: - no-cache Content-Type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 Date: - - Fri, 21 May 2021 19:41:03 GMT + - Thu, 15 Jul 2021 21:49:45 GMT Location: - - https://chrisstablesprim.table.core.windows.net/Tables('gotableg8scudpw7lv7b') + - https://seankaneprim.table.core.windows.net/Tables('gotable0qfinjf2fyabp') Server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 X-Content-Type-Options: - nosniff X-Ms-Request-Id: - - 8e3dc898-5002-001c-4c79-4e6674000000 + - cb6b9ca9-b002-001d-03c3-79e5c9000000 X-Ms-Version: - "2019-02-02" status: 201 Created code: 201 duration: "" - request: - body: "--batch_2de7b066-5519-4c0f-4a33-ddc8370312e9\r\nContent-Type: multipart/mixed; - boundary=changeset_2e8293fd-fcc9-4729-761c-8513e70db34b\r\n\r\n--changeset_2e8293fd-fcc9-4729-761c-8513e70db34b\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://chrisstablesprim.table.core.windows.net/gotableg8scudpw7lv7b?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + body: "--batch_0345104c-14ba-4677-72e0-d9b843570103\r\nContent-Type: multipart/mixed; + boundary=changeset_4ea4363c-27b1-4850-6d7a-7b628efdde6c\r\n\r\n--changeset_4ea4363c-27b1-4850-6d7a-7b628efdde6c\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotable0qfinjf2fyabp?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 663\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"BoolProp\":true,\"IntProp\":1,\"PartitionKey\":\"partition\",\"RowKey\":\"1\",\"SomeBinaryProperty\":\"c29tZSBieXRlcw==\",\"SomeBinaryProperty@odata.type\":\"Edm.Binary\",\"SomeDateProperty\":\"2021-05-21T19:41:03.2032731Z\",\"SomeDateProperty@odata.type\":\"Edm.DateTime\",\"SomeDoubleProperty0\":1,\"SomeDoubleProperty0@odata.type\":\"Edm.Double\",\"SomeDoubleProperty1\":1.2345,\"SomeDoubleProperty1@odata.type\":\"Edm.Double\",\"SomeGuidProperty\":\"27bdea07-48bb-49a1-7575-fa9c92b50ecc\",\"SomeGuidProperty@odata.type\":\"Edm.Guid\",\"SomeInt64Property\":\"9223372036854775807\",\"SomeInt64Property@odata.type\":\"Edm.Int64\",\"SomeIntProperty\":42,\"SomeStringProperty\":\"some - string\",\"StringProp\":\"some string 1\"}\r\n--changeset_2e8293fd-fcc9-4729-761c-8513e70db34b\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://chrisstablesprim.table.core.windows.net/gotableg8scudpw7lv7b?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + 260\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Float@odata.type\":\"Edm.Double\",\"Integer\":1,\"Integer@odata.type\":\"Edm.Double\",\"PartitionKey\":\"partition\",\"RowKey\":\"1\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_4ea4363c-27b1-4850-6d7a-7b628efdde6c\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotable0qfinjf2fyabp?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 663\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"BoolProp\":true,\"IntProp\":2,\"PartitionKey\":\"partition\",\"RowKey\":\"2\",\"SomeBinaryProperty\":\"c29tZSBieXRlcw==\",\"SomeBinaryProperty@odata.type\":\"Edm.Binary\",\"SomeDateProperty\":\"2021-05-21T19:41:03.2032731Z\",\"SomeDateProperty@odata.type\":\"Edm.DateTime\",\"SomeDoubleProperty0\":1,\"SomeDoubleProperty0@odata.type\":\"Edm.Double\",\"SomeDoubleProperty1\":1.2345,\"SomeDoubleProperty1@odata.type\":\"Edm.Double\",\"SomeGuidProperty\":\"4a7ba0e9-458c-4f1c-5a5d-e7c330b95315\",\"SomeGuidProperty@odata.type\":\"Edm.Guid\",\"SomeInt64Property\":\"9223372036854775807\",\"SomeInt64Property@odata.type\":\"Edm.Int64\",\"SomeIntProperty\":42,\"SomeStringProperty\":\"some - string\",\"StringProp\":\"some string 2\"}\r\n--changeset_2e8293fd-fcc9-4729-761c-8513e70db34b\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://chrisstablesprim.table.core.windows.net/gotableg8scudpw7lv7b?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + 260\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Float@odata.type\":\"Edm.Double\",\"Integer\":2,\"Integer@odata.type\":\"Edm.Double\",\"PartitionKey\":\"partition\",\"RowKey\":\"2\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_4ea4363c-27b1-4850-6d7a-7b628efdde6c\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotable0qfinjf2fyabp?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 663\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"BoolProp\":true,\"IntProp\":3,\"PartitionKey\":\"partition\",\"RowKey\":\"3\",\"SomeBinaryProperty\":\"c29tZSBieXRlcw==\",\"SomeBinaryProperty@odata.type\":\"Edm.Binary\",\"SomeDateProperty\":\"2021-05-21T19:41:03.2032731Z\",\"SomeDateProperty@odata.type\":\"Edm.DateTime\",\"SomeDoubleProperty0\":1,\"SomeDoubleProperty0@odata.type\":\"Edm.Double\",\"SomeDoubleProperty1\":1.2345,\"SomeDoubleProperty1@odata.type\":\"Edm.Double\",\"SomeGuidProperty\":\"167df718-ab10-4028-4462-d89bd2eab843\",\"SomeGuidProperty@odata.type\":\"Edm.Guid\",\"SomeInt64Property\":\"9223372036854775807\",\"SomeInt64Property@odata.type\":\"Edm.Int64\",\"SomeIntProperty\":42,\"SomeStringProperty\":\"some - string\",\"StringProp\":\"some string 3\"}\r\n--changeset_2e8293fd-fcc9-4729-761c-8513e70db34b--\r\n\r\n--batch_2de7b066-5519-4c0f-4a33-ddc8370312e9--\r\n" + 260\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Float@odata.type\":\"Edm.Double\",\"Integer\":3,\"Integer@odata.type\":\"Edm.Double\",\"PartitionKey\":\"partition\",\"RowKey\":\"3\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_4ea4363c-27b1-4850-6d7a-7b628efdde6c--\r\n\r\n--batch_0345104c-14ba-4677-72e0-d9b843570103--\r\n" form: {} headers: Accept: @@ -71,50 +68,50 @@ interactions: Authorization: - sanitized Content-Length: - - "3550" + - "2329" Content-Type: - - multipart/mixed; boundary=batch_2de7b066-5519-4c0f-4a33-ddc8370312e9 + - multipart/mixed; boundary=batch_0345104c-14ba-4677-72e0-d9b843570103 Dataserviceversion: - "3.0" User-Agent: - - azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; Windows_NT) + - azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Fri, 21 May 2021 19:41:03 GMT + - Thu, 15 Jul 2021 21:49:46 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.core.windows.net/$batch + url: https://seankaneprim.table.core.windows.net/$batch method: POST response: - body: "--batchresponse_69af1b31-119b-4d4d-9bf8-35b4f6c0713c\r\nContent-Type: multipart/mixed; - boundary=changesetresponse_54cb4ac8-f287-4dc7-856c-b3c2dc2be705\r\n\r\n--changesetresponse_54cb4ac8-f287-4dc7-856c-b3c2dc2be705\r\nContent-Type: + body: "--batchresponse_2d08f501-0257-467f-a103-1f5351c660cc\r\nContent-Type: multipart/mixed; + boundary=changesetresponse_498b7a04-2a42-4d3e-9548-906958305072\r\n\r\n--changesetresponse_498b7a04-2a42-4d3e-9548-906958305072\r\nContent-Type: application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nPreference-Applied: - return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://chrisstablesprim.table.core.windows.net/gotableg8scudpw7lv7b(PartitionKey='partition',RowKey='1')\r\nDataServiceId: - https://chrisstablesprim.table.core.windows.net/gotableg8scudpw7lv7b(PartitionKey='partition',RowKey='1')\r\nETag: - W/\"datetime'2021-05-21T19%3A41%3A03.3758609Z'\"\r\n\r\n\r\n--changesetresponse_54cb4ac8-f287-4dc7-856c-b3c2dc2be705\r\nContent-Type: + return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://seankaneprim.table.core.windows.net/gotable0qfinjf2fyabp(PartitionKey='partition',RowKey='1')\r\nDataServiceId: + https://seankaneprim.table.core.windows.net/gotable0qfinjf2fyabp(PartitionKey='partition',RowKey='1')\r\nETag: + W/\"datetime'2021-07-15T21%3A49%3A45.7343092Z'\"\r\n\r\n\r\n--changesetresponse_498b7a04-2a42-4d3e-9548-906958305072\r\nContent-Type: application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nPreference-Applied: - return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://chrisstablesprim.table.core.windows.net/gotableg8scudpw7lv7b(PartitionKey='partition',RowKey='2')\r\nDataServiceId: - https://chrisstablesprim.table.core.windows.net/gotableg8scudpw7lv7b(PartitionKey='partition',RowKey='2')\r\nETag: - W/\"datetime'2021-05-21T19%3A41%3A03.3758609Z'\"\r\n\r\n\r\n--changesetresponse_54cb4ac8-f287-4dc7-856c-b3c2dc2be705\r\nContent-Type: + return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://seankaneprim.table.core.windows.net/gotable0qfinjf2fyabp(PartitionKey='partition',RowKey='2')\r\nDataServiceId: + https://seankaneprim.table.core.windows.net/gotable0qfinjf2fyabp(PartitionKey='partition',RowKey='2')\r\nETag: + W/\"datetime'2021-07-15T21%3A49%3A45.7343092Z'\"\r\n\r\n\r\n--changesetresponse_498b7a04-2a42-4d3e-9548-906958305072\r\nContent-Type: application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nPreference-Applied: - return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://chrisstablesprim.table.core.windows.net/gotableg8scudpw7lv7b(PartitionKey='partition',RowKey='3')\r\nDataServiceId: - https://chrisstablesprim.table.core.windows.net/gotableg8scudpw7lv7b(PartitionKey='partition',RowKey='3')\r\nETag: - W/\"datetime'2021-05-21T19%3A41%3A03.3758609Z'\"\r\n\r\n\r\n--changesetresponse_54cb4ac8-f287-4dc7-856c-b3c2dc2be705--\r\n--batchresponse_69af1b31-119b-4d4d-9bf8-35b4f6c0713c--\r\n" + return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://seankaneprim.table.core.windows.net/gotable0qfinjf2fyabp(PartitionKey='partition',RowKey='3')\r\nDataServiceId: + https://seankaneprim.table.core.windows.net/gotable0qfinjf2fyabp(PartitionKey='partition',RowKey='3')\r\nETag: + W/\"datetime'2021-07-15T21%3A49%3A45.7343092Z'\"\r\n\r\n\r\n--changesetresponse_498b7a04-2a42-4d3e-9548-906958305072--\r\n--batchresponse_2d08f501-0257-467f-a103-1f5351c660cc--\r\n" headers: Cache-Control: - no-cache Content-Type: - - multipart/mixed; boundary=batchresponse_69af1b31-119b-4d4d-9bf8-35b4f6c0713c + - multipart/mixed; boundary=batchresponse_2d08f501-0257-467f-a103-1f5351c660cc Date: - - Fri, 21 May 2021 19:41:03 GMT + - Thu, 15 Jul 2021 21:49:45 GMT Server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 X-Content-Type-Options: - nosniff X-Ms-Request-Id: - - 8e3dc8a8-5002-001c-5879-4e6674000000 + - cb6b9cf4-b002-001d-49c3-79e5c9000000 X-Ms-Version: - "2019-02-02" status: 202 Accepted @@ -131,59 +128,56 @@ interactions: Dataserviceversion: - "3.0" User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Fri, 21 May 2021 19:41:03 GMT + - Thu, 15 Jul 2021 21:49:46 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.core.windows.net/gotableg8scudpw7lv7b()?%24filter=RowKey+eq+%271%27 + url: https://seankaneprim.table.core.windows.net/gotable0qfinjf2fyabp()?%24filter=RowKey+eq+%271%27 method: GET response: - body: '{"odata.metadata":"https://chrisstablesprim.table.core.windows.net/$metadata#gotableg8scudpw7lv7b","value":[{"odata.etag":"W/\"datetime''2021-05-21T19%3A41%3A03.3758609Z''\"","PartitionKey":"partition","RowKey":"1","Timestamp":"2021-05-21T19:41:03.3758609Z","BoolProp":true,"IntProp":1,"SomeBinaryProperty@odata.type":"Edm.Binary","SomeBinaryProperty":"c29tZSBieXRlcw==","SomeDateProperty@odata.type":"Edm.DateTime","SomeDateProperty":"2021-05-21T19:41:03.2032731Z","SomeDoubleProperty0":1.0,"SomeDoubleProperty1":1.2345,"SomeGuidProperty@odata.type":"Edm.Guid","SomeGuidProperty":"27bdea07-48bb-49a1-7575-fa9c92b50ecc","SomeInt64Property@odata.type":"Edm.Int64","SomeInt64Property":"9223372036854775807","SomeIntProperty":42,"SomeStringProperty":"some - string","StringProp":"some string 1"}]}' + body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#gotable0qfinjf2fyabp","value":[{"odata.etag":"W/\"datetime''2021-07-15T21%3A49%3A45.7343092Z''\"","PartitionKey":"partition","RowKey":"1","Timestamp":"2021-07-15T21:49:45.7343092Z","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":1.0,"String":"someString"}]}' headers: Cache-Control: - no-cache Content-Type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 Date: - - Fri, 21 May 2021 19:41:03 GMT + - Thu, 15 Jul 2021 21:49:45 GMT Server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 X-Content-Type-Options: - nosniff X-Ms-Request-Id: - - 8e3dc8ba-5002-001c-6879-4e6674000000 + - cb6b9d33-b002-001d-05c3-79e5c9000000 X-Ms-Version: - "2019-02-02" status: 200 OK code: 200 duration: "" - request: - body: "--batch_9f2e9a16-b748-4c4a-7498-385179c10249\r\nContent-Type: multipart/mixed; - boundary=changeset_06606488-add1-4c38-456b-b53b0a02871d\r\n\r\n--changeset_06606488-add1-4c38-456b-b53b0a02871d\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPATCH https://chrisstablesprim.table.core.windows.net/gotableg8scudpw7lv7b(PartitionKey='partition',RowKey='1')?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + body: "--batch_c2323732-8cc7-4abe-5f2d-2403bdd9a312\r\nContent-Type: multipart/mixed; + boundary=changeset_ece51dde-cec3-4fd6-5cc6-fa3605f00007\r\n\r\n--changeset_ece51dde-cec3-4fd6-5cc6-fa3605f00007\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPATCH https://seankaneprim.table.core.windows.net/gotable0qfinjf2fyabp(PartitionKey='partition',RowKey='1')?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json\r\nContent-Length: 63\r\nContent-Type: - application/json\r\nDataserviceversion: 3.0\r\nIf-Match: W/\"datetime'2021-05-21T19%3A41%3A03.3758609Z'\"\r\nX-Ms-Version: - 2019-02-02\r\n\r\n{\"MergeProperty\":\"foo\",\"PartitionKey\":\"partition\",\"RowKey\":\"1\"}\r\n--changeset_06606488-add1-4c38-456b-b53b0a02871d\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nDELETE https://chrisstablesprim.table.core.windows.net/gotableg8scudpw7lv7b(PartitionKey='partition',RowKey='2')?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + application/json\r\nDataserviceversion: 3.0\r\nIf-Match: W/\"datetime'2021-07-15T21%3A49%3A45.7343092Z'\"\r\nX-Ms-Version: + 2019-02-02\r\n\r\n{\"MergeProperty\":\"foo\",\"PartitionKey\":\"partition\",\"RowKey\":\"1\"}\r\n--changeset_ece51dde-cec3-4fd6-5cc6-fa3605f00007\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nDELETE https://seankaneprim.table.core.windows.net/gotable0qfinjf2fyabp(PartitionKey='partition',RowKey='2')?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nDataserviceversion: - 3.0\r\nIf-Match: *\r\nX-Ms-Version: 2019-02-02\r\n\r\n\r\n--changeset_06606488-add1-4c38-456b-b53b0a02871d\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPUT https://chrisstablesprim.table.core.windows.net/gotableg8scudpw7lv7b(PartitionKey='partition',RowKey='3')?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + 3.0\r\nIf-Match: *\r\nX-Ms-Version: 2019-02-02\r\n\r\n\r\n--changeset_ece51dde-cec3-4fd6-5cc6-fa3605f00007\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPUT https://seankaneprim.table.core.windows.net/gotable0qfinjf2fyabp(PartitionKey='partition',RowKey='3')?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json\r\nContent-Length: 65\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nIf-Match: *\r\nX-Ms-Version: - 2019-02-02\r\n\r\n{\"PartitionKey\":\"partition\",\"ReplaceProperty\":\"foo\",\"RowKey\":\"3\"}\r\n--changeset_06606488-add1-4c38-456b-b53b0a02871d\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://chrisstablesprim.table.core.windows.net/gotableg8scudpw7lv7b?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + 2019-02-02\r\n\r\n{\"PartitionKey\":\"partition\",\"ReplaceProperty\":\"foo\",\"RowKey\":\"3\"}\r\n--changeset_ece51dde-cec3-4fd6-5cc6-fa3605f00007\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotable0qfinjf2fyabp?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 663\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"BoolProp\":true,\"IntProp\":4,\"PartitionKey\":\"partition\",\"RowKey\":\"4\",\"SomeBinaryProperty\":\"c29tZSBieXRlcw==\",\"SomeBinaryProperty@odata.type\":\"Edm.Binary\",\"SomeDateProperty\":\"2021-05-21T19:41:03.2032731Z\",\"SomeDateProperty@odata.type\":\"Edm.DateTime\",\"SomeDoubleProperty0\":1,\"SomeDoubleProperty0@odata.type\":\"Edm.Double\",\"SomeDoubleProperty1\":1.2345,\"SomeDoubleProperty1@odata.type\":\"Edm.Double\",\"SomeGuidProperty\":\"58c5605e-f11c-4b8c-5280-4a1bbea87efe\",\"SomeGuidProperty@odata.type\":\"Edm.Guid\",\"SomeInt64Property\":\"9223372036854775807\",\"SomeInt64Property@odata.type\":\"Edm.Int64\",\"SomeIntProperty\":42,\"SomeStringProperty\":\"some - string\",\"StringProp\":\"some string 4\"}\r\n--changeset_06606488-add1-4c38-456b-b53b0a02871d\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://chrisstablesprim.table.core.windows.net/gotableg8scudpw7lv7b?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + 260\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Float@odata.type\":\"Edm.Double\",\"Integer\":4,\"Integer@odata.type\":\"Edm.Double\",\"PartitionKey\":\"partition\",\"RowKey\":\"4\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_ece51dde-cec3-4fd6-5cc6-fa3605f00007\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotable0qfinjf2fyabp?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 663\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"BoolProp\":true,\"IntProp\":5,\"PartitionKey\":\"partition\",\"RowKey\":\"5\",\"SomeBinaryProperty\":\"c29tZSBieXRlcw==\",\"SomeBinaryProperty@odata.type\":\"Edm.Binary\",\"SomeDateProperty\":\"2021-05-21T19:41:03.2032731Z\",\"SomeDateProperty@odata.type\":\"Edm.DateTime\",\"SomeDoubleProperty0\":1,\"SomeDoubleProperty0@odata.type\":\"Edm.Double\",\"SomeDoubleProperty1\":1.2345,\"SomeDoubleProperty1@odata.type\":\"Edm.Double\",\"SomeGuidProperty\":\"1778baf7-61ae-4e82-7bf8-b5279e3ec598\",\"SomeGuidProperty@odata.type\":\"Edm.Guid\",\"SomeInt64Property\":\"9223372036854775807\",\"SomeInt64Property@odata.type\":\"Edm.Int64\",\"SomeIntProperty\":42,\"SomeStringProperty\":\"some - string\",\"StringProp\":\"some string 5\"}\r\n--changeset_06606488-add1-4c38-456b-b53b0a02871d--\r\n\r\n--batch_9f2e9a16-b748-4c4a-7498-385179c10249--\r\n" + 260\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Float@odata.type\":\"Edm.Double\",\"Integer\":5,\"Integer@odata.type\":\"Edm.Double\",\"PartitionKey\":\"partition\",\"RowKey\":\"5\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_ece51dde-cec3-4fd6-5cc6-fa3605f00007--\r\n\r\n--batch_c2323732-8cc7-4abe-5f2d-2403bdd9a312--\r\n" form: {} headers: Accept: @@ -191,54 +185,54 @@ interactions: Authorization: - sanitized Content-Length: - - "3914" + - "3088" Content-Type: - - multipart/mixed; boundary=batch_9f2e9a16-b748-4c4a-7498-385179c10249 + - multipart/mixed; boundary=batch_c2323732-8cc7-4abe-5f2d-2403bdd9a312 Dataserviceversion: - "3.0" User-Agent: - - azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; Windows_NT) + - azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Fri, 21 May 2021 19:41:03 GMT + - Thu, 15 Jul 2021 21:49:46 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.core.windows.net/$batch + url: https://seankaneprim.table.core.windows.net/$batch method: POST response: - body: "--batchresponse_159fb801-3c8d-46db-a03b-b292c7948339\r\nContent-Type: multipart/mixed; - boundary=changesetresponse_a0c7390f-4e2a-4953-bcdb-f3d6c4033244\r\n\r\n--changesetresponse_a0c7390f-4e2a-4953-bcdb-f3d6c4033244\r\nContent-Type: + body: "--batchresponse_4bccf709-e644-4437-a425-b3da36b90d1c\r\nContent-Type: multipart/mixed; + boundary=changesetresponse_91f58e54-0034-4c18-bf7c-21ffc80008ba\r\n\r\n--changesetresponse_91f58e54-0034-4c18-bf7c-21ffc80008ba\r\nContent-Type: application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nDataServiceVersion: - 1.0;\r\nETag: W/\"datetime'2021-05-21T19%3A41%3A03.5240944Z'\"\r\n\r\n\r\n--changesetresponse_a0c7390f-4e2a-4953-bcdb-f3d6c4033244\r\nContent-Type: + 1.0;\r\nETag: W/\"datetime'2021-07-15T21%3A49%3A45.9758551Z'\"\r\n\r\n\r\n--changesetresponse_91f58e54-0034-4c18-bf7c-21ffc80008ba\r\nContent-Type: application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nDataServiceVersion: - 1.0;\r\n\r\n\r\n--changesetresponse_a0c7390f-4e2a-4953-bcdb-f3d6c4033244\r\nContent-Type: + 1.0;\r\n\r\n\r\n--changesetresponse_91f58e54-0034-4c18-bf7c-21ffc80008ba\r\nContent-Type: application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nDataServiceVersion: - 1.0;\r\nETag: W/\"datetime'2021-05-21T19%3A41%3A03.5240944Z'\"\r\n\r\n\r\n--changesetresponse_a0c7390f-4e2a-4953-bcdb-f3d6c4033244\r\nContent-Type: + 1.0;\r\nETag: W/\"datetime'2021-07-15T21%3A49%3A45.976856Z'\"\r\n\r\n\r\n--changesetresponse_91f58e54-0034-4c18-bf7c-21ffc80008ba\r\nContent-Type: application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nPreference-Applied: - return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://chrisstablesprim.table.core.windows.net/gotableg8scudpw7lv7b(PartitionKey='partition',RowKey='4')\r\nDataServiceId: - https://chrisstablesprim.table.core.windows.net/gotableg8scudpw7lv7b(PartitionKey='partition',RowKey='4')\r\nETag: - W/\"datetime'2021-05-21T19%3A41%3A03.5239662Z'\"\r\n\r\n\r\n--changesetresponse_a0c7390f-4e2a-4953-bcdb-f3d6c4033244\r\nContent-Type: + return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://seankaneprim.table.core.windows.net/gotable0qfinjf2fyabp(PartitionKey='partition',RowKey='4')\r\nDataServiceId: + https://seankaneprim.table.core.windows.net/gotable0qfinjf2fyabp(PartitionKey='partition',RowKey='4')\r\nETag: + W/\"datetime'2021-07-15T21%3A49%3A45.9744781Z'\"\r\n\r\n\r\n--changesetresponse_91f58e54-0034-4c18-bf7c-21ffc80008ba\r\nContent-Type: application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nPreference-Applied: - return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://chrisstablesprim.table.core.windows.net/gotableg8scudpw7lv7b(PartitionKey='partition',RowKey='5')\r\nDataServiceId: - https://chrisstablesprim.table.core.windows.net/gotableg8scudpw7lv7b(PartitionKey='partition',RowKey='5')\r\nETag: - W/\"datetime'2021-05-21T19%3A41%3A03.5239662Z'\"\r\n\r\n\r\n--changesetresponse_a0c7390f-4e2a-4953-bcdb-f3d6c4033244--\r\n--batchresponse_159fb801-3c8d-46db-a03b-b292c7948339--\r\n" + return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://seankaneprim.table.core.windows.net/gotable0qfinjf2fyabp(PartitionKey='partition',RowKey='5')\r\nDataServiceId: + https://seankaneprim.table.core.windows.net/gotable0qfinjf2fyabp(PartitionKey='partition',RowKey='5')\r\nETag: + W/\"datetime'2021-07-15T21%3A49%3A45.9744781Z'\"\r\n\r\n\r\n--changesetresponse_91f58e54-0034-4c18-bf7c-21ffc80008ba--\r\n--batchresponse_4bccf709-e644-4437-a425-b3da36b90d1c--\r\n" headers: Cache-Control: - no-cache Content-Type: - - multipart/mixed; boundary=batchresponse_159fb801-3c8d-46db-a03b-b292c7948339 + - multipart/mixed; boundary=batchresponse_4bccf709-e644-4437-a425-b3da36b90d1c Date: - - Fri, 21 May 2021 19:41:03 GMT + - Thu, 15 Jul 2021 21:49:45 GMT Server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 X-Content-Type-Options: - nosniff X-Ms-Request-Id: - - 8e3dc8c6-5002-001c-7379-4e6674000000 + - cb6b9d89-b002-001d-4cc3-79e5c9000000 X-Ms-Version: - "2019-02-02" status: 202 Accepted @@ -255,30 +249,29 @@ interactions: Dataserviceversion: - "3.0" User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Fri, 21 May 2021 19:41:03 GMT + - Thu, 15 Jul 2021 21:49:47 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.core.windows.net/gotableg8scudpw7lv7b()?%24filter=RowKey+eq+%271%27 + url: https://seankaneprim.table.core.windows.net/gotable0qfinjf2fyabp()?%24filter=RowKey+eq+%271%27 method: GET response: - body: '{"odata.metadata":"https://chrisstablesprim.table.core.windows.net/$metadata#gotableg8scudpw7lv7b","value":[{"odata.etag":"W/\"datetime''2021-05-21T19%3A41%3A03.5240944Z''\"","PartitionKey":"partition","RowKey":"1","Timestamp":"2021-05-21T19:41:03.5240944Z","BoolProp":true,"IntProp":1,"MergeProperty":"foo","SomeBinaryProperty@odata.type":"Edm.Binary","SomeBinaryProperty":"c29tZSBieXRlcw==","SomeDateProperty@odata.type":"Edm.DateTime","SomeDateProperty":"2021-05-21T19:41:03.2032731Z","SomeDoubleProperty0":1.0,"SomeDoubleProperty1":1.2345,"SomeGuidProperty@odata.type":"Edm.Guid","SomeGuidProperty":"27bdea07-48bb-49a1-7575-fa9c92b50ecc","SomeInt64Property@odata.type":"Edm.Int64","SomeInt64Property":"9223372036854775807","SomeIntProperty":42,"SomeStringProperty":"some - string","StringProp":"some string 1"}]}' + body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#gotable0qfinjf2fyabp","value":[{"odata.etag":"W/\"datetime''2021-07-15T21%3A49%3A45.9758551Z''\"","PartitionKey":"partition","RowKey":"1","Timestamp":"2021-07-15T21:49:45.9758551Z","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":1.0,"MergeProperty":"foo","String":"someString"}]}' headers: Cache-Control: - no-cache Content-Type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 Date: - - Fri, 21 May 2021 19:41:03 GMT + - Thu, 15 Jul 2021 21:49:45 GMT Server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 X-Content-Type-Options: - nosniff X-Ms-Request-Id: - - 8e3dc8da-5002-001c-0579-4e6674000000 + - cb6b9df0-b002-001d-2ac3-79e5c9000000 X-Ms-Version: - "2019-02-02" status: 200 OK @@ -293,13 +286,13 @@ interactions: Authorization: - sanitized User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Fri, 21 May 2021 19:41:03 GMT + - Thu, 15 Jul 2021 21:49:47 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.core.windows.net/Tables('gotableg8scudpw7lv7b') + url: https://seankaneprim.table.core.windows.net/Tables('gotable0qfinjf2fyabp') method: DELETE response: body: "" @@ -309,13 +302,13 @@ interactions: Content-Length: - "0" Date: - - Fri, 21 May 2021 19:41:03 GMT + - Thu, 15 Jul 2021 21:49:45 GMT Server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 X-Content-Type-Options: - nosniff X-Ms-Request-Id: - - 8e3dc8e3-5002-001c-0d79-4e6674000000 + - cb6b9e31-b002-001d-68c3-79e5c9000000 X-Ms-Version: - "2019-02-02" status: 204 No Content diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestCustomEntity-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestCustomEntity-variables.yaml new file mode 100644 index 000000000000..13cee040bfbe --- /dev/null +++ b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestCustomEntity-variables.yaml @@ -0,0 +1,5 @@ +--- +STORAGE_ENDPOINT_SUFFIX: core.windows.net +TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== +TABLES_STORAGE_ACCOUNT_NAME: seankaneprim +randomSeed: "1625159396" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestCustomEntity.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestCustomEntity.yaml new file mode 100644 index 000000000000..c91a2df7c845 --- /dev/null +++ b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestCustomEntity.yaml @@ -0,0 +1,125 @@ +--- +version: 1 +interactions: +- request: + body: '{"TableName":"gotableaif30nqn97uy2"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "36" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Thu, 01 Jul 2021 17:09:56 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/Tables + method: POST + response: + body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotableaif30nqn97uy2"}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + Date: + - Thu, 01 Jul 2021 17:09:56 GMT + Location: + - https://seankaneprim.table.core.windows.net/Tables('gotableaif30nqn97uy2') + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - 8fa8ab11-a002-003e-789b-6e7f0a000000 + X-Ms-Version: + - "2019-02-02" + status: 201 Created + code: 201 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Thu, 01 Jul 2021 17:09:56 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/gotableaif30nqn97uy2(PartitionKey='pk001',RowKey='rk001') + method: GET + response: + body: '{"odata.error":{"code":"ResourceNotFound","message":{"lang":"en-US","value":"The + specified resource does not exist.\nRequestId:8fa8ab41-a002-003e-249b-6e7f0a000000\nTime:2021-07-01T17:09:57.9505922Z"}}}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + Date: + - Thu, 01 Jul 2021 17:09:56 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - 8fa8ab41-a002-003e-249b-6e7f0a000000 + X-Ms-Version: + - "2019-02-02" + status: 404 Not Found + code: 404 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Thu, 01 Jul 2021 17:09:56 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/Tables('gotableaif30nqn97uy2') + method: DELETE + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Date: + - Thu, 01 Jul 2021 17:09:57 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - 8fa8ab6f-a002-003e-4e9b-6e7f0a000000 + X-Ms-Version: + - "2019-02-02" + status: 204 No Content + code: 204 + duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestDeleteEntity-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestDeleteEntity-variables.yaml index ab689c50cddf..b5659ad2a20c 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestDeleteEntity-variables.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestDeleteEntity-variables.yaml @@ -1,5 +1,5 @@ --- STORAGE_ENDPOINT_SUFFIX: core.windows.net TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== -TABLES_STORAGE_ACCOUNT_NAME: chrisstablesprim -randomSeed: "1621624377" +TABLES_STORAGE_ACCOUNT_NAME: seankaneprim +randomSeed: "1626385766" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestDeleteEntity.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestDeleteEntity.yaml index 4bc5d74b1533..b755c674cc31 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestDeleteEntity.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestDeleteEntity.yaml @@ -2,7 +2,7 @@ version: 1 interactions: - request: - body: '{"TableName":"gotable1eyzuuvhvub30"}' + body: '{"TableName":"gotablevevyc3u4ogcyx"}' form: {} headers: Accept: @@ -16,39 +16,39 @@ interactions: Dataserviceversion: - "3.0" User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Fri, 21 May 2021 19:12:57 GMT + - Thu, 15 Jul 2021 21:49:26 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.core.windows.net/Tables + url: https://seankaneprim.table.core.windows.net/Tables method: POST response: - body: '{"odata.metadata":"https://chrisstablesprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotable1eyzuuvhvub30"}' + body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotablevevyc3u4ogcyx"}' headers: Cache-Control: - no-cache Content-Type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 Date: - - Fri, 21 May 2021 19:12:57 GMT + - Thu, 15 Jul 2021 21:49:25 GMT Location: - - https://chrisstablesprim.table.core.windows.net/Tables('gotable1eyzuuvhvub30') + - https://seankaneprim.table.core.windows.net/Tables('gotablevevyc3u4ogcyx') Server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 X-Content-Type-Options: - nosniff X-Ms-Request-Id: - - d8f0ab3d-2002-0006-0275-4e07ab000000 + - c4984373-9002-00a3-42c3-798db0000000 X-Ms-Version: - "2019-02-02" status: 201 Created code: 201 duration: "" - request: - body: '{"BoolProp":true,"IntProp":1,"PartitionKey":"partition","RowKey":"1","StringProp":"some - string 1"}' + body: '{"Bool":true,"Integer":1,"PartitionKey":"partition","RowKey":"1","String":"some + string 1","Timestamp":"0001-01-01T00:00:00Z"}' form: {} headers: Accept: @@ -56,7 +56,7 @@ interactions: Authorization: - sanitized Content-Length: - - "98" + - "125" Content-Type: - application/json Dataserviceversion: @@ -64,13 +64,13 @@ interactions: Prefer: - return-no-content User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Fri, 21 May 2021 19:12:57 GMT + - Thu, 15 Jul 2021 21:49:27 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.core.windows.net/gotable1eyzuuvhvub30 + url: https://seankaneprim.table.core.windows.net/gotablevevyc3u4ogcyx method: POST response: body: "" @@ -80,13 +80,13 @@ interactions: Content-Length: - "0" Dataserviceid: - - https://chrisstablesprim.table.core.windows.net/gotable1eyzuuvhvub30(PartitionKey='partition',RowKey='1') + - https://seankaneprim.table.core.windows.net/gotablevevyc3u4ogcyx(PartitionKey='partition',RowKey='1') Date: - - Fri, 21 May 2021 19:12:57 GMT + - Thu, 15 Jul 2021 21:49:25 GMT Etag: - - W/"datetime'2021-05-21T19%3A12%3A58.1142822Z'" + - W/"datetime'2021-07-15T21%3A49%3A26.4583762Z'" Location: - - https://chrisstablesprim.table.core.windows.net/gotable1eyzuuvhvub30(PartitionKey='partition',RowKey='1') + - https://seankaneprim.table.core.windows.net/gotablevevyc3u4ogcyx(PartitionKey='partition',RowKey='1') Preference-Applied: - return-no-content Server: @@ -94,7 +94,7 @@ interactions: X-Content-Type-Options: - nosniff X-Ms-Request-Id: - - d8f0ab55-2002-0006-1575-4e07ab000000 + - c49843a2-9002-00a3-6cc3-798db0000000 X-Ms-Version: - "2019-02-02" status: 204 No Content @@ -113,13 +113,13 @@ interactions: If-Match: - '*' User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Fri, 21 May 2021 19:12:58 GMT + - Thu, 15 Jul 2021 21:49:27 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.core.windows.net/gotable1eyzuuvhvub30(PartitionKey='partition',RowKey='1') + url: https://seankaneprim.table.core.windows.net/gotablevevyc3u4ogcyx(PartitionKey='partition',RowKey='1') method: DELETE response: body: "" @@ -129,13 +129,13 @@ interactions: Content-Length: - "0" Date: - - Fri, 21 May 2021 19:12:58 GMT + - Thu, 15 Jul 2021 21:49:25 GMT Server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 X-Content-Type-Options: - nosniff X-Ms-Request-Id: - - d8f0ab6c-2002-0006-2975-4e07ab000000 + - c49843e6-9002-00a3-2ec3-798db0000000 X-Ms-Version: - "2019-02-02" status: 204 No Content @@ -150,13 +150,13 @@ interactions: Authorization: - sanitized User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Fri, 21 May 2021 19:12:58 GMT + - Thu, 15 Jul 2021 21:49:27 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.core.windows.net/Tables('gotable1eyzuuvhvub30') + url: https://seankaneprim.table.core.windows.net/Tables('gotablevevyc3u4ogcyx') method: DELETE response: body: "" @@ -166,13 +166,13 @@ interactions: Content-Length: - "0" Date: - - Fri, 21 May 2021 19:12:58 GMT + - Thu, 15 Jul 2021 21:49:25 GMT Server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 X-Content-Type-Options: - nosniff X-Ms-Request-Id: - - d8f0ab7c-2002-0006-3975-4e07ab000000 + - c4984417-9002-00a3-5ec3-798db0000000 X-Ms-Version: - "2019-02-02" status: 204 No Content diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestEdmMarshalling-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestEdmMarshalling-variables.yaml new file mode 100644 index 000000000000..8ca29579fe46 --- /dev/null +++ b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestEdmMarshalling-variables.yaml @@ -0,0 +1,5 @@ +--- +STORAGE_ENDPOINT_SUFFIX: core.windows.net +TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== +TABLES_STORAGE_ACCOUNT_NAME: seankaneprim +randomSeed: "1626705439" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestEdmMarshalling.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestEdmMarshalling.yaml new file mode 100644 index 000000000000..c1d98be2c985 --- /dev/null +++ b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestEdmMarshalling.yaml @@ -0,0 +1,179 @@ +--- +version: 1 +interactions: +- request: + body: '{"TableName":"gotablecnakxw3sl0jdk"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "36" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Mon, 19 Jul 2021 14:37:19 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/Tables + method: POST + response: + body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotablecnakxw3sl0jdk"}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + Date: + - Mon, 19 Jul 2021 14:37:11 GMT + Location: + - https://seankaneprim.table.core.windows.net/Tables('gotablecnakxw3sl0jdk') + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - 2ed0682b-c002-0075-17ab-7c8359000000 + X-Ms-Version: + - "2019-02-02" + status: 201 Created + code: 201 + duration: "" +- request: + body: '{"Binary":"U29tZUJpbmFyeQ==","Binary@odata.type":"Edm.Binary","Bool":false,"DateTime":"2013-08-02T17:37:43.0090043Z","DateTime@odata.type":"Edm.DateTime","Double":1234.1234,"Guid":"4185404a-5818-48c3-b9be-f217df0dba6f","Guid@odata.type":"Edm.Guid","Int32":1234,"Int64":"123456789012","Int64@odata.type":"Edm.Int64","PartitionKey":"partition","RowKey":"1","String":"test"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "371" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + Prefer: + - return-no-content + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Mon, 19 Jul 2021 14:37:19 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/gotablecnakxw3sl0jdk + method: POST + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Dataserviceid: + - https://seankaneprim.table.core.windows.net/gotablecnakxw3sl0jdk(PartitionKey='partition',RowKey='1') + Date: + - Mon, 19 Jul 2021 14:37:11 GMT + Etag: + - W/"datetime'2021-07-19T14%3A37%3A12.6489662Z'" + Location: + - https://seankaneprim.table.core.windows.net/gotablecnakxw3sl0jdk(PartitionKey='partition',RowKey='1') + Preference-Applied: + - return-no-content + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - 2ed06863-c002-0075-4dab-7c8359000000 + X-Ms-Version: + - "2019-02-02" + status: 204 No Content + code: 204 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Mon, 19 Jul 2021 14:37:19 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/gotablecnakxw3sl0jdk(PartitionKey='partition',RowKey='1')?%24format=application%2Fjson%3Bodata%3Dfullmetadata + method: GET + response: + body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#gotablecnakxw3sl0jdk/@Element","odata.type":"seankaneprim.gotablecnakxw3sl0jdk","odata.id":"https://seankaneprim.table.core.windows.net/gotablecnakxw3sl0jdk(PartitionKey=''partition'',RowKey=''1'')","odata.etag":"W/\"datetime''2021-07-19T14%3A37%3A12.6489662Z''\"","odata.editLink":"gotablecnakxw3sl0jdk(PartitionKey=''partition'',RowKey=''1'')","PartitionKey":"partition","RowKey":"1","Timestamp@odata.type":"Edm.DateTime","Timestamp":"2021-07-19T14:37:12.6489662Z","Binary@odata.type":"Edm.Binary","Binary":"U29tZUJpbmFyeQ==","Bool":false,"DateTime@odata.type":"Edm.DateTime","DateTime":"2013-08-02T17:37:43.0090043Z","Double":1234.1234,"Guid@odata.type":"Edm.Guid","Guid":"4185404a-5818-48c3-b9be-f217df0dba6f","Int32":1234,"Int64@odata.type":"Edm.Int64","Int64":"123456789012","String":"test"}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json;odata=fullmetadata;streaming=true;charset=utf-8 + Date: + - Mon, 19 Jul 2021 14:37:11 GMT + Etag: + - W/"datetime'2021-07-19T14%3A37%3A12.6489662Z'" + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - 2ed068cd-c002-0075-33ab-7c8359000000 + X-Ms-Version: + - "2019-02-02" + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Mon, 19 Jul 2021 14:37:19 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/Tables('gotablecnakxw3sl0jdk') + method: DELETE + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Date: + - Mon, 19 Jul 2021 14:37:12 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - 2ed0690d-c002-0075-6fab-7c8359000000 + X-Ms-Version: + - "2019-02-02" + status: 204 No Content + code: 204 + duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestGetAccessPolicy-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestGetAccessPolicy-variables.yaml new file mode 100644 index 000000000000..257db4d9b46a --- /dev/null +++ b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestGetAccessPolicy-variables.yaml @@ -0,0 +1,5 @@ +--- +STORAGE_ENDPOINT_SUFFIX: core.windows.net +TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== +TABLES_STORAGE_ACCOUNT_NAME: seankaneprim +randomSeed: "1625177697" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestGetAccessPolicy.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestGetAccessPolicy.yaml new file mode 100644 index 000000000000..ba2fcbbf84ce --- /dev/null +++ b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestGetAccessPolicy.yaml @@ -0,0 +1,118 @@ +--- +version: 1 +interactions: +- request: + body: '{"TableName":"gotableu56pkvz86todh"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "36" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Thu, 01 Jul 2021 22:14:57 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/Tables + method: POST + response: + body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotableu56pkvz86todh"}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + Date: + - Thu, 01 Jul 2021 22:14:58 GMT + Location: + - https://seankaneprim.table.core.windows.net/Tables('gotableu56pkvz86todh') + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - ea702b44-f002-0041-75c6-6eb091000000 + X-Ms-Version: + - "2019-02-02" + status: 201 Created + code: 201 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/xml + Authorization: + - sanitized + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Thu, 01 Jul 2021 22:14:57 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/gotableu56pkvz86todh?comp=acl + method: GET + response: + body: "\uFEFF\x3C\x3F\x78\x6D\x6C\x20\x76\x65\x72\x73\x69\x6F\x6E\x3D\"\x31\x2E\x30\"\x20\x65\x6E\x63\x6F\x64\x69\x6E\x67\x3D\"\x75\x74\x66\x2D\x38\"\x3F\x3E\x3C\x53\x69\x67\x6E\x65\x64\x49\x64\x65\x6E\x74\x69\x66\x69\x65\x72\x73\x20\x2F\x3E" + headers: + Content-Type: + - application/xml + Date: + - Thu, 01 Jul 2021 22:14:58 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - ea702b6e-f002-0041-17c6-6eb091000000 + X-Ms-Version: + - "2019-02-02" + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Thu, 01 Jul 2021 22:14:57 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/Tables('gotableu56pkvz86todh') + method: DELETE + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Date: + - Thu, 01 Jul 2021 22:14:58 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - ea702b94-f002-0041-3dc6-6eb091000000 + X-Ms-Version: + - "2019-02-02" + status: 204 No Content + code: 204 + duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestMergeEntity-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestMergeEntity-variables.yaml index e53058d11dbe..0305223b8086 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestMergeEntity-variables.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestMergeEntity-variables.yaml @@ -1,5 +1,5 @@ --- STORAGE_ENDPOINT_SUFFIX: core.windows.net TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== -TABLES_STORAGE_ACCOUNT_NAME: chrisstablesprim -randomSeed: "1621628754" +TABLES_STORAGE_ACCOUNT_NAME: seankaneprim +randomSeed: "1626385706" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestMergeEntity.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestMergeEntity.yaml index 8f3bc72088cb..1eac2bf01976 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestMergeEntity.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestMergeEntity.yaml @@ -2,7 +2,7 @@ version: 1 interactions: - request: - body: '{"TableName":"gotable29xnpgoal4avd"}' + body: '{"TableName":"gotable2blgm80ksz795"}' form: {} headers: Accept: @@ -16,39 +16,39 @@ interactions: Dataserviceversion: - "3.0" User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Fri, 21 May 2021 20:25:54 GMT + - Thu, 15 Jul 2021 21:48:26 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.core.windows.net/Tables + url: https://seankaneprim.table.core.windows.net/Tables method: POST response: - body: '{"odata.metadata":"https://chrisstablesprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotable29xnpgoal4avd"}' + body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotable2blgm80ksz795"}' headers: Cache-Control: - no-cache Content-Type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 Date: - - Fri, 21 May 2021 20:25:55 GMT + - Thu, 15 Jul 2021 21:48:25 GMT Location: - - https://chrisstablesprim.table.core.windows.net/Tables('gotable29xnpgoal4avd') + - https://seankaneprim.table.core.windows.net/Tables('gotable2blgm80ksz795') Server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 X-Content-Type-Options: - nosniff X-Ms-Request-Id: - - 9335a71f-b002-002b-2d7f-4eb4d8000000 + - 4eedf402-2002-001f-53c3-795b71000000 X-Ms-Version: - "2019-02-02" status: 201 Created code: 201 duration: "" - request: - body: '{"BoolProp":true,"IntProp":1,"PartitionKey":"partition","RowKey":"1","StringProp":"some - string 1"}' + body: '{"Bool":true,"Integer":1,"PartitionKey":"partition","RowKey":"1","String":"some + string 1","Timestamp":"0001-01-01T00:00:00Z"}' form: {} headers: Accept: @@ -56,7 +56,7 @@ interactions: Authorization: - sanitized Content-Length: - - "98" + - "125" Content-Type: - application/json Dataserviceversion: @@ -64,13 +64,13 @@ interactions: Prefer: - return-no-content User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Fri, 21 May 2021 20:25:55 GMT + - Thu, 15 Jul 2021 21:48:27 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.core.windows.net/gotable29xnpgoal4avd + url: https://seankaneprim.table.core.windows.net/gotable2blgm80ksz795 method: POST response: body: "" @@ -80,13 +80,13 @@ interactions: Content-Length: - "0" Dataserviceid: - - https://chrisstablesprim.table.core.windows.net/gotable29xnpgoal4avd(PartitionKey='partition',RowKey='1') + - https://seankaneprim.table.core.windows.net/gotable2blgm80ksz795(PartitionKey='partition',RowKey='1') Date: - - Fri, 21 May 2021 20:25:55 GMT + - Thu, 15 Jul 2021 21:48:25 GMT Etag: - - W/"datetime'2021-05-21T20%3A25%3A56.1541897Z'" + - W/"datetime'2021-07-15T21%3A48%3A26.5515699Z'" Location: - - https://chrisstablesprim.table.core.windows.net/gotable29xnpgoal4avd(PartitionKey='partition',RowKey='1') + - https://seankaneprim.table.core.windows.net/gotable2blgm80ksz795(PartitionKey='partition',RowKey='1') Preference-Applied: - return-no-content Server: @@ -94,7 +94,7 @@ interactions: X-Content-Type-Options: - nosniff X-Ms-Request-Id: - - 9335a734-b002-002b-3b7f-4eb4d8000000 + - 4eedf422-2002-001f-6dc3-795b71000000 X-Ms-Version: - "2019-02-02" status: 204 No Content @@ -111,37 +111,40 @@ interactions: Dataserviceversion: - "3.0" User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Fri, 21 May 2021 20:25:56 GMT + - Thu, 15 Jul 2021 21:48:27 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.core.windows.net/gotable29xnpgoal4avd()?%24filter=RowKey+eq+%271%27 + url: https://seankaneprim.table.core.windows.net/gotable2blgm80ksz795(PartitionKey='partition',RowKey='1') method: GET response: - body: '{"odata.metadata":"https://chrisstablesprim.table.core.windows.net/$metadata#gotable29xnpgoal4avd","value":[{"odata.etag":"W/\"datetime''2021-05-21T20%3A25%3A56.1541897Z''\"","PartitionKey":"partition","RowKey":"1","Timestamp":"2021-05-21T20:25:56.1541897Z","BoolProp":true,"IntProp":1,"StringProp":"some - string 1"}]}' + body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#gotable2blgm80ksz795/@Element","odata.etag":"W/\"datetime''2021-07-15T21%3A48%3A26.5515699Z''\"","PartitionKey":"partition","RowKey":"1","Timestamp":"2021-07-15T21:48:26.5515699Z","Bool":true,"Integer":1,"String":"some + string 1"}' headers: Cache-Control: - no-cache Content-Type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 Date: - - Fri, 21 May 2021 20:25:56 GMT + - Thu, 15 Jul 2021 21:48:25 GMT + Etag: + - W/"datetime'2021-07-15T21%3A48%3A26.5515699Z'" Server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 X-Content-Type-Options: - nosniff X-Ms-Request-Id: - - 9335a73c-b002-002b-437f-4eb4d8000000 + - 4eedf439-2002-001f-02c3-795b71000000 X-Ms-Version: - "2019-02-02" status: 200 OK code: 200 duration: "" - request: - body: '{"MergeProperty":"foo","PartitionKey":"partition","RowKey":"1"}' + body: '{"Bool":true,"Integer":1,"MergeProperty":"foo","PartitionKey":"partition","RowKey":"1","String":"some + string 1","Timestamp":"0001-01-01T00:00:00Z"}' form: {} headers: Accept: @@ -149,7 +152,7 @@ interactions: Authorization: - sanitized Content-Length: - - "63" + - "147" Content-Type: - application/json Dataserviceversion: @@ -157,13 +160,13 @@ interactions: If-Match: - '*' User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Fri, 21 May 2021 20:25:56 GMT + - Thu, 15 Jul 2021 21:48:27 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.core.windows.net/gotable29xnpgoal4avd(PartitionKey='partition',RowKey='1') + url: https://seankaneprim.table.core.windows.net/gotable2blgm80ksz795(PartitionKey='partition',RowKey='1') method: PATCH response: body: "" @@ -173,15 +176,15 @@ interactions: Content-Length: - "0" Date: - - Fri, 21 May 2021 20:25:56 GMT + - Thu, 15 Jul 2021 21:48:25 GMT Etag: - - W/"datetime'2021-05-21T20%3A25%3A56.3029412Z'" + - W/"datetime'2021-07-15T21%3A48%3A26.7711098Z'" Server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 X-Content-Type-Options: - nosniff X-Ms-Request-Id: - - 9335a74a-b002-002b-4f7f-4eb4d8000000 + - 4eedf459-2002-001f-20c3-795b71000000 X-Ms-Version: - "2019-02-02" status: 204 No Content @@ -198,16 +201,16 @@ interactions: Dataserviceversion: - "3.0" User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Fri, 21 May 2021 20:25:56 GMT + - Thu, 15 Jul 2021 21:48:27 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.core.windows.net/gotable29xnpgoal4avd()?%24filter=RowKey+eq+%271%27 + url: https://seankaneprim.table.core.windows.net/gotable2blgm80ksz795()?%24filter=RowKey+eq+%271%27 method: GET response: - body: '{"odata.metadata":"https://chrisstablesprim.table.core.windows.net/$metadata#gotable29xnpgoal4avd","value":[{"odata.etag":"W/\"datetime''2021-05-21T20%3A25%3A56.3029412Z''\"","PartitionKey":"partition","RowKey":"1","Timestamp":"2021-05-21T20:25:56.3029412Z","BoolProp":true,"IntProp":1,"MergeProperty":"foo","StringProp":"some + body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#gotable2blgm80ksz795","value":[{"odata.etag":"W/\"datetime''2021-07-15T21%3A48%3A26.7711098Z''\"","PartitionKey":"partition","RowKey":"1","Timestamp":"2021-07-15T21:48:26.7711098Z","Bool":true,"Integer":1,"MergeProperty":"foo","String":"some string 1"}]}' headers: Cache-Control: @@ -215,13 +218,13 @@ interactions: Content-Type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 Date: - - Fri, 21 May 2021 20:25:56 GMT + - Thu, 15 Jul 2021 21:48:25 GMT Server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 X-Content-Type-Options: - nosniff X-Ms-Request-Id: - - 9335a753-b002-002b-587f-4eb4d8000000 + - 4eedf48f-2002-001f-54c3-795b71000000 X-Ms-Version: - "2019-02-02" status: 200 OK @@ -236,13 +239,13 @@ interactions: Authorization: - sanitized User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Fri, 21 May 2021 20:25:56 GMT + - Thu, 15 Jul 2021 21:48:28 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.core.windows.net/Tables('gotable29xnpgoal4avd') + url: https://seankaneprim.table.core.windows.net/Tables('gotable2blgm80ksz795') method: DELETE response: body: "" @@ -252,13 +255,13 @@ interactions: Content-Length: - "0" Date: - - Fri, 21 May 2021 20:25:56 GMT + - Thu, 15 Jul 2021 21:48:26 GMT Server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 X-Content-Type-Options: - nosniff X-Ms-Request-Id: - - 9335a758-b002-002b-5d7f-4eb4d8000000 + - 4eedf4ab-2002-001f-6cc3-795b71000000 X-Ms-Version: - "2019-02-02" status: 204 No Content diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestQueryComplexEntity-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestQueryComplexEntity-variables.yaml index 3716fc99c1ac..16c814672b81 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestQueryComplexEntity-variables.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestQueryComplexEntity-variables.yaml @@ -1,6 +1,5 @@ --- STORAGE_ENDPOINT_SUFFIX: core.windows.net TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== -TABLES_STORAGE_ACCOUNT_NAME: chrisstablesprim -now: "2021-05-19T11:25:34.8176907-05:00" -randomSeed: "1621441533" +TABLES_STORAGE_ACCOUNT_NAME: seankaneprim +randomSeed: "1626385681" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestQueryComplexEntity.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestQueryComplexEntity.yaml index a4520174812d..928812457fb8 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestQueryComplexEntity.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestQueryComplexEntity.yaml @@ -2,7 +2,7 @@ version: 1 interactions: - request: - body: '{"TableName":"gotablejb1ox80o3u07d"}' + body: '{"TableName":"gotablejzpyj5z4607mt"}' form: {} headers: Accept: @@ -16,39 +16,38 @@ interactions: Dataserviceversion: - "3.0" User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Wed, 19 May 2021 16:25:33 GMT + - Thu, 15 Jul 2021 21:48:01 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.core.windows.net/Tables + url: https://seankaneprim.table.core.windows.net/Tables method: POST response: - body: '{"odata.metadata":"https://chrisstablesprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotablejb1ox80o3u07d"}' + body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotablejzpyj5z4607mt"}' headers: Cache-Control: - no-cache Content-Type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 Date: - - Wed, 19 May 2021 16:25:34 GMT + - Thu, 15 Jul 2021 21:48:00 GMT Location: - - https://chrisstablesprim.table.core.windows.net/Tables('gotablejb1ox80o3u07d') + - https://seankaneprim.table.core.windows.net/Tables('gotablejzpyj5z4607mt') Server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 X-Content-Type-Options: - nosniff X-Ms-Request-Id: - - fc7aa098-d002-0012-61cb-4c4fc4000000 + - 48af401d-8002-0090-1bc3-79d21b000000 X-Ms-Version: - "2019-02-02" status: 201 Created code: 201 duration: "" - request: - body: '{"BoolProp":true,"IntProp":1,"PartitionKey":"partition","RowKey":"1","SomeBinaryProperty":"c29tZSBieXRlcw==","SomeBinaryProperty@odata.type":"Edm.Binary","SomeDateProperty":"2021-05-19T16:25:34.8176907Z","SomeDateProperty@odata.type":"Edm.DateTime","SomeDoubleProperty0":1,"SomeDoubleProperty0@odata.type":"Edm.Double","SomeDoubleProperty1":1.2345,"SomeDoubleProperty1@odata.type":"Edm.Double","SomeGuidProperty":"db1ac97d-fb93-4b44-7d4b-d4f954a074cd","SomeGuidProperty@odata.type":"Edm.Guid","SomeInt64Property":"9223372036854775807","SomeInt64Property@odata.type":"Edm.Int64","SomeIntProperty":42,"SomeStringProperty":"some - string","StringProp":"some string 1"}' + body: '{"Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":1,"PartitionKey":"partition","RowKey":"1","String":"someString","Timestamp":"0001-01-01T00:00:00Z"}' form: {} headers: Accept: @@ -56,7 +55,7 @@ interactions: Authorization: - sanitized Content-Length: - - "663" + - "194" Content-Type: - application/json Dataserviceversion: @@ -64,13 +63,13 @@ interactions: Prefer: - return-no-content User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Wed, 19 May 2021 16:25:34 GMT + - Thu, 15 Jul 2021 21:48:01 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.core.windows.net/gotablejb1ox80o3u07d + url: https://seankaneprim.table.core.windows.net/gotablejzpyj5z4607mt method: POST response: body: "" @@ -80,13 +79,13 @@ interactions: Content-Length: - "0" Dataserviceid: - - https://chrisstablesprim.table.core.windows.net/gotablejb1ox80o3u07d(PartitionKey='partition',RowKey='1') + - https://seankaneprim.table.core.windows.net/gotablejzpyj5z4607mt(PartitionKey='partition',RowKey='1') Date: - - Wed, 19 May 2021 16:25:34 GMT + - Thu, 15 Jul 2021 21:48:00 GMT Etag: - - W/"datetime'2021-05-19T16%3A25%3A35.0582247Z'" + - W/"datetime'2021-07-15T21%3A48%3A00.9167262Z'" Location: - - https://chrisstablesprim.table.core.windows.net/gotablejb1ox80o3u07d(PartitionKey='partition',RowKey='1') + - https://seankaneprim.table.core.windows.net/gotablejzpyj5z4607mt(PartitionKey='partition',RowKey='1') Preference-Applied: - return-no-content Server: @@ -94,15 +93,14 @@ interactions: X-Content-Type-Options: - nosniff X-Ms-Request-Id: - - fc7aa0a7-d002-0012-68cb-4c4fc4000000 + - 48af4040-8002-0090-3bc3-79d21b000000 X-Ms-Version: - "2019-02-02" status: 204 No Content code: 204 duration: "" - request: - body: '{"BoolProp":true,"IntProp":2,"PartitionKey":"partition","RowKey":"2","SomeBinaryProperty":"c29tZSBieXRlcw==","SomeBinaryProperty@odata.type":"Edm.Binary","SomeDateProperty":"2021-05-19T16:25:34.8176907Z","SomeDateProperty@odata.type":"Edm.DateTime","SomeDoubleProperty0":1,"SomeDoubleProperty0@odata.type":"Edm.Double","SomeDoubleProperty1":1.2345,"SomeDoubleProperty1@odata.type":"Edm.Double","SomeGuidProperty":"fb4d0c37-ce1d-4be9-7caf-b33d2c76c8d2","SomeGuidProperty@odata.type":"Edm.Guid","SomeInt64Property":"9223372036854775807","SomeInt64Property@odata.type":"Edm.Int64","SomeIntProperty":42,"SomeStringProperty":"some - string","StringProp":"some string 2"}' + body: '{"Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":2,"PartitionKey":"partition","RowKey":"2","String":"someString","Timestamp":"0001-01-01T00:00:00Z"}' form: {} headers: Accept: @@ -110,7 +108,7 @@ interactions: Authorization: - sanitized Content-Length: - - "663" + - "194" Content-Type: - application/json Dataserviceversion: @@ -118,13 +116,13 @@ interactions: Prefer: - return-no-content User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Wed, 19 May 2021 16:25:34 GMT + - Thu, 15 Jul 2021 21:48:02 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.core.windows.net/gotablejb1ox80o3u07d + url: https://seankaneprim.table.core.windows.net/gotablejzpyj5z4607mt method: POST response: body: "" @@ -134,13 +132,13 @@ interactions: Content-Length: - "0" Dataserviceid: - - https://chrisstablesprim.table.core.windows.net/gotablejb1ox80o3u07d(PartitionKey='partition',RowKey='2') + - https://seankaneprim.table.core.windows.net/gotablejzpyj5z4607mt(PartitionKey='partition',RowKey='2') Date: - - Wed, 19 May 2021 16:25:34 GMT + - Thu, 15 Jul 2021 21:48:00 GMT Etag: - - W/"datetime'2021-05-19T16%3A25%3A35.1402835Z'" + - W/"datetime'2021-07-15T21%3A48%3A01.0298082Z'" Location: - - https://chrisstablesprim.table.core.windows.net/gotablejb1ox80o3u07d(PartitionKey='partition',RowKey='2') + - https://seankaneprim.table.core.windows.net/gotablejzpyj5z4607mt(PartitionKey='partition',RowKey='2') Preference-Applied: - return-no-content Server: @@ -148,15 +146,14 @@ interactions: X-Content-Type-Options: - nosniff X-Ms-Request-Id: - - fc7aa0bc-d002-0012-74cb-4c4fc4000000 + - 48af4075-8002-0090-6fc3-79d21b000000 X-Ms-Version: - "2019-02-02" status: 204 No Content code: 204 duration: "" - request: - body: '{"BoolProp":true,"IntProp":3,"PartitionKey":"partition","RowKey":"3","SomeBinaryProperty":"c29tZSBieXRlcw==","SomeBinaryProperty@odata.type":"Edm.Binary","SomeDateProperty":"2021-05-19T16:25:34.8176907Z","SomeDateProperty@odata.type":"Edm.DateTime","SomeDoubleProperty0":1,"SomeDoubleProperty0@odata.type":"Edm.Double","SomeDoubleProperty1":1.2345,"SomeDoubleProperty1@odata.type":"Edm.Double","SomeGuidProperty":"dcc950e1-9b4d-4921-641f-6b027f009872","SomeGuidProperty@odata.type":"Edm.Guid","SomeInt64Property":"9223372036854775807","SomeInt64Property@odata.type":"Edm.Int64","SomeIntProperty":42,"SomeStringProperty":"some - string","StringProp":"some string 3"}' + body: '{"Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":3,"PartitionKey":"partition","RowKey":"3","String":"someString","Timestamp":"0001-01-01T00:00:00Z"}' form: {} headers: Accept: @@ -164,7 +161,7 @@ interactions: Authorization: - sanitized Content-Length: - - "663" + - "194" Content-Type: - application/json Dataserviceversion: @@ -172,13 +169,13 @@ interactions: Prefer: - return-no-content User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Wed, 19 May 2021 16:25:34 GMT + - Thu, 15 Jul 2021 21:48:02 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.core.windows.net/gotablejb1ox80o3u07d + url: https://seankaneprim.table.core.windows.net/gotablejzpyj5z4607mt method: POST response: body: "" @@ -188,13 +185,13 @@ interactions: Content-Length: - "0" Dataserviceid: - - https://chrisstablesprim.table.core.windows.net/gotablejb1ox80o3u07d(PartitionKey='partition',RowKey='3') + - https://seankaneprim.table.core.windows.net/gotablejzpyj5z4607mt(PartitionKey='partition',RowKey='3') Date: - - Wed, 19 May 2021 16:25:34 GMT + - Thu, 15 Jul 2021 21:48:01 GMT Etag: - - W/"datetime'2021-05-19T16%3A25%3A35.2163375Z'" + - W/"datetime'2021-07-15T21%3A48%3A01.140887Z'" Location: - - https://chrisstablesprim.table.core.windows.net/gotablejb1ox80o3u07d(PartitionKey='partition',RowKey='3') + - https://seankaneprim.table.core.windows.net/gotablejzpyj5z4607mt(PartitionKey='partition',RowKey='3') Preference-Applied: - return-no-content Server: @@ -202,15 +199,14 @@ interactions: X-Content-Type-Options: - nosniff X-Ms-Request-Id: - - fc7aa0c9-d002-0012-7ccb-4c4fc4000000 + - 48af40b5-8002-0090-2dc3-79d21b000000 X-Ms-Version: - "2019-02-02" status: 204 No Content code: 204 duration: "" - request: - body: '{"BoolProp":true,"IntProp":4,"PartitionKey":"partition","RowKey":"4","SomeBinaryProperty":"c29tZSBieXRlcw==","SomeBinaryProperty@odata.type":"Edm.Binary","SomeDateProperty":"2021-05-19T16:25:34.8176907Z","SomeDateProperty@odata.type":"Edm.DateTime","SomeDoubleProperty0":1,"SomeDoubleProperty0@odata.type":"Edm.Double","SomeDoubleProperty1":1.2345,"SomeDoubleProperty1@odata.type":"Edm.Double","SomeGuidProperty":"1d4ec065-b163-4655-6837-dfb00d348f05","SomeGuidProperty@odata.type":"Edm.Guid","SomeInt64Property":"9223372036854775807","SomeInt64Property@odata.type":"Edm.Int64","SomeIntProperty":42,"SomeStringProperty":"some - string","StringProp":"some string 4"}' + body: '{"Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":4,"PartitionKey":"partition","RowKey":"4","String":"someString","Timestamp":"0001-01-01T00:00:00Z"}' form: {} headers: Accept: @@ -218,7 +214,7 @@ interactions: Authorization: - sanitized Content-Length: - - "663" + - "194" Content-Type: - application/json Dataserviceversion: @@ -226,13 +222,13 @@ interactions: Prefer: - return-no-content User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Wed, 19 May 2021 16:25:35 GMT + - Thu, 15 Jul 2021 21:48:02 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.core.windows.net/gotablejb1ox80o3u07d + url: https://seankaneprim.table.core.windows.net/gotablejzpyj5z4607mt method: POST response: body: "" @@ -242,13 +238,13 @@ interactions: Content-Length: - "0" Dataserviceid: - - https://chrisstablesprim.table.core.windows.net/gotablejb1ox80o3u07d(PartitionKey='partition',RowKey='4') + - https://seankaneprim.table.core.windows.net/gotablejzpyj5z4607mt(PartitionKey='partition',RowKey='4') Date: - - Wed, 19 May 2021 16:25:34 GMT + - Thu, 15 Jul 2021 21:48:01 GMT Etag: - - W/"datetime'2021-05-19T16%3A25%3A35.2903901Z'" + - W/"datetime'2021-07-15T21%3A48%3A01.2559673Z'" Location: - - https://chrisstablesprim.table.core.windows.net/gotablejb1ox80o3u07d(PartitionKey='partition',RowKey='4') + - https://seankaneprim.table.core.windows.net/gotablejzpyj5z4607mt(PartitionKey='partition',RowKey='4') Preference-Applied: - return-no-content Server: @@ -256,15 +252,14 @@ interactions: X-Content-Type-Options: - nosniff X-Ms-Request-Id: - - fc7aa0d4-d002-0012-02cb-4c4fc4000000 + - 48af40dd-8002-0090-54c3-79d21b000000 X-Ms-Version: - "2019-02-02" status: 204 No Content code: 204 duration: "" - request: - body: '{"BoolProp":true,"IntProp":5,"PartitionKey":"partition","RowKey":"5","SomeBinaryProperty":"c29tZSBieXRlcw==","SomeBinaryProperty@odata.type":"Edm.Binary","SomeDateProperty":"2021-05-19T16:25:34.8176907Z","SomeDateProperty@odata.type":"Edm.DateTime","SomeDoubleProperty0":1,"SomeDoubleProperty0@odata.type":"Edm.Double","SomeDoubleProperty1":1.2345,"SomeDoubleProperty1@odata.type":"Edm.Double","SomeGuidProperty":"56f00341-cce5-4e8b-7071-d032809fc2ba","SomeGuidProperty@odata.type":"Edm.Guid","SomeInt64Property":"9223372036854775807","SomeInt64Property@odata.type":"Edm.Int64","SomeIntProperty":42,"SomeStringProperty":"some - string","StringProp":"some string 5"}' + body: '{"Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":5,"PartitionKey":"partition","RowKey":"5","String":"someString","Timestamp":"0001-01-01T00:00:00Z"}' form: {} headers: Accept: @@ -272,7 +267,7 @@ interactions: Authorization: - sanitized Content-Length: - - "663" + - "194" Content-Type: - application/json Dataserviceversion: @@ -280,13 +275,13 @@ interactions: Prefer: - return-no-content User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Wed, 19 May 2021 16:25:35 GMT + - Thu, 15 Jul 2021 21:48:02 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.core.windows.net/gotablejb1ox80o3u07d + url: https://seankaneprim.table.core.windows.net/gotablejzpyj5z4607mt method: POST response: body: "" @@ -296,13 +291,13 @@ interactions: Content-Length: - "0" Dataserviceid: - - https://chrisstablesprim.table.core.windows.net/gotablejb1ox80o3u07d(PartitionKey='partition',RowKey='5') + - https://seankaneprim.table.core.windows.net/gotablejzpyj5z4607mt(PartitionKey='partition',RowKey='5') Date: - - Wed, 19 May 2021 16:25:34 GMT + - Thu, 15 Jul 2021 21:48:01 GMT Etag: - - W/"datetime'2021-05-19T16%3A25%3A35.368446Z'" + - W/"datetime'2021-07-15T21%3A48%3A01.3690484Z'" Location: - - https://chrisstablesprim.table.core.windows.net/gotablejb1ox80o3u07d(PartitionKey='partition',RowKey='5') + - https://seankaneprim.table.core.windows.net/gotablejzpyj5z4607mt(PartitionKey='partition',RowKey='5') Preference-Applied: - return-no-content Server: @@ -310,7 +305,7 @@ interactions: X-Content-Type-Options: - nosniff X-Ms-Request-Id: - - fc7aa0e3-d002-0012-0bcb-4c4fc4000000 + - 48af410d-8002-0090-03c3-79d21b000000 X-Ms-Version: - "2019-02-02" status: 204 No Content @@ -327,33 +322,29 @@ interactions: Dataserviceversion: - "3.0" User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Wed, 19 May 2021 16:25:35 GMT + - Thu, 15 Jul 2021 21:48:02 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.core.windows.net/gotablejb1ox80o3u07d()?%24filter=RowKey+lt+%275%27 + url: https://seankaneprim.table.core.windows.net/gotablejzpyj5z4607mt()?%24filter=RowKey+lt+%275%27 method: GET response: - body: '{"odata.metadata":"https://chrisstablesprim.table.core.windows.net/$metadata#gotablejb1ox80o3u07d","value":[{"odata.etag":"W/\"datetime''2021-05-19T16%3A25%3A35.0582247Z''\"","PartitionKey":"partition","RowKey":"1","Timestamp":"2021-05-19T16:25:35.0582247Z","BoolProp":true,"IntProp":1,"SomeBinaryProperty@odata.type":"Edm.Binary","SomeBinaryProperty":"c29tZSBieXRlcw==","SomeDateProperty@odata.type":"Edm.DateTime","SomeDateProperty":"2021-05-19T16:25:34.8176907Z","SomeDoubleProperty0":1.0,"SomeDoubleProperty1":1.2345,"SomeGuidProperty@odata.type":"Edm.Guid","SomeGuidProperty":"db1ac97d-fb93-4b44-7d4b-d4f954a074cd","SomeInt64Property@odata.type":"Edm.Int64","SomeInt64Property":"9223372036854775807","SomeIntProperty":42,"SomeStringProperty":"some - string","StringProp":"some string 1"},{"odata.etag":"W/\"datetime''2021-05-19T16%3A25%3A35.1402835Z''\"","PartitionKey":"partition","RowKey":"2","Timestamp":"2021-05-19T16:25:35.1402835Z","BoolProp":true,"IntProp":2,"SomeBinaryProperty@odata.type":"Edm.Binary","SomeBinaryProperty":"c29tZSBieXRlcw==","SomeDateProperty@odata.type":"Edm.DateTime","SomeDateProperty":"2021-05-19T16:25:34.8176907Z","SomeDoubleProperty0":1.0,"SomeDoubleProperty1":1.2345,"SomeGuidProperty@odata.type":"Edm.Guid","SomeGuidProperty":"fb4d0c37-ce1d-4be9-7caf-b33d2c76c8d2","SomeInt64Property@odata.type":"Edm.Int64","SomeInt64Property":"9223372036854775807","SomeIntProperty":42,"SomeStringProperty":"some - string","StringProp":"some string 2"},{"odata.etag":"W/\"datetime''2021-05-19T16%3A25%3A35.2163375Z''\"","PartitionKey":"partition","RowKey":"3","Timestamp":"2021-05-19T16:25:35.2163375Z","BoolProp":true,"IntProp":3,"SomeBinaryProperty@odata.type":"Edm.Binary","SomeBinaryProperty":"c29tZSBieXRlcw==","SomeDateProperty@odata.type":"Edm.DateTime","SomeDateProperty":"2021-05-19T16:25:34.8176907Z","SomeDoubleProperty0":1.0,"SomeDoubleProperty1":1.2345,"SomeGuidProperty@odata.type":"Edm.Guid","SomeGuidProperty":"dcc950e1-9b4d-4921-641f-6b027f009872","SomeInt64Property@odata.type":"Edm.Int64","SomeInt64Property":"9223372036854775807","SomeIntProperty":42,"SomeStringProperty":"some - string","StringProp":"some string 3"},{"odata.etag":"W/\"datetime''2021-05-19T16%3A25%3A35.2903901Z''\"","PartitionKey":"partition","RowKey":"4","Timestamp":"2021-05-19T16:25:35.2903901Z","BoolProp":true,"IntProp":4,"SomeBinaryProperty@odata.type":"Edm.Binary","SomeBinaryProperty":"c29tZSBieXRlcw==","SomeDateProperty@odata.type":"Edm.DateTime","SomeDateProperty":"2021-05-19T16:25:34.8176907Z","SomeDoubleProperty0":1.0,"SomeDoubleProperty1":1.2345,"SomeGuidProperty@odata.type":"Edm.Guid","SomeGuidProperty":"1d4ec065-b163-4655-6837-dfb00d348f05","SomeInt64Property@odata.type":"Edm.Int64","SomeInt64Property":"9223372036854775807","SomeIntProperty":42,"SomeStringProperty":"some - string","StringProp":"some string 4"}]}' + body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#gotablejzpyj5z4607mt","value":[{"odata.etag":"W/\"datetime''2021-07-15T21%3A48%3A00.9167262Z''\"","PartitionKey":"partition","RowKey":"1","Timestamp":"2021-07-15T21:48:00.9167262Z","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":1,"String":"someString"},{"odata.etag":"W/\"datetime''2021-07-15T21%3A48%3A01.0298082Z''\"","PartitionKey":"partition","RowKey":"2","Timestamp":"2021-07-15T21:48:01.0298082Z","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":2,"String":"someString"},{"odata.etag":"W/\"datetime''2021-07-15T21%3A48%3A01.140887Z''\"","PartitionKey":"partition","RowKey":"3","Timestamp":"2021-07-15T21:48:01.140887Z","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":3,"String":"someString"},{"odata.etag":"W/\"datetime''2021-07-15T21%3A48%3A01.2559673Z''\"","PartitionKey":"partition","RowKey":"4","Timestamp":"2021-07-15T21:48:01.2559673Z","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":4,"String":"someString"}]}' headers: Cache-Control: - no-cache Content-Type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 Date: - - Wed, 19 May 2021 16:25:34 GMT + - Thu, 15 Jul 2021 21:48:01 GMT Server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 X-Content-Type-Options: - nosniff X-Ms-Request-Id: - - fc7aa0e9-d002-0012-11cb-4c4fc4000000 + - 48af412f-8002-0090-25c3-79d21b000000 X-Ms-Version: - "2019-02-02" status: 200 OK @@ -368,13 +359,13 @@ interactions: Authorization: - sanitized User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Wed, 19 May 2021 16:25:35 GMT + - Thu, 15 Jul 2021 21:48:02 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.core.windows.net/Tables('gotablejb1ox80o3u07d') + url: https://seankaneprim.table.core.windows.net/Tables('gotablejzpyj5z4607mt') method: DELETE response: body: "" @@ -384,13 +375,13 @@ interactions: Content-Length: - "0" Date: - - Wed, 19 May 2021 16:25:34 GMT + - Thu, 15 Jul 2021 21:48:01 GMT Server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 X-Content-Type-Options: - nosniff X-Ms-Request-Id: - - fc7aa0f9-d002-0012-21cb-4c4fc4000000 + - 48af4159-8002-0090-4ec3-79d21b000000 X-Ms-Version: - "2019-02-02" status: 204 No Content diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestQuerySimpleEntity-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestQuerySimpleEntity-variables.yaml index 7a6b1b1ab41d..7796ee2dc14e 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestQuerySimpleEntity-variables.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestQuerySimpleEntity-variables.yaml @@ -1,5 +1,5 @@ --- STORAGE_ENDPOINT_SUFFIX: core.windows.net TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== -TABLES_STORAGE_ACCOUNT_NAME: chrisstablesprim -randomSeed: "1617598958" +TABLES_STORAGE_ACCOUNT_NAME: seankaneprim +randomSeed: "1626385663" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestQuerySimpleEntity.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestQuerySimpleEntity.yaml index 1735178553e0..f51244a319b3 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestQuerySimpleEntity.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestQuerySimpleEntity.yaml @@ -2,7 +2,7 @@ version: 1 interactions: - request: - body: '{"TableName":"gotablev9ymy16fzote2"}' + body: '{"TableName":"gotablek9778z5927xtv"}' form: {} headers: Accept: @@ -16,39 +16,39 @@ interactions: Dataserviceversion: - "3.0" User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Mon, 05 Apr 2021 05:02:38 GMT + - Thu, 15 Jul 2021 21:47:43 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.core.windows.net/Tables + url: https://seankaneprim.table.core.windows.net/Tables method: POST response: - body: '{"odata.metadata":"https://chrisstablesprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotablev9ymy16fzote2"}' + body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotablek9778z5927xtv"}' headers: Cache-Control: - no-cache Content-Type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 Date: - - Mon, 05 Apr 2021 05:02:37 GMT + - Thu, 15 Jul 2021 21:47:42 GMT Location: - - https://chrisstablesprim.table.core.windows.net/Tables('gotablev9ymy16fzote2') + - https://seankaneprim.table.core.windows.net/Tables('gotablek9778z5927xtv') Server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 X-Content-Type-Options: - nosniff X-Ms-Request-Id: - - 95cfebe3-e002-0019-49d8-29b4af000000 + - 32f1ec8a-7002-005f-0dc3-795c49000000 X-Ms-Version: - "2019-02-02" status: 201 Created code: 201 duration: "" - request: - body: '{"BoolProp":true,"IntProp":1,"PartitionKey":"partition","RowKey":"1","StringProp":"some - string 1"}' + body: '{"Bool":true,"Integer":1,"PartitionKey":"partition","RowKey":"1","String":"some + string 1","Timestamp":"0001-01-01T00:00:00Z"}' form: {} headers: Accept: @@ -56,7 +56,7 @@ interactions: Authorization: - sanitized Content-Length: - - "98" + - "125" Content-Type: - application/json Dataserviceversion: @@ -64,13 +64,13 @@ interactions: Prefer: - return-no-content User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Mon, 05 Apr 2021 05:02:38 GMT + - Thu, 15 Jul 2021 21:47:44 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.core.windows.net/gotablev9ymy16fzote2 + url: https://seankaneprim.table.core.windows.net/gotablek9778z5927xtv method: POST response: body: "" @@ -80,13 +80,13 @@ interactions: Content-Length: - "0" Dataserviceid: - - https://chrisstablesprim.table.core.windows.net/gotablev9ymy16fzote2(PartitionKey='partition',RowKey='1') + - https://seankaneprim.table.core.windows.net/gotablek9778z5927xtv(PartitionKey='partition',RowKey='1') Date: - - Mon, 05 Apr 2021 05:02:37 GMT + - Thu, 15 Jul 2021 21:47:42 GMT Etag: - - W/"datetime'2021-04-05T05%3A02%3A38.4885381Z'" + - W/"datetime'2021-07-15T21%3A47%3A43.1505573Z'" Location: - - https://chrisstablesprim.table.core.windows.net/gotablev9ymy16fzote2(PartitionKey='partition',RowKey='1') + - https://seankaneprim.table.core.windows.net/gotablek9778z5927xtv(PartitionKey='partition',RowKey='1') Preference-Applied: - return-no-content Server: @@ -94,15 +94,15 @@ interactions: X-Content-Type-Options: - nosniff X-Ms-Request-Id: - - 95cfebec-e002-0019-50d8-29b4af000000 + - 32f1ecb5-7002-005f-34c3-795c49000000 X-Ms-Version: - "2019-02-02" status: 204 No Content code: 204 duration: "" - request: - body: '{"BoolProp":true,"IntProp":2,"PartitionKey":"partition","RowKey":"2","StringProp":"some - string 2"}' + body: '{"Bool":true,"Integer":2,"PartitionKey":"partition","RowKey":"2","String":"some + string 2","Timestamp":"0001-01-01T00:00:00Z"}' form: {} headers: Accept: @@ -110,7 +110,7 @@ interactions: Authorization: - sanitized Content-Length: - - "98" + - "125" Content-Type: - application/json Dataserviceversion: @@ -118,13 +118,13 @@ interactions: Prefer: - return-no-content User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Mon, 05 Apr 2021 05:02:38 GMT + - Thu, 15 Jul 2021 21:47:44 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.core.windows.net/gotablev9ymy16fzote2 + url: https://seankaneprim.table.core.windows.net/gotablek9778z5927xtv method: POST response: body: "" @@ -134,13 +134,13 @@ interactions: Content-Length: - "0" Dataserviceid: - - https://chrisstablesprim.table.core.windows.net/gotablev9ymy16fzote2(PartitionKey='partition',RowKey='2') + - https://seankaneprim.table.core.windows.net/gotablek9778z5927xtv(PartitionKey='partition',RowKey='2') Date: - - Mon, 05 Apr 2021 05:02:37 GMT + - Thu, 15 Jul 2021 21:47:42 GMT Etag: - - W/"datetime'2021-04-05T05%3A02%3A38.5946142Z'" + - W/"datetime'2021-07-15T21%3A47%3A43.2566321Z'" Location: - - https://chrisstablesprim.table.core.windows.net/gotablev9ymy16fzote2(PartitionKey='partition',RowKey='2') + - https://seankaneprim.table.core.windows.net/gotablek9778z5927xtv(PartitionKey='partition',RowKey='2') Preference-Applied: - return-no-content Server: @@ -148,15 +148,15 @@ interactions: X-Content-Type-Options: - nosniff X-Ms-Request-Id: - - 95cfebf1-e002-0019-55d8-29b4af000000 + - 32f1ecd8-7002-005f-52c3-795c49000000 X-Ms-Version: - "2019-02-02" status: 204 No Content code: 204 duration: "" - request: - body: '{"BoolProp":true,"IntProp":3,"PartitionKey":"partition","RowKey":"3","StringProp":"some - string 3"}' + body: '{"Bool":true,"Integer":3,"PartitionKey":"partition","RowKey":"3","String":"some + string 3","Timestamp":"0001-01-01T00:00:00Z"}' form: {} headers: Accept: @@ -164,7 +164,7 @@ interactions: Authorization: - sanitized Content-Length: - - "98" + - "125" Content-Type: - application/json Dataserviceversion: @@ -172,13 +172,13 @@ interactions: Prefer: - return-no-content User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Mon, 05 Apr 2021 05:02:38 GMT + - Thu, 15 Jul 2021 21:47:44 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.core.windows.net/gotablev9ymy16fzote2 + url: https://seankaneprim.table.core.windows.net/gotablek9778z5927xtv method: POST response: body: "" @@ -188,13 +188,13 @@ interactions: Content-Length: - "0" Dataserviceid: - - https://chrisstablesprim.table.core.windows.net/gotablev9ymy16fzote2(PartitionKey='partition',RowKey='3') + - https://seankaneprim.table.core.windows.net/gotablek9778z5927xtv(PartitionKey='partition',RowKey='3') Date: - - Mon, 05 Apr 2021 05:02:38 GMT + - Thu, 15 Jul 2021 21:47:42 GMT Etag: - - W/"datetime'2021-04-05T05%3A02%3A38.6866808Z'" + - W/"datetime'2021-07-15T21%3A47%3A43.3667092Z'" Location: - - https://chrisstablesprim.table.core.windows.net/gotablev9ymy16fzote2(PartitionKey='partition',RowKey='3') + - https://seankaneprim.table.core.windows.net/gotablek9778z5927xtv(PartitionKey='partition',RowKey='3') Preference-Applied: - return-no-content Server: @@ -202,15 +202,15 @@ interactions: X-Content-Type-Options: - nosniff X-Ms-Request-Id: - - 95cfebf3-e002-0019-57d8-29b4af000000 + - 32f1ed05-7002-005f-7cc3-795c49000000 X-Ms-Version: - "2019-02-02" status: 204 No Content code: 204 duration: "" - request: - body: '{"BoolProp":true,"IntProp":4,"PartitionKey":"partition","RowKey":"4","StringProp":"some - string 4"}' + body: '{"Bool":true,"Integer":4,"PartitionKey":"partition","RowKey":"4","String":"some + string 4","Timestamp":"0001-01-01T00:00:00Z"}' form: {} headers: Accept: @@ -218,7 +218,7 @@ interactions: Authorization: - sanitized Content-Length: - - "98" + - "125" Content-Type: - application/json Dataserviceversion: @@ -226,13 +226,13 @@ interactions: Prefer: - return-no-content User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Mon, 05 Apr 2021 05:02:38 GMT + - Thu, 15 Jul 2021 21:47:44 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.core.windows.net/gotablev9ymy16fzote2 + url: https://seankaneprim.table.core.windows.net/gotablek9778z5927xtv method: POST response: body: "" @@ -242,13 +242,13 @@ interactions: Content-Length: - "0" Dataserviceid: - - https://chrisstablesprim.table.core.windows.net/gotablev9ymy16fzote2(PartitionKey='partition',RowKey='4') + - https://seankaneprim.table.core.windows.net/gotablek9778z5927xtv(PartitionKey='partition',RowKey='4') Date: - - Mon, 05 Apr 2021 05:02:38 GMT + - Thu, 15 Jul 2021 21:47:42 GMT Etag: - - W/"datetime'2021-04-05T05%3A02%3A38.7727417Z'" + - W/"datetime'2021-07-15T21%3A47%3A43.48079Z'" Location: - - https://chrisstablesprim.table.core.windows.net/gotablev9ymy16fzote2(PartitionKey='partition',RowKey='4') + - https://seankaneprim.table.core.windows.net/gotablek9778z5927xtv(PartitionKey='partition',RowKey='4') Preference-Applied: - return-no-content Server: @@ -256,15 +256,15 @@ interactions: X-Content-Type-Options: - nosniff X-Ms-Request-Id: - - 95cfebf5-e002-0019-59d8-29b4af000000 + - 32f1ed2e-7002-005f-23c3-795c49000000 X-Ms-Version: - "2019-02-02" status: 204 No Content code: 204 duration: "" - request: - body: '{"BoolProp":true,"IntProp":5,"PartitionKey":"partition","RowKey":"5","StringProp":"some - string 5"}' + body: '{"Bool":true,"Integer":5,"PartitionKey":"partition","RowKey":"5","String":"some + string 5","Timestamp":"0001-01-01T00:00:00Z"}' form: {} headers: Accept: @@ -272,7 +272,7 @@ interactions: Authorization: - sanitized Content-Length: - - "98" + - "125" Content-Type: - application/json Dataserviceversion: @@ -280,13 +280,13 @@ interactions: Prefer: - return-no-content User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Mon, 05 Apr 2021 05:02:38 GMT + - Thu, 15 Jul 2021 21:47:44 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.core.windows.net/gotablev9ymy16fzote2 + url: https://seankaneprim.table.core.windows.net/gotablek9778z5927xtv method: POST response: body: "" @@ -296,13 +296,13 @@ interactions: Content-Length: - "0" Dataserviceid: - - https://chrisstablesprim.table.core.windows.net/gotablev9ymy16fzote2(PartitionKey='partition',RowKey='5') + - https://seankaneprim.table.core.windows.net/gotablek9778z5927xtv(PartitionKey='partition',RowKey='5') Date: - - Mon, 05 Apr 2021 05:02:38 GMT + - Thu, 15 Jul 2021 21:47:42 GMT Etag: - - W/"datetime'2021-04-05T05%3A02%3A38.8487963Z'" + - W/"datetime'2021-07-15T21%3A47%3A43.5858643Z'" Location: - - https://chrisstablesprim.table.core.windows.net/gotablev9ymy16fzote2(PartitionKey='partition',RowKey='5') + - https://seankaneprim.table.core.windows.net/gotablek9778z5927xtv(PartitionKey='partition',RowKey='5') Preference-Applied: - return-no-content Server: @@ -310,7 +310,7 @@ interactions: X-Content-Type-Options: - nosniff X-Ms-Request-Id: - - 95cfebfb-e002-0019-5cd8-29b4af000000 + - 32f1ed50-7002-005f-45c3-795c49000000 X-Ms-Version: - "2019-02-02" status: 204 No Content @@ -327,19 +327,19 @@ interactions: Dataserviceversion: - "3.0" User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Mon, 05 Apr 2021 05:02:39 GMT + - Thu, 15 Jul 2021 21:47:44 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.core.windows.net/gotablev9ymy16fzote2()?%24filter=RowKey+lt+%275%27 + url: https://seankaneprim.table.core.windows.net/gotablek9778z5927xtv()?%24filter=RowKey+lt+%275%27 method: GET response: - body: '{"odata.metadata":"https://chrisstablesprim.table.core.windows.net/$metadata#gotablev9ymy16fzote2","value":[{"odata.etag":"W/\"datetime''2021-04-05T05%3A02%3A38.4885381Z''\"","PartitionKey":"partition","RowKey":"1","Timestamp":"2021-04-05T05:02:38.4885381Z","BoolProp":true,"IntProp":1,"StringProp":"some - string 1"},{"odata.etag":"W/\"datetime''2021-04-05T05%3A02%3A38.5946142Z''\"","PartitionKey":"partition","RowKey":"2","Timestamp":"2021-04-05T05:02:38.5946142Z","BoolProp":true,"IntProp":2,"StringProp":"some - string 2"},{"odata.etag":"W/\"datetime''2021-04-05T05%3A02%3A38.6866808Z''\"","PartitionKey":"partition","RowKey":"3","Timestamp":"2021-04-05T05:02:38.6866808Z","BoolProp":true,"IntProp":3,"StringProp":"some - string 3"},{"odata.etag":"W/\"datetime''2021-04-05T05%3A02%3A38.7727417Z''\"","PartitionKey":"partition","RowKey":"4","Timestamp":"2021-04-05T05:02:38.7727417Z","BoolProp":true,"IntProp":4,"StringProp":"some + body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#gotablek9778z5927xtv","value":[{"odata.etag":"W/\"datetime''2021-07-15T21%3A47%3A43.1505573Z''\"","PartitionKey":"partition","RowKey":"1","Timestamp":"2021-07-15T21:47:43.1505573Z","Bool":true,"Integer":1,"String":"some + string 1"},{"odata.etag":"W/\"datetime''2021-07-15T21%3A47%3A43.2566321Z''\"","PartitionKey":"partition","RowKey":"2","Timestamp":"2021-07-15T21:47:43.2566321Z","Bool":true,"Integer":2,"String":"some + string 2"},{"odata.etag":"W/\"datetime''2021-07-15T21%3A47%3A43.3667092Z''\"","PartitionKey":"partition","RowKey":"3","Timestamp":"2021-07-15T21:47:43.3667092Z","Bool":true,"Integer":3,"String":"some + string 3"},{"odata.etag":"W/\"datetime''2021-07-15T21%3A47%3A43.48079Z''\"","PartitionKey":"partition","RowKey":"4","Timestamp":"2021-07-15T21:47:43.48079Z","Bool":true,"Integer":4,"String":"some string 4"}]}' headers: Cache-Control: @@ -347,13 +347,13 @@ interactions: Content-Type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 Date: - - Mon, 05 Apr 2021 05:02:38 GMT + - Thu, 15 Jul 2021 21:47:43 GMT Server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 X-Content-Type-Options: - nosniff X-Ms-Request-Id: - - 95cfebfe-e002-0019-5ed8-29b4af000000 + - 32f1ed69-7002-005f-5ec3-795c49000000 X-Ms-Version: - "2019-02-02" status: 200 OK @@ -368,13 +368,13 @@ interactions: Authorization: - sanitized User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Mon, 05 Apr 2021 05:02:39 GMT + - Thu, 15 Jul 2021 21:47:44 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.core.windows.net/Tables('gotablev9ymy16fzote2') + url: https://seankaneprim.table.core.windows.net/Tables('gotablek9778z5927xtv') method: DELETE response: body: "" @@ -384,13 +384,13 @@ interactions: Content-Length: - "0" Date: - - Mon, 05 Apr 2021 05:02:38 GMT + - Thu, 15 Jul 2021 21:47:43 GMT Server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 X-Content-Type-Options: - nosniff X-Ms-Request-Id: - - 95cfec00-e002-0019-60d8-29b4af000000 + - 32f1ed9c-7002-005f-11c3-795c49000000 X-Ms-Version: - "2019-02-02" status: 204 No Content diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestUpsertEntity-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestUpsertEntity-variables.yaml index 0d48c901e16e..75cbc4a81627 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestUpsertEntity-variables.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestUpsertEntity-variables.yaml @@ -1,5 +1,5 @@ --- STORAGE_ENDPOINT_SUFFIX: core.windows.net TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== -TABLES_STORAGE_ACCOUNT_NAME: chrisstablesprim -randomSeed: "1621629298" +TABLES_STORAGE_ACCOUNT_NAME: seankaneprim +randomSeed: "1626385645" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestUpsertEntity.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestUpsertEntity.yaml index a051ad2e5f87..d7844c3c6b2b 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestUpsertEntity.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestUpsertEntity.yaml @@ -2,7 +2,7 @@ version: 1 interactions: - request: - body: '{"TableName":"gotableybpwrxkkatqur"}' + body: '{"TableName":"gotablemhr5jkk1y0d72"}' form: {} headers: Accept: @@ -16,39 +16,39 @@ interactions: Dataserviceversion: - "3.0" User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Fri, 21 May 2021 20:34:58 GMT + - Thu, 15 Jul 2021 21:47:25 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.core.windows.net/Tables + url: https://seankaneprim.table.core.windows.net/Tables method: POST response: - body: '{"odata.metadata":"https://chrisstablesprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotableybpwrxkkatqur"}' + body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotablemhr5jkk1y0d72"}' headers: Cache-Control: - no-cache Content-Type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 Date: - - Fri, 21 May 2021 20:34:58 GMT + - Thu, 15 Jul 2021 21:47:24 GMT Location: - - https://chrisstablesprim.table.core.windows.net/Tables('gotableybpwrxkkatqur') + - https://seankaneprim.table.core.windows.net/Tables('gotablemhr5jkk1y0d72') Server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 X-Content-Type-Options: - nosniff X-Ms-Request-Id: - - c1ecaa3f-8002-0030-1d80-4e8adb000000 + - d5213e2a-d002-008d-49c2-79dfa7000000 X-Ms-Version: - "2019-02-02" status: 201 Created code: 201 duration: "" - request: - body: '{"BoolProp":true,"IntProp":1,"PartitionKey":"partition","RowKey":"1","StringProp":"some - string 1"}' + body: '{"Bool":true,"Integer":1,"PartitionKey":"partition","RowKey":"1","String":"some + string 1","Timestamp":"0001-01-01T00:00:00Z"}' form: {} headers: Accept: @@ -56,19 +56,19 @@ interactions: Authorization: - sanitized Content-Length: - - "98" + - "125" Content-Type: - application/json Dataserviceversion: - "3.0" User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Fri, 21 May 2021 20:34:59 GMT + - Thu, 15 Jul 2021 21:47:26 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.core.windows.net/gotableybpwrxkkatqur(PartitionKey='partition',RowKey='1') + url: https://seankaneprim.table.core.windows.net/gotablemhr5jkk1y0d72(PartitionKey='partition',RowKey='1') method: PUT response: body: "" @@ -78,15 +78,15 @@ interactions: Content-Length: - "0" Date: - - Fri, 21 May 2021 20:34:58 GMT + - Thu, 15 Jul 2021 21:47:24 GMT Etag: - - W/"datetime'2021-05-21T20%3A34%3A59.5369667Z'" + - W/"datetime'2021-07-15T21%3A47%3A25.2690439Z'" Server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 X-Content-Type-Options: - nosniff X-Ms-Request-Id: - - c1ecaa49-8002-0030-2380-4e8adb000000 + - d5213e45-d002-008d-57c2-79dfa7000000 X-Ms-Version: - "2019-02-02" status: 204 No Content @@ -103,37 +103,40 @@ interactions: Dataserviceversion: - "3.0" User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Fri, 21 May 2021 20:34:59 GMT + - Thu, 15 Jul 2021 21:47:26 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.core.windows.net/gotableybpwrxkkatqur()?%24filter=RowKey+eq+%271%27 + url: https://seankaneprim.table.core.windows.net/gotablemhr5jkk1y0d72(PartitionKey='partition',RowKey='1') method: GET response: - body: '{"odata.metadata":"https://chrisstablesprim.table.core.windows.net/$metadata#gotableybpwrxkkatqur","value":[{"odata.etag":"W/\"datetime''2021-05-21T20%3A34%3A59.5369667Z''\"","PartitionKey":"partition","RowKey":"1","Timestamp":"2021-05-21T20:34:59.5369667Z","BoolProp":true,"IntProp":1,"StringProp":"some - string 1"}]}' + body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#gotablemhr5jkk1y0d72/@Element","odata.etag":"W/\"datetime''2021-07-15T21%3A47%3A25.2690439Z''\"","PartitionKey":"partition","RowKey":"1","Timestamp":"2021-07-15T21:47:25.2690439Z","Bool":true,"Integer":1,"String":"some + string 1"}' headers: Cache-Control: - no-cache Content-Type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 Date: - - Fri, 21 May 2021 20:34:58 GMT + - Thu, 15 Jul 2021 21:47:24 GMT + Etag: + - W/"datetime'2021-07-15T21%3A47%3A25.2690439Z'" Server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 X-Content-Type-Options: - nosniff X-Ms-Request-Id: - - c1ecaa4c-8002-0030-2580-4e8adb000000 + - d5213e5a-d002-008d-64c2-79dfa7000000 X-Ms-Version: - "2019-02-02" status: 200 OK code: 200 duration: "" - request: - body: '{"MergeProperty":"foo","PartitionKey":"partition","RowKey":"1"}' + body: '{"Integer":1,"MergeProperty":"foo","PartitionKey":"partition","RowKey":"1","String":"some + string 1"}' form: {} headers: Accept: @@ -141,19 +144,19 @@ interactions: Authorization: - sanitized Content-Length: - - "63" + - "100" Content-Type: - application/json Dataserviceversion: - "3.0" User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Fri, 21 May 2021 20:34:59 GMT + - Thu, 15 Jul 2021 21:47:26 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.core.windows.net/gotableybpwrxkkatqur(PartitionKey='partition',RowKey='1') + url: https://seankaneprim.table.core.windows.net/gotablemhr5jkk1y0d72(PartitionKey='partition',RowKey='1') method: PUT response: body: "" @@ -163,15 +166,15 @@ interactions: Content-Length: - "0" Date: - - Fri, 21 May 2021 20:34:58 GMT + - Thu, 15 Jul 2021 21:47:24 GMT Etag: - - W/"datetime'2021-05-21T20%3A34%3A59.6890733Z'" + - W/"datetime'2021-07-15T21%3A47%3A25.4922034Z'" Server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 X-Content-Type-Options: - nosniff X-Ms-Request-Id: - - c1ecaa52-8002-0030-2b80-4e8adb000000 + - d5213e80-d002-008d-7fc2-79dfa7000000 X-Ms-Version: - "2019-02-02" status: 204 No Content @@ -188,29 +191,30 @@ interactions: Dataserviceversion: - "3.0" User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Fri, 21 May 2021 20:34:59 GMT + - Thu, 15 Jul 2021 21:47:26 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.core.windows.net/gotableybpwrxkkatqur()?%24filter=RowKey+eq+%271%27 + url: https://seankaneprim.table.core.windows.net/gotablemhr5jkk1y0d72()?%24filter=RowKey+eq+%271%27 method: GET response: - body: '{"odata.metadata":"https://chrisstablesprim.table.core.windows.net/$metadata#gotableybpwrxkkatqur","value":[{"odata.etag":"W/\"datetime''2021-05-21T20%3A34%3A59.6890733Z''\"","PartitionKey":"partition","RowKey":"1","Timestamp":"2021-05-21T20:34:59.6890733Z","MergeProperty":"foo"}]}' + body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#gotablemhr5jkk1y0d72","value":[{"odata.etag":"W/\"datetime''2021-07-15T21%3A47%3A25.4922034Z''\"","PartitionKey":"partition","RowKey":"1","Timestamp":"2021-07-15T21:47:25.4922034Z","Integer":1,"MergeProperty":"foo","String":"some + string 1"}]}' headers: Cache-Control: - no-cache Content-Type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 Date: - - Fri, 21 May 2021 20:34:58 GMT + - Thu, 15 Jul 2021 21:47:24 GMT Server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 X-Content-Type-Options: - nosniff X-Ms-Request-Id: - - c1ecaa53-8002-0030-2c80-4e8adb000000 + - d5213e9a-d002-008d-17c2-79dfa7000000 X-Ms-Version: - "2019-02-02" status: 200 OK @@ -225,13 +229,13 @@ interactions: Authorization: - sanitized User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Fri, 21 May 2021 20:34:59 GMT + - Thu, 15 Jul 2021 21:47:26 GMT X-Ms-Version: - "2019-02-02" - url: https://chrisstablesprim.table.core.windows.net/Tables('gotableybpwrxkkatqur') + url: https://seankaneprim.table.core.windows.net/Tables('gotablemhr5jkk1y0d72') method: DELETE response: body: "" @@ -241,13 +245,13 @@ interactions: Content-Length: - "0" Date: - - Fri, 21 May 2021 20:34:58 GMT + - Thu, 15 Jul 2021 21:47:24 GMT Server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 X-Content-Type-Options: - nosniff X-Ms-Request-Id: - - c1ecaa59-8002-0030-3180-4e8adb000000 + - d5213eab-d002-008d-27c3-79dfa7000000 X-Ms-Version: - "2019-02-02" status: 204 No Content diff --git a/sdk/tables/aztable/table_access_policy_test.go b/sdk/tables/aztable/table_access_policy_test.go index d5b9813725f1..f57f7a3e688d 100644 --- a/sdk/tables/aztable/table_access_policy_test.go +++ b/sdk/tables/aztable/table_access_policy_test.go @@ -7,7 +7,7 @@ import ( "strconv" "time" - "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) func (s *tableClientLiveTests) TestSetEmptyAccessPolicy() { @@ -15,12 +15,12 @@ func (s *tableClientLiveTests) TestSetEmptyAccessPolicy() { s.T().Skip("TableAccessPolicies are not available on Cosmos Accounts") } - assert := assert.New(s.T()) + require := require.New(s.T()) client, delete := s.init(true) defer delete() _, err := client.SetAccessPolicy(ctx, &TableSetAccessPolicyOptions{}) - assert.Nil(err, "Set access policy failed") + require.NoError(err) } func (s *tableClientLiveTests) TestSetAccessPolicy() { @@ -28,7 +28,7 @@ func (s *tableClientLiveTests) TestSetAccessPolicy() { s.T().Skip("TableAccessPolicies are not available on Cosmos Accounts") } - assert := assert.New(s.T()) + require := require.New(s.T()) // context := getTestContext(s.T().Name()) client, delete := s.init(true) defer delete() @@ -54,7 +54,7 @@ func (s *tableClientLiveTests) TestSetAccessPolicy() { } _, err := client.SetAccessPolicy(ctx, ¶m) - assert.Nil(err, "Set access policy failed") + require.NoError(err) } func (s *tableClientLiveTests) TestSetMultipleAccessPolicies() { @@ -62,7 +62,7 @@ func (s *tableClientLiveTests) TestSetMultipleAccessPolicies() { s.T().Skip("TableAccessPolicies are not available on Cosmos Accounts") } - assert := assert.New(s.T()) + require := require.New(s.T()) client, delete := s.init(true) defer delete() @@ -102,14 +102,12 @@ func (s *tableClientLiveTests) TestSetMultipleAccessPolicies() { } _, err := client.SetAccessPolicy(ctx, ¶m) - if err != nil { - assert.FailNow("Set access policy failed") - } + require.NoError(err) // Make a Get to assert two access policies resp, err := client.GetAccessPolicy(ctx) - assert.Nil(err, "Get Access Policy failed") - assert.Equal(len(resp.SignedIdentifiers), 3) + require.NoError(err) + require.Equal(len(resp.SignedIdentifiers), 3) } func (s *tableClientLiveTests) TestSetTooManyAccessPolicies() { @@ -117,7 +115,7 @@ func (s *tableClientLiveTests) TestSetTooManyAccessPolicies() { s.T().Skip("TableAccessPolicies are not available on Cosmos Accounts") } - assert := assert.New(s.T()) + require := require.New(s.T()) // context := getTestContext(s.T().Name()) client, delete := s.init(true) defer delete() @@ -146,8 +144,8 @@ func (s *tableClientLiveTests) TestSetTooManyAccessPolicies() { param := TableSetAccessPolicyOptions{TableACL: signedIdentifiers} _, err := client.SetAccessPolicy(ctx, ¶m) - assert.NotNil(err, "Set access policy succeeded but should have failed") - assert.Contains(err.Error(), tooManyAccessPoliciesError.Error()) + require.NotNil(err, "Set access policy succeeded but should have failed") + require.Contains(err.Error(), tooManyAccessPoliciesError.Error()) } func (s *tableClientLiveTests) TestSetNullAccessPolicy() { @@ -155,7 +153,7 @@ func (s *tableClientLiveTests) TestSetNullAccessPolicy() { s.T().Skip("TableAccessPolicies are not available on Cosmos Accounts") } - assert := assert.New(s.T()) + require := require.New(s.T()) client, delete := s.init(true) defer delete() @@ -171,11 +169,9 @@ func (s *tableClientLiveTests) TestSetNullAccessPolicy() { } _, err := client.SetAccessPolicy(ctx, ¶m) - if err != nil { - assert.FailNow("Set access policy failed") - } + require.NoError(err) resp, err := client.GetAccessPolicy(ctx) - assert.Nil(err, "Get Access Policy failed") - assert.Equal(len(resp.SignedIdentifiers), 1) + require.NoError(err) + require.Equal(len(resp.SignedIdentifiers), 1) } diff --git a/sdk/tables/aztable/table_batch_test.go b/sdk/tables/aztable/table_batch_test.go new file mode 100644 index 000000000000..65dd8226e8c8 --- /dev/null +++ b/sdk/tables/aztable/table_batch_test.go @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package aztable + +import ( + "encoding/json" + "net/http" + + "github.com/stretchr/testify/require" +) + +func (s *tableClientLiveTests) TestBatchAdd() { + require := require.New(s.T()) + context := getTestContext(s.T().Name()) + client, delete := s.init(true) + defer delete() + + entitiesToCreate := createComplexEntities(10, "partition") + batch := make([]TableTransactionAction, 10) + + for i, e := range *entitiesToCreate { + marshalled, err := json.Marshal(e) + require.NoError(err) + batch[i] = TableTransactionAction{ActionType: Add, Entity: marshalled} + } + + resp, err := client.submitTransactionInternal(ctx, &batch, context.recording.UUID(), context.recording.UUID(), nil) + require.NoError(err) + for i := 0; i < len(*resp.TransactionResponses); i++ { + r := (*resp.TransactionResponses)[i] + require.Equal(r.StatusCode, http.StatusNoContent) + } + + pager := client.Query(nil) + count := 0 + for pager.NextPage(ctx) { + response := pager.PageResponse() + count += len(response.TableEntityQueryResponse.Value) + } + + require.Equal(count, 10) +} + +func (s *tableClientLiveTests) TestBatchMixed() { + require := require.New(s.T()) + context := getTestContext(s.T().Name()) + client, delete := s.init(true) + defer delete() + + entitiesToCreate := createComplexEntities(5, "partition") + batch := make([]TableTransactionAction, 3) + + for i := range batch { + marshalled, err := json.Marshal((*entitiesToCreate)[i]) + require.Nil(err) + batch[i] = TableTransactionAction{ + ActionType: Add, + Entity: marshalled, + } + } + + resp, err := client.submitTransactionInternal(ctx, &batch, context.recording.UUID(), context.recording.UUID(), nil) + require.Nil(err) + for i := 0; i < len(*resp.TransactionResponses); i++ { + r := (*resp.TransactionResponses)[i] + require.Equal(http.StatusNoContent, r.StatusCode) + } + + var qResp TableEntityQueryByteResponseResponse + filter := "RowKey eq '1'" + query := &QueryOptions{Filter: &filter} + pager := client.Query(query) + for pager.NextPage(ctx) { + qResp = pager.PageResponse() + } + preMerge := qResp.TableEntityQueryResponse.Value[0] + var unMarshalledPreMerge map[string]interface{} + err = json.Unmarshal(preMerge, &unMarshalledPreMerge) + require.Nil(err) + + // create a new batch slice. + batch = make([]TableTransactionAction, 5) + + // create a merge action for the first added entity + mergeProp := "MergeProperty" + val := "foo" + var mergeEntity = map[string]interface{}{ + partitionKey: (*entitiesToCreate)[0].PartitionKey, + rowKey: (*entitiesToCreate)[0].RowKey, + mergeProp: val, + } + marshalledMergeEntity, err := json.Marshal(mergeEntity) + require.Nil(err) + batch[0] = TableTransactionAction{ActionType: UpdateMerge, Entity: marshalledMergeEntity, ETag: (*resp.TransactionResponses)[0].Header.Get(etag)} + + // create a delete action for the second added entity + marshalledSecondEntity, err := json.Marshal((*entitiesToCreate)[1]) + require.Nil(err) + batch[1] = TableTransactionAction{ActionType: Delete, Entity: marshalledSecondEntity} + + // create an upsert action to replace the third added entity with a new value + replaceProp := "ReplaceProperty" + var replaceProperties = map[string]interface{}{ + partitionKey: (*entitiesToCreate)[2].PartitionKey, + rowKey: (*entitiesToCreate)[2].RowKey, + replaceProp: val, + } + marshalledThirdEntity, err := json.Marshal(replaceProperties) + require.Nil(err) + batch[2] = TableTransactionAction{ActionType: UpsertReplace, Entity: marshalledThirdEntity} + + // Add the remaining 2 entities. + marshalled4thEntity, err := json.Marshal((*entitiesToCreate)[3]) + marshalled5thEntity, err := json.Marshal((*entitiesToCreate)[4]) + batch[3] = TableTransactionAction{ActionType: Add, Entity: marshalled4thEntity} + batch[4] = TableTransactionAction{ActionType: Add, Entity: marshalled5thEntity} + + resp, err = client.submitTransactionInternal(ctx, &batch, context.recording.UUID(), context.recording.UUID(), nil) + require.Nil(err) + + for i := 0; i < len(*resp.TransactionResponses); i++ { + r := (*resp.TransactionResponses)[i] + require.Equal(http.StatusNoContent, r.StatusCode) + + } + + pager = client.Query(query) + for pager.NextPage(ctx) { + qResp = pager.PageResponse() + } + postMerge := qResp.TableEntityQueryResponse.Value[0] + var unMarshaledPostMerge map[string]interface{} + err = json.Unmarshal(postMerge, &unMarshaledPostMerge) + require.Nil(err) + + // The merged entity has all its properties + the merged property + require.Equalf(len(unMarshalledPreMerge)+1, len(unMarshaledPostMerge), "postMerge should have one more property than preMerge") + require.Equalf(unMarshaledPostMerge[mergeProp], val, "%s property should equal %s", mergeProp, val) +} + +func (s *tableClientLiveTests) TestBatchError() { + require := require.New(s.T()) + context := getTestContext(s.T().Name()) + client, delete := s.init(true) + defer delete() + + entitiesToCreate := createComplexEntities(3, "partition") + + // Create the batch. + batch := make([]TableTransactionAction, 0, 3) + + // Sending an empty batch throws. + _, err := client.submitTransactionInternal(ctx, &batch, context.recording.UUID(), context.recording.UUID(), nil) + require.NotNil(err) + require.Equal(error_empty_transaction, err.Error()) + + // Add the last entity to the table prior to adding it as part of the batch to cause a batch failure. + marshalledFinalEntity, err := json.Marshal((*entitiesToCreate)[2]) + client.AddEntity(ctx, marshalledFinalEntity) + + // Add the entities to the batch + for i := 0; i < cap(batch); i++ { + marshalledEntity, err := json.Marshal((*entitiesToCreate)[i]) + require.Nil(err) + batch = append(batch, TableTransactionAction{ActionType: Add, Entity: marshalledEntity}) + } + + resp, err := client.submitTransactionInternal(ctx, &batch, context.recording.UUID(), context.recording.UUID(), nil) + require.NotNil(err) + transactionError, ok := err.(*TableTransactionError) + require.Truef(ok, "err should be of type TableTransactionError") + require.Equal("EntityAlreadyExists", transactionError.OdataError.Code) + require.Equal(2, transactionError.FailedEntityIndex) + require.Equal(http.StatusConflict, (*resp.TransactionResponses)[0].StatusCode) +} diff --git a/sdk/tables/aztable/table_client.go b/sdk/tables/aztable/table_client.go index 6a93eae67a83..6740cb0c8ce7 100644 --- a/sdk/tables/aztable/table_client.go +++ b/sdk/tables/aztable/table_client.go @@ -5,6 +5,7 @@ package aztable import ( "context" + "encoding/json" "errors" "github.com/Azure/azure-sdk-for-go/sdk/azcore" @@ -58,7 +59,7 @@ func (t *TableClient) Delete(ctx context.Context) (TableDeleteResponse, error) { // pager := client.Query(nil) // for pager.NextPage(ctx) { // resp = pager.PageResponse() -// fmt.sprintf("The page contains %i results", len(resp.TableEntityQueryResponse.Value)) +// fmt.Sprintf("The page contains %i results", len(resp.TableEntityQueryResponse.Value)) // } // err := pager.Err() func (t *TableClient) Query(queryOptions *QueryOptions) TableEntityQueryResponsePager { @@ -69,35 +70,42 @@ func (t *TableClient) Query(queryOptions *QueryOptions) TableEntityQueryResponse } // GetEntity retrieves a specific entity from the service using the specified partitionKey and rowKey values. -func (t *TableClient) GetEntity(ctx context.Context, partitionKey string, rowKey string) (MapOfInterfaceResponse, error) { - resp, err := t.client.QueryEntityWithPartitionAndRowKey(ctx, t.Name, partitionKey, rowKey, &TableQueryEntityWithPartitionAndRowKeyOptions{}, nil) +func (t *TableClient) GetEntity(ctx context.Context, partitionKey string, rowKey string, queryOptions *QueryOptions) (ByteArrayResponse, error) { + if queryOptions == nil { + queryOptions = &QueryOptions{} + } + resp, err := t.client.QueryEntityWithPartitionAndRowKey(ctx, t.Name, partitionKey, rowKey, &TableQueryEntityWithPartitionAndRowKeyOptions{}, queryOptions) if err != nil { - return resp, err + return ByteArrayResponse{}, err } - err = castAndRemoveAnnotations(&resp.Value) - return resp, err + return newByteArrayResponse(resp) } // AddEntity adds an entity from an arbitrary interface value to the table. -// An entity must have at least a PartitionKey and RowKey property. -func (t *TableClient) AddEntity(ctx context.Context, entity interface{}) (TableInsertEntityResponse, error) { - entmap, err := toMap(entity) +// An entity must be a byte slice ([]byte) that can be json.Marshalled into a map[string]interface{} +func (t *TableClient) AddEntity(ctx context.Context, entity []byte) (interface{}, error) { + var mapEntity map[string]interface{} + err := json.Unmarshal(entity, &mapEntity) if err != nil { - return TableInsertEntityResponse{}, azcore.NewResponseError(err, nil) + return entity, err } - resp, err := t.client.InsertEntity(ctx, t.Name, &TableInsertEntityOptions{TableEntityProperties: *entmap, ResponsePreference: ResponseFormatReturnNoContent.ToPtr()}, nil) + resp, err := t.client.InsertEntity(ctx, t.Name, &TableInsertEntityOptions{TableEntityProperties: mapEntity, ResponsePreference: ResponseFormatReturnNoContent.ToPtr()}, nil) if err == nil { insertResp := resp.(TableInsertEntityResponse) return insertResp, nil } else { - err = checkEntityForPkRk(entmap, err) + err = checkEntityForPkRk(&mapEntity, err) return TableInsertEntityResponse{}, err } } // DeleteEntity deletes the entity with the specified partitionKey and rowKey from the table. -func (t *TableClient) DeleteEntity(ctx context.Context, partitionKey string, rowKey string, etag string) (TableDeleteEntityResponse, error) { - return t.client.DeleteEntity(ctx, t.Name, partitionKey, rowKey, etag, nil, nil) +func (t *TableClient) DeleteEntity(ctx context.Context, partitionKey string, rowKey string, etag *string) (TableDeleteEntityResponse, error) { + if etag == nil { + nilEtag := "*" + etag = &nilEtag + } + return t.client.DeleteEntity(ctx, t.Name, partitionKey, rowKey, *etag, nil, &QueryOptions{}) } // UpdateEntity updates the specified table entity if it exists. @@ -105,18 +113,29 @@ func (t *TableClient) DeleteEntity(ctx context.Context, partitionKey string, row // If updateMode is Merge, the property values present in the specified entity will be merged with the existing entity. Properties not specified in the merge will be unaffected. // The specified etag value will be used for optimistic concurrency. If the etag does not match the value of the entity in the table, the operation will fail. // The response type will be TableEntityMergeResponse if updateMode is Merge and TableEntityUpdateResponse if updateMode is Replace. -func (t *TableClient) UpdateEntity(ctx context.Context, entity map[string]interface{}, etag *string, updateMode TableUpdateMode) (interface{}, error) { - pk := entity[partitionKey].(string) - rk := entity[rowKey].(string) +func (t *TableClient) UpdateEntity(ctx context.Context, entity []byte, etag *string, updateMode TableUpdateMode) (interface{}, error) { var ifMatch string = "*" if etag != nil { ifMatch = *etag } + + var mapEntity map[string]interface{} + err := json.Unmarshal(entity, &mapEntity) + if err != nil { + return entity, err + } + + pk, _ := mapEntity[partitionKey] + partKey := pk.(string) + + rk, _ := mapEntity[rowKey] + rowkey := rk.(string) + switch updateMode { case Merge: - return t.client.MergeEntity(ctx, t.Name, pk, rk, &TableMergeEntityOptions{IfMatch: &ifMatch, TableEntityProperties: entity}, nil) + return t.client.MergeEntity(ctx, t.Name, partKey, rowkey, &TableMergeEntityOptions{IfMatch: &ifMatch, TableEntityProperties: mapEntity}, &QueryOptions{}) case Replace: - return t.client.UpdateEntity(ctx, t.Name, pk, rk, &TableUpdateEntityOptions{IfMatch: &ifMatch, TableEntityProperties: entity}, nil) + return t.client.UpdateEntity(ctx, t.Name, partKey, rowkey, &TableUpdateEntityOptions{IfMatch: &ifMatch, TableEntityProperties: mapEntity}, &QueryOptions{}) } return nil, errors.New("Invalid TableUpdateMode") } @@ -124,15 +143,24 @@ func (t *TableClient) UpdateEntity(ctx context.Context, entity map[string]interf // UpsertEntity replaces the specified table entity if it exists or creates the entity if it does not exist. // If the entity exists and updateMode is Merge, the property values present in the specified entity will be merged with the existing entity rather than replaced. // The response type will be TableEntityMergeResponse if updateMode is Merge and TableEntityUpdateResponse if updateMode is Replace. -func (t *TableClient) UpsertEntity(ctx context.Context, entity map[string]interface{}, updateMode TableUpdateMode) (interface{}, error) { - pk := entity[partitionKey].(string) - rk := entity[rowKey].(string) +func (t *TableClient) UpsertEntity(ctx context.Context, entity []byte, updateMode TableUpdateMode) (interface{}, error) { + var mapEntity map[string]interface{} + err := json.Unmarshal(entity, &mapEntity) + if err != nil { + return entity, err + } + + pk, _ := mapEntity[partitionKey] + partKey := pk.(string) + + rk, _ := mapEntity[rowKey] + rowkey := rk.(string) switch updateMode { case Merge: - return t.client.MergeEntity(ctx, t.Name, pk, rk, &TableMergeEntityOptions{TableEntityProperties: entity}, nil) + return t.client.MergeEntity(ctx, t.Name, partKey, rowkey, &TableMergeEntityOptions{TableEntityProperties: mapEntity}, &QueryOptions{}) case Replace: - return t.client.UpdateEntity(ctx, t.Name, pk, rk, &TableUpdateEntityOptions{TableEntityProperties: entity}, nil) + return t.client.UpdateEntity(ctx, t.Name, partKey, rowkey, &TableUpdateEntityOptions{TableEntityProperties: mapEntity}, &QueryOptions{}) } return nil, errors.New("Invalid TableUpdateMode") } diff --git a/sdk/tables/aztable/table_client_responses.go b/sdk/tables/aztable/table_client_responses.go new file mode 100644 index 000000000000..c99e4e074f15 --- /dev/null +++ b/sdk/tables/aztable/table_client_responses.go @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package aztable + +import "time" + +type TableAddEntityResponse struct { + ClientRequestID string + RequestID string + Version string + Date time.Time + ETag string + XMSContinuationNextPartitionKey string + XMSContinuationNextRowKey string + PreferenceApplied string + ContentType string +} diff --git a/sdk/tables/aztable/table_client_test.go b/sdk/tables/aztable/table_client_test.go index 98b0cd8fa1ca..53f841ca5e42 100644 --- a/sdk/tables/aztable/table_client_test.go +++ b/sdk/tables/aztable/table_client_test.go @@ -5,17 +5,15 @@ package aztable import ( "bytes" + "encoding/json" "errors" "fmt" "io/ioutil" "net/http" "testing" - "time" "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/internal/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/internal/uuid" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" ) @@ -46,435 +44,271 @@ func (s *tableClientLiveTests) TestServiceErrors() { _, err := client.Create(ctx) var svcErr *runtime.ResponseError errors.As(err, &svcErr) - assert.Equal(s.T(), svcErr.RawResponse().StatusCode, http.StatusConflict) + require.Equal(s.T(), svcErr.RawResponse().StatusCode, http.StatusConflict) } func (s *tableClientLiveTests) TestCreateTable() { - assert := assert.New(s.T()) + require := require.New(s.T()) client, delete := s.init(false) defer delete() resp, err := client.Create(ctx) - assert.Nil(err) - assert.Equal(*resp.TableResponse.TableName, client.Name) + require.NoError(err) + require.Equal(*resp.TableResponse.TableName, client.Name) } func (s *tableClientLiveTests) TestAddEntity() { - assert := assert.New(s.T()) + require := require.New(s.T()) client, delete := s.init(true) defer delete() entitiesToCreate := createSimpleEntities(1, "partition") - _, err := client.AddEntity(ctx, (*entitiesToCreate)[0]) - assert.Nil(err) + marshalledEntity, err := json.Marshal((*entitiesToCreate)[0]) + require.NoError(err) + resp, err := client.AddEntity(ctx, marshalledEntity) + require.NoError(err) + require.NotNil(resp) } func (s *tableClientLiveTests) TestAddComplexEntity() { - assert := assert.New(s.T()) - context := getTestContext(s.T().Name()) + require := require.New(s.T()) + // context := getTestContext(s.T().Name()) client, delete := s.init(true) defer delete() - entitiesToCreate := createComplexEntities(context, 1, "partition") + entitiesToCreate := createComplexEntities(1, "partition") for _, e := range *entitiesToCreate { - _, err := client.AddEntity(ctx, e) + marshalledEntity, err := json.Marshal(e) + require.NoError(err) + _, err = client.AddEntity(ctx, marshalledEntity) var svcErr *runtime.ResponseError errors.As(err, &svcErr) - assert.Nilf(err, getStringFromBody(svcErr)) + require.Nilf(err, getStringFromBody(svcErr)) } } func (s *tableClientLiveTests) TestDeleteEntity() { - assert := assert.New(s.T()) + require := require.New(s.T()) client, delete := s.init(true) defer delete() - entitiesToCreate := createSimpleEntities(1, "partition") + simpleEntity := createSimpleEntity(1, "partition") - _, err := client.AddEntity(ctx, (*entitiesToCreate)[0]) - assert.Nil(err) - _, delErr := client.DeleteEntity(ctx, (*entitiesToCreate)[0][partitionKey].(string), (*entitiesToCreate)[0][rowKey].(string), "*") - assert.Nil(delErr) + marshalledEntity, err := json.Marshal(simpleEntity) + require.NoError(err) + _, err = client.AddEntity(ctx, marshalledEntity) + require.NoError(err) + _, delErr := client.DeleteEntity(ctx, simpleEntity.PartitionKey, simpleEntity.RowKey, nil) + require.Nil(delErr) } func (s *tableClientLiveTests) TestMergeEntity() { - assert := assert.New(s.T()) + require := require.New(s.T()) client, delete := s.init(true) defer delete() - entitiesToCreate := createSimpleEntities(1, "partition") + entityToCreate := createSimpleEntity(1, "partition") + marshalled := marshalBasicEntity(entityToCreate, require) - _, err := client.AddEntity(ctx, (*entitiesToCreate)[0]) - assert.Nil(err) + _, err := client.AddEntity(ctx, *marshalled) + require.NoError(err) - var qResp TableEntityQueryResponseResponse filter := "RowKey eq '1'" - pager := client.Query(&QueryOptions{Filter: &filter}) - for pager.NextPage(ctx) { - qResp = pager.PageResponse() - } - preMerge := qResp.TableEntityQueryResponse.Value[0] - - mergeProp := "MergeProperty" - val := "foo" - var mergeProperty = map[string]interface{}{ - partitionKey: (*entitiesToCreate)[0][partitionKey], - rowKey: (*entitiesToCreate)[0][rowKey], - mergeProp: val, - } + queryOptions := &QueryOptions{Filter: &filter} + + preMerge, err := client.GetEntity(ctx, entityToCreate.PartitionKey, entityToCreate.RowKey, nil) + require.NoError(err) + + var unMarshalledPreMerge map[string]interface{} + err = json.Unmarshal(preMerge.Value, &unMarshalledPreMerge) + require.NoError(err) - _, updateErr := client.UpdateEntity(ctx, mergeProperty, nil, Merge) - assert.Nil(updateErr) + var mapEntity map[string]interface{} + err = json.Unmarshal(*marshalled, &mapEntity) + require.NoError(err) + mapEntity["MergeProperty"] = "foo" - pager = client.Query(&QueryOptions{Filter: &filter}) + reMarshalled, err := json.Marshal(mapEntity) + require.NoError(err) + + _, updateErr := client.UpdateEntity(ctx, reMarshalled, nil, Merge) + require.Nil(updateErr) + + var qResp TableEntityQueryByteResponseResponse + pager := client.Query(queryOptions) for pager.NextPage(ctx) { qResp = pager.PageResponse() } postMerge := qResp.TableEntityQueryResponse.Value[0] + var unmarshalledPostMerge map[string]interface{} + err = json.Unmarshal(postMerge, &unmarshalledPostMerge) + require.NoError(err) + + require.Equal(unmarshalledPostMerge["PartitionKey"], unMarshalledPreMerge["PartitionKey"]) + require.Equal(unmarshalledPostMerge["MergeProperty"], "foo") - // The merged entity has all its properties + the merged property - assert.Equalf(len(preMerge)+1, len(postMerge), "postMerge should have one more property than preMerge") - assert.Equalf(postMerge[mergeProp], val, "%s property should equal %s", mergeProp, val) + _, ok := unMarshalledPreMerge["MergeProperty"] + require.False(ok) } func (s *tableClientLiveTests) TestUpsertEntity() { - assert := assert.New(s.T()) require := require.New(s.T()) client, delete := s.init(true) defer delete() - entitiesToCreate := createSimpleEntities(1, "partition") + // 1. Create Basic Entity + entityToCreate := createSimpleEntity(1, "partition") + marshalled := marshalBasicEntity(entityToCreate, require) - _, err := client.UpsertEntity(ctx, (*entitiesToCreate)[0], Replace) - require.Nil(err) + _, err := client.UpsertEntity(ctx, *marshalled, Replace) + require.NoError(err) - var qResp TableEntityQueryResponseResponse filter := "RowKey eq '1'" - pager := client.Query(&QueryOptions{Filter: &filter}) - for pager.NextPage(ctx) { - qResp = pager.PageResponse() - } - preMerge := qResp.TableEntityQueryResponse.Value[0] - - mergeProp := "MergeProperty" - val := "foo" - var mergeProperty = map[string]interface{}{ - partitionKey: (*entitiesToCreate)[0][partitionKey], - rowKey: (*entitiesToCreate)[0][rowKey], - mergeProp: val, - } + query := &QueryOptions{Filter: &filter} - _, updateErr := client.UpsertEntity(ctx, mergeProperty, Replace) - require.Nil(updateErr) + // 2. Query for basic Entity + preMerge, err := client.GetEntity(ctx, entityToCreate.PartitionKey, entityToCreate.RowKey, nil) + require.NoError(err) + + var unMarshalledPreMerge map[string]interface{} + err = json.Unmarshal(preMerge.Value, &unMarshalledPreMerge) + require.NoError(err) + + // 3. Create same entity without Bool property, add "MergeProperty" prop + mapEntity := createSimpleEntityNoBool(1, "partition") + mapEntity["MergeProperty"] = "foo" + + reMarshalled, err := json.Marshal(mapEntity) - pager = client.Query(&QueryOptions{Filter: &filter}) + // 4. Replace Entity with "bool"-less entity + _, err = client.UpsertEntity(ctx, reMarshalled, Replace) + require.Nil(err) + + // 5. Query for new entity + var qResp TableEntityQueryByteResponseResponse + pager := client.Query(query) for pager.NextPage(ctx) { qResp = pager.PageResponse() } postMerge := qResp.TableEntityQueryResponse.Value[0] + var unmarshalledPostMerge map[string]interface{} + err = json.Unmarshal(postMerge, &unmarshalledPostMerge) - // The merged entity has only the standard properties + the merged property - assert.Greater(len(preMerge), len(postMerge), "postMerge should have fewer properties than preMerge") - assert.Equalf(postMerge[mergeProp], val, "%s property should equal %s", mergeProp, val) -} - -func (s *tableClientLiveTests) TestGetEntity() { - assert := assert.New(s.T()) - require := require.New(s.T()) - client, delete := s.init(true) - defer delete() - - // Add 5 entities - entitiesToCreate := createSimpleEntities(1, "partition") - for _, e := range *entitiesToCreate { - _, err := client.AddEntity(ctx, e) - assert.Nil(err) - } + // 6. Make assertions + require.Less(len(unmarshalledPostMerge), len(unMarshalledPreMerge)) + require.Equal(unmarshalledPostMerge["MergeProperty"], "foo") - resp, err := client.GetEntity(ctx, "partition", "1") - require.Nil(err) - e := resp.Value - _, ok := e[partitionKey].(string) - assert.True(ok) - _, ok = e[rowKey].(string) - assert.True(ok) - _, ok = e[timestamp].(string) - assert.True(ok) - _, ok = e[etagOdata].(string) - assert.True(ok) - _, ok = e["StringProp"].(string) - assert.True(ok) - //TODO: fix when serialization is implemented - _, ok = e["IntProp"].(float64) - assert.True(ok) - _, ok = e["BoolProp"].(bool) - assert.True(ok) + _, ok := unmarshalledPostMerge["Bool"] + require.Falsef(ok, "Bool property should not be available in the merged entity") } func (s *tableClientLiveTests) TestQuerySimpleEntity() { - assert := assert.New(s.T()) + require := require.New(s.T()) client, delete := s.init(true) defer delete() // Add 5 entities entitiesToCreate := createSimpleEntities(5, "partition") for _, e := range *entitiesToCreate { - _, err := client.AddEntity(ctx, e) - assert.Nil(err) + marshalledEntity, err := json.Marshal(e) + require.NoError(err) + _, err = client.AddEntity(ctx, marshalledEntity) + require.NoError(err) } filter := "RowKey lt '5'" + query := &QueryOptions{Filter: &filter} expectedCount := 4 - var resp TableEntityQueryResponseResponse - var models []simpleEntity - pager := client.Query(&QueryOptions{Filter: &filter}) - for pager.NextPage(ctx) { - resp = pager.PageResponse() - models = make([]simpleEntity, len(resp.TableEntityQueryResponse.Value)) - err := resp.TableEntityQueryResponse.AsModels(&models) - assert.Nil(err) - assert.Equal(len(resp.TableEntityQueryResponse.Value), expectedCount) - } - resp = pager.PageResponse() - assert.Nil(pager.Err()) - for i, e := range resp.TableEntityQueryResponse.Value { - _, ok := e[partitionKey].(string) - assert.True(ok) - assert.Equal(e[partitionKey], models[i].PartitionKey) - _, ok = e[rowKey].(string) - assert.True(ok) - assert.Equal(e[rowKey], models[i].RowKey) - _, ok = e[timestamp].(string) - assert.True(ok) - _, ok = e[etagOdata].(string) - assert.True(ok) - assert.Equal(e[etagOdata], models[i].ETag) - _, ok = e["StringProp"].(string) - assert.True(ok) - //TODO: fix when serialization is implemented - _, ok = e["IntProp"].(float64) - assert.Equal(int(e["IntProp"].(float64)), models[i].IntProp) - assert.True(ok) - _, ok = e["BoolProp"].(bool) - assert.Equal((*entitiesToCreate)[i]["BoolProp"], e["BoolProp"]) - assert.Equal(e["BoolProp"], models[i].BoolProp) - assert.True(ok) - } -} - -func (s *tableClientLiveTests) TestQueryComplexEntity() { - assert := assert.New(s.T()) - context := getTestContext(s.T().Name()) - client, delete := s.init(true) - defer delete() - - // Add 5 entities - entitiesToCreate := createComplexMapEntities(context, 5, "partition") - for _, e := range *entitiesToCreate { - _, err := client.AddEntity(ctx, e) - assert.Nil(err) - } - filter := "RowKey lt '5'" - expectedCount := 4 - var resp TableEntityQueryResponseResponse - pager := client.Query(&QueryOptions{Filter: &filter}) + var resp TableEntityQueryByteResponseResponse + pager := client.Query(query) for pager.NextPage(ctx) { resp = pager.PageResponse() - assert.Equal(expectedCount, len(resp.TableEntityQueryResponse.Value)) - } - resp = pager.PageResponse() - assert.Nil(pager.Err()) - for _, e := range resp.TableEntityQueryResponse.Value { - _, ok := e[partitionKey].(string) - assert.True(ok) - _, ok = e[rowKey].(string) - assert.True(ok) - _, ok = e[timestamp].(string) - assert.True(ok) - _, ok = e[etagOdata].(string) - assert.True(ok) - _, ok = e["StringProp"].(string) - assert.True(ok) - //TODO: fix when serialization is implemented - _, ok = e["IntProp"].(float64) - assert.True(ok) - _, ok = e["BoolProp"].(bool) - assert.True(ok) - _, ok = e["SomeBinaryProperty"].([]byte) - assert.True(ok) - _, ok = e["SomeDateProperty"].(time.Time) - assert.True(ok) - _, ok = e["SomeDoubleProperty0"].(float64) - assert.True(ok) - _, ok = e["SomeDoubleProperty1"].(float64) - assert.True(ok) - _, ok = e["SomeGuidProperty"].(uuid.UUID) - assert.True(ok) - _, ok = e["SomeInt64Property"].(int64) - assert.True(ok) - //TODO: fix when serialization is implemented - _, ok = e["SomeIntProperty"].(float64) - assert.True(ok) - _, ok = e["SomeStringProperty"].(string) - assert.True(ok) + require.Equal(len(resp.TableEntityQueryResponse.Value), expectedCount) } -} -func (s *tableClientLiveTests) TestBatchAdd() { - assert := assert.New(s.T()) - context := getTestContext(s.T().Name()) - client, delete := s.init(true) - defer delete() + for i, e := range resp.TableEntityQueryResponse.Value { + var mapModel map[string]interface{} + err := json.Unmarshal(e, &mapModel) + require.NoError(err) - entitiesToCreate := createComplexMapEntities(context, 10, "partition") - batch := make([]TableTransactionAction, 10) + _, ok := mapModel[timestamp] + require.True(ok) - for i, e := range *entitiesToCreate { - batch[i] = TableTransactionAction{ActionType: Add, Entity: e} - } + _, ok = mapModel[etagOdata] + require.True(ok) + + var b basicTestEntity + err = json.Unmarshal(e, &b) + require.NoError(err) - resp, err := client.submitTransactionInternal(ctx, &batch, context.recording.UUID(), context.recording.UUID(), nil) - assert.Nil(err) - for i := 0; i < len(*resp.TransactionResponses); i++ { - r := (*resp.TransactionResponses)[i] - assert.Equal(r.StatusCode, http.StatusNoContent) + require.Equal(b.PartitionKey, "partition") + require.Equal(b.RowKey, fmt.Sprint(i+1)) + require.Equal(b.String, (*entitiesToCreate)[i].String) + require.Equal(b.Integer, (*entitiesToCreate)[i].Integer) + require.Equal(b.Bool, (*entitiesToCreate)[i].Bool) } } -func (s *tableClientLiveTests) TestBatchMixed() { - assert := assert.New(s.T()) +func (s *tableClientLiveTests) TestQueryComplexEntity() { require := require.New(s.T()) - context := getTestContext(s.T().Name()) client, delete := s.init(true) defer delete() - entitiesToCreate := createComplexMapEntities(context, 5, "partition") - batch := make([]TableTransactionAction, 3) - - // Add the first 3 entities. - for i := range batch { - batch[i] = TableTransactionAction{ActionType: Add, Entity: (*entitiesToCreate)[i]} - } - - resp, err := client.submitTransactionInternal(ctx, &batch, context.recording.UUID(), context.recording.UUID(), nil) - require.Nil(err) - for i := 0; i < len(*resp.TransactionResponses); i++ { - r := (*resp.TransactionResponses)[i] - assert.Equal(http.StatusNoContent, r.StatusCode) - } - - var qResp TableEntityQueryResponseResponse - filter := "RowKey eq '1'" - pager := client.Query(&QueryOptions{Filter: &filter}) - for pager.NextPage(ctx) { - qResp = pager.PageResponse() - } - preMerge := qResp.TableEntityQueryResponse.Value[0] - - // create a new batch slice. - batch = make([]TableTransactionAction, 5) - - // create a merge action for the first added entity - mergeProp := "MergeProperty" - val := "foo" - var mergeProperty = map[string]interface{}{ - partitionKey: (*entitiesToCreate)[0][partitionKey], - rowKey: (*entitiesToCreate)[0][rowKey], - mergeProp: val, - } - batch[0] = TableTransactionAction{ActionType: UpdateMerge, Entity: mergeProperty, ETag: (*resp.TransactionResponses)[0].Header.Get(etag)} - - // create a delete action for the second added entity - batch[1] = TableTransactionAction{ActionType: Delete, Entity: (*entitiesToCreate)[1]} - - // create an upsert action to replace the third added entity with a new value - replaceProp := "ReplaceProperty" - var replaceProperties = map[string]interface{}{ - partitionKey: (*entitiesToCreate)[2][partitionKey], - rowKey: (*entitiesToCreate)[2][rowKey], - replaceProp: val, + // Add 5 entities + entitiesToCreate := createComplexEntities(5, "partition") + for _, e := range *entitiesToCreate { + marshalledEntity, err := json.Marshal(e) + require.NoError(err) + _, err = client.AddEntity(ctx, marshalledEntity) + require.NoError(err) } - batch[2] = TableTransactionAction{ActionType: UpsertReplace, Entity: replaceProperties} - // Add the remaining 2 entities. - batch[3] = TableTransactionAction{ActionType: Add, Entity: (*entitiesToCreate)[3]} - batch[4] = TableTransactionAction{ActionType: Add, Entity: (*entitiesToCreate)[4]} - - //batch = batch[1:] - - resp, err = client.submitTransactionInternal(ctx, &batch, context.recording.UUID(), context.recording.UUID(), nil) - require.Nil(err) - - for i := 0; i < len(*resp.TransactionResponses); i++ { - r := (*resp.TransactionResponses)[i] - assert.Equal(http.StatusNoContent, r.StatusCode) - - } + filter := "RowKey lt '5'" + expectedCount := 4 + query := &QueryOptions{Filter: &filter} - pager = client.Query(&QueryOptions{Filter: &filter}) + var resp TableEntityQueryByteResponseResponse + pager := client.Query(query) for pager.NextPage(ctx) { - qResp = pager.PageResponse() - } - postMerge := qResp.TableEntityQueryResponse.Value[0] - - // The merged entity has all its properties + the merged property - assert.Equalf(len(preMerge)+1, len(postMerge), "postMerge should have one more property than preMerge") - assert.Equalf(postMerge[mergeProp], val, "%s property should equal %s", mergeProp, val) -} - -func (s *tableClientLiveTests) TestBatchError() { - assert := assert.New(s.T()) - require := require.New(s.T()) - context := getTestContext(s.T().Name()) - client, delete := s.init(true) - defer delete() - - entitiesToCreate := createComplexMapEntities(context, 3, "partition") - - // Create the batch. - batch := make([]TableTransactionAction, 0, 3) - - // Sending an empty batch throws. - _, err := client.submitTransactionInternal(ctx, &batch, context.recording.UUID(), context.recording.UUID(), nil) - assert.NotNil(err) - assert.Equal(error_empty_transaction, err.Error()) - - // Add the last entity to the table prior to adding it as part of the batch to cause a batch failure. - _, err = client.AddEntity(ctx, (*entitiesToCreate)[2]) - assert.Nil(err) - - // Add the entities to the batch - for i := 0; i < cap(batch); i++ { - batch = append(batch, TableTransactionAction{ActionType: Add, Entity: (*entitiesToCreate)[i]}) + resp = pager.PageResponse() + require.Equal(expectedCount, len(resp.TableEntityQueryResponse.Value)) + + for idx, entity := range resp.TableEntityQueryResponse.Value { + model := complexTestEntity{} + err := json.Unmarshal(entity, &model) + require.NoError(err) + + require.Equal(model.PartitionKey, "partition") + require.Equal(model.RowKey, (*entitiesToCreate)[idx].RowKey) + require.Equal(model.Integer, (*entitiesToCreate)[idx].Integer) + require.Equal(model.String, (*entitiesToCreate)[idx].String) + require.Equal(model.Bool, (*entitiesToCreate)[idx].Bool) + require.Equal(model.Float, (*entitiesToCreate)[idx].Float) + require.Equal(model.DateTime, (*entitiesToCreate)[idx].DateTime) + require.Equal(model.Byte, (*entitiesToCreate)[idx].Byte) + } } - - resp, err := client.submitTransactionInternal(ctx, &batch, context.recording.UUID(), context.recording.UUID(), nil) - assert.NotNil(err) - te, ok := err.(*TableTransactionError) - require.Truef(ok, "err should be of type TableTransactionError") - assert.Equal("EntityAlreadyExists", te.OdataError.Code) - assert.Equal(2, te.FailedEntityIndex) - assert.Equal(http.StatusConflict, (*resp.TransactionResponses)[0].StatusCode) } func (s *tableClientLiveTests) TestInvalidEntity() { - assert := assert.New(s.T()) + require := require.New(s.T()) client, delete := s.init(true) defer delete() - badEntity := &map[string]interface{}{ + badEntity := map[string]interface{}{ "Value": 10, "String": "stringystring", } - _, err := client.AddEntity(ctx, *badEntity) + badEntityMarshalled, err := json.Marshal(badEntity) + _, err = client.AddEntity(ctx, badEntityMarshalled) - assert.NotNil(err) - assert.Contains(err.Error(), partitionKeyRowKeyError.Error()) + require.NotNil(err) + require.Contains(err.Error(), partitionKeyRowKeyError.Error()) } // setup the test environment @@ -487,17 +321,18 @@ func (s *tableClientLiveTests) AfterTest(suite string, test string) { recordedTestTeardown(s.T().Name()) } -func (s *tableClientLiveTests) init(doCreate bool) (*TableClient, func()) { - assert := assert.New(s.T()) +func (s *tableClientLiveTests) init(createTable bool) (*TableClient, func()) { + require := require.New(s.T()) context := getTestContext(s.T().Name()) tableName, _ := getTableName(context) client := context.client.NewTableClient(tableName) - if doCreate { + if createTable { _, err := client.Create(ctx) + // fmt.Println("CREATE ERROR: ", err.Error()) if err != nil { var svcErr *runtime.ResponseError errors.As(err, &svcErr) - assert.FailNow(getStringFromBody(svcErr)) + require.FailNow(getStringFromBody(svcErr)) } } return client, func() { diff --git a/sdk/tables/aztable/table_pagers.go b/sdk/tables/aztable/table_pagers.go index 1f275ca15f21..5e4dce565c0b 100644 --- a/sdk/tables/aztable/table_pagers.go +++ b/sdk/tables/aztable/table_pagers.go @@ -36,12 +36,12 @@ type TableEntityQueryResponsePager interface { azcore.Pager // PageResponse returns the current TableQueryResponseResponse. - PageResponse() TableEntityQueryResponseResponse + PageResponse() TableEntityQueryByteResponseResponse } type tableEntityQueryResponsePager struct { tableClient *TableClient - current *TableEntityQueryResponseResponse + current *TableEntityQueryByteResponseResponse tableQueryOptions *TableQueryEntitiesOptions queryOptions *QueryOptions err error @@ -56,10 +56,13 @@ func (p *tableEntityQueryResponsePager) NextPage(ctx context.Context) bool { } var resp TableEntityQueryResponseResponse resp, p.err = p.tableClient.client.QueryEntities(ctx, p.tableClient.Name, p.tableQueryOptions, p.queryOptions) - if p.err == nil { - castAndRemoveAnnotationsSlice(&resp.TableEntityQueryResponse.Value) + + c, err := castToByteResponse(&resp) + if err != nil { + p.err = nil } - p.current = &resp + + p.current = &c p.tableQueryOptions.NextPartitionKey = resp.XMSContinuationNextPartitionKey p.tableQueryOptions.NextRowKey = resp.XMSContinuationNextRowKey return p.err == nil && resp.TableEntityQueryResponse != nil && len(resp.TableEntityQueryResponse.Value) > 0 @@ -73,7 +76,7 @@ func (p *tableEntityQueryResponsePager) NextPage(ctx context.Context) bool { // fmt.sprintf("The page contains %i results", len(resp.TableEntityQueryResponse.Value)) // } // err := pager.Err() -func (p *tableEntityQueryResponsePager) PageResponse() TableEntityQueryResponseResponse { +func (p *tableEntityQueryResponsePager) PageResponse() TableEntityQueryByteResponseResponse { return *p.current } @@ -104,38 +107,6 @@ type TableQueryResponsePager interface { PageResponse() TableQueryResponseResponse } -// AsModels converts each map[string]interface{} entity result into a strongly slice of strongly typed models -// The modelSlice parameter should be a pointer to a slice of struct types that match the entity model type in the table response. -func (r *TableEntityQueryResponse) AsModels(modelSlice interface{}) error { - models := reflect.ValueOf(modelSlice).Elem() - tt := getTypeArray(models.Interface()) - fmap := getTypeValueMap(tt) - for i, e := range r.Value { - err := fromMap(tt, fmap, &e, models.Index(i)) - if err != nil { - return nil - } - } - - return nil -} - -// EntityMapAsModel converts a table entity in the form of map[string]interface{} and converts it to a strongly typed model. -// -// Example: -// mapEntity, err := client.GetEntity("somePartition", "someRow") -// myEntityModel := MyModel{} -// err = EntityMapAsModel(mapEntity, &myEntityModel) -func EntityMapAsModel(entityMap map[string]interface{}, model interface{}) error { - tt := getTypeArray(model) - fmap := getTypeValueMap(tt) - err := fromMap(reflect.TypeOf(model).Elem(), fmap, &entityMap, reflect.ValueOf(model).Elem()) - if err != nil { - return nil - } - return err -} - type tableQueryResponsePager struct { client *tableClient current *TableQueryResponseResponse @@ -174,53 +145,6 @@ func (p *tableQueryResponsePager) Err() error { return p.err } -func castAndRemoveAnnotationsSlice(entities *[]map[string]interface{}) { - for _, e := range *entities { - castAndRemoveAnnotations(&e) //nolint:errcheck - } -} - -// TODO: The default behavior of json.Unmarshal is to deserialize all json numbers as Float64. -// This can be a problem for table entities which store float and int differently -func castAndRemoveAnnotations(entity *map[string]interface{}) error { - //value := (*entity)["value"].([]interface{})[0].(map[string]interface{}) - value := *entity - for k, v := range value { - - iSuffix := strings.Index(k, OdataType) - if iSuffix > 0 { - // Get the name of the property that this odataType key describes. - valueKey := k[0:iSuffix] - // get the string value of the value at the valueKey - valAsString := value[valueKey].(string) - - switch v { - case edmBinary: - value[valueKey] = []byte(valAsString) - case edmDateTime: - t, err := time.Parse(ISO8601, valAsString) - if err != nil { - return err - } - value[valueKey] = t - case edmGuid: - value[valueKey] = uuid.Parse(valAsString) - case edmInt64: - i, err := strconv.ParseInt(valAsString, 10, 64) - if err != nil { - return err - } - value[valueKey] = i - default: - return fmt.Errorf("unsupported annotation found: %s", k) - } - // remove the annotation key - delete(value, k) - } - } - return nil -} - func toOdataAnnotatedDictionary(entity *map[string]interface{}) error { entMap := *entity for k, v := range entMap { @@ -270,163 +194,17 @@ func toOdataAnnotatedDictionary(entity *map[string]interface{}) error { return nil } -func toMap(ent interface{}) (*map[string]interface{}, error) { - // If we were provided a map already, send that back. - if reflect.ValueOf(ent).Kind() == reflect.Map { - entMap := ent.(map[string]interface{}) - err := toOdataAnnotatedDictionary(&entMap) - if err != nil { - return nil, err - } - return &entMap, nil - } - s := reflect.ValueOf(&ent).Elem().Elem() - typeOfT := s.Type() - nf := s.NumField() - entMap := make(map[string]interface{}, nf) - - for i := 0; i < nf; i++ { - v := s.Field(i) - Switch: - f := typeOfT.Field(i) - name := f.Name - if name == etag || name == timestamp { - // we do not need to serialize ETag or TimeStamp - continue - } - // add odata annotations for the types that require it. - switch k := v.Type().Kind(); k { - case reflect.Array, reflect.Slice: - if getTypeArray(v.Interface()) != reflect.TypeOf(byte(0)) { - return nil, errors.New("arrays and slices must be of type byte") - } - // check if this is a uuid field as decorated by a tag - if _, ok := f.Tag.Lookup("uuid"); ok { - entMap[odataType(name)] = edmGuid - u := v.Interface().([16]byte) - var uu uuid.UUID = u - entMap[name] = uu.String() - continue - } else { - entMap[odataType(name)] = edmBinary - b := v.Interface().([]byte) - entMap[name] = base64.StdEncoding.EncodeToString(b) - continue - } - case reflect.Struct: - switch tn := v.Type().String(); tn { - case "time.Time": - entMap[odataType(name)] = edmDateTime - time := v.Interface().(time.Time) - entMap[name] = time.UTC().Format(ISO8601) - continue - default: - return nil, fmt.Errorf("Invalid struct for entity field '%s' of type '%s'", typeOfT.Field(i).Name, tn) - } - case reflect.Float32, reflect.Float64: - entMap[odataType(name)] = edmDouble - case reflect.Int64: - entMap[odataType(name)] = edmInt64 - i64 := v.Interface().(int64) - entMap[name] = strconv.FormatInt(i64, 10) - continue - case reflect.Ptr: - if v.IsNil() { - // if the pointer is nil, ignore it. - continue - } - // follow the pointer to the type and re-run the switch - v = v.Elem() - goto Switch - - // typeOfT.Field(i).Name, f.Type(), f.Interface()) - } - entMap[name] = v.Interface() - } - return &entMap, nil -} - -// fromMap converts an entity map to a strongly typed model interface -// tt is the type of the model -// fmap is the result of getTypeValueMap for the model type -// src is the source map value -// srcVal is the the Value of the source map value -func fromMap(tt reflect.Type, fmap *map[string]int, src *map[string]interface{}, srcVal reflect.Value) error { - for k, v := range *src { - // skip if this is an OData type descriptor - iSuffix := strings.Index(k, OdataType) - if iSuffix > 0 { - continue - } - // fetch the Field index by property name from the field map - fIndex := (*fmap)[k] - // Get the Value for the Field - val := srcVal.Field(fIndex) - Switch: - switch val.Kind() { - case reflect.String: - val.SetString(v.(string)) - case reflect.Bool: - val.SetBool(v.(bool)) - case reflect.Float64: - val.SetFloat(v.(float64)) - case reflect.Int: - val.SetInt(int64(v.(float64))) - case reflect.Int64: - i64, err := strconv.ParseInt(v.(string), 10, 64) - if err != nil { - return err - } - val.SetInt(i64) - case reflect.Struct: - switch tn := val.Type().String(); tn { - case "time.Time": - t, err := time.Parse(ISO8601, v.(string)) - if err != nil { - return err - } - val.Set(reflect.ValueOf(t)) - } - case reflect.Ptr: - if val.IsNil() { - // populate the nil pointer with it's element type and re-run the type evaluation - val.Set(reflect.New(val.Type().Elem())) - val = val.Elem() - goto Switch +func flattenEntity(entity reflect.Value, entityMap *map[string]interface{}) { + for i := 0; i < entity.NumField(); i++ { + if !entity.Field(i).IsZero() { + fieldName := entity.Type().Field(i).Name + if fieldName == "PartitionKey" { + (*entityMap)["PartitionKey"] = entity.Field(i).String() + } else if fieldName == "RowKey" { + (*entityMap)["RowKey"] = entity.Field(i).String() } - case reflect.Array, reflect.Map, reflect.Slice: - if getTypeArray(val.Interface()) != reflect.TypeOf(byte(0)) { - return errors.New("arrays and slices must be of type byte") - } - // // check if this is a uuid field as decorated by a tag - if _, ok := tt.Field(fIndex).Tag.Lookup("uuid"); ok { - u := uuid.Parse(v.(string)) - val.Set(reflect.ValueOf(u)) - } else { - b, err := base64.StdEncoding.DecodeString(v.(string)) - if err != nil { - return err - } - val.SetBytes(b) - } - } - } - return nil -} - -// getTypeValueMap - builds a map of Field names to their Field index for the given interface{} -func getTypeValueMap(tt reflect.Type) *map[string]int { - nf := tt.NumField() - fmap := make(map[string]int) - // build a map of field types - for i := 0; i < nf; i++ { - f := tt.Field(i) - fmap[f.Name] = i - if f.Name == etag { - fmap[etagOdata] = i } } - return &fmap } func odataType(n string) string { diff --git a/sdk/tables/aztable/table_pagers_test.go b/sdk/tables/aztable/table_pagers_test.go index 7bb923567b83..ef4f540e031b 100644 --- a/sdk/tables/aztable/table_pagers_test.go +++ b/sdk/tables/aztable/table_pagers_test.go @@ -4,249 +4,13 @@ package aztable import ( - "encoding/base64" - "encoding/json" - "fmt" "io" "io/ioutil" "math" - "net/http" "strconv" "strings" - "testing" - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/internal/uuid" - "github.com/stretchr/testify/assert" ) -func TestCastAndRemoveAnnotations(t *testing.T) { - assert := assert.New(t) - - r := &http.Response{Body: closerFromString(complexPayload)} - resp := azcore.Response{Response: r} - - var val map[string]interface{} - err := resp.UnmarshalAsJSON(&val) - assert.Nil(err) - err = castAndRemoveAnnotations(&val) - assert.Nil(err) - // assert all odata annotations are removed. - for k := range val { - assert.NotContains(k, OdataType) - } - - assert.IsType(time.Now(), val["SomeDateProperty"]) - assert.IsType([]byte{}, val["SomeBinaryProperty"]) - assert.IsType(float64(0), val["SomeDoubleProperty0"]) - // TODO: fix this - // assert.IsType(int(0), (*entity)["SomeIntProperty"]) -} - -func TestToOdataAnnotatedDictionary(t *testing.T) { - assert := assert.New(t) - - var val = createComplexEntityMap() - err := toOdataAnnotatedDictionary(&val) - assert.Nil(err) - // assert all odata annotations are removed. - for k := range odataHintProps { - _, ok := val[k] - assert.Truef(ok, fmt.Sprintf("map does not contain %s", k)) - iSuffix := strings.Index(k, OdataType) - if iSuffix > 0 { - // Get the name of the property that this odataType key describes. - valueKey := k[0:iSuffix] - if !strings.Contains(valueKey, "SomeDoubleProperty") { - assert.IsTypef("", val[valueKey], fmt.Sprintf("should be type string %s", valueKey)) - } - } - _, ok = val[odataType(k)] - assert.Truef(ok, fmt.Sprintf("map does not contain %s", odataType(k))) - } -} - -func BenchmarkUnMarshal_AsJson_CastAndRemove_Map(b *testing.B) { - assert := assert.New(b) - b.ReportAllocs() - bt := []byte(complexPayload) - for i := 0; i < b.N; i++ { - var val = make(map[string]interface{}) - err := json.Unmarshal(bt, &val) - assert.Nil(err) - err = castAndRemoveAnnotations(&val) - assert.Nil(err) - assert.Equal("somePartition", val["PartitionKey"]) - } -} - -func BenchmarkUnMarshal_FromMap_Entity(b *testing.B) { - assert := assert.New(b) - - bt := []byte(complexPayload) - for i := 0; i < b.N; i++ { - var val = make(map[string]interface{}) - err := json.Unmarshal(bt, &val) - if err != nil { - panic(err) - } - result := complexEntity{} - err = EntityMapAsModel(val, &result) - assert.Nil(err) - assert.Equal("somePartition", result.PartitionKey) - } -} - -func check(e error) { - if e != nil { - panic(e) - } -} - -func BenchmarkMarshal_Entity_ToMap_ToOdataDict_Map(b *testing.B) { - ent := createComplexEntity() - for i := 0; i < b.N; i++ { - m, _ := toMap(ent) - err := toOdataAnnotatedDictionary(m) - check(err) - _, err = json.Marshal(m) - check(err) - } -} - -func BenchmarkMarshal_Map_ToOdataDict_Map(b *testing.B) { - ent := createComplexEntityMap() - for i := 0; i < b.N; i++ { - err := toOdataAnnotatedDictionary(&ent) - check(err) - _, err = json.Marshal(ent) - check(err) - } -} - -func TestToMap(t *testing.T) { - assert := assert.New(t) - - ent := createComplexEntity() - - entMap, err := toMap(ent) - assert.Nil(err) - - // Validate that we have all the @odata.type properties for types []byte, int64, float64, time.Time, and uuid - for k, v := range odataHintProps { - vv, ok := (*entMap)[odataType(k)] - assert.Truef(ok, "Should have found map key of name '%s'", odataType(k)) - assert.Equal(v, vv) - } - - // validate all the types were properly casted / converted - assert.Equal(ent.PartitionKey, (*entMap)["PartitionKey"]) - assert.Equal(ent.RowKey, (*entMap)["RowKey"]) - assert.Equal(base64.StdEncoding.EncodeToString(ent.SomeBinaryProperty), string((*entMap)["SomeBinaryProperty"].(string))) - ts, _ := time.Parse(ISO8601, (*entMap)["SomeDateProperty"].(string)) - assert.Equal(ent.SomeDateProperty.UTC().Format(ISO8601), ts.Format(ISO8601)) - assert.Equal(ent.SomeDoubleProperty0, (*entMap)["SomeDoubleProperty0"]) - assert.Equal(ent.SomeDoubleProperty1, (*entMap)["SomeDoubleProperty1"]) - var u uuid.UUID = ent.SomeGuidProperty - assert.Equal(u.String(), (*entMap)["SomeGuidProperty"].(string)) - assert.Equal(strconv.FormatInt(ent.SomeInt64Property, 10), (*entMap)["SomeInt64Property"].(string)) - assert.Equal(ent.SomeIntProperty, (*entMap)["SomeIntProperty"]) - assert.Equal(ent.SomeStringProperty, (*entMap)["SomeStringProperty"]) - assert.Equal(*ent.SomePtrStringProperty, (*entMap)["SomePtrStringProperty"]) -} - -func TestToMapWithMap(t *testing.T) { - assert := assert.New(t) - - ent := createComplexEntityMap() - - entMap, err := toMap(ent) - assert.Nil(err) - - // Validate that we have all the @odata.type properties for types []byte, int64, float64, time.Time, and uuid - for k, v := range odataHintProps { - vv, ok := (*entMap)[odataType(k)] - assert.Truef(ok, "Should have found map key of name '%s'", odataType(k)) - assert.Equal(v, vv) - } - - assert.Equal(&ent, entMap) -} - -func TestEntitySerialization(t *testing.T) { - assert := assert.New(t) - - ent := createComplexEntity() - - b, err := json.Marshal(ent) - assert.Nil(err) - assert.NotEmpty(b) - s := string(b) - //assert.FailNow(s) - assert.NotEmpty(s) -} - -func TestDeserializeFromMap(t *testing.T) { - assert := assert.New(t) - - expected := createComplexEntity() - bt := []byte(complexPayload) - var val = make(map[string]interface{}) - err := json.Unmarshal(bt, &val) - assert.Nil(err) - result := complexEntity{} - // tt := reflect.TypeOf(complexEntity{}) - // err := fromMap(tt, getTypeValueMap(tt), &val, reflect.ValueOf(&result).Elem()) - err = EntityMapAsModel(val, &result) - assert.Nil(err) - assert.EqualValues(expected, result) -} - -func createComplexEntity() complexEntity { - sp := "some pointer to string" - t, _ := time.Parse(ISO8601, "2021-03-23T18:29:15.9686039Z") - t2, _ := time.Parse(ISO8601, "2020-01-01T01:02:00Z") - b, _ := base64.StdEncoding.DecodeString("AQIDBAU=") - var e = complexEntity{ - PartitionKey: "somePartition", - ETag: "W/\"datetime'2021-04-05T05%3A02%3A40.7371784Z'\"", - RowKey: "01", - Timestamp: t, - SomeBinaryProperty: b, - SomeDateProperty: t2, - SomeDoubleProperty0: float64(1.0), - SomeDoubleProperty1: float64(1.5), - SomeGuidProperty: uuid.Parse("0d391d16-97f1-4b9a-be68-4cc871f90001"), - SomeInt64Property: int64(math.MaxInt64), - SomeIntProperty: 42, - SomeStringProperty: "This is table entity number 01", - SomePtrStringProperty: &sp} - return e -} - -func createComplexEntityMap() map[string]interface{} { - sp := "some pointer to string" - t, _ := time.Parse(ISO8601, "2021-03-23T18:29:15.9686039Z") - t2, _ := time.Parse(ISO8601, "2020-01-01T01:02:00Z") - b, _ := base64.StdEncoding.DecodeString("AQIDBAU=") - var e = map[string]interface{}{ - "PartitionKey": "somePartition", - "ETag": "W/\"datetime'2021-04-05T05%3A02%3A40.7371784Z'\"", - "RowKey": "01", - "Timestamp": t, - "SomeBinaryProperty": b, - "SomeDateProperty": t2, - "SomeDoubleProperty0": float64(1.0), - "SomeDoubleProperty1": float64(1.5), - "SomeGuidProperty": uuid.Parse("0d391d16-97f1-4b9a-be68-4cc871f90001"), - "SomeInt64Property": int64(math.MaxInt64), - "SomeIntProperty": 42, - "SomeStringProperty": "This is table entity number 01", - "SomePtrStringProperty": &sp} - return e -} - func closerFromString(content string) io.ReadCloser { return ioutil.NopCloser(strings.NewReader(content)) } diff --git a/sdk/tables/aztable/table_service_client_test.go b/sdk/tables/aztable/table_service_client_test.go index 33dcef2a3da0..c66839660353 100644 --- a/sdk/tables/aztable/table_service_client_test.go +++ b/sdk/tables/aztable/table_service_client_test.go @@ -13,7 +13,6 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/internal/runtime" "github.com/Azure/azure-sdk-for-go/sdk/to" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" ) @@ -37,10 +36,10 @@ func TestServiceClient_Cosmos(t *testing.T) { } func (s *tableServiceClientLiveTests) TestServiceErrors() { - assert := assert.New(s.T()) + require := require.New(s.T()) context := getTestContext(s.T().Name()) tableName, err := getTableName(context) - failIfNotNil(assert, err) + require.NoError(err) _, err = context.client.Create(ctx, tableName) delete := func() { @@ -50,20 +49,20 @@ func (s *tableServiceClientLiveTests) TestServiceErrors() { } } defer delete() - failIfNotNil(assert, err) + require.NoError(err) // Create a duplicate table to produce an error _, err = context.client.Create(ctx, tableName) var svcErr *runtime.ResponseError errors.As(err, &svcErr) - assert.Equal(svcErr.RawResponse().StatusCode, http.StatusConflict) + require.Equal(svcErr.RawResponse().StatusCode, http.StatusConflict) } func (s *tableServiceClientLiveTests) TestCreateTable() { - assert := assert.New(s.T()) + require := require.New(s.T()) context := getTestContext(s.T().Name()) tableName, err := getTableName(context) - failIfNotNil(assert, err) + require.NoError(err) resp, err := context.client.Create(ctx, tableName) delete := func() { @@ -74,12 +73,12 @@ func (s *tableServiceClientLiveTests) TestCreateTable() { } defer delete() - failIfNotNil(assert, err) - assert.Equal(*resp.TableResponse.TableName, tableName) + require.NoError(err) + require.Equal(*resp.TableResponse.TableName, tableName) } func (s *tableServiceClientLiveTests) TestQueryTable() { - assert := assert.New(s.T()) + require := require.New(s.T()) context := getTestContext(s.T().Name()) tableCount := 5 tableNames := make([]string, tableCount) @@ -97,7 +96,7 @@ func (s *tableServiceClientLiveTests) TestQueryTable() { tableNames[i] = name } _, err := context.client.Create(ctx, tableNames[i]) - assert.Nil(err) + require.NoError(err) } // Query for tables with no pagination. The filter should exclude one table from the results @@ -110,8 +109,8 @@ func (s *tableServiceClientLiveTests) TestQueryTable() { resultCount += len(resp.TableQueryResponse.Value) } - assert.Nil(pager.Err()) - assert.Equal(resultCount, tableCount-1) + require.NoError(pager.Err()) + require.Equal(resultCount, tableCount-1) // Query for tables with pagination top := int32(2) @@ -125,9 +124,9 @@ func (s *tableServiceClientLiveTests) TestQueryTable() { pageCount++ } - assert.Nil(pager.Err()) - assert.Equal(resultCount, tableCount-1) - assert.Equal(pageCount, int(top)) + require.NoError(pager.Err()) + require.Equal(resultCount, tableCount-1) + require.Equal(pageCount, int(top)) } func (s *tableServiceClientLiveTests) TestGetStatistics() { diff --git a/sdk/tables/aztable/table_transactional_batch.go b/sdk/tables/aztable/table_transactional_batch.go index 3336f3b84943..cfc07c89be07 100644 --- a/sdk/tables/aztable/table_transactional_batch.go +++ b/sdk/tables/aztable/table_transactional_batch.go @@ -62,7 +62,7 @@ func (e *TableTransactionError) Error() string { type TableTransactionAction struct { ActionType TableTransactionActionType - Entity map[string]interface{} + Entity []byte ETag string } @@ -297,7 +297,11 @@ func (t *TableClient) generateEntitySubset(transactionAction *TableTransactionAc return err } var req *azcore.Request - var entity map[string]interface{} = transactionAction.Entity + var entity map[string]interface{} + err = json.Unmarshal(transactionAction.Entity, &entity) + if err != nil { + return err + } if _, ok := entity[partitionKey]; !ok { return fmt.Errorf("entity properties must contain a %s property", partitionKey) diff --git a/sdk/tables/aztable/zt_table_recorded_tests.go b/sdk/tables/aztable/zt_table_recorded_tests.go index 6d632e616f6c..5b2edcd5a0cb 100644 --- a/sdk/tables/aztable/zt_table_recorded_tests.go +++ b/sdk/tables/aztable/zt_table_recorded_tests.go @@ -5,14 +5,14 @@ package aztable import ( "context" + "encoding/json" "fmt" - "math" "testing" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" - "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) type testContext struct { @@ -52,12 +52,6 @@ func cosmosURI(accountName string, endpointSuffix string) string { return fmt.Sprintf("https://%v.table.%v/", accountName, endpointSuffix) } -func failIfNotNil(a *assert.Assertions, e error) { - if e != nil { - a.FailNow(e.Error()) - } -} - // create the test specific TableClient and wire it up to recordings func recordedTestSetup(t *testing.T, testName string, endpointType EndpointType, mode recording.RecordMode) { var accountName string @@ -65,36 +59,37 @@ func recordedTestSetup(t *testing.T, testName string, endpointType EndpointType, var cred *SharedKeyCredential var secret string var uri string - assert := assert.New(t) + require := require.New(t) // init the test framework - context := recording.NewTestContext(func(msg string) { assert.FailNow(msg) }, func(msg string) { t.Log(msg) }, func() string { return testName }) + context := recording.NewTestContext(func(msg string) { require.FailNow(msg) }, func(msg string) { t.Log(msg) }, func() string { return testName }) r, err := recording.NewRecording(context, mode) - assert.Nil(err) + require.NoError(err) if endpointType == StorageEndpoint { accountName, err = r.GetRecordedVariable(storageAccountNameEnvVar, recording.Default) - failIfNotNil(assert, err) + require.NoError(err) suffix = r.GetOptionalRecordedVariable(storageEndpointSuffixEnvVar, DefaultStorageSuffix, recording.Default) secret, err = r.GetRecordedVariable(storageAccountKeyEnvVar, recording.Secret_Base64String) - failIfNotNil(assert, err) + require.NoError(err) cred, err = NewSharedKeyCredential(accountName, secret) - failIfNotNil(assert, err) + require.NoError(err) uri = storageURI(accountName, suffix) } else { accountName, err = r.GetRecordedVariable(cosmosAccountNameEnnVar, recording.Default) - failIfNotNil(assert, err) + require.NoError(err) suffix = r.GetOptionalRecordedVariable(cosmosEndpointSuffixEnvVar, DefaultCosmosSuffix, recording.Default) secret, err = r.GetRecordedVariable(cosmosAccountKeyEnvVar, recording.Secret_Base64String) - failIfNotNil(assert, err) + require.NoError(err) cred, err = NewSharedKeyCredential(accountName, secret) - failIfNotNil(assert, err) + require.NoError(err) uri = cosmosURI(accountName, suffix) cosmosTestsMap[testName] = true } client, err := NewTableServiceClient(uri, cred, &TableClientOptions{HTTPClient: r, Retry: azcore.RetryOptions{MaxRetries: -1}}) - assert.Nil(err) + require.NoError(err) + clientsMap[testName] = &testContext{client: client, recording: r, context: &context} } @@ -143,66 +138,83 @@ func getTableName(context *testContext, prefix ...string) (string, error) { } } -func createSimpleEntities(count int, pk string) *[]map[string]interface{} { - result := make([]map[string]interface{}, count) +type basicTestEntity struct { + Entity + Integer int32 + String string + Bool bool +} - for i := 1; i <= count; i++ { - var e = map[string]interface{}{ - partitionKey: pk, - rowKey: fmt.Sprint(i), - "StringProp": fmt.Sprintf("some string %d", i), - "IntProp": i, - "BoolProp": true, - } - result[i-1] = e +func marshalBasicEntity(b basicTestEntity, require *require.Assertions) *[]byte { + r, e := json.Marshal(b) + require.NoError(e) + return &r +} + +type complexTestEntity struct { + Entity + Integer int + String string + Bool bool + Float float32 + DateTime time.Time + Byte []byte + // Integer64 int64 // Need to add type hints for ints/floats above 32bits + // Float64 float64 +} + +func createSimpleEntity(count int, pk string) basicTestEntity { + return basicTestEntity{ + Entity: Entity{ + PartitionKey: pk, + RowKey: fmt.Sprint(count), + }, + String: fmt.Sprintf("some string %d", count), + Integer: int32(count), + Bool: true, } - return &result } -func createComplexMapEntities(context *testContext, count int, pk string) *[]map[string]interface{} { - result := make([]map[string]interface{}, count) +// Use this for a replaced entity to assert a property (Bool) is removed +func createSimpleEntityNoBool(count int, pk string) map[string]interface{} { + m := make(map[string]interface{}) + m[partitionKey] = pk + m[rowKey] = fmt.Sprint(count) + m["String"] = fmt.Sprintf("some string %d", count) + m["Integer"] = int32(count) + return m +} +func createSimpleEntities(count int, pk string) *[]basicTestEntity { + result := make([]basicTestEntity, count) for i := 1; i <= count; i++ { - var e = map[string]interface{}{ - partitionKey: pk, - rowKey: fmt.Sprint(i), - "StringProp": fmt.Sprintf("some string %d", i), - "IntProp": i, - "BoolProp": true, - "SomeBinaryProperty": []byte("some bytes"), - "SomeDateProperty": context.recording.Now(), - "SomeDoubleProperty0": float64(1), - "SomeDoubleProperty1": float64(1.2345), - "SomeGuidProperty": context.recording.UUID(), - "SomeInt64Property": (int64)(math.MaxInt64), - "SomeIntProperty": 42, - "SomeStringProperty": "some string", - } - result[i-1] = e + result[i-1] = createSimpleEntity(i, pk) } return &result } -func createComplexEntities(context *testContext, count int, pk string) *[]complexEntity { - result := make([]complexEntity, count) +func createComplexEntity(i int, pk string) complexTestEntity { + return complexTestEntity{ + Entity: Entity{ + PartitionKey: "partition", + RowKey: fmt.Sprint(i), + }, + Integer: int(i), + String: "someString", + Bool: true, + Float: 3.14159, + DateTime: time.Date(2021, time.July, 13, 0, 0, 0, 0, time.UTC), + Byte: []byte("somebytes"), + // Integer64: int64(math.Pow(2, 33)), + // Float64: math.Pow(2, 33.1), + } +} + +func createComplexEntities(count int, pk string) *[]complexTestEntity { + result := make([]complexTestEntity, count) - sp := "some pointer to string" for i := 1; i <= count; i++ { - var e = complexEntity{ - PartitionKey: "partition", - ETag: "*", - RowKey: "row", - Timestamp: context.recording.Now(), - SomeBinaryProperty: []byte("some bytes"), - SomeDateProperty: context.recording.Now(), - SomeDoubleProperty0: float64(1), - SomeDoubleProperty1: float64(1.2345), - SomeGuidProperty: context.recording.UUID(), - SomeInt64Property: math.MaxInt64, - SomeIntProperty: 42, - SomeStringProperty: "some string", - SomePtrStringProperty: &sp} - result[i-1] = e + result[i-1] = createComplexEntity(i, pk) } return &result } diff --git a/sdk/tables/aztable/zz_generated_connection.go b/sdk/tables/aztable/zz_generated_connection.go index 6aa8ad00d8b3..132c0a69cb7f 100644 --- a/sdk/tables/aztable/zz_generated_connection.go +++ b/sdk/tables/aztable/zz_generated_connection.go @@ -9,7 +9,6 @@ package aztable import ( "fmt" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" ) diff --git a/sdk/tables/aztable/zz_generated_models.go b/sdk/tables/aztable/zz_generated_models.go index 3daf1c657f99..7094e996e262 100644 --- a/sdk/tables/aztable/zz_generated_models.go +++ b/sdk/tables/aztable/zz_generated_models.go @@ -10,10 +10,9 @@ package aztable import ( "encoding/json" "encoding/xml" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" "reflect" "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore" ) // AccessPolicy - An Access policy. diff --git a/sdk/tables/aztable/zz_generated_service_client.go b/sdk/tables/aztable/zz_generated_service_client.go index 7408d632f177..afa44c086aee 100644 --- a/sdk/tables/aztable/zz_generated_service_client.go +++ b/sdk/tables/aztable/zz_generated_service_client.go @@ -10,11 +10,10 @@ package aztable import ( "context" "fmt" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" "net/http" "strconv" "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore" ) type serviceClient struct { diff --git a/sdk/tables/aztable/zz_generated_table_client.go b/sdk/tables/aztable/zz_generated_table_client.go index 2f5529190ac3..13645c322257 100644 --- a/sdk/tables/aztable/zz_generated_table_client.go +++ b/sdk/tables/aztable/zz_generated_table_client.go @@ -12,13 +12,12 @@ import ( "encoding/xml" "errors" "fmt" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" "net/http" "net/url" "strconv" "strings" "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore" ) type tableClient struct { From f905d115c5c4459c5a34b4531877e9ae40384f3c Mon Sep 17 00:00:00 2001 From: Sean Kane <68240067+seankane-msft@users.noreply.github.com> Date: Mon, 26 Jul 2021 17:12:19 -0400 Subject: [PATCH 29/42] [Tables] change Query to List (#15099) * adding List methods * moving helper to zt file * improving docstrings * changing all query methods to list * updating docstrings --- sdk/tables/aztable/entity_test.go | 4 +- sdk/tables/aztable/models.go | 29 + .../TestListTables-variables.yaml | 5 + .../TestListTables.yaml | 557 ++++++++++++++ .../TestListTables-variables.yaml | 5 + .../TestListTables.yaml | 713 ++++++++++++++++++ .../TestListEntities-variables.yaml | 5 + .../TestListEntities.yaml | 305 ++++++++ .../TestListEntities-variables.yaml | 5 + .../TestListEntities.yaml | 389 ++++++++++ sdk/tables/aztable/table_batch_test.go | 8 +- sdk/tables/aztable/table_client.go | 21 +- sdk/tables/aztable/table_client_test.go | 16 +- sdk/tables/aztable/table_pagers.go | 16 +- sdk/tables/aztable/table_service_client.go | 19 +- .../aztable/table_service_client_test.go | 43 +- sdk/tables/aztable/zt_table_recorded_tests.go | 21 +- 17 files changed, 2119 insertions(+), 42 deletions(-) create mode 100644 sdk/tables/aztable/models.go create mode 100644 sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestListTables-variables.yaml create mode 100644 sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestListTables.yaml create mode 100644 sdk/tables/aztable/recordings/TestServiceClient_Storage/TestListTables-variables.yaml create mode 100644 sdk/tables/aztable/recordings/TestServiceClient_Storage/TestListTables.yaml create mode 100644 sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestListEntities-variables.yaml create mode 100644 sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestListEntities.yaml create mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestListEntities-variables.yaml create mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestListEntities.yaml diff --git a/sdk/tables/aztable/entity_test.go b/sdk/tables/aztable/entity_test.go index cf247a50bc42..d075a0bec75a 100644 --- a/sdk/tables/aztable/entity_test.go +++ b/sdk/tables/aztable/entity_test.go @@ -41,8 +41,8 @@ func (s *tableClientLiveTests) TestAddBasicEntity() { require.Equal(receivedEntity.RowKey, "rk001") queryString := "PartitionKey eq 'pk001'" - queryOptions := QueryOptions{Filter: &queryString} - pager := client.Query(&queryOptions) + listOptions := ListOptions{Filter: &queryString} + pager := client.List(&listOptions) count := 0 for pager.NextPage(ctx) { resp := pager.PageResponse() diff --git a/sdk/tables/aztable/models.go b/sdk/tables/aztable/models.go new file mode 100644 index 000000000000..c6ec5fc9371c --- /dev/null +++ b/sdk/tables/aztable/models.go @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package aztable + +// QueryOptions contains a group of parameters for the Table.Query method. +type ListOptions struct { + // OData filter expression. + Filter *string + // Specifies the media type for the response. + Format *OdataMetadataFormat + // Select expression using OData notation. Limits the columns on each record to just those requested, e.g. "$select=PolicyAssignmentId, ResourceId". + Select *string + // Maximum number of records to return. + Top *int32 +} + +func (l *ListOptions) toQueryOptions() *QueryOptions { + if l == nil { + return &QueryOptions{} + } + + return &QueryOptions{ + Filter: l.Filter, + Format: l.Format, + Select: l.Select, + Top: l.Top, + } +} diff --git a/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestListTables-variables.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestListTables-variables.yaml new file mode 100644 index 000000000000..c6777751d235 --- /dev/null +++ b/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestListTables-variables.yaml @@ -0,0 +1,5 @@ +--- +COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com +TABLES_COSMOS_ACCOUNT_NAME: seankaneprim +TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== +randomSeed: "1626796896" diff --git a/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestListTables.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestListTables.yaml new file mode 100644 index 000000000000..ba3f4296d831 --- /dev/null +++ b/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestListTables.yaml @@ -0,0 +1,557 @@ +--- +version: 1 +interactions: +- request: + body: "" + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Tue, 20 Jul 2021 16:01:36 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.cosmos.azure.com/Tables + method: GET + response: + body: '{"value":[{"TableName":"gotable5jq3v0tq94aql4"},{"TableName":"gotableq7wc90zjsaq4o4"},{"TableName":"gotable5jq3v0tq94aql0"},{"TableName":"gotable5jq3v0tq94aql3"},{"TableName":"gotable5jq3v0tq94aql2"},{"TableName":"gotableq7wc90zjsaq4o3"},{"TableName":"gotablel4p8jpfnr5wfc"},{"TableName":"gotableq7wc90zjsaq4o2"},{"TableName":"gotable5jq3v0tq94aql1"},{"TableName":"gotableq7wc90zjsaq4o1"},{"TableName":"gotableq7wc90zjsaq4o0"}],"odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables"}' + headers: + Content-Type: + - application/json;odata=minimalmetadata + Date: + - Tue, 20 Jul 2021 16:01:36 GMT + X-Ms-Request-Id: + - d1a623e2-60a3-4471-bbdd-c9177dd251b8 + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Tue, 20 Jul 2021 16:01:36 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.cosmos.azure.com/Tables('gotable5jq3v0tq94aql4') + method: DELETE + response: + body: "" + headers: + Date: + - Tue, 20 Jul 2021 16:01:36 GMT + X-Ms-Request-Id: + - c831b329-33a4-422d-bcb2-f521a44e73cd + status: 204 No Content + code: 204 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Tue, 20 Jul 2021 16:01:37 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.cosmos.azure.com/Tables('gotableq7wc90zjsaq4o4') + method: DELETE + response: + body: "" + headers: + Date: + - Tue, 20 Jul 2021 16:01:37 GMT + X-Ms-Request-Id: + - ec89c3e4-62c9-4298-87ff-e764077fc45e + status: 204 No Content + code: 204 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Tue, 20 Jul 2021 16:01:37 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.cosmos.azure.com/Tables('gotable5jq3v0tq94aql0') + method: DELETE + response: + body: "" + headers: + Date: + - Tue, 20 Jul 2021 16:01:37 GMT + X-Ms-Request-Id: + - 3870142d-c5ec-417d-ba17-46a852cac90c + status: 204 No Content + code: 204 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Tue, 20 Jul 2021 16:01:38 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.cosmos.azure.com/Tables('gotable5jq3v0tq94aql3') + method: DELETE + response: + body: "" + headers: + Date: + - Tue, 20 Jul 2021 16:01:37 GMT + X-Ms-Request-Id: + - 5e74aa0a-336a-4f5f-9ce5-314b3423dc47 + status: 204 No Content + code: 204 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Tue, 20 Jul 2021 16:01:38 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.cosmos.azure.com/Tables('gotable5jq3v0tq94aql2') + method: DELETE + response: + body: "" + headers: + Date: + - Tue, 20 Jul 2021 16:01:38 GMT + X-Ms-Request-Id: + - e72a9553-2139-4d23-8587-0597293e230d + status: 204 No Content + code: 204 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Tue, 20 Jul 2021 16:01:38 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.cosmos.azure.com/Tables('gotableq7wc90zjsaq4o3') + method: DELETE + response: + body: "" + headers: + Date: + - Tue, 20 Jul 2021 16:01:38 GMT + X-Ms-Request-Id: + - 2b2ac4dd-95d3-479f-b43c-dbbe95e24a35 + status: 204 No Content + code: 204 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Tue, 20 Jul 2021 16:01:39 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.cosmos.azure.com/Tables('gotablel4p8jpfnr5wfc') + method: DELETE + response: + body: "" + headers: + Date: + - Tue, 20 Jul 2021 16:01:39 GMT + X-Ms-Request-Id: + - 506ecd01-1315-4fdb-87c3-9565da3a8d35 + status: 204 No Content + code: 204 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Tue, 20 Jul 2021 16:01:39 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.cosmos.azure.com/Tables('gotableq7wc90zjsaq4o2') + method: DELETE + response: + body: "" + headers: + Date: + - Tue, 20 Jul 2021 16:01:39 GMT + X-Ms-Request-Id: + - de18a430-15e8-44b8-8102-b22c1ad23e31 + status: 204 No Content + code: 204 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Tue, 20 Jul 2021 16:01:39 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.cosmos.azure.com/Tables('gotable5jq3v0tq94aql1') + method: DELETE + response: + body: "" + headers: + Date: + - Tue, 20 Jul 2021 16:01:39 GMT + X-Ms-Request-Id: + - ad3e784e-5fe6-48bd-8281-107fab2d16b4 + status: 204 No Content + code: 204 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Tue, 20 Jul 2021 16:01:40 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.cosmos.azure.com/Tables('gotableq7wc90zjsaq4o1') + method: DELETE + response: + body: "" + headers: + Date: + - Tue, 20 Jul 2021 16:01:40 GMT + X-Ms-Request-Id: + - c6c69d9b-a4a5-469f-94d5-fa0dbbc7ed30 + status: 204 No Content + code: 204 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Tue, 20 Jul 2021 16:01:40 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.cosmos.azure.com/Tables('gotableq7wc90zjsaq4o0') + method: DELETE + response: + body: "" + headers: + Date: + - Tue, 20 Jul 2021 16:01:40 GMT + X-Ms-Request-Id: + - 4e3c0641-f714-49c9-9a24-f9f22df2afa5 + status: 204 No Content + code: 204 + duration: "" +- request: + body: '{"TableName":"gotabled7f5qwr5hskdg0"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "37" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Tue, 20 Jul 2021 16:01:41 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.cosmos.azure.com/Tables + method: POST + response: + body: '{"TableName":"gotabled7f5qwr5hskdg0","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' + headers: + Content-Type: + - application/json;odata=minimalmetadata + Date: + - Tue, 20 Jul 2021 16:01:41 GMT + Etag: + - W/"datetime'2021-07-20T16%3A01%3A41.6731656Z'" + Location: + - https://seankaneprim.table.cosmos.azure.com/Tables('gotabled7f5qwr5hskdg0') + X-Ms-Request-Id: + - df88e6cf-9bd6-4115-8177-b6aaaf2262e1 + status: 201 Created + code: 201 + duration: "" +- request: + body: '{"TableName":"gotabled7f5qwr5hskdg1"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "37" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Tue, 20 Jul 2021 16:01:42 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.cosmos.azure.com/Tables + method: POST + response: + body: '{"TableName":"gotabled7f5qwr5hskdg1","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' + headers: + Content-Type: + - application/json;odata=minimalmetadata + Date: + - Tue, 20 Jul 2021 16:01:42 GMT + Etag: + - W/"datetime'2021-07-20T16%3A01%3A42.5668104Z'" + Location: + - https://seankaneprim.table.cosmos.azure.com/Tables('gotabled7f5qwr5hskdg1') + X-Ms-Request-Id: + - 26d147ca-dc5f-4475-aafb-08091ce29e69 + status: 201 Created + code: 201 + duration: "" +- request: + body: '{"TableName":"gotabled7f5qwr5hskdg2"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "37" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Tue, 20 Jul 2021 16:01:43 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.cosmos.azure.com/Tables + method: POST + response: + body: '{"TableName":"gotabled7f5qwr5hskdg2","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' + headers: + Content-Type: + - application/json;odata=minimalmetadata + Date: + - Tue, 20 Jul 2021 16:01:43 GMT + Etag: + - W/"datetime'2021-07-20T16%3A01%3A43.3920520Z'" + Location: + - https://seankaneprim.table.cosmos.azure.com/Tables('gotabled7f5qwr5hskdg2') + X-Ms-Request-Id: + - ff314918-0c36-4935-8a12-e80e383d60cb + status: 201 Created + code: 201 + duration: "" +- request: + body: '{"TableName":"gotabled7f5qwr5hskdg3"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "37" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Tue, 20 Jul 2021 16:01:43 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.cosmos.azure.com/Tables + method: POST + response: + body: '{"TableName":"gotabled7f5qwr5hskdg3","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' + headers: + Content-Type: + - application/json;odata=minimalmetadata + Date: + - Tue, 20 Jul 2021 16:01:44 GMT + Etag: + - W/"datetime'2021-07-20T16%3A01%3A44.2174984Z'" + Location: + - https://seankaneprim.table.cosmos.azure.com/Tables('gotabled7f5qwr5hskdg3') + X-Ms-Request-Id: + - a61384c7-ab17-424c-9c04-b0309eea72d0 + status: 201 Created + code: 201 + duration: "" +- request: + body: '{"TableName":"gotabled7f5qwr5hskdg4"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "37" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Tue, 20 Jul 2021 16:01:44 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.cosmos.azure.com/Tables + method: POST + response: + body: '{"TableName":"gotabled7f5qwr5hskdg4","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' + headers: + Content-Type: + - application/json;odata=minimalmetadata + Date: + - Tue, 20 Jul 2021 16:01:44 GMT + Etag: + - W/"datetime'2021-07-20T16%3A01%3A45.0529800Z'" + Location: + - https://seankaneprim.table.cosmos.azure.com/Tables('gotabled7f5qwr5hskdg4') + X-Ms-Request-Id: + - 31a463d8-b07a-4360-8306-b1e05febc688 + status: 201 Created + code: 201 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Tue, 20 Jul 2021 16:01:45 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.cosmos.azure.com/Tables + method: GET + response: + body: '{"value":[{"TableName":"gotabled7f5qwr5hskdg3"},{"TableName":"gotabled7f5qwr5hskdg1"},{"TableName":"gotabled7f5qwr5hskdg0"},{"TableName":"gotabled7f5qwr5hskdg4"},{"TableName":"gotabled7f5qwr5hskdg2"}],"odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables"}' + headers: + Content-Type: + - application/json;odata=minimalmetadata + Date: + - Tue, 20 Jul 2021 16:01:45 GMT + X-Ms-Request-Id: + - a88f3060-ca4b-44e0-9ad2-15ec2205999a + status: 200 OK + code: 200 + duration: "" diff --git a/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestListTables-variables.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestListTables-variables.yaml new file mode 100644 index 000000000000..5134b5eef979 --- /dev/null +++ b/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestListTables-variables.yaml @@ -0,0 +1,5 @@ +--- +STORAGE_ENDPOINT_SUFFIX: core.windows.net +TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== +TABLES_STORAGE_ACCOUNT_NAME: seankaneprim +randomSeed: "1626796893" diff --git a/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestListTables.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestListTables.yaml new file mode 100644 index 000000000000..e95cb124c90e --- /dev/null +++ b/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestListTables.yaml @@ -0,0 +1,713 @@ +--- +version: 1 +interactions: +- request: + body: "" + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Tue, 20 Jul 2021 16:01:33 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/Tables + method: GET + response: + body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#Tables","value":[{"TableName":"gotable1v1a7j87nvs5o"},{"TableName":"gotable5jq3v0tq94aql0"},{"TableName":"gotable5jq3v0tq94aql1"},{"TableName":"gotable5jq3v0tq94aql2"},{"TableName":"gotable5jq3v0tq94aql3"},{"TableName":"gotable5jq3v0tq94aql4"},{"TableName":"gotablekyd305p8fhn460"},{"TableName":"gotablekyd305p8fhn461"},{"TableName":"gotablekyd305p8fhn462"},{"TableName":"gotablekyd305p8fhn463"},{"TableName":"gotablekyd305p8fhn464"}]}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + Date: + - Tue, 20 Jul 2021 16:01:33 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - dbf5925b-d002-0079-7380-7d1451000000 + X-Ms-Version: + - "2019-02-02" + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Tue, 20 Jul 2021 16:01:34 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/Tables('gotable1v1a7j87nvs5o') + method: DELETE + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Date: + - Tue, 20 Jul 2021 16:01:33 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - dbf592d4-d002-0079-6580-7d1451000000 + X-Ms-Version: + - "2019-02-02" + status: 204 No Content + code: 204 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Tue, 20 Jul 2021 16:01:34 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/Tables('gotable5jq3v0tq94aql0') + method: DELETE + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Date: + - Tue, 20 Jul 2021 16:01:33 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - dbf59332-d002-0079-3f80-7d1451000000 + X-Ms-Version: + - "2019-02-02" + status: 204 No Content + code: 204 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Tue, 20 Jul 2021 16:01:34 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/Tables('gotable5jq3v0tq94aql1') + method: DELETE + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Date: + - Tue, 20 Jul 2021 16:01:33 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - dbf59365-d002-0079-7280-7d1451000000 + X-Ms-Version: + - "2019-02-02" + status: 204 No Content + code: 204 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Tue, 20 Jul 2021 16:01:34 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/Tables('gotable5jq3v0tq94aql2') + method: DELETE + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Date: + - Tue, 20 Jul 2021 16:01:34 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - dbf59394-d002-0079-2080-7d1451000000 + X-Ms-Version: + - "2019-02-02" + status: 204 No Content + code: 204 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Tue, 20 Jul 2021 16:01:34 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/Tables('gotable5jq3v0tq94aql3') + method: DELETE + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Date: + - Tue, 20 Jul 2021 16:01:34 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - dbf593f1-d002-0079-7a80-7d1451000000 + X-Ms-Version: + - "2019-02-02" + status: 204 No Content + code: 204 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Tue, 20 Jul 2021 16:01:34 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/Tables('gotable5jq3v0tq94aql4') + method: DELETE + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Date: + - Tue, 20 Jul 2021 16:01:34 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - dbf59437-d002-0079-3f80-7d1451000000 + X-Ms-Version: + - "2019-02-02" + status: 204 No Content + code: 204 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Tue, 20 Jul 2021 16:01:35 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/Tables('gotablekyd305p8fhn460') + method: DELETE + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Date: + - Tue, 20 Jul 2021 16:01:34 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - dbf59477-d002-0079-7e80-7d1451000000 + X-Ms-Version: + - "2019-02-02" + status: 204 No Content + code: 204 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Tue, 20 Jul 2021 16:01:35 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/Tables('gotablekyd305p8fhn461') + method: DELETE + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Date: + - Tue, 20 Jul 2021 16:01:34 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - dbf594b1-d002-0079-3780-7d1451000000 + X-Ms-Version: + - "2019-02-02" + status: 204 No Content + code: 204 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Tue, 20 Jul 2021 16:01:35 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/Tables('gotablekyd305p8fhn462') + method: DELETE + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Date: + - Tue, 20 Jul 2021 16:01:34 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - dbf594e9-d002-0079-6f80-7d1451000000 + X-Ms-Version: + - "2019-02-02" + status: 204 No Content + code: 204 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Tue, 20 Jul 2021 16:01:35 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/Tables('gotablekyd305p8fhn463') + method: DELETE + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Date: + - Tue, 20 Jul 2021 16:01:34 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - dbf5952d-d002-0079-3180-7d1451000000 + X-Ms-Version: + - "2019-02-02" + status: 204 No Content + code: 204 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Tue, 20 Jul 2021 16:01:35 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/Tables('gotablekyd305p8fhn464') + method: DELETE + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Date: + - Tue, 20 Jul 2021 16:01:34 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - dbf59575-d002-0079-7480-7d1451000000 + X-Ms-Version: + - "2019-02-02" + status: 204 No Content + code: 204 + duration: "" +- request: + body: '{"TableName":"gotablebyhusoz3ewumo0"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "37" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Tue, 20 Jul 2021 16:01:35 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/Tables + method: POST + response: + body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotablebyhusoz3ewumo0"}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + Date: + - Tue, 20 Jul 2021 16:01:34 GMT + Location: + - https://seankaneprim.table.core.windows.net/Tables('gotablebyhusoz3ewumo0') + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - dbf595ad-d002-0079-2980-7d1451000000 + X-Ms-Version: + - "2019-02-02" + status: 201 Created + code: 201 + duration: "" +- request: + body: '{"TableName":"gotablebyhusoz3ewumo1"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "37" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Tue, 20 Jul 2021 16:01:35 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/Tables + method: POST + response: + body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotablebyhusoz3ewumo1"}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + Date: + - Tue, 20 Jul 2021 16:01:35 GMT + Location: + - https://seankaneprim.table.core.windows.net/Tables('gotablebyhusoz3ewumo1') + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - dbf595fa-d002-0079-7280-7d1451000000 + X-Ms-Version: + - "2019-02-02" + status: 201 Created + code: 201 + duration: "" +- request: + body: '{"TableName":"gotablebyhusoz3ewumo2"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "37" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Tue, 20 Jul 2021 16:01:35 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/Tables + method: POST + response: + body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotablebyhusoz3ewumo2"}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + Date: + - Tue, 20 Jul 2021 16:01:35 GMT + Location: + - https://seankaneprim.table.core.windows.net/Tables('gotablebyhusoz3ewumo2') + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - dbf5963a-d002-0079-2e80-7d1451000000 + X-Ms-Version: + - "2019-02-02" + status: 201 Created + code: 201 + duration: "" +- request: + body: '{"TableName":"gotablebyhusoz3ewumo3"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "37" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Tue, 20 Jul 2021 16:01:35 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/Tables + method: POST + response: + body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotablebyhusoz3ewumo3"}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + Date: + - Tue, 20 Jul 2021 16:01:35 GMT + Location: + - https://seankaneprim.table.core.windows.net/Tables('gotablebyhusoz3ewumo3') + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - dbf59673-d002-0079-6580-7d1451000000 + X-Ms-Version: + - "2019-02-02" + status: 201 Created + code: 201 + duration: "" +- request: + body: '{"TableName":"gotablebyhusoz3ewumo4"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "37" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Tue, 20 Jul 2021 16:01:35 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/Tables + method: POST + response: + body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotablebyhusoz3ewumo4"}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + Date: + - Tue, 20 Jul 2021 16:01:35 GMT + Location: + - https://seankaneprim.table.core.windows.net/Tables('gotablebyhusoz3ewumo4') + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - dbf596a6-d002-0079-1780-7d1451000000 + X-Ms-Version: + - "2019-02-02" + status: 201 Created + code: 201 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Tue, 20 Jul 2021 16:01:36 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/Tables + method: GET + response: + body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#Tables","value":[{"TableName":"gotablebyhusoz3ewumo0"},{"TableName":"gotablebyhusoz3ewumo1"},{"TableName":"gotablebyhusoz3ewumo2"},{"TableName":"gotablebyhusoz3ewumo3"},{"TableName":"gotablebyhusoz3ewumo4"}]}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + Date: + - Tue, 20 Jul 2021 16:01:35 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - dbf596db-d002-0079-4980-7d1451000000 + X-Ms-Version: + - "2019-02-02" + status: 200 OK + code: 200 + duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestListEntities-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestListEntities-variables.yaml new file mode 100644 index 000000000000..020dafba68f5 --- /dev/null +++ b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestListEntities-variables.yaml @@ -0,0 +1,5 @@ +--- +COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com +TABLES_COSMOS_ACCOUNT_NAME: seankaneprim +TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== +randomSeed: "1626796656" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestListEntities.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestListEntities.yaml new file mode 100644 index 000000000000..2b02d7b0d715 --- /dev/null +++ b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestListEntities.yaml @@ -0,0 +1,305 @@ +--- +version: 1 +interactions: +- request: + body: '{"TableName":"gotablekpg8v4qrcxayf"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "36" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Tue, 20 Jul 2021 15:57:36 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.cosmos.azure.com/Tables + method: POST + response: + body: '{"TableName":"gotablekpg8v4qrcxayf","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' + headers: + Content-Type: + - application/json;odata=minimalmetadata + Date: + - Tue, 20 Jul 2021 15:57:36 GMT + Etag: + - W/"datetime'2021-07-20T15%3A57%3A36.9868296Z'" + Location: + - https://seankaneprim.table.cosmos.azure.com/Tables('gotablekpg8v4qrcxayf') + X-Ms-Request-Id: + - 29a6932d-34fe-43bf-bb15-0d6c9eef5b17 + status: 201 Created + code: 201 + duration: "" +- request: + body: '{"PartitionKey":"partition","RowKey":"0","Value":1}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "51" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + Prefer: + - return-no-content + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Tue, 20 Jul 2021 15:57:37 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.cosmos.azure.com/gotablekpg8v4qrcxayf + method: POST + response: + body: "" + headers: + Date: + - Tue, 20 Jul 2021 15:57:37 GMT + Etag: + - W/"datetime'2021-07-20T15%3A57%3A37.7762312Z'" + Location: + - https://seankaneprim.table.cosmos.azure.com/gotablekpg8v4qrcxayf(PartitionKey='partition',RowKey='0') + Preference-Applied: + - return-no-content + X-Ms-Request-Id: + - 2f1b9870-84c7-46b8-b418-d75d21c3b448 + status: 204 No Content + code: 204 + duration: "" +- request: + body: '{"PartitionKey":"partition","RowKey":"1","Value":2}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "51" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + Prefer: + - return-no-content + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Tue, 20 Jul 2021 15:57:37 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.cosmos.azure.com/gotablekpg8v4qrcxayf + method: POST + response: + body: "" + headers: + Date: + - Tue, 20 Jul 2021 15:57:37 GMT + Etag: + - W/"datetime'2021-07-20T15%3A57%3A37.8735112Z'" + Location: + - https://seankaneprim.table.cosmos.azure.com/gotablekpg8v4qrcxayf(PartitionKey='partition',RowKey='1') + Preference-Applied: + - return-no-content + X-Ms-Request-Id: + - 7cd30c18-6738-4b94-a3b2-14ef52328a4c + status: 204 No Content + code: 204 + duration: "" +- request: + body: '{"PartitionKey":"partition","RowKey":"2","Value":3}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "51" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + Prefer: + - return-no-content + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Tue, 20 Jul 2021 15:57:37 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.cosmos.azure.com/gotablekpg8v4qrcxayf + method: POST + response: + body: "" + headers: + Date: + - Tue, 20 Jul 2021 15:57:37 GMT + Etag: + - W/"datetime'2021-07-20T15%3A57%3A37.9680264Z'" + Location: + - https://seankaneprim.table.cosmos.azure.com/gotablekpg8v4qrcxayf(PartitionKey='partition',RowKey='2') + Preference-Applied: + - return-no-content + X-Ms-Request-Id: + - e2d19d8b-055a-4afd-812b-c85a94476427 + status: 204 No Content + code: 204 + duration: "" +- request: + body: '{"PartitionKey":"partition","RowKey":"3","Value":4}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "51" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + Prefer: + - return-no-content + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Tue, 20 Jul 2021 15:57:37 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.cosmos.azure.com/gotablekpg8v4qrcxayf + method: POST + response: + body: "" + headers: + Date: + - Tue, 20 Jul 2021 15:57:37 GMT + Etag: + - W/"datetime'2021-07-20T15%3A57%3A38.0645896Z'" + Location: + - https://seankaneprim.table.cosmos.azure.com/gotablekpg8v4qrcxayf(PartitionKey='partition',RowKey='3') + Preference-Applied: + - return-no-content + X-Ms-Request-Id: + - 425ae295-a848-455b-8ccd-16ba1cf78366 + status: 204 No Content + code: 204 + duration: "" +- request: + body: '{"PartitionKey":"partition","RowKey":"4","Value":5}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "51" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + Prefer: + - return-no-content + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Tue, 20 Jul 2021 15:57:37 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.cosmos.azure.com/gotablekpg8v4qrcxayf + method: POST + response: + body: "" + headers: + Date: + - Tue, 20 Jul 2021 15:57:37 GMT + Etag: + - W/"datetime'2021-07-20T15%3A57%3A38.1603336Z'" + Location: + - https://seankaneprim.table.cosmos.azure.com/gotablekpg8v4qrcxayf(PartitionKey='partition',RowKey='4') + Preference-Applied: + - return-no-content + X-Ms-Request-Id: + - 0c8dd131-e14b-49db-8092-02106c01b50c + status: 204 No Content + code: 204 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Tue, 20 Jul 2021 15:57:37 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.cosmos.azure.com/gotablekpg8v4qrcxayf() + method: GET + response: + body: '{"value":[{"odata.etag":"W/\"datetime''2021-07-20T15%3A57%3A37.7762312Z''\"","PartitionKey":"partition","RowKey":"0","Value":1,"Timestamp":"2021-07-20T15:57:37.7762312Z"},{"odata.etag":"W/\"datetime''2021-07-20T15%3A57%3A37.8735112Z''\"","PartitionKey":"partition","RowKey":"1","Value":2,"Timestamp":"2021-07-20T15:57:37.8735112Z"},{"odata.etag":"W/\"datetime''2021-07-20T15%3A57%3A37.9680264Z''\"","PartitionKey":"partition","RowKey":"2","Value":3,"Timestamp":"2021-07-20T15:57:37.9680264Z"},{"odata.etag":"W/\"datetime''2021-07-20T15%3A57%3A38.0645896Z''\"","PartitionKey":"partition","RowKey":"3","Value":4,"Timestamp":"2021-07-20T15:57:38.0645896Z"},{"odata.etag":"W/\"datetime''2021-07-20T15%3A57%3A38.1603336Z''\"","PartitionKey":"partition","RowKey":"4","Value":5,"Timestamp":"2021-07-20T15:57:38.1603336Z"}],"odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#gotablekpg8v4qrcxayf"}' + headers: + Content-Type: + - application/json;odata=minimalmetadata + Date: + - Tue, 20 Jul 2021 15:57:37 GMT + X-Ms-Request-Id: + - e9ab21c5-dc78-458c-a610-0b7284f6b128 + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Tue, 20 Jul 2021 15:57:38 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.cosmos.azure.com/Tables('gotablekpg8v4qrcxayf') + method: DELETE + response: + body: "" + headers: + Date: + - Tue, 20 Jul 2021 15:57:37 GMT + X-Ms-Request-Id: + - e883f6a8-15bc-4e93-86fa-ce057757595c + status: 204 No Content + code: 204 + duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestListEntities-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestListEntities-variables.yaml new file mode 100644 index 000000000000..d5b7be133444 --- /dev/null +++ b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestListEntities-variables.yaml @@ -0,0 +1,5 @@ +--- +STORAGE_ENDPOINT_SUFFIX: core.windows.net +TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== +TABLES_STORAGE_ACCOUNT_NAME: seankaneprim +randomSeed: "1626796654" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestListEntities.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestListEntities.yaml new file mode 100644 index 000000000000..6a1ca63a2c47 --- /dev/null +++ b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestListEntities.yaml @@ -0,0 +1,389 @@ +--- +version: 1 +interactions: +- request: + body: '{"TableName":"gotablemwc9x1cbe9eur"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "36" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Tue, 20 Jul 2021 15:57:34 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/Tables + method: POST + response: + body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotablemwc9x1cbe9eur"}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + Date: + - Tue, 20 Jul 2021 15:57:34 GMT + Location: + - https://seankaneprim.table.core.windows.net/Tables('gotablemwc9x1cbe9eur') + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - fa96f097-3002-0071-097f-7d0e5e000000 + X-Ms-Version: + - "2019-02-02" + status: 201 Created + code: 201 + duration: "" +- request: + body: '{"PartitionKey":"partition","RowKey":"0","Value":1}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "51" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + Prefer: + - return-no-content + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Tue, 20 Jul 2021 15:57:35 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/gotablemwc9x1cbe9eur + method: POST + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Dataserviceid: + - https://seankaneprim.table.core.windows.net/gotablemwc9x1cbe9eur(PartitionKey='partition',RowKey='0') + Date: + - Tue, 20 Jul 2021 15:57:34 GMT + Etag: + - W/"datetime'2021-07-20T15%3A57%3A35.6389627Z'" + Location: + - https://seankaneprim.table.core.windows.net/gotablemwc9x1cbe9eur(PartitionKey='partition',RowKey='0') + Preference-Applied: + - return-no-content + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - fa96f0da-3002-0071-427f-7d0e5e000000 + X-Ms-Version: + - "2019-02-02" + status: 204 No Content + code: 204 + duration: "" +- request: + body: '{"PartitionKey":"partition","RowKey":"1","Value":2}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "51" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + Prefer: + - return-no-content + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Tue, 20 Jul 2021 15:57:35 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/gotablemwc9x1cbe9eur + method: POST + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Dataserviceid: + - https://seankaneprim.table.core.windows.net/gotablemwc9x1cbe9eur(PartitionKey='partition',RowKey='1') + Date: + - Tue, 20 Jul 2021 15:57:35 GMT + Etag: + - W/"datetime'2021-07-20T15%3A57%3A35.7230224Z'" + Location: + - https://seankaneprim.table.core.windows.net/gotablemwc9x1cbe9eur(PartitionKey='partition',RowKey='1') + Preference-Applied: + - return-no-content + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - fa96f0fd-3002-0071-647f-7d0e5e000000 + X-Ms-Version: + - "2019-02-02" + status: 204 No Content + code: 204 + duration: "" +- request: + body: '{"PartitionKey":"partition","RowKey":"2","Value":3}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "51" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + Prefer: + - return-no-content + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Tue, 20 Jul 2021 15:57:35 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/gotablemwc9x1cbe9eur + method: POST + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Dataserviceid: + - https://seankaneprim.table.core.windows.net/gotablemwc9x1cbe9eur(PartitionKey='partition',RowKey='2') + Date: + - Tue, 20 Jul 2021 15:57:35 GMT + Etag: + - W/"datetime'2021-07-20T15%3A57%3A35.811085Z'" + Location: + - https://seankaneprim.table.core.windows.net/gotablemwc9x1cbe9eur(PartitionKey='partition',RowKey='2') + Preference-Applied: + - return-no-content + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - fa96f160-3002-0071-447f-7d0e5e000000 + X-Ms-Version: + - "2019-02-02" + status: 204 No Content + code: 204 + duration: "" +- request: + body: '{"PartitionKey":"partition","RowKey":"3","Value":4}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "51" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + Prefer: + - return-no-content + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Tue, 20 Jul 2021 15:57:35 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/gotablemwc9x1cbe9eur + method: POST + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Dataserviceid: + - https://seankaneprim.table.core.windows.net/gotablemwc9x1cbe9eur(PartitionKey='partition',RowKey='3') + Date: + - Tue, 20 Jul 2021 15:57:35 GMT + Etag: + - W/"datetime'2021-07-20T15%3A57%3A35.898147Z'" + Location: + - https://seankaneprim.table.core.windows.net/gotablemwc9x1cbe9eur(PartitionKey='partition',RowKey='3') + Preference-Applied: + - return-no-content + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - fa96f189-3002-0071-6b7f-7d0e5e000000 + X-Ms-Version: + - "2019-02-02" + status: 204 No Content + code: 204 + duration: "" +- request: + body: '{"PartitionKey":"partition","RowKey":"4","Value":5}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "51" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + Prefer: + - return-no-content + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Tue, 20 Jul 2021 15:57:35 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/gotablemwc9x1cbe9eur + method: POST + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Dataserviceid: + - https://seankaneprim.table.core.windows.net/gotablemwc9x1cbe9eur(PartitionKey='partition',RowKey='4') + Date: + - Tue, 20 Jul 2021 15:57:35 GMT + Etag: + - W/"datetime'2021-07-20T15%3A57%3A35.9842082Z'" + Location: + - https://seankaneprim.table.core.windows.net/gotablemwc9x1cbe9eur(PartitionKey='partition',RowKey='4') + Preference-Applied: + - return-no-content + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - fa96f1b7-3002-0071-197f-7d0e5e000000 + X-Ms-Version: + - "2019-02-02" + status: 204 No Content + code: 204 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Tue, 20 Jul 2021 15:57:35 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/gotablemwc9x1cbe9eur() + method: GET + response: + body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#gotablemwc9x1cbe9eur","value":[{"odata.etag":"W/\"datetime''2021-07-20T15%3A57%3A35.6389627Z''\"","PartitionKey":"partition","RowKey":"0","Timestamp":"2021-07-20T15:57:35.6389627Z","Value":1},{"odata.etag":"W/\"datetime''2021-07-20T15%3A57%3A35.7230224Z''\"","PartitionKey":"partition","RowKey":"1","Timestamp":"2021-07-20T15:57:35.7230224Z","Value":2},{"odata.etag":"W/\"datetime''2021-07-20T15%3A57%3A35.811085Z''\"","PartitionKey":"partition","RowKey":"2","Timestamp":"2021-07-20T15:57:35.811085Z","Value":3},{"odata.etag":"W/\"datetime''2021-07-20T15%3A57%3A35.898147Z''\"","PartitionKey":"partition","RowKey":"3","Timestamp":"2021-07-20T15:57:35.898147Z","Value":4},{"odata.etag":"W/\"datetime''2021-07-20T15%3A57%3A35.9842082Z''\"","PartitionKey":"partition","RowKey":"4","Timestamp":"2021-07-20T15:57:35.9842082Z","Value":5}]}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + Date: + - Tue, 20 Jul 2021 15:57:35 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - fa96f1e0-3002-0071-417f-7d0e5e000000 + X-Ms-Version: + - "2019-02-02" + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Tue, 20 Jul 2021 15:57:35 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/Tables('gotablemwc9x1cbe9eur') + method: DELETE + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Date: + - Tue, 20 Jul 2021 15:57:35 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - fa96f214-3002-0071-737f-7d0e5e000000 + X-Ms-Version: + - "2019-02-02" + status: 204 No Content + code: 204 + duration: "" diff --git a/sdk/tables/aztable/table_batch_test.go b/sdk/tables/aztable/table_batch_test.go index 65dd8226e8c8..851cbf573796 100644 --- a/sdk/tables/aztable/table_batch_test.go +++ b/sdk/tables/aztable/table_batch_test.go @@ -32,7 +32,7 @@ func (s *tableClientLiveTests) TestBatchAdd() { require.Equal(r.StatusCode, http.StatusNoContent) } - pager := client.Query(nil) + pager := client.List(nil) count := 0 for pager.NextPage(ctx) { response := pager.PageResponse() @@ -69,8 +69,8 @@ func (s *tableClientLiveTests) TestBatchMixed() { var qResp TableEntityQueryByteResponseResponse filter := "RowKey eq '1'" - query := &QueryOptions{Filter: &filter} - pager := client.Query(query) + list := &ListOptions{Filter: &filter} + pager := client.List(list) for pager.NextPage(ctx) { qResp = pager.PageResponse() } @@ -125,7 +125,7 @@ func (s *tableClientLiveTests) TestBatchMixed() { } - pager = client.Query(query) + pager = client.List(list) for pager.NextPage(ctx) { qResp = pager.PageResponse() } diff --git a/sdk/tables/aztable/table_client.go b/sdk/tables/aztable/table_client.go index 6740cb0c8ce7..8fb6c93ea071 100644 --- a/sdk/tables/aztable/table_client.go +++ b/sdk/tables/aztable/table_client.go @@ -42,8 +42,8 @@ func (t *TableClient) Delete(ctx context.Context) (TableDeleteResponse, error) { return t.service.Delete(ctx, t.Name) } -// Query queries the tables using the specified QueryOptions. -// QueryOptions can specify the following properties to affect the query results returned: +// List queries the entities using the specified ListOptions. +// ListOptions can specify the following properties to affect the query results returned: // // Filter: An Odata filter expression that limits results to those entities that satisfy the filter expression. // For example, the following expression would return only entities with a PartitionKey of 'foo': "PartitionKey eq 'foo'" @@ -54,19 +54,20 @@ func (t *TableClient) Delete(ctx context.Context) (TableDeleteResponse, error) { // Top: The maximum number of entities that will be returned per page of results. // Note: This value does not limit the total number of results if NextPage is called on the returned Pager until it returns false. // -// Query returns a Pager, which allows iteration through each page of results. Example: +// List returns a Pager, which allows iteration through each page of results. Example: // -// pager := client.Query(nil) +// options := &ListOptions{Filter: to.StringPtr("PartitionKey eq 'pk001'"), Top: to.Int32Ptr(25), Select: to.StringPtr("PartitionKey,RowKey,Value,Price")} +// pager := client.List(options) // Pass in 'nil' if you want to return all Entities for an account. // for pager.NextPage(ctx) { // resp = pager.PageResponse() -// fmt.Sprintf("The page contains %i results", len(resp.TableEntityQueryResponse.Value)) +// fmt.Printf("The page contains %i results.\n", len(resp.TableEntityQueryResponse.Value)) // } // err := pager.Err() -func (t *TableClient) Query(queryOptions *QueryOptions) TableEntityQueryResponsePager { - if queryOptions == nil { - queryOptions = &QueryOptions{} - } - return &tableEntityQueryResponsePager{tableClient: t, queryOptions: queryOptions, tableQueryOptions: &TableQueryEntitiesOptions{}} +func (t *TableClient) List(queryOptions *ListOptions) TableEntityQueryResponsePager { + return &tableEntityQueryResponsePager{ + tableClient: t, + queryOptions: queryOptions, + tableQueryOptions: &TableQueryEntitiesOptions{}} } // GetEntity retrieves a specific entity from the service using the specified partitionKey and rowKey values. diff --git a/sdk/tables/aztable/table_client_test.go b/sdk/tables/aztable/table_client_test.go index 53f841ca5e42..0c2f31f3c6e9 100644 --- a/sdk/tables/aztable/table_client_test.go +++ b/sdk/tables/aztable/table_client_test.go @@ -117,7 +117,7 @@ func (s *tableClientLiveTests) TestMergeEntity() { require.NoError(err) filter := "RowKey eq '1'" - queryOptions := &QueryOptions{Filter: &filter} + listOptions := &ListOptions{Filter: &filter} preMerge, err := client.GetEntity(ctx, entityToCreate.PartitionKey, entityToCreate.RowKey, nil) require.NoError(err) @@ -138,7 +138,7 @@ func (s *tableClientLiveTests) TestMergeEntity() { require.Nil(updateErr) var qResp TableEntityQueryByteResponseResponse - pager := client.Query(queryOptions) + pager := client.List(listOptions) for pager.NextPage(ctx) { qResp = pager.PageResponse() } @@ -167,7 +167,7 @@ func (s *tableClientLiveTests) TestUpsertEntity() { require.NoError(err) filter := "RowKey eq '1'" - query := &QueryOptions{Filter: &filter} + list := &ListOptions{Filter: &filter} // 2. Query for basic Entity preMerge, err := client.GetEntity(ctx, entityToCreate.PartitionKey, entityToCreate.RowKey, nil) @@ -189,7 +189,7 @@ func (s *tableClientLiveTests) TestUpsertEntity() { // 5. Query for new entity var qResp TableEntityQueryByteResponseResponse - pager := client.Query(query) + pager := client.List(list) for pager.NextPage(ctx) { qResp = pager.PageResponse() } @@ -220,11 +220,11 @@ func (s *tableClientLiveTests) TestQuerySimpleEntity() { } filter := "RowKey lt '5'" - query := &QueryOptions{Filter: &filter} + list := &ListOptions{Filter: &filter} expectedCount := 4 var resp TableEntityQueryByteResponseResponse - pager := client.Query(query) + pager := client.List(list) for pager.NextPage(ctx) { resp = pager.PageResponse() require.Equal(len(resp.TableEntityQueryResponse.Value), expectedCount) @@ -269,10 +269,10 @@ func (s *tableClientLiveTests) TestQueryComplexEntity() { filter := "RowKey lt '5'" expectedCount := 4 - query := &QueryOptions{Filter: &filter} + options := &ListOptions{Filter: &filter} var resp TableEntityQueryByteResponseResponse - pager := client.Query(query) + pager := client.List(options) for pager.NextPage(ctx) { resp = pager.PageResponse() require.Equal(expectedCount, len(resp.TableEntityQueryResponse.Value)) diff --git a/sdk/tables/aztable/table_pagers.go b/sdk/tables/aztable/table_pagers.go index 5e4dce565c0b..695014433428 100644 --- a/sdk/tables/aztable/table_pagers.go +++ b/sdk/tables/aztable/table_pagers.go @@ -29,7 +29,7 @@ import ( // // for pager.NextPage(ctx) { // resp = pager.PageResponse() -// fmt.sprintf("The page contains %i results", len(resp.TableEntityQueryResponse.Value)) +// fmt.Printf("The page contains %i results.\n", len(resp.TableEntityQueryResponse.Value)) // } // err := pager.Err() type TableEntityQueryResponsePager interface { @@ -43,7 +43,7 @@ type tableEntityQueryResponsePager struct { tableClient *TableClient current *TableEntityQueryByteResponseResponse tableQueryOptions *TableQueryEntitiesOptions - queryOptions *QueryOptions + queryOptions *ListOptions err error } @@ -55,7 +55,7 @@ func (p *tableEntityQueryResponsePager) NextPage(ctx context.Context) bool { return false } var resp TableEntityQueryResponseResponse - resp, p.err = p.tableClient.client.QueryEntities(ctx, p.tableClient.Name, p.tableQueryOptions, p.queryOptions) + resp, p.err = p.tableClient.client.QueryEntities(ctx, p.tableClient.Name, p.tableQueryOptions, p.queryOptions.toQueryOptions()) c, err := castToByteResponse(&resp) if err != nil { @@ -73,7 +73,7 @@ func (p *tableEntityQueryResponsePager) NextPage(ctx context.Context) bool { // // for pager.NextPage(ctx) { // resp = pager.PageResponse() -// fmt.sprintf("The page contains %i results", len(resp.TableEntityQueryResponse.Value)) +// fmt.Printf("The page contains %i results.\n", len(resp.TableEntityQueryResponse.Value)) // } // err := pager.Err() func (p *tableEntityQueryResponsePager) PageResponse() TableEntityQueryByteResponseResponse { @@ -97,7 +97,7 @@ func (p *tableEntityQueryResponsePager) Err() error { // // for pager.NextPage(ctx) { // resp = pager.PageResponse() -// fmt.sprintf("The page contains %i results", len(resp.TableEntityQueryResponse.Value)) +// fmt.Printf("The page contains %i results.\n", len(resp.TableEntityQueryResponse.Value)) // } // err := pager.Err() type TableQueryResponsePager interface { @@ -111,7 +111,7 @@ type tableQueryResponsePager struct { client *tableClient current *TableQueryResponseResponse tableQueryOptions *TableQueryOptions - queryOptions *QueryOptions + queryOptions *ListOptions err error } @@ -123,7 +123,7 @@ func (p *tableQueryResponsePager) NextPage(ctx context.Context) bool { return false } var resp TableQueryResponseResponse - resp, p.err = p.client.Query(ctx, p.tableQueryOptions, p.queryOptions) + resp, p.err = p.client.Query(ctx, p.tableQueryOptions, p.queryOptions.toQueryOptions()) p.current = &resp p.tableQueryOptions.NextTableName = resp.XMSContinuationNextTableName return p.err == nil && resp.TableQueryResponse.Value != nil && len(resp.TableQueryResponse.Value) > 0 @@ -134,7 +134,7 @@ func (p *tableQueryResponsePager) NextPage(ctx context.Context) bool { // // for pager.NextPage(ctx) { // resp = pager.PageResponse() -// fmt.sprintf("The page contains %i results", len(resp.TableEntityQueryResponse.Value)) +// fmt.Printf("The page contains %i results.\n", len(resp.TableEntityQueryResponse.Value)) // } func (p *tableQueryResponsePager) PageResponse() TableQueryResponseResponse { return *p.current diff --git a/sdk/tables/aztable/table_service_client.go b/sdk/tables/aztable/table_service_client.go index 4f5fa650d5fc..9a0e8c84da51 100644 --- a/sdk/tables/aztable/table_service_client.go +++ b/sdk/tables/aztable/table_service_client.go @@ -54,8 +54,8 @@ func (t *TableServiceClient) Delete(ctx context.Context, name string) (TableDele return t.client.Delete(ctx, name, nil) } -// Query queries the existing tables using the specified QueryOptions. -// QueryOptions can specify the following properties to affect the query results returned: +// List queries the existing tables using the specified ListOptions. +// ListOptions can specify the following properties to affect the query results returned: // // Filter: An Odata filter expression that limits results to those tables that satisfy the filter expression. // For example, the following expression would return only tables with a TableName of 'foo': "TableName eq 'foo'" @@ -63,16 +63,21 @@ func (t *TableServiceClient) Delete(ctx context.Context, name string) (TableDele // Top: The maximum number of tables that will be returned per page of results. // Note: This value does not limit the total number of results if NextPage is called on the returned Pager until it returns false. // -// Query returns a Pager, which allows iteration through each page of results. Example: +// List returns a Pager, which allows iteration through each page of results. Example: // -// pager := client.Query(nil) +// options := &ListOptions{Filter: to.StringPtr("PartitionKey eq 'pk001'"), Top: to.Int32Ptr(25)} +// pager := client.List(options) // Pass in 'nil' if you want to return all Tables for an account. // for pager.NextPage(ctx) { // resp = pager.PageResponse() -// fmt.sprintf("The page contains %i results", len(resp.TableQueryResponse.Value)) +// fmt.Printf("The page contains %i results.\n", len(resp.TableQueryResponse.Value)) // } // err := pager.Err() -func (t *TableServiceClient) Query(queryOptions *QueryOptions) TableQueryResponsePager { - return &tableQueryResponsePager{client: t.client, queryOptions: queryOptions, tableQueryOptions: new(TableQueryOptions)} +func (t *TableServiceClient) List(listOptions *ListOptions) TableQueryResponsePager { + return &tableQueryResponsePager{ + client: t.client, + queryOptions: listOptions, + tableQueryOptions: new(TableQueryOptions), + } } // GetStatistics retrieves all the statistics for an account with Geo-redundancy established. diff --git a/sdk/tables/aztable/table_service_client_test.go b/sdk/tables/aztable/table_service_client_test.go index c66839660353..db8e54145f25 100644 --- a/sdk/tables/aztable/table_service_client_test.go +++ b/sdk/tables/aztable/table_service_client_test.go @@ -101,7 +101,7 @@ func (s *tableServiceClientLiveTests) TestQueryTable() { // Query for tables with no pagination. The filter should exclude one table from the results filter := fmt.Sprintf("TableName ge '%s' and TableName lt '%s'", prefix1, prefix2) - pager := context.client.Query(&QueryOptions{Filter: &filter}) + pager := context.client.List(&ListOptions{Filter: &filter}) resultCount := 0 for pager.NextPage(ctx) { @@ -114,7 +114,7 @@ func (s *tableServiceClientLiveTests) TestQueryTable() { // Query for tables with pagination top := int32(2) - pager = context.client.Query(&QueryOptions{Filter: &filter, Top: &top}) + pager = context.client.List(&ListOptions{Filter: &filter, Top: &top}) resultCount = 0 pageCount := 0 @@ -129,6 +129,45 @@ func (s *tableServiceClientLiveTests) TestQueryTable() { require.Equal(pageCount, int(top)) } +func clearAllTables(context *testContext) error { + pager := context.client.List(nil) + for pager.NextPage(ctx) { + resp := pager.PageResponse() + for _, v := range resp.TableQueryResponse.Value { + _, err := context.client.Delete(ctx, *v.TableName) + if err != nil { + return err + } + } + } + return pager.Err() +} + +func (s *tableServiceClientLiveTests) TestListTables() { + require := require.New(s.T()) + context := getTestContext(s.T().Name()) + tableName, err := getTableName(context) + require.NoError(err) + + err = clearAllTables(context) + require.NoError(err) + + for i := 0; i < 5; i++ { + _, err := context.client.Create(ctx, fmt.Sprintf("%v%v", tableName, i)) + require.NoError(err) + } + + count := 0 + pager := context.client.List(nil) + for pager.NextPage(ctx) { + resp := pager.PageResponse() + count += len(resp.TableQueryResponse.Value) + } + + require.NoError(pager.Err()) + require.Equal(5, count) +} + func (s *tableServiceClientLiveTests) TestGetStatistics() { require := require.New(s.T()) context := getTestContext(s.T().Name()) diff --git a/sdk/tables/aztable/zt_table_recorded_tests.go b/sdk/tables/aztable/zt_table_recorded_tests.go index 5b2edcd5a0cb..d32bcb23330b 100644 --- a/sdk/tables/aztable/zt_table_recorded_tests.go +++ b/sdk/tables/aztable/zt_table_recorded_tests.go @@ -103,11 +103,30 @@ func recordedTestTeardown(key string) { } } +func insertNEntities(pk string, n int, client *TableClient) error { + for i := 0; i < n; i++ { + e := &map[string]interface{}{ + "PartitionKey": pk, + "RowKey": fmt.Sprint(i), + "Value": i + 1, + } + marshalled, err := json.Marshal(e) + if err != nil { + return err + } + _, err = client.AddEntity(ctx, marshalled) + if err != nil { + return err + } + } + return nil +} + // cleans up the specified tables. If tables is nil, all tables will be deleted func cleanupTables(context *testContext, tables *[]string) { c := context.client if tables == nil { - pager := c.Query(nil) + pager := c.List(nil) for pager.NextPage(ctx) { for _, t := range pager.PageResponse().TableQueryResponse.Value { _, err := c.Delete(ctx, *t.TableName) From 6e697902fb0aeff8bcb33313d201a337a5c5af90 Mon Sep 17 00:00:00 2001 From: Sean Kane <68240067+seankane-msft@users.noreply.github.com> Date: Mon, 26 Jul 2021 17:26:11 -0400 Subject: [PATCH 30/42] [Tables] Update transactions method (#15125) * adding test for custom entity * further * starting access policy * working for basic entity * adding to test * new generated code, removed one more test * AddEntity now takes []bytes * adding directive to change entity to []byte, changes to compile and be able to pass * converting Value map[string]interface{} -> []byte in convenience layer * paging works the same way now too * fixing two tests, update complex and basic test entities, need to add type hints for int64/float64 types * adding test for delete method, changed delete etag to be nil * working test for merge * Added Merge test * fix up test query simple entity * complex query test * everything except for batch tests * basic batch functionality * fixing batch mixed test * fixed last batch test * added separate file for testing batch actions * fixing query on table service client to take a pointer as well * working on annotating entities * fixing recordings * working with odata annotations * working test for using odata to annotate entity * adding options to get * working with embedded entity now too * adding to entity, peeling off prints * converted to a type * first change to add EdmEntity type * updated unmarshalling * removing two files * fix editLink * removing sample * cleaning up * removing more code * cleaning up * re-record and remove methods * more cleanup * formatting * having issues with cosmos tests --- sdk/tables/aztable/entity_test.go | 34 -- .../TestAddAnnotatedEntity.yaml | 174 --------- .../TestAddBasicEntity-variables.yaml | 2 +- .../TestAddBasicEntity.yaml | 56 +-- .../TestAddComplexEntity-variables.yaml | 2 +- .../TestAddComplexEntity.yaml | 34 +- .../TestAddEntity-variables.yaml | 2 +- .../TestTableClient_Cosmos/TestAddEntity.yaml | 34 +- .../TestBatchAdd-variables.yaml | 2 +- .../TestTableClient_Cosmos/TestBatchAdd.yaml | 172 ++++---- ...s.yaml => TestBatchComplex-variables.yaml} | 2 +- .../TestBatchComplex.yaml | 296 ++++++++++++++ .../TestBatchError-variables.yaml | 2 +- .../TestBatchError.yaml | 74 ++-- .../TestBatchMixed-variables.yaml | 2 +- .../TestBatchMixed.yaml | 162 ++++---- .../TestCreateTable-variables.yaml | 2 +- .../TestCreateTable.yaml | 22 +- .../TestDeleteEntity-variables.yaml | 2 +- .../TestDeleteEntity.yaml | 42 +- .../TestEdmMarshalling-variables.yaml | 2 +- .../TestEdmMarshalling.yaml | 46 +-- .../TestInvalidEntity-variables.yaml | 2 +- .../TestInvalidEntity.yaml | 34 +- .../TestListEntities-variables.yaml | 5 - .../TestListEntities.yaml | 305 --------------- .../TestMergeEntity-variables.yaml | 2 +- .../TestMergeEntity.yaml | 70 ++-- .../TestQueryComplexEntity-variables.yaml | 2 +- .../TestQueryComplexEntity.yaml | 92 ++--- .../TestQuerySimpleEntity-variables.yaml | 2 +- .../TestQuerySimpleEntity.yaml | 100 ++--- .../TestServiceErrors-variables.yaml | 2 +- .../TestServiceErrors.yaml | 32 +- .../TestUpsertEntity-variables.yaml | 2 +- .../TestUpsertEntity.yaml | 68 ++-- .../TestBatchAdd-variables.yaml | 2 +- .../TestTableClient_Storage/TestBatchAdd.yaml | 172 ++++---- .../TestBatchComplex-variables.yaml | 5 + .../TestBatchComplex.yaml | 366 ++++++++++++++++++ .../TestBatchError-variables.yaml | 2 +- .../TestBatchError.yaml | 74 ++-- .../TestBatchMixed-variables.yaml | 2 +- .../TestBatchMixed.yaml | 164 ++++---- sdk/tables/aztable/table_batch_test.go | 125 +++++- sdk/tables/aztable/table_pagers.go | 82 ---- .../aztable/table_service_client_test.go | 9 +- .../aztable/table_transactional_batch.go | 31 +- sdk/tables/aztable/zt_table_recorded_tests.go | 55 +-- sdk/tables/aztable/zz_generated_connection.go | 1 + 50 files changed, 1571 insertions(+), 1403 deletions(-) delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddAnnotatedEntity.yaml rename sdk/tables/aztable/recordings/TestTableClient_Cosmos/{TestAddAnnotatedEntity-variables.yaml => TestBatchComplex-variables.yaml} (84%) create mode 100644 sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchComplex.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestListEntities-variables.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestListEntities.yaml create mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchComplex-variables.yaml create mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchComplex.yaml diff --git a/sdk/tables/aztable/entity_test.go b/sdk/tables/aztable/entity_test.go index d075a0bec75a..1f63bb29fba6 100644 --- a/sdk/tables/aztable/entity_test.go +++ b/sdk/tables/aztable/entity_test.go @@ -6,7 +6,6 @@ package aztable import ( "encoding/json" "fmt" - "time" "github.com/stretchr/testify/require" ) @@ -58,39 +57,6 @@ func (s *tableClientLiveTests) TestAddBasicEntity() { require.Equal(count, 1) } -func createEdmEntity(count int, pk string) EdmEntity { - return EdmEntity{ - Entity: Entity{ - PartitionKey: pk, - RowKey: fmt.Sprint(count), - }, - Properties: map[string]interface{}{ - "Bool": false, - "Int32": int32(1234), - "Int64": EdmInt64(123456789012), - "Double": 1234.1234, - "String": "test", - "Guid": EdmGuid("4185404a-5818-48c3-b9be-f217df0dba6f"), - "DateTime": EdmDateTime(time.Date(2013, time.August, 02, 17, 37, 43, 9004348, time.UTC)), - "Binary": EdmBinary("SomeBinary"), - }, - } -} - -func requireSameDateTime(r *require.Assertions, time1, time2 interface{}) { - t1 := time.Time(time1.(EdmDateTime)) - t2 := time.Time(time2.(EdmDateTime)) - r.Equal(t1.Year(), t2.Year()) - r.Equal(t1.Month(), t2.Month()) - r.Equal(t1.Day(), t2.Day()) - r.Equal(t1.Hour(), t2.Hour()) - r.Equal(t1.Minute(), t2.Minute()) - r.Equal(t1.Second(), t2.Second()) - z1, _ := t1.Zone() - z2, _ := t2.Zone() - r.Equal(z1, z2) -} - func (s *tableClientLiveTests) TestEdmMarshalling() { require := require.New(s.T()) client, delete := s.init(true) diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddAnnotatedEntity.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddAnnotatedEntity.yaml deleted file mode 100644 index fd3217ac9531..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddAnnotatedEntity.yaml +++ /dev/null @@ -1,174 +0,0 @@ ---- -version: 1 -interactions: -- request: - body: '{"TableName":"gotablepallqj0201avk"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "36" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Thu, 15 Jul 2021 22:58:44 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/Tables - method: POST - response: - body: '{"TableName":"gotablepallqj0201avk","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' - headers: - Content-Type: - - application/json;odata=minimalmetadata - Date: - - Thu, 15 Jul 2021 22:58:44 GMT - Etag: - - W/"datetime'2021-07-15T22%3A58%3A45.2678664Z'" - Location: - - https://seankaneprim.table.cosmos.azure.com/Tables('gotablepallqj0201avk') - X-Ms-Request-Id: - - 3404ad65-df83-4669-a67e-d92d53a646a6 - status: 201 Created - code: 201 - duration: "" -- request: - body: '{"Binary":"YmluYXJ5","Binary@odata.type":"Edm.Binary","Bool":true,"Bool@odata.type":"Edm.Boolean","DateType":"2021-04-01T01:01:01.000000001Z","DateType@odata.type":"Edm.DateTime","FloatType":8589934592,"FloatType@odata.type":"Edm.Double","PartitionKey":"partition","RowKey":"1","Small":10,"Small@odata.type":"Edm.Int32","Stringy":"somestring","Stringy@odata.type":"Edm.String","Timestamp":"0001-01-01T00:00:00Z","large":"1125899906842624","large@odata.type":"Edm.Int64"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "470" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - Prefer: - - return-no-content - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Thu, 15 Jul 2021 22:58:45 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotablepallqj0201avk - method: POST - response: - body: "" - headers: - Date: - - Thu, 15 Jul 2021 22:58:45 GMT - Etag: - - W/"datetime'2021-07-15T22%3A58%3A45.8681352Z'" - Location: - - https://seankaneprim.table.cosmos.azure.com/gotablepallqj0201avk(PartitionKey='partition',RowKey='1') - Preference-Applied: - - return-no-content - X-Ms-Request-Id: - - a6db774e-808f-4f3e-b391-749ca5c2f3d8 - status: 204 No Content - code: 204 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Thu, 15 Jul 2021 22:58:45 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotablepallqj0201avk(PartitionKey='partition',RowKey='1')?%24format=application%2Fjson%3Bodata%3Dfullmetadata - method: GET - response: - body: '{"odata.metadata":"https://seankaneprim.table.cosmos.azure.com/gotablepallqj0201avk/$metadata#gotablepallqj0201avk/@Element","odata.etag":"W/\"datetime''2021-07-15T22%3A58%3A45.8681352Z''\"","Binary@odata.type":"Edm.Binary","Binary":"YmluYXJ5","Bool":true,"DateType@odata.type":"Edm.DateTime","DateType":"2021-04-01T01:01:01.0000000Z","FloatType":8589934592.0,"PartitionKey":"partition","RowKey":"1","Small":10,"Stringy":"somestring","large@odata.type":"Edm.Int64","large":"1125899906842624","Timestamp":"2021-07-15T22:58:45.8681352Z"}' - headers: - Content-Type: - - application/json;odata=minimalmetadata - Date: - - Thu, 15 Jul 2021 22:58:45 GMT - Etag: - - W/"datetime'2021-07-15T22%3A58%3A45.8681352Z'" - X-Ms-Request-Id: - - 24c82b14-f148-47b0-b6ef-c6b7523a8e5b - status: 200 OK - code: 200 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Thu, 15 Jul 2021 22:58:46 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotablepallqj0201avk()?%24filter=PartitionKey+eq+%27partition%27 - method: GET - response: - body: '{"value":[{"odata.etag":"W/\"datetime''2021-07-15T22%3A58%3A45.8681352Z''\"","Binary@odata.type":"Edm.Binary","Binary":"YmluYXJ5","Bool":true,"DateType@odata.type":"Edm.DateTime","DateType":"2021-04-01T01:01:01.0000000Z","FloatType":8589934592.0,"PartitionKey":"partition","RowKey":"1","Small":10,"Stringy":"somestring","large@odata.type":"Edm.Int64","large":"1125899906842624","Timestamp":"2021-07-15T22:58:45.8681352Z"}],"odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#gotablepallqj0201avk"}' - headers: - Content-Type: - - application/json;odata=minimalmetadata - Date: - - Thu, 15 Jul 2021 22:58:45 GMT - X-Ms-Request-Id: - - 84a2c26f-242e-4766-93f7-a4d0ea6066e2 - status: 200 OK - code: 200 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Thu, 15 Jul 2021 22:58:46 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/Tables('gotablepallqj0201avk') - method: DELETE - response: - body: "" - headers: - Date: - - Thu, 15 Jul 2021 22:58:45 GMT - X-Ms-Request-Id: - - 89a2a4a0-0431-420b-849a-ba02de9e4846 - status: 204 No Content - code: 204 - duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddBasicEntity-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddBasicEntity-variables.yaml index c5b43dc020c5..96cebe74a3fc 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddBasicEntity-variables.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddBasicEntity-variables.yaml @@ -2,4 +2,4 @@ COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com TABLES_COSMOS_ACCOUNT_NAME: seankaneprim TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== -randomSeed: "1626385589" +randomSeed: "1627334282" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddBasicEntity.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddBasicEntity.yaml index 76ca94d73a1d..3d488093c902 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddBasicEntity.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddBasicEntity.yaml @@ -2,7 +2,7 @@ version: 1 interactions: - request: - body: '{"TableName":"gotablebl2ap6whow6mv"}' + body: '{"TableName":"gotableamcn20ijkx7u4"}' form: {} headers: Accept: @@ -19,24 +19,24 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:46:29 GMT + - Mon, 26 Jul 2021 21:18:02 GMT X-Ms-Version: - "2019-02-02" url: https://seankaneprim.table.cosmos.azure.com/Tables method: POST response: - body: '{"TableName":"gotablebl2ap6whow6mv","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' + body: '{"TableName":"gotableamcn20ijkx7u4","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' headers: Content-Type: - application/json;odata=minimalmetadata Date: - - Thu, 15 Jul 2021 21:46:28 GMT + - Mon, 26 Jul 2021 21:18:03 GMT Etag: - - W/"datetime'2021-07-15T21%3A46%3A28.6970888Z'" + - W/"datetime'2021-07-26T21%3A18%3A04.0339464Z'" Location: - - https://seankaneprim.table.cosmos.azure.com/Tables('gotablebl2ap6whow6mv') + - https://seankaneprim.table.cosmos.azure.com/Tables('gotableamcn20ijkx7u4') X-Ms-Request-Id: - - a63137b5-a058-4c62-9cf7-3889816a1196 + - f8d50058-35e2-42b3-8184-eab741185b85 status: 201 Created code: 201 duration: "" @@ -60,24 +60,24 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:46:30 GMT + - Mon, 26 Jul 2021 21:18:04 GMT X-Ms-Version: - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotablebl2ap6whow6mv + url: https://seankaneprim.table.cosmos.azure.com/gotableamcn20ijkx7u4 method: POST response: body: "" headers: Date: - - Thu, 15 Jul 2021 21:46:28 GMT + - Mon, 26 Jul 2021 21:18:04 GMT Etag: - - W/"datetime'2021-07-15T21%3A46%3A29.5142408Z'" + - W/"datetime'2021-07-26T21%3A18%3A04.7328264Z'" Location: - - https://seankaneprim.table.cosmos.azure.com/gotablebl2ap6whow6mv(PartitionKey='pk001',RowKey='rk001') + - https://seankaneprim.table.cosmos.azure.com/gotableamcn20ijkx7u4(PartitionKey='pk001',RowKey='rk001') Preference-Applied: - return-no-content X-Ms-Request-Id: - - 53a948f0-da61-4e8c-bfa9-2e34faaff714 + - 10192d8b-5f8e-4937-bfe3-edc3aaf141bf status: 204 No Content code: 204 duration: "" @@ -95,22 +95,22 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:46:30 GMT + - Mon, 26 Jul 2021 21:18:04 GMT X-Ms-Version: - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotablebl2ap6whow6mv(PartitionKey='pk001',RowKey='rk001') + url: https://seankaneprim.table.cosmos.azure.com/gotableamcn20ijkx7u4(PartitionKey='pk001',RowKey='rk001') method: GET response: - body: '{"odata.metadata":"https://seankaneprim.table.cosmos.azure.com/gotablebl2ap6whow6mv/$metadata#gotablebl2ap6whow6mv/@Element","odata.etag":"W/\"datetime''2021-07-15T21%3A46%3A29.5142408Z''\"","Bool":true,"Integer":10,"PartitionKey":"pk001","RowKey":"rk001","String":"abcdef","Timestamp":"2021-07-15T21:46:29.5142408Z"}' + body: '{"odata.metadata":"https://seankaneprim.table.cosmos.azure.com/gotableamcn20ijkx7u4/$metadata#gotableamcn20ijkx7u4/@Element","odata.etag":"W/\"datetime''2021-07-26T21%3A18%3A04.7328264Z''\"","Bool":true,"Integer":10,"PartitionKey":"pk001","RowKey":"rk001","String":"abcdef","Timestamp":"2021-07-26T21:18:04.7328264Z"}' headers: Content-Type: - application/json;odata=minimalmetadata Date: - - Thu, 15 Jul 2021 21:46:28 GMT + - Mon, 26 Jul 2021 21:18:04 GMT Etag: - - W/"datetime'2021-07-15T21%3A46%3A29.5142408Z'" + - W/"datetime'2021-07-26T21%3A18%3A04.7328264Z'" X-Ms-Request-Id: - - b54a013c-816b-4546-8a60-5288a2abfafb + - d21ce88b-42a5-42f6-b690-76ae28f946f8 status: 200 OK code: 200 duration: "" @@ -128,20 +128,20 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:46:30 GMT + - Mon, 26 Jul 2021 21:18:04 GMT X-Ms-Version: - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotablebl2ap6whow6mv()?%24filter=PartitionKey+eq+%27pk001%27 + url: https://seankaneprim.table.cosmos.azure.com/gotableamcn20ijkx7u4()?%24filter=PartitionKey+eq+%27pk001%27 method: GET response: - body: '{"value":[{"odata.etag":"W/\"datetime''2021-07-15T21%3A46%3A29.5142408Z''\"","Bool":true,"Integer":10,"PartitionKey":"pk001","RowKey":"rk001","String":"abcdef","Timestamp":"2021-07-15T21:46:29.5142408Z"}],"odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#gotablebl2ap6whow6mv"}' + body: '{"value":[{"odata.etag":"W/\"datetime''2021-07-26T21%3A18%3A04.7328264Z''\"","Bool":true,"Integer":10,"PartitionKey":"pk001","RowKey":"rk001","String":"abcdef","Timestamp":"2021-07-26T21:18:04.7328264Z"}],"odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#gotableamcn20ijkx7u4"}' headers: Content-Type: - application/json;odata=minimalmetadata Date: - - Thu, 15 Jul 2021 21:46:28 GMT + - Mon, 26 Jul 2021 21:18:04 GMT X-Ms-Request-Id: - - a3244a69-0715-4c4f-8b35-bc3b49dcbc1c + - 07ad4f7a-8845-4566-8d59-fd929100fbc2 status: 200 OK code: 200 duration: "" @@ -157,18 +157,18 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:46:30 GMT + - Mon, 26 Jul 2021 21:18:04 GMT X-Ms-Version: - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/Tables('gotablebl2ap6whow6mv') + url: https://seankaneprim.table.cosmos.azure.com/Tables('gotableamcn20ijkx7u4') method: DELETE response: body: "" headers: Date: - - Thu, 15 Jul 2021 21:46:29 GMT + - Mon, 26 Jul 2021 21:18:04 GMT X-Ms-Request-Id: - - 75dc3bcf-da16-4f8d-bed2-eff9981af61c + - 6f127575-c97c-4047-879a-42873cd8abdf status: 204 No Content code: 204 duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddComplexEntity-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddComplexEntity-variables.yaml index 4d621b700683..e574b5c9e034 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddComplexEntity-variables.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddComplexEntity-variables.yaml @@ -2,4 +2,4 @@ COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com TABLES_COSMOS_ACCOUNT_NAME: seankaneprim TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== -randomSeed: "1626385591" +randomSeed: "1627334285" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddComplexEntity.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddComplexEntity.yaml index 911e1d284fbf..7201fe41ff27 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddComplexEntity.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddComplexEntity.yaml @@ -2,7 +2,7 @@ version: 1 interactions: - request: - body: '{"TableName":"gotable7yilahvs8t936"}' + body: '{"TableName":"gotablecvs8l6496wx51"}' form: {} headers: Accept: @@ -19,24 +19,24 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:46:31 GMT + - Mon, 26 Jul 2021 21:18:05 GMT X-Ms-Version: - "2019-02-02" url: https://seankaneprim.table.cosmos.azure.com/Tables method: POST response: - body: '{"TableName":"gotable7yilahvs8t936","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' + body: '{"TableName":"gotablecvs8l6496wx51","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' headers: Content-Type: - application/json;odata=minimalmetadata Date: - - Thu, 15 Jul 2021 21:46:30 GMT + - Mon, 26 Jul 2021 21:18:05 GMT Etag: - - W/"datetime'2021-07-15T21%3A46%3A30.2801928Z'" + - W/"datetime'2021-07-26T21%3A18%3A05.6182792Z'" Location: - - https://seankaneprim.table.cosmos.azure.com/Tables('gotable7yilahvs8t936') + - https://seankaneprim.table.cosmos.azure.com/Tables('gotablecvs8l6496wx51') X-Ms-Request-Id: - - bb09c7ae-a419-404c-9f5d-991fb636b92c + - 9ad2109a-edb0-41ae-ab54-c42cd11d7e9b status: 201 Created code: 201 duration: "" @@ -60,24 +60,24 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:46:32 GMT + - Mon, 26 Jul 2021 21:18:06 GMT X-Ms-Version: - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotable7yilahvs8t936 + url: https://seankaneprim.table.cosmos.azure.com/gotablecvs8l6496wx51 method: POST response: body: "" headers: Date: - - Thu, 15 Jul 2021 21:46:30 GMT + - Mon, 26 Jul 2021 21:18:05 GMT Etag: - - W/"datetime'2021-07-15T21%3A46%3A31.0695944Z'" + - W/"datetime'2021-07-26T21%3A18%3A06.3533064Z'" Location: - - https://seankaneprim.table.cosmos.azure.com/gotable7yilahvs8t936(PartitionKey='partition',RowKey='1') + - https://seankaneprim.table.cosmos.azure.com/gotablecvs8l6496wx51(PartitionKey='partition',RowKey='1') Preference-Applied: - return-no-content X-Ms-Request-Id: - - 6c95cb60-29ef-4e61-8e49-6dffff0f3350 + - 609ee405-b189-4e30-aa56-a821bffa806a status: 204 No Content code: 204 duration: "" @@ -93,18 +93,18 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:46:32 GMT + - Mon, 26 Jul 2021 21:18:06 GMT X-Ms-Version: - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/Tables('gotable7yilahvs8t936') + url: https://seankaneprim.table.cosmos.azure.com/Tables('gotablecvs8l6496wx51') method: DELETE response: body: "" headers: Date: - - Thu, 15 Jul 2021 21:46:30 GMT + - Mon, 26 Jul 2021 21:18:06 GMT X-Ms-Request-Id: - - c4afe428-9568-453b-8fde-6cf596df1317 + - 73450a84-9f70-4f79-b08f-170416d3faa1 status: 204 No Content code: 204 duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddEntity-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddEntity-variables.yaml index b70ba076bf9d..896c961b3a71 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddEntity-variables.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddEntity-variables.yaml @@ -2,4 +2,4 @@ COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com TABLES_COSMOS_ACCOUNT_NAME: seankaneprim TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== -randomSeed: "1626385592" +randomSeed: "1627334286" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddEntity.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddEntity.yaml index 31b78fcf9b21..dbf22d65b3d2 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddEntity.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddEntity.yaml @@ -2,7 +2,7 @@ version: 1 interactions: - request: - body: '{"TableName":"gotablersiz9waigs6h9"}' + body: '{"TableName":"gotable74vbfumji7tiq"}' form: {} headers: Accept: @@ -19,24 +19,24 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:46:32 GMT + - Mon, 26 Jul 2021 21:18:06 GMT X-Ms-Version: - "2019-02-02" url: https://seankaneprim.table.cosmos.azure.com/Tables method: POST response: - body: '{"TableName":"gotablersiz9waigs6h9","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' + body: '{"TableName":"gotable74vbfumji7tiq","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' headers: Content-Type: - application/json;odata=minimalmetadata Date: - - Thu, 15 Jul 2021 21:46:31 GMT + - Mon, 26 Jul 2021 21:18:06 GMT Etag: - - W/"datetime'2021-07-15T21%3A46%3A31.5985928Z'" + - W/"datetime'2021-07-26T21%3A18%3A06.8679688Z'" Location: - - https://seankaneprim.table.cosmos.azure.com/Tables('gotablersiz9waigs6h9') + - https://seankaneprim.table.cosmos.azure.com/Tables('gotable74vbfumji7tiq') X-Ms-Request-Id: - - e6b60e7d-aec5-490b-a551-ea75d7e9488e + - f8c51d05-a8f8-475b-a633-ed7b61de14e7 status: 201 Created code: 201 duration: "" @@ -61,24 +61,24 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:46:33 GMT + - Mon, 26 Jul 2021 21:18:07 GMT X-Ms-Version: - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotablersiz9waigs6h9 + url: https://seankaneprim.table.cosmos.azure.com/gotable74vbfumji7tiq method: POST response: body: "" headers: Date: - - Thu, 15 Jul 2021 21:46:31 GMT + - Mon, 26 Jul 2021 21:18:06 GMT Etag: - - W/"datetime'2021-07-15T21%3A46%3A32.4243464Z'" + - W/"datetime'2021-07-26T21%3A18%3A07.5371528Z'" Location: - - https://seankaneprim.table.cosmos.azure.com/gotablersiz9waigs6h9(PartitionKey='partition',RowKey='1') + - https://seankaneprim.table.cosmos.azure.com/gotable74vbfumji7tiq(PartitionKey='partition',RowKey='1') Preference-Applied: - return-no-content X-Ms-Request-Id: - - 2fcc82d0-5505-44fe-8724-2cd3eb64c98f + - 5e25c2bf-0b1d-45af-818e-925b1a37befc status: 204 No Content code: 204 duration: "" @@ -94,18 +94,18 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:46:33 GMT + - Mon, 26 Jul 2021 21:18:07 GMT X-Ms-Version: - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/Tables('gotablersiz9waigs6h9') + url: https://seankaneprim.table.cosmos.azure.com/Tables('gotable74vbfumji7tiq') method: DELETE response: body: "" headers: Date: - - Thu, 15 Jul 2021 21:46:31 GMT + - Mon, 26 Jul 2021 21:18:07 GMT X-Ms-Request-Id: - - d9e09a7f-27ae-4253-8e93-55a78b78ba6d + - c122c25b-6d80-4f88-bab3-ff8ac231f138 status: 204 No Content code: 204 duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchAdd-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchAdd-variables.yaml index ed2ac535e948..1a7cc99f6134 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchAdd-variables.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchAdd-variables.yaml @@ -2,4 +2,4 @@ COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com TABLES_COSMOS_ACCOUNT_NAME: seankaneprim TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== -randomSeed: "1626385593" +randomSeed: "1627334287" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchAdd.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchAdd.yaml index 1f2c41363877..613b1c504e26 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchAdd.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchAdd.yaml @@ -2,7 +2,7 @@ version: 1 interactions: - request: - body: '{"TableName":"gotableou5gp39mzhtrm"}' + body: '{"TableName":"gotable4g723xn3ey2gy"}' form: {} headers: Accept: @@ -19,70 +19,70 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:46:33 GMT + - Mon, 26 Jul 2021 21:18:07 GMT X-Ms-Version: - "2019-02-02" url: https://seankaneprim.table.cosmos.azure.com/Tables method: POST response: - body: '{"TableName":"gotableou5gp39mzhtrm","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' + body: '{"TableName":"gotable4g723xn3ey2gy","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' headers: Content-Type: - application/json;odata=minimalmetadata Date: - - Thu, 15 Jul 2021 21:46:32 GMT + - Mon, 26 Jul 2021 21:18:07 GMT Etag: - - W/"datetime'2021-07-15T21%3A46%3A32.9673736Z'" + - W/"datetime'2021-07-26T21%3A18%3A08.0795656Z'" Location: - - https://seankaneprim.table.cosmos.azure.com/Tables('gotableou5gp39mzhtrm') + - https://seankaneprim.table.cosmos.azure.com/Tables('gotable4g723xn3ey2gy') X-Ms-Request-Id: - - f2758fe6-476a-48f0-8012-c9005d4e08b8 + - 35d3cb11-3341-44fe-83e1-58c92bdecc81 status: 201 Created code: 201 duration: "" - request: - body: "--batch_93140bc0-6825-4bb0-42e6-8b82f5540c8d\r\nContent-Type: multipart/mixed; - boundary=changeset_9590c14c-3aa5-4815-72f4-da7c90c37e9e\r\n\r\n--changeset_9590c14c-3aa5-4815-72f4-da7c90c37e9e\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotableou5gp39mzhtrm?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + body: "--batch_59a4fa67-ab39-4adc-56fa-c1d2d6a236c0\r\nContent-Type: multipart/mixed; + boundary=changeset_73bcc77e-0bf4-45a2-7aa6-abd694bfa6e7\r\n\r\n--changeset_73bcc77e-0bf4-45a2-7aa6-abd694bfa6e7\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotable4g723xn3ey2gy?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 260\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Float@odata.type\":\"Edm.Double\",\"Integer\":1,\"Integer@odata.type\":\"Edm.Double\",\"PartitionKey\":\"partition\",\"RowKey\":\"1\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_9590c14c-3aa5-4815-72f4-da7c90c37e9e\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotableou5gp39mzhtrm?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + 194\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Integer\":1,\"PartitionKey\":\"partition\",\"RowKey\":\"1\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_73bcc77e-0bf4-45a2-7aa6-abd694bfa6e7\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotable4g723xn3ey2gy?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 260\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Float@odata.type\":\"Edm.Double\",\"Integer\":2,\"Integer@odata.type\":\"Edm.Double\",\"PartitionKey\":\"partition\",\"RowKey\":\"2\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_9590c14c-3aa5-4815-72f4-da7c90c37e9e\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotableou5gp39mzhtrm?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + 194\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Integer\":2,\"PartitionKey\":\"partition\",\"RowKey\":\"2\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_73bcc77e-0bf4-45a2-7aa6-abd694bfa6e7\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotable4g723xn3ey2gy?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 260\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Float@odata.type\":\"Edm.Double\",\"Integer\":3,\"Integer@odata.type\":\"Edm.Double\",\"PartitionKey\":\"partition\",\"RowKey\":\"3\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_9590c14c-3aa5-4815-72f4-da7c90c37e9e\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotableou5gp39mzhtrm?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + 194\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Integer\":3,\"PartitionKey\":\"partition\",\"RowKey\":\"3\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_73bcc77e-0bf4-45a2-7aa6-abd694bfa6e7\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotable4g723xn3ey2gy?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 260\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Float@odata.type\":\"Edm.Double\",\"Integer\":4,\"Integer@odata.type\":\"Edm.Double\",\"PartitionKey\":\"partition\",\"RowKey\":\"4\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_9590c14c-3aa5-4815-72f4-da7c90c37e9e\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotableou5gp39mzhtrm?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + 194\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Integer\":4,\"PartitionKey\":\"partition\",\"RowKey\":\"4\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_73bcc77e-0bf4-45a2-7aa6-abd694bfa6e7\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotable4g723xn3ey2gy?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 260\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Float@odata.type\":\"Edm.Double\",\"Integer\":5,\"Integer@odata.type\":\"Edm.Double\",\"PartitionKey\":\"partition\",\"RowKey\":\"5\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_9590c14c-3aa5-4815-72f4-da7c90c37e9e\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotableou5gp39mzhtrm?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + 194\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Integer\":5,\"PartitionKey\":\"partition\",\"RowKey\":\"5\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_73bcc77e-0bf4-45a2-7aa6-abd694bfa6e7\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotable4g723xn3ey2gy?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 260\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Float@odata.type\":\"Edm.Double\",\"Integer\":6,\"Integer@odata.type\":\"Edm.Double\",\"PartitionKey\":\"partition\",\"RowKey\":\"6\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_9590c14c-3aa5-4815-72f4-da7c90c37e9e\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotableou5gp39mzhtrm?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + 194\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Integer\":6,\"PartitionKey\":\"partition\",\"RowKey\":\"6\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_73bcc77e-0bf4-45a2-7aa6-abd694bfa6e7\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotable4g723xn3ey2gy?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 260\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Float@odata.type\":\"Edm.Double\",\"Integer\":7,\"Integer@odata.type\":\"Edm.Double\",\"PartitionKey\":\"partition\",\"RowKey\":\"7\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_9590c14c-3aa5-4815-72f4-da7c90c37e9e\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotableou5gp39mzhtrm?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + 194\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Integer\":7,\"PartitionKey\":\"partition\",\"RowKey\":\"7\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_73bcc77e-0bf4-45a2-7aa6-abd694bfa6e7\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotable4g723xn3ey2gy?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 260\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Float@odata.type\":\"Edm.Double\",\"Integer\":8,\"Integer@odata.type\":\"Edm.Double\",\"PartitionKey\":\"partition\",\"RowKey\":\"8\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_9590c14c-3aa5-4815-72f4-da7c90c37e9e\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotableou5gp39mzhtrm?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + 194\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Integer\":8,\"PartitionKey\":\"partition\",\"RowKey\":\"8\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_73bcc77e-0bf4-45a2-7aa6-abd694bfa6e7\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotable4g723xn3ey2gy?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 260\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Float@odata.type\":\"Edm.Double\",\"Integer\":9,\"Integer@odata.type\":\"Edm.Double\",\"PartitionKey\":\"partition\",\"RowKey\":\"9\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_9590c14c-3aa5-4815-72f4-da7c90c37e9e\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotableou5gp39mzhtrm?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + 194\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Integer\":9,\"PartitionKey\":\"partition\",\"RowKey\":\"9\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_73bcc77e-0bf4-45a2-7aa6-abd694bfa6e7\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotable4g723xn3ey2gy?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 262\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Float@odata.type\":\"Edm.Double\",\"Integer\":10,\"Integer@odata.type\":\"Edm.Double\",\"PartitionKey\":\"partition\",\"RowKey\":\"10\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_9590c14c-3aa5-4815-72f4-da7c90c37e9e--\r\n\r\n--batch_93140bc0-6825-4bb0-42e6-8b82f5540c8d--\r\n" + 196\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Integer\":10,\"PartitionKey\":\"partition\",\"RowKey\":\"10\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_73bcc77e-0bf4-45a2-7aa6-abd694bfa6e7--\r\n\r\n--batch_59a4fa67-ab39-4adc-56fa-c1d2d6a236c0--\r\n" form: {} headers: Accept: @@ -90,69 +90,69 @@ interactions: Authorization: - sanitized Content-Length: - - "7210" + - "6550" Content-Type: - - multipart/mixed; boundary=batch_93140bc0-6825-4bb0-42e6-8b82f5540c8d + - multipart/mixed; boundary=batch_59a4fa67-ab39-4adc-56fa-c1d2d6a236c0 Dataserviceversion: - "3.0" User-Agent: - azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:46:34 GMT + - Mon, 26 Jul 2021 21:18:08 GMT X-Ms-Version: - "2019-02-02" url: https://seankaneprim.table.cosmos.azure.com/$batch method: POST response: - body: "--batchresponse_5d29f480-28d5-485d-931f-483d0770524f\r\nContent-Type: multipart/mixed; - boundary=changesetresponse_3e0b5204-2bd4-48b6-8463-e562b19d401c\r\n\r\n--changesetresponse_3e0b5204-2bd4-48b6-8463-e562b19d401c\nContent-Type: + body: "--batchresponse_1ea07688-954d-4b6b-8e4f-511b17442a87\r\nContent-Type: multipart/mixed; + boundary=changesetresponse_98797719-e86b-4e00-b09e-3d74041d2fb5\r\n\r\n--changesetresponse_98797719-e86b-4e00-b09e-3d74041d2fb5\nContent-Type: application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: - W/\"datetime'2021-07-15T21%3A46%3A33.8196488Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: - https://seankaneprim.table.cosmos.azure.com/gotableou5gp39mzhtrm(PartitionKey='partition',RowKey='1')\r\nContent-ID: - 1\r\n\r\n\r\n--changesetresponse_3e0b5204-2bd4-48b6-8463-e562b19d401c\nContent-Type: + W/\"datetime'2021-07-26T21%3A18%3A08.7137288Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: + https://seankaneprim.table.cosmos.azure.com/gotable4g723xn3ey2gy(PartitionKey='partition',RowKey='1')\r\nContent-ID: + 1\r\n\r\n\r\n--changesetresponse_98797719-e86b-4e00-b09e-3d74041d2fb5\nContent-Type: application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: - W/\"datetime'2021-07-15T21%3A46%3A33.8203656Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: - https://seankaneprim.table.cosmos.azure.com/gotableou5gp39mzhtrm(PartitionKey='partition',RowKey='2')\r\nContent-ID: - 2\r\n\r\n\r\n--changesetresponse_3e0b5204-2bd4-48b6-8463-e562b19d401c\nContent-Type: + W/\"datetime'2021-07-26T21%3A18%3A08.7143432Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: + https://seankaneprim.table.cosmos.azure.com/gotable4g723xn3ey2gy(PartitionKey='partition',RowKey='2')\r\nContent-ID: + 2\r\n\r\n\r\n--changesetresponse_98797719-e86b-4e00-b09e-3d74041d2fb5\nContent-Type: application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: - W/\"datetime'2021-07-15T21%3A46%3A33.8208776Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: - https://seankaneprim.table.cosmos.azure.com/gotableou5gp39mzhtrm(PartitionKey='partition',RowKey='3')\r\nContent-ID: - 3\r\n\r\n\r\n--changesetresponse_3e0b5204-2bd4-48b6-8463-e562b19d401c\nContent-Type: + W/\"datetime'2021-07-26T21%3A18%3A08.7147528Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: + https://seankaneprim.table.cosmos.azure.com/gotable4g723xn3ey2gy(PartitionKey='partition',RowKey='3')\r\nContent-ID: + 3\r\n\r\n\r\n--changesetresponse_98797719-e86b-4e00-b09e-3d74041d2fb5\nContent-Type: application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: - W/\"datetime'2021-07-15T21%3A46%3A33.8213896Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: - https://seankaneprim.table.cosmos.azure.com/gotableou5gp39mzhtrm(PartitionKey='partition',RowKey='4')\r\nContent-ID: - 4\r\n\r\n\r\n--changesetresponse_3e0b5204-2bd4-48b6-8463-e562b19d401c\nContent-Type: + W/\"datetime'2021-07-26T21%3A18%3A08.7152648Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: + https://seankaneprim.table.cosmos.azure.com/gotable4g723xn3ey2gy(PartitionKey='partition',RowKey='4')\r\nContent-ID: + 4\r\n\r\n\r\n--changesetresponse_98797719-e86b-4e00-b09e-3d74041d2fb5\nContent-Type: application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: - W/\"datetime'2021-07-15T21%3A46%3A33.8220040Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: - https://seankaneprim.table.cosmos.azure.com/gotableou5gp39mzhtrm(PartitionKey='partition',RowKey='5')\r\nContent-ID: - 5\r\n\r\n\r\n--changesetresponse_3e0b5204-2bd4-48b6-8463-e562b19d401c\nContent-Type: + W/\"datetime'2021-07-26T21%3A18%3A08.7155720Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: + https://seankaneprim.table.cosmos.azure.com/gotable4g723xn3ey2gy(PartitionKey='partition',RowKey='5')\r\nContent-ID: + 5\r\n\r\n\r\n--changesetresponse_98797719-e86b-4e00-b09e-3d74041d2fb5\nContent-Type: application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: - W/\"datetime'2021-07-15T21%3A46%3A33.8226184Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: - https://seankaneprim.table.cosmos.azure.com/gotableou5gp39mzhtrm(PartitionKey='partition',RowKey='6')\r\nContent-ID: - 6\r\n\r\n\r\n--changesetresponse_3e0b5204-2bd4-48b6-8463-e562b19d401c\nContent-Type: + W/\"datetime'2021-07-26T21%3A18%3A08.7159816Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: + https://seankaneprim.table.cosmos.azure.com/gotable4g723xn3ey2gy(PartitionKey='partition',RowKey='6')\r\nContent-ID: + 6\r\n\r\n\r\n--changesetresponse_98797719-e86b-4e00-b09e-3d74041d2fb5\nContent-Type: application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: - W/\"datetime'2021-07-15T21%3A46%3A33.8233352Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: - https://seankaneprim.table.cosmos.azure.com/gotableou5gp39mzhtrm(PartitionKey='partition',RowKey='7')\r\nContent-ID: - 7\r\n\r\n\r\n--changesetresponse_3e0b5204-2bd4-48b6-8463-e562b19d401c\nContent-Type: + W/\"datetime'2021-07-26T21%3A18%3A08.7163912Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: + https://seankaneprim.table.cosmos.azure.com/gotable4g723xn3ey2gy(PartitionKey='partition',RowKey='7')\r\nContent-ID: + 7\r\n\r\n\r\n--changesetresponse_98797719-e86b-4e00-b09e-3d74041d2fb5\nContent-Type: application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: - W/\"datetime'2021-07-15T21%3A46%3A33.8238472Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: - https://seankaneprim.table.cosmos.azure.com/gotableou5gp39mzhtrm(PartitionKey='partition',RowKey='8')\r\nContent-ID: - 8\r\n\r\n\r\n--changesetresponse_3e0b5204-2bd4-48b6-8463-e562b19d401c\nContent-Type: + W/\"datetime'2021-07-26T21%3A18%3A08.7166984Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: + https://seankaneprim.table.cosmos.azure.com/gotable4g723xn3ey2gy(PartitionKey='partition',RowKey='8')\r\nContent-ID: + 8\r\n\r\n\r\n--changesetresponse_98797719-e86b-4e00-b09e-3d74041d2fb5\nContent-Type: application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: - W/\"datetime'2021-07-15T21%3A46%3A33.8244616Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: - https://seankaneprim.table.cosmos.azure.com/gotableou5gp39mzhtrm(PartitionKey='partition',RowKey='9')\r\nContent-ID: - 9\r\n\r\n\r\n--changesetresponse_3e0b5204-2bd4-48b6-8463-e562b19d401c\nContent-Type: + W/\"datetime'2021-07-26T21%3A18%3A08.7171080Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: + https://seankaneprim.table.cosmos.azure.com/gotable4g723xn3ey2gy(PartitionKey='partition',RowKey='9')\r\nContent-ID: + 9\r\n\r\n\r\n--changesetresponse_98797719-e86b-4e00-b09e-3d74041d2fb5\nContent-Type: application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: - W/\"datetime'2021-07-15T21%3A46%3A33.8250760Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: - https://seankaneprim.table.cosmos.azure.com/gotableou5gp39mzhtrm(PartitionKey='partition',RowKey='10')\r\nContent-ID: - 10\r\n\r\n\r\n--changesetresponse_3e0b5204-2bd4-48b6-8463-e562b19d401c--\n--batchresponse_5d29f480-28d5-485d-931f-483d0770524f--\r\n" + W/\"datetime'2021-07-26T21%3A18%3A08.7175176Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: + https://seankaneprim.table.cosmos.azure.com/gotable4g723xn3ey2gy(PartitionKey='partition',RowKey='10')\r\nContent-ID: + 10\r\n\r\n\r\n--changesetresponse_98797719-e86b-4e00-b09e-3d74041d2fb5--\n--batchresponse_1ea07688-954d-4b6b-8e4f-511b17442a87--\r\n" headers: Content-Type: - - multipart/mixed; boundary=batchresponse_5d29f480-28d5-485d-931f-483d0770524f + - multipart/mixed; boundary=batchresponse_1ea07688-954d-4b6b-8e4f-511b17442a87 Date: - - Thu, 15 Jul 2021 21:46:32 GMT + - Mon, 26 Jul 2021 21:18:08 GMT X-Ms-Request-Id: - - ba96f63e-8fd8-49d7-aeba-f2dd976bdf56 + - 24636618-d5dc-4aa1-bbaf-a705715b2a59 status: 202 Accepted code: 202 duration: "" @@ -170,20 +170,20 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:46:34 GMT + - Mon, 26 Jul 2021 21:18:08 GMT X-Ms-Version: - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotableou5gp39mzhtrm() + url: https://seankaneprim.table.cosmos.azure.com/gotable4g723xn3ey2gy() method: GET response: - body: '{"value":[{"odata.etag":"W/\"datetime''2021-07-15T21%3A46%3A33.8196488Z''\"","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":1.0,"PartitionKey":"partition","RowKey":"1","String":"someString","Timestamp":"2021-07-15T21:46:33.8196488Z"},{"odata.etag":"W/\"datetime''2021-07-15T21%3A46%3A33.8203656Z''\"","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":2.0,"PartitionKey":"partition","RowKey":"2","String":"someString","Timestamp":"2021-07-15T21:46:33.8203656Z"},{"odata.etag":"W/\"datetime''2021-07-15T21%3A46%3A33.8208776Z''\"","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":3.0,"PartitionKey":"partition","RowKey":"3","String":"someString","Timestamp":"2021-07-15T21:46:33.8208776Z"},{"odata.etag":"W/\"datetime''2021-07-15T21%3A46%3A33.8213896Z''\"","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":4.0,"PartitionKey":"partition","RowKey":"4","String":"someString","Timestamp":"2021-07-15T21:46:33.8213896Z"},{"odata.etag":"W/\"datetime''2021-07-15T21%3A46%3A33.8220040Z''\"","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":5.0,"PartitionKey":"partition","RowKey":"5","String":"someString","Timestamp":"2021-07-15T21:46:33.8220040Z"},{"odata.etag":"W/\"datetime''2021-07-15T21%3A46%3A33.8226184Z''\"","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":6.0,"PartitionKey":"partition","RowKey":"6","String":"someString","Timestamp":"2021-07-15T21:46:33.8226184Z"},{"odata.etag":"W/\"datetime''2021-07-15T21%3A46%3A33.8233352Z''\"","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":7.0,"PartitionKey":"partition","RowKey":"7","String":"someString","Timestamp":"2021-07-15T21:46:33.8233352Z"},{"odata.etag":"W/\"datetime''2021-07-15T21%3A46%3A33.8238472Z''\"","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":8.0,"PartitionKey":"partition","RowKey":"8","String":"someString","Timestamp":"2021-07-15T21:46:33.8238472Z"},{"odata.etag":"W/\"datetime''2021-07-15T21%3A46%3A33.8244616Z''\"","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":9.0,"PartitionKey":"partition","RowKey":"9","String":"someString","Timestamp":"2021-07-15T21:46:33.8244616Z"},{"odata.etag":"W/\"datetime''2021-07-15T21%3A46%3A33.8250760Z''\"","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":10.0,"PartitionKey":"partition","RowKey":"10","String":"someString","Timestamp":"2021-07-15T21:46:33.8250760Z"}],"odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#gotableou5gp39mzhtrm"}' + body: '{"value":[{"odata.etag":"W/\"datetime''2021-07-26T21%3A18%3A08.7137288Z''\"","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":1,"PartitionKey":"partition","RowKey":"1","String":"someString","Timestamp":"2021-07-26T21:18:08.7137288Z"},{"odata.etag":"W/\"datetime''2021-07-26T21%3A18%3A08.7143432Z''\"","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":2,"PartitionKey":"partition","RowKey":"2","String":"someString","Timestamp":"2021-07-26T21:18:08.7143432Z"},{"odata.etag":"W/\"datetime''2021-07-26T21%3A18%3A08.7147528Z''\"","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":3,"PartitionKey":"partition","RowKey":"3","String":"someString","Timestamp":"2021-07-26T21:18:08.7147528Z"},{"odata.etag":"W/\"datetime''2021-07-26T21%3A18%3A08.7152648Z''\"","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":4,"PartitionKey":"partition","RowKey":"4","String":"someString","Timestamp":"2021-07-26T21:18:08.7152648Z"},{"odata.etag":"W/\"datetime''2021-07-26T21%3A18%3A08.7155720Z''\"","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":5,"PartitionKey":"partition","RowKey":"5","String":"someString","Timestamp":"2021-07-26T21:18:08.7155720Z"},{"odata.etag":"W/\"datetime''2021-07-26T21%3A18%3A08.7159816Z''\"","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":6,"PartitionKey":"partition","RowKey":"6","String":"someString","Timestamp":"2021-07-26T21:18:08.7159816Z"},{"odata.etag":"W/\"datetime''2021-07-26T21%3A18%3A08.7163912Z''\"","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":7,"PartitionKey":"partition","RowKey":"7","String":"someString","Timestamp":"2021-07-26T21:18:08.7163912Z"},{"odata.etag":"W/\"datetime''2021-07-26T21%3A18%3A08.7166984Z''\"","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":8,"PartitionKey":"partition","RowKey":"8","String":"someString","Timestamp":"2021-07-26T21:18:08.7166984Z"},{"odata.etag":"W/\"datetime''2021-07-26T21%3A18%3A08.7171080Z''\"","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":9,"PartitionKey":"partition","RowKey":"9","String":"someString","Timestamp":"2021-07-26T21:18:08.7171080Z"},{"odata.etag":"W/\"datetime''2021-07-26T21%3A18%3A08.7175176Z''\"","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":10,"PartitionKey":"partition","RowKey":"10","String":"someString","Timestamp":"2021-07-26T21:18:08.7175176Z"}],"odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#gotable4g723xn3ey2gy"}' headers: Content-Type: - application/json;odata=minimalmetadata Date: - - Thu, 15 Jul 2021 21:46:33 GMT + - Mon, 26 Jul 2021 21:18:08 GMT X-Ms-Request-Id: - - 86e0b857-3c49-4826-a96f-c0be4794f97e + - 2a813172-d9b0-4b29-86a2-556912036230 status: 200 OK code: 200 duration: "" @@ -199,18 +199,18 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:46:35 GMT + - Mon, 26 Jul 2021 21:18:08 GMT X-Ms-Version: - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/Tables('gotableou5gp39mzhtrm') + url: https://seankaneprim.table.cosmos.azure.com/Tables('gotable4g723xn3ey2gy') method: DELETE response: body: "" headers: Date: - - Thu, 15 Jul 2021 21:46:33 GMT + - Mon, 26 Jul 2021 21:18:08 GMT X-Ms-Request-Id: - - 87e59e4c-0496-4dde-85f6-4c7312a51fc4 + - d3d285a9-9e52-46b7-a325-5c30a7deee27 status: 204 No Content code: 204 duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddAnnotatedEntity-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchComplex-variables.yaml similarity index 84% rename from sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddAnnotatedEntity-variables.yaml rename to sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchComplex-variables.yaml index efec267f5948..f3ae17da2742 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddAnnotatedEntity-variables.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchComplex-variables.yaml @@ -2,4 +2,4 @@ COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com TABLES_COSMOS_ACCOUNT_NAME: seankaneprim TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== -randomSeed: "1626389924" +randomSeed: "1627334289" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchComplex.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchComplex.yaml new file mode 100644 index 000000000000..378936b932f6 --- /dev/null +++ b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchComplex.yaml @@ -0,0 +1,296 @@ +--- +version: 1 +interactions: +- request: + body: '{"TableName":"gotablegig6ivswqh66t"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "36" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Mon, 26 Jul 2021 21:18:09 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.cosmos.azure.com/Tables + method: POST + response: + body: '{"TableName":"gotablegig6ivswqh66t","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' + headers: + Content-Type: + - application/json;odata=minimalmetadata + Date: + - Mon, 26 Jul 2021 21:18:09 GMT + Etag: + - W/"datetime'2021-07-26T21%3A18%3A09.4510088Z'" + Location: + - https://seankaneprim.table.cosmos.azure.com/Tables('gotablegig6ivswqh66t') + X-Ms-Request-Id: + - 340b05a8-1546-4258-8e22-eef0cd6e1998 + status: 201 Created + code: 201 + duration: "" +- request: + body: "--batch_410cec07-ea0d-4b4f-60d1-b4b49f9e3c02\r\nContent-Type: multipart/mixed; + boundary=changeset_e9dc23e1-6e18-4abe-6595-151021cfe2d8\r\n\r\n--changeset_e9dc23e1-6e18-4abe-6595-151021cfe2d8\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotablegig6ivswqh66t?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: + 367\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Binary\":\"U29tZUJpbmFyeQ==\",\"Binary@odata.type\":\"Edm.Binary\",\"Bool\":false,\"DateTime\":\"2013-08-02T17:37:43.0090043Z\",\"DateTime@odata.type\":\"Edm.DateTime\",\"Double\":1234.1234,\"Guid\":\"4185404a-5818-48c3-b9be-f217df0dba6f\",\"Guid@odata.type\":\"Edm.Guid\",\"Int32\":1234,\"Int64\":\"123456789012\",\"Int64@odata.type\":\"Edm.Int64\",\"PartitionKey\":\"pk001\",\"RowKey\":\"1\",\"String\":\"test\"}\r\n--changeset_e9dc23e1-6e18-4abe-6595-151021cfe2d8\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotablegig6ivswqh66t?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: + 367\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Binary\":\"U29tZUJpbmFyeQ==\",\"Binary@odata.type\":\"Edm.Binary\",\"Bool\":false,\"DateTime\":\"2013-08-02T17:37:43.0090043Z\",\"DateTime@odata.type\":\"Edm.DateTime\",\"Double\":1234.1234,\"Guid\":\"4185404a-5818-48c3-b9be-f217df0dba6f\",\"Guid@odata.type\":\"Edm.Guid\",\"Int32\":1234,\"Int64\":\"123456789012\",\"Int64@odata.type\":\"Edm.Int64\",\"PartitionKey\":\"pk001\",\"RowKey\":\"2\",\"String\":\"test\"}\r\n--changeset_e9dc23e1-6e18-4abe-6595-151021cfe2d8\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotablegig6ivswqh66t?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: + 367\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Binary\":\"U29tZUJpbmFyeQ==\",\"Binary@odata.type\":\"Edm.Binary\",\"Bool\":false,\"DateTime\":\"2013-08-02T17:37:43.0090043Z\",\"DateTime@odata.type\":\"Edm.DateTime\",\"Double\":1234.1234,\"Guid\":\"4185404a-5818-48c3-b9be-f217df0dba6f\",\"Guid@odata.type\":\"Edm.Guid\",\"Int32\":1234,\"Int64\":\"123456789012\",\"Int64@odata.type\":\"Edm.Int64\",\"PartitionKey\":\"pk001\",\"RowKey\":\"3\",\"String\":\"test\"}\r\n--changeset_e9dc23e1-6e18-4abe-6595-151021cfe2d8\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotablegig6ivswqh66t?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: + 367\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Binary\":\"U29tZUJpbmFyeQ==\",\"Binary@odata.type\":\"Edm.Binary\",\"Bool\":false,\"DateTime\":\"2013-08-02T17:37:43.0090043Z\",\"DateTime@odata.type\":\"Edm.DateTime\",\"Double\":1234.1234,\"Guid\":\"4185404a-5818-48c3-b9be-f217df0dba6f\",\"Guid@odata.type\":\"Edm.Guid\",\"Int32\":1234,\"Int64\":\"123456789012\",\"Int64@odata.type\":\"Edm.Int64\",\"PartitionKey\":\"pk001\",\"RowKey\":\"4\",\"String\":\"test\"}\r\n--changeset_e9dc23e1-6e18-4abe-6595-151021cfe2d8\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotablegig6ivswqh66t?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: + 367\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Binary\":\"U29tZUJpbmFyeQ==\",\"Binary@odata.type\":\"Edm.Binary\",\"Bool\":false,\"DateTime\":\"2013-08-02T17:37:43.0090043Z\",\"DateTime@odata.type\":\"Edm.DateTime\",\"Double\":1234.1234,\"Guid\":\"4185404a-5818-48c3-b9be-f217df0dba6f\",\"Guid@odata.type\":\"Edm.Guid\",\"Int32\":1234,\"Int64\":\"123456789012\",\"Int64@odata.type\":\"Edm.Int64\",\"PartitionKey\":\"pk001\",\"RowKey\":\"5\",\"String\":\"test\"}\r\n--changeset_e9dc23e1-6e18-4abe-6595-151021cfe2d8--\r\n\r\n--batch_410cec07-ea0d-4b4f-60d1-b4b49f9e3c02--\r\n" + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "4258" + Content-Type: + - multipart/mixed; boundary=batch_410cec07-ea0d-4b4f-60d1-b4b49f9e3c02 + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) + X-Ms-Date: + - Mon, 26 Jul 2021 21:18:09 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.cosmos.azure.com/$batch + method: POST + response: + body: "--batchresponse_e1d5df2b-74f2-4cfe-ba82-2f5bb2ecb1ab\r\nContent-Type: multipart/mixed; + boundary=changesetresponse_b7a96679-4766-48f1-9f61-ef86f9b5d5e3\r\n\r\n--changesetresponse_b7a96679-4766-48f1-9f61-ef86f9b5d5e3\nContent-Type: + application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: + W/\"datetime'2021-07-26T21%3A18%3A10.1077000Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: + https://seankaneprim.table.cosmos.azure.com/gotablegig6ivswqh66t(PartitionKey='pk001',RowKey='1')\r\nContent-ID: + 1\r\n\r\n\r\n--changesetresponse_b7a96679-4766-48f1-9f61-ef86f9b5d5e3\nContent-Type: + application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: + W/\"datetime'2021-07-26T21%3A18%3A10.1083144Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: + https://seankaneprim.table.cosmos.azure.com/gotablegig6ivswqh66t(PartitionKey='pk001',RowKey='2')\r\nContent-ID: + 2\r\n\r\n\r\n--changesetresponse_b7a96679-4766-48f1-9f61-ef86f9b5d5e3\nContent-Type: + application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: + W/\"datetime'2021-07-26T21%3A18%3A10.1087240Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: + https://seankaneprim.table.cosmos.azure.com/gotablegig6ivswqh66t(PartitionKey='pk001',RowKey='3')\r\nContent-ID: + 3\r\n\r\n\r\n--changesetresponse_b7a96679-4766-48f1-9f61-ef86f9b5d5e3\nContent-Type: + application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: + W/\"datetime'2021-07-26T21%3A18%3A10.1091336Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: + https://seankaneprim.table.cosmos.azure.com/gotablegig6ivswqh66t(PartitionKey='pk001',RowKey='4')\r\nContent-ID: + 4\r\n\r\n\r\n--changesetresponse_b7a96679-4766-48f1-9f61-ef86f9b5d5e3\nContent-Type: + application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: + W/\"datetime'2021-07-26T21%3A18%3A10.1095432Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: + https://seankaneprim.table.cosmos.azure.com/gotablegig6ivswqh66t(PartitionKey='pk001',RowKey='5')\r\nContent-ID: + 5\r\n\r\n\r\n--changesetresponse_b7a96679-4766-48f1-9f61-ef86f9b5d5e3--\n--batchresponse_e1d5df2b-74f2-4cfe-ba82-2f5bb2ecb1ab--\r\n" + headers: + Content-Type: + - multipart/mixed; boundary=batchresponse_e1d5df2b-74f2-4cfe-ba82-2f5bb2ecb1ab + Date: + - Mon, 26 Jul 2021 21:18:09 GMT + X-Ms-Request-Id: + - 8ceec751-085c-43de-b186-351b13691579 + status: 202 Accepted + code: 202 + duration: "" +- request: + body: "--batch_d28d91ad-5fd4-4114-752a-0754abf44d95\r\nContent-Type: multipart/mixed; + boundary=changeset_b34d0adf-f9c1-48a8-4a94-254cbc1b58c9\r\n\r\n--changeset_b34d0adf-f9c1-48a8-4a94-254cbc1b58c9\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotablegig6ivswqh66t(PartitionKey='pk001',RowKey='1')?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + HTTP/1.1\r\nAccept: application/json\r\nContent-Length: 367\r\nContent-Type: + application/json\r\nDataserviceversion: 3.0\r\nIf-Match: *\r\nX-Http-Method: + MERGE\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Binary\":\"U29tZUJpbmFyeQ==\",\"Binary@odata.type\":\"Edm.Binary\",\"Bool\":false,\"DateTime\":\"2013-08-02T17:37:43.0090043Z\",\"DateTime@odata.type\":\"Edm.DateTime\",\"Double\":1234.1234,\"Guid\":\"4185404a-5818-48c3-b9be-f217df0dba6f\",\"Guid@odata.type\":\"Edm.Guid\",\"Int32\":1234,\"Int64\":\"123456789012\",\"Int64@odata.type\":\"Edm.Int64\",\"PartitionKey\":\"pk001\",\"RowKey\":\"1\",\"String\":\"test\"}\r\n--changeset_b34d0adf-f9c1-48a8-4a94-254cbc1b58c9\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPUT https://seankaneprim.table.cosmos.azure.com/gotablegig6ivswqh66t(PartitionKey='pk001',RowKey='2')?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + HTTP/1.1\r\nAccept: application/json\r\nContent-Length: 365\r\nContent-Type: + application/json\r\nDataserviceversion: 3.0\r\nIf-Match: *\r\nX-Ms-Version: + 2019-02-02\r\n\r\n{\"Binary\":\"U29tZUJpbmFyeQ==\",\"Binary@odata.type\":\"Edm.Binary\",\"Bool\":false,\"DateTime\":\"2013-08-02T17:37:43.0090043Z\",\"DateTime@odata.type\":\"Edm.DateTime\",\"Double\":1234.1234,\"Guid\":\"4185404a-5818-48c3-b9be-f217df0dba6f\",\"Guid@odata.type\":\"Edm.Guid\",\"Int32\":10,\"Int64\":\"123456789012\",\"Int64@odata.type\":\"Edm.Int64\",\"PartitionKey\":\"pk001\",\"RowKey\":\"2\",\"String\":\"test\"}\r\n--changeset_b34d0adf-f9c1-48a8-4a94-254cbc1b58c9\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nDELETE https://seankaneprim.table.cosmos.azure.com/gotablegig6ivswqh66t(PartitionKey='pk001',RowKey='3')?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nDataserviceversion: + 3.0\r\nIf-Match: *\r\nX-Ms-Version: 2019-02-02\r\n\r\n\r\n--changeset_b34d0adf-f9c1-48a8-4a94-254cbc1b58c9--\r\n\r\n--batch_d28d91ad-5fd4-4114-752a-0754abf44d95--\r\n" + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "2264" + Content-Type: + - multipart/mixed; boundary=batch_d28d91ad-5fd4-4114-752a-0754abf44d95 + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) + X-Ms-Date: + - Mon, 26 Jul 2021 21:18:10 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.cosmos.azure.com/$batch + method: POST + response: + body: "--batchresponse_3c627e50-6ebf-44d6-944f-d8dc51a53790\r\nContent-Type: multipart/mixed; + boundary=changesetresponse_9c777fa2-ab7a-499e-9f16-690c729c0f99\r\n\r\n--changesetresponse_9c777fa2-ab7a-499e-9f16-690c729c0f99\nContent-Type: + application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: + W/\"datetime'2021-07-26T21%3A18%3A10.2574088Z'\"\r\nContent-ID: 1\r\n\r\n\r\n--changesetresponse_9c777fa2-ab7a-499e-9f16-690c729c0f99\nContent-Type: + application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: + W/\"datetime'2021-07-26T21%3A18%3A10.2580232Z'\"\r\nContent-ID: 2\r\n\r\n\r\n--changesetresponse_9c777fa2-ab7a-499e-9f16-690c729c0f99\nContent-Type: + application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nContent-ID: + 3\r\n\r\n\r\n--changesetresponse_9c777fa2-ab7a-499e-9f16-690c729c0f99--\n--batchresponse_3c627e50-6ebf-44d6-944f-d8dc51a53790--\r\n" + headers: + Content-Type: + - multipart/mixed; boundary=batchresponse_3c627e50-6ebf-44d6-944f-d8dc51a53790 + Date: + - Mon, 26 Jul 2021 21:18:09 GMT + X-Ms-Request-Id: + - 36378fc6-7cd4-4b0b-9fcc-8b1034f68281 + status: 202 Accepted + code: 202 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Mon, 26 Jul 2021 21:18:10 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.cosmos.azure.com/gotablegig6ivswqh66t(PartitionKey='pk001',RowKey='1') + method: GET + response: + body: '{"odata.metadata":"https://seankaneprim.table.cosmos.azure.com/gotablegig6ivswqh66t/$metadata#gotablegig6ivswqh66t/@Element","odata.etag":"W/\"datetime''2021-07-26T21%3A18%3A10.2574088Z''\"","Binary@odata.type":"Edm.Binary","Binary":"U29tZUJpbmFyeQ==","Bool":false,"DateTime@odata.type":"Edm.DateTime","DateTime":"2013-08-02T17:37:43.0090043Z","Double":1234.1234,"Guid@odata.type":"Edm.Guid","Guid":"4185404a-5818-48c3-b9be-f217df0dba6f","Int32":1234,"Int64@odata.type":"Edm.Int64","Int64":"123456789012","PartitionKey":"pk001","RowKey":"1","String":"test","Timestamp":"2021-07-26T21:18:10.2574088Z"}' + headers: + Content-Type: + - application/json;odata=minimalmetadata + Date: + - Mon, 26 Jul 2021 21:18:09 GMT + Etag: + - W/"datetime'2021-07-26T21%3A18%3A10.2574088Z'" + X-Ms-Request-Id: + - bb62ccb4-199d-44de-aceb-0f93d12f4687 + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Mon, 26 Jul 2021 21:18:10 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.cosmos.azure.com/gotablegig6ivswqh66t(PartitionKey='pk001',RowKey='2') + method: GET + response: + body: '{"odata.metadata":"https://seankaneprim.table.cosmos.azure.com/gotablegig6ivswqh66t/$metadata#gotablegig6ivswqh66t/@Element","odata.etag":"W/\"datetime''2021-07-26T21%3A18%3A10.2580232Z''\"","PartitionKey":"pk001","RowKey":"2","Binary@odata.type":"Edm.Binary","Binary":"U29tZUJpbmFyeQ==","Bool":false,"DateTime@odata.type":"Edm.DateTime","DateTime":"2013-08-02T17:37:43.0090043Z","Double":1234.1234,"Guid@odata.type":"Edm.Guid","Guid":"4185404a-5818-48c3-b9be-f217df0dba6f","Int32":10,"Int64@odata.type":"Edm.Int64","Int64":"123456789012","String":"test","Timestamp":"2021-07-26T21:18:10.2580232Z"}' + headers: + Content-Type: + - application/json;odata=minimalmetadata + Date: + - Mon, 26 Jul 2021 21:18:09 GMT + Etag: + - W/"datetime'2021-07-26T21%3A18%3A10.2580232Z'" + X-Ms-Request-Id: + - 46c3620f-ade8-4c00-80e8-dd8722c6bf3b + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Mon, 26 Jul 2021 21:18:10 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.cosmos.azure.com/gotablegig6ivswqh66t(PartitionKey='pk001',RowKey='3') + method: GET + response: + body: "{\"odata.error\":{\"code\":\"ResourceNotFound\",\"message\":{\"lang\":\"en-us\",\"value\":\"The + specified resource does not exist.\\nRequestID:becebde2-6484-4466-bd40-28cfb6a42849\\n\"}}}\r\n" + headers: + Content-Type: + - application/json;odata=minimalmetadata + Date: + - Mon, 26 Jul 2021 21:18:10 GMT + X-Ms-Request-Id: + - becebde2-6484-4466-bd40-28cfb6a42849 + status: 404 Not Found + code: 404 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Mon, 26 Jul 2021 21:18:10 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.cosmos.azure.com/Tables('gotablegig6ivswqh66t') + method: DELETE + response: + body: "" + headers: + Date: + - Mon, 26 Jul 2021 21:18:10 GMT + X-Ms-Request-Id: + - d1a632f7-5146-4e75-acca-1dfa743e23e1 + status: 204 No Content + code: 204 + duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchError-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchError-variables.yaml index 2fce65d45767..805769abb6b8 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchError-variables.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchError-variables.yaml @@ -2,4 +2,4 @@ COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com TABLES_COSMOS_ACCOUNT_NAME: seankaneprim TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== -randomSeed: "1626385595" +randomSeed: "1627334290" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchError.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchError.yaml index 4c0473248785..00777d8aca3d 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchError.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchError.yaml @@ -2,7 +2,7 @@ version: 1 interactions: - request: - body: '{"TableName":"gotable92fb9791byr9z"}' + body: '{"TableName":"gotablegmhacxwhglxek"}' form: {} headers: Accept: @@ -19,24 +19,24 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:46:35 GMT + - Mon, 26 Jul 2021 21:18:10 GMT X-Ms-Version: - "2019-02-02" url: https://seankaneprim.table.cosmos.azure.com/Tables method: POST response: - body: '{"TableName":"gotable92fb9791byr9z","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' + body: '{"TableName":"gotablegmhacxwhglxek","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' headers: Content-Type: - application/json;odata=minimalmetadata Date: - - Thu, 15 Jul 2021 21:46:34 GMT + - Mon, 26 Jul 2021 21:18:11 GMT Etag: - - W/"datetime'2021-07-15T21%3A46%3A34.5025544Z'" + - W/"datetime'2021-07-26T21%3A18%3A11.2246792Z'" Location: - - https://seankaneprim.table.cosmos.azure.com/Tables('gotable92fb9791byr9z') + - https://seankaneprim.table.cosmos.azure.com/Tables('gotablegmhacxwhglxek') X-Ms-Request-Id: - - 780b7b43-fabf-41d4-afae-eb61c75544a3 + - bcb37b01-ec8d-42c8-82a3-3dccfde9cb2b status: 201 Created code: 201 duration: "" @@ -60,42 +60,42 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:46:36 GMT + - Mon, 26 Jul 2021 21:18:11 GMT X-Ms-Version: - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotable92fb9791byr9z + url: https://seankaneprim.table.cosmos.azure.com/gotablegmhacxwhglxek method: POST response: body: "" headers: Date: - - Thu, 15 Jul 2021 21:46:34 GMT + - Mon, 26 Jul 2021 21:18:11 GMT Etag: - - W/"datetime'2021-07-15T21%3A46%3A35.3062920Z'" + - W/"datetime'2021-07-26T21%3A18%3A11.9135240Z'" Location: - - https://seankaneprim.table.cosmos.azure.com/gotable92fb9791byr9z(PartitionKey='partition',RowKey='3') + - https://seankaneprim.table.cosmos.azure.com/gotablegmhacxwhglxek(PartitionKey='partition',RowKey='3') Preference-Applied: - return-no-content X-Ms-Request-Id: - - aadac6be-e040-446c-a8ac-171cfe8b2524 + - abea6f49-b2d8-44d1-b721-c94003976b78 status: 204 No Content code: 204 duration: "" - request: - body: "--batch_0c3821ee-c9f1-4c30-50f3-83663f3867d5\r\nContent-Type: multipart/mixed; - boundary=changeset_f2399351-bd25-407b-5a4a-b6665e2f87ba\r\n\r\n--changeset_f2399351-bd25-407b-5a4a-b6665e2f87ba\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotable92fb9791byr9z?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + body: "--batch_e90364ad-b45b-47fb-7f21-b63c621c95d4\r\nContent-Type: multipart/mixed; + boundary=changeset_d392ffd3-771e-4816-45af-0a93650a0f86\r\n\r\n--changeset_d392ffd3-771e-4816-45af-0a93650a0f86\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotablegmhacxwhglxek?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 260\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Float@odata.type\":\"Edm.Double\",\"Integer\":1,\"Integer@odata.type\":\"Edm.Double\",\"PartitionKey\":\"partition\",\"RowKey\":\"1\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_f2399351-bd25-407b-5a4a-b6665e2f87ba\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotable92fb9791byr9z?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + 194\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Integer\":1,\"PartitionKey\":\"partition\",\"RowKey\":\"1\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_d392ffd3-771e-4816-45af-0a93650a0f86\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotablegmhacxwhglxek?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 260\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Float@odata.type\":\"Edm.Double\",\"Integer\":2,\"Integer@odata.type\":\"Edm.Double\",\"PartitionKey\":\"partition\",\"RowKey\":\"2\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_f2399351-bd25-407b-5a4a-b6665e2f87ba\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotable92fb9791byr9z?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + 194\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Integer\":2,\"PartitionKey\":\"partition\",\"RowKey\":\"2\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_d392ffd3-771e-4816-45af-0a93650a0f86\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotablegmhacxwhglxek?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 260\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Float@odata.type\":\"Edm.Double\",\"Integer\":3,\"Integer@odata.type\":\"Edm.Double\",\"PartitionKey\":\"partition\",\"RowKey\":\"3\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_f2399351-bd25-407b-5a4a-b6665e2f87ba--\r\n\r\n--batch_0c3821ee-c9f1-4c30-50f3-83663f3867d5--\r\n" + 194\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Integer\":3,\"PartitionKey\":\"partition\",\"RowKey\":\"3\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_d392ffd3-771e-4816-45af-0a93650a0f86--\r\n\r\n--batch_e90364ad-b45b-47fb-7f21-b63c621c95d4--\r\n" form: {} headers: Accept: @@ -103,32 +103,32 @@ interactions: Authorization: - sanitized Content-Length: - - "2329" + - "2131" Content-Type: - - multipart/mixed; boundary=batch_0c3821ee-c9f1-4c30-50f3-83663f3867d5 + - multipart/mixed; boundary=batch_e90364ad-b45b-47fb-7f21-b63c621c95d4 Dataserviceversion: - "3.0" User-Agent: - azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:46:36 GMT + - Mon, 26 Jul 2021 21:18:11 GMT X-Ms-Version: - "2019-02-02" url: https://seankaneprim.table.cosmos.azure.com/$batch method: POST response: - body: "--batchresponse_79394d2a-f4f9-485c-b2ee-3bba69b4fc96\r\nContent-Type: multipart/mixed; - boundary=changesetresponse_ae0312c9-5b67-4c3c-aaa6-0db271ea07b1\r\n\r\n--changesetresponse_ae0312c9-5b67-4c3c-aaa6-0db271ea07b1\nContent-Type: + body: "--batchresponse_95d8004e-24a8-4df8-b5d0-ac8ca60f9b7c\r\nContent-Type: multipart/mixed; + boundary=changesetresponse_09adfb9d-794c-421f-8990-73e89d210019\r\n\r\n--changesetresponse_09adfb9d-794c-421f-8990-73e89d210019\nContent-Type: application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 409 Conflict\r\nContent-Type: application/json;odata=fullmetadata\r\n\r\n{\"odata.error\":{\"code\":\"EntityAlreadyExists\",\"message\":{\"lang\":\"en-us\",\"value\":\"2:The - specified entity already exists.\\n\\nRequestID:5485e5be-2e9a-413c-aeca-68da50a5d9e8\\n\"}}}\r\n--changesetresponse_ae0312c9-5b67-4c3c-aaa6-0db271ea07b1--\n--batchresponse_79394d2a-f4f9-485c-b2ee-3bba69b4fc96--\r\n" + specified entity already exists.\\n\\nRequestID:24294b65-59a5-47cf-894a-9f57bf6646e1\\n\"}}}\r\n--changesetresponse_09adfb9d-794c-421f-8990-73e89d210019--\n--batchresponse_95d8004e-24a8-4df8-b5d0-ac8ca60f9b7c--\r\n" headers: Content-Type: - - multipart/mixed; boundary=batchresponse_79394d2a-f4f9-485c-b2ee-3bba69b4fc96 + - multipart/mixed; boundary=batchresponse_95d8004e-24a8-4df8-b5d0-ac8ca60f9b7c Date: - - Thu, 15 Jul 2021 21:46:34 GMT + - Mon, 26 Jul 2021 21:18:11 GMT X-Ms-Request-Id: - - 5485e5be-2e9a-413c-aeca-68da50a5d9e8 + - 24294b65-59a5-47cf-894a-9f57bf6646e1 status: 202 Accepted code: 202 duration: "" @@ -144,18 +144,18 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:46:36 GMT + - Mon, 26 Jul 2021 21:18:11 GMT X-Ms-Version: - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/Tables('gotable92fb9791byr9z') + url: https://seankaneprim.table.cosmos.azure.com/Tables('gotablegmhacxwhglxek') method: DELETE response: body: "" headers: Date: - - Thu, 15 Jul 2021 21:46:34 GMT + - Mon, 26 Jul 2021 21:18:11 GMT X-Ms-Request-Id: - - 0d632f65-2a93-4b75-ae7c-7c53cd79e3c0 + - 9ac73d6e-52d2-4f69-9f62-612f788388bb status: 204 No Content code: 204 duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchMixed-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchMixed-variables.yaml index 05bdc8abfa7a..9d5773b994de 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchMixed-variables.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchMixed-variables.yaml @@ -2,4 +2,4 @@ COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com TABLES_COSMOS_ACCOUNT_NAME: seankaneprim TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== -randomSeed: "1626385596" +randomSeed: "1627334292" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchMixed.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchMixed.yaml index 34c1f0e5b4af..de64bcc8da88 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchMixed.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchMixed.yaml @@ -2,7 +2,7 @@ version: 1 interactions: - request: - body: '{"TableName":"gotablex1913nmx6e729"}' + body: '{"TableName":"gotableeuwmto5ervf8z"}' form: {} headers: Accept: @@ -19,42 +19,42 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:46:36 GMT + - Mon, 26 Jul 2021 21:18:12 GMT X-Ms-Version: - "2019-02-02" url: https://seankaneprim.table.cosmos.azure.com/Tables method: POST response: - body: '{"TableName":"gotablex1913nmx6e729","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' + body: '{"TableName":"gotableeuwmto5ervf8z","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' headers: Content-Type: - application/json;odata=minimalmetadata Date: - - Thu, 15 Jul 2021 21:46:35 GMT + - Mon, 26 Jul 2021 21:18:12 GMT Etag: - - W/"datetime'2021-07-15T21%3A46%3A36.0097800Z'" + - W/"datetime'2021-07-26T21%3A18%3A12.6280712Z'" Location: - - https://seankaneprim.table.cosmos.azure.com/Tables('gotablex1913nmx6e729') + - https://seankaneprim.table.cosmos.azure.com/Tables('gotableeuwmto5ervf8z') X-Ms-Request-Id: - - c6ab05f4-3e40-484a-bd24-0073e2759e22 + - c0c2baa6-d171-4e83-a1fd-15c996f723c1 status: 201 Created code: 201 duration: "" - request: - body: "--batch_91789fa1-7728-4b0a-4ef7-bf84cd1ef031\r\nContent-Type: multipart/mixed; - boundary=changeset_9e4ef1fe-196d-4d54-402d-71975aeaaca1\r\n\r\n--changeset_9e4ef1fe-196d-4d54-402d-71975aeaaca1\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotablex1913nmx6e729?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + body: "--batch_58e7becc-8de4-43ac-7dcf-38edb15ceb0d\r\nContent-Type: multipart/mixed; + boundary=changeset_70ffb7e8-ba88-4024-6554-b1c0743282dc\r\n\r\n--changeset_70ffb7e8-ba88-4024-6554-b1c0743282dc\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotableeuwmto5ervf8z?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 260\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Float@odata.type\":\"Edm.Double\",\"Integer\":1,\"Integer@odata.type\":\"Edm.Double\",\"PartitionKey\":\"partition\",\"RowKey\":\"1\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_9e4ef1fe-196d-4d54-402d-71975aeaaca1\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotablex1913nmx6e729?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + 194\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Integer\":1,\"PartitionKey\":\"partition\",\"RowKey\":\"1\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_70ffb7e8-ba88-4024-6554-b1c0743282dc\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotableeuwmto5ervf8z?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 260\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Float@odata.type\":\"Edm.Double\",\"Integer\":2,\"Integer@odata.type\":\"Edm.Double\",\"PartitionKey\":\"partition\",\"RowKey\":\"2\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_9e4ef1fe-196d-4d54-402d-71975aeaaca1\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotablex1913nmx6e729?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + 194\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Integer\":2,\"PartitionKey\":\"partition\",\"RowKey\":\"2\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_70ffb7e8-ba88-4024-6554-b1c0743282dc\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotableeuwmto5ervf8z?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 260\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Float@odata.type\":\"Edm.Double\",\"Integer\":3,\"Integer@odata.type\":\"Edm.Double\",\"PartitionKey\":\"partition\",\"RowKey\":\"3\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_9e4ef1fe-196d-4d54-402d-71975aeaaca1--\r\n\r\n--batch_91789fa1-7728-4b0a-4ef7-bf84cd1ef031--\r\n" + 194\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Integer\":3,\"PartitionKey\":\"partition\",\"RowKey\":\"3\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_70ffb7e8-ba88-4024-6554-b1c0743282dc--\r\n\r\n--batch_58e7becc-8de4-43ac-7dcf-38edb15ceb0d--\r\n" form: {} headers: Accept: @@ -62,41 +62,41 @@ interactions: Authorization: - sanitized Content-Length: - - "2329" + - "2131" Content-Type: - - multipart/mixed; boundary=batch_91789fa1-7728-4b0a-4ef7-bf84cd1ef031 + - multipart/mixed; boundary=batch_58e7becc-8de4-43ac-7dcf-38edb15ceb0d Dataserviceversion: - "3.0" User-Agent: - azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:46:37 GMT + - Mon, 26 Jul 2021 21:18:13 GMT X-Ms-Version: - "2019-02-02" url: https://seankaneprim.table.cosmos.azure.com/$batch method: POST response: - body: "--batchresponse_70883b2c-556a-465f-a880-896fcb616cfa\r\nContent-Type: multipart/mixed; - boundary=changesetresponse_d0697195-10b8-4309-a866-e5e2e8f7904a\r\n\r\n--changesetresponse_d0697195-10b8-4309-a866-e5e2e8f7904a\nContent-Type: + body: "--batchresponse_b311cbaa-4b2e-44ce-8648-5bd4134e18cc\r\nContent-Type: multipart/mixed; + boundary=changesetresponse_0095dd6d-2d4a-4fd9-b222-ce703fd0c0d2\r\n\r\n--changesetresponse_0095dd6d-2d4a-4fd9-b222-ce703fd0c0d2\nContent-Type: application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: - W/\"datetime'2021-07-15T21%3A46%3A36.8018440Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: - https://seankaneprim.table.cosmos.azure.com/gotablex1913nmx6e729(PartitionKey='partition',RowKey='1')\r\nContent-ID: - 1\r\n\r\n\r\n--changesetresponse_d0697195-10b8-4309-a866-e5e2e8f7904a\nContent-Type: + W/\"datetime'2021-07-26T21%3A18%3A13.3186568Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: + https://seankaneprim.table.cosmos.azure.com/gotableeuwmto5ervf8z(PartitionKey='partition',RowKey='1')\r\nContent-ID: + 1\r\n\r\n\r\n--changesetresponse_0095dd6d-2d4a-4fd9-b222-ce703fd0c0d2\nContent-Type: application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: - W/\"datetime'2021-07-15T21%3A46%3A36.8025608Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: - https://seankaneprim.table.cosmos.azure.com/gotablex1913nmx6e729(PartitionKey='partition',RowKey='2')\r\nContent-ID: - 2\r\n\r\n\r\n--changesetresponse_d0697195-10b8-4309-a866-e5e2e8f7904a\nContent-Type: + W/\"datetime'2021-07-26T21%3A18%3A13.3193736Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: + https://seankaneprim.table.cosmos.azure.com/gotableeuwmto5ervf8z(PartitionKey='partition',RowKey='2')\r\nContent-ID: + 2\r\n\r\n\r\n--changesetresponse_0095dd6d-2d4a-4fd9-b222-ce703fd0c0d2\nContent-Type: application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: - W/\"datetime'2021-07-15T21%3A46%3A36.8030728Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: - https://seankaneprim.table.cosmos.azure.com/gotablex1913nmx6e729(PartitionKey='partition',RowKey='3')\r\nContent-ID: - 3\r\n\r\n\r\n--changesetresponse_d0697195-10b8-4309-a866-e5e2e8f7904a--\n--batchresponse_70883b2c-556a-465f-a880-896fcb616cfa--\r\n" + W/\"datetime'2021-07-26T21%3A18%3A13.3197832Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: + https://seankaneprim.table.cosmos.azure.com/gotableeuwmto5ervf8z(PartitionKey='partition',RowKey='3')\r\nContent-ID: + 3\r\n\r\n\r\n--changesetresponse_0095dd6d-2d4a-4fd9-b222-ce703fd0c0d2--\n--batchresponse_b311cbaa-4b2e-44ce-8648-5bd4134e18cc--\r\n" headers: Content-Type: - - multipart/mixed; boundary=batchresponse_70883b2c-556a-465f-a880-896fcb616cfa + - multipart/mixed; boundary=batchresponse_b311cbaa-4b2e-44ce-8648-5bd4134e18cc Date: - - Thu, 15 Jul 2021 21:46:35 GMT + - Mon, 26 Jul 2021 21:18:12 GMT X-Ms-Request-Id: - - 54bd46ee-12aa-4a94-91da-5e15b4181d90 + - c28613bd-b096-48f5-8a12-bf32c315a355 status: 202 Accepted code: 202 duration: "" @@ -114,45 +114,45 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:46:37 GMT + - Mon, 26 Jul 2021 21:18:13 GMT X-Ms-Version: - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotablex1913nmx6e729()?%24filter=RowKey+eq+%271%27 + url: https://seankaneprim.table.cosmos.azure.com/gotableeuwmto5ervf8z()?%24filter=RowKey+eq+%271%27 method: GET response: - body: '{"value":[{"odata.etag":"W/\"datetime''2021-07-15T21%3A46%3A36.8018440Z''\"","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":1.0,"PartitionKey":"partition","RowKey":"1","String":"someString","Timestamp":"2021-07-15T21:46:36.8018440Z"}],"odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#gotablex1913nmx6e729"}' + body: '{"value":[{"odata.etag":"W/\"datetime''2021-07-26T21%3A18%3A13.3186568Z''\"","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":1,"PartitionKey":"partition","RowKey":"1","String":"someString","Timestamp":"2021-07-26T21:18:13.3186568Z"}],"odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#gotableeuwmto5ervf8z"}' headers: Content-Type: - application/json;odata=minimalmetadata Date: - - Thu, 15 Jul 2021 21:46:36 GMT + - Mon, 26 Jul 2021 21:18:12 GMT X-Ms-Request-Id: - - 330a2821-a9dc-4478-a54e-c44cfe68fc97 + - 974b2605-2eec-4f7e-a097-e09acb4c0a97 status: 200 OK code: 200 duration: "" - request: - body: "--batch_8fa36a09-2e86-404c-6f73-a7feb9ec183b\r\nContent-Type: multipart/mixed; - boundary=changeset_b7546f22-aa51-481e-6b67-4722dc3666fc\r\n\r\n--changeset_b7546f22-aa51-481e-6b67-4722dc3666fc\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotablex1913nmx6e729(PartitionKey='partition',RowKey='1')?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + body: "--batch_947da777-7a95-4b8a-7969-a898523ced93\r\nContent-Type: multipart/mixed; + boundary=changeset_27f1947a-ca1d-4227-784c-40c8a004988b\r\n\r\n--changeset_27f1947a-ca1d-4227-784c-40c8a004988b\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotableeuwmto5ervf8z(PartitionKey='partition',RowKey='1')?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json\r\nContent-Length: 63\r\nContent-Type: - application/json\r\nDataserviceversion: 3.0\r\nIf-Match: W/\"datetime'2021-07-15T21%3A46%3A36.8018440Z'\"\r\nX-Http-Method: - MERGE\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"MergeProperty\":\"foo\",\"PartitionKey\":\"partition\",\"RowKey\":\"1\"}\r\n--changeset_b7546f22-aa51-481e-6b67-4722dc3666fc\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nDELETE https://seankaneprim.table.cosmos.azure.com/gotablex1913nmx6e729(PartitionKey='partition',RowKey='2')?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + application/json\r\nDataserviceversion: 3.0\r\nIf-Match: W/\"datetime'2021-07-26T21%3A18%3A13.3186568Z'\"\r\nX-Http-Method: + MERGE\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"MergeProperty\":\"foo\",\"PartitionKey\":\"partition\",\"RowKey\":\"1\"}\r\n--changeset_27f1947a-ca1d-4227-784c-40c8a004988b\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nDELETE https://seankaneprim.table.cosmos.azure.com/gotableeuwmto5ervf8z(PartitionKey='partition',RowKey='2')?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nDataserviceversion: - 3.0\r\nIf-Match: *\r\nX-Ms-Version: 2019-02-02\r\n\r\n\r\n--changeset_b7546f22-aa51-481e-6b67-4722dc3666fc\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPUT https://seankaneprim.table.cosmos.azure.com/gotablex1913nmx6e729(PartitionKey='partition',RowKey='3')?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + 3.0\r\nIf-Match: *\r\nX-Ms-Version: 2019-02-02\r\n\r\n\r\n--changeset_27f1947a-ca1d-4227-784c-40c8a004988b\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPUT https://seankaneprim.table.cosmos.azure.com/gotableeuwmto5ervf8z(PartitionKey='partition',RowKey='3')?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json\r\nContent-Length: 65\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nIf-Match: *\r\nX-Ms-Version: - 2019-02-02\r\n\r\n{\"PartitionKey\":\"partition\",\"ReplaceProperty\":\"foo\",\"RowKey\":\"3\"}\r\n--changeset_b7546f22-aa51-481e-6b67-4722dc3666fc\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotablex1913nmx6e729?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + 2019-02-02\r\n\r\n{\"PartitionKey\":\"partition\",\"ReplaceProperty\":\"foo\",\"RowKey\":\"3\"}\r\n--changeset_27f1947a-ca1d-4227-784c-40c8a004988b\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotableeuwmto5ervf8z?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 260\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Float@odata.type\":\"Edm.Double\",\"Integer\":4,\"Integer@odata.type\":\"Edm.Double\",\"PartitionKey\":\"partition\",\"RowKey\":\"4\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_b7546f22-aa51-481e-6b67-4722dc3666fc\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotablex1913nmx6e729?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + 194\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Integer\":4,\"PartitionKey\":\"partition\",\"RowKey\":\"4\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_27f1947a-ca1d-4227-784c-40c8a004988b\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotableeuwmto5ervf8z?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 260\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Float@odata.type\":\"Edm.Double\",\"Integer\":5,\"Integer@odata.type\":\"Edm.Double\",\"PartitionKey\":\"partition\",\"RowKey\":\"5\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_b7546f22-aa51-481e-6b67-4722dc3666fc--\r\n\r\n--batch_8fa36a09-2e86-404c-6f73-a7feb9ec183b--\r\n" + 194\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Integer\":5,\"PartitionKey\":\"partition\",\"RowKey\":\"5\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_27f1947a-ca1d-4227-784c-40c8a004988b--\r\n\r\n--batch_947da777-7a95-4b8a-7969-a898523ced93--\r\n" form: {} headers: Accept: @@ -160,43 +160,43 @@ interactions: Authorization: - sanitized Content-Length: - - "3109" + - "2977" Content-Type: - - multipart/mixed; boundary=batch_8fa36a09-2e86-404c-6f73-a7feb9ec183b + - multipart/mixed; boundary=batch_947da777-7a95-4b8a-7969-a898523ced93 Dataserviceversion: - "3.0" User-Agent: - azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:46:38 GMT + - Mon, 26 Jul 2021 21:18:13 GMT X-Ms-Version: - "2019-02-02" url: https://seankaneprim.table.cosmos.azure.com/$batch method: POST response: - body: "--batchresponse_45d324a2-01ff-4d5a-bb35-afdec77dcd6f\r\nContent-Type: multipart/mixed; - boundary=changesetresponse_bcb7aed4-3456-4ea5-8487-99ca22e577d7\r\n\r\n--changesetresponse_bcb7aed4-3456-4ea5-8487-99ca22e577d7\nContent-Type: + body: "--batchresponse_5a918c49-f5d2-4756-bf4e-85f201717162\r\nContent-Type: multipart/mixed; + boundary=changesetresponse_3bd0146a-e3a8-4ebb-b05e-097b61eef1ac\r\n\r\n--changesetresponse_3bd0146a-e3a8-4ebb-b05e-097b61eef1ac\nContent-Type: application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: - W/\"datetime'2021-07-15T21%3A46%3A37.0683912Z'\"\r\nContent-ID: 1\r\n\r\n\r\n--changesetresponse_bcb7aed4-3456-4ea5-8487-99ca22e577d7\nContent-Type: + W/\"datetime'2021-07-26T21%3A18%3A13.5878664Z'\"\r\nContent-ID: 1\r\n\r\n\r\n--changesetresponse_3bd0146a-e3a8-4ebb-b05e-097b61eef1ac\nContent-Type: application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nContent-ID: - 2\r\n\r\n\r\n--changesetresponse_bcb7aed4-3456-4ea5-8487-99ca22e577d7\nContent-Type: + 2\r\n\r\n\r\n--changesetresponse_3bd0146a-e3a8-4ebb-b05e-097b61eef1ac\nContent-Type: application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: - W/\"datetime'2021-07-15T21%3A46%3A37.0716680Z'\"\r\nContent-ID: 3\r\n\r\n\r\n--changesetresponse_bcb7aed4-3456-4ea5-8487-99ca22e577d7\nContent-Type: + W/\"datetime'2021-07-26T21%3A18%3A13.5966728Z'\"\r\nContent-ID: 3\r\n\r\n\r\n--changesetresponse_3bd0146a-e3a8-4ebb-b05e-097b61eef1ac\nContent-Type: application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: - W/\"datetime'2021-07-15T21%3A46%3A37.0725896Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: - https://seankaneprim.table.cosmos.azure.com/gotablex1913nmx6e729(PartitionKey='partition',RowKey='4')\r\nContent-ID: - 4\r\n\r\n\r\n--changesetresponse_bcb7aed4-3456-4ea5-8487-99ca22e577d7\nContent-Type: + W/\"datetime'2021-07-26T21%3A18%3A13.5972872Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: + https://seankaneprim.table.cosmos.azure.com/gotableeuwmto5ervf8z(PartitionKey='partition',RowKey='4')\r\nContent-ID: + 4\r\n\r\n\r\n--changesetresponse_3bd0146a-e3a8-4ebb-b05e-097b61eef1ac\nContent-Type: application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: - W/\"datetime'2021-07-15T21%3A46%3A37.0732040Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: - https://seankaneprim.table.cosmos.azure.com/gotablex1913nmx6e729(PartitionKey='partition',RowKey='5')\r\nContent-ID: - 5\r\n\r\n\r\n--changesetresponse_bcb7aed4-3456-4ea5-8487-99ca22e577d7--\n--batchresponse_45d324a2-01ff-4d5a-bb35-afdec77dcd6f--\r\n" + W/\"datetime'2021-07-26T21%3A18%3A13.5977992Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: + https://seankaneprim.table.cosmos.azure.com/gotableeuwmto5ervf8z(PartitionKey='partition',RowKey='5')\r\nContent-ID: + 5\r\n\r\n\r\n--changesetresponse_3bd0146a-e3a8-4ebb-b05e-097b61eef1ac--\n--batchresponse_5a918c49-f5d2-4756-bf4e-85f201717162--\r\n" headers: Content-Type: - - multipart/mixed; boundary=batchresponse_45d324a2-01ff-4d5a-bb35-afdec77dcd6f + - multipart/mixed; boundary=batchresponse_5a918c49-f5d2-4756-bf4e-85f201717162 Date: - - Thu, 15 Jul 2021 21:46:36 GMT + - Mon, 26 Jul 2021 21:18:12 GMT X-Ms-Request-Id: - - 62b06f3d-91a5-4e05-8a62-24437e1b09de + - 39f56c29-52ab-4169-85bc-7394822dfd44 status: 202 Accepted code: 202 duration: "" @@ -214,20 +214,20 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:46:38 GMT + - Mon, 26 Jul 2021 21:18:13 GMT X-Ms-Version: - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotablex1913nmx6e729()?%24filter=RowKey+eq+%271%27 + url: https://seankaneprim.table.cosmos.azure.com/gotableeuwmto5ervf8z()?%24filter=RowKey+eq+%271%27 method: GET response: - body: '{"value":[{"odata.etag":"W/\"datetime''2021-07-15T21%3A46%3A37.0683912Z''\"","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":1.0,"PartitionKey":"partition","RowKey":"1","String":"someString","MergeProperty":"foo","Timestamp":"2021-07-15T21:46:37.0683912Z"}],"odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#gotablex1913nmx6e729"}' + body: '{"value":[{"odata.etag":"W/\"datetime''2021-07-26T21%3A18%3A13.5878664Z''\"","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":1,"PartitionKey":"partition","RowKey":"1","String":"someString","MergeProperty":"foo","Timestamp":"2021-07-26T21:18:13.5878664Z"}],"odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#gotableeuwmto5ervf8z"}' headers: Content-Type: - application/json;odata=minimalmetadata Date: - - Thu, 15 Jul 2021 21:46:36 GMT + - Mon, 26 Jul 2021 21:18:13 GMT X-Ms-Request-Id: - - 7c4cbf31-6135-4146-8f87-6a3b2a229886 + - b9f7670a-2a76-456b-806c-44dadf67a03d status: 200 OK code: 200 duration: "" @@ -243,18 +243,18 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:46:38 GMT + - Mon, 26 Jul 2021 21:18:13 GMT X-Ms-Version: - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/Tables('gotablex1913nmx6e729') + url: https://seankaneprim.table.cosmos.azure.com/Tables('gotableeuwmto5ervf8z') method: DELETE response: body: "" headers: Date: - - Thu, 15 Jul 2021 21:46:36 GMT + - Mon, 26 Jul 2021 21:18:13 GMT X-Ms-Request-Id: - - 88d98517-9416-448a-92fc-e6cdb15089ef + - 7838ed19-c030-47ca-aed4-c522197818bb status: 204 No Content code: 204 duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestCreateTable-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestCreateTable-variables.yaml index 9cb772c7e072..0d7f34e57c01 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestCreateTable-variables.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestCreateTable-variables.yaml @@ -2,4 +2,4 @@ COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com TABLES_COSMOS_ACCOUNT_NAME: seankaneprim TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== -randomSeed: "1626385598" +randomSeed: "1627334293" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestCreateTable.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestCreateTable.yaml index 2cf293b24ea2..25875698346c 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestCreateTable.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestCreateTable.yaml @@ -2,7 +2,7 @@ version: 1 interactions: - request: - body: '{"TableName":"gotablesu1uux0ofb68c"}' + body: '{"TableName":"gotablewywiqnkdwtkji"}' form: {} headers: Accept: @@ -19,24 +19,24 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:46:38 GMT + - Mon, 26 Jul 2021 21:18:13 GMT X-Ms-Version: - "2019-02-02" url: https://seankaneprim.table.cosmos.azure.com/Tables method: POST response: - body: '{"TableName":"gotablesu1uux0ofb68c","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' + body: '{"TableName":"gotablewywiqnkdwtkji","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' headers: Content-Type: - application/json;odata=minimalmetadata Date: - - Thu, 15 Jul 2021 21:46:37 GMT + - Mon, 26 Jul 2021 21:18:14 GMT Etag: - - W/"datetime'2021-07-15T21%3A46%3A37.7185288Z'" + - W/"datetime'2021-07-26T21%3A18%3A14.2387208Z'" Location: - - https://seankaneprim.table.cosmos.azure.com/Tables('gotablesu1uux0ofb68c') + - https://seankaneprim.table.cosmos.azure.com/Tables('gotablewywiqnkdwtkji') X-Ms-Request-Id: - - 6fad68ed-652d-4b1e-b4bf-7d3ab629c35d + - f7bf64c6-55ee-400b-813d-e12db7a0dd94 status: 201 Created code: 201 duration: "" @@ -52,18 +52,18 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:46:39 GMT + - Mon, 26 Jul 2021 21:18:14 GMT X-Ms-Version: - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/Tables('gotablesu1uux0ofb68c') + url: https://seankaneprim.table.cosmos.azure.com/Tables('gotablewywiqnkdwtkji') method: DELETE response: body: "" headers: Date: - - Thu, 15 Jul 2021 21:46:37 GMT + - Mon, 26 Jul 2021 21:18:14 GMT X-Ms-Request-Id: - - bd81926c-6e0e-4345-bfbd-784e058c0e5b + - ce5945de-3de0-4bcc-a1f8-936d55ef8b25 status: 204 No Content code: 204 duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestDeleteEntity-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestDeleteEntity-variables.yaml index dc2cd9b83089..75f4ca6c698e 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestDeleteEntity-variables.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestDeleteEntity-variables.yaml @@ -2,4 +2,4 @@ COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com TABLES_COSMOS_ACCOUNT_NAME: seankaneprim TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== -randomSeed: "1626385599" +randomSeed: "1627334295" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestDeleteEntity.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestDeleteEntity.yaml index 598664d91821..63cae4040b9e 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestDeleteEntity.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestDeleteEntity.yaml @@ -2,7 +2,7 @@ version: 1 interactions: - request: - body: '{"TableName":"gotableiw13ixxtlwtnx"}' + body: '{"TableName":"gotableiddhwkza2vslf"}' form: {} headers: Accept: @@ -19,24 +19,24 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:46:39 GMT + - Mon, 26 Jul 2021 21:18:15 GMT X-Ms-Version: - "2019-02-02" url: https://seankaneprim.table.cosmos.azure.com/Tables method: POST response: - body: '{"TableName":"gotableiw13ixxtlwtnx","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' + body: '{"TableName":"gotableiddhwkza2vslf","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' headers: Content-Type: - application/json;odata=minimalmetadata Date: - - Thu, 15 Jul 2021 21:46:38 GMT + - Mon, 26 Jul 2021 21:18:15 GMT Etag: - - W/"datetime'2021-07-15T21%3A46%3A38.8518920Z'" + - W/"datetime'2021-07-26T21%3A18%3A15.3752584Z'" Location: - - https://seankaneprim.table.cosmos.azure.com/Tables('gotableiw13ixxtlwtnx') + - https://seankaneprim.table.cosmos.azure.com/Tables('gotableiddhwkza2vslf') X-Ms-Request-Id: - - 24b0da8b-5e18-4c1f-b6db-fa0c1439530e + - 3869038a-1afc-4dab-a0f1-2bd12d58e8c4 status: 201 Created code: 201 duration: "" @@ -61,24 +61,24 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:46:40 GMT + - Mon, 26 Jul 2021 21:18:15 GMT X-Ms-Version: - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotableiw13ixxtlwtnx + url: https://seankaneprim.table.cosmos.azure.com/gotableiddhwkza2vslf method: POST response: body: "" headers: Date: - - Thu, 15 Jul 2021 21:46:38 GMT + - Mon, 26 Jul 2021 21:18:15 GMT Etag: - - W/"datetime'2021-07-15T21%3A46%3A39.6188680Z'" + - W/"datetime'2021-07-26T21%3A18%3A16.0509960Z'" Location: - - https://seankaneprim.table.cosmos.azure.com/gotableiw13ixxtlwtnx(PartitionKey='partition',RowKey='1') + - https://seankaneprim.table.cosmos.azure.com/gotableiddhwkza2vslf(PartitionKey='partition',RowKey='1') Preference-Applied: - return-no-content X-Ms-Request-Id: - - 379d9f0b-f2b2-4d80-b27d-8edb7565baf5 + - 6db82780-e646-45b3-b91d-1ee0814e84da status: 204 No Content code: 204 duration: "" @@ -98,18 +98,18 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:46:40 GMT + - Mon, 26 Jul 2021 21:18:15 GMT X-Ms-Version: - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotableiw13ixxtlwtnx(PartitionKey='partition',RowKey='1') + url: https://seankaneprim.table.cosmos.azure.com/gotableiddhwkza2vslf(PartitionKey='partition',RowKey='1') method: DELETE response: body: "" headers: Date: - - Thu, 15 Jul 2021 21:46:38 GMT + - Mon, 26 Jul 2021 21:18:15 GMT X-Ms-Request-Id: - - 2ad39a11-c825-459c-a301-f67973a0788d + - f81c6fe7-089d-44c7-859a-f80aa984b7bc status: 204 No Content code: 204 duration: "" @@ -125,18 +125,18 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:46:40 GMT + - Mon, 26 Jul 2021 21:18:16 GMT X-Ms-Version: - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/Tables('gotableiw13ixxtlwtnx') + url: https://seankaneprim.table.cosmos.azure.com/Tables('gotableiddhwkza2vslf') method: DELETE response: body: "" headers: Date: - - Thu, 15 Jul 2021 21:46:39 GMT + - Mon, 26 Jul 2021 21:18:15 GMT X-Ms-Request-Id: - - 98c27751-7675-40af-9204-2e0f99701583 + - 636f3ce6-e5e8-4a9a-8d2e-68a979584c07 status: 204 No Content code: 204 duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestEdmMarshalling-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestEdmMarshalling-variables.yaml index 9f52abfdd234..ba8304fdcf96 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestEdmMarshalling-variables.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestEdmMarshalling-variables.yaml @@ -2,4 +2,4 @@ COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com TABLES_COSMOS_ACCOUNT_NAME: seankaneprim TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== -randomSeed: "1626705440" +randomSeed: "1627334296" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestEdmMarshalling.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestEdmMarshalling.yaml index 8834a9c23d28..d192a55b91cd 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestEdmMarshalling.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestEdmMarshalling.yaml @@ -2,7 +2,7 @@ version: 1 interactions: - request: - body: '{"TableName":"gotableymm29p39v3dmt"}' + body: '{"TableName":"gotablew27b8eh28lfl4"}' form: {} headers: Accept: @@ -19,24 +19,24 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Mon, 19 Jul 2021 14:37:20 GMT + - Mon, 26 Jul 2021 21:18:16 GMT X-Ms-Version: - "2019-02-02" url: https://seankaneprim.table.cosmos.azure.com/Tables method: POST response: - body: '{"TableName":"gotableymm29p39v3dmt","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' + body: '{"TableName":"gotablew27b8eh28lfl4","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' headers: Content-Type: - application/json;odata=minimalmetadata Date: - - Mon, 19 Jul 2021 14:37:13 GMT + - Mon, 26 Jul 2021 21:18:16 GMT Etag: - - W/"datetime'2021-07-19T14%3A37%3A13.8914312Z'" + - W/"datetime'2021-07-26T21%3A18%3A16.6872072Z'" Location: - - https://seankaneprim.table.cosmos.azure.com/Tables('gotableymm29p39v3dmt') + - https://seankaneprim.table.cosmos.azure.com/Tables('gotablew27b8eh28lfl4') X-Ms-Request-Id: - - 0a694e62-7be5-4885-8232-d4f6264846bb + - 43b6a721-7a95-4b55-bc65-124fce41241b status: 201 Created code: 201 duration: "" @@ -60,24 +60,24 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Mon, 19 Jul 2021 14:37:21 GMT + - Mon, 26 Jul 2021 21:18:17 GMT X-Ms-Version: - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotableymm29p39v3dmt + url: https://seankaneprim.table.cosmos.azure.com/gotablew27b8eh28lfl4 method: POST response: body: "" headers: Date: - - Mon, 19 Jul 2021 14:37:14 GMT + - Mon, 26 Jul 2021 21:18:16 GMT Etag: - - W/"datetime'2021-07-19T14%3A37%3A14.8523528Z'" + - W/"datetime'2021-07-26T21%3A18%3A17.3071368Z'" Location: - - https://seankaneprim.table.cosmos.azure.com/gotableymm29p39v3dmt(PartitionKey='partition',RowKey='1') + - https://seankaneprim.table.cosmos.azure.com/gotablew27b8eh28lfl4(PartitionKey='partition',RowKey='1') Preference-Applied: - return-no-content X-Ms-Request-Id: - - 48e97267-ccab-4b5d-bb13-45a18fdd78be + - a80cbda9-24f5-43ed-b712-fb4a17f4e760 status: 204 No Content code: 204 duration: "" @@ -95,22 +95,22 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Mon, 19 Jul 2021 14:37:21 GMT + - Mon, 26 Jul 2021 21:18:17 GMT X-Ms-Version: - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotableymm29p39v3dmt(PartitionKey='partition',RowKey='1')?%24format=application%2Fjson%3Bodata%3Dfullmetadata + url: https://seankaneprim.table.cosmos.azure.com/gotablew27b8eh28lfl4(PartitionKey='partition',RowKey='1')?%24format=application%2Fjson%3Bodata%3Dfullmetadata method: GET response: - body: '{"odata.metadata":"https://seankaneprim.table.cosmos.azure.com/gotableymm29p39v3dmt/$metadata#gotableymm29p39v3dmt/@Element","odata.etag":"W/\"datetime''2021-07-19T14%3A37%3A14.8523528Z''\"","Binary@odata.type":"Edm.Binary","Binary":"U29tZUJpbmFyeQ==","Bool":false,"DateTime@odata.type":"Edm.DateTime","DateTime":"2013-08-02T17:37:43.0090043Z","Double":1234.1234,"Guid@odata.type":"Edm.Guid","Guid":"4185404a-5818-48c3-b9be-f217df0dba6f","Int32":1234,"Int64@odata.type":"Edm.Int64","Int64":"123456789012","PartitionKey":"partition","RowKey":"1","String":"test","Timestamp":"2021-07-19T14:37:14.8523528Z"}' + body: '{"odata.metadata":"https://seankaneprim.table.cosmos.azure.com/gotablew27b8eh28lfl4/$metadata#gotablew27b8eh28lfl4/@Element","odata.etag":"W/\"datetime''2021-07-26T21%3A18%3A17.3071368Z''\"","Binary@odata.type":"Edm.Binary","Binary":"U29tZUJpbmFyeQ==","Bool":false,"DateTime@odata.type":"Edm.DateTime","DateTime":"2013-08-02T17:37:43.0090043Z","Double":1234.1234,"Guid@odata.type":"Edm.Guid","Guid":"4185404a-5818-48c3-b9be-f217df0dba6f","Int32":1234,"Int64@odata.type":"Edm.Int64","Int64":"123456789012","PartitionKey":"partition","RowKey":"1","String":"test","Timestamp":"2021-07-26T21:18:17.3071368Z"}' headers: Content-Type: - application/json;odata=minimalmetadata Date: - - Mon, 19 Jul 2021 14:37:14 GMT + - Mon, 26 Jul 2021 21:18:16 GMT Etag: - - W/"datetime'2021-07-19T14%3A37%3A14.8523528Z'" + - W/"datetime'2021-07-26T21%3A18%3A17.3071368Z'" X-Ms-Request-Id: - - 565a0152-1211-4117-8df7-f5d2258f1950 + - 8d6e8514-e5c5-4dee-86be-690f3205d3b5 status: 200 OK code: 200 duration: "" @@ -126,18 +126,18 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Mon, 19 Jul 2021 14:37:22 GMT + - Mon, 26 Jul 2021 21:18:17 GMT X-Ms-Version: - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/Tables('gotableymm29p39v3dmt') + url: https://seankaneprim.table.cosmos.azure.com/Tables('gotablew27b8eh28lfl4') method: DELETE response: body: "" headers: Date: - - Mon, 19 Jul 2021 14:37:14 GMT + - Mon, 26 Jul 2021 21:18:17 GMT X-Ms-Request-Id: - - a19b0489-e9e1-41dd-8e9b-14bdc8554320 + - 07eaa283-f9b8-42bb-9073-1ec4870bf45b status: 204 No Content code: 204 duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestInvalidEntity-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestInvalidEntity-variables.yaml index 16a55d2ee5e6..7633cbef4ba1 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestInvalidEntity-variables.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestInvalidEntity-variables.yaml @@ -2,4 +2,4 @@ COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com TABLES_COSMOS_ACCOUNT_NAME: seankaneprim TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== -randomSeed: "1626385601" +randomSeed: "1627334297" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestInvalidEntity.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestInvalidEntity.yaml index 1ac264e42f55..9c038925af06 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestInvalidEntity.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestInvalidEntity.yaml @@ -2,7 +2,7 @@ version: 1 interactions: - request: - body: '{"TableName":"gotableo26y3cx86ywa9"}' + body: '{"TableName":"gotabled5f9jcewxl5vu"}' form: {} headers: Accept: @@ -19,24 +19,24 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:46:41 GMT + - Mon, 26 Jul 2021 21:18:17 GMT X-Ms-Version: - "2019-02-02" url: https://seankaneprim.table.cosmos.azure.com/Tables method: POST response: - body: '{"TableName":"gotableo26y3cx86ywa9","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' + body: '{"TableName":"gotabled5f9jcewxl5vu","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' headers: Content-Type: - application/json;odata=minimalmetadata Date: - - Thu, 15 Jul 2021 21:46:39 GMT + - Mon, 26 Jul 2021 21:18:17 GMT Etag: - - W/"datetime'2021-07-15T21%3A46%3A40.2601992Z'" + - W/"datetime'2021-07-26T21%3A18%3A17.9556360Z'" Location: - - https://seankaneprim.table.cosmos.azure.com/Tables('gotableo26y3cx86ywa9') + - https://seankaneprim.table.cosmos.azure.com/Tables('gotabled5f9jcewxl5vu') X-Ms-Request-Id: - - c93fefce-691a-4259-8277-b289a4f89f49 + - f46f8eb2-3dfc-400a-9b93-410b4b7d1de1 status: 201 Created code: 201 duration: "" @@ -60,22 +60,22 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:46:41 GMT + - Mon, 26 Jul 2021 21:18:18 GMT X-Ms-Version: - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotableo26y3cx86ywa9 + url: https://seankaneprim.table.cosmos.azure.com/gotabled5f9jcewxl5vu method: POST response: body: "{\"odata.error\":{\"code\":\"PropertiesNeedValue\",\"message\":{\"lang\":\"en-us\",\"value\":\"PartitionKey/RowKey - cannot be empty\\r\\nActivityId: 349fb529-6aab-4712-9363-dd5ad38fd531, documentdb-dotnet-sdk/2.14.0 - Host/64-bit MicrosoftWindowsNT/6.2.9200.0\\nRequestID:349fb529-6aab-4712-9363-dd5ad38fd531\\n\"}}}\r\n" + cannot be empty\\r\\nActivityId: 7b96353a-fdb5-4339-b593-be51dffa66e7, documentdb-dotnet-sdk/2.14.0 + Host/64-bit MicrosoftWindowsNT/6.2.9200.0\\nRequestID:7b96353a-fdb5-4339-b593-be51dffa66e7\\n\"}}}\r\n" headers: Content-Type: - application/json;odata=fullmetadata Date: - - Thu, 15 Jul 2021 21:46:40 GMT + - Mon, 26 Jul 2021 21:18:17 GMT X-Ms-Request-Id: - - 349fb529-6aab-4712-9363-dd5ad38fd531 + - 7b96353a-fdb5-4339-b593-be51dffa66e7 status: 400 Bad Request code: 400 duration: "" @@ -91,18 +91,18 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:46:42 GMT + - Mon, 26 Jul 2021 21:18:18 GMT X-Ms-Version: - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/Tables('gotableo26y3cx86ywa9') + url: https://seankaneprim.table.cosmos.azure.com/Tables('gotabled5f9jcewxl5vu') method: DELETE response: body: "" headers: Date: - - Thu, 15 Jul 2021 21:46:40 GMT + - Mon, 26 Jul 2021 21:18:18 GMT X-Ms-Request-Id: - - 79a76dc6-495b-45b9-a556-74b105b2b28a + - 44352d53-c853-41cd-a0d6-5dbe1590f30a status: 204 No Content code: 204 duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestListEntities-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestListEntities-variables.yaml deleted file mode 100644 index 020dafba68f5..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestListEntities-variables.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com -TABLES_COSMOS_ACCOUNT_NAME: seankaneprim -TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== -randomSeed: "1626796656" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestListEntities.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestListEntities.yaml deleted file mode 100644 index 2b02d7b0d715..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestListEntities.yaml +++ /dev/null @@ -1,305 +0,0 @@ ---- -version: 1 -interactions: -- request: - body: '{"TableName":"gotablekpg8v4qrcxayf"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "36" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Tue, 20 Jul 2021 15:57:36 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/Tables - method: POST - response: - body: '{"TableName":"gotablekpg8v4qrcxayf","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' - headers: - Content-Type: - - application/json;odata=minimalmetadata - Date: - - Tue, 20 Jul 2021 15:57:36 GMT - Etag: - - W/"datetime'2021-07-20T15%3A57%3A36.9868296Z'" - Location: - - https://seankaneprim.table.cosmos.azure.com/Tables('gotablekpg8v4qrcxayf') - X-Ms-Request-Id: - - 29a6932d-34fe-43bf-bb15-0d6c9eef5b17 - status: 201 Created - code: 201 - duration: "" -- request: - body: '{"PartitionKey":"partition","RowKey":"0","Value":1}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "51" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - Prefer: - - return-no-content - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Tue, 20 Jul 2021 15:57:37 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotablekpg8v4qrcxayf - method: POST - response: - body: "" - headers: - Date: - - Tue, 20 Jul 2021 15:57:37 GMT - Etag: - - W/"datetime'2021-07-20T15%3A57%3A37.7762312Z'" - Location: - - https://seankaneprim.table.cosmos.azure.com/gotablekpg8v4qrcxayf(PartitionKey='partition',RowKey='0') - Preference-Applied: - - return-no-content - X-Ms-Request-Id: - - 2f1b9870-84c7-46b8-b418-d75d21c3b448 - status: 204 No Content - code: 204 - duration: "" -- request: - body: '{"PartitionKey":"partition","RowKey":"1","Value":2}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "51" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - Prefer: - - return-no-content - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Tue, 20 Jul 2021 15:57:37 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotablekpg8v4qrcxayf - method: POST - response: - body: "" - headers: - Date: - - Tue, 20 Jul 2021 15:57:37 GMT - Etag: - - W/"datetime'2021-07-20T15%3A57%3A37.8735112Z'" - Location: - - https://seankaneprim.table.cosmos.azure.com/gotablekpg8v4qrcxayf(PartitionKey='partition',RowKey='1') - Preference-Applied: - - return-no-content - X-Ms-Request-Id: - - 7cd30c18-6738-4b94-a3b2-14ef52328a4c - status: 204 No Content - code: 204 - duration: "" -- request: - body: '{"PartitionKey":"partition","RowKey":"2","Value":3}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "51" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - Prefer: - - return-no-content - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Tue, 20 Jul 2021 15:57:37 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotablekpg8v4qrcxayf - method: POST - response: - body: "" - headers: - Date: - - Tue, 20 Jul 2021 15:57:37 GMT - Etag: - - W/"datetime'2021-07-20T15%3A57%3A37.9680264Z'" - Location: - - https://seankaneprim.table.cosmos.azure.com/gotablekpg8v4qrcxayf(PartitionKey='partition',RowKey='2') - Preference-Applied: - - return-no-content - X-Ms-Request-Id: - - e2d19d8b-055a-4afd-812b-c85a94476427 - status: 204 No Content - code: 204 - duration: "" -- request: - body: '{"PartitionKey":"partition","RowKey":"3","Value":4}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "51" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - Prefer: - - return-no-content - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Tue, 20 Jul 2021 15:57:37 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotablekpg8v4qrcxayf - method: POST - response: - body: "" - headers: - Date: - - Tue, 20 Jul 2021 15:57:37 GMT - Etag: - - W/"datetime'2021-07-20T15%3A57%3A38.0645896Z'" - Location: - - https://seankaneprim.table.cosmos.azure.com/gotablekpg8v4qrcxayf(PartitionKey='partition',RowKey='3') - Preference-Applied: - - return-no-content - X-Ms-Request-Id: - - 425ae295-a848-455b-8ccd-16ba1cf78366 - status: 204 No Content - code: 204 - duration: "" -- request: - body: '{"PartitionKey":"partition","RowKey":"4","Value":5}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "51" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - Prefer: - - return-no-content - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Tue, 20 Jul 2021 15:57:37 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotablekpg8v4qrcxayf - method: POST - response: - body: "" - headers: - Date: - - Tue, 20 Jul 2021 15:57:37 GMT - Etag: - - W/"datetime'2021-07-20T15%3A57%3A38.1603336Z'" - Location: - - https://seankaneprim.table.cosmos.azure.com/gotablekpg8v4qrcxayf(PartitionKey='partition',RowKey='4') - Preference-Applied: - - return-no-content - X-Ms-Request-Id: - - 0c8dd131-e14b-49db-8092-02106c01b50c - status: 204 No Content - code: 204 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Tue, 20 Jul 2021 15:57:37 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotablekpg8v4qrcxayf() - method: GET - response: - body: '{"value":[{"odata.etag":"W/\"datetime''2021-07-20T15%3A57%3A37.7762312Z''\"","PartitionKey":"partition","RowKey":"0","Value":1,"Timestamp":"2021-07-20T15:57:37.7762312Z"},{"odata.etag":"W/\"datetime''2021-07-20T15%3A57%3A37.8735112Z''\"","PartitionKey":"partition","RowKey":"1","Value":2,"Timestamp":"2021-07-20T15:57:37.8735112Z"},{"odata.etag":"W/\"datetime''2021-07-20T15%3A57%3A37.9680264Z''\"","PartitionKey":"partition","RowKey":"2","Value":3,"Timestamp":"2021-07-20T15:57:37.9680264Z"},{"odata.etag":"W/\"datetime''2021-07-20T15%3A57%3A38.0645896Z''\"","PartitionKey":"partition","RowKey":"3","Value":4,"Timestamp":"2021-07-20T15:57:38.0645896Z"},{"odata.etag":"W/\"datetime''2021-07-20T15%3A57%3A38.1603336Z''\"","PartitionKey":"partition","RowKey":"4","Value":5,"Timestamp":"2021-07-20T15:57:38.1603336Z"}],"odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#gotablekpg8v4qrcxayf"}' - headers: - Content-Type: - - application/json;odata=minimalmetadata - Date: - - Tue, 20 Jul 2021 15:57:37 GMT - X-Ms-Request-Id: - - e9ab21c5-dc78-458c-a610-0b7284f6b128 - status: 200 OK - code: 200 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Tue, 20 Jul 2021 15:57:38 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/Tables('gotablekpg8v4qrcxayf') - method: DELETE - response: - body: "" - headers: - Date: - - Tue, 20 Jul 2021 15:57:37 GMT - X-Ms-Request-Id: - - e883f6a8-15bc-4e93-86fa-ce057757595c - status: 204 No Content - code: 204 - duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestMergeEntity-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestMergeEntity-variables.yaml index a75114e81e50..1c4bbfb55793 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestMergeEntity-variables.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestMergeEntity-variables.yaml @@ -2,4 +2,4 @@ COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com TABLES_COSMOS_ACCOUNT_NAME: seankaneprim TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== -randomSeed: "1626385602" +randomSeed: "1627334298" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestMergeEntity.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestMergeEntity.yaml index 5ead71d39a1c..5cadabeb0d9d 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestMergeEntity.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestMergeEntity.yaml @@ -2,7 +2,7 @@ version: 1 interactions: - request: - body: '{"TableName":"gotableywepa36ndzpzr"}' + body: '{"TableName":"gotablezr188z9hv9uc3"}' form: {} headers: Accept: @@ -19,24 +19,24 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:46:42 GMT + - Mon, 26 Jul 2021 21:18:18 GMT X-Ms-Version: - "2019-02-02" url: https://seankaneprim.table.cosmos.azure.com/Tables method: POST response: - body: '{"TableName":"gotableywepa36ndzpzr","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' + body: '{"TableName":"gotablezr188z9hv9uc3","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' headers: Content-Type: - application/json;odata=minimalmetadata Date: - - Thu, 15 Jul 2021 21:46:41 GMT + - Mon, 26 Jul 2021 21:18:18 GMT Etag: - - W/"datetime'2021-07-15T21%3A46%3A41.4738440Z'" + - W/"datetime'2021-07-26T21%3A18%3A19.0668808Z'" Location: - - https://seankaneprim.table.cosmos.azure.com/Tables('gotableywepa36ndzpzr') + - https://seankaneprim.table.cosmos.azure.com/Tables('gotablezr188z9hv9uc3') X-Ms-Request-Id: - - 45bd7a97-85c0-4a53-b6c5-63f9061d4d55 + - f0329b0a-6fe1-40c0-b3cb-896ade7902d3 status: 201 Created code: 201 duration: "" @@ -61,24 +61,24 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:46:43 GMT + - Mon, 26 Jul 2021 21:18:19 GMT X-Ms-Version: - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotableywepa36ndzpzr + url: https://seankaneprim.table.cosmos.azure.com/gotablezr188z9hv9uc3 method: POST response: body: "" headers: Date: - - Thu, 15 Jul 2021 21:46:41 GMT + - Mon, 26 Jul 2021 21:18:19 GMT Etag: - - W/"datetime'2021-07-15T21%3A46%3A42.2534152Z'" + - W/"datetime'2021-07-26T21%3A18%3A19.7497864Z'" Location: - - https://seankaneprim.table.cosmos.azure.com/gotableywepa36ndzpzr(PartitionKey='partition',RowKey='1') + - https://seankaneprim.table.cosmos.azure.com/gotablezr188z9hv9uc3(PartitionKey='partition',RowKey='1') Preference-Applied: - return-no-content X-Ms-Request-Id: - - 937b0662-fd0a-4f27-8f52-258f81876137 + - 23b24dce-a8c8-4e1c-bdbd-d62a8e321bdb status: 204 No Content code: 204 duration: "" @@ -96,23 +96,23 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:46:43 GMT + - Mon, 26 Jul 2021 21:18:19 GMT X-Ms-Version: - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotableywepa36ndzpzr(PartitionKey='partition',RowKey='1') + url: https://seankaneprim.table.cosmos.azure.com/gotablezr188z9hv9uc3(PartitionKey='partition',RowKey='1') method: GET response: - body: '{"odata.metadata":"https://seankaneprim.table.cosmos.azure.com/gotableywepa36ndzpzr/$metadata#gotableywepa36ndzpzr/@Element","odata.etag":"W/\"datetime''2021-07-15T21%3A46%3A42.2534152Z''\"","Bool":true,"Integer":1,"PartitionKey":"partition","RowKey":"1","String":"some - string 1","Timestamp":"2021-07-15T21:46:42.2534152Z"}' + body: '{"odata.metadata":"https://seankaneprim.table.cosmos.azure.com/gotablezr188z9hv9uc3/$metadata#gotablezr188z9hv9uc3/@Element","odata.etag":"W/\"datetime''2021-07-26T21%3A18%3A19.7497864Z''\"","Bool":true,"Integer":1,"PartitionKey":"partition","RowKey":"1","String":"some + string 1","Timestamp":"2021-07-26T21:18:19.7497864Z"}' headers: Content-Type: - application/json;odata=minimalmetadata Date: - - Thu, 15 Jul 2021 21:46:41 GMT + - Mon, 26 Jul 2021 21:18:19 GMT Etag: - - W/"datetime'2021-07-15T21%3A46%3A42.2534152Z'" + - W/"datetime'2021-07-26T21%3A18%3A19.7497864Z'" X-Ms-Request-Id: - - 83d8b301-116d-4f1a-9920-2ba95888e6ff + - b0f7b5ba-c2bc-4a56-ba6c-76e5b41a8211 status: 200 OK code: 200 duration: "" @@ -139,20 +139,20 @@ interactions: X-Http-Method: - MERGE X-Ms-Date: - - Thu, 15 Jul 2021 21:46:43 GMT + - Mon, 26 Jul 2021 21:18:19 GMT X-Ms-Version: - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotableywepa36ndzpzr(PartitionKey='partition',RowKey='1') + url: https://seankaneprim.table.cosmos.azure.com/gotablezr188z9hv9uc3(PartitionKey='partition',RowKey='1') method: POST response: body: "" headers: Date: - - Thu, 15 Jul 2021 21:46:41 GMT + - Mon, 26 Jul 2021 21:18:19 GMT Etag: - - W/"datetime'2021-07-15T21%3A46%3A42.4934408Z'" + - W/"datetime'2021-07-26T21%3A18%3A19.9927816Z'" X-Ms-Request-Id: - - e3b0733d-5162-4aec-9bbd-b1407c8033dc + - 95429ed4-67e7-4270-a5b5-1b0b245e2d80 status: 204 No Content code: 204 duration: "" @@ -170,21 +170,21 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:46:43 GMT + - Mon, 26 Jul 2021 21:18:20 GMT X-Ms-Version: - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotableywepa36ndzpzr()?%24filter=RowKey+eq+%271%27 + url: https://seankaneprim.table.cosmos.azure.com/gotablezr188z9hv9uc3()?%24filter=RowKey+eq+%271%27 method: GET response: - body: '{"value":[{"odata.etag":"W/\"datetime''2021-07-15T21%3A46%3A42.4934408Z''\"","Bool":true,"Integer":1,"PartitionKey":"partition","RowKey":"1","String":"some - string 1","MergeProperty":"foo","Timestamp":"2021-07-15T21:46:42.4934408Z"}],"odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#gotableywepa36ndzpzr"}' + body: '{"value":[{"odata.etag":"W/\"datetime''2021-07-26T21%3A18%3A19.9927816Z''\"","Bool":true,"Integer":1,"PartitionKey":"partition","RowKey":"1","String":"some + string 1","MergeProperty":"foo","Timestamp":"2021-07-26T21:18:19.9927816Z"}],"odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#gotablezr188z9hv9uc3"}' headers: Content-Type: - application/json;odata=minimalmetadata Date: - - Thu, 15 Jul 2021 21:46:41 GMT + - Mon, 26 Jul 2021 21:18:19 GMT X-Ms-Request-Id: - - addd730f-bdd2-42bf-85d6-af1be8c38861 + - 055b6162-21a8-48e2-a157-6192f4556921 status: 200 OK code: 200 duration: "" @@ -200,18 +200,18 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:46:43 GMT + - Mon, 26 Jul 2021 21:18:20 GMT X-Ms-Version: - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/Tables('gotableywepa36ndzpzr') + url: https://seankaneprim.table.cosmos.azure.com/Tables('gotablezr188z9hv9uc3') method: DELETE response: body: "" headers: Date: - - Thu, 15 Jul 2021 21:46:42 GMT + - Mon, 26 Jul 2021 21:18:20 GMT X-Ms-Request-Id: - - 5d0bc5b2-21ab-4488-a11a-8469d0d128a9 + - 6c4d934e-a223-4d05-826e-d3e852129309 status: 204 No Content code: 204 duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestQueryComplexEntity-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestQueryComplexEntity-variables.yaml index de24a8dd2153..8e977e00cefc 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestQueryComplexEntity-variables.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestQueryComplexEntity-variables.yaml @@ -2,4 +2,4 @@ COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com TABLES_COSMOS_ACCOUNT_NAME: seankaneprim TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== -randomSeed: "1626385604" +randomSeed: "1627334300" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestQueryComplexEntity.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestQueryComplexEntity.yaml index 25b1e6079245..d05faba94344 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestQueryComplexEntity.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestQueryComplexEntity.yaml @@ -2,7 +2,7 @@ version: 1 interactions: - request: - body: '{"TableName":"gotablel4kmcyxdk8stw"}' + body: '{"TableName":"gotablemkrsh3811z3ws"}' form: {} headers: Accept: @@ -19,24 +19,24 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:46:44 GMT + - Mon, 26 Jul 2021 21:18:20 GMT X-Ms-Version: - "2019-02-02" url: https://seankaneprim.table.cosmos.azure.com/Tables method: POST response: - body: '{"TableName":"gotablel4kmcyxdk8stw","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' + body: '{"TableName":"gotablemkrsh3811z3ws","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' headers: Content-Type: - application/json;odata=minimalmetadata Date: - - Thu, 15 Jul 2021 21:46:42 GMT + - Mon, 26 Jul 2021 21:18:20 GMT Etag: - - W/"datetime'2021-07-15T21%3A46%3A43.1493128Z'" + - W/"datetime'2021-07-26T21%3A18%3A20.9903624Z'" Location: - - https://seankaneprim.table.cosmos.azure.com/Tables('gotablel4kmcyxdk8stw') + - https://seankaneprim.table.cosmos.azure.com/Tables('gotablemkrsh3811z3ws') X-Ms-Request-Id: - - ec87c209-a925-4e3f-9741-daae9a61cfb2 + - cbbfcced-1e35-482d-a0be-96b29d4deaa2 status: 201 Created code: 201 duration: "" @@ -60,24 +60,24 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:46:44 GMT + - Mon, 26 Jul 2021 21:18:21 GMT X-Ms-Version: - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotablel4kmcyxdk8stw + url: https://seankaneprim.table.cosmos.azure.com/gotablemkrsh3811z3ws method: POST response: body: "" headers: Date: - - Thu, 15 Jul 2021 21:46:43 GMT + - Mon, 26 Jul 2021 21:18:20 GMT Etag: - - W/"datetime'2021-07-15T21%3A46%3A43.9421960Z'" + - W/"datetime'2021-07-26T21%3A18%3A21.6422408Z'" Location: - - https://seankaneprim.table.cosmos.azure.com/gotablel4kmcyxdk8stw(PartitionKey='partition',RowKey='1') + - https://seankaneprim.table.cosmos.azure.com/gotablemkrsh3811z3ws(PartitionKey='partition',RowKey='1') Preference-Applied: - return-no-content X-Ms-Request-Id: - - 52dec415-e81d-4983-985a-42a2ca3aa918 + - 3b17fed7-bb7a-43c4-8a36-fcdf200e9268 status: 204 No Content code: 204 duration: "" @@ -101,24 +101,24 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:46:45 GMT + - Mon, 26 Jul 2021 21:18:21 GMT X-Ms-Version: - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotablel4kmcyxdk8stw + url: https://seankaneprim.table.cosmos.azure.com/gotablemkrsh3811z3ws method: POST response: body: "" headers: Date: - - Thu, 15 Jul 2021 21:46:43 GMT + - Mon, 26 Jul 2021 21:18:21 GMT Etag: - - W/"datetime'2021-07-15T21%3A46%3A44.0593416Z'" + - W/"datetime'2021-07-26T21%3A18%3A21.7636872Z'" Location: - - https://seankaneprim.table.cosmos.azure.com/gotablel4kmcyxdk8stw(PartitionKey='partition',RowKey='2') + - https://seankaneprim.table.cosmos.azure.com/gotablemkrsh3811z3ws(PartitionKey='partition',RowKey='2') Preference-Applied: - return-no-content X-Ms-Request-Id: - - 0976bee4-8e5d-4af4-976b-b989ae9c83f1 + - 3ed41e41-d14b-49ed-a2ef-32467f57f687 status: 204 No Content code: 204 duration: "" @@ -142,24 +142,24 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:46:45 GMT + - Mon, 26 Jul 2021 21:18:21 GMT X-Ms-Version: - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotablel4kmcyxdk8stw + url: https://seankaneprim.table.cosmos.azure.com/gotablemkrsh3811z3ws method: POST response: body: "" headers: Date: - - Thu, 15 Jul 2021 21:46:43 GMT + - Mon, 26 Jul 2021 21:18:21 GMT Etag: - - W/"datetime'2021-07-15T21%3A46%3A44.1717768Z'" + - W/"datetime'2021-07-26T21%3A18%3A21.9247624Z'" Location: - - https://seankaneprim.table.cosmos.azure.com/gotablel4kmcyxdk8stw(PartitionKey='partition',RowKey='3') + - https://seankaneprim.table.cosmos.azure.com/gotablemkrsh3811z3ws(PartitionKey='partition',RowKey='3') Preference-Applied: - return-no-content X-Ms-Request-Id: - - 6f388117-3ff5-4c6f-96b8-678776b47909 + - ec2cb865-39cd-49da-8b4b-e31dd5f5b32c status: 204 No Content code: 204 duration: "" @@ -183,24 +183,24 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:46:45 GMT + - Mon, 26 Jul 2021 21:18:21 GMT X-Ms-Version: - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotablel4kmcyxdk8stw + url: https://seankaneprim.table.cosmos.azure.com/gotablemkrsh3811z3ws method: POST response: body: "" headers: Date: - - Thu, 15 Jul 2021 21:46:43 GMT + - Mon, 26 Jul 2021 21:18:21 GMT Etag: - - W/"datetime'2021-07-15T21%3A46%3A44.2786824Z'" + - W/"datetime'2021-07-26T21%3A18%3A22.0864520Z'" Location: - - https://seankaneprim.table.cosmos.azure.com/gotablel4kmcyxdk8stw(PartitionKey='partition',RowKey='4') + - https://seankaneprim.table.cosmos.azure.com/gotablemkrsh3811z3ws(PartitionKey='partition',RowKey='4') Preference-Applied: - return-no-content X-Ms-Request-Id: - - e1516190-f048-4300-8ec3-39c7cbef499e + - 2b173e44-05d9-4133-b580-4432e80572eb status: 204 No Content code: 204 duration: "" @@ -224,24 +224,24 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:46:45 GMT + - Mon, 26 Jul 2021 21:18:21 GMT X-Ms-Version: - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotablel4kmcyxdk8stw + url: https://seankaneprim.table.cosmos.azure.com/gotablemkrsh3811z3ws method: POST response: body: "" headers: Date: - - Thu, 15 Jul 2021 21:46:43 GMT + - Mon, 26 Jul 2021 21:18:21 GMT Etag: - - W/"datetime'2021-07-15T21%3A46%3A44.3910152Z'" + - W/"datetime'2021-07-26T21%3A18%3A22.2039048Z'" Location: - - https://seankaneprim.table.cosmos.azure.com/gotablel4kmcyxdk8stw(PartitionKey='partition',RowKey='5') + - https://seankaneprim.table.cosmos.azure.com/gotablemkrsh3811z3ws(PartitionKey='partition',RowKey='5') Preference-Applied: - return-no-content X-Ms-Request-Id: - - 00030504-bf79-4cf8-a0cd-3a3c558406b9 + - 12047e96-ba32-4634-b0f9-cc842b0226d9 status: 204 No Content code: 204 duration: "" @@ -259,20 +259,20 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:46:45 GMT + - Mon, 26 Jul 2021 21:18:22 GMT X-Ms-Version: - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotablel4kmcyxdk8stw()?%24filter=RowKey+lt+%275%27 + url: https://seankaneprim.table.cosmos.azure.com/gotablemkrsh3811z3ws()?%24filter=RowKey+lt+%275%27 method: GET response: - body: '{"value":[{"odata.etag":"W/\"datetime''2021-07-15T21%3A46%3A43.9421960Z''\"","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":1,"PartitionKey":"partition","RowKey":"1","String":"someString","Timestamp":"2021-07-15T21:46:43.9421960Z"},{"odata.etag":"W/\"datetime''2021-07-15T21%3A46%3A44.0593416Z''\"","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":2,"PartitionKey":"partition","RowKey":"2","String":"someString","Timestamp":"2021-07-15T21:46:44.0593416Z"},{"odata.etag":"W/\"datetime''2021-07-15T21%3A46%3A44.1717768Z''\"","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":3,"PartitionKey":"partition","RowKey":"3","String":"someString","Timestamp":"2021-07-15T21:46:44.1717768Z"},{"odata.etag":"W/\"datetime''2021-07-15T21%3A46%3A44.2786824Z''\"","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":4,"PartitionKey":"partition","RowKey":"4","String":"someString","Timestamp":"2021-07-15T21:46:44.2786824Z"}],"odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#gotablel4kmcyxdk8stw"}' + body: '{"value":[{"odata.etag":"W/\"datetime''2021-07-26T21%3A18%3A21.6422408Z''\"","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":1,"PartitionKey":"partition","RowKey":"1","String":"someString","Timestamp":"2021-07-26T21:18:21.6422408Z"},{"odata.etag":"W/\"datetime''2021-07-26T21%3A18%3A21.7636872Z''\"","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":2,"PartitionKey":"partition","RowKey":"2","String":"someString","Timestamp":"2021-07-26T21:18:21.7636872Z"},{"odata.etag":"W/\"datetime''2021-07-26T21%3A18%3A21.9247624Z''\"","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":3,"PartitionKey":"partition","RowKey":"3","String":"someString","Timestamp":"2021-07-26T21:18:21.9247624Z"},{"odata.etag":"W/\"datetime''2021-07-26T21%3A18%3A22.0864520Z''\"","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":4,"PartitionKey":"partition","RowKey":"4","String":"someString","Timestamp":"2021-07-26T21:18:22.0864520Z"}],"odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#gotablemkrsh3811z3ws"}' headers: Content-Type: - application/json;odata=minimalmetadata Date: - - Thu, 15 Jul 2021 21:46:43 GMT + - Mon, 26 Jul 2021 21:18:21 GMT X-Ms-Request-Id: - - b72877bb-39e1-493b-8eb2-bef79563fb95 + - 80e7147e-6476-446e-bd73-fe2014956211 status: 200 OK code: 200 duration: "" @@ -288,18 +288,18 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:46:45 GMT + - Mon, 26 Jul 2021 21:18:22 GMT X-Ms-Version: - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/Tables('gotablel4kmcyxdk8stw') + url: https://seankaneprim.table.cosmos.azure.com/Tables('gotablemkrsh3811z3ws') method: DELETE response: body: "" headers: Date: - - Thu, 15 Jul 2021 21:46:44 GMT + - Mon, 26 Jul 2021 21:18:22 GMT X-Ms-Request-Id: - - 1793a9d0-e7ec-40a0-8f28-34367cebcf70 + - 0343cb5c-bc12-4406-b4d5-27682bbd0c0e status: 204 No Content code: 204 duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestQuerySimpleEntity-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestQuerySimpleEntity-variables.yaml index 27d022080441..95753821ed2f 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestQuerySimpleEntity-variables.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestQuerySimpleEntity-variables.yaml @@ -2,4 +2,4 @@ COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com TABLES_COSMOS_ACCOUNT_NAME: seankaneprim TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== -randomSeed: "1626385605" +randomSeed: "1627334302" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestQuerySimpleEntity.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestQuerySimpleEntity.yaml index c3e634120291..83424f717ebc 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestQuerySimpleEntity.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestQuerySimpleEntity.yaml @@ -2,7 +2,7 @@ version: 1 interactions: - request: - body: '{"TableName":"gotableas9dj7zb9zmt2"}' + body: '{"TableName":"gotableh1ewd0kw2klwi"}' form: {} headers: Accept: @@ -19,24 +19,24 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:46:45 GMT + - Mon, 26 Jul 2021 21:18:22 GMT X-Ms-Version: - "2019-02-02" url: https://seankaneprim.table.cosmos.azure.com/Tables method: POST response: - body: '{"TableName":"gotableas9dj7zb9zmt2","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' + body: '{"TableName":"gotableh1ewd0kw2klwi","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' headers: Content-Type: - application/json;odata=minimalmetadata Date: - - Thu, 15 Jul 2021 21:46:44 GMT + - Mon, 26 Jul 2021 21:18:22 GMT Etag: - - W/"datetime'2021-07-15T21%3A46%3A45.0530312Z'" + - W/"datetime'2021-07-26T21%3A18%3A22.8660232Z'" Location: - - https://seankaneprim.table.cosmos.azure.com/Tables('gotableas9dj7zb9zmt2') + - https://seankaneprim.table.cosmos.azure.com/Tables('gotableh1ewd0kw2klwi') X-Ms-Request-Id: - - 203b31c5-58ec-488e-9019-bdc68437284b + - d78ad102-43c7-4aec-9f72-c16a4ad05e20 status: 201 Created code: 201 duration: "" @@ -61,24 +61,24 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:46:46 GMT + - Mon, 26 Jul 2021 21:18:23 GMT X-Ms-Version: - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotableas9dj7zb9zmt2 + url: https://seankaneprim.table.cosmos.azure.com/gotableh1ewd0kw2klwi method: POST response: body: "" headers: Date: - - Thu, 15 Jul 2021 21:46:44 GMT + - Mon, 26 Jul 2021 21:18:22 GMT Etag: - - W/"datetime'2021-07-15T21%3A46%3A45.8457096Z'" + - W/"datetime'2021-07-26T21%3A18%3A23.5078664Z'" Location: - - https://seankaneprim.table.cosmos.azure.com/gotableas9dj7zb9zmt2(PartitionKey='partition',RowKey='1') + - https://seankaneprim.table.cosmos.azure.com/gotableh1ewd0kw2klwi(PartitionKey='partition',RowKey='1') Preference-Applied: - return-no-content X-Ms-Request-Id: - - b460e81c-d122-48e5-874e-be36884a0f09 + - ef9cbbaa-8031-4895-ac46-da9fb206d398 status: 204 No Content code: 204 duration: "" @@ -103,24 +103,24 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:46:46 GMT + - Mon, 26 Jul 2021 21:18:23 GMT X-Ms-Version: - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotableas9dj7zb9zmt2 + url: https://seankaneprim.table.cosmos.azure.com/gotableh1ewd0kw2klwi method: POST response: body: "" headers: Date: - - Thu, 15 Jul 2021 21:46:45 GMT + - Mon, 26 Jul 2021 21:18:22 GMT Etag: - - W/"datetime'2021-07-15T21%3A46%3A45.9550728Z'" + - W/"datetime'2021-07-26T21%3A18%3A23.6566536Z'" Location: - - https://seankaneprim.table.cosmos.azure.com/gotableas9dj7zb9zmt2(PartitionKey='partition',RowKey='2') + - https://seankaneprim.table.cosmos.azure.com/gotableh1ewd0kw2klwi(PartitionKey='partition',RowKey='2') Preference-Applied: - return-no-content X-Ms-Request-Id: - - 97042963-c1df-44f4-9731-3757649977fa + - 8f17d4fa-b98a-4f10-ac11-f012a99077c3 status: 204 No Content code: 204 duration: "" @@ -145,24 +145,24 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:46:47 GMT + - Mon, 26 Jul 2021 21:18:23 GMT X-Ms-Version: - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotableas9dj7zb9zmt2 + url: https://seankaneprim.table.cosmos.azure.com/gotableh1ewd0kw2klwi method: POST response: body: "" headers: Date: - - Thu, 15 Jul 2021 21:46:45 GMT + - Mon, 26 Jul 2021 21:18:23 GMT Etag: - - W/"datetime'2021-07-15T21%3A46%3A46.0663816Z'" + - W/"datetime'2021-07-26T21%3A18%3A23.7676552Z'" Location: - - https://seankaneprim.table.cosmos.azure.com/gotableas9dj7zb9zmt2(PartitionKey='partition',RowKey='3') + - https://seankaneprim.table.cosmos.azure.com/gotableh1ewd0kw2klwi(PartitionKey='partition',RowKey='3') Preference-Applied: - return-no-content X-Ms-Request-Id: - - 19050174-5c5e-4b2e-96d9-1e6d39f90e57 + - aa32ff1c-6367-4f89-81bb-56bfa6c35798 status: 204 No Content code: 204 duration: "" @@ -187,24 +187,24 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:46:47 GMT + - Mon, 26 Jul 2021 21:18:23 GMT X-Ms-Version: - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotableas9dj7zb9zmt2 + url: https://seankaneprim.table.cosmos.azure.com/gotableh1ewd0kw2klwi method: POST response: body: "" headers: Date: - - Thu, 15 Jul 2021 21:46:45 GMT + - Mon, 26 Jul 2021 21:18:23 GMT Etag: - - W/"datetime'2021-07-15T21%3A46%3A46.1749256Z'" + - W/"datetime'2021-07-26T21%3A18%3A23.8920712Z'" Location: - - https://seankaneprim.table.cosmos.azure.com/gotableas9dj7zb9zmt2(PartitionKey='partition',RowKey='4') + - https://seankaneprim.table.cosmos.azure.com/gotableh1ewd0kw2klwi(PartitionKey='partition',RowKey='4') Preference-Applied: - return-no-content X-Ms-Request-Id: - - 3c94dbe9-44da-466b-907e-b099ec767086 + - fbe73b67-08a4-4d29-a022-a2043435072d status: 204 No Content code: 204 duration: "" @@ -229,24 +229,24 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:46:47 GMT + - Mon, 26 Jul 2021 21:18:23 GMT X-Ms-Version: - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotableas9dj7zb9zmt2 + url: https://seankaneprim.table.cosmos.azure.com/gotableh1ewd0kw2klwi method: POST response: body: "" headers: Date: - - Thu, 15 Jul 2021 21:46:45 GMT + - Mon, 26 Jul 2021 21:18:23 GMT Etag: - - W/"datetime'2021-07-15T21%3A46%3A46.2854152Z'" + - W/"datetime'2021-07-26T21%3A18%3A24.0051208Z'" Location: - - https://seankaneprim.table.cosmos.azure.com/gotableas9dj7zb9zmt2(PartitionKey='partition',RowKey='5') + - https://seankaneprim.table.cosmos.azure.com/gotableh1ewd0kw2klwi(PartitionKey='partition',RowKey='5') Preference-Applied: - return-no-content X-Ms-Request-Id: - - 578f652c-8ea1-4c77-a479-4639a6255c73 + - 40d88583-4420-42e2-ac2b-e992e43413b9 status: 204 No Content code: 204 duration: "" @@ -264,24 +264,24 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:46:47 GMT + - Mon, 26 Jul 2021 21:18:23 GMT X-Ms-Version: - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotableas9dj7zb9zmt2()?%24filter=RowKey+lt+%275%27 + url: https://seankaneprim.table.cosmos.azure.com/gotableh1ewd0kw2klwi()?%24filter=RowKey+lt+%275%27 method: GET response: - body: '{"value":[{"odata.etag":"W/\"datetime''2021-07-15T21%3A46%3A45.8457096Z''\"","Bool":true,"Integer":1,"PartitionKey":"partition","RowKey":"1","String":"some - string 1","Timestamp":"2021-07-15T21:46:45.8457096Z"},{"odata.etag":"W/\"datetime''2021-07-15T21%3A46%3A45.9550728Z''\"","Bool":true,"Integer":2,"PartitionKey":"partition","RowKey":"2","String":"some - string 2","Timestamp":"2021-07-15T21:46:45.9550728Z"},{"odata.etag":"W/\"datetime''2021-07-15T21%3A46%3A46.0663816Z''\"","Bool":true,"Integer":3,"PartitionKey":"partition","RowKey":"3","String":"some - string 3","Timestamp":"2021-07-15T21:46:46.0663816Z"},{"odata.etag":"W/\"datetime''2021-07-15T21%3A46%3A46.1749256Z''\"","Bool":true,"Integer":4,"PartitionKey":"partition","RowKey":"4","String":"some - string 4","Timestamp":"2021-07-15T21:46:46.1749256Z"}],"odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#gotableas9dj7zb9zmt2"}' + body: '{"value":[{"odata.etag":"W/\"datetime''2021-07-26T21%3A18%3A23.5078664Z''\"","Bool":true,"Integer":1,"PartitionKey":"partition","RowKey":"1","String":"some + string 1","Timestamp":"2021-07-26T21:18:23.5078664Z"},{"odata.etag":"W/\"datetime''2021-07-26T21%3A18%3A23.6566536Z''\"","Bool":true,"Integer":2,"PartitionKey":"partition","RowKey":"2","String":"some + string 2","Timestamp":"2021-07-26T21:18:23.6566536Z"},{"odata.etag":"W/\"datetime''2021-07-26T21%3A18%3A23.7676552Z''\"","Bool":true,"Integer":3,"PartitionKey":"partition","RowKey":"3","String":"some + string 3","Timestamp":"2021-07-26T21:18:23.7676552Z"},{"odata.etag":"W/\"datetime''2021-07-26T21%3A18%3A23.8920712Z''\"","Bool":true,"Integer":4,"PartitionKey":"partition","RowKey":"4","String":"some + string 4","Timestamp":"2021-07-26T21:18:23.8920712Z"}],"odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#gotableh1ewd0kw2klwi"}' headers: Content-Type: - application/json;odata=minimalmetadata Date: - - Thu, 15 Jul 2021 21:46:45 GMT + - Mon, 26 Jul 2021 21:18:23 GMT X-Ms-Request-Id: - - 8bb28038-8ffd-4697-b508-14cd085a8889 + - f6504c08-cc19-4aa1-aa2b-1b290b877e8b status: 200 OK code: 200 duration: "" @@ -297,18 +297,18 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:46:47 GMT + - Mon, 26 Jul 2021 21:18:24 GMT X-Ms-Version: - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/Tables('gotableas9dj7zb9zmt2') + url: https://seankaneprim.table.cosmos.azure.com/Tables('gotableh1ewd0kw2klwi') method: DELETE response: body: "" headers: Date: - - Thu, 15 Jul 2021 21:46:45 GMT + - Mon, 26 Jul 2021 21:18:23 GMT X-Ms-Request-Id: - - 7f1374ae-bb39-4218-825c-47cf63e069a8 + - 2d5423c5-bd49-49f1-89c3-ac2dacd6f244 status: 204 No Content code: 204 duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestServiceErrors-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestServiceErrors-variables.yaml index 641bc916158f..37a09a3b278d 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestServiceErrors-variables.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestServiceErrors-variables.yaml @@ -2,4 +2,4 @@ COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com TABLES_COSMOS_ACCOUNT_NAME: seankaneprim TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== -randomSeed: "1626385607" +randomSeed: "1627334304" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestServiceErrors.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestServiceErrors.yaml index 88742dbee314..d14758a4b2ce 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestServiceErrors.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestServiceErrors.yaml @@ -2,7 +2,7 @@ version: 1 interactions: - request: - body: '{"TableName":"gotable3lqp0ygfyeypr"}' + body: '{"TableName":"gotablehbb6pzx61ag1m"}' form: {} headers: Accept: @@ -19,29 +19,29 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:46:47 GMT + - Mon, 26 Jul 2021 21:18:24 GMT X-Ms-Version: - "2019-02-02" url: https://seankaneprim.table.cosmos.azure.com/Tables method: POST response: - body: '{"TableName":"gotable3lqp0ygfyeypr","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' + body: '{"TableName":"gotablehbb6pzx61ag1m","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' headers: Content-Type: - application/json;odata=minimalmetadata Date: - - Thu, 15 Jul 2021 21:46:46 GMT + - Mon, 26 Jul 2021 21:18:24 GMT Etag: - - W/"datetime'2021-07-15T21%3A46%3A46.9644296Z'" + - W/"datetime'2021-07-26T21%3A18%3A24.7500808Z'" Location: - - https://seankaneprim.table.cosmos.azure.com/Tables('gotable3lqp0ygfyeypr') + - https://seankaneprim.table.cosmos.azure.com/Tables('gotablehbb6pzx61ag1m') X-Ms-Request-Id: - - f66ed244-450e-475f-86d1-e0338722399f + - 1f820d6d-07dc-4a45-b547-0ac1e2d9ffbc status: 201 Created code: 201 duration: "" - request: - body: '{"TableName":"gotable3lqp0ygfyeypr"}' + body: '{"TableName":"gotablehbb6pzx61ag1m"}' form: {} headers: Accept: @@ -58,21 +58,21 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:46:48 GMT + - Mon, 26 Jul 2021 21:18:25 GMT X-Ms-Version: - "2019-02-02" url: https://seankaneprim.table.cosmos.azure.com/Tables method: POST response: body: "{\"odata.error\":{\"code\":\"TableAlreadyExists\",\"message\":{\"lang\":\"en-us\",\"value\":\"The - specified table already exists.\\nRequestID:cd5b2bf8-283f-4f24-b66a-4f33a0dd58e3\\n\"}}}\r\n" + specified table already exists.\\nRequestID:d6bf8608-bce6-47de-abf4-d16ffc554997\\n\"}}}\r\n" headers: Content-Type: - application/json;odata=minimalmetadata Date: - - Thu, 15 Jul 2021 21:46:46 GMT + - Mon, 26 Jul 2021 21:18:24 GMT X-Ms-Request-Id: - - cd5b2bf8-283f-4f24-b66a-4f33a0dd58e3 + - d6bf8608-bce6-47de-abf4-d16ffc554997 status: 409 Conflict code: 409 duration: "" @@ -88,18 +88,18 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:46:48 GMT + - Mon, 26 Jul 2021 21:18:25 GMT X-Ms-Version: - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/Tables('gotable3lqp0ygfyeypr') + url: https://seankaneprim.table.cosmos.azure.com/Tables('gotablehbb6pzx61ag1m') method: DELETE response: body: "" headers: Date: - - Thu, 15 Jul 2021 21:46:47 GMT + - Mon, 26 Jul 2021 21:18:25 GMT X-Ms-Request-Id: - - e89ea7d0-07bf-4d3c-bf75-2cd047256160 + - 8432df94-cd39-4748-b441-ced3b3ffd118 status: 204 No Content code: 204 duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestUpsertEntity-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestUpsertEntity-variables.yaml index 6e8160d84853..045228a36f3b 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestUpsertEntity-variables.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestUpsertEntity-variables.yaml @@ -2,4 +2,4 @@ COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com TABLES_COSMOS_ACCOUNT_NAME: seankaneprim TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== -randomSeed: "1626385609" +randomSeed: "1627334305" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestUpsertEntity.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestUpsertEntity.yaml index 6b4ac0d82923..9ff066158682 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestUpsertEntity.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestUpsertEntity.yaml @@ -2,7 +2,7 @@ version: 1 interactions: - request: - body: '{"TableName":"gotableps3e7q02v0n3b"}' + body: '{"TableName":"gotablex9uvqs8kjp1tm"}' form: {} headers: Accept: @@ -19,24 +19,24 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:46:49 GMT + - Mon, 26 Jul 2021 21:18:25 GMT X-Ms-Version: - "2019-02-02" url: https://seankaneprim.table.cosmos.azure.com/Tables method: POST response: - body: '{"TableName":"gotableps3e7q02v0n3b","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' + body: '{"TableName":"gotablex9uvqs8kjp1tm","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' headers: Content-Type: - application/json;odata=minimalmetadata Date: - - Thu, 15 Jul 2021 21:46:48 GMT + - Mon, 26 Jul 2021 21:18:25 GMT Etag: - - W/"datetime'2021-07-15T21%3A46%3A48.2743304Z'" + - W/"datetime'2021-07-26T21%3A18%3A25.9556360Z'" Location: - - https://seankaneprim.table.cosmos.azure.com/Tables('gotableps3e7q02v0n3b') + - https://seankaneprim.table.cosmos.azure.com/Tables('gotablex9uvqs8kjp1tm') X-Ms-Request-Id: - - a4f889e8-1e83-4aeb-a292-7ce8efa86da9 + - c9a4b9e2-c230-4825-892d-0b594fce3a31 status: 201 Created code: 201 duration: "" @@ -59,10 +59,10 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:46:49 GMT + - Mon, 26 Jul 2021 21:18:26 GMT X-Ms-Version: - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotableps3e7q02v0n3b(PartitionKey='partition',RowKey='1') + url: https://seankaneprim.table.cosmos.azure.com/gotablex9uvqs8kjp1tm(PartitionKey='partition',RowKey='1') method: PUT response: body: "" @@ -70,11 +70,11 @@ interactions: Content-Type: - application/json Date: - - Thu, 15 Jul 2021 21:46:48 GMT + - Mon, 26 Jul 2021 21:18:25 GMT Etag: - - W/"datetime'2021-07-15T21%3A46%3A49.0265608Z'" + - W/"datetime'2021-07-26T21%3A18%3A26.6441736Z'" X-Ms-Request-Id: - - 4533f4f6-3628-486f-a87a-959a95e18288 + - 95ecc26c-d6d8-44f9-99e9-a5de86c511e3 status: 204 No Content code: 204 duration: "" @@ -92,23 +92,23 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:46:50 GMT + - Mon, 26 Jul 2021 21:18:26 GMT X-Ms-Version: - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotableps3e7q02v0n3b(PartitionKey='partition',RowKey='1') + url: https://seankaneprim.table.cosmos.azure.com/gotablex9uvqs8kjp1tm(PartitionKey='partition',RowKey='1') method: GET response: - body: '{"odata.metadata":"https://seankaneprim.table.cosmos.azure.com/gotableps3e7q02v0n3b/$metadata#gotableps3e7q02v0n3b/@Element","odata.etag":"W/\"datetime''2021-07-15T21%3A46%3A49.0265608Z''\"","PartitionKey":"partition","RowKey":"1","Bool":true,"Integer":1,"String":"some - string 1","Timestamp":"2021-07-15T21:46:49.0265608Z"}' + body: '{"odata.metadata":"https://seankaneprim.table.cosmos.azure.com/gotablex9uvqs8kjp1tm/$metadata#gotablex9uvqs8kjp1tm/@Element","odata.etag":"W/\"datetime''2021-07-26T21%3A18%3A26.6441736Z''\"","PartitionKey":"partition","RowKey":"1","Bool":true,"Integer":1,"String":"some + string 1","Timestamp":"2021-07-26T21:18:26.6441736Z"}' headers: Content-Type: - application/json;odata=minimalmetadata Date: - - Thu, 15 Jul 2021 21:46:48 GMT + - Mon, 26 Jul 2021 21:18:26 GMT Etag: - - W/"datetime'2021-07-15T21%3A46%3A49.0265608Z'" + - W/"datetime'2021-07-26T21%3A18%3A26.6441736Z'" X-Ms-Request-Id: - - 1fd2baf0-db4c-4b8c-8f06-24fd9e5d7ffd + - 8c493a67-91d3-47d9-8624-2e396490b381 status: 200 OK code: 200 duration: "" @@ -131,10 +131,10 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:46:50 GMT + - Mon, 26 Jul 2021 21:18:26 GMT X-Ms-Version: - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotableps3e7q02v0n3b(PartitionKey='partition',RowKey='1') + url: https://seankaneprim.table.cosmos.azure.com/gotablex9uvqs8kjp1tm(PartitionKey='partition',RowKey='1') method: PUT response: body: "" @@ -142,11 +142,11 @@ interactions: Content-Type: - application/json Date: - - Thu, 15 Jul 2021 21:46:48 GMT + - Mon, 26 Jul 2021 21:18:26 GMT Etag: - - W/"datetime'2021-07-15T21%3A46%3A49.2600328Z'" + - W/"datetime'2021-07-26T21%3A18%3A26.9022216Z'" X-Ms-Request-Id: - - f59cdaf4-0a57-4010-89a2-05ffeb5c9954 + - 32523b57-7b56-426c-8b7a-2903ceb4e111 status: 204 No Content code: 204 duration: "" @@ -164,21 +164,21 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:46:50 GMT + - Mon, 26 Jul 2021 21:18:26 GMT X-Ms-Version: - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotableps3e7q02v0n3b()?%24filter=RowKey+eq+%271%27 + url: https://seankaneprim.table.cosmos.azure.com/gotablex9uvqs8kjp1tm()?%24filter=RowKey+eq+%271%27 method: GET response: - body: '{"value":[{"odata.etag":"W/\"datetime''2021-07-15T21%3A46%3A49.2600328Z''\"","PartitionKey":"partition","RowKey":"1","Integer":1,"MergeProperty":"foo","String":"some - string 1","Timestamp":"2021-07-15T21:46:49.2600328Z"}],"odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#gotableps3e7q02v0n3b"}' + body: '{"value":[{"odata.etag":"W/\"datetime''2021-07-26T21%3A18%3A26.9022216Z''\"","PartitionKey":"partition","RowKey":"1","Integer":1,"MergeProperty":"foo","String":"some + string 1","Timestamp":"2021-07-26T21:18:26.9022216Z"}],"odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#gotablex9uvqs8kjp1tm"}' headers: Content-Type: - application/json;odata=minimalmetadata Date: - - Thu, 15 Jul 2021 21:46:48 GMT + - Mon, 26 Jul 2021 21:18:26 GMT X-Ms-Request-Id: - - ac45b82d-f4e3-4fa7-849c-edd95107f111 + - 0feeaf9a-c018-4386-9047-277afd1adc25 status: 200 OK code: 200 duration: "" @@ -194,18 +194,18 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:46:50 GMT + - Mon, 26 Jul 2021 21:18:26 GMT X-Ms-Version: - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/Tables('gotableps3e7q02v0n3b') + url: https://seankaneprim.table.cosmos.azure.com/Tables('gotablex9uvqs8kjp1tm') method: DELETE response: body: "" headers: Date: - - Thu, 15 Jul 2021 21:46:48 GMT + - Mon, 26 Jul 2021 21:18:26 GMT X-Ms-Request-Id: - - 6dffaf18-6188-47c4-8899-68f0267e8a87 + - 50b4ac8f-d2d9-4fb5-9485-eb8b8eff2ce4 status: 204 No Content code: 204 duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchAdd-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchAdd-variables.yaml index 0b1642b367e2..2c01bda34195 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchAdd-variables.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchAdd-variables.yaml @@ -2,4 +2,4 @@ STORAGE_ENDPOINT_SUFFIX: core.windows.net TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== TABLES_STORAGE_ACCOUNT_NAME: seankaneprim -randomSeed: "1626385830" +randomSeed: "1627331015" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchAdd.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchAdd.yaml index d21415a42252..3252fcf5dea0 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchAdd.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchAdd.yaml @@ -2,7 +2,7 @@ version: 1 interactions: - request: - body: '{"TableName":"gotable1aw91yk4gnxsv"}' + body: '{"TableName":"gotableqyr2uxfpxphl9"}' form: {} headers: Accept: @@ -19,76 +19,76 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:50:30 GMT + - Mon, 26 Jul 2021 20:23:35 GMT X-Ms-Version: - "2019-02-02" url: https://seankaneprim.table.core.windows.net/Tables method: POST response: - body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotable1aw91yk4gnxsv"}' + body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotableqyr2uxfpxphl9"}' headers: Cache-Control: - no-cache Content-Type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 Date: - - Thu, 15 Jul 2021 21:50:29 GMT + - Mon, 26 Jul 2021 20:23:35 GMT Location: - - https://seankaneprim.table.core.windows.net/Tables('gotable1aw91yk4gnxsv') + - https://seankaneprim.table.core.windows.net/Tables('gotableqyr2uxfpxphl9') Server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 X-Content-Type-Options: - nosniff X-Ms-Request-Id: - - 51d65c8d-7002-002d-64c3-795b06000000 + - 4bf66b53-5002-0077-1f5c-823de1000000 X-Ms-Version: - "2019-02-02" status: 201 Created code: 201 duration: "" - request: - body: "--batch_517517d3-328a-434c-6249-4c7147146920\r\nContent-Type: multipart/mixed; - boundary=changeset_a8e2d1d0-0d7b-4c37-7399-f96e348a8270\r\n\r\n--changeset_a8e2d1d0-0d7b-4c37-7399-f96e348a8270\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotable1aw91yk4gnxsv?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + body: "--batch_cc9aaa4d-bc76-46d4-6095-a1699a3c09ed\r\nContent-Type: multipart/mixed; + boundary=changeset_84fe6f6c-3438-40b7-6065-78ab685d467a\r\n\r\n--changeset_84fe6f6c-3438-40b7-6065-78ab685d467a\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotableqyr2uxfpxphl9?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 260\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Float@odata.type\":\"Edm.Double\",\"Integer\":1,\"Integer@odata.type\":\"Edm.Double\",\"PartitionKey\":\"partition\",\"RowKey\":\"1\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_a8e2d1d0-0d7b-4c37-7399-f96e348a8270\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotable1aw91yk4gnxsv?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + 194\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Integer\":1,\"PartitionKey\":\"partition\",\"RowKey\":\"1\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_84fe6f6c-3438-40b7-6065-78ab685d467a\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotableqyr2uxfpxphl9?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 260\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Float@odata.type\":\"Edm.Double\",\"Integer\":2,\"Integer@odata.type\":\"Edm.Double\",\"PartitionKey\":\"partition\",\"RowKey\":\"2\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_a8e2d1d0-0d7b-4c37-7399-f96e348a8270\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotable1aw91yk4gnxsv?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + 194\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Integer\":2,\"PartitionKey\":\"partition\",\"RowKey\":\"2\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_84fe6f6c-3438-40b7-6065-78ab685d467a\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotableqyr2uxfpxphl9?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 260\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Float@odata.type\":\"Edm.Double\",\"Integer\":3,\"Integer@odata.type\":\"Edm.Double\",\"PartitionKey\":\"partition\",\"RowKey\":\"3\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_a8e2d1d0-0d7b-4c37-7399-f96e348a8270\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotable1aw91yk4gnxsv?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + 194\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Integer\":3,\"PartitionKey\":\"partition\",\"RowKey\":\"3\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_84fe6f6c-3438-40b7-6065-78ab685d467a\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotableqyr2uxfpxphl9?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 260\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Float@odata.type\":\"Edm.Double\",\"Integer\":4,\"Integer@odata.type\":\"Edm.Double\",\"PartitionKey\":\"partition\",\"RowKey\":\"4\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_a8e2d1d0-0d7b-4c37-7399-f96e348a8270\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotable1aw91yk4gnxsv?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + 194\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Integer\":4,\"PartitionKey\":\"partition\",\"RowKey\":\"4\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_84fe6f6c-3438-40b7-6065-78ab685d467a\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotableqyr2uxfpxphl9?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 260\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Float@odata.type\":\"Edm.Double\",\"Integer\":5,\"Integer@odata.type\":\"Edm.Double\",\"PartitionKey\":\"partition\",\"RowKey\":\"5\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_a8e2d1d0-0d7b-4c37-7399-f96e348a8270\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotable1aw91yk4gnxsv?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + 194\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Integer\":5,\"PartitionKey\":\"partition\",\"RowKey\":\"5\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_84fe6f6c-3438-40b7-6065-78ab685d467a\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotableqyr2uxfpxphl9?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 260\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Float@odata.type\":\"Edm.Double\",\"Integer\":6,\"Integer@odata.type\":\"Edm.Double\",\"PartitionKey\":\"partition\",\"RowKey\":\"6\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_a8e2d1d0-0d7b-4c37-7399-f96e348a8270\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotable1aw91yk4gnxsv?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + 194\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Integer\":6,\"PartitionKey\":\"partition\",\"RowKey\":\"6\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_84fe6f6c-3438-40b7-6065-78ab685d467a\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotableqyr2uxfpxphl9?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 260\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Float@odata.type\":\"Edm.Double\",\"Integer\":7,\"Integer@odata.type\":\"Edm.Double\",\"PartitionKey\":\"partition\",\"RowKey\":\"7\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_a8e2d1d0-0d7b-4c37-7399-f96e348a8270\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotable1aw91yk4gnxsv?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + 194\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Integer\":7,\"PartitionKey\":\"partition\",\"RowKey\":\"7\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_84fe6f6c-3438-40b7-6065-78ab685d467a\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotableqyr2uxfpxphl9?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 260\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Float@odata.type\":\"Edm.Double\",\"Integer\":8,\"Integer@odata.type\":\"Edm.Double\",\"PartitionKey\":\"partition\",\"RowKey\":\"8\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_a8e2d1d0-0d7b-4c37-7399-f96e348a8270\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotable1aw91yk4gnxsv?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + 194\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Integer\":8,\"PartitionKey\":\"partition\",\"RowKey\":\"8\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_84fe6f6c-3438-40b7-6065-78ab685d467a\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotableqyr2uxfpxphl9?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 260\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Float@odata.type\":\"Edm.Double\",\"Integer\":9,\"Integer@odata.type\":\"Edm.Double\",\"PartitionKey\":\"partition\",\"RowKey\":\"9\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_a8e2d1d0-0d7b-4c37-7399-f96e348a8270\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotable1aw91yk4gnxsv?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + 194\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Integer\":9,\"PartitionKey\":\"partition\",\"RowKey\":\"9\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_84fe6f6c-3438-40b7-6065-78ab685d467a\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotableqyr2uxfpxphl9?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 262\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Float@odata.type\":\"Edm.Double\",\"Integer\":10,\"Integer@odata.type\":\"Edm.Double\",\"PartitionKey\":\"partition\",\"RowKey\":\"10\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_a8e2d1d0-0d7b-4c37-7399-f96e348a8270--\r\n\r\n--batch_517517d3-328a-434c-6249-4c7147146920--\r\n" + 196\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Integer\":10,\"PartitionKey\":\"partition\",\"RowKey\":\"10\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_84fe6f6c-3438-40b7-6065-78ab685d467a--\r\n\r\n--batch_cc9aaa4d-bc76-46d4-6095-a1699a3c09ed--\r\n" form: {} headers: Accept: @@ -96,85 +96,85 @@ interactions: Authorization: - sanitized Content-Length: - - "7210" + - "6550" Content-Type: - - multipart/mixed; boundary=batch_517517d3-328a-434c-6249-4c7147146920 + - multipart/mixed; boundary=batch_cc9aaa4d-bc76-46d4-6095-a1699a3c09ed Dataserviceversion: - "3.0" User-Agent: - azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:50:31 GMT + - Mon, 26 Jul 2021 20:23:35 GMT X-Ms-Version: - "2019-02-02" url: https://seankaneprim.table.core.windows.net/$batch method: POST response: - body: "--batchresponse_9eb910d6-b04b-453d-af1b-e4a186620bca\r\nContent-Type: multipart/mixed; - boundary=changesetresponse_277256ec-1385-4863-b3cd-baa3aca2f29b\r\n\r\n--changesetresponse_277256ec-1385-4863-b3cd-baa3aca2f29b\r\nContent-Type: + body: "--batchresponse_72a61e9f-59a7-47a1-89cf-b43a2f98c46f\r\nContent-Type: multipart/mixed; + boundary=changesetresponse_ba7a7faf-0f36-4683-af12-776271ecc8e5\r\n\r\n--changesetresponse_ba7a7faf-0f36-4683-af12-776271ecc8e5\r\nContent-Type: application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nPreference-Applied: - return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://seankaneprim.table.core.windows.net/gotable1aw91yk4gnxsv(PartitionKey='partition',RowKey='1')\r\nDataServiceId: - https://seankaneprim.table.core.windows.net/gotable1aw91yk4gnxsv(PartitionKey='partition',RowKey='1')\r\nETag: - W/\"datetime'2021-07-15T21%3A50%3A30.5388809Z'\"\r\n\r\n\r\n--changesetresponse_277256ec-1385-4863-b3cd-baa3aca2f29b\r\nContent-Type: + return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://seankaneprim.table.core.windows.net/gotableqyr2uxfpxphl9(PartitionKey='partition',RowKey='1')\r\nDataServiceId: + https://seankaneprim.table.core.windows.net/gotableqyr2uxfpxphl9(PartitionKey='partition',RowKey='1')\r\nETag: + W/\"datetime'2021-07-26T20%3A23%3A35.943476Z'\"\r\n\r\n\r\n--changesetresponse_ba7a7faf-0f36-4683-af12-776271ecc8e5\r\nContent-Type: application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nPreference-Applied: - return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://seankaneprim.table.core.windows.net/gotable1aw91yk4gnxsv(PartitionKey='partition',RowKey='2')\r\nDataServiceId: - https://seankaneprim.table.core.windows.net/gotable1aw91yk4gnxsv(PartitionKey='partition',RowKey='2')\r\nETag: - W/\"datetime'2021-07-15T21%3A50%3A30.5388809Z'\"\r\n\r\n\r\n--changesetresponse_277256ec-1385-4863-b3cd-baa3aca2f29b\r\nContent-Type: + return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://seankaneprim.table.core.windows.net/gotableqyr2uxfpxphl9(PartitionKey='partition',RowKey='2')\r\nDataServiceId: + https://seankaneprim.table.core.windows.net/gotableqyr2uxfpxphl9(PartitionKey='partition',RowKey='2')\r\nETag: + W/\"datetime'2021-07-26T20%3A23%3A35.943476Z'\"\r\n\r\n\r\n--changesetresponse_ba7a7faf-0f36-4683-af12-776271ecc8e5\r\nContent-Type: application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nPreference-Applied: - return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://seankaneprim.table.core.windows.net/gotable1aw91yk4gnxsv(PartitionKey='partition',RowKey='3')\r\nDataServiceId: - https://seankaneprim.table.core.windows.net/gotable1aw91yk4gnxsv(PartitionKey='partition',RowKey='3')\r\nETag: - W/\"datetime'2021-07-15T21%3A50%3A30.5388809Z'\"\r\n\r\n\r\n--changesetresponse_277256ec-1385-4863-b3cd-baa3aca2f29b\r\nContent-Type: + return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://seankaneprim.table.core.windows.net/gotableqyr2uxfpxphl9(PartitionKey='partition',RowKey='3')\r\nDataServiceId: + https://seankaneprim.table.core.windows.net/gotableqyr2uxfpxphl9(PartitionKey='partition',RowKey='3')\r\nETag: + W/\"datetime'2021-07-26T20%3A23%3A35.943476Z'\"\r\n\r\n\r\n--changesetresponse_ba7a7faf-0f36-4683-af12-776271ecc8e5\r\nContent-Type: application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nPreference-Applied: - return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://seankaneprim.table.core.windows.net/gotable1aw91yk4gnxsv(PartitionKey='partition',RowKey='4')\r\nDataServiceId: - https://seankaneprim.table.core.windows.net/gotable1aw91yk4gnxsv(PartitionKey='partition',RowKey='4')\r\nETag: - W/\"datetime'2021-07-15T21%3A50%3A30.5388809Z'\"\r\n\r\n\r\n--changesetresponse_277256ec-1385-4863-b3cd-baa3aca2f29b\r\nContent-Type: + return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://seankaneprim.table.core.windows.net/gotableqyr2uxfpxphl9(PartitionKey='partition',RowKey='4')\r\nDataServiceId: + https://seankaneprim.table.core.windows.net/gotableqyr2uxfpxphl9(PartitionKey='partition',RowKey='4')\r\nETag: + W/\"datetime'2021-07-26T20%3A23%3A35.943476Z'\"\r\n\r\n\r\n--changesetresponse_ba7a7faf-0f36-4683-af12-776271ecc8e5\r\nContent-Type: application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nPreference-Applied: - return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://seankaneprim.table.core.windows.net/gotable1aw91yk4gnxsv(PartitionKey='partition',RowKey='5')\r\nDataServiceId: - https://seankaneprim.table.core.windows.net/gotable1aw91yk4gnxsv(PartitionKey='partition',RowKey='5')\r\nETag: - W/\"datetime'2021-07-15T21%3A50%3A30.5388809Z'\"\r\n\r\n\r\n--changesetresponse_277256ec-1385-4863-b3cd-baa3aca2f29b\r\nContent-Type: + return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://seankaneprim.table.core.windows.net/gotableqyr2uxfpxphl9(PartitionKey='partition',RowKey='5')\r\nDataServiceId: + https://seankaneprim.table.core.windows.net/gotableqyr2uxfpxphl9(PartitionKey='partition',RowKey='5')\r\nETag: + W/\"datetime'2021-07-26T20%3A23%3A35.943476Z'\"\r\n\r\n\r\n--changesetresponse_ba7a7faf-0f36-4683-af12-776271ecc8e5\r\nContent-Type: application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nPreference-Applied: - return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://seankaneprim.table.core.windows.net/gotable1aw91yk4gnxsv(PartitionKey='partition',RowKey='6')\r\nDataServiceId: - https://seankaneprim.table.core.windows.net/gotable1aw91yk4gnxsv(PartitionKey='partition',RowKey='6')\r\nETag: - W/\"datetime'2021-07-15T21%3A50%3A30.5388809Z'\"\r\n\r\n\r\n--changesetresponse_277256ec-1385-4863-b3cd-baa3aca2f29b\r\nContent-Type: + return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://seankaneprim.table.core.windows.net/gotableqyr2uxfpxphl9(PartitionKey='partition',RowKey='6')\r\nDataServiceId: + https://seankaneprim.table.core.windows.net/gotableqyr2uxfpxphl9(PartitionKey='partition',RowKey='6')\r\nETag: + W/\"datetime'2021-07-26T20%3A23%3A35.943476Z'\"\r\n\r\n\r\n--changesetresponse_ba7a7faf-0f36-4683-af12-776271ecc8e5\r\nContent-Type: application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nPreference-Applied: - return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://seankaneprim.table.core.windows.net/gotable1aw91yk4gnxsv(PartitionKey='partition',RowKey='7')\r\nDataServiceId: - https://seankaneprim.table.core.windows.net/gotable1aw91yk4gnxsv(PartitionKey='partition',RowKey='7')\r\nETag: - W/\"datetime'2021-07-15T21%3A50%3A30.5388809Z'\"\r\n\r\n\r\n--changesetresponse_277256ec-1385-4863-b3cd-baa3aca2f29b\r\nContent-Type: + return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://seankaneprim.table.core.windows.net/gotableqyr2uxfpxphl9(PartitionKey='partition',RowKey='7')\r\nDataServiceId: + https://seankaneprim.table.core.windows.net/gotableqyr2uxfpxphl9(PartitionKey='partition',RowKey='7')\r\nETag: + W/\"datetime'2021-07-26T20%3A23%3A35.943476Z'\"\r\n\r\n\r\n--changesetresponse_ba7a7faf-0f36-4683-af12-776271ecc8e5\r\nContent-Type: application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nPreference-Applied: - return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://seankaneprim.table.core.windows.net/gotable1aw91yk4gnxsv(PartitionKey='partition',RowKey='8')\r\nDataServiceId: - https://seankaneprim.table.core.windows.net/gotable1aw91yk4gnxsv(PartitionKey='partition',RowKey='8')\r\nETag: - W/\"datetime'2021-07-15T21%3A50%3A30.5388809Z'\"\r\n\r\n\r\n--changesetresponse_277256ec-1385-4863-b3cd-baa3aca2f29b\r\nContent-Type: + return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://seankaneprim.table.core.windows.net/gotableqyr2uxfpxphl9(PartitionKey='partition',RowKey='8')\r\nDataServiceId: + https://seankaneprim.table.core.windows.net/gotableqyr2uxfpxphl9(PartitionKey='partition',RowKey='8')\r\nETag: + W/\"datetime'2021-07-26T20%3A23%3A35.943476Z'\"\r\n\r\n\r\n--changesetresponse_ba7a7faf-0f36-4683-af12-776271ecc8e5\r\nContent-Type: application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nPreference-Applied: - return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://seankaneprim.table.core.windows.net/gotable1aw91yk4gnxsv(PartitionKey='partition',RowKey='9')\r\nDataServiceId: - https://seankaneprim.table.core.windows.net/gotable1aw91yk4gnxsv(PartitionKey='partition',RowKey='9')\r\nETag: - W/\"datetime'2021-07-15T21%3A50%3A30.5388809Z'\"\r\n\r\n\r\n--changesetresponse_277256ec-1385-4863-b3cd-baa3aca2f29b\r\nContent-Type: + return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://seankaneprim.table.core.windows.net/gotableqyr2uxfpxphl9(PartitionKey='partition',RowKey='9')\r\nDataServiceId: + https://seankaneprim.table.core.windows.net/gotableqyr2uxfpxphl9(PartitionKey='partition',RowKey='9')\r\nETag: + W/\"datetime'2021-07-26T20%3A23%3A35.943476Z'\"\r\n\r\n\r\n--changesetresponse_ba7a7faf-0f36-4683-af12-776271ecc8e5\r\nContent-Type: application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nPreference-Applied: - return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://seankaneprim.table.core.windows.net/gotable1aw91yk4gnxsv(PartitionKey='partition',RowKey='10')\r\nDataServiceId: - https://seankaneprim.table.core.windows.net/gotable1aw91yk4gnxsv(PartitionKey='partition',RowKey='10')\r\nETag: - W/\"datetime'2021-07-15T21%3A50%3A30.5388809Z'\"\r\n\r\n\r\n--changesetresponse_277256ec-1385-4863-b3cd-baa3aca2f29b--\r\n--batchresponse_9eb910d6-b04b-453d-af1b-e4a186620bca--\r\n" + return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://seankaneprim.table.core.windows.net/gotableqyr2uxfpxphl9(PartitionKey='partition',RowKey='10')\r\nDataServiceId: + https://seankaneprim.table.core.windows.net/gotableqyr2uxfpxphl9(PartitionKey='partition',RowKey='10')\r\nETag: + W/\"datetime'2021-07-26T20%3A23%3A35.943476Z'\"\r\n\r\n\r\n--changesetresponse_ba7a7faf-0f36-4683-af12-776271ecc8e5--\r\n--batchresponse_72a61e9f-59a7-47a1-89cf-b43a2f98c46f--\r\n" headers: Cache-Control: - no-cache Content-Type: - - multipart/mixed; boundary=batchresponse_9eb910d6-b04b-453d-af1b-e4a186620bca + - multipart/mixed; boundary=batchresponse_72a61e9f-59a7-47a1-89cf-b43a2f98c46f Date: - - Thu, 15 Jul 2021 21:50:29 GMT + - Mon, 26 Jul 2021 20:23:35 GMT Server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 X-Content-Type-Options: - nosniff X-Ms-Request-Id: - - 51d65ca8-7002-002d-7dc3-795b06000000 + - 4bf66b94-5002-0077-5d5c-823de1000000 X-Ms-Version: - "2019-02-02" status: 202 Accepted @@ -194,26 +194,28 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:50:31 GMT + - Mon, 26 Jul 2021 20:23:36 GMT X-Ms-Version: - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/gotable1aw91yk4gnxsv() + url: https://seankaneprim.table.core.windows.net/gotableqyr2uxfpxphl9() method: GET response: - body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#gotable1aw91yk4gnxsv","value":[{"odata.etag":"W/\"datetime''2021-07-15T21%3A50%3A30.5388809Z''\"","PartitionKey":"partition","RowKey":"1","Timestamp":"2021-07-15T21:50:30.5388809Z","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":1.0,"String":"someString"},{"odata.etag":"W/\"datetime''2021-07-15T21%3A50%3A30.5388809Z''\"","PartitionKey":"partition","RowKey":"10","Timestamp":"2021-07-15T21:50:30.5388809Z","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":10.0,"String":"someString"},{"odata.etag":"W/\"datetime''2021-07-15T21%3A50%3A30.5388809Z''\"","PartitionKey":"partition","RowKey":"2","Timestamp":"2021-07-15T21:50:30.5388809Z","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":2.0,"String":"someString"},{"odata.etag":"W/\"datetime''2021-07-15T21%3A50%3A30.5388809Z''\"","PartitionKey":"partition","RowKey":"3","Timestamp":"2021-07-15T21:50:30.5388809Z","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":3.0,"String":"someString"},{"odata.etag":"W/\"datetime''2021-07-15T21%3A50%3A30.5388809Z''\"","PartitionKey":"partition","RowKey":"4","Timestamp":"2021-07-15T21:50:30.5388809Z","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":4.0,"String":"someString"},{"odata.etag":"W/\"datetime''2021-07-15T21%3A50%3A30.5388809Z''\"","PartitionKey":"partition","RowKey":"5","Timestamp":"2021-07-15T21:50:30.5388809Z","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":5.0,"String":"someString"},{"odata.etag":"W/\"datetime''2021-07-15T21%3A50%3A30.5388809Z''\"","PartitionKey":"partition","RowKey":"6","Timestamp":"2021-07-15T21:50:30.5388809Z","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":6.0,"String":"someString"},{"odata.etag":"W/\"datetime''2021-07-15T21%3A50%3A30.5388809Z''\"","PartitionKey":"partition","RowKey":"7","Timestamp":"2021-07-15T21:50:30.5388809Z","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":7.0,"String":"someString"},{"odata.etag":"W/\"datetime''2021-07-15T21%3A50%3A30.5388809Z''\"","PartitionKey":"partition","RowKey":"8","Timestamp":"2021-07-15T21:50:30.5388809Z","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":8.0,"String":"someString"},{"odata.etag":"W/\"datetime''2021-07-15T21%3A50%3A30.5388809Z''\"","PartitionKey":"partition","RowKey":"9","Timestamp":"2021-07-15T21:50:30.5388809Z","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":9.0,"String":"someString"}]}' + body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#gotableqyr2uxfpxphl9","value":[{"odata.etag":"W/\"datetime''2021-07-26T20%3A23%3A35.943476Z''\"","PartitionKey":"partition","RowKey":"1","Timestamp":"2021-07-26T20:23:35.943476Z","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":1,"String":"someString"},{"odata.etag":"W/\"datetime''2021-07-26T20%3A23%3A35.943476Z''\"","PartitionKey":"partition","RowKey":"10","Timestamp":"2021-07-26T20:23:35.943476Z","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":10,"String":"someString"},{"odata.etag":"W/\"datetime''2021-07-26T20%3A23%3A35.943476Z''\"","PartitionKey":"partition","RowKey":"2","Timestamp":"2021-07-26T20:23:35.943476Z","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":2,"String":"someString"},{"odata.etag":"W/\"datetime''2021-07-26T20%3A23%3A35.943476Z''\"","PartitionKey":"partition","RowKey":"3","Timestamp":"2021-07-26T20:23:35.943476Z","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":3,"String":"someString"},{"odata.etag":"W/\"datetime''2021-07-26T20%3A23%3A35.943476Z''\"","PartitionKey":"partition","RowKey":"4","Timestamp":"2021-07-26T20:23:35.943476Z","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":4,"String":"someString"},{"odata.etag":"W/\"datetime''2021-07-26T20%3A23%3A35.943476Z''\"","PartitionKey":"partition","RowKey":"5","Timestamp":"2021-07-26T20:23:35.943476Z","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":5,"String":"someString"},{"odata.etag":"W/\"datetime''2021-07-26T20%3A23%3A35.943476Z''\"","PartitionKey":"partition","RowKey":"6","Timestamp":"2021-07-26T20:23:35.943476Z","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":6,"String":"someString"},{"odata.etag":"W/\"datetime''2021-07-26T20%3A23%3A35.943476Z''\"","PartitionKey":"partition","RowKey":"7","Timestamp":"2021-07-26T20:23:35.943476Z","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":7,"String":"someString"},{"odata.etag":"W/\"datetime''2021-07-26T20%3A23%3A35.943476Z''\"","PartitionKey":"partition","RowKey":"8","Timestamp":"2021-07-26T20:23:35.943476Z","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":8,"String":"someString"},{"odata.etag":"W/\"datetime''2021-07-26T20%3A23%3A35.943476Z''\"","PartitionKey":"partition","RowKey":"9","Timestamp":"2021-07-26T20:23:35.943476Z","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":9,"String":"someString"}]}' headers: Cache-Control: - no-cache Content-Type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 Date: - - Thu, 15 Jul 2021 21:50:30 GMT + - Mon, 26 Jul 2021 20:23:35 GMT Server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + Vary: + - Origin X-Content-Type-Options: - nosniff X-Ms-Request-Id: - - 51d65ce1-7002-002d-34c3-795b06000000 + - 4bf66c14-5002-0077-575c-823de1000000 X-Ms-Version: - "2019-02-02" status: 200 OK @@ -231,10 +233,10 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:50:32 GMT + - Mon, 26 Jul 2021 20:23:36 GMT X-Ms-Version: - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/Tables('gotable1aw91yk4gnxsv') + url: https://seankaneprim.table.core.windows.net/Tables('gotableqyr2uxfpxphl9') method: DELETE response: body: "" @@ -244,13 +246,13 @@ interactions: Content-Length: - "0" Date: - - Thu, 15 Jul 2021 21:50:30 GMT + - Mon, 26 Jul 2021 20:23:35 GMT Server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 X-Content-Type-Options: - nosniff X-Ms-Request-Id: - - 51d65d2a-7002-002d-79c3-795b06000000 + - 4bf66c82-5002-0077-435c-823de1000000 X-Ms-Version: - "2019-02-02" status: 204 No Content diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchComplex-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchComplex-variables.yaml new file mode 100644 index 000000000000..884fb38e6fb6 --- /dev/null +++ b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchComplex-variables.yaml @@ -0,0 +1,5 @@ +--- +STORAGE_ENDPOINT_SUFFIX: core.windows.net +TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== +TABLES_STORAGE_ACCOUNT_NAME: seankaneprim +randomSeed: "1626989875" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchComplex.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchComplex.yaml new file mode 100644 index 000000000000..254fdb28600f --- /dev/null +++ b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchComplex.yaml @@ -0,0 +1,366 @@ +--- +version: 1 +interactions: +- request: + body: '{"TableName":"gotableoin2xu6mdwdjy"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "36" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Thu, 22 Jul 2021 21:37:55 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/Tables + method: POST + response: + body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotableoin2xu6mdwdjy"}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + Date: + - Thu, 22 Jul 2021 21:37:55 GMT + Location: + - https://seankaneprim.table.core.windows.net/Tables('gotableoin2xu6mdwdjy') + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - 2252d2b6-d002-00a2-1a41-7fd26c000000 + X-Ms-Version: + - "2019-02-02" + status: 201 Created + code: 201 + duration: "" +- request: + body: "--batch_069a1b99-cb66-457e-714c-82d78c90cc68\r\nContent-Type: multipart/mixed; + boundary=changeset_06968720-03cf-4bc7-79e7-460b7bbb0ad0\r\n\r\n--changeset_06968720-03cf-4bc7-79e7-460b7bbb0ad0\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotableoin2xu6mdwdjy?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: + 367\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Binary\":\"U29tZUJpbmFyeQ==\",\"Binary@odata.type\":\"Edm.Binary\",\"Bool\":false,\"DateTime\":\"2013-08-02T17:37:43.0090043Z\",\"DateTime@odata.type\":\"Edm.DateTime\",\"Double\":1234.1234,\"Guid\":\"4185404a-5818-48c3-b9be-f217df0dba6f\",\"Guid@odata.type\":\"Edm.Guid\",\"Int32\":1234,\"Int64\":\"123456789012\",\"Int64@odata.type\":\"Edm.Int64\",\"PartitionKey\":\"pk001\",\"RowKey\":\"1\",\"String\":\"test\"}\r\n--changeset_06968720-03cf-4bc7-79e7-460b7bbb0ad0\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotableoin2xu6mdwdjy?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: + 367\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Binary\":\"U29tZUJpbmFyeQ==\",\"Binary@odata.type\":\"Edm.Binary\",\"Bool\":false,\"DateTime\":\"2013-08-02T17:37:43.0090043Z\",\"DateTime@odata.type\":\"Edm.DateTime\",\"Double\":1234.1234,\"Guid\":\"4185404a-5818-48c3-b9be-f217df0dba6f\",\"Guid@odata.type\":\"Edm.Guid\",\"Int32\":1234,\"Int64\":\"123456789012\",\"Int64@odata.type\":\"Edm.Int64\",\"PartitionKey\":\"pk001\",\"RowKey\":\"2\",\"String\":\"test\"}\r\n--changeset_06968720-03cf-4bc7-79e7-460b7bbb0ad0\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotableoin2xu6mdwdjy?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: + 367\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Binary\":\"U29tZUJpbmFyeQ==\",\"Binary@odata.type\":\"Edm.Binary\",\"Bool\":false,\"DateTime\":\"2013-08-02T17:37:43.0090043Z\",\"DateTime@odata.type\":\"Edm.DateTime\",\"Double\":1234.1234,\"Guid\":\"4185404a-5818-48c3-b9be-f217df0dba6f\",\"Guid@odata.type\":\"Edm.Guid\",\"Int32\":1234,\"Int64\":\"123456789012\",\"Int64@odata.type\":\"Edm.Int64\",\"PartitionKey\":\"pk001\",\"RowKey\":\"3\",\"String\":\"test\"}\r\n--changeset_06968720-03cf-4bc7-79e7-460b7bbb0ad0\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotableoin2xu6mdwdjy?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: + 367\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Binary\":\"U29tZUJpbmFyeQ==\",\"Binary@odata.type\":\"Edm.Binary\",\"Bool\":false,\"DateTime\":\"2013-08-02T17:37:43.0090043Z\",\"DateTime@odata.type\":\"Edm.DateTime\",\"Double\":1234.1234,\"Guid\":\"4185404a-5818-48c3-b9be-f217df0dba6f\",\"Guid@odata.type\":\"Edm.Guid\",\"Int32\":1234,\"Int64\":\"123456789012\",\"Int64@odata.type\":\"Edm.Int64\",\"PartitionKey\":\"pk001\",\"RowKey\":\"4\",\"String\":\"test\"}\r\n--changeset_06968720-03cf-4bc7-79e7-460b7bbb0ad0\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotableoin2xu6mdwdjy?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: + 367\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Binary\":\"U29tZUJpbmFyeQ==\",\"Binary@odata.type\":\"Edm.Binary\",\"Bool\":false,\"DateTime\":\"2013-08-02T17:37:43.0090043Z\",\"DateTime@odata.type\":\"Edm.DateTime\",\"Double\":1234.1234,\"Guid\":\"4185404a-5818-48c3-b9be-f217df0dba6f\",\"Guid@odata.type\":\"Edm.Guid\",\"Int32\":1234,\"Int64\":\"123456789012\",\"Int64@odata.type\":\"Edm.Int64\",\"PartitionKey\":\"pk001\",\"RowKey\":\"5\",\"String\":\"test\"}\r\n--changeset_06968720-03cf-4bc7-79e7-460b7bbb0ad0--\r\n\r\n--batch_069a1b99-cb66-457e-714c-82d78c90cc68--\r\n" + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "4258" + Content-Type: + - multipart/mixed; boundary=batch_069a1b99-cb66-457e-714c-82d78c90cc68 + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) + X-Ms-Date: + - Thu, 22 Jul 2021 21:37:55 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/$batch + method: POST + response: + body: "--batchresponse_ec2ad4a0-6283-40a7-9e52-9a75d3c76893\r\nContent-Type: multipart/mixed; + boundary=changesetresponse_9ecf4cc4-a384-4287-95e5-3550e895d90f\r\n\r\n--changesetresponse_9ecf4cc4-a384-4287-95e5-3550e895d90f\r\nContent-Type: + application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No + Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nPreference-Applied: + return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://seankaneprim.table.core.windows.net/gotableoin2xu6mdwdjy(PartitionKey='pk001',RowKey='1')\r\nDataServiceId: + https://seankaneprim.table.core.windows.net/gotableoin2xu6mdwdjy(PartitionKey='pk001',RowKey='1')\r\nETag: + W/\"datetime'2021-07-22T21%3A37%3A56.7024695Z'\"\r\n\r\n\r\n--changesetresponse_9ecf4cc4-a384-4287-95e5-3550e895d90f\r\nContent-Type: + application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No + Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nPreference-Applied: + return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://seankaneprim.table.core.windows.net/gotableoin2xu6mdwdjy(PartitionKey='pk001',RowKey='2')\r\nDataServiceId: + https://seankaneprim.table.core.windows.net/gotableoin2xu6mdwdjy(PartitionKey='pk001',RowKey='2')\r\nETag: + W/\"datetime'2021-07-22T21%3A37%3A56.7024695Z'\"\r\n\r\n\r\n--changesetresponse_9ecf4cc4-a384-4287-95e5-3550e895d90f\r\nContent-Type: + application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No + Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nPreference-Applied: + return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://seankaneprim.table.core.windows.net/gotableoin2xu6mdwdjy(PartitionKey='pk001',RowKey='3')\r\nDataServiceId: + https://seankaneprim.table.core.windows.net/gotableoin2xu6mdwdjy(PartitionKey='pk001',RowKey='3')\r\nETag: + W/\"datetime'2021-07-22T21%3A37%3A56.7024695Z'\"\r\n\r\n\r\n--changesetresponse_9ecf4cc4-a384-4287-95e5-3550e895d90f\r\nContent-Type: + application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No + Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nPreference-Applied: + return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://seankaneprim.table.core.windows.net/gotableoin2xu6mdwdjy(PartitionKey='pk001',RowKey='4')\r\nDataServiceId: + https://seankaneprim.table.core.windows.net/gotableoin2xu6mdwdjy(PartitionKey='pk001',RowKey='4')\r\nETag: + W/\"datetime'2021-07-22T21%3A37%3A56.7024695Z'\"\r\n\r\n\r\n--changesetresponse_9ecf4cc4-a384-4287-95e5-3550e895d90f\r\nContent-Type: + application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No + Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nPreference-Applied: + return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://seankaneprim.table.core.windows.net/gotableoin2xu6mdwdjy(PartitionKey='pk001',RowKey='5')\r\nDataServiceId: + https://seankaneprim.table.core.windows.net/gotableoin2xu6mdwdjy(PartitionKey='pk001',RowKey='5')\r\nETag: + W/\"datetime'2021-07-22T21%3A37%3A56.7024695Z'\"\r\n\r\n\r\n--changesetresponse_9ecf4cc4-a384-4287-95e5-3550e895d90f--\r\n--batchresponse_ec2ad4a0-6283-40a7-9e52-9a75d3c76893--\r\n" + headers: + Cache-Control: + - no-cache + Content-Type: + - multipart/mixed; boundary=batchresponse_ec2ad4a0-6283-40a7-9e52-9a75d3c76893 + Date: + - Thu, 22 Jul 2021 21:37:56 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - 2252d2d1-d002-00a2-3341-7fd26c000000 + X-Ms-Version: + - "2019-02-02" + status: 202 Accepted + code: 202 + duration: "" +- request: + body: "--batch_bab0ef5e-8d08-40ef-61d3-fffc7044df1e\r\nContent-Type: multipart/mixed; + boundary=changeset_fc953668-dfb8-4898-4f6f-2a2e854098cb\r\n\r\n--changeset_fc953668-dfb8-4898-4f6f-2a2e854098cb\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPATCH https://seankaneprim.table.core.windows.net/gotableoin2xu6mdwdjy(PartitionKey='pk001',RowKey='1')?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + HTTP/1.1\r\nAccept: application/json\r\nContent-Length: 367\r\nContent-Type: + application/json\r\nDataserviceversion: 3.0\r\nIf-Match: *\r\nX-Ms-Version: + 2019-02-02\r\n\r\n{\"Binary\":\"U29tZUJpbmFyeQ==\",\"Binary@odata.type\":\"Edm.Binary\",\"Bool\":false,\"DateTime\":\"2013-08-02T17:37:43.0090043Z\",\"DateTime@odata.type\":\"Edm.DateTime\",\"Double\":1234.1234,\"Guid\":\"4185404a-5818-48c3-b9be-f217df0dba6f\",\"Guid@odata.type\":\"Edm.Guid\",\"Int32\":1234,\"Int64\":\"123456789012\",\"Int64@odata.type\":\"Edm.Int64\",\"PartitionKey\":\"pk001\",\"RowKey\":\"1\",\"String\":\"test\"}\r\n--changeset_fc953668-dfb8-4898-4f6f-2a2e854098cb\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPUT https://seankaneprim.table.core.windows.net/gotableoin2xu6mdwdjy(PartitionKey='pk001',RowKey='2')?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + HTTP/1.1\r\nAccept: application/json\r\nContent-Length: 365\r\nContent-Type: + application/json\r\nDataserviceversion: 3.0\r\nIf-Match: *\r\nX-Ms-Version: + 2019-02-02\r\n\r\n{\"Binary\":\"U29tZUJpbmFyeQ==\",\"Binary@odata.type\":\"Edm.Binary\",\"Bool\":false,\"DateTime\":\"2013-08-02T17:37:43.0090043Z\",\"DateTime@odata.type\":\"Edm.DateTime\",\"Double\":1234.1234,\"Guid\":\"4185404a-5818-48c3-b9be-f217df0dba6f\",\"Guid@odata.type\":\"Edm.Guid\",\"Int32\":10,\"Int64\":\"123456789012\",\"Int64@odata.type\":\"Edm.Int64\",\"PartitionKey\":\"pk001\",\"RowKey\":\"2\",\"String\":\"test\"}\r\n--changeset_fc953668-dfb8-4898-4f6f-2a2e854098cb\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nDELETE https://seankaneprim.table.core.windows.net/gotableoin2xu6mdwdjy(PartitionKey='pk001',RowKey='3')?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nDataserviceversion: + 3.0\r\nIf-Match: *\r\nX-Ms-Version: 2019-02-02\r\n\r\n\r\n--changeset_fc953668-dfb8-4898-4f6f-2a2e854098cb--\r\n\r\n--batch_bab0ef5e-8d08-40ef-61d3-fffc7044df1e--\r\n" + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "2243" + Content-Type: + - multipart/mixed; boundary=batch_bab0ef5e-8d08-40ef-61d3-fffc7044df1e + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) + X-Ms-Date: + - Thu, 22 Jul 2021 21:37:56 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/$batch + method: POST + response: + body: "--batchresponse_9b2bed71-7312-4931-9e04-a54c010928b3\r\nContent-Type: multipart/mixed; + boundary=changesetresponse_b8a73f54-2118-446d-9dba-ce6549518aa4\r\n\r\n--changesetresponse_b8a73f54-2118-446d-9dba-ce6549518aa4\r\nContent-Type: + application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No + Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nDataServiceVersion: + 1.0;\r\nETag: W/\"datetime'2021-07-22T21%3A37%3A56.9285492Z'\"\r\n\r\n\r\n--changesetresponse_b8a73f54-2118-446d-9dba-ce6549518aa4\r\nContent-Type: + application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No + Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nDataServiceVersion: + 1.0;\r\nETag: W/\"datetime'2021-07-22T21%3A37%3A56.9285492Z'\"\r\n\r\n\r\n--changesetresponse_b8a73f54-2118-446d-9dba-ce6549518aa4\r\nContent-Type: + application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No + Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nDataServiceVersion: + 1.0;\r\n\r\n\r\n--changesetresponse_b8a73f54-2118-446d-9dba-ce6549518aa4--\r\n--batchresponse_9b2bed71-7312-4931-9e04-a54c010928b3--\r\n" + headers: + Cache-Control: + - no-cache + Content-Type: + - multipart/mixed; boundary=batchresponse_9b2bed71-7312-4931-9e04-a54c010928b3 + Date: + - Thu, 22 Jul 2021 21:37:56 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - 2252d314-d002-00a2-7541-7fd26c000000 + X-Ms-Version: + - "2019-02-02" + status: 202 Accepted + code: 202 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Thu, 22 Jul 2021 21:37:56 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/gotableoin2xu6mdwdjy(PartitionKey='pk001',RowKey='1') + method: GET + response: + body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#gotableoin2xu6mdwdjy/@Element","odata.etag":"W/\"datetime''2021-07-22T21%3A37%3A56.9285492Z''\"","PartitionKey":"pk001","RowKey":"1","Timestamp":"2021-07-22T21:37:56.9285492Z","Binary@odata.type":"Edm.Binary","Binary":"U29tZUJpbmFyeQ==","Bool":false,"DateTime@odata.type":"Edm.DateTime","DateTime":"2013-08-02T17:37:43.0090043Z","Double":1234.1234,"Guid@odata.type":"Edm.Guid","Guid":"4185404a-5818-48c3-b9be-f217df0dba6f","Int32":1234,"Int64@odata.type":"Edm.Int64","Int64":"123456789012","String":"test"}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + Date: + - Thu, 22 Jul 2021 21:37:56 GMT + Etag: + - W/"datetime'2021-07-22T21%3A37%3A56.9285492Z'" + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + Vary: + - Origin + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - 2252d33a-d002-00a2-1a41-7fd26c000000 + X-Ms-Version: + - "2019-02-02" + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Thu, 22 Jul 2021 21:37:56 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/gotableoin2xu6mdwdjy(PartitionKey='pk001',RowKey='2') + method: GET + response: + body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#gotableoin2xu6mdwdjy/@Element","odata.etag":"W/\"datetime''2021-07-22T21%3A37%3A56.9285492Z''\"","PartitionKey":"pk001","RowKey":"2","Timestamp":"2021-07-22T21:37:56.9285492Z","Binary@odata.type":"Edm.Binary","Binary":"U29tZUJpbmFyeQ==","Bool":false,"DateTime@odata.type":"Edm.DateTime","DateTime":"2013-08-02T17:37:43.0090043Z","Double":1234.1234,"Guid@odata.type":"Edm.Guid","Guid":"4185404a-5818-48c3-b9be-f217df0dba6f","Int32":10,"Int64@odata.type":"Edm.Int64","Int64":"123456789012","String":"test"}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + Date: + - Thu, 22 Jul 2021 21:37:56 GMT + Etag: + - W/"datetime'2021-07-22T21%3A37%3A56.9285492Z'" + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + Vary: + - Origin + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - 2252d351-d002-00a2-2f41-7fd26c000000 + X-Ms-Version: + - "2019-02-02" + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Thu, 22 Jul 2021 21:37:56 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/gotableoin2xu6mdwdjy(PartitionKey='pk001',RowKey='3') + method: GET + response: + body: '{"odata.error":{"code":"ResourceNotFound","message":{"lang":"en-US","value":"The + specified resource does not exist.\nRequestId:2252d36a-d002-00a2-4841-7fd26c000000\nTime:2021-07-22T21:37:57.2138127Z"}}}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + Date: + - Thu, 22 Jul 2021 21:37:56 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + Vary: + - Origin + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - 2252d36a-d002-00a2-4841-7fd26c000000 + X-Ms-Version: + - "2019-02-02" + status: 404 Not Found + code: 404 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Thu, 22 Jul 2021 21:37:56 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/Tables('gotableoin2xu6mdwdjy') + method: DELETE + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Date: + - Thu, 22 Jul 2021 21:37:56 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - 2252d381-d002-00a2-5d41-7fd26c000000 + X-Ms-Version: + - "2019-02-02" + status: 204 No Content + code: 204 + duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchError-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchError-variables.yaml index ec8a5ad8fb99..4f98946b7f6b 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchError-variables.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchError-variables.yaml @@ -2,4 +2,4 @@ STORAGE_ENDPOINT_SUFFIX: core.windows.net TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== TABLES_STORAGE_ACCOUNT_NAME: seankaneprim -randomSeed: "1626385813" +randomSeed: "1627331016" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchError.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchError.yaml index 9ddb017432d6..d72f511d6324 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchError.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchError.yaml @@ -2,7 +2,7 @@ version: 1 interactions: - request: - body: '{"TableName":"gotableonrrfq12v28e4"}' + body: '{"TableName":"gotable2eir7r5h8wjrb"}' form: {} headers: Accept: @@ -19,28 +19,28 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:50:13 GMT + - Mon, 26 Jul 2021 20:23:36 GMT X-Ms-Version: - "2019-02-02" url: https://seankaneprim.table.core.windows.net/Tables method: POST response: - body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotableonrrfq12v28e4"}' + body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotable2eir7r5h8wjrb"}' headers: Cache-Control: - no-cache Content-Type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 Date: - - Thu, 15 Jul 2021 21:50:12 GMT + - Mon, 26 Jul 2021 20:23:36 GMT Location: - - https://seankaneprim.table.core.windows.net/Tables('gotableonrrfq12v28e4') + - https://seankaneprim.table.core.windows.net/Tables('gotable2eir7r5h8wjrb') Server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 X-Content-Type-Options: - nosniff X-Ms-Request-Id: - - 919d9e74-3002-004e-6fc3-79c6fd000000 + - 4bf66cbe-5002-0077-7e5c-823de1000000 X-Ms-Version: - "2019-02-02" status: 201 Created @@ -66,10 +66,10 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:50:14 GMT + - Mon, 26 Jul 2021 20:23:36 GMT X-Ms-Version: - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/gotableonrrfq12v28e4 + url: https://seankaneprim.table.core.windows.net/gotable2eir7r5h8wjrb method: POST response: body: "" @@ -79,13 +79,13 @@ interactions: Content-Length: - "0" Dataserviceid: - - https://seankaneprim.table.core.windows.net/gotableonrrfq12v28e4(PartitionKey='partition',RowKey='3') + - https://seankaneprim.table.core.windows.net/gotable2eir7r5h8wjrb(PartitionKey='partition',RowKey='3') Date: - - Thu, 15 Jul 2021 21:50:12 GMT + - Mon, 26 Jul 2021 20:23:36 GMT Etag: - - W/"datetime'2021-07-15T21%3A50%3A13.1513731Z'" + - W/"datetime'2021-07-26T20%3A23%3A36.684998Z'" Location: - - https://seankaneprim.table.core.windows.net/gotableonrrfq12v28e4(PartitionKey='partition',RowKey='3') + - https://seankaneprim.table.core.windows.net/gotable2eir7r5h8wjrb(PartitionKey='partition',RowKey='3') Preference-Applied: - return-no-content Server: @@ -93,27 +93,27 @@ interactions: X-Content-Type-Options: - nosniff X-Ms-Request-Id: - - 919d9f04-3002-004e-74c3-79c6fd000000 + - 4bf66cf7-5002-0077-335c-823de1000000 X-Ms-Version: - "2019-02-02" status: 204 No Content code: 204 duration: "" - request: - body: "--batch_ebe3c2c9-e659-4741-4aa9-3cde003d089a\r\nContent-Type: multipart/mixed; - boundary=changeset_ac013381-52b5-4ade-74f1-c359107c6b47\r\n\r\n--changeset_ac013381-52b5-4ade-74f1-c359107c6b47\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotableonrrfq12v28e4?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + body: "--batch_b0a717c4-6ddf-4371-4459-f054bf64540f\r\nContent-Type: multipart/mixed; + boundary=changeset_4d8752a2-1b64-4299-5ef5-e2fbdb2a4836\r\n\r\n--changeset_4d8752a2-1b64-4299-5ef5-e2fbdb2a4836\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotable2eir7r5h8wjrb?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 260\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Float@odata.type\":\"Edm.Double\",\"Integer\":1,\"Integer@odata.type\":\"Edm.Double\",\"PartitionKey\":\"partition\",\"RowKey\":\"1\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_ac013381-52b5-4ade-74f1-c359107c6b47\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotableonrrfq12v28e4?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + 194\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Integer\":1,\"PartitionKey\":\"partition\",\"RowKey\":\"1\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_4d8752a2-1b64-4299-5ef5-e2fbdb2a4836\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotable2eir7r5h8wjrb?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 260\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Float@odata.type\":\"Edm.Double\",\"Integer\":2,\"Integer@odata.type\":\"Edm.Double\",\"PartitionKey\":\"partition\",\"RowKey\":\"2\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_ac013381-52b5-4ade-74f1-c359107c6b47\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotableonrrfq12v28e4?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + 194\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Integer\":2,\"PartitionKey\":\"partition\",\"RowKey\":\"2\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_4d8752a2-1b64-4299-5ef5-e2fbdb2a4836\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotable2eir7r5h8wjrb?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 260\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Float@odata.type\":\"Edm.Double\",\"Integer\":3,\"Integer@odata.type\":\"Edm.Double\",\"PartitionKey\":\"partition\",\"RowKey\":\"3\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_ac013381-52b5-4ade-74f1-c359107c6b47--\r\n\r\n--batch_ebe3c2c9-e659-4741-4aa9-3cde003d089a--\r\n" + 194\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Integer\":3,\"PartitionKey\":\"partition\",\"RowKey\":\"3\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_4d8752a2-1b64-4299-5ef5-e2fbdb2a4836--\r\n\r\n--batch_b0a717c4-6ddf-4371-4459-f054bf64540f--\r\n" form: {} headers: Accept: @@ -121,39 +121,39 @@ interactions: Authorization: - sanitized Content-Length: - - "2329" + - "2131" Content-Type: - - multipart/mixed; boundary=batch_ebe3c2c9-e659-4741-4aa9-3cde003d089a + - multipart/mixed; boundary=batch_b0a717c4-6ddf-4371-4459-f054bf64540f Dataserviceversion: - "3.0" User-Agent: - azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:50:14 GMT + - Mon, 26 Jul 2021 20:23:36 GMT X-Ms-Version: - "2019-02-02" url: https://seankaneprim.table.core.windows.net/$batch method: POST response: - body: "--batchresponse_61fdc5a5-761a-4a06-b2e2-46a04023783d\r\nContent-Type: multipart/mixed; - boundary=changesetresponse_a4bb513b-0239-47b0-aa39-43d5e59c46cf\r\n\r\n--changesetresponse_a4bb513b-0239-47b0-aa39-43d5e59c46cf\r\nContent-Type: + body: "--batchresponse_941af3de-ec08-4244-8a1c-c49829645b2b\r\nContent-Type: multipart/mixed; + boundary=changesetresponse_cdd2e93a-08b4-4e8b-91eb-69c3ce810e05\r\n\r\n--changesetresponse_cdd2e93a-08b4-4e8b-91eb-69c3ce810e05\r\nContent-Type: application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 409 Conflict\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nPreference-Applied: return-no-content\r\nDataServiceVersion: 3.0;\r\nContent-Type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8\r\n\r\n{\"odata.error\":{\"code\":\"EntityAlreadyExists\",\"message\":{\"lang\":\"en-US\",\"value\":\"2:The - specified entity already exists.\\nRequestId:919d9f4d-3002-004e-3dc3-79c6fd000000\\nTime:2021-07-15T21:50:13.2804650Z\"}}}\r\n--changesetresponse_a4bb513b-0239-47b0-aa39-43d5e59c46cf--\r\n--batchresponse_61fdc5a5-761a-4a06-b2e2-46a04023783d--\r\n" + specified entity already exists.\\nRequestId:4bf66d30-5002-0077-6c5c-823de1000000\\nTime:2021-07-26T20:23:36.8090858Z\"}}}\r\n--changesetresponse_cdd2e93a-08b4-4e8b-91eb-69c3ce810e05--\r\n--batchresponse_941af3de-ec08-4244-8a1c-c49829645b2b--\r\n" headers: Cache-Control: - no-cache Content-Type: - - multipart/mixed; boundary=batchresponse_61fdc5a5-761a-4a06-b2e2-46a04023783d + - multipart/mixed; boundary=batchresponse_941af3de-ec08-4244-8a1c-c49829645b2b Date: - - Thu, 15 Jul 2021 21:50:12 GMT + - Mon, 26 Jul 2021 20:23:36 GMT Server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 X-Content-Type-Options: - nosniff X-Ms-Request-Id: - - 919d9f4d-3002-004e-3dc3-79c6fd000000 + - 4bf66d30-5002-0077-6c5c-823de1000000 X-Ms-Version: - "2019-02-02" status: 202 Accepted @@ -171,10 +171,10 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:50:14 GMT + - Mon, 26 Jul 2021 20:23:36 GMT X-Ms-Version: - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/Tables('gotableonrrfq12v28e4') + url: https://seankaneprim.table.core.windows.net/Tables('gotable2eir7r5h8wjrb') method: DELETE response: body: "" @@ -184,13 +184,13 @@ interactions: Content-Length: - "0" Date: - - Thu, 15 Jul 2021 21:50:12 GMT + - Mon, 26 Jul 2021 20:23:36 GMT Server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 X-Content-Type-Options: - nosniff X-Ms-Request-Id: - - 919d9fa1-3002-004e-10c3-79c6fd000000 + - 4bf66d56-5002-0077-125c-823de1000000 X-Ms-Version: - "2019-02-02" status: 204 No Content diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchMixed-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchMixed-variables.yaml index 64ece4721b61..f33ec43b2cd5 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchMixed-variables.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchMixed-variables.yaml @@ -2,4 +2,4 @@ STORAGE_ENDPOINT_SUFFIX: core.windows.net TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== TABLES_STORAGE_ACCOUNT_NAME: seankaneprim -randomSeed: "1626385786" +randomSeed: "1627331247" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchMixed.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchMixed.yaml index e195c1ad1ccf..e43b1453bc87 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchMixed.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchMixed.yaml @@ -2,7 +2,7 @@ version: 1 interactions: - request: - body: '{"TableName":"gotable0qfinjf2fyabp"}' + body: '{"TableName":"gotablee6cbgs4km2zxa"}' form: {} headers: Accept: @@ -19,48 +19,48 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:49:46 GMT + - Mon, 26 Jul 2021 20:27:27 GMT X-Ms-Version: - "2019-02-02" url: https://seankaneprim.table.core.windows.net/Tables method: POST response: - body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotable0qfinjf2fyabp"}' + body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotablee6cbgs4km2zxa"}' headers: Cache-Control: - no-cache Content-Type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 Date: - - Thu, 15 Jul 2021 21:49:45 GMT + - Mon, 26 Jul 2021 20:27:27 GMT Location: - - https://seankaneprim.table.core.windows.net/Tables('gotable0qfinjf2fyabp') + - https://seankaneprim.table.core.windows.net/Tables('gotablee6cbgs4km2zxa') Server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 X-Content-Type-Options: - nosniff X-Ms-Request-Id: - - cb6b9ca9-b002-001d-03c3-79e5c9000000 + - 4143579e-f002-0023-2f5c-8272b6000000 X-Ms-Version: - "2019-02-02" status: 201 Created code: 201 duration: "" - request: - body: "--batch_0345104c-14ba-4677-72e0-d9b843570103\r\nContent-Type: multipart/mixed; - boundary=changeset_4ea4363c-27b1-4850-6d7a-7b628efdde6c\r\n\r\n--changeset_4ea4363c-27b1-4850-6d7a-7b628efdde6c\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotable0qfinjf2fyabp?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + body: "--batch_5e28f6af-376a-4fc1-5f6b-fd90e3a202a5\r\nContent-Type: multipart/mixed; + boundary=changeset_4880589e-a070-49d6-72fd-12c1e86e2d3e\r\n\r\n--changeset_4880589e-a070-49d6-72fd-12c1e86e2d3e\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotablee6cbgs4km2zxa?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 260\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Float@odata.type\":\"Edm.Double\",\"Integer\":1,\"Integer@odata.type\":\"Edm.Double\",\"PartitionKey\":\"partition\",\"RowKey\":\"1\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_4ea4363c-27b1-4850-6d7a-7b628efdde6c\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotable0qfinjf2fyabp?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + 194\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Integer\":1,\"PartitionKey\":\"partition\",\"RowKey\":\"1\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_4880589e-a070-49d6-72fd-12c1e86e2d3e\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotablee6cbgs4km2zxa?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 260\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Float@odata.type\":\"Edm.Double\",\"Integer\":2,\"Integer@odata.type\":\"Edm.Double\",\"PartitionKey\":\"partition\",\"RowKey\":\"2\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_4ea4363c-27b1-4850-6d7a-7b628efdde6c\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotable0qfinjf2fyabp?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + 194\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Integer\":2,\"PartitionKey\":\"partition\",\"RowKey\":\"2\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_4880589e-a070-49d6-72fd-12c1e86e2d3e\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotablee6cbgs4km2zxa?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 260\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Float@odata.type\":\"Edm.Double\",\"Integer\":3,\"Integer@odata.type\":\"Edm.Double\",\"PartitionKey\":\"partition\",\"RowKey\":\"3\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_4ea4363c-27b1-4850-6d7a-7b628efdde6c--\r\n\r\n--batch_0345104c-14ba-4677-72e0-d9b843570103--\r\n" + 194\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Integer\":3,\"PartitionKey\":\"partition\",\"RowKey\":\"3\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_4880589e-a070-49d6-72fd-12c1e86e2d3e--\r\n\r\n--batch_5e28f6af-376a-4fc1-5f6b-fd90e3a202a5--\r\n" form: {} headers: Accept: @@ -68,50 +68,50 @@ interactions: Authorization: - sanitized Content-Length: - - "2329" + - "2131" Content-Type: - - multipart/mixed; boundary=batch_0345104c-14ba-4677-72e0-d9b843570103 + - multipart/mixed; boundary=batch_5e28f6af-376a-4fc1-5f6b-fd90e3a202a5 Dataserviceversion: - "3.0" User-Agent: - azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:49:46 GMT + - Mon, 26 Jul 2021 20:27:27 GMT X-Ms-Version: - "2019-02-02" url: https://seankaneprim.table.core.windows.net/$batch method: POST response: - body: "--batchresponse_2d08f501-0257-467f-a103-1f5351c660cc\r\nContent-Type: multipart/mixed; - boundary=changesetresponse_498b7a04-2a42-4d3e-9548-906958305072\r\n\r\n--changesetresponse_498b7a04-2a42-4d3e-9548-906958305072\r\nContent-Type: + body: "--batchresponse_2e303c12-8762-41a5-8bf6-ad01794cfae0\r\nContent-Type: multipart/mixed; + boundary=changesetresponse_363c7c7b-6f3a-4009-b6fa-b211e50b238f\r\n\r\n--changesetresponse_363c7c7b-6f3a-4009-b6fa-b211e50b238f\r\nContent-Type: application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nPreference-Applied: - return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://seankaneprim.table.core.windows.net/gotable0qfinjf2fyabp(PartitionKey='partition',RowKey='1')\r\nDataServiceId: - https://seankaneprim.table.core.windows.net/gotable0qfinjf2fyabp(PartitionKey='partition',RowKey='1')\r\nETag: - W/\"datetime'2021-07-15T21%3A49%3A45.7343092Z'\"\r\n\r\n\r\n--changesetresponse_498b7a04-2a42-4d3e-9548-906958305072\r\nContent-Type: + return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://seankaneprim.table.core.windows.net/gotablee6cbgs4km2zxa(PartitionKey='partition',RowKey='1')\r\nDataServiceId: + https://seankaneprim.table.core.windows.net/gotablee6cbgs4km2zxa(PartitionKey='partition',RowKey='1')\r\nETag: + W/\"datetime'2021-07-26T20%3A27%3A28.1434688Z'\"\r\n\r\n\r\n--changesetresponse_363c7c7b-6f3a-4009-b6fa-b211e50b238f\r\nContent-Type: application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nPreference-Applied: - return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://seankaneprim.table.core.windows.net/gotable0qfinjf2fyabp(PartitionKey='partition',RowKey='2')\r\nDataServiceId: - https://seankaneprim.table.core.windows.net/gotable0qfinjf2fyabp(PartitionKey='partition',RowKey='2')\r\nETag: - W/\"datetime'2021-07-15T21%3A49%3A45.7343092Z'\"\r\n\r\n\r\n--changesetresponse_498b7a04-2a42-4d3e-9548-906958305072\r\nContent-Type: + return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://seankaneprim.table.core.windows.net/gotablee6cbgs4km2zxa(PartitionKey='partition',RowKey='2')\r\nDataServiceId: + https://seankaneprim.table.core.windows.net/gotablee6cbgs4km2zxa(PartitionKey='partition',RowKey='2')\r\nETag: + W/\"datetime'2021-07-26T20%3A27%3A28.1434688Z'\"\r\n\r\n\r\n--changesetresponse_363c7c7b-6f3a-4009-b6fa-b211e50b238f\r\nContent-Type: application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nPreference-Applied: - return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://seankaneprim.table.core.windows.net/gotable0qfinjf2fyabp(PartitionKey='partition',RowKey='3')\r\nDataServiceId: - https://seankaneprim.table.core.windows.net/gotable0qfinjf2fyabp(PartitionKey='partition',RowKey='3')\r\nETag: - W/\"datetime'2021-07-15T21%3A49%3A45.7343092Z'\"\r\n\r\n\r\n--changesetresponse_498b7a04-2a42-4d3e-9548-906958305072--\r\n--batchresponse_2d08f501-0257-467f-a103-1f5351c660cc--\r\n" + return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://seankaneprim.table.core.windows.net/gotablee6cbgs4km2zxa(PartitionKey='partition',RowKey='3')\r\nDataServiceId: + https://seankaneprim.table.core.windows.net/gotablee6cbgs4km2zxa(PartitionKey='partition',RowKey='3')\r\nETag: + W/\"datetime'2021-07-26T20%3A27%3A28.1434688Z'\"\r\n\r\n\r\n--changesetresponse_363c7c7b-6f3a-4009-b6fa-b211e50b238f--\r\n--batchresponse_2e303c12-8762-41a5-8bf6-ad01794cfae0--\r\n" headers: Cache-Control: - no-cache Content-Type: - - multipart/mixed; boundary=batchresponse_2d08f501-0257-467f-a103-1f5351c660cc + - multipart/mixed; boundary=batchresponse_2e303c12-8762-41a5-8bf6-ad01794cfae0 Date: - - Thu, 15 Jul 2021 21:49:45 GMT + - Mon, 26 Jul 2021 20:27:27 GMT Server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 X-Content-Type-Options: - nosniff X-Ms-Request-Id: - - cb6b9cf4-b002-001d-49c3-79e5c9000000 + - 414357ec-f002-0023-795c-8272b6000000 X-Ms-Version: - "2019-02-02" status: 202 Accepted @@ -131,53 +131,55 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:49:46 GMT + - Mon, 26 Jul 2021 20:27:28 GMT X-Ms-Version: - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/gotable0qfinjf2fyabp()?%24filter=RowKey+eq+%271%27 + url: https://seankaneprim.table.core.windows.net/gotablee6cbgs4km2zxa()?%24filter=RowKey+eq+%271%27 method: GET response: - body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#gotable0qfinjf2fyabp","value":[{"odata.etag":"W/\"datetime''2021-07-15T21%3A49%3A45.7343092Z''\"","PartitionKey":"partition","RowKey":"1","Timestamp":"2021-07-15T21:49:45.7343092Z","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":1.0,"String":"someString"}]}' + body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#gotablee6cbgs4km2zxa","value":[{"odata.etag":"W/\"datetime''2021-07-26T20%3A27%3A28.1434688Z''\"","PartitionKey":"partition","RowKey":"1","Timestamp":"2021-07-26T20:27:28.1434688Z","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":1,"String":"someString"}]}' headers: Cache-Control: - no-cache Content-Type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 Date: - - Thu, 15 Jul 2021 21:49:45 GMT + - Mon, 26 Jul 2021 20:27:28 GMT Server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + Vary: + - Origin X-Content-Type-Options: - nosniff X-Ms-Request-Id: - - cb6b9d33-b002-001d-05c3-79e5c9000000 + - 4143583f-f002-0023-4b5c-8272b6000000 X-Ms-Version: - "2019-02-02" status: 200 OK code: 200 duration: "" - request: - body: "--batch_c2323732-8cc7-4abe-5f2d-2403bdd9a312\r\nContent-Type: multipart/mixed; - boundary=changeset_ece51dde-cec3-4fd6-5cc6-fa3605f00007\r\n\r\n--changeset_ece51dde-cec3-4fd6-5cc6-fa3605f00007\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPATCH https://seankaneprim.table.core.windows.net/gotable0qfinjf2fyabp(PartitionKey='partition',RowKey='1')?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + body: "--batch_7c6acb2a-0fca-4af8-6cce-c8d678857480\r\nContent-Type: multipart/mixed; + boundary=changeset_f39dc532-ad40-4a4a-7d85-2fe5eb1b927c\r\n\r\n--changeset_f39dc532-ad40-4a4a-7d85-2fe5eb1b927c\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPATCH https://seankaneprim.table.core.windows.net/gotablee6cbgs4km2zxa(PartitionKey='partition',RowKey='1')?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json\r\nContent-Length: 63\r\nContent-Type: - application/json\r\nDataserviceversion: 3.0\r\nIf-Match: W/\"datetime'2021-07-15T21%3A49%3A45.7343092Z'\"\r\nX-Ms-Version: - 2019-02-02\r\n\r\n{\"MergeProperty\":\"foo\",\"PartitionKey\":\"partition\",\"RowKey\":\"1\"}\r\n--changeset_ece51dde-cec3-4fd6-5cc6-fa3605f00007\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nDELETE https://seankaneprim.table.core.windows.net/gotable0qfinjf2fyabp(PartitionKey='partition',RowKey='2')?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + application/json\r\nDataserviceversion: 3.0\r\nIf-Match: W/\"datetime'2021-07-26T20%3A27%3A28.1434688Z'\"\r\nX-Ms-Version: + 2019-02-02\r\n\r\n{\"MergeProperty\":\"foo\",\"PartitionKey\":\"partition\",\"RowKey\":\"1\"}\r\n--changeset_f39dc532-ad40-4a4a-7d85-2fe5eb1b927c\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nDELETE https://seankaneprim.table.core.windows.net/gotablee6cbgs4km2zxa(PartitionKey='partition',RowKey='2')?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nDataserviceversion: - 3.0\r\nIf-Match: *\r\nX-Ms-Version: 2019-02-02\r\n\r\n\r\n--changeset_ece51dde-cec3-4fd6-5cc6-fa3605f00007\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPUT https://seankaneprim.table.core.windows.net/gotable0qfinjf2fyabp(PartitionKey='partition',RowKey='3')?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + 3.0\r\nIf-Match: *\r\nX-Ms-Version: 2019-02-02\r\n\r\n\r\n--changeset_f39dc532-ad40-4a4a-7d85-2fe5eb1b927c\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPUT https://seankaneprim.table.core.windows.net/gotablee6cbgs4km2zxa(PartitionKey='partition',RowKey='3')?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json\r\nContent-Length: 65\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nIf-Match: *\r\nX-Ms-Version: - 2019-02-02\r\n\r\n{\"PartitionKey\":\"partition\",\"ReplaceProperty\":\"foo\",\"RowKey\":\"3\"}\r\n--changeset_ece51dde-cec3-4fd6-5cc6-fa3605f00007\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotable0qfinjf2fyabp?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + 2019-02-02\r\n\r\n{\"PartitionKey\":\"partition\",\"ReplaceProperty\":\"foo\",\"RowKey\":\"3\"}\r\n--changeset_f39dc532-ad40-4a4a-7d85-2fe5eb1b927c\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotablee6cbgs4km2zxa?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 260\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Float@odata.type\":\"Edm.Double\",\"Integer\":4,\"Integer@odata.type\":\"Edm.Double\",\"PartitionKey\":\"partition\",\"RowKey\":\"4\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_ece51dde-cec3-4fd6-5cc6-fa3605f00007\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotable0qfinjf2fyabp?%24format=application%2Fjson%3Bodata%3Dminimalmetadata + 194\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Integer\":4,\"PartitionKey\":\"partition\",\"RowKey\":\"4\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_f39dc532-ad40-4a4a-7d85-2fe5eb1b927c\r\nContent-Transfer-Encoding: + binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotablee6cbgs4km2zxa?%24format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 260\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Float@odata.type\":\"Edm.Double\",\"Integer\":5,\"Integer@odata.type\":\"Edm.Double\",\"PartitionKey\":\"partition\",\"RowKey\":\"5\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_ece51dde-cec3-4fd6-5cc6-fa3605f00007--\r\n\r\n--batch_c2323732-8cc7-4abe-5f2d-2403bdd9a312--\r\n" + 194\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: + return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Integer\":5,\"PartitionKey\":\"partition\",\"RowKey\":\"5\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_f39dc532-ad40-4a4a-7d85-2fe5eb1b927c--\r\n\r\n--batch_7c6acb2a-0fca-4af8-6cce-c8d678857480--\r\n" form: {} headers: Accept: @@ -185,54 +187,54 @@ interactions: Authorization: - sanitized Content-Length: - - "3088" + - "2956" Content-Type: - - multipart/mixed; boundary=batch_c2323732-8cc7-4abe-5f2d-2403bdd9a312 + - multipart/mixed; boundary=batch_7c6acb2a-0fca-4af8-6cce-c8d678857480 Dataserviceversion: - "3.0" User-Agent: - azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:49:46 GMT + - Mon, 26 Jul 2021 20:27:28 GMT X-Ms-Version: - "2019-02-02" url: https://seankaneprim.table.core.windows.net/$batch method: POST response: - body: "--batchresponse_4bccf709-e644-4437-a425-b3da36b90d1c\r\nContent-Type: multipart/mixed; - boundary=changesetresponse_91f58e54-0034-4c18-bf7c-21ffc80008ba\r\n\r\n--changesetresponse_91f58e54-0034-4c18-bf7c-21ffc80008ba\r\nContent-Type: + body: "--batchresponse_738f303f-dc4b-4524-8c1d-5d051e2d0a4e\r\nContent-Type: multipart/mixed; + boundary=changesetresponse_645d4142-b964-48da-9ddb-97431e235c5c\r\n\r\n--changesetresponse_645d4142-b964-48da-9ddb-97431e235c5c\r\nContent-Type: application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nDataServiceVersion: - 1.0;\r\nETag: W/\"datetime'2021-07-15T21%3A49%3A45.9758551Z'\"\r\n\r\n\r\n--changesetresponse_91f58e54-0034-4c18-bf7c-21ffc80008ba\r\nContent-Type: + 1.0;\r\nETag: W/\"datetime'2021-07-26T20%3A27%3A28.3983826Z'\"\r\n\r\n\r\n--changesetresponse_645d4142-b964-48da-9ddb-97431e235c5c\r\nContent-Type: application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nDataServiceVersion: - 1.0;\r\n\r\n\r\n--changesetresponse_91f58e54-0034-4c18-bf7c-21ffc80008ba\r\nContent-Type: + 1.0;\r\n\r\n\r\n--changesetresponse_645d4142-b964-48da-9ddb-97431e235c5c\r\nContent-Type: application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nDataServiceVersion: - 1.0;\r\nETag: W/\"datetime'2021-07-15T21%3A49%3A45.976856Z'\"\r\n\r\n\r\n--changesetresponse_91f58e54-0034-4c18-bf7c-21ffc80008ba\r\nContent-Type: + 1.0;\r\nETag: W/\"datetime'2021-07-26T20%3A27%3A28.3983826Z'\"\r\n\r\n\r\n--changesetresponse_645d4142-b964-48da-9ddb-97431e235c5c\r\nContent-Type: application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nPreference-Applied: - return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://seankaneprim.table.core.windows.net/gotable0qfinjf2fyabp(PartitionKey='partition',RowKey='4')\r\nDataServiceId: - https://seankaneprim.table.core.windows.net/gotable0qfinjf2fyabp(PartitionKey='partition',RowKey='4')\r\nETag: - W/\"datetime'2021-07-15T21%3A49%3A45.9744781Z'\"\r\n\r\n\r\n--changesetresponse_91f58e54-0034-4c18-bf7c-21ffc80008ba\r\nContent-Type: + return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://seankaneprim.table.core.windows.net/gotablee6cbgs4km2zxa(PartitionKey='partition',RowKey='4')\r\nDataServiceId: + https://seankaneprim.table.core.windows.net/gotablee6cbgs4km2zxa(PartitionKey='partition',RowKey='4')\r\nETag: + W/\"datetime'2021-07-26T20%3A27%3A28.3976494Z'\"\r\n\r\n\r\n--changesetresponse_645d4142-b964-48da-9ddb-97431e235c5c\r\nContent-Type: application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nPreference-Applied: - return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://seankaneprim.table.core.windows.net/gotable0qfinjf2fyabp(PartitionKey='partition',RowKey='5')\r\nDataServiceId: - https://seankaneprim.table.core.windows.net/gotable0qfinjf2fyabp(PartitionKey='partition',RowKey='5')\r\nETag: - W/\"datetime'2021-07-15T21%3A49%3A45.9744781Z'\"\r\n\r\n\r\n--changesetresponse_91f58e54-0034-4c18-bf7c-21ffc80008ba--\r\n--batchresponse_4bccf709-e644-4437-a425-b3da36b90d1c--\r\n" + return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://seankaneprim.table.core.windows.net/gotablee6cbgs4km2zxa(PartitionKey='partition',RowKey='5')\r\nDataServiceId: + https://seankaneprim.table.core.windows.net/gotablee6cbgs4km2zxa(PartitionKey='partition',RowKey='5')\r\nETag: + W/\"datetime'2021-07-26T20%3A27%3A28.3976494Z'\"\r\n\r\n\r\n--changesetresponse_645d4142-b964-48da-9ddb-97431e235c5c--\r\n--batchresponse_738f303f-dc4b-4524-8c1d-5d051e2d0a4e--\r\n" headers: Cache-Control: - no-cache Content-Type: - - multipart/mixed; boundary=batchresponse_4bccf709-e644-4437-a425-b3da36b90d1c + - multipart/mixed; boundary=batchresponse_738f303f-dc4b-4524-8c1d-5d051e2d0a4e Date: - - Thu, 15 Jul 2021 21:49:45 GMT + - Mon, 26 Jul 2021 20:27:28 GMT Server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 X-Content-Type-Options: - nosniff X-Ms-Request-Id: - - cb6b9d89-b002-001d-4cc3-79e5c9000000 + - 4143586f-f002-0023-7a5c-8272b6000000 X-Ms-Version: - "2019-02-02" status: 202 Accepted @@ -252,26 +254,28 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:49:47 GMT + - Mon, 26 Jul 2021 20:27:28 GMT X-Ms-Version: - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/gotable0qfinjf2fyabp()?%24filter=RowKey+eq+%271%27 + url: https://seankaneprim.table.core.windows.net/gotablee6cbgs4km2zxa()?%24filter=RowKey+eq+%271%27 method: GET response: - body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#gotable0qfinjf2fyabp","value":[{"odata.etag":"W/\"datetime''2021-07-15T21%3A49%3A45.9758551Z''\"","PartitionKey":"partition","RowKey":"1","Timestamp":"2021-07-15T21:49:45.9758551Z","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":1.0,"MergeProperty":"foo","String":"someString"}]}' + body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#gotablee6cbgs4km2zxa","value":[{"odata.etag":"W/\"datetime''2021-07-26T20%3A27%3A28.3983826Z''\"","PartitionKey":"partition","RowKey":"1","Timestamp":"2021-07-26T20:27:28.3983826Z","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":1,"MergeProperty":"foo","String":"someString"}]}' headers: Cache-Control: - no-cache Content-Type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 Date: - - Thu, 15 Jul 2021 21:49:45 GMT + - Mon, 26 Jul 2021 20:27:28 GMT Server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + Vary: + - Origin X-Content-Type-Options: - nosniff X-Ms-Request-Id: - - cb6b9df0-b002-001d-2ac3-79e5c9000000 + - 41435917-f002-0023-1e5c-8272b6000000 X-Ms-Version: - "2019-02-02" status: 200 OK @@ -289,10 +293,10 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:49:47 GMT + - Mon, 26 Jul 2021 20:27:28 GMT X-Ms-Version: - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/Tables('gotable0qfinjf2fyabp') + url: https://seankaneprim.table.core.windows.net/Tables('gotablee6cbgs4km2zxa') method: DELETE response: body: "" @@ -302,13 +306,13 @@ interactions: Content-Length: - "0" Date: - - Thu, 15 Jul 2021 21:49:45 GMT + - Mon, 26 Jul 2021 20:27:28 GMT Server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 X-Content-Type-Options: - nosniff X-Ms-Request-Id: - - cb6b9e31-b002-001d-68c3-79e5c9000000 + - 41435952-f002-0023-565c-8272b6000000 X-Ms-Version: - "2019-02-02" status: 204 No Content diff --git a/sdk/tables/aztable/table_batch_test.go b/sdk/tables/aztable/table_batch_test.go index 851cbf573796..b2733a0aef4a 100644 --- a/sdk/tables/aztable/table_batch_test.go +++ b/sdk/tables/aztable/table_batch_test.go @@ -53,7 +53,7 @@ func (s *tableClientLiveTests) TestBatchMixed() { for i := range batch { marshalled, err := json.Marshal((*entitiesToCreate)[i]) - require.Nil(err) + require.NoError(err) batch[i] = TableTransactionAction{ ActionType: Add, Entity: marshalled, @@ -61,7 +61,7 @@ func (s *tableClientLiveTests) TestBatchMixed() { } resp, err := client.submitTransactionInternal(ctx, &batch, context.recording.UUID(), context.recording.UUID(), nil) - require.Nil(err) + require.NoError(err) for i := 0; i < len(*resp.TransactionResponses); i++ { r := (*resp.TransactionResponses)[i] require.Equal(http.StatusNoContent, r.StatusCode) @@ -77,7 +77,7 @@ func (s *tableClientLiveTests) TestBatchMixed() { preMerge := qResp.TableEntityQueryResponse.Value[0] var unMarshalledPreMerge map[string]interface{} err = json.Unmarshal(preMerge, &unMarshalledPreMerge) - require.Nil(err) + require.NoError(err) // create a new batch slice. batch = make([]TableTransactionAction, 5) @@ -91,12 +91,12 @@ func (s *tableClientLiveTests) TestBatchMixed() { mergeProp: val, } marshalledMergeEntity, err := json.Marshal(mergeEntity) - require.Nil(err) + require.NoError(err) batch[0] = TableTransactionAction{ActionType: UpdateMerge, Entity: marshalledMergeEntity, ETag: (*resp.TransactionResponses)[0].Header.Get(etag)} // create a delete action for the second added entity marshalledSecondEntity, err := json.Marshal((*entitiesToCreate)[1]) - require.Nil(err) + require.NoError(err) batch[1] = TableTransactionAction{ActionType: Delete, Entity: marshalledSecondEntity} // create an upsert action to replace the third added entity with a new value @@ -107,7 +107,7 @@ func (s *tableClientLiveTests) TestBatchMixed() { replaceProp: val, } marshalledThirdEntity, err := json.Marshal(replaceProperties) - require.Nil(err) + require.NoError(err) batch[2] = TableTransactionAction{ActionType: UpsertReplace, Entity: marshalledThirdEntity} // Add the remaining 2 entities. @@ -117,7 +117,7 @@ func (s *tableClientLiveTests) TestBatchMixed() { batch[4] = TableTransactionAction{ActionType: Add, Entity: marshalled5thEntity} resp, err = client.submitTransactionInternal(ctx, &batch, context.recording.UUID(), context.recording.UUID(), nil) - require.Nil(err) + require.NoError(err) for i := 0; i < len(*resp.TransactionResponses); i++ { r := (*resp.TransactionResponses)[i] @@ -132,7 +132,7 @@ func (s *tableClientLiveTests) TestBatchMixed() { postMerge := qResp.TableEntityQueryResponse.Value[0] var unMarshaledPostMerge map[string]interface{} err = json.Unmarshal(postMerge, &unMarshaledPostMerge) - require.Nil(err) + require.NoError(err) // The merged entity has all its properties + the merged property require.Equalf(len(unMarshalledPreMerge)+1, len(unMarshaledPostMerge), "postMerge should have one more property than preMerge") @@ -162,7 +162,7 @@ func (s *tableClientLiveTests) TestBatchError() { // Add the entities to the batch for i := 0; i < cap(batch); i++ { marshalledEntity, err := json.Marshal((*entitiesToCreate)[i]) - require.Nil(err) + require.NoError(err) batch = append(batch, TableTransactionAction{ActionType: Add, Entity: marshalledEntity}) } @@ -174,3 +174,110 @@ func (s *tableClientLiveTests) TestBatchError() { require.Equal(2, transactionError.FailedEntityIndex) require.Equal(http.StatusConflict, (*resp.TransactionResponses)[0].StatusCode) } + +func (s *tableClientLiveTests) TestBatchComplex() { + require := require.New(s.T()) + context := getTestContext(s.T().Name()) + client, delete := s.init(true) + defer delete() + + edmEntity := createEdmEntity(1, "pk001") + edmEntity2 := createEdmEntity(2, "pk001") + edmEntity3 := createEdmEntity(3, "pk001") + edmEntity4 := createEdmEntity(4, "pk001") + edmEntity5 := createEdmEntity(5, "pk001") + batch := make([]TableTransactionAction, 5) + + marshalled1, err := json.Marshal(edmEntity) + require.NoError(err) + batch[0] = TableTransactionAction{ + ActionType: Add, + Entity: marshalled1, + } + + marshalled2, err := json.Marshal(edmEntity2) + require.NoError(err) + batch[1] = TableTransactionAction{ + ActionType: Add, + Entity: marshalled2, + } + + marshalled3, err := json.Marshal(edmEntity3) + require.NoError(err) + batch[2] = TableTransactionAction{ + ActionType: Add, + Entity: marshalled3, + } + + marshalled4, err := json.Marshal(edmEntity4) + require.NoError(err) + batch[3] = TableTransactionAction{ + ActionType: Add, + Entity: marshalled4, + } + + marshalled5, err := json.Marshal(edmEntity5) + require.NoError(err) + batch[4] = TableTransactionAction{ + ActionType: Add, + Entity: marshalled5, + } + + resp, err := client.submitTransactionInternal(ctx, &batch, context.recording.UUID(), context.recording.UUID(), nil) + require.NoError(err) + for i := 0; i < len(*resp.TransactionResponses); i++ { + r := (*resp.TransactionResponses)[i] + require.Equal(http.StatusNoContent, r.StatusCode) + } + + batch2 := make([]TableTransactionAction, 3) + edmEntity.Properties["Bool"] = false + edmEntity2.Properties["Int32"] = int32(10) + + marshalled1, err = json.Marshal(edmEntity) + require.NoError(err) + batch2[0] = TableTransactionAction{ + ActionType: UpsertMerge, + Entity: marshalled1, + } + + marshalled2, err = json.Marshal(edmEntity2) + require.NoError(err) + batch2[1] = TableTransactionAction{ + ActionType: UpsertReplace, + Entity: marshalled2, + } + + marshalled3, err = json.Marshal(edmEntity3) + require.NoError(err) + batch2[2] = TableTransactionAction{ + ActionType: Delete, + Entity: marshalled3, + } + + resp, err = client.submitTransactionInternal(ctx, &batch2, context.recording.UUID(), context.recording.UUID(), nil) + require.NoError(err) + for i := 0; i < len(*resp.TransactionResponses); i++ { + r := (*resp.TransactionResponses)[i] + require.Equal(http.StatusNoContent, r.StatusCode) + } + + received, err := client.GetEntity(ctx, edmEntity.PartitionKey, edmEntity.RowKey, nil) + require.NoError(err) + + var receivedEdm EdmEntity + err = json.Unmarshal(received.Value, &receivedEdm) + require.NoError(err) + require.Equal(edmEntity.Properties["Bool"], receivedEdm.Properties["Bool"]) + + received2, err := client.GetEntity(ctx, edmEntity2.PartitionKey, edmEntity2.RowKey, nil) + require.NoError(err) + + var receivedEdm2 EdmEntity + err = json.Unmarshal(received2.Value, &receivedEdm2) + require.NoError(err) + require.Equal(edmEntity2.Properties["Int32"], receivedEdm2.Properties["Int32"]) + + _, err = client.GetEntity(ctx, edmEntity3.PartitionKey, edmEntity3.RowKey, nil) + require.Error(err) +} diff --git a/sdk/tables/aztable/table_pagers.go b/sdk/tables/aztable/table_pagers.go index 695014433428..4b8b61613265 100644 --- a/sdk/tables/aztable/table_pagers.go +++ b/sdk/tables/aztable/table_pagers.go @@ -5,16 +5,8 @@ package aztable import ( "context" - "encoding/base64" - "errors" - "fmt" - "reflect" - "strconv" - "strings" - "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/internal/uuid" ) // TableEntityQueryResponsePager is a Pager for Table entity query results. @@ -144,77 +136,3 @@ func (p *tableQueryResponsePager) PageResponse() TableQueryResponseResponse { func (p *tableQueryResponsePager) Err() error { return p.err } - -func toOdataAnnotatedDictionary(entity *map[string]interface{}) error { - entMap := *entity - for k, v := range entMap { - t := reflect.TypeOf(v) - Switch: - switch t.Kind() { - case reflect.Slice, reflect.Array: - if getTypeArray(v) != reflect.TypeOf(byte(0)) { - return errors.New("arrays and slices must be of type byte") - } - // check if this is a uuid - uuidVal, ok := v.(uuid.UUID) - if ok { - entMap[k] = uuidVal.String() - entMap[odataType(k)] = edmGuid - } else { - entMap[odataType(k)] = edmBinary - b := v.([]byte) - entMap[k] = base64.StdEncoding.EncodeToString(b) - } - case reflect.Struct: - switch tn := reflect.TypeOf(v).String(); tn { - case "time.Time": - entMap[odataType(k)] = edmDateTime - time := v.(time.Time) - entMap[k] = time.UTC().Format(ISO8601) - continue - default: - return fmt.Errorf("Invalid struct for entity field '%s' of type '%s'", k, tn) - } - case reflect.Float32, reflect.Float64: - entMap[odataType(k)] = edmDouble - case reflect.Int64: - entMap[odataType(k)] = edmInt64 - i64 := v.(int64) - entMap[k] = strconv.FormatInt(i64, 10) - case reflect.Ptr: - if v == nil { - // if the pointer is nil, ignore it. - continue - } - // follow the pointer to the type and re-run the switch - t = reflect.ValueOf(v).Elem().Type() - goto Switch - } - } - return nil -} - -func flattenEntity(entity reflect.Value, entityMap *map[string]interface{}) { - for i := 0; i < entity.NumField(); i++ { - if !entity.Field(i).IsZero() { - fieldName := entity.Type().Field(i).Name - if fieldName == "PartitionKey" { - (*entityMap)["PartitionKey"] = entity.Field(i).String() - } else if fieldName == "RowKey" { - (*entityMap)["RowKey"] = entity.Field(i).String() - } - } - } -} - -func odataType(n string) string { - var b strings.Builder - b.Grow(len(n) + len(OdataType)) - b.WriteString(n) - b.WriteString(OdataType) - return b.String() -} - -func getTypeArray(arr interface{}) reflect.Type { - return reflect.TypeOf(arr).Elem() -} diff --git a/sdk/tables/aztable/table_service_client_test.go b/sdk/tables/aztable/table_service_client_test.go index db8e54145f25..2901381d6c6c 100644 --- a/sdk/tables/aztable/table_service_client_test.go +++ b/sdk/tables/aztable/table_service_client_test.go @@ -8,7 +8,6 @@ import ( "fmt" "net/http" "testing" - "time" "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/internal/runtime" @@ -216,7 +215,7 @@ func (s *tableServiceClientLiveTests) TestSetLogging() { require.NoError(err) require.NotNil(resp) - time.Sleep(45 * time.Second) + // time.Sleep(45 * time.Second) received, err := context.client.GetProperties(ctx, nil) require.NoError(err) @@ -250,7 +249,7 @@ func (s *tableServiceClientLiveTests) TestSetHoursMetrics() { require.NoError(err) require.NotNil(resp) - time.Sleep(45 * time.Second) + // time.Sleep(45 * time.Second) received, err := context.client.GetProperties(ctx, nil) require.NoError(err) @@ -283,7 +282,7 @@ func (s *tableServiceClientLiveTests) TestSetMinuteMetrics() { require.NoError(err) require.NotNil(resp) - time.Sleep(45 * time.Second) + // time.Sleep(45 * time.Second) received, err := context.client.GetProperties(ctx, nil) require.NoError(err) @@ -314,7 +313,7 @@ func (s *tableServiceClientLiveTests) TestSetCors() { require.NoError(err) require.NotNil(resp) - time.Sleep(45 * time.Second) + // time.Sleep(45 * time.Second) received, err := context.client.GetProperties(ctx, nil) require.NoError(err) diff --git a/sdk/tables/aztable/table_transactional_batch.go b/sdk/tables/aztable/table_transactional_batch.go index cfc07c89be07..6289483df207 100644 --- a/sdk/tables/aztable/table_transactional_batch.go +++ b/sdk/tables/aztable/table_transactional_batch.go @@ -38,7 +38,7 @@ const ( const ( headerContentType = "Content-Type" headerContentTransferEncoding = "Content-Transfer-Encoding" - error_empty_transaction = "Transaction cannot be empty." + error_empty_transaction = "transaction cannot be empty" ) type OdataErrorMessage struct { @@ -96,13 +96,6 @@ type TableSubmitTransactionOptions struct { RequestID *string } -//nolint -var defaultChangesetHeaders = map[string]string{ - "Accept": "application/json;odata=minimalmetadata", - "Content-Type": "application/json", - "Prefer": "return-no-content", -} - // SubmitTransaction submits the table transactional batch according to the slice of TableTransactionActions provided. func (t *TableClient) SubmitTransaction(ctx context.Context, transactionActions []TableTransactionAction, tableSubmitTransactionOptions *TableSubmitTransactionOptions) (TableTransactionResponse, error) { return t.submitTransactionInternal(ctx, &transactionActions, uuid.New(), uuid.New(), tableSubmitTransactionOptions) @@ -206,10 +199,15 @@ func buildTransactionResponse(req *azcore.Request, resp *azcore.Response, itemCo // This is a failure and the body is json return TableTransactionResponse{}, newTableTransactionError(bytesBody) } + outerBoundary := getBoundaryName(bytesBody) mpReader := multipart.NewReader(reader, outerBoundary) - outerPart, err := mpReader.NextPart() //nolint There is an error here - innerBytes, err := ioutil.ReadAll(outerPart) //nolint There is an error here + outerPart, err := mpReader.NextPart() + if err != nil { + return TableTransactionResponse{}, err + } + + innerBytes, err := ioutil.ReadAll(outerPart) //nolint innerBoundary := getBoundaryName(innerBytes) reader = bytes.NewReader(innerBytes) mpReader = multipart.NewReader(reader, innerBoundary) @@ -286,7 +284,6 @@ func (t *TableClient) generateChangesetBody(changesetBoundary string, transactio // generateEntitySubset generates body payload for particular batch entity func (t *TableClient) generateEntitySubset(transactionAction *TableTransactionAction, writer *multipart.Writer) error { - h := make(textproto.MIMEHeader) h.Set(headerContentTransferEncoding, "binary") h.Set(headerContentType, "application/http") @@ -321,10 +318,6 @@ func (t *TableClient) generateEntitySubset(transactionAction *TableTransactionAc return err } case Add: - err = toOdataAnnotatedDictionary(&entity) - if err != nil { - return err - } req, err = t.client.insertEntityCreateRequest(ctx, t.Name, &TableInsertEntityOptions{TableEntityProperties: entity, ResponsePreference: ResponseFormatReturnNoContent.ToPtr()}, qo) if err != nil { return err @@ -332,10 +325,6 @@ func (t *TableClient) generateEntitySubset(transactionAction *TableTransactionAc case UpdateMerge: fallthrough case UpsertMerge: - err = toOdataAnnotatedDictionary(&entity) - if err != nil { - return err - } opts := &TableMergeEntityOptions{TableEntityProperties: entity} if len(transactionAction.ETag) > 0 { opts.IfMatch = &transactionAction.ETag @@ -350,10 +339,6 @@ func (t *TableClient) generateEntitySubset(transactionAction *TableTransactionAc case UpdateReplace: fallthrough case UpsertReplace: - err = toOdataAnnotatedDictionary(&entity) - if err != nil { - return err - } req, err = t.client.updateEntityCreateRequest(ctx, t.Name, entity[partitionKey].(string), entity[rowKey].(string), &TableUpdateEntityOptions{TableEntityProperties: entity, IfMatch: &transactionAction.ETag}, qo) if err != nil { return err diff --git a/sdk/tables/aztable/zt_table_recorded_tests.go b/sdk/tables/aztable/zt_table_recorded_tests.go index d32bcb23330b..f784f551e308 100644 --- a/sdk/tables/aztable/zt_table_recorded_tests.go +++ b/sdk/tables/aztable/zt_table_recorded_tests.go @@ -178,8 +178,6 @@ type complexTestEntity struct { Float float32 DateTime time.Time Byte []byte - // Integer64 int64 // Need to add type hints for ints/floats above 32bits - // Float64 float64 } func createSimpleEntity(count int, pk string) basicTestEntity { @@ -224,8 +222,6 @@ func createComplexEntity(i int, pk string) complexTestEntity { Float: 3.14159, DateTime: time.Date(2021, time.July, 13, 0, 0, 0, 0, time.UTC), Byte: []byte("somebytes"), - // Integer64: int64(math.Pow(2, 33)), - // Float64: math.Pow(2, 33.1), } } @@ -238,28 +234,35 @@ func createComplexEntities(count int, pk string) *[]complexTestEntity { return &result } -type simpleEntity struct { - ETag string - PartitionKey string - RowKey string - Timestamp time.Time - IntProp int - BoolProp bool - StringProp string +func createEdmEntity(count int, pk string) EdmEntity { + return EdmEntity{ + Entity: Entity{ + PartitionKey: pk, + RowKey: fmt.Sprint(count), + }, + Properties: map[string]interface{}{ + "Bool": false, + "Int32": int32(1234), + "Int64": EdmInt64(123456789012), + "Double": 1234.1234, + "String": "test", + "Guid": EdmGuid("4185404a-5818-48c3-b9be-f217df0dba6f"), + "DateTime": EdmDateTime(time.Date(2013, time.August, 02, 17, 37, 43, 9004348, time.UTC)), + "Binary": EdmBinary("SomeBinary"), + }, + } } -type complexEntity struct { - ETag string - PartitionKey string - RowKey string - Timestamp time.Time - SomeBinaryProperty []byte - SomeDateProperty time.Time - SomeDoubleProperty0 float64 - SomeDoubleProperty1 float64 - SomeGuidProperty [16]byte `uuid:""` - SomeInt64Property int64 - SomeIntProperty int - SomeStringProperty string - SomePtrStringProperty *string +func requireSameDateTime(r *require.Assertions, time1, time2 interface{}) { + t1 := time.Time(time1.(EdmDateTime)) + t2 := time.Time(time2.(EdmDateTime)) + r.Equal(t1.Year(), t2.Year()) + r.Equal(t1.Month(), t2.Month()) + r.Equal(t1.Day(), t2.Day()) + r.Equal(t1.Hour(), t2.Hour()) + r.Equal(t1.Minute(), t2.Minute()) + r.Equal(t1.Second(), t2.Second()) + z1, _ := t1.Zone() + z2, _ := t2.Zone() + r.Equal(z1, z2) } diff --git a/sdk/tables/aztable/zz_generated_connection.go b/sdk/tables/aztable/zz_generated_connection.go index 132c0a69cb7f..6aa8ad00d8b3 100644 --- a/sdk/tables/aztable/zz_generated_connection.go +++ b/sdk/tables/aztable/zz_generated_connection.go @@ -9,6 +9,7 @@ package aztable import ( "fmt" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" ) From e1654882916cb6b94c4e2a4f131f964ac71c10f3 Mon Sep 17 00:00:00 2001 From: Sean Kane <68240067+seankane-msft@users.noreply.github.com> Date: Wed, 28 Jul 2021 11:58:50 -0400 Subject: [PATCH 31/42] Adding Table suffix to Create, Delete, and List methods on service client (#15181) --- sdk/tables/aztable/table_client.go | 4 ++-- sdk/tables/aztable/table_service_client.go | 6 ++--- .../aztable/table_service_client_test.go | 24 +++++++++---------- sdk/tables/aztable/zt_table_recorded_tests.go | 6 ++--- 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/sdk/tables/aztable/table_client.go b/sdk/tables/aztable/table_client.go index 8fb6c93ea071..2cf499734525 100644 --- a/sdk/tables/aztable/table_client.go +++ b/sdk/tables/aztable/table_client.go @@ -34,12 +34,12 @@ func NewTableClient(tableName string, serviceURL string, cred azcore.Credential, // Create creates the table with the tableName specified when NewTableClient was called. func (t *TableClient) Create(ctx context.Context) (TableResponseResponse, error) { - return t.service.Create(ctx, t.Name) + return t.service.CreateTable(ctx, t.Name) } // Delete deletes the table with the tableName specified when NewTableClient was called. func (t *TableClient) Delete(ctx context.Context) (TableDeleteResponse, error) { - return t.service.Delete(ctx, t.Name) + return t.service.DeleteTable(ctx, t.Name) } // List queries the entities using the specified ListOptions. diff --git a/sdk/tables/aztable/table_service_client.go b/sdk/tables/aztable/table_service_client.go index 9a0e8c84da51..62cf9720f263 100644 --- a/sdk/tables/aztable/table_service_client.go +++ b/sdk/tables/aztable/table_service_client.go @@ -40,7 +40,7 @@ func (t *TableServiceClient) NewTableClient(tableName string) *TableClient { } // Create creates a table with the specified name. -func (t *TableServiceClient) Create(ctx context.Context, name string) (TableResponseResponse, error) { +func (t *TableServiceClient) CreateTable(ctx context.Context, name string) (TableResponseResponse, error) { resp, err := t.client.Create(ctx, TableProperties{&name}, new(TableCreateOptions), new(QueryOptions)) if err == nil { tableResp := resp.(TableResponseResponse) @@ -50,7 +50,7 @@ func (t *TableServiceClient) Create(ctx context.Context, name string) (TableResp } // Delete deletes a table by name. -func (t *TableServiceClient) Delete(ctx context.Context, name string) (TableDeleteResponse, error) { +func (t *TableServiceClient) DeleteTable(ctx context.Context, name string) (TableDeleteResponse, error) { return t.client.Delete(ctx, name, nil) } @@ -72,7 +72,7 @@ func (t *TableServiceClient) Delete(ctx context.Context, name string) (TableDele // fmt.Printf("The page contains %i results.\n", len(resp.TableQueryResponse.Value)) // } // err := pager.Err() -func (t *TableServiceClient) List(listOptions *ListOptions) TableQueryResponsePager { +func (t *TableServiceClient) ListTables(listOptions *ListOptions) TableQueryResponsePager { return &tableQueryResponsePager{ client: t.client, queryOptions: listOptions, diff --git a/sdk/tables/aztable/table_service_client_test.go b/sdk/tables/aztable/table_service_client_test.go index 2901381d6c6c..7a05d697dee2 100644 --- a/sdk/tables/aztable/table_service_client_test.go +++ b/sdk/tables/aztable/table_service_client_test.go @@ -40,9 +40,9 @@ func (s *tableServiceClientLiveTests) TestServiceErrors() { tableName, err := getTableName(context) require.NoError(err) - _, err = context.client.Create(ctx, tableName) + _, err = context.client.CreateTable(ctx, tableName) delete := func() { - _, err := context.client.Delete(ctx, tableName) + _, err := context.client.DeleteTable(ctx, tableName) if err != nil { fmt.Printf("Error cleaning up test. %v\n", err.Error()) } @@ -51,7 +51,7 @@ func (s *tableServiceClientLiveTests) TestServiceErrors() { require.NoError(err) // Create a duplicate table to produce an error - _, err = context.client.Create(ctx, tableName) + _, err = context.client.CreateTable(ctx, tableName) var svcErr *runtime.ResponseError errors.As(err, &svcErr) require.Equal(svcErr.RawResponse().StatusCode, http.StatusConflict) @@ -63,9 +63,9 @@ func (s *tableServiceClientLiveTests) TestCreateTable() { tableName, err := getTableName(context) require.NoError(err) - resp, err := context.client.Create(ctx, tableName) + resp, err := context.client.CreateTable(ctx, tableName) delete := func() { - _, err := context.client.Delete(ctx, tableName) + _, err := context.client.DeleteTable(ctx, tableName) if err != nil { fmt.Printf("Error cleaning up test. %v\n", err.Error()) } @@ -94,13 +94,13 @@ func (s *tableServiceClientLiveTests) TestQueryTable() { name, _ := getTableName(context, prefix2) tableNames[i] = name } - _, err := context.client.Create(ctx, tableNames[i]) + _, err := context.client.CreateTable(ctx, tableNames[i]) require.NoError(err) } // Query for tables with no pagination. The filter should exclude one table from the results filter := fmt.Sprintf("TableName ge '%s' and TableName lt '%s'", prefix1, prefix2) - pager := context.client.List(&ListOptions{Filter: &filter}) + pager := context.client.ListTables(&ListOptions{Filter: &filter}) resultCount := 0 for pager.NextPage(ctx) { @@ -113,7 +113,7 @@ func (s *tableServiceClientLiveTests) TestQueryTable() { // Query for tables with pagination top := int32(2) - pager = context.client.List(&ListOptions{Filter: &filter, Top: &top}) + pager = context.client.ListTables(&ListOptions{Filter: &filter, Top: &top}) resultCount = 0 pageCount := 0 @@ -129,11 +129,11 @@ func (s *tableServiceClientLiveTests) TestQueryTable() { } func clearAllTables(context *testContext) error { - pager := context.client.List(nil) + pager := context.client.ListTables(nil) for pager.NextPage(ctx) { resp := pager.PageResponse() for _, v := range resp.TableQueryResponse.Value { - _, err := context.client.Delete(ctx, *v.TableName) + _, err := context.client.DeleteTable(ctx, *v.TableName) if err != nil { return err } @@ -152,12 +152,12 @@ func (s *tableServiceClientLiveTests) TestListTables() { require.NoError(err) for i := 0; i < 5; i++ { - _, err := context.client.Create(ctx, fmt.Sprintf("%v%v", tableName, i)) + _, err := context.client.CreateTable(ctx, fmt.Sprintf("%v%v", tableName, i)) require.NoError(err) } count := 0 - pager := context.client.List(nil) + pager := context.client.ListTables(nil) for pager.NextPage(ctx) { resp := pager.PageResponse() count += len(resp.TableQueryResponse.Value) diff --git a/sdk/tables/aztable/zt_table_recorded_tests.go b/sdk/tables/aztable/zt_table_recorded_tests.go index f784f551e308..375d8037c7dd 100644 --- a/sdk/tables/aztable/zt_table_recorded_tests.go +++ b/sdk/tables/aztable/zt_table_recorded_tests.go @@ -126,10 +126,10 @@ func insertNEntities(pk string, n int, client *TableClient) error { func cleanupTables(context *testContext, tables *[]string) { c := context.client if tables == nil { - pager := c.List(nil) + pager := c.ListTables(nil) for pager.NextPage(ctx) { for _, t := range pager.PageResponse().TableQueryResponse.Value { - _, err := c.Delete(ctx, *t.TableName) + _, err := c.DeleteTable(ctx, *t.TableName) if err != nil { fmt.Printf("Error cleaning up tables. %v\n", err.Error()) } @@ -137,7 +137,7 @@ func cleanupTables(context *testContext, tables *[]string) { } } else { for _, t := range *tables { - _, err := c.Delete(ctx, t) + _, err := c.DeleteTable(ctx, t) if err != nil { fmt.Printf("There was an error cleaning up tests. %v\n", err.Error()) } From 4723b6dd9de1bb864b78a174cb5d3473dc18429a Mon Sep 17 00:00:00 2001 From: Sean Kane <68240067+seankane-msft@users.noreply.github.com> Date: Tue, 3 Aug 2021 13:02:47 -0400 Subject: [PATCH 32/42] [Tables] Architect Feedback (#15196) * architect feedback * docstrings * feedback * fixing eng pipelines * figuring out pipeline failure * missing recording * restore eng changes --- eng/pipelines/templates/steps/build-test.yml | 4 +- .../TestAddEntity-variables.yaml | 2 +- .../TestTableClient_Cosmos/TestAddEntity.yaml | 34 +-- .../TestInsertEntity-variables.yaml | 5 + .../TestInsertEntity.yaml | 211 ++++++++++++++ .../TestAddEntity-variables.yaml | 2 +- .../TestAddEntity.yaml | 34 +-- .../TestInsertEntity-variables.yaml | 5 + .../TestInsertEntity.yaml | 263 ++++++++++++++++++ sdk/tables/aztable/table_client.go | 35 +-- sdk/tables/aztable/table_client_test.go | 10 +- sdk/tables/aztable/table_service_client.go | 7 +- .../aztable/table_service_client_test.go | 6 +- sdk/tables/aztable/zt_table_recorded_tests.go | 4 +- 14 files changed, 555 insertions(+), 67 deletions(-) create mode 100644 sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestInsertEntity-variables.yaml create mode 100644 sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestInsertEntity.yaml create mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestInsertEntity-variables.yaml create mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestInsertEntity.yaml diff --git a/eng/pipelines/templates/steps/build-test.yml b/eng/pipelines/templates/steps/build-test.yml index 9d2b6112c9c3..1914a3db6776 100644 --- a/eng/pipelines/templates/steps/build-test.yml +++ b/eng/pipelines/templates/steps/build-test.yml @@ -44,8 +44,8 @@ steps: $testDirs = (./eng/scripts/get_test_dirs.ps1 -serviceDir $(SCOPE)) foreach ($td in $testDirs) { pushd $td - Write-Host "##[command]Executing go test -run "^Test" -race -v -coverprofile coverage.txt -covermode atomic $td | go-junit-report -set-exit-code > report.xml" - go test -run "^Test" -race -v -coverprofile coverage.txt -covermode atomic . | go-junit-report -set-exit-code > report.xml + Write-Host "##[command]Executing go test -run "^Test" -v -coverprofile coverage.txt $td | go-junit-report -set-exit-code > report.xml" + go test -run "^Test" -v -coverprofile coverage.txt . | go-junit-report -set-exit-code > report.xml # if no tests were actually run (e.g. examples) delete the coverage file so it's omitted from the coverage report if (Select-String -path ./report.xml -pattern '' -simplematch -quiet) { Write-Host "##[command]Deleting empty coverage file" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddEntity-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddEntity-variables.yaml index 896c961b3a71..280bddb58661 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddEntity-variables.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddEntity-variables.yaml @@ -2,4 +2,4 @@ COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com TABLES_COSMOS_ACCOUNT_NAME: seankaneprim TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== -randomSeed: "1627334286" +randomSeed: "1628004298" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddEntity.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddEntity.yaml index dbf22d65b3d2..d435932ce9f8 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddEntity.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddEntity.yaml @@ -2,7 +2,7 @@ version: 1 interactions: - request: - body: '{"TableName":"gotable74vbfumji7tiq"}' + body: '{"TableName":"gotable8jdoawmoqnmjx"}' form: {} headers: Accept: @@ -19,24 +19,24 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Mon, 26 Jul 2021 21:18:06 GMT + - Tue, 03 Aug 2021 15:24:58 GMT X-Ms-Version: - "2019-02-02" url: https://seankaneprim.table.cosmos.azure.com/Tables method: POST response: - body: '{"TableName":"gotable74vbfumji7tiq","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' + body: '{"TableName":"gotable8jdoawmoqnmjx","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' headers: Content-Type: - application/json;odata=minimalmetadata Date: - - Mon, 26 Jul 2021 21:18:06 GMT + - Tue, 03 Aug 2021 15:24:59 GMT Etag: - - W/"datetime'2021-07-26T21%3A18%3A06.8679688Z'" + - W/"datetime'2021-08-03T15%3A24%3A58.8577800Z'" Location: - - https://seankaneprim.table.cosmos.azure.com/Tables('gotable74vbfumji7tiq') + - https://seankaneprim.table.cosmos.azure.com/Tables('gotable8jdoawmoqnmjx') X-Ms-Request-Id: - - f8c51d05-a8f8-475b-a633-ed7b61de14e7 + - a30ff87f-cef8-47ce-8c48-ad2346793917 status: 201 Created code: 201 duration: "" @@ -61,24 +61,24 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Mon, 26 Jul 2021 21:18:07 GMT + - Tue, 03 Aug 2021 15:24:59 GMT X-Ms-Version: - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotable74vbfumji7tiq + url: https://seankaneprim.table.cosmos.azure.com/gotable8jdoawmoqnmjx method: POST response: body: "" headers: Date: - - Mon, 26 Jul 2021 21:18:06 GMT + - Tue, 03 Aug 2021 15:24:59 GMT Etag: - - W/"datetime'2021-07-26T21%3A18%3A07.5371528Z'" + - W/"datetime'2021-08-03T15%3A24%3A59.4564104Z'" Location: - - https://seankaneprim.table.cosmos.azure.com/gotable74vbfumji7tiq(PartitionKey='partition',RowKey='1') + - https://seankaneprim.table.cosmos.azure.com/gotable8jdoawmoqnmjx(PartitionKey='partition',RowKey='1') Preference-Applied: - return-no-content X-Ms-Request-Id: - - 5e25c2bf-0b1d-45af-818e-925b1a37befc + - 06beab79-39a9-4993-a968-06d3f136a344 status: 204 No Content code: 204 duration: "" @@ -94,18 +94,18 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Mon, 26 Jul 2021 21:18:07 GMT + - Tue, 03 Aug 2021 15:25:00 GMT X-Ms-Version: - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/Tables('gotable74vbfumji7tiq') + url: https://seankaneprim.table.cosmos.azure.com/Tables('gotable8jdoawmoqnmjx') method: DELETE response: body: "" headers: Date: - - Mon, 26 Jul 2021 21:18:07 GMT + - Tue, 03 Aug 2021 15:24:59 GMT X-Ms-Request-Id: - - c122c25b-6d80-4f88-bab3-ff8ac231f138 + - 6e7e902c-1981-4d2c-ac90-954bd3cc5371 status: 204 No Content code: 204 duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestInsertEntity-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestInsertEntity-variables.yaml new file mode 100644 index 000000000000..67f6975bb6d5 --- /dev/null +++ b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestInsertEntity-variables.yaml @@ -0,0 +1,5 @@ +--- +COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com +TABLES_COSMOS_ACCOUNT_NAME: seankaneprim +TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== +randomSeed: "1627676807" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestInsertEntity.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestInsertEntity.yaml new file mode 100644 index 000000000000..e75a1780a3ad --- /dev/null +++ b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestInsertEntity.yaml @@ -0,0 +1,211 @@ +--- +version: 1 +interactions: +- request: + body: '{"TableName":"gotablex11b3nqe5r4hg"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "36" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Fri, 30 Jul 2021 20:26:47 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.cosmos.azure.com/Tables + method: POST + response: + body: '{"TableName":"gotablex11b3nqe5r4hg","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' + headers: + Content-Type: + - application/json;odata=minimalmetadata + Date: + - Fri, 30 Jul 2021 20:26:49 GMT + Etag: + - W/"datetime'2021-07-30T20%3A26%3A49.6224264Z'" + Location: + - https://seankaneprim.table.cosmos.azure.com/Tables('gotablex11b3nqe5r4hg') + X-Ms-Request-Id: + - 8c5d0025-6b93-4bef-8821-77e025cea69e + status: 201 Created + code: 201 + duration: "" +- request: + body: '{"Bool":true,"Integer":1,"PartitionKey":"partition","RowKey":"1","String":"some + string 1","Timestamp":"0001-01-01T00:00:00Z"}' + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + Content-Length: + - "125" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Fri, 30 Jul 2021 20:26:49 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.cosmos.azure.com/gotablex11b3nqe5r4hg(PartitionKey='partition',RowKey='1') + method: PUT + response: + body: "" + headers: + Content-Type: + - application/json + Date: + - Fri, 30 Jul 2021 20:26:50 GMT + Etag: + - W/"datetime'2021-07-30T20%3A26%3A50.3232520Z'" + X-Ms-Request-Id: + - 01020bfe-503c-40aa-bd90-9eb243ec8faf + status: 204 No Content + code: 204 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Fri, 30 Jul 2021 20:26:49 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.cosmos.azure.com/gotablex11b3nqe5r4hg(PartitionKey='partition',RowKey='1') + method: GET + response: + body: '{"odata.metadata":"https://seankaneprim.table.cosmos.azure.com/gotablex11b3nqe5r4hg/$metadata#gotablex11b3nqe5r4hg/@Element","odata.etag":"W/\"datetime''2021-07-30T20%3A26%3A50.3232520Z''\"","PartitionKey":"partition","RowKey":"1","Bool":true,"Integer":1,"String":"some + string 1","Timestamp":"2021-07-30T20:26:50.3232520Z"}' + headers: + Content-Type: + - application/json;odata=minimalmetadata + Date: + - Fri, 30 Jul 2021 20:26:50 GMT + Etag: + - W/"datetime'2021-07-30T20%3A26%3A50.3232520Z'" + X-Ms-Request-Id: + - d2129f32-414f-491a-a2ab-f6c4ca87dfcc + status: 200 OK + code: 200 + duration: "" +- request: + body: '{"Integer":1,"MergeProperty":"foo","PartitionKey":"partition","RowKey":"1","String":"some + string 1"}' + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + Content-Length: + - "100" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Fri, 30 Jul 2021 20:26:49 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.cosmos.azure.com/gotablex11b3nqe5r4hg(PartitionKey='partition',RowKey='1') + method: PUT + response: + body: "" + headers: + Content-Type: + - application/json + Date: + - Fri, 30 Jul 2021 20:26:50 GMT + Etag: + - W/"datetime'2021-07-30T20%3A26%3A50.6126344Z'" + X-Ms-Request-Id: + - 748608bf-0011-4f92-b37d-bac60664069d + status: 204 No Content + code: 204 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Fri, 30 Jul 2021 20:26:49 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.cosmos.azure.com/gotablex11b3nqe5r4hg()?%24filter=RowKey+eq+%271%27 + method: GET + response: + body: '{"value":[{"odata.etag":"W/\"datetime''2021-07-30T20%3A26%3A50.6126344Z''\"","PartitionKey":"partition","RowKey":"1","Integer":1,"MergeProperty":"foo","String":"some + string 1","Timestamp":"2021-07-30T20:26:50.6126344Z"}],"odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#gotablex11b3nqe5r4hg"}' + headers: + Content-Type: + - application/json;odata=minimalmetadata + Date: + - Fri, 30 Jul 2021 20:26:50 GMT + X-Ms-Request-Id: + - e306607f-7f86-42ea-a447-920b722189c2 + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Fri, 30 Jul 2021 20:26:49 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.cosmos.azure.com/Tables('gotablex11b3nqe5r4hg') + method: DELETE + response: + body: "" + headers: + Date: + - Fri, 30 Jul 2021 20:26:50 GMT + X-Ms-Request-Id: + - be2036f9-dec7-4bdd-8af2-6024832c067f + status: 204 No Content + code: 204 + duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestAddEntity-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestAddEntity-variables.yaml index 1ad415da464b..4e5a52d72a54 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestAddEntity-variables.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestAddEntity-variables.yaml @@ -2,4 +2,4 @@ STORAGE_ENDPOINT_SUFFIX: core.windows.net TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== TABLES_STORAGE_ACCOUNT_NAME: seankaneprim -randomSeed: "1626385851" +randomSeed: "1628004297" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestAddEntity.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestAddEntity.yaml index 023a1b79f7dc..b146352f7072 100644 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestAddEntity.yaml +++ b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestAddEntity.yaml @@ -2,7 +2,7 @@ version: 1 interactions: - request: - body: '{"TableName":"gotable71ug01elhk9wn"}' + body: '{"TableName":"gotabled7jd6vj608h1o"}' form: {} headers: Accept: @@ -19,28 +19,28 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:50:51 GMT + - Tue, 03 Aug 2021 15:24:57 GMT X-Ms-Version: - "2019-02-02" url: https://seankaneprim.table.core.windows.net/Tables method: POST response: - body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotable71ug01elhk9wn"}' + body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotabled7jd6vj608h1o"}' headers: Cache-Control: - no-cache Content-Type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 Date: - - Thu, 15 Jul 2021 21:50:51 GMT + - Tue, 03 Aug 2021 15:24:56 GMT Location: - - https://seankaneprim.table.core.windows.net/Tables('gotable71ug01elhk9wn') + - https://seankaneprim.table.core.windows.net/Tables('gotabled7jd6vj608h1o') Server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 X-Content-Type-Options: - nosniff X-Ms-Request-Id: - - 985cf67b-f002-008a-26c3-79b3c4000000 + - 4fc78663-9002-0068-277b-888ee5000000 X-Ms-Version: - "2019-02-02" status: 201 Created @@ -67,10 +67,10 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:50:52 GMT + - Tue, 03 Aug 2021 15:24:57 GMT X-Ms-Version: - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/gotable71ug01elhk9wn + url: https://seankaneprim.table.core.windows.net/gotabled7jd6vj608h1o method: POST response: body: "" @@ -80,13 +80,13 @@ interactions: Content-Length: - "0" Dataserviceid: - - https://seankaneprim.table.core.windows.net/gotable71ug01elhk9wn(PartitionKey='partition',RowKey='1') + - https://seankaneprim.table.core.windows.net/gotabled7jd6vj608h1o(PartitionKey='partition',RowKey='1') Date: - - Thu, 15 Jul 2021 21:50:51 GMT + - Tue, 03 Aug 2021 15:24:56 GMT Etag: - - W/"datetime'2021-07-15T21%3A50%3A51.4773752Z'" + - W/"datetime'2021-08-03T15%3A24%3A57.081626Z'" Location: - - https://seankaneprim.table.core.windows.net/gotable71ug01elhk9wn(PartitionKey='partition',RowKey='1') + - https://seankaneprim.table.core.windows.net/gotabled7jd6vj608h1o(PartitionKey='partition',RowKey='1') Preference-Applied: - return-no-content Server: @@ -94,7 +94,7 @@ interactions: X-Content-Type-Options: - nosniff X-Ms-Request-Id: - - 985cf6ca-f002-008a-73c3-79b3c4000000 + - 4fc7868c-9002-0068-4c7b-888ee5000000 X-Ms-Version: - "2019-02-02" status: 204 No Content @@ -112,10 +112,10 @@ interactions: - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) X-Ms-Date: - - Thu, 15 Jul 2021 21:50:52 GMT + - Tue, 03 Aug 2021 15:24:57 GMT X-Ms-Version: - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/Tables('gotable71ug01elhk9wn') + url: https://seankaneprim.table.core.windows.net/Tables('gotabled7jd6vj608h1o') method: DELETE response: body: "" @@ -125,13 +125,13 @@ interactions: Content-Length: - "0" Date: - - Thu, 15 Jul 2021 21:50:51 GMT + - Tue, 03 Aug 2021 15:24:56 GMT Server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 X-Content-Type-Options: - nosniff X-Ms-Request-Id: - - 985cf6f0-f002-008a-16c3-79b3c4000000 + - 4fc786bb-9002-0068-767b-888ee5000000 X-Ms-Version: - "2019-02-02" status: 204 No Content diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestInsertEntity-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestInsertEntity-variables.yaml new file mode 100644 index 000000000000..4454e3872726 --- /dev/null +++ b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestInsertEntity-variables.yaml @@ -0,0 +1,5 @@ +--- +STORAGE_ENDPOINT_SUFFIX: core.windows.net +TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== +TABLES_STORAGE_ACCOUNT_NAME: seankaneprim +randomSeed: "1627676806" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestInsertEntity.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestInsertEntity.yaml new file mode 100644 index 000000000000..3fb4e62a7d2c --- /dev/null +++ b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestInsertEntity.yaml @@ -0,0 +1,263 @@ +--- +version: 1 +interactions: +- request: + body: '{"TableName":"gotableluvvxisl8eckq"}' + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Content-Length: + - "36" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Fri, 30 Jul 2021 20:26:46 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/Tables + method: POST + response: + body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotableluvvxisl8eckq"}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + Date: + - Fri, 30 Jul 2021 20:26:46 GMT + Location: + - https://seankaneprim.table.core.windows.net/Tables('gotableluvvxisl8eckq') + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - 32a4a100-c002-0038-2581-854cb5000000 + X-Ms-Version: + - "2019-02-02" + status: 201 Created + code: 201 + duration: "" +- request: + body: '{"Bool":true,"Integer":1,"PartitionKey":"partition","RowKey":"1","String":"some + string 1","Timestamp":"0001-01-01T00:00:00Z"}' + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + Content-Length: + - "125" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Fri, 30 Jul 2021 20:26:46 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/gotableluvvxisl8eckq(PartitionKey='partition',RowKey='1') + method: PUT + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Date: + - Fri, 30 Jul 2021 20:26:46 GMT + Etag: + - W/"datetime'2021-07-30T20%3A26%3A47.7916491Z'" + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - 32a4a12c-c002-0038-4b81-854cb5000000 + X-Ms-Version: + - "2019-02-02" + status: 204 No Content + code: 204 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Fri, 30 Jul 2021 20:26:46 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/gotableluvvxisl8eckq(PartitionKey='partition',RowKey='1') + method: GET + response: + body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#gotableluvvxisl8eckq/@Element","odata.etag":"W/\"datetime''2021-07-30T20%3A26%3A47.7916491Z''\"","PartitionKey":"partition","RowKey":"1","Timestamp":"2021-07-30T20:26:47.7916491Z","Bool":true,"Integer":1,"String":"some + string 1"}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + Date: + - Fri, 30 Jul 2021 20:26:46 GMT + Etag: + - W/"datetime'2021-07-30T20%3A26%3A47.7916491Z'" + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + Vary: + - Origin + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - 32a4a15c-c002-0038-7981-854cb5000000 + X-Ms-Version: + - "2019-02-02" + status: 200 OK + code: 200 + duration: "" +- request: + body: '{"Integer":1,"MergeProperty":"foo","PartitionKey":"partition","RowKey":"1","String":"some + string 1"}' + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + Content-Length: + - "100" + Content-Type: + - application/json + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Fri, 30 Jul 2021 20:26:46 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/gotableluvvxisl8eckq(PartitionKey='partition',RowKey='1') + method: PUT + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Date: + - Fri, 30 Jul 2021 20:26:47 GMT + Etag: + - W/"datetime'2021-07-30T20%3A26%3A48.0058009Z'" + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - 32a4a18b-c002-0038-2581-854cb5000000 + X-Ms-Version: + - "2019-02-02" + status: 204 No Content + code: 204 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json;odata=minimalmetadata + Authorization: + - sanitized + Dataserviceversion: + - "3.0" + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Fri, 30 Jul 2021 20:26:47 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/gotableluvvxisl8eckq()?%24filter=RowKey+eq+%271%27 + method: GET + response: + body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#gotableluvvxisl8eckq","value":[{"odata.etag":"W/\"datetime''2021-07-30T20%3A26%3A48.0058009Z''\"","PartitionKey":"partition","RowKey":"1","Timestamp":"2021-07-30T20:26:48.0058009Z","Integer":1,"MergeProperty":"foo","String":"some + string 1"}]}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + Date: + - Fri, 30 Jul 2021 20:26:47 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + Vary: + - Origin + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - 32a4a1c7-c002-0038-5d81-854cb5000000 + X-Ms-Version: + - "2019-02-02" + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Authorization: + - sanitized + User-Agent: + - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; + Windows_NT) + X-Ms-Date: + - Fri, 30 Jul 2021 20:26:47 GMT + X-Ms-Version: + - "2019-02-02" + url: https://seankaneprim.table.core.windows.net/Tables('gotableluvvxisl8eckq') + method: DELETE + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Date: + - Fri, 30 Jul 2021 20:26:47 GMT + Server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + X-Content-Type-Options: + - nosniff + X-Ms-Request-Id: + - 32a4a1f0-c002-0038-0581-854cb5000000 + X-Ms-Version: + - "2019-02-02" + status: 204 No Content + code: 204 + duration: "" diff --git a/sdk/tables/aztable/table_client.go b/sdk/tables/aztable/table_client.go index 2cf499734525..ec4c6ab7af10 100644 --- a/sdk/tables/aztable/table_client.go +++ b/sdk/tables/aztable/table_client.go @@ -19,11 +19,11 @@ type TableClient struct { Name string } -type TableUpdateMode string +type EntityUpdateMode string const ( - Replace TableUpdateMode = "replace" - Merge TableUpdateMode = "merge" + ReplaceEntity EntityUpdateMode = "replace" + MergeEntity EntityUpdateMode = "merge" ) // NewTableClient creates a TableClient struct in the context of the table specified in tableName, using the specified serviceURL, credential, and options. @@ -38,8 +38,8 @@ func (t *TableClient) Create(ctx context.Context) (TableResponseResponse, error) } // Delete deletes the table with the tableName specified when NewTableClient was called. -func (t *TableClient) Delete(ctx context.Context) (TableDeleteResponse, error) { - return t.service.DeleteTable(ctx, t.Name) +func (t *TableClient) Delete(ctx context.Context, options *TableDeleteOptions) (TableDeleteResponse, error) { + return t.service.DeleteTable(ctx, t.Name, options) } // List queries the entities using the specified ListOptions. @@ -82,8 +82,8 @@ func (t *TableClient) GetEntity(ctx context.Context, partitionKey string, rowKey return newByteArrayResponse(resp) } -// AddEntity adds an entity from an arbitrary interface value to the table. -// An entity must be a byte slice ([]byte) that can be json.Marshalled into a map[string]interface{} +// AddEntity adds an entity (described by a JSON byte slice) to the table. This method returns an error if an entity with +// the same PartitionKey and RowKey already exists in the table. func (t *TableClient) AddEntity(ctx context.Context, entity []byte) (interface{}, error) { var mapEntity map[string]interface{} err := json.Unmarshal(entity, &mapEntity) @@ -114,7 +114,7 @@ func (t *TableClient) DeleteEntity(ctx context.Context, partitionKey string, row // If updateMode is Merge, the property values present in the specified entity will be merged with the existing entity. Properties not specified in the merge will be unaffected. // The specified etag value will be used for optimistic concurrency. If the etag does not match the value of the entity in the table, the operation will fail. // The response type will be TableEntityMergeResponse if updateMode is Merge and TableEntityUpdateResponse if updateMode is Replace. -func (t *TableClient) UpdateEntity(ctx context.Context, entity []byte, etag *string, updateMode TableUpdateMode) (interface{}, error) { +func (t *TableClient) UpdateEntity(ctx context.Context, entity []byte, etag *string, updateMode EntityUpdateMode) (interface{}, error) { var ifMatch string = "*" if etag != nil { ifMatch = *etag @@ -133,18 +133,19 @@ func (t *TableClient) UpdateEntity(ctx context.Context, entity []byte, etag *str rowkey := rk.(string) switch updateMode { - case Merge: + case MergeEntity: return t.client.MergeEntity(ctx, t.Name, partKey, rowkey, &TableMergeEntityOptions{IfMatch: &ifMatch, TableEntityProperties: mapEntity}, &QueryOptions{}) - case Replace: + case ReplaceEntity: return t.client.UpdateEntity(ctx, t.Name, partKey, rowkey, &TableUpdateEntityOptions{IfMatch: &ifMatch, TableEntityProperties: mapEntity}, &QueryOptions{}) } - return nil, errors.New("Invalid TableUpdateMode") + return nil, errors.New("Invalid EntityUpdateMode") } -// UpsertEntity replaces the specified table entity if it exists or creates the entity if it does not exist. -// If the entity exists and updateMode is Merge, the property values present in the specified entity will be merged with the existing entity rather than replaced. +// InsertEntity inserts an entity if it does not already exist in the table. If the entity does exist, the entity is +// replaced or merged as specified the updateMode parameter. If the entity exists and updateMode is Merge, the property +// values present in the specified entity will be merged with the existing entity rather than replaced. // The response type will be TableEntityMergeResponse if updateMode is Merge and TableEntityUpdateResponse if updateMode is Replace. -func (t *TableClient) UpsertEntity(ctx context.Context, entity []byte, updateMode TableUpdateMode) (interface{}, error) { +func (t *TableClient) InsertEntity(ctx context.Context, entity []byte, updateMode EntityUpdateMode) (interface{}, error) { var mapEntity map[string]interface{} err := json.Unmarshal(entity, &mapEntity) if err != nil { @@ -158,12 +159,12 @@ func (t *TableClient) UpsertEntity(ctx context.Context, entity []byte, updateMod rowkey := rk.(string) switch updateMode { - case Merge: + case MergeEntity: return t.client.MergeEntity(ctx, t.Name, partKey, rowkey, &TableMergeEntityOptions{TableEntityProperties: mapEntity}, &QueryOptions{}) - case Replace: + case ReplaceEntity: return t.client.UpdateEntity(ctx, t.Name, partKey, rowkey, &TableUpdateEntityOptions{TableEntityProperties: mapEntity}, &QueryOptions{}) } - return nil, errors.New("Invalid TableUpdateMode") + return nil, errors.New("Invalid EntityUpdateMode") } // GetAccessPolicy retrieves details about any stored access policies specified on the table that may be used with the Shared Access Signature diff --git a/sdk/tables/aztable/table_client_test.go b/sdk/tables/aztable/table_client_test.go index 0c2f31f3c6e9..0605eb42eec2 100644 --- a/sdk/tables/aztable/table_client_test.go +++ b/sdk/tables/aztable/table_client_test.go @@ -134,7 +134,7 @@ func (s *tableClientLiveTests) TestMergeEntity() { reMarshalled, err := json.Marshal(mapEntity) require.NoError(err) - _, updateErr := client.UpdateEntity(ctx, reMarshalled, nil, Merge) + _, updateErr := client.UpdateEntity(ctx, reMarshalled, nil, MergeEntity) require.Nil(updateErr) var qResp TableEntityQueryByteResponseResponse @@ -154,7 +154,7 @@ func (s *tableClientLiveTests) TestMergeEntity() { require.False(ok) } -func (s *tableClientLiveTests) TestUpsertEntity() { +func (s *tableClientLiveTests) TestInsertEntity() { require := require.New(s.T()) client, delete := s.init(true) defer delete() @@ -163,7 +163,7 @@ func (s *tableClientLiveTests) TestUpsertEntity() { entityToCreate := createSimpleEntity(1, "partition") marshalled := marshalBasicEntity(entityToCreate, require) - _, err := client.UpsertEntity(ctx, *marshalled, Replace) + _, err := client.InsertEntity(ctx, *marshalled, ReplaceEntity) require.NoError(err) filter := "RowKey eq '1'" @@ -184,7 +184,7 @@ func (s *tableClientLiveTests) TestUpsertEntity() { reMarshalled, err := json.Marshal(mapEntity) // 4. Replace Entity with "bool"-less entity - _, err = client.UpsertEntity(ctx, reMarshalled, Replace) + _, err = client.InsertEntity(ctx, reMarshalled, ReplaceEntity) require.Nil(err) // 5. Query for new entity @@ -336,7 +336,7 @@ func (s *tableClientLiveTests) init(createTable bool) (*TableClient, func()) { } } return client, func() { - _, err := client.Delete(ctx) + _, err := client.Delete(ctx, nil) if err != nil { fmt.Printf("Error deleting table. %v\n", err.Error()) } diff --git a/sdk/tables/aztable/table_service_client.go b/sdk/tables/aztable/table_service_client.go index 62cf9720f263..78d2f4453c96 100644 --- a/sdk/tables/aztable/table_service_client.go +++ b/sdk/tables/aztable/table_service_client.go @@ -50,8 +50,11 @@ func (t *TableServiceClient) CreateTable(ctx context.Context, name string) (Tabl } // Delete deletes a table by name. -func (t *TableServiceClient) DeleteTable(ctx context.Context, name string) (TableDeleteResponse, error) { - return t.client.Delete(ctx, name, nil) +func (t *TableServiceClient) DeleteTable(ctx context.Context, name string, options *TableDeleteOptions) (TableDeleteResponse, error) { + if options == nil { + options = &TableDeleteOptions{} + } + return t.client.Delete(ctx, name, options) } // List queries the existing tables using the specified ListOptions. diff --git a/sdk/tables/aztable/table_service_client_test.go b/sdk/tables/aztable/table_service_client_test.go index 7a05d697dee2..14aa855b3c0e 100644 --- a/sdk/tables/aztable/table_service_client_test.go +++ b/sdk/tables/aztable/table_service_client_test.go @@ -42,7 +42,7 @@ func (s *tableServiceClientLiveTests) TestServiceErrors() { _, err = context.client.CreateTable(ctx, tableName) delete := func() { - _, err := context.client.DeleteTable(ctx, tableName) + _, err := context.client.DeleteTable(ctx, tableName, nil) if err != nil { fmt.Printf("Error cleaning up test. %v\n", err.Error()) } @@ -65,7 +65,7 @@ func (s *tableServiceClientLiveTests) TestCreateTable() { resp, err := context.client.CreateTable(ctx, tableName) delete := func() { - _, err := context.client.DeleteTable(ctx, tableName) + _, err := context.client.DeleteTable(ctx, tableName, nil) if err != nil { fmt.Printf("Error cleaning up test. %v\n", err.Error()) } @@ -133,7 +133,7 @@ func clearAllTables(context *testContext) error { for pager.NextPage(ctx) { resp := pager.PageResponse() for _, v := range resp.TableQueryResponse.Value { - _, err := context.client.DeleteTable(ctx, *v.TableName) + _, err := context.client.DeleteTable(ctx, *v.TableName, nil) if err != nil { return err } diff --git a/sdk/tables/aztable/zt_table_recorded_tests.go b/sdk/tables/aztable/zt_table_recorded_tests.go index 375d8037c7dd..9f3824aa90d9 100644 --- a/sdk/tables/aztable/zt_table_recorded_tests.go +++ b/sdk/tables/aztable/zt_table_recorded_tests.go @@ -129,7 +129,7 @@ func cleanupTables(context *testContext, tables *[]string) { pager := c.ListTables(nil) for pager.NextPage(ctx) { for _, t := range pager.PageResponse().TableQueryResponse.Value { - _, err := c.DeleteTable(ctx, *t.TableName) + _, err := c.DeleteTable(ctx, *t.TableName, nil) if err != nil { fmt.Printf("Error cleaning up tables. %v\n", err.Error()) } @@ -137,7 +137,7 @@ func cleanupTables(context *testContext, tables *[]string) { } } else { for _, t := range *tables { - _, err := c.DeleteTable(ctx, t) + _, err := c.DeleteTable(ctx, t, nil) if err != nil { fmt.Printf("There was an error cleaning up tests. %v\n", err.Error()) } From 4aa5a96dbb355f530597e8eb7b9f2fa14a78d02e Mon Sep 17 00:00:00 2001 From: Sean Kane <68240067+seankane-msft@users.noreply.github.com> Date: Thu, 12 Aug 2021 13:27:13 -0400 Subject: [PATCH 33/42] [EngSys] Test proxy (#15101) --- eng/pipelines/templates/steps/build-test.yml | 24 +- .../templates/steps/configure-proxy.yml | 22 + eng/scripts/start-server.ps1 | 66 ++ sdk/internal/recording/recording.go | 274 +++++++ sdk/tables/aztable/entity_test.go | 178 ++--- sdk/tables/aztable/go.mod | 2 + sdk/tables/aztable/go.sum | 8 + sdk/tables/aztable/proxy_test.go | 237 ++++++ .../TestAddBasicEntity_cosmos.json | 175 +++++ .../TestAddBasicEntity_storage.json | 214 ++++++ .../TestAddComplexEntity_cosmos.json | 103 +++ .../TestAddComplexEntity_storage.json | 126 ++++ .../TestAddEntity/TestAddEntity_cosmos.json | 100 +++ .../TestAddEntity/TestAddEntity_storage.json | 123 +++ .../TestBatchAdd/TestBatchAdd_cosmos.json | 241 ++++++ .../TestBatchAdd/TestBatchAdd_storage.json | 270 +++++++ .../TestBatchComplex_cosmos.json | 237 ++++++ .../TestBatchComplex_storage.json | 295 ++++++++ .../TestBatchError/TestBatchError_cosmos.json | 131 ++++ .../TestBatchError_storage.json | 161 ++++ .../TestBatchMixed/TestBatchMixed_cosmos.json | 204 +++++ .../TestBatchMixed_storage.json | 248 ++++++ .../TestCreateTable_cosmos.json | 63 ++ .../TestCreateTable_storage.json | 77 ++ .../TestCreateTableFromService_cosmos.json | 63 ++ .../TestCreateTableFromService_storage.json | 77 ++ .../TestDeleteEntity_cosmos.json | 125 +++ .../TestDeleteEntity_storage.json | 156 ++++ .../TestEdmMarshalling_cosmos.json | 153 ++++ .../TestEdmMarshalling_storage.json | 188 +++++ .../aztable/recordings/TestGetProperties.json | 36 + .../TestInvalidEntity_cosmos.json | 97 +++ .../TestInvalidEntity_storage.json | 125 +++ .../TestListTables/TestListTables_cosmos.json | 369 +++++++++ .../TestListTables_storage.json | 455 +++++++++++ .../TestMergeEntity_cosmos.json | 213 ++++++ .../TestMergeEntity_storage.json | 259 +++++++ .../TestQueryComplexEntity_cosmos.json | 341 +++++++++ .../TestQueryComplexEntity_storage.json | 408 ++++++++++ .../TestQuerySimpleEntity_cosmos.json | 314 ++++++++ .../TestQuerySimpleEntity_storage.json | 381 ++++++++++ .../TestQueryTable/TestQueryTable_cosmos.json | 485 ++++++++++++ .../TestQueryTable_storage.json | 557 ++++++++++++++ .../recordings/TestRetentionTooLong.json | 42 ++ .../TestCreateTable-variables.yaml | 5 - .../TestCreateTable.yaml | 75 -- .../TestGetProperties-variables.yaml | 4 - .../TestGetStatistics-variables.yaml | 4 - .../TestListTables-variables.yaml | 5 - .../TestListTables.yaml | 557 -------------- .../TestQueryTable-variables.yaml | 5 - .../TestQueryTable.yaml | 499 ------------ .../TestRetentionTooLong-variables.yaml | 4 - .../TestServiceErrors-variables.yaml | 5 - .../TestServiceErrors.yaml | 113 --- .../TestSetCors-variables.yaml | 4 - .../TestSetHoursMetrics-variables.yaml | 4 - .../TestSetLogging-variables.yaml | 4 - .../TestSetMinuteMetrics-variables.yaml | 4 - .../TestSetProperties-variables.yaml | 4 - .../TestSetTooManyCors-variables.yaml | 4 - .../TestCreateTable-variables.yaml | 5 - .../TestCreateTable.yaml | 85 --- .../TestGetProperties-variables.yaml | 4 - .../TestGetProperties.yaml | 36 - .../TestGetStatistics-variables.yaml | 4 - .../TestGetStatistics.yaml | 44 -- .../TestListTables-variables.yaml | 5 - .../TestListTables.yaml | 713 ------------------ .../TestQueryTable-variables.yaml | 5 - .../TestQueryTable.yaml | 532 ------------- .../TestRetentionTooLong-variables.yaml | 4 - .../TestRetentionTooLong.yaml | 47 -- .../TestServiceErrors-variables.yaml | 5 - .../TestServiceErrors.yaml | 129 ---- .../TestSetCors-variables.yaml | 4 - .../TestSetCors.yaml | 73 -- .../TestSetHoursMetrics-variables.yaml | 4 - .../TestSetHoursMetrics.yaml | 71 -- .../TestSetLogging-variables.yaml | 4 - .../TestSetLogging.yaml | 71 -- .../TestSetMinuteMetrics-variables.yaml | 4 - .../TestSetMinuteMetrics.yaml | 71 -- .../TestSetProperties-variables.yaml | 4 - .../TestSetProperties.yaml | 71 -- .../TestSetTooManyCors-variables.yaml | 4 - .../TestSetTooManyCors.yaml | 47 -- .../TestServiceErrors_cosmos.json | 95 +++ .../TestServiceErrors_storage.json | 122 +++ ...TestServiceErrorsServiceClient_cosmos.json | 95 +++ ...estServiceErrorsServiceClient_storage.json | 122 +++ .../recordings/TestSetAccessPolicy.json | 108 +++ .../aztable/recordings/TestSetCors.json | 67 ++ .../recordings/TestSetEmptyAccessPolicy.json | 107 +++ .../recordings/TestSetHoursMetrics.json | 67 ++ .../aztable/recordings/TestSetLogging.json | 67 ++ .../recordings/TestSetMinuteMetrics.json | 67 ++ .../TestSetMultipleAccessPolicies.json | 139 ++++ .../recordings/TestSetNullAccessPolicy.json | 139 ++++ .../TestSetTooManyAccessPolicies.json | 114 +++ .../recordings/TestSetTooManyCors.json | 42 ++ .../TestAddBasicEntity-variables.yaml | 5 - .../TestAddBasicEntity.yaml | 174 ----- .../TestAddComplexEntity-variables.yaml | 5 - .../TestAddComplexEntity.yaml | 110 --- .../TestAddEntity-variables.yaml | 5 - .../TestTableClient_Cosmos/TestAddEntity.yaml | 111 --- .../TestBatchAdd-variables.yaml | 5 - .../TestTableClient_Cosmos/TestBatchAdd.yaml | 216 ------ .../TestBatchComplex-variables.yaml | 5 - .../TestBatchComplex.yaml | 296 -------- .../TestBatchError-variables.yaml | 5 - .../TestBatchError.yaml | 161 ---- .../TestBatchMixed-variables.yaml | 5 - .../TestBatchMixed.yaml | 260 ------- .../TestCreateTable-variables.yaml | 5 - .../TestCreateTable.yaml | 69 -- .../TestDeleteEntity-variables.yaml | 5 - .../TestDeleteEntity.yaml | 142 ---- .../TestEdmMarshalling-variables.yaml | 5 - .../TestEdmMarshalling.yaml | 143 ---- .../TestInsertEntity-variables.yaml | 5 - .../TestInsertEntity.yaml | 211 ------ .../TestInvalidEntity-variables.yaml | 5 - .../TestInvalidEntity.yaml | 108 --- .../TestMergeEntity-variables.yaml | 5 - .../TestMergeEntity.yaml | 217 ------ .../TestQueryComplexEntity-variables.yaml | 5 - .../TestQueryComplexEntity.yaml | 305 -------- .../TestQuerySimpleEntity-variables.yaml | 5 - .../TestQuerySimpleEntity.yaml | 314 -------- .../TestServiceErrors-variables.yaml | 5 - .../TestServiceErrors.yaml | 105 --- .../TestSetAccessPolicy-variables.yaml | 4 - .../TestSetEmptyAccessPolicy-variables.yaml | 4 - ...stSetMultipleAccessPolicies-variables.yaml | 4 - .../TestSetNullAccessPolicy-variables.yaml | 4 - ...estSetTooManyAccessPolicies-variables.yaml | 4 - .../TestUpsertEntity-variables.yaml | 5 - .../TestUpsertEntity.yaml | 211 ------ .../TestAddAnnotatedEntity-variables.yaml | 5 - .../TestAddAnnotatedEntity.yaml | 218 ------ .../TestAddBasicEntity-variables.yaml | 5 - .../TestAddBasicEntity.yaml | 218 ------ .../TestAddComplexEntity-variables.yaml | 5 - .../TestAddComplexEntity.yaml | 138 ---- .../TestAddEntity-variables.yaml | 5 - .../TestAddEntity.yaml | 139 ---- .../TestBatchAdd-variables.yaml | 5 - .../TestTableClient_Storage/TestBatchAdd.yaml | 260 ------- .../TestBatchComplex-variables.yaml | 5 - .../TestBatchComplex.yaml | 366 --------- .../TestBatchError-variables.yaml | 5 - .../TestBatchError.yaml | 198 ----- .../TestBatchMixed-variables.yaml | 5 - .../TestBatchMixed.yaml | 320 -------- .../TestCreateTable-variables.yaml | 5 - .../TestCreateTable.yaml | 85 --- .../TestCustomEntity-variables.yaml | 5 - .../TestCustomEntity.yaml | 125 --- .../TestDeleteEntity-variables.yaml | 5 - .../TestDeleteEntity.yaml | 180 ----- .../TestEdmMarshalling-variables.yaml | 5 - .../TestEdmMarshalling.yaml | 179 ----- .../TestGetAccessPolicy-variables.yaml | 5 - .../TestGetAccessPolicy.yaml | 118 --- .../TestGetEntity-variables.yaml | 5 - .../TestGetEntity.yaml | 181 ----- .../TestInsertEntity-variables.yaml | 5 - .../TestInsertEntity.yaml | 263 ------- .../TestInvalidEntity-variables.yaml | 5 - .../TestInvalidEntity.yaml | 133 ---- .../TestListEntities-variables.yaml | 5 - .../TestListEntities.yaml | 389 ---------- .../TestMergeEntity-variables.yaml | 5 - .../TestMergeEntity.yaml | 269 ------- .../TestQueryComplexEntity-variables.yaml | 5 - .../TestQueryComplexEntity.yaml | 389 ---------- .../TestQuerySimpleEntity-variables.yaml | 5 - .../TestQuerySimpleEntity.yaml | 398 ---------- .../TestServiceErrors-variables.yaml | 5 - .../TestServiceErrors.yaml | 129 ---- .../TestSetAccessPolicy-variables.yaml | 5 - .../TestSetAccessPolicy.yaml | 122 --- .../TestSetEmptyAccessPolicy-variables.yaml | 5 - .../TestSetEmptyAccessPolicy.yaml | 118 --- ...stSetMultipleAccessPolicies-variables.yaml | 5 - .../TestSetMultipleAccessPolicies.yaml | 155 ---- .../TestSetNullAccessPolicy-variables.yaml | 5 - .../TestSetNullAccessPolicy.yaml | 155 ---- ...estSetTooManyAccessPolicies-variables.yaml | 5 - .../TestSetTooManyAccessPolicies.yaml | 129 ---- .../TestUpsertEntity-variables.yaml | 5 - .../TestUpsertEntity.yaml | 259 ------- .../TestUpsertEntity_cosmos.json | 207 +++++ .../TestUpsertEntity_storage.json | 251 ++++++ .../aztable/table_access_policy_test.go | 68 +- sdk/tables/aztable/table_batch_test.go | 540 ++++++------- sdk/tables/aztable/table_client.go | 2 +- sdk/tables/aztable/table_client_test.go | 532 +++++++------ sdk/tables/aztable/table_service_client.go | 13 +- .../aztable/table_service_client_test.go | 448 +++++------ sdk/tables/aztable/zc_client_options.go | 4 + sdk/tables/aztable/zt_table_recorded_tests.go | 74 +- 204 files changed, 10927 insertions(+), 13358 deletions(-) create mode 100644 eng/pipelines/templates/steps/configure-proxy.yml create mode 100644 eng/scripts/start-server.ps1 create mode 100644 sdk/tables/aztable/proxy_test.go create mode 100644 sdk/tables/aztable/recordings/TestAddBasicEntity/TestAddBasicEntity_cosmos.json create mode 100644 sdk/tables/aztable/recordings/TestAddBasicEntity/TestAddBasicEntity_storage.json create mode 100644 sdk/tables/aztable/recordings/TestAddComplexEntity/TestAddComplexEntity_cosmos.json create mode 100644 sdk/tables/aztable/recordings/TestAddComplexEntity/TestAddComplexEntity_storage.json create mode 100644 sdk/tables/aztable/recordings/TestAddEntity/TestAddEntity_cosmos.json create mode 100644 sdk/tables/aztable/recordings/TestAddEntity/TestAddEntity_storage.json create mode 100644 sdk/tables/aztable/recordings/TestBatchAdd/TestBatchAdd_cosmos.json create mode 100644 sdk/tables/aztable/recordings/TestBatchAdd/TestBatchAdd_storage.json create mode 100644 sdk/tables/aztable/recordings/TestBatchComplex/TestBatchComplex_cosmos.json create mode 100644 sdk/tables/aztable/recordings/TestBatchComplex/TestBatchComplex_storage.json create mode 100644 sdk/tables/aztable/recordings/TestBatchError/TestBatchError_cosmos.json create mode 100644 sdk/tables/aztable/recordings/TestBatchError/TestBatchError_storage.json create mode 100644 sdk/tables/aztable/recordings/TestBatchMixed/TestBatchMixed_cosmos.json create mode 100644 sdk/tables/aztable/recordings/TestBatchMixed/TestBatchMixed_storage.json create mode 100644 sdk/tables/aztable/recordings/TestCreateTable/TestCreateTable_cosmos.json create mode 100644 sdk/tables/aztable/recordings/TestCreateTable/TestCreateTable_storage.json create mode 100644 sdk/tables/aztable/recordings/TestCreateTableFromService/TestCreateTableFromService_cosmos.json create mode 100644 sdk/tables/aztable/recordings/TestCreateTableFromService/TestCreateTableFromService_storage.json create mode 100644 sdk/tables/aztable/recordings/TestDeleteEntity/TestDeleteEntity_cosmos.json create mode 100644 sdk/tables/aztable/recordings/TestDeleteEntity/TestDeleteEntity_storage.json create mode 100644 sdk/tables/aztable/recordings/TestEdmMarshalling/TestEdmMarshalling_cosmos.json create mode 100644 sdk/tables/aztable/recordings/TestEdmMarshalling/TestEdmMarshalling_storage.json create mode 100644 sdk/tables/aztable/recordings/TestGetProperties.json create mode 100644 sdk/tables/aztable/recordings/TestInvalidEntity/TestInvalidEntity_cosmos.json create mode 100644 sdk/tables/aztable/recordings/TestInvalidEntity/TestInvalidEntity_storage.json create mode 100644 sdk/tables/aztable/recordings/TestListTables/TestListTables_cosmos.json create mode 100644 sdk/tables/aztable/recordings/TestListTables/TestListTables_storage.json create mode 100644 sdk/tables/aztable/recordings/TestMergeEntity/TestMergeEntity_cosmos.json create mode 100644 sdk/tables/aztable/recordings/TestMergeEntity/TestMergeEntity_storage.json create mode 100644 sdk/tables/aztable/recordings/TestQueryComplexEntity/TestQueryComplexEntity_cosmos.json create mode 100644 sdk/tables/aztable/recordings/TestQueryComplexEntity/TestQueryComplexEntity_storage.json create mode 100644 sdk/tables/aztable/recordings/TestQuerySimpleEntity/TestQuerySimpleEntity_cosmos.json create mode 100644 sdk/tables/aztable/recordings/TestQuerySimpleEntity/TestQuerySimpleEntity_storage.json create mode 100644 sdk/tables/aztable/recordings/TestQueryTable/TestQueryTable_cosmos.json create mode 100644 sdk/tables/aztable/recordings/TestQueryTable/TestQueryTable_storage.json create mode 100644 sdk/tables/aztable/recordings/TestRetentionTooLong.json delete mode 100644 sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestCreateTable-variables.yaml delete mode 100644 sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestCreateTable.yaml delete mode 100644 sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestGetProperties-variables.yaml delete mode 100644 sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestGetStatistics-variables.yaml delete mode 100644 sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestListTables-variables.yaml delete mode 100644 sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestListTables.yaml delete mode 100644 sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestQueryTable-variables.yaml delete mode 100644 sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestQueryTable.yaml delete mode 100644 sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestRetentionTooLong-variables.yaml delete mode 100644 sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestServiceErrors-variables.yaml delete mode 100644 sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestServiceErrors.yaml delete mode 100644 sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestSetCors-variables.yaml delete mode 100644 sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestSetHoursMetrics-variables.yaml delete mode 100644 sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestSetLogging-variables.yaml delete mode 100644 sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestSetMinuteMetrics-variables.yaml delete mode 100644 sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestSetProperties-variables.yaml delete mode 100644 sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestSetTooManyCors-variables.yaml delete mode 100644 sdk/tables/aztable/recordings/TestServiceClient_Storage/TestCreateTable-variables.yaml delete mode 100644 sdk/tables/aztable/recordings/TestServiceClient_Storage/TestCreateTable.yaml delete mode 100644 sdk/tables/aztable/recordings/TestServiceClient_Storage/TestGetProperties-variables.yaml delete mode 100644 sdk/tables/aztable/recordings/TestServiceClient_Storage/TestGetProperties.yaml delete mode 100644 sdk/tables/aztable/recordings/TestServiceClient_Storage/TestGetStatistics-variables.yaml delete mode 100644 sdk/tables/aztable/recordings/TestServiceClient_Storage/TestGetStatistics.yaml delete mode 100644 sdk/tables/aztable/recordings/TestServiceClient_Storage/TestListTables-variables.yaml delete mode 100644 sdk/tables/aztable/recordings/TestServiceClient_Storage/TestListTables.yaml delete mode 100644 sdk/tables/aztable/recordings/TestServiceClient_Storage/TestQueryTable-variables.yaml delete mode 100644 sdk/tables/aztable/recordings/TestServiceClient_Storage/TestQueryTable.yaml delete mode 100644 sdk/tables/aztable/recordings/TestServiceClient_Storage/TestRetentionTooLong-variables.yaml delete mode 100644 sdk/tables/aztable/recordings/TestServiceClient_Storage/TestRetentionTooLong.yaml delete mode 100644 sdk/tables/aztable/recordings/TestServiceClient_Storage/TestServiceErrors-variables.yaml delete mode 100644 sdk/tables/aztable/recordings/TestServiceClient_Storage/TestServiceErrors.yaml delete mode 100644 sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetCors-variables.yaml delete mode 100644 sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetCors.yaml delete mode 100644 sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetHoursMetrics-variables.yaml delete mode 100644 sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetHoursMetrics.yaml delete mode 100644 sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetLogging-variables.yaml delete mode 100644 sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetLogging.yaml delete mode 100644 sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetMinuteMetrics-variables.yaml delete mode 100644 sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetMinuteMetrics.yaml delete mode 100644 sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetProperties-variables.yaml delete mode 100644 sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetProperties.yaml delete mode 100644 sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetTooManyCors-variables.yaml delete mode 100644 sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetTooManyCors.yaml create mode 100644 sdk/tables/aztable/recordings/TestServiceErrors/TestServiceErrors_cosmos.json create mode 100644 sdk/tables/aztable/recordings/TestServiceErrors/TestServiceErrors_storage.json create mode 100644 sdk/tables/aztable/recordings/TestServiceErrorsServiceClient/TestServiceErrorsServiceClient_cosmos.json create mode 100644 sdk/tables/aztable/recordings/TestServiceErrorsServiceClient/TestServiceErrorsServiceClient_storage.json create mode 100644 sdk/tables/aztable/recordings/TestSetAccessPolicy.json create mode 100644 sdk/tables/aztable/recordings/TestSetCors.json create mode 100644 sdk/tables/aztable/recordings/TestSetEmptyAccessPolicy.json create mode 100644 sdk/tables/aztable/recordings/TestSetHoursMetrics.json create mode 100644 sdk/tables/aztable/recordings/TestSetLogging.json create mode 100644 sdk/tables/aztable/recordings/TestSetMinuteMetrics.json create mode 100644 sdk/tables/aztable/recordings/TestSetMultipleAccessPolicies.json create mode 100644 sdk/tables/aztable/recordings/TestSetNullAccessPolicy.json create mode 100644 sdk/tables/aztable/recordings/TestSetTooManyAccessPolicies.json create mode 100644 sdk/tables/aztable/recordings/TestSetTooManyCors.json delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddBasicEntity-variables.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddBasicEntity.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddComplexEntity-variables.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddComplexEntity.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddEntity-variables.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddEntity.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchAdd-variables.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchAdd.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchComplex-variables.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchComplex.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchError-variables.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchError.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchMixed-variables.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchMixed.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestCreateTable-variables.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestCreateTable.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestDeleteEntity-variables.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestDeleteEntity.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestEdmMarshalling-variables.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestEdmMarshalling.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestInsertEntity-variables.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestInsertEntity.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestInvalidEntity-variables.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestInvalidEntity.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestMergeEntity-variables.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestMergeEntity.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestQueryComplexEntity-variables.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestQueryComplexEntity.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestQuerySimpleEntity-variables.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestQuerySimpleEntity.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestServiceErrors-variables.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestServiceErrors.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestSetAccessPolicy-variables.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestSetEmptyAccessPolicy-variables.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestSetMultipleAccessPolicies-variables.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestSetNullAccessPolicy-variables.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestSetTooManyAccessPolicies-variables.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestUpsertEntity-variables.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestUpsertEntity.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestAddAnnotatedEntity-variables.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestAddAnnotatedEntity.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestAddBasicEntity-variables.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestAddBasicEntity.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestAddComplexEntity-variables.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestAddComplexEntity.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestAddEntity-variables.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestAddEntity.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchAdd-variables.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchAdd.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchComplex-variables.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchComplex.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchError-variables.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchError.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchMixed-variables.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchMixed.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestCreateTable-variables.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestCreateTable.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestCustomEntity-variables.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestCustomEntity.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestDeleteEntity-variables.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestDeleteEntity.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestEdmMarshalling-variables.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestEdmMarshalling.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestGetAccessPolicy-variables.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestGetAccessPolicy.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestGetEntity-variables.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestGetEntity.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestInsertEntity-variables.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestInsertEntity.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestInvalidEntity-variables.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestInvalidEntity.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestListEntities-variables.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestListEntities.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestMergeEntity-variables.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestMergeEntity.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestQueryComplexEntity-variables.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestQueryComplexEntity.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestQuerySimpleEntity-variables.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestQuerySimpleEntity.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestServiceErrors-variables.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestServiceErrors.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestSetAccessPolicy-variables.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestSetAccessPolicy.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestSetEmptyAccessPolicy-variables.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestSetEmptyAccessPolicy.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestSetMultipleAccessPolicies-variables.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestSetMultipleAccessPolicies.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestSetNullAccessPolicy-variables.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestSetNullAccessPolicy.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestSetTooManyAccessPolicies-variables.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestSetTooManyAccessPolicies.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestUpsertEntity-variables.yaml delete mode 100644 sdk/tables/aztable/recordings/TestTableClient_Storage/TestUpsertEntity.yaml create mode 100644 sdk/tables/aztable/recordings/TestUpsertEntity/TestUpsertEntity_cosmos.json create mode 100644 sdk/tables/aztable/recordings/TestUpsertEntity/TestUpsertEntity_storage.json diff --git a/eng/pipelines/templates/steps/build-test.yml b/eng/pipelines/templates/steps/build-test.yml index 1914a3db6776..8adf13b2a8f3 100644 --- a/eng/pipelines/templates/steps/build-test.yml +++ b/eng/pipelines/templates/steps/build-test.yml @@ -28,34 +28,34 @@ steps: env: GO111MODULE: 'on' - - pwsh: | - $modDirs = (./eng/scripts/get_module_dirs.ps1 -serviceDir $(SCOPE)) - foreach ($md in $modDirs) { - pushd $md - Write-Host "##[command]Executing go vet ./... in $md" - go vet ./... - } - displayName: 'Vet' - workingDirectory: '${{parameters.GoWorkspace}}' - env: - GO111MODULE: 'on' + - template: configure-proxy.yml + parameters: + ServiceDirectory: ${{ parameters.ServiceDirectory }} - pwsh: | $testDirs = (./eng/scripts/get_test_dirs.ps1 -serviceDir $(SCOPE)) foreach ($td in $testDirs) { pushd $td + + $(Build.SourcesDirectory)/eng/scripts/start-server.ps1 start + Write-Host "##[command]Executing go test -run "^Test" -v -coverprofile coverage.txt $td | go-junit-report -set-exit-code > report.xml" - go test -run "^Test" -v -coverprofile coverage.txt . | go-junit-report -set-exit-code > report.xml + go test -run "^Test" -v -coverprofile coverage.txt . > temp.txt + cat temp.txt + cat temp.txt | go-junit-report -set-exit-code > report.xml # if no tests were actually run (e.g. examples) delete the coverage file so it's omitted from the coverage report if (Select-String -path ./report.xml -pattern '' -simplematch -quiet) { Write-Host "##[command]Deleting empty coverage file" rm coverage.txt } + + $(Build.SourcesDirectory)/eng/scripts/start-server.ps1 stop } displayName: 'Run Tests' workingDirectory: '${{parameters.GoWorkspace}}' env: GO111MODULE: 'on' + AZURE_RECORD_MODE: 'playback' - pwsh: | $coverageFiles = [Collections.Generic.List[String]]@() diff --git a/eng/pipelines/templates/steps/configure-proxy.yml b/eng/pipelines/templates/steps/configure-proxy.yml new file mode 100644 index 000000000000..c7308e930c69 --- /dev/null +++ b/eng/pipelines/templates/steps/configure-proxy.yml @@ -0,0 +1,22 @@ +parameters: + ServiceDirectory: '' + +steps: + - pwsh: | + $certUriPfx = "https://github.com/Azure/azure-sdk-tools/raw/main/tools/test-proxy/docker/dev_certificate/dotnet-devcert.pfx" + $certUriCrt = "https://github.com/Azure/azure-sdk-tools/raw/main/tools/test-proxy/docker/dev_certificate/dotnet-devcert.crt" + $certLocationPfx = "$(Build.SourcesDirectory)/dotnet-devcert.pfx" + $certLocationCrt = "$(Build.SourcesDirectory)/dotnet-devcert.crt" + + Invoke-WebRequest ` + -Uri $certUriPfx ` + -OutFile $certLocationPfx -UseBasicParsing + + Invoke-WebRequest ` + -Uri $certUriCrt ` + -OutFile $certLocationCrt -UseBasicParsing + + dotnet dev-certs https --clean --import $certLocationPfx -p "password" + + Write-Host "##vso[task.setvariable variable=PROXY_CERT]$certLocationCrt" + displayName: 'Download and Trust Certificate' diff --git a/eng/scripts/start-server.ps1 b/eng/scripts/start-server.ps1 new file mode 100644 index 000000000000..75f0b376712f --- /dev/null +++ b/eng/scripts/start-server.ps1 @@ -0,0 +1,66 @@ +param( + [ValidateSet("start", "stop")] + [String] + $mode, + [String] + $targetFolder = "." +) + +try { + docker --version | Out-Null +} +catch { + Write-Error "A invocation of docker --version failed. This indicates that docker is not properly installed or running." + Write-Error "Please check your docker invocation and try running the script again." +} + +$repoRoot = (Resolve-Path $targetFolder).Path.Replace("`\", "/") +Write-Host $repoRoot + +$CONTAINER_NAME = "ambitious_azsdk_test_proxy" +$IMAGE_SOURCE = "azsdkengsys.azurecr.io/engsys/testproxy-lin:1037115" +$Initial = "" + +if ($IsWindows -and $env:TF_BUILD){ + $IMAGE_SOURCE = "azsdkengsys.azurecr.io/engsys/testproxy-win:1037115" + $Initial = "C:" +} + +function Get-Proxy-Container(){ + return (docker container ls -a --format "{{ json . }}" --filter "name=$CONTAINER_NAME" ` + | ConvertFrom-Json ` + | Select-Object -First 1) +} + +if ($mode -eq "start"){ + $proxyContainer = Get-Proxy-Container + + # if we already have one, we just need to check the state + if($proxyContainer){ + if ($proxyContainer.State -eq "running") + { + Write-Host "Discovered an already running instance of the test-proxy!. Exiting" + exit(0) + } + } + # else we need to create it + else { + Write-Host "Attempting creation of Docker host $CONTAINER_NAME" + Write-Host "docker container create -v `"${repoRoot}:${Initial}/etc/testproxy`" -p 5001:5001 -p 5000:5000 --name $CONTAINER_NAME $IMAGE_SOURCE" + docker container create -v "${repoRoot}:${Initial}/etc/testproxy" -p 5001:5001 -p 5000:5000 --name $CONTAINER_NAME $IMAGE_SOURCE + } + + Write-Host "Attempting start of Docker host $CONTAINER_NAME" + docker container start $CONTAINER_NAME +} + +if ($mode -eq "stop"){ + $proxyContainer = Get-Proxy-Container + + if($proxyContainer){ + if($proxyContainer.State -eq "running"){ + Write-Host "Found a running instance of $CONTAINER_NAME, shutting it down." + docker container stop $CONTAINER_NAME + } + } +} diff --git a/sdk/internal/recording/recording.go b/sdk/internal/recording/recording.go index 27e48e10b19f..20cbedf8fe70 100644 --- a/sdk/internal/recording/recording.go +++ b/sdk/internal/recording/recording.go @@ -6,6 +6,10 @@ package recording import ( + "bytes" + "crypto/tls" + "crypto/x509" + "encoding/json" "errors" "fmt" "io/ioutil" @@ -15,6 +19,7 @@ import ( "path/filepath" "strconv" "strings" + "testing" "time" "github.com/Azure/azure-sdk-for-go/sdk/internal/uuid" @@ -412,3 +417,272 @@ var modeMap = map[RecordMode]recorder.Mode{ Live: recorder.ModeDisabled, Playback: recorder.ModeReplaying, } + +var recordMode, _ = os.LookupEnv("AZURE_RECORD_MODE") +var ModeRecording = "record" +var ModePlayback = "playback" + +var baseProxyURLSecure = "localhost:5001" +var baseProxyURL = "localhost:5000" +var startURL = baseProxyURLSecure + "/record/start" +var stopURL = baseProxyURLSecure + "/record/stop" + +var recordingId string +var IdHeader = "x-recording-id" +var ModeHeader = "x-recording-mode" +var UpstreamUriHeader = "x-recording-upstream-base-uri" + +var tr = &http.Transport{ + TLSClientConfig: &tls.Config{InsecureSkipVerify: true}, +} +var client = http.Client{ + Transport: tr, +} + +type RecordingOptions struct { + MaxRetries int32 + UseHTTPS bool + Host string + Scheme string +} + +func defaultOptions() *RecordingOptions { + return &RecordingOptions{ + MaxRetries: 0, + UseHTTPS: true, + Host: "localhost:5001", + Scheme: "https", + } +} + +func (r RecordingOptions) HostScheme() string { + if r.UseHTTPS { + return "https://localhost:5001" + } + return "http://localhost:5000" +} + +func getTestId(t *testing.T) string { + cwd, err := os.Getwd() + if err != nil { + t.Errorf("Could not find current working directory") + } + cwd = "./recordings/" + t.Name() + ".json" + return cwd +} + +func StartRecording(t *testing.T, options *RecordingOptions) error { + if options == nil { + options = defaultOptions() + } + if recordMode == "" { + t.Log("AZURE_RECORD_MODE was not set, options are \"record\" or \"playback\". \nDefaulting to playback") + recordMode = "playback" + } else { + t.Log("AZURE_RECORD_MODE: ", recordMode) + } + testId := getTestId(t) + + url := fmt.Sprintf("%v/%v/start", options.HostScheme(), recordMode) + + req, err := http.NewRequest("POST", url, nil) + if err != nil { + return err + } + + req.Header.Set("x-recording-file", testId) + + resp, err := client.Do(req) + if err != nil { + return err + } + recordingId = resp.Header.Get(IdHeader) + return nil +} + +func StopRecording(t *testing.T, options *RecordingOptions) error { + if options == nil { + options = defaultOptions() + } + + url := fmt.Sprintf("%v/%v/stop", options.HostScheme(), recordMode) + req, err := http.NewRequest("POST", url, nil) + if err != nil { + return err + } + if recordingId == "" { + return errors.New("Recording ID was never set. Did you call StartRecording?") + } + req.Header.Set("x-recording-id", recordingId) + _, err = client.Do(req) + if err != nil { + t.Errorf(err.Error()) + } + return nil +} + +func AddUriSanitizer(replacement, regex string, options *RecordingOptions) error { + if options == nil { + options = defaultOptions() + } + url := fmt.Sprintf("%v/Admin/AddSanitizer", options.HostScheme()) + req, err := http.NewRequest("POST", url, nil) + if err != nil { + return err + } + req.Header.Set("x-abstraction-identifier", "UriRegexSanitizer") + bodyContent := map[string]string{ + "value": replacement, + "regex": regex, + } + marshalled, err := json.Marshal(bodyContent) + if err != nil { + return err + } + req.Body = ioutil.NopCloser(bytes.NewReader(marshalled)) + req.ContentLength = int64(len(marshalled)) + _, err = client.Do(req) + return err +} + +func (o *RecordingOptions) Init() { + if o.MaxRetries != 0 { + o.MaxRetries = 0 + } + if o.UseHTTPS { + o.Host = baseProxyURLSecure + o.Scheme = "https" + } else { + o.Host = baseProxyURL + o.Scheme = "http" + } +} + +// type recordingPolicy struct { +// options RecordingOptions +// } + +// func NewRecordingPolicy(o *RecordingOptions) azcore.Policy { +// if o == nil { +// o = &RecordingOptions{} +// } +// p := &recordingPolicy{options: *o} +// p.options.init() +// return p +// } + +// func (p *recordingPolicy) Do(req *azcore.Request) (resp *azcore.Response, err error) { +// originalURLHost := req.URL.Host +// req.URL.Scheme = "https" +// req.URL.Host = p.options.host +// req.Host = p.options.host + +// req.Header.Set(UpstreamUriHeader, fmt.Sprintf("%v://%v", p.options.scheme, originalURLHost)) +// req.Header.Set(ModeHeader, recordMode) +// req.Header.Set(recordingIdHeader, recordingId) + +// return req.Next() +// } + +// This looks up an environment variable and if it is not found, returns the recordedValue +func GetEnvVariable(t *testing.T, varName string, recordedValue string) string { + val, ok := os.LookupEnv(varName) + if !ok { + t.Logf("Could not find environment variable: %v", varName) + return recordedValue + } + return val +} + +func LiveOnly(t *testing.T) { + if GetRecordMode() != ModeRecording { + t.Skip("Live Test Only") + } +} + +// Function for sleeping during a test for `duration` seconds. This method will only execute when +// AZURE_RECORD_MODE = "record", if a test is running in playback this will be a noop. +func Sleep(duration int) { + if GetRecordMode() == ModeRecording { + time.Sleep(time.Duration(duration) * time.Second) + } +} + +func GetRecordingId() string { + return recordingId +} + +func GetRecordMode() string { + return recordMode +} + +func InPlayback() bool { + return GetRecordMode() == ModePlayback +} + +func InRecord() bool { + return GetRecordMode() == ModeRecording +} + +// type FakeCredential struct { +// accountName string +// accountKey string +// } + +// func NewFakeCredential(accountName, accountKey string) *FakeCredential { +// return &FakeCredential{ +// accountName: accountName, +// accountKey: accountKey, +// } +// } + +// func (f *FakeCredential) AuthenticationPolicy(azcore.AuthenticationPolicyOptions) azcore.Policy { +// return azcore.PolicyFunc(func(req *azcore.Request) (*azcore.Response, error) { +// authHeader := strings.Join([]string{"Authorization ", f.accountName, ":", f.accountKey}, "") +// req.Request.Header.Set(azcore.HeaderAuthorization, authHeader) +// return req.Next() +// }) +// } + +func getRootCas() (*x509.CertPool, error) { + localFile, ok := os.LookupEnv("PROXY_CERT") + + rootCAs, err := x509.SystemCertPool() + if err != nil { + rootCAs = x509.NewCertPool() + } + + if !ok { + fmt.Println("Could not find path to proxy certificate, set the environment variable 'PROXY_CERT' to the location of your certificate") + return rootCAs, nil + } + + cert, err := ioutil.ReadFile(*&localFile) + if err != nil { + fmt.Println("error opening cert file") + return nil, err + } + + if ok := rootCAs.AppendCertsFromPEM(cert); !ok { + fmt.Println("No certs appended, using system certs only") + } + + return rootCAs, nil +} + +func GetHTTPClient() (*http.Client, error) { + transport := http.DefaultTransport.(*http.Transport).Clone() + + rootCAs, err := getRootCas() + if err != nil { + return nil, err + } + + transport.TLSClientConfig.RootCAs = rootCAs + transport.TLSClientConfig.MinVersion = tls.VersionTLS12 + + defaultHttpClient := &http.Client{ + Transport: transport, + } + return defaultHttpClient, nil +} diff --git a/sdk/tables/aztable/entity_test.go b/sdk/tables/aztable/entity_test.go index 1f63bb29fba6..bc7669ae7e8c 100644 --- a/sdk/tables/aztable/entity_test.go +++ b/sdk/tables/aztable/entity_test.go @@ -6,97 +6,105 @@ package aztable import ( "encoding/json" "fmt" + "testing" "github.com/stretchr/testify/require" ) -func (s *tableClientLiveTests) TestAddBasicEntity() { - require := require.New(s.T()) - client, delete := s.init(true) - defer delete() - - basicEntity := basicTestEntity{ - Entity: Entity{ - PartitionKey: "pk001", - RowKey: "rk001", - }, - Integer: 10, - String: "abcdef", - Bool: true, +func TestAddBasicEntity(t *testing.T) { + for _, service := range services { + t.Run(fmt.Sprintf("%v_%v", t.Name(), service), func(t *testing.T) { + client, delete := initClientTest(t, service, true) + defer delete() + + basicEntity := basicTestEntity{ + Entity: Entity{ + PartitionKey: "pk001", + RowKey: "rk001", + }, + Integer: 10, + String: "abcdef", + Bool: true, + } + + marshalled, err := json.Marshal(basicEntity) + require.Nil(t, err) + _, err = client.AddEntity(ctx, marshalled) + require.Nil(t, err) + + resp, err := client.GetEntity(ctx, "pk001", "rk001", nil) + require.Nil(t, err) + + receivedEntity := basicTestEntity{} + err = json.Unmarshal(resp.Value, &receivedEntity) + require.Nil(t, err) + require.Equal(t, receivedEntity.PartitionKey, "pk001") + require.Equal(t, receivedEntity.RowKey, "rk001") + + queryString := "PartitionKey eq 'pk001'" + listOptions := ListOptions{Filter: &queryString} + pager := client.List(&listOptions) + count := 0 + for pager.NextPage(ctx) { + resp := pager.PageResponse() + for _, e := range resp.TableEntityQueryResponse.Value { + err = json.Unmarshal(e, &receivedEntity) + require.NoError(t, err) + require.Equal(t, receivedEntity.PartitionKey, "pk001") + require.Equal(t, receivedEntity.RowKey, "rk001") + count += 1 + } + } + + require.Equal(t, count, 1) + }) } - - marshalled, err := json.Marshal(basicEntity) - require.Nil(err) - _, err = client.AddEntity(ctx, marshalled) - require.Nil(err) - - resp, err := client.GetEntity(ctx, "pk001", "rk001", nil) - require.Nil(err) - - receivedEntity := basicTestEntity{} - err = json.Unmarshal(resp.Value, &receivedEntity) - require.Nil(err) - require.Equal(receivedEntity.PartitionKey, "pk001") - require.Equal(receivedEntity.RowKey, "rk001") - - queryString := "PartitionKey eq 'pk001'" - listOptions := ListOptions{Filter: &queryString} - pager := client.List(&listOptions) - count := 0 - for pager.NextPage(ctx) { - resp := pager.PageResponse() - for _, e := range resp.TableEntityQueryResponse.Value { - err = json.Unmarshal(e, &receivedEntity) - require.NoError(err) - require.Equal(receivedEntity.PartitionKey, "pk001") - require.Equal(receivedEntity.RowKey, "rk001") - count += 1 - } - } - - require.Equal(count, 1) } -func (s *tableClientLiveTests) TestEdmMarshalling() { - require := require.New(s.T()) - client, delete := s.init(true) - defer delete() - - edmEntity := createEdmEntity(1, "partition") - - marshalled, err := json.Marshal(edmEntity) - require.Nil(err) - _, err = client.AddEntity(ctx, marshalled) - require.Nil(err) - - fullMetadata := &QueryOptions{ - Format: OdataMetadataFormatApplicationJSONOdataFullmetadata.ToPtr(), +func TestEdmMarshalling(t *testing.T) { + for _, service := range services { + t.Run(fmt.Sprintf("%v_%v", t.Name(), service), func(t *testing.T) { + client, delete := initClientTest(t, service, true) + defer delete() + + edmEntity := createEdmEntity(1, "partition") + + marshalled, err := json.Marshal(edmEntity) + require.Nil(t, err) + _, err = client.AddEntity(ctx, marshalled) + require.Nil(t, err) + + fullMetadata := &QueryOptions{ + Format: OdataMetadataFormatApplicationJSONOdataFullmetadata.ToPtr(), + } + + resp, err := client.GetEntity(ctx, "partition", fmt.Sprint(1), fullMetadata) + require.Nil(t, err) + var receivedEntity EdmEntity + err = json.Unmarshal(resp.Value, &receivedEntity) + require.Nil(t, err) + + require.Equal(t, edmEntity.PartitionKey, receivedEntity.PartitionKey) + require.Equal(t, edmEntity.RowKey, receivedEntity.RowKey) + require.Equal(t, edmEntity.Properties["Bool"], receivedEntity.Properties["Bool"]) + require.Equal(t, edmEntity.Properties["Int32"], receivedEntity.Properties["Int32"]) + require.Equal(t, edmEntity.Properties["Int64"], receivedEntity.Properties["Int64"]) + require.Equal(t, edmEntity.Properties["Double"], receivedEntity.Properties["Double"]) + require.Equal(t, edmEntity.Properties["String"], receivedEntity.Properties["String"]) + require.Equal(t, edmEntity.Properties["Guid"], receivedEntity.Properties["Guid"]) + require.Equal(t, edmEntity.Properties["Binary"], receivedEntity.Properties["Binary"]) + requireSameDateTime(t, edmEntity.Properties["DateTime"], receivedEntity.Properties["DateTime"]) + + // Unmarshal to raw json + var received2 map[string]json.RawMessage + err = json.Unmarshal(resp.Value, &received2) + require.Nil(t, err) + + // Unmarshal to plain map + var received3 map[string]interface{} + err = json.Unmarshal(resp.Value, &received3) + require.Nil(t, err) + + }) } - - resp, err := client.GetEntity(ctx, "partition", fmt.Sprint(1), fullMetadata) - require.Nil(err) - var receivedEntity EdmEntity - err = json.Unmarshal(resp.Value, &receivedEntity) - require.Nil(err) - - require.Equal(edmEntity.PartitionKey, receivedEntity.PartitionKey) - require.Equal(edmEntity.RowKey, receivedEntity.RowKey) - require.Equal(edmEntity.Properties["Bool"], receivedEntity.Properties["Bool"]) - require.Equal(edmEntity.Properties["Int32"], receivedEntity.Properties["Int32"]) - require.Equal(edmEntity.Properties["Int64"], receivedEntity.Properties["Int64"]) - require.Equal(edmEntity.Properties["Double"], receivedEntity.Properties["Double"]) - require.Equal(edmEntity.Properties["String"], receivedEntity.Properties["String"]) - require.Equal(edmEntity.Properties["Guid"], receivedEntity.Properties["Guid"]) - require.Equal(edmEntity.Properties["Binary"], receivedEntity.Properties["Binary"]) - requireSameDateTime(require, edmEntity.Properties["DateTime"], receivedEntity.Properties["DateTime"]) - - // Unmarshal to raw json - var received2 map[string]json.RawMessage - err = json.Unmarshal(resp.Value, &received2) - require.Nil(err) - - // Unmarshal to plain map - var received3 map[string]interface{} - err = json.Unmarshal(resp.Value, &received3) - require.Nil(err) } diff --git a/sdk/tables/aztable/go.mod b/sdk/tables/aztable/go.mod index a90efb0685b8..6c22932e4a4a 100644 --- a/sdk/tables/aztable/go.mod +++ b/sdk/tables/aztable/go.mod @@ -3,9 +3,11 @@ module github.com/Azure/azure-sdk-for-go/sdk/tables/aztable go 1.13 replace github.com/Azure/azure-sdk-for-go/sdk/internal => ../../internal +replace github.com/Azure/azure-sdk-for-go/sdk/azidentity => ../../azidentity require ( github.com/Azure/azure-sdk-for-go/sdk/azcore v0.16.2 + github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.9.2 // indirect github.com/Azure/azure-sdk-for-go/sdk/internal v0.5.1 github.com/Azure/azure-sdk-for-go/sdk/to v0.1.4 // indirect github.com/stretchr/testify v1.7.0 diff --git a/sdk/tables/aztable/go.sum b/sdk/tables/aztable/go.sum index a34bb673bf5f..011ec80c81be 100644 --- a/sdk/tables/aztable/go.sum +++ b/sdk/tables/aztable/go.sum @@ -1,7 +1,10 @@ +github.com/Azure/azure-sdk-for-go/sdk/azcore v0.14.0/go.mod h1:pElNP+u99BvCZD+0jOlhI9OC/NB2IDTOTGZOZH0Qhq8= github.com/Azure/azure-sdk-for-go/sdk/azcore v0.16.1 h1:yQw8Ah26gBP4dv66ZNjZpRBRV+gaHH/0TLn1taU4FZ4= github.com/Azure/azure-sdk-for-go/sdk/azcore v0.16.1/go.mod h1:MVdrcUC4Hup35qHym3VdzoW+NBgBxrta9Vei97jRtM8= github.com/Azure/azure-sdk-for-go/sdk/azcore v0.16.2 h1:UC4vfOhW2l0f2QOCQpOxJS4/K6oKFy2tQZE+uWU1MEo= github.com/Azure/azure-sdk-for-go/sdk/azcore v0.16.2/go.mod h1:MVdrcUC4Hup35qHym3VdzoW+NBgBxrta9Vei97jRtM8= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.9.2 h1:3W8umQHRg0DXV5KvmbqU43uFi8MKvqLHQCE8L8v6Xds= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.9.2/go.mod h1:acANgl9stsT5xflESXKjZx4rhZJSr0TGgTDYY0xJPIE= github.com/Azure/azure-sdk-for-go/sdk/to v0.1.4 h1:3w4gk+uYOwplGhID1fDP305/8bI5Aug3URoC1V493KU= github.com/Azure/azure-sdk-for-go/sdk/to v0.1.4/go.mod h1:UL/d4lvWAzSJUuX+19uKdN0ktyjoOyQhgY+HWNgtIYI= github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= @@ -9,6 +12,8 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/dnaeon/go-vcr v1.1.0 h1:ReYa/UBrRyQdant9B4fNHGoCNKw6qh6P0fsdGmZpR7c= github.com/dnaeon/go-vcr v1.1.0/go.mod h1:M7tiix8f0r6mKKJ3Yq/kqU1OYf3MnfmBWVbPx/yU9ko= github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= +github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4 h1:49lOXmGaUpV9Fz3gd7TFZY106KVlPVa5jcYD1gaQf98= +github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4/go.mod h1:4OwLy04Bl9Ef3GJJCoec+30X3LQs/0/m4HFRt/2LUSA= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/objx v0.1.0 h1:4G4v2dO3VZwixGIRoQ5Lfboy6nUhCyYzaqnIAPPhYs4= @@ -17,8 +22,11 @@ github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5Cc github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897 h1:pLI5jrR7OSLijeIDcmRxNmw2api+jEfxLoykJVice/E= +golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20201010224723-4f7140c49acb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210510120150-4163338589ed h1:p9UgmWI9wKpfYmgaV/IZKGdXc5qEK45tDwwwDyjS26I= golang.org/x/net v0.0.0-20210510120150-4163338589ed/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210525063256-abc453219eb5 h1:wjuX4b5yYQnEQHzd+CBcrcC6OVR2J1CN6mUy0oSxIPo= diff --git a/sdk/tables/aztable/proxy_test.go b/sdk/tables/aztable/proxy_test.go new file mode 100644 index 000000000000..4a7f072d91c1 --- /dev/null +++ b/sdk/tables/aztable/proxy_test.go @@ -0,0 +1,237 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package aztable + +import ( + "context" + "fmt" + "hash/fnv" + "strings" + "testing" + + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azidentity" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" + "github.com/stretchr/testify/require" +) + +var AADAuthenticationScope = "https://storage.azure.com/.default" + +type recordingPolicy struct { + options recording.RecordingOptions +} + +func NewRecordingPolicy(o *recording.RecordingOptions) azcore.Policy { + if o == nil { + o = &recording.RecordingOptions{} + } + p := &recordingPolicy{options: *o} + p.options.Init() + return p +} + +func (p *recordingPolicy) Do(req *azcore.Request) (resp *azcore.Response, err error) { + originalURLHost := req.URL.Host + req.URL.Scheme = "https" + req.URL.Host = p.options.Host + req.Host = p.options.Host + + req.Header.Set(recording.UpstreamUriHeader, fmt.Sprintf("%v://%v", p.options.Scheme, originalURLHost)) + req.Header.Set(recording.ModeHeader, recording.GetRecordMode()) + req.Header.Set(recording.IdHeader, recording.GetRecordingId()) + + return req.Next() +} + +type FakeCredential struct { + accountName string + accountKey string +} + +func NewFakeCredential(accountName, accountKey string) *FakeCredential { + return &FakeCredential{ + accountName: accountName, + accountKey: accountKey, + } +} + +func (f *FakeCredential) AuthenticationPolicy(azcore.AuthenticationPolicyOptions) azcore.Policy { + return azcore.PolicyFunc(func(req *azcore.Request) (*azcore.Response, error) { + authHeader := strings.Join([]string{"Authorization ", f.accountName, ":", f.accountKey}, "") + req.Request.Header.Set(azcore.HeaderAuthorization, authHeader) + return req.Next() + }) +} + +func createTableClientForRecording(t *testing.T, tableName string, serviceURL string, cred azcore.Credential) (*TableClient, error) { + policy := NewRecordingPolicy(&recording.RecordingOptions{UseHTTPS: true}) + client, err := recording.GetHTTPClient() + require.NoError(t, err) + options := &TableClientOptions{ + Scopes: []string{AADAuthenticationScope}, + PerCallOptions: []azcore.Policy{policy}, + HTTPClient: client, + } + return NewTableClient(tableName, serviceURL, cred, options) +} + +func createTableServiceClientForRecording(t *testing.T, serviceURL string, cred azcore.Credential) (*TableServiceClient, error) { + policy := NewRecordingPolicy(&recording.RecordingOptions{UseHTTPS: true}) + client, err := recording.GetHTTPClient() + require.NoError(t, err) + options := &TableClientOptions{ + Scopes: []string{AADAuthenticationScope}, + PerCallOptions: []azcore.Policy{policy}, + HTTPClient: client, + } + return NewTableServiceClient(serviceURL, cred, options) +} + +func initClientTest(t *testing.T, service string, createTable bool) (*TableClient, func()) { + var client *TableClient + var err error + if service == string(StorageEndpoint) { + client, err = createStorageTableClient(t) + require.NoError(t, err) + } else if service == string(CosmosEndpoint) { + client, err = createCosmosTableClient(t) + require.NoError(t, err) + } + + err = recording.StartRecording(t, nil) + require.NoError(t, err) + + if createTable { + _, err = client.Create(context.Background()) + require.NoError(t, err) + } + + return client, func() { + _, err = client.Delete(context.Background(), nil) + require.NoError(t, err) + err = recording.StopRecording(t, nil) + require.NoError(t, err) + } +} + +func initServiceTest(t *testing.T, service string) (*TableServiceClient, func()) { + var client *TableServiceClient + var err error + if service == string(StorageEndpoint) { + client, err = createStorageServiceClient(t) + require.NoError(t, err) + } else if service == string(CosmosEndpoint) { + client, err = createCosmosServiceClient(t) + require.NoError(t, err) + } + + err = recording.StartRecording(t, nil) + require.NoError(t, err) + + return client, func() { + err = recording.StopRecording(t, nil) + require.NoError(t, err) + } +} + +func getAADCredential(t *testing.T) (azcore.Credential, error) { + if recording.InPlayback() { + return NewFakeCredential("fakestorageaccount", "fakeAccountKey"), nil + } + + accountName := recording.GetEnvVariable(t, "TABLES_STORAGE_ACCOUNT_NAME", "fakestorageaccount") + + err := recording.AddUriSanitizer("fakestorageaccount", accountName, nil) + require.NoError(t, err) + + return azidentity.NewDefaultAzureCredential(nil) +} + +func getSharedKeyCredential(t *testing.T) (azcore.Credential, error) { + if recording.InPlayback() { + return NewFakeCredential("fakestorageaccount", "fakeAccountKey"), nil + } + + accountName := recording.GetEnvVariable(t, "TABLES_COSMOS_ACCOUNT_NAME", "fakestorageaccount") + accountKey := recording.GetEnvVariable(t, "TABLES_PRIMARY_COSMOS_ACCOUNT_KEY", "fakeAccountKey") + + err := recording.AddUriSanitizer("fakestorageaccount", accountName, nil) + require.NoError(t, err) + + return NewSharedKeyCredential(accountName, accountKey) +} + +func createStorageTableClient(t *testing.T) (*TableClient, error) { + var cred azcore.Credential + accountName := recording.GetEnvVariable(t, "TABLES_STORAGE_ACCOUNT_NAME", "fakestorageaccount") + + cred, err := getAADCredential(t) + require.NoError(t, err) + + serviceURL := storageURI(accountName, "core.windows.net") + + tableName, err := createRandomName(t, "tableName") + require.NoError(t, err) + + return createTableClientForRecording(t, tableName, serviceURL, cred) +} + +func createCosmosTableClient(t *testing.T) (*TableClient, error) { + var cred azcore.Credential + accountName := recording.GetEnvVariable(t, "TABLES_COSMOS_ACCOUNT_NAME", "fakestorageaccount") + + cred, err := getSharedKeyCredential(t) + require.NoError(t, err) + + serviceURL := cosmosURI(accountName, "cosmos.azure.com") + + tableName, err := createRandomName(t, "tableName") + require.NoError(t, err) + + return createTableClientForRecording(t, tableName, serviceURL, cred) +} + +func createStorageServiceClient(t *testing.T) (*TableServiceClient, error) { + var cred azcore.Credential + accountName := recording.GetEnvVariable(t, "TABLES_STORAGE_ACCOUNT_NAME", "fakestorageaccount") + + cred, err := getAADCredential(t) + require.NoError(t, err) + + serviceURL := storageURI(accountName, "core.windows.net") + + return createTableServiceClientForRecording(t, serviceURL, cred) +} + +func createCosmosServiceClient(t *testing.T) (*TableServiceClient, error) { + var cred azcore.Credential + accountName := recording.GetEnvVariable(t, "TABLES_COSMOS_ACCOUNT_NAME", "fakestorageaccount") + + cred, err := getSharedKeyCredential(t) + require.NoError(t, err) + + serviceURL := cosmosURI(accountName, "cosmos.azure.com") + + return createTableServiceClientForRecording(t, serviceURL, cred) +} + +func createRandomName(t *testing.T, prefix string) (string, error) { + h := fnv.New32a() + _, err := h.Write([]byte(t.Name())) + return prefix + fmt.Sprint(h.Sum32()), err +} + +func clearAllTables(service *TableServiceClient) error { + pager := service.ListTables(nil) + for pager.NextPage(ctx) { + resp := pager.PageResponse() + for _, v := range resp.TableQueryResponse.Value { + _, err := service.DeleteTable(ctx, *v.TableName, nil) + if err != nil { + return err + } + } + } + return pager.Err() +} diff --git a/sdk/tables/aztable/recordings/TestAddBasicEntity/TestAddBasicEntity_cosmos.json b/sdk/tables/aztable/recordings/TestAddBasicEntity/TestAddBasicEntity_cosmos.json new file mode 100644 index 000000000000..d1437d695226 --- /dev/null +++ b/sdk/tables/aztable/recordings/TestAddBasicEntity/TestAddBasicEntity_cosmos.json @@ -0,0 +1,175 @@ +{ + "Entries": [ + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/Tables", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "35", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:26 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "TableName": "tableName4275288239" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "Date": "Mon, 02 Aug 2021 18:01:27 GMT", + "ETag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A26.8627464Z\u0027\u0022", + "Location": "https://seankaneprim.table.cosmos.azure.com/Tables(\u0027tableName4275288239\u0027)", + "Transfer-Encoding": "chunked", + "x-ms-request-id": "6511d8eb-1d5e-427b-8a44-9621ea563e4c" + }, + "ResponseBody": { + "TableName": "tableName4275288239", + "odata.metadata": "https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/tableName4275288239", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/tableName4275288239", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "119", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "prefer": "return-no-content", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:28 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "Bool": true, + "Integer": 10, + "PartitionKey": "pk001", + "RowKey": "rk001", + "String": "abcdef", + "Timestamp": "0001-01-01T00:00:00Z" + }, + "StatusCode": 204, + "ResponseHeaders": { + "Date": "Mon, 02 Aug 2021 18:01:27 GMT", + "ETag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A27.8188552Z\u0027\u0022", + "Location": "https://seankaneprim.table.cosmos.azure.com/tableName4275288239(PartitionKey=\u0027pk001\u0027,RowKey=\u0027rk001\u0027)", + "Preference-Applied": "return-no-content", + "x-ms-request-id": "b491538e-7c08-46d8-825e-93cfd5a17bfd" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/tableName4275288239(PartitionKey=\u0027pk001\u0027,RowKey=\u0027rk001\u0027)", + "RequestMethod": "GET", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "GET", + ":path": "/tableName4275288239(PartitionKey=\u0027pk001\u0027,RowKey=\u0027rk001\u0027)", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:28 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "Date": "Mon, 02 Aug 2021 18:01:27 GMT", + "ETag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A27.8188552Z\u0027\u0022", + "Transfer-Encoding": "chunked", + "x-ms-request-id": "4460d460-98f8-403c-a823-0a216e20a239" + }, + "ResponseBody": { + "odata.metadata": "https://seankaneprim.table.cosmos.azure.com/tableName4275288239/$metadata#tableName4275288239/@Element", + "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A27.8188552Z\u0027\u0022", + "Bool": true, + "Integer": 10, + "PartitionKey": "pk001", + "RowKey": "rk001", + "String": "abcdef", + "Timestamp": "2021-08-02T18:01:27.8188552Z" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/tableName4275288239()?%24filter=PartitionKey\u002Beq\u002B%27pk001%27", + "RequestMethod": "GET", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "GET", + ":path": "/tableName4275288239()?%24filter=PartitionKey\u002Beq\u002B%27pk001%27", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:28 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "Date": "Mon, 02 Aug 2021 18:01:27 GMT", + "Transfer-Encoding": "chunked", + "x-ms-request-id": "70e0d313-0f8c-435e-b8ef-cad2758c8784" + }, + "ResponseBody": { + "value": [ + { + "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A27.8188552Z\u0027\u0022", + "Bool": true, + "Integer": 10, + "PartitionKey": "pk001", + "RowKey": "rk001", + "String": "abcdef", + "Timestamp": "2021-08-02T18:01:27.8188552Z" + } + ], + "odata.metadata": "https://seankaneprim.table.cosmos.azure.com/$metadata#tableName4275288239" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables(\u0027tableName4275288239\u0027)", + "RequestMethod": "DELETE", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "DELETE", + ":path": "/Tables(\u0027tableName4275288239\u0027)", + ":scheme": "https", + "Accept": "application/json", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:28 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "Date": "Mon, 02 Aug 2021 18:01:28 GMT", + "x-ms-request-id": "02bfd73e-00e9-4b0c-9050-ea7a7cb5265b" + }, + "ResponseBody": null + } + ], + "Variables": {} +} \ No newline at end of file diff --git a/sdk/tables/aztable/recordings/TestAddBasicEntity/TestAddBasicEntity_storage.json b/sdk/tables/aztable/recordings/TestAddBasicEntity/TestAddBasicEntity_storage.json new file mode 100644 index 000000000000..c7673322017e --- /dev/null +++ b/sdk/tables/aztable/recordings/TestAddBasicEntity/TestAddBasicEntity_storage.json @@ -0,0 +1,214 @@ +{ + "Entries": [ + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/Tables", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "35", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:24 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "TableName": "tableName1927585112" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", + "Date": "Mon, 02 Aug 2021 18:01:24 GMT", + "Location": "https://seankaneprim.table.core.windows.net/Tables(\u0027tableName1927585112\u0027)", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b2c99-9002-0057-46c8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": { + "odata.metadata": "https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element", + "TableName": "tableName1927585112" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/tableName1927585112", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/tableName1927585112", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "119", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "prefer": "return-no-content", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:25 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "Bool": true, + "Integer": 10, + "PartitionKey": "pk001", + "RowKey": "rk001", + "String": "abcdef", + "Timestamp": "0001-01-01T00:00:00Z" + }, + "StatusCode": 204, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "0", + "DataServiceId": "https://seankaneprim.table.core.windows.net/tableName1927585112(PartitionKey=\u0027pk001\u0027,RowKey=\u0027rk001\u0027)", + "Date": "Mon, 02 Aug 2021 18:01:24 GMT", + "ETag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A25.1199393Z\u0027\u0022", + "Location": "https://seankaneprim.table.core.windows.net/tableName1927585112(PartitionKey=\u0027pk001\u0027,RowKey=\u0027rk001\u0027)", + "Preference-Applied": "return-no-content", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b2cf4-9002-0057-1ac8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/tableName1927585112(PartitionKey=\u0027pk001\u0027,RowKey=\u0027rk001\u0027)", + "RequestMethod": "GET", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "GET", + ":path": "/tableName1927585112(PartitionKey=\u0027pk001\u0027,RowKey=\u0027rk001\u0027)", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:25 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", + "Date": "Mon, 02 Aug 2021 18:01:24 GMT", + "ETag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A25.1199393Z\u0027\u0022", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "Vary": "Origin", + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b2d57-9002-0057-68c8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": { + "odata.metadata": "https://seankaneprim.table.core.windows.net/$metadata#tableName1927585112/@Element", + "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A25.1199393Z\u0027\u0022", + "PartitionKey": "pk001", + "RowKey": "rk001", + "Timestamp": "2021-08-02T18:01:25.1199393Z", + "Bool": true, + "Integer": 10, + "String": "abcdef" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/tableName1927585112()?%24filter=PartitionKey\u002Beq\u002B%27pk001%27", + "RequestMethod": "GET", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "GET", + ":path": "/tableName1927585112()?%24filter=PartitionKey\u002Beq\u002B%27pk001%27", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:26 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", + "Date": "Mon, 02 Aug 2021 18:01:24 GMT", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "Vary": "Origin", + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b2dd7-9002-0057-48c8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": { + "odata.metadata": "https://seankaneprim.table.core.windows.net/$metadata#tableName1927585112", + "value": [ + { + "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A25.1199393Z\u0027\u0022", + "PartitionKey": "pk001", + "RowKey": "rk001", + "Timestamp": "2021-08-02T18:01:25.1199393Z", + "Bool": true, + "Integer": 10, + "String": "abcdef" + } + ] + } + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables(\u0027tableName1927585112\u0027)", + "RequestMethod": "DELETE", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "DELETE", + ":path": "/Tables(\u0027tableName1927585112\u0027)", + ":scheme": "https", + "Accept": "application/json", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:26 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "0", + "Date": "Mon, 02 Aug 2021 18:01:24 GMT", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b2e12-9002-0057-70c8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": null + } + ], + "Variables": {} +} \ No newline at end of file diff --git a/sdk/tables/aztable/recordings/TestAddComplexEntity/TestAddComplexEntity_cosmos.json b/sdk/tables/aztable/recordings/TestAddComplexEntity/TestAddComplexEntity_cosmos.json new file mode 100644 index 000000000000..a8765fc139a3 --- /dev/null +++ b/sdk/tables/aztable/recordings/TestAddComplexEntity/TestAddComplexEntity_cosmos.json @@ -0,0 +1,103 @@ +{ + "Entries": [ + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/Tables", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "35", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:51 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "TableName": "tableName2210495615" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "Date": "Mon, 02 Aug 2021 18:01:51 GMT", + "ETag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A51.2255496Z\u0027\u0022", + "Location": "https://seankaneprim.table.cosmos.azure.com/Tables(\u0027tableName2210495615\u0027)", + "Transfer-Encoding": "chunked", + "x-ms-request-id": "56067665-023c-4182-89e0-65c6a9256bc5" + }, + "ResponseBody": { + "TableName": "tableName2210495615", + "odata.metadata": "https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/tableName2210495615", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/tableName2210495615", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "194", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "prefer": "return-no-content", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:52 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "Bool": true, + "Byte": "c29tZWJ5dGVz", + "DateTime": "2021-07-13T00:00:00Z", + "Float": 3.14159, + "Integer": 1, + "PartitionKey": "partition", + "RowKey": "1", + "String": "someString", + "Timestamp": "0001-01-01T00:00:00Z" + }, + "StatusCode": 204, + "ResponseHeaders": { + "Date": "Mon, 02 Aug 2021 18:01:51 GMT", + "ETag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A52.1141768Z\u0027\u0022", + "Location": "https://seankaneprim.table.cosmos.azure.com/tableName2210495615(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", + "Preference-Applied": "return-no-content", + "x-ms-request-id": "57236b2c-9f19-4dd1-8fdb-5ff492a6e51d" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables(\u0027tableName2210495615\u0027)", + "RequestMethod": "DELETE", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "DELETE", + ":path": "/Tables(\u0027tableName2210495615\u0027)", + ":scheme": "https", + "Accept": "application/json", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:52 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "Date": "Mon, 02 Aug 2021 18:01:52 GMT", + "x-ms-request-id": "49c94754-90b0-4ffd-a4db-f103ea89e96e" + }, + "ResponseBody": null + } + ], + "Variables": {} +} \ No newline at end of file diff --git a/sdk/tables/aztable/recordings/TestAddComplexEntity/TestAddComplexEntity_storage.json b/sdk/tables/aztable/recordings/TestAddComplexEntity/TestAddComplexEntity_storage.json new file mode 100644 index 000000000000..f3121e5c259a --- /dev/null +++ b/sdk/tables/aztable/recordings/TestAddComplexEntity/TestAddComplexEntity_storage.json @@ -0,0 +1,126 @@ +{ + "Entries": [ + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/Tables", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "35", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:51 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "TableName": "tableName1098819688" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", + "Date": "Mon, 02 Aug 2021 18:01:49 GMT", + "Location": "https://seankaneprim.table.core.windows.net/Tables(\u0027tableName1098819688\u0027)", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b5ae4-9002-0057-70c8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": { + "odata.metadata": "https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element", + "TableName": "tableName1098819688" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/tableName1098819688", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/tableName1098819688", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "194", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "prefer": "return-no-content", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:51 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "Bool": true, + "Byte": "c29tZWJ5dGVz", + "DateTime": "2021-07-13T00:00:00Z", + "Float": 3.14159, + "Integer": 1, + "PartitionKey": "partition", + "RowKey": "1", + "String": "someString", + "Timestamp": "0001-01-01T00:00:00Z" + }, + "StatusCode": 204, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "0", + "DataServiceId": "https://seankaneprim.table.core.windows.net/tableName1098819688(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", + "Date": "Mon, 02 Aug 2021 18:01:49 GMT", + "ETag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A50.7149383Z\u0027\u0022", + "Location": "https://seankaneprim.table.core.windows.net/tableName1098819688(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", + "Preference-Applied": "return-no-content", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b5b1b-9002-0057-24c8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables(\u0027tableName1098819688\u0027)", + "RequestMethod": "DELETE", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "DELETE", + ":path": "/Tables(\u0027tableName1098819688\u0027)", + ":scheme": "https", + "Accept": "application/json", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:51 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "0", + "Date": "Mon, 02 Aug 2021 18:01:50 GMT", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b5b52-9002-0057-59c8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": null + } + ], + "Variables": {} +} \ No newline at end of file diff --git a/sdk/tables/aztable/recordings/TestAddEntity/TestAddEntity_cosmos.json b/sdk/tables/aztable/recordings/TestAddEntity/TestAddEntity_cosmos.json new file mode 100644 index 000000000000..27f612fa115f --- /dev/null +++ b/sdk/tables/aztable/recordings/TestAddEntity/TestAddEntity_cosmos.json @@ -0,0 +1,100 @@ +{ + "Entries": [ + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/Tables", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "35", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:49 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "TableName": "tableName4289488389" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "Date": "Mon, 02 Aug 2021 18:01:48 GMT", + "ETag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A48.7344648Z\u0027\u0022", + "Location": "https://seankaneprim.table.cosmos.azure.com/Tables(\u0027tableName4289488389\u0027)", + "Transfer-Encoding": "chunked", + "x-ms-request-id": "04129640-ce00-46fa-8220-de3bad494eee" + }, + "ResponseBody": { + "TableName": "tableName4289488389", + "odata.metadata": "https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/tableName4289488389", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/tableName4289488389", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "125", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "prefer": "return-no-content", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:49 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "Bool": true, + "Integer": 1, + "PartitionKey": "partition", + "RowKey": "1", + "String": "some string 1", + "Timestamp": "0001-01-01T00:00:00Z" + }, + "StatusCode": 204, + "ResponseHeaders": { + "Date": "Mon, 02 Aug 2021 18:01:49 GMT", + "ETag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A49.5119880Z\u0027\u0022", + "Location": "https://seankaneprim.table.cosmos.azure.com/tableName4289488389(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", + "Preference-Applied": "return-no-content", + "x-ms-request-id": "3478db4e-a726-4f5f-b6d5-6d06a33c2b09" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables(\u0027tableName4289488389\u0027)", + "RequestMethod": "DELETE", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "DELETE", + ":path": "/Tables(\u0027tableName4289488389\u0027)", + ":scheme": "https", + "Accept": "application/json", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:50 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "Date": "Mon, 02 Aug 2021 18:01:50 GMT", + "x-ms-request-id": "0581fd1c-6f5b-4039-b209-fc344bdd4812" + }, + "ResponseBody": null + } + ], + "Variables": {} +} \ No newline at end of file diff --git a/sdk/tables/aztable/recordings/TestAddEntity/TestAddEntity_storage.json b/sdk/tables/aztable/recordings/TestAddEntity/TestAddEntity_storage.json new file mode 100644 index 000000000000..6c3e3ef1d78e --- /dev/null +++ b/sdk/tables/aztable/recordings/TestAddEntity/TestAddEntity_storage.json @@ -0,0 +1,123 @@ +{ + "Entries": [ + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/Tables", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "34", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:48 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "TableName": "tableName774266614" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", + "Date": "Mon, 02 Aug 2021 18:01:47 GMT", + "Location": "https://seankaneprim.table.core.windows.net/Tables(\u0027tableName774266614\u0027)", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b57cc-9002-0057-79c8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": { + "odata.metadata": "https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element", + "TableName": "tableName774266614" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/tableName774266614", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/tableName774266614", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "125", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "prefer": "return-no-content", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:48 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "Bool": true, + "Integer": 1, + "PartitionKey": "partition", + "RowKey": "1", + "String": "some string 1", + "Timestamp": "0001-01-01T00:00:00Z" + }, + "StatusCode": 204, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "0", + "DataServiceId": "https://seankaneprim.table.core.windows.net/tableName774266614(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", + "Date": "Mon, 02 Aug 2021 18:01:47 GMT", + "ETag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A48.2241869Z\u0027\u0022", + "Location": "https://seankaneprim.table.core.windows.net/tableName774266614(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", + "Preference-Applied": "return-no-content", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b57ef-9002-0057-1ac8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables(\u0027tableName774266614\u0027)", + "RequestMethod": "DELETE", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "DELETE", + ":path": "/Tables(\u0027tableName774266614\u0027)", + ":scheme": "https", + "Accept": "application/json", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:49 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "0", + "Date": "Mon, 02 Aug 2021 18:01:47 GMT", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b5824-9002-0057-4cc8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": null + } + ], + "Variables": {} +} \ No newline at end of file diff --git a/sdk/tables/aztable/recordings/TestBatchAdd/TestBatchAdd_cosmos.json b/sdk/tables/aztable/recordings/TestBatchAdd/TestBatchAdd_cosmos.json new file mode 100644 index 000000000000..09b8d40f0155 --- /dev/null +++ b/sdk/tables/aztable/recordings/TestBatchAdd/TestBatchAdd_cosmos.json @@ -0,0 +1,241 @@ +{ + "Entries": [ + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/Tables", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "33", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:36 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "TableName": "tableName46564141" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "Date": "Mon, 02 Aug 2021 18:01:35 GMT", + "ETag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A35.5088904Z\u0027\u0022", + "Location": "https://seankaneprim.table.cosmos.azure.com/Tables(\u0027tableName46564141\u0027)", + "Transfer-Encoding": "chunked", + "x-ms-request-id": "1af063f0-c2ee-4862-b088-ae69e6c0ad89" + }, + "ResponseBody": { + "TableName": "tableName46564141", + "odata.metadata": "https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/$batch", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/$batch", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "6520", + "Content-Type": "multipart/mixed; boundary=batch_fde37ee2-2934-4e48-71f5-cdf1e920ee66", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:36 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": "LS1iYXRjaF9mZGUzN2VlMi0yOTM0LTRlNDgtNzFmNS1jZGYxZTkyMGVlNjYNCkNvbnRlbnQtVHlwZTogbXVsdGlwYXJ0L21peGVkOyBib3VuZGFyeT1jaGFuZ2VzZXRfNjM2YTRkMzYtYTFmNS00YThjLTRlNTctZjYwMDg1NWJjZGE1DQoNCi0tY2hhbmdlc2V0XzYzNmE0ZDM2LWExZjUtNGE4Yy00ZTU3LWY2MDA4NTViY2RhNQ0KQ29udGVudC1UcmFuc2Zlci1FbmNvZGluZzogYmluYXJ5DQpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL2h0dHANCg0KUE9TVCBodHRwczovL3NlYW5rYW5lcHJpbS50YWJsZS5jb3Ntb3MuYXp1cmUuY29tL3RhYmxlTmFtZTQ2NTY0MTQxPyUyNGZvcm1hdD1hcHBsaWNhdGlvbiUyRmpzb24lM0JvZGF0YSUzRG1pbmltYWxtZXRhZGF0YSBIVFRQLzEuMQ0KQWNjZXB0OiBhcHBsaWNhdGlvbi9qc29uO29kYXRhPW1pbmltYWxtZXRhZGF0YQ0KQ29udGVudC1MZW5ndGg6IDE5NA0KQ29udGVudC1UeXBlOiBhcHBsaWNhdGlvbi9qc29uDQpEYXRhc2VydmljZXZlcnNpb246IDMuMA0KUHJlZmVyOiByZXR1cm4tbm8tY29udGVudA0KWC1Ncy1WZXJzaW9uOiAyMDE5LTAyLTAyDQoNCnsiQm9vbCI6dHJ1ZSwiQnl0ZSI6ImMyOXRaV0o1ZEdWeiIsIkRhdGVUaW1lIjoiMjAyMS0wNy0xM1QwMDowMDowMFoiLCJGbG9hdCI6My4xNDE1OSwiSW50ZWdlciI6MSwiUGFydGl0aW9uS2V5IjoicGFydGl0aW9uIiwiUm93S2V5IjoiMSIsIlN0cmluZyI6InNvbWVTdHJpbmciLCJUaW1lc3RhbXAiOiIwMDAxLTAxLTAxVDAwOjAwOjAwWiJ9DQotLWNoYW5nZXNldF82MzZhNGQzNi1hMWY1LTRhOGMtNGU1Ny1mNjAwODU1YmNkYTUNCkNvbnRlbnQtVHJhbnNmZXItRW5jb2Rpbmc6IGJpbmFyeQ0KQ29udGVudC1UeXBlOiBhcHBsaWNhdGlvbi9odHRwDQoNClBPU1QgaHR0cHM6Ly9zZWFua2FuZXByaW0udGFibGUuY29zbW9zLmF6dXJlLmNvbS90YWJsZU5hbWU0NjU2NDE0MT8lMjRmb3JtYXQ9YXBwbGljYXRpb24lMkZqc29uJTNCb2RhdGElM0RtaW5pbWFsbWV0YWRhdGEgSFRUUC8xLjENCkFjY2VwdDogYXBwbGljYXRpb24vanNvbjtvZGF0YT1taW5pbWFsbWV0YWRhdGENCkNvbnRlbnQtTGVuZ3RoOiAxOTQNCkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vanNvbg0KRGF0YXNlcnZpY2V2ZXJzaW9uOiAzLjANClByZWZlcjogcmV0dXJuLW5vLWNvbnRlbnQNClgtTXMtVmVyc2lvbjogMjAxOS0wMi0wMg0KDQp7IkJvb2wiOnRydWUsIkJ5dGUiOiJjMjl0WldKNWRHVnoiLCJEYXRlVGltZSI6IjIwMjEtMDctMTNUMDA6MDA6MDBaIiwiRmxvYXQiOjMuMTQxNTksIkludGVnZXIiOjIsIlBhcnRpdGlvbktleSI6InBhcnRpdGlvbiIsIlJvd0tleSI6IjIiLCJTdHJpbmciOiJzb21lU3RyaW5nIiwiVGltZXN0YW1wIjoiMDAwMS0wMS0wMVQwMDowMDowMFoifQ0KLS1jaGFuZ2VzZXRfNjM2YTRkMzYtYTFmNS00YThjLTRlNTctZjYwMDg1NWJjZGE1DQpDb250ZW50LVRyYW5zZmVyLUVuY29kaW5nOiBiaW5hcnkNCkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vaHR0cA0KDQpQT1NUIGh0dHBzOi8vc2VhbmthbmVwcmltLnRhYmxlLmNvc21vcy5henVyZS5jb20vdGFibGVOYW1lNDY1NjQxNDE/JTI0Zm9ybWF0PWFwcGxpY2F0aW9uJTJGanNvbiUzQm9kYXRhJTNEbWluaW1hbG1ldGFkYXRhIEhUVFAvMS4xDQpBY2NlcHQ6IGFwcGxpY2F0aW9uL2pzb247b2RhdGE9bWluaW1hbG1ldGFkYXRhDQpDb250ZW50LUxlbmd0aDogMTk0DQpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL2pzb24NCkRhdGFzZXJ2aWNldmVyc2lvbjogMy4wDQpQcmVmZXI6IHJldHVybi1uby1jb250ZW50DQpYLU1zLVZlcnNpb246IDIwMTktMDItMDINCg0KeyJCb29sIjp0cnVlLCJCeXRlIjoiYzI5dFpXSjVkR1Z6IiwiRGF0ZVRpbWUiOiIyMDIxLTA3LTEzVDAwOjAwOjAwWiIsIkZsb2F0IjozLjE0MTU5LCJJbnRlZ2VyIjozLCJQYXJ0aXRpb25LZXkiOiJwYXJ0aXRpb24iLCJSb3dLZXkiOiIzIiwiU3RyaW5nIjoic29tZVN0cmluZyIsIlRpbWVzdGFtcCI6IjAwMDEtMDEtMDFUMDA6MDA6MDBaIn0NCi0tY2hhbmdlc2V0XzYzNmE0ZDM2LWExZjUtNGE4Yy00ZTU3LWY2MDA4NTViY2RhNQ0KQ29udGVudC1UcmFuc2Zlci1FbmNvZGluZzogYmluYXJ5DQpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL2h0dHANCg0KUE9TVCBodHRwczovL3NlYW5rYW5lcHJpbS50YWJsZS5jb3Ntb3MuYXp1cmUuY29tL3RhYmxlTmFtZTQ2NTY0MTQxPyUyNGZvcm1hdD1hcHBsaWNhdGlvbiUyRmpzb24lM0JvZGF0YSUzRG1pbmltYWxtZXRhZGF0YSBIVFRQLzEuMQ0KQWNjZXB0OiBhcHBsaWNhdGlvbi9qc29uO29kYXRhPW1pbmltYWxtZXRhZGF0YQ0KQ29udGVudC1MZW5ndGg6IDE5NA0KQ29udGVudC1UeXBlOiBhcHBsaWNhdGlvbi9qc29uDQpEYXRhc2VydmljZXZlcnNpb246IDMuMA0KUHJlZmVyOiByZXR1cm4tbm8tY29udGVudA0KWC1Ncy1WZXJzaW9uOiAyMDE5LTAyLTAyDQoNCnsiQm9vbCI6dHJ1ZSwiQnl0ZSI6ImMyOXRaV0o1ZEdWeiIsIkRhdGVUaW1lIjoiMjAyMS0wNy0xM1QwMDowMDowMFoiLCJGbG9hdCI6My4xNDE1OSwiSW50ZWdlciI6NCwiUGFydGl0aW9uS2V5IjoicGFydGl0aW9uIiwiUm93S2V5IjoiNCIsIlN0cmluZyI6InNvbWVTdHJpbmciLCJUaW1lc3RhbXAiOiIwMDAxLTAxLTAxVDAwOjAwOjAwWiJ9DQotLWNoYW5nZXNldF82MzZhNGQzNi1hMWY1LTRhOGMtNGU1Ny1mNjAwODU1YmNkYTUNCkNvbnRlbnQtVHJhbnNmZXItRW5jb2Rpbmc6IGJpbmFyeQ0KQ29udGVudC1UeXBlOiBhcHBsaWNhdGlvbi9odHRwDQoNClBPU1QgaHR0cHM6Ly9zZWFua2FuZXByaW0udGFibGUuY29zbW9zLmF6dXJlLmNvbS90YWJsZU5hbWU0NjU2NDE0MT8lMjRmb3JtYXQ9YXBwbGljYXRpb24lMkZqc29uJTNCb2RhdGElM0RtaW5pbWFsbWV0YWRhdGEgSFRUUC8xLjENCkFjY2VwdDogYXBwbGljYXRpb24vanNvbjtvZGF0YT1taW5pbWFsbWV0YWRhdGENCkNvbnRlbnQtTGVuZ3RoOiAxOTQNCkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vanNvbg0KRGF0YXNlcnZpY2V2ZXJzaW9uOiAzLjANClByZWZlcjogcmV0dXJuLW5vLWNvbnRlbnQNClgtTXMtVmVyc2lvbjogMjAxOS0wMi0wMg0KDQp7IkJvb2wiOnRydWUsIkJ5dGUiOiJjMjl0WldKNWRHVnoiLCJEYXRlVGltZSI6IjIwMjEtMDctMTNUMDA6MDA6MDBaIiwiRmxvYXQiOjMuMTQxNTksIkludGVnZXIiOjUsIlBhcnRpdGlvbktleSI6InBhcnRpdGlvbiIsIlJvd0tleSI6IjUiLCJTdHJpbmciOiJzb21lU3RyaW5nIiwiVGltZXN0YW1wIjoiMDAwMS0wMS0wMVQwMDowMDowMFoifQ0KLS1jaGFuZ2VzZXRfNjM2YTRkMzYtYTFmNS00YThjLTRlNTctZjYwMDg1NWJjZGE1DQpDb250ZW50LVRyYW5zZmVyLUVuY29kaW5nOiBiaW5hcnkNCkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vaHR0cA0KDQpQT1NUIGh0dHBzOi8vc2VhbmthbmVwcmltLnRhYmxlLmNvc21vcy5henVyZS5jb20vdGFibGVOYW1lNDY1NjQxNDE/JTI0Zm9ybWF0PWFwcGxpY2F0aW9uJTJGanNvbiUzQm9kYXRhJTNEbWluaW1hbG1ldGFkYXRhIEhUVFAvMS4xDQpBY2NlcHQ6IGFwcGxpY2F0aW9uL2pzb247b2RhdGE9bWluaW1hbG1ldGFkYXRhDQpDb250ZW50LUxlbmd0aDogMTk0DQpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL2pzb24NCkRhdGFzZXJ2aWNldmVyc2lvbjogMy4wDQpQcmVmZXI6IHJldHVybi1uby1jb250ZW50DQpYLU1zLVZlcnNpb246IDIwMTktMDItMDINCg0KeyJCb29sIjp0cnVlLCJCeXRlIjoiYzI5dFpXSjVkR1Z6IiwiRGF0ZVRpbWUiOiIyMDIxLTA3LTEzVDAwOjAwOjAwWiIsIkZsb2F0IjozLjE0MTU5LCJJbnRlZ2VyIjo2LCJQYXJ0aXRpb25LZXkiOiJwYXJ0aXRpb24iLCJSb3dLZXkiOiI2IiwiU3RyaW5nIjoic29tZVN0cmluZyIsIlRpbWVzdGFtcCI6IjAwMDEtMDEtMDFUMDA6MDA6MDBaIn0NCi0tY2hhbmdlc2V0XzYzNmE0ZDM2LWExZjUtNGE4Yy00ZTU3LWY2MDA4NTViY2RhNQ0KQ29udGVudC1UcmFuc2Zlci1FbmNvZGluZzogYmluYXJ5DQpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL2h0dHANCg0KUE9TVCBodHRwczovL3NlYW5rYW5lcHJpbS50YWJsZS5jb3Ntb3MuYXp1cmUuY29tL3RhYmxlTmFtZTQ2NTY0MTQxPyUyNGZvcm1hdD1hcHBsaWNhdGlvbiUyRmpzb24lM0JvZGF0YSUzRG1pbmltYWxtZXRhZGF0YSBIVFRQLzEuMQ0KQWNjZXB0OiBhcHBsaWNhdGlvbi9qc29uO29kYXRhPW1pbmltYWxtZXRhZGF0YQ0KQ29udGVudC1MZW5ndGg6IDE5NA0KQ29udGVudC1UeXBlOiBhcHBsaWNhdGlvbi9qc29uDQpEYXRhc2VydmljZXZlcnNpb246IDMuMA0KUHJlZmVyOiByZXR1cm4tbm8tY29udGVudA0KWC1Ncy1WZXJzaW9uOiAyMDE5LTAyLTAyDQoNCnsiQm9vbCI6dHJ1ZSwiQnl0ZSI6ImMyOXRaV0o1ZEdWeiIsIkRhdGVUaW1lIjoiMjAyMS0wNy0xM1QwMDowMDowMFoiLCJGbG9hdCI6My4xNDE1OSwiSW50ZWdlciI6NywiUGFydGl0aW9uS2V5IjoicGFydGl0aW9uIiwiUm93S2V5IjoiNyIsIlN0cmluZyI6InNvbWVTdHJpbmciLCJUaW1lc3RhbXAiOiIwMDAxLTAxLTAxVDAwOjAwOjAwWiJ9DQotLWNoYW5nZXNldF82MzZhNGQzNi1hMWY1LTRhOGMtNGU1Ny1mNjAwODU1YmNkYTUNCkNvbnRlbnQtVHJhbnNmZXItRW5jb2Rpbmc6IGJpbmFyeQ0KQ29udGVudC1UeXBlOiBhcHBsaWNhdGlvbi9odHRwDQoNClBPU1QgaHR0cHM6Ly9zZWFua2FuZXByaW0udGFibGUuY29zbW9zLmF6dXJlLmNvbS90YWJsZU5hbWU0NjU2NDE0MT8lMjRmb3JtYXQ9YXBwbGljYXRpb24lMkZqc29uJTNCb2RhdGElM0RtaW5pbWFsbWV0YWRhdGEgSFRUUC8xLjENCkFjY2VwdDogYXBwbGljYXRpb24vanNvbjtvZGF0YT1taW5pbWFsbWV0YWRhdGENCkNvbnRlbnQtTGVuZ3RoOiAxOTQNCkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vanNvbg0KRGF0YXNlcnZpY2V2ZXJzaW9uOiAzLjANClByZWZlcjogcmV0dXJuLW5vLWNvbnRlbnQNClgtTXMtVmVyc2lvbjogMjAxOS0wMi0wMg0KDQp7IkJvb2wiOnRydWUsIkJ5dGUiOiJjMjl0WldKNWRHVnoiLCJEYXRlVGltZSI6IjIwMjEtMDctMTNUMDA6MDA6MDBaIiwiRmxvYXQiOjMuMTQxNTksIkludGVnZXIiOjgsIlBhcnRpdGlvbktleSI6InBhcnRpdGlvbiIsIlJvd0tleSI6IjgiLCJTdHJpbmciOiJzb21lU3RyaW5nIiwiVGltZXN0YW1wIjoiMDAwMS0wMS0wMVQwMDowMDowMFoifQ0KLS1jaGFuZ2VzZXRfNjM2YTRkMzYtYTFmNS00YThjLTRlNTctZjYwMDg1NWJjZGE1DQpDb250ZW50LVRyYW5zZmVyLUVuY29kaW5nOiBiaW5hcnkNCkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vaHR0cA0KDQpQT1NUIGh0dHBzOi8vc2VhbmthbmVwcmltLnRhYmxlLmNvc21vcy5henVyZS5jb20vdGFibGVOYW1lNDY1NjQxNDE/JTI0Zm9ybWF0PWFwcGxpY2F0aW9uJTJGanNvbiUzQm9kYXRhJTNEbWluaW1hbG1ldGFkYXRhIEhUVFAvMS4xDQpBY2NlcHQ6IGFwcGxpY2F0aW9uL2pzb247b2RhdGE9bWluaW1hbG1ldGFkYXRhDQpDb250ZW50LUxlbmd0aDogMTk0DQpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL2pzb24NCkRhdGFzZXJ2aWNldmVyc2lvbjogMy4wDQpQcmVmZXI6IHJldHVybi1uby1jb250ZW50DQpYLU1zLVZlcnNpb246IDIwMTktMDItMDINCg0KeyJCb29sIjp0cnVlLCJCeXRlIjoiYzI5dFpXSjVkR1Z6IiwiRGF0ZVRpbWUiOiIyMDIxLTA3LTEzVDAwOjAwOjAwWiIsIkZsb2F0IjozLjE0MTU5LCJJbnRlZ2VyIjo5LCJQYXJ0aXRpb25LZXkiOiJwYXJ0aXRpb24iLCJSb3dLZXkiOiI5IiwiU3RyaW5nIjoic29tZVN0cmluZyIsIlRpbWVzdGFtcCI6IjAwMDEtMDEtMDFUMDA6MDA6MDBaIn0NCi0tY2hhbmdlc2V0XzYzNmE0ZDM2LWExZjUtNGE4Yy00ZTU3LWY2MDA4NTViY2RhNQ0KQ29udGVudC1UcmFuc2Zlci1FbmNvZGluZzogYmluYXJ5DQpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL2h0dHANCg0KUE9TVCBodHRwczovL3NlYW5rYW5lcHJpbS50YWJsZS5jb3Ntb3MuYXp1cmUuY29tL3RhYmxlTmFtZTQ2NTY0MTQxPyUyNGZvcm1hdD1hcHBsaWNhdGlvbiUyRmpzb24lM0JvZGF0YSUzRG1pbmltYWxtZXRhZGF0YSBIVFRQLzEuMQ0KQWNjZXB0OiBhcHBsaWNhdGlvbi9qc29uO29kYXRhPW1pbmltYWxtZXRhZGF0YQ0KQ29udGVudC1MZW5ndGg6IDE5Ng0KQ29udGVudC1UeXBlOiBhcHBsaWNhdGlvbi9qc29uDQpEYXRhc2VydmljZXZlcnNpb246IDMuMA0KUHJlZmVyOiByZXR1cm4tbm8tY29udGVudA0KWC1Ncy1WZXJzaW9uOiAyMDE5LTAyLTAyDQoNCnsiQm9vbCI6dHJ1ZSwiQnl0ZSI6ImMyOXRaV0o1ZEdWeiIsIkRhdGVUaW1lIjoiMjAyMS0wNy0xM1QwMDowMDowMFoiLCJGbG9hdCI6My4xNDE1OSwiSW50ZWdlciI6MTAsIlBhcnRpdGlvbktleSI6InBhcnRpdGlvbiIsIlJvd0tleSI6IjEwIiwiU3RyaW5nIjoic29tZVN0cmluZyIsIlRpbWVzdGFtcCI6IjAwMDEtMDEtMDFUMDA6MDA6MDBaIn0NCi0tY2hhbmdlc2V0XzYzNmE0ZDM2LWExZjUtNGE4Yy00ZTU3LWY2MDA4NTViY2RhNS0tDQoNCi0tYmF0Y2hfZmRlMzdlZTItMjkzNC00ZTQ4LTcxZjUtY2RmMWU5MjBlZTY2LS0NCg==", + "StatusCode": 202, + "ResponseHeaders": { + "Content-Type": "multipart/mixed; boundary=batchresponse_062de501-8375-44da-8472-26c9f2cd9eee", + "Date": "Mon, 02 Aug 2021 18:01:35 GMT", + "Transfer-Encoding": "chunked", + "x-ms-request-id": "204061b2-8df9-4f3d-982e-df0951be41d9" + }, + "ResponseBody": "LS1iYXRjaHJlc3BvbnNlXzA2MmRlNTAxLTgzNzUtNDRkYS04NDcyLTI2YzlmMmNkOWVlZQ0KQ29udGVudC1UeXBlOiBtdWx0aXBhcnQvbWl4ZWQ7IGJvdW5kYXJ5PWNoYW5nZXNldHJlc3BvbnNlX2VlYjllN2MzLTM0MzItNGFkZC1iNzgyLTRkNWVhZDEyOTYwYQ0KDQotLWNoYW5nZXNldHJlc3BvbnNlX2VlYjllN2MzLTM0MzItNGFkZC1iNzgyLTRkNWVhZDEyOTYwYQpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL2h0dHAKQ29udGVudC1UcmFuc2Zlci1FbmNvZGluZzogYmluYXJ5CgpIVFRQLzEuMSAyMDQgTm8gQ29udGVudA0KRVRhZzogVy8iZGF0ZXRpbWUnMjAyMS0wOC0wMlQxOCUzQTAxJTNBMzYuMjE5ODUzNlonIg0KUHJlZmVyZW5jZS1BcHBsaWVkOiByZXR1cm4tbm8tY29udGVudA0KTG9jYXRpb246IGh0dHBzOi8vc2VhbmthbmVwcmltLnRhYmxlLmNvc21vcy5henVyZS5jb20vdGFibGVOYW1lNDY1NjQxNDEoUGFydGl0aW9uS2V5PSdwYXJ0aXRpb24nLFJvd0tleT0nMScpDQpDb250ZW50LUlEOiAxDQoNCg0KLS1jaGFuZ2VzZXRyZXNwb25zZV9lZWI5ZTdjMy0zNDMyLTRhZGQtYjc4Mi00ZDVlYWQxMjk2MGEKQ29udGVudC1UeXBlOiBhcHBsaWNhdGlvbi9odHRwCkNvbnRlbnQtVHJhbnNmZXItRW5jb2Rpbmc6IGJpbmFyeQoKSFRUUC8xLjEgMjA0IE5vIENvbnRlbnQNCkVUYWc6IFcvImRhdGV0aW1lJzIwMjEtMDgtMDJUMTglM0EwMSUzQTM2LjIyMDQ2ODBaJyINClByZWZlcmVuY2UtQXBwbGllZDogcmV0dXJuLW5vLWNvbnRlbnQNCkxvY2F0aW9uOiBodHRwczovL3NlYW5rYW5lcHJpbS50YWJsZS5jb3Ntb3MuYXp1cmUuY29tL3RhYmxlTmFtZTQ2NTY0MTQxKFBhcnRpdGlvbktleT0ncGFydGl0aW9uJyxSb3dLZXk9JzInKQ0KQ29udGVudC1JRDogMg0KDQoNCi0tY2hhbmdlc2V0cmVzcG9uc2VfZWViOWU3YzMtMzQzMi00YWRkLWI3ODItNGQ1ZWFkMTI5NjBhCkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vaHR0cApDb250ZW50LVRyYW5zZmVyLUVuY29kaW5nOiBiaW5hcnkKCkhUVFAvMS4xIDIwNCBObyBDb250ZW50DQpFVGFnOiBXLyJkYXRldGltZScyMDIxLTA4LTAyVDE4JTNBMDElM0EzNi4yMjA5ODAwWiciDQpQcmVmZXJlbmNlLUFwcGxpZWQ6IHJldHVybi1uby1jb250ZW50DQpMb2NhdGlvbjogaHR0cHM6Ly9zZWFua2FuZXByaW0udGFibGUuY29zbW9zLmF6dXJlLmNvbS90YWJsZU5hbWU0NjU2NDE0MShQYXJ0aXRpb25LZXk9J3BhcnRpdGlvbicsUm93S2V5PSczJykNCkNvbnRlbnQtSUQ6IDMNCg0KDQotLWNoYW5nZXNldHJlc3BvbnNlX2VlYjllN2MzLTM0MzItNGFkZC1iNzgyLTRkNWVhZDEyOTYwYQpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL2h0dHAKQ29udGVudC1UcmFuc2Zlci1FbmNvZGluZzogYmluYXJ5CgpIVFRQLzEuMSAyMDQgTm8gQ29udGVudA0KRVRhZzogVy8iZGF0ZXRpbWUnMjAyMS0wOC0wMlQxOCUzQTAxJTNBMzYuMjIxNDkyMFonIg0KUHJlZmVyZW5jZS1BcHBsaWVkOiByZXR1cm4tbm8tY29udGVudA0KTG9jYXRpb246IGh0dHBzOi8vc2VhbmthbmVwcmltLnRhYmxlLmNvc21vcy5henVyZS5jb20vdGFibGVOYW1lNDY1NjQxNDEoUGFydGl0aW9uS2V5PSdwYXJ0aXRpb24nLFJvd0tleT0nNCcpDQpDb250ZW50LUlEOiA0DQoNCg0KLS1jaGFuZ2VzZXRyZXNwb25zZV9lZWI5ZTdjMy0zNDMyLTRhZGQtYjc4Mi00ZDVlYWQxMjk2MGEKQ29udGVudC1UeXBlOiBhcHBsaWNhdGlvbi9odHRwCkNvbnRlbnQtVHJhbnNmZXItRW5jb2Rpbmc6IGJpbmFyeQoKSFRUUC8xLjEgMjA0IE5vIENvbnRlbnQNCkVUYWc6IFcvImRhdGV0aW1lJzIwMjEtMDgtMDJUMTglM0EwMSUzQTM2LjIyMTkwMTZaJyINClByZWZlcmVuY2UtQXBwbGllZDogcmV0dXJuLW5vLWNvbnRlbnQNCkxvY2F0aW9uOiBodHRwczovL3NlYW5rYW5lcHJpbS50YWJsZS5jb3Ntb3MuYXp1cmUuY29tL3RhYmxlTmFtZTQ2NTY0MTQxKFBhcnRpdGlvbktleT0ncGFydGl0aW9uJyxSb3dLZXk9JzUnKQ0KQ29udGVudC1JRDogNQ0KDQoNCi0tY2hhbmdlc2V0cmVzcG9uc2VfZWViOWU3YzMtMzQzMi00YWRkLWI3ODItNGQ1ZWFkMTI5NjBhCkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vaHR0cApDb250ZW50LVRyYW5zZmVyLUVuY29kaW5nOiBiaW5hcnkKCkhUVFAvMS4xIDIwNCBObyBDb250ZW50DQpFVGFnOiBXLyJkYXRldGltZScyMDIxLTA4LTAyVDE4JTNBMDElM0EzNi4yMjI0MTM2WiciDQpQcmVmZXJlbmNlLUFwcGxpZWQ6IHJldHVybi1uby1jb250ZW50DQpMb2NhdGlvbjogaHR0cHM6Ly9zZWFua2FuZXByaW0udGFibGUuY29zbW9zLmF6dXJlLmNvbS90YWJsZU5hbWU0NjU2NDE0MShQYXJ0aXRpb25LZXk9J3BhcnRpdGlvbicsUm93S2V5PSc2JykNCkNvbnRlbnQtSUQ6IDYNCg0KDQotLWNoYW5nZXNldHJlc3BvbnNlX2VlYjllN2MzLTM0MzItNGFkZC1iNzgyLTRkNWVhZDEyOTYwYQpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL2h0dHAKQ29udGVudC1UcmFuc2Zlci1FbmNvZGluZzogYmluYXJ5CgpIVFRQLzEuMSAyMDQgTm8gQ29udGVudA0KRVRhZzogVy8iZGF0ZXRpbWUnMjAyMS0wOC0wMlQxOCUzQTAxJTNBMzYuMjIyOTI1NlonIg0KUHJlZmVyZW5jZS1BcHBsaWVkOiByZXR1cm4tbm8tY29udGVudA0KTG9jYXRpb246IGh0dHBzOi8vc2VhbmthbmVwcmltLnRhYmxlLmNvc21vcy5henVyZS5jb20vdGFibGVOYW1lNDY1NjQxNDEoUGFydGl0aW9uS2V5PSdwYXJ0aXRpb24nLFJvd0tleT0nNycpDQpDb250ZW50LUlEOiA3DQoNCg0KLS1jaGFuZ2VzZXRyZXNwb25zZV9lZWI5ZTdjMy0zNDMyLTRhZGQtYjc4Mi00ZDVlYWQxMjk2MGEKQ29udGVudC1UeXBlOiBhcHBsaWNhdGlvbi9odHRwCkNvbnRlbnQtVHJhbnNmZXItRW5jb2Rpbmc6IGJpbmFyeQoKSFRUUC8xLjEgMjA0IE5vIENvbnRlbnQNCkVUYWc6IFcvImRhdGV0aW1lJzIwMjEtMDgtMDJUMTglM0EwMSUzQTM2LjIyMzMzNTJaJyINClByZWZlcmVuY2UtQXBwbGllZDogcmV0dXJuLW5vLWNvbnRlbnQNCkxvY2F0aW9uOiBodHRwczovL3NlYW5rYW5lcHJpbS50YWJsZS5jb3Ntb3MuYXp1cmUuY29tL3RhYmxlTmFtZTQ2NTY0MTQxKFBhcnRpdGlvbktleT0ncGFydGl0aW9uJyxSb3dLZXk9JzgnKQ0KQ29udGVudC1JRDogOA0KDQoNCi0tY2hhbmdlc2V0cmVzcG9uc2VfZWViOWU3YzMtMzQzMi00YWRkLWI3ODItNGQ1ZWFkMTI5NjBhCkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vaHR0cApDb250ZW50LVRyYW5zZmVyLUVuY29kaW5nOiBiaW5hcnkKCkhUVFAvMS4xIDIwNCBObyBDb250ZW50DQpFVGFnOiBXLyJkYXRldGltZScyMDIxLTA4LTAyVDE4JTNBMDElM0EzNi4yMjM4NDcyWiciDQpQcmVmZXJlbmNlLUFwcGxpZWQ6IHJldHVybi1uby1jb250ZW50DQpMb2NhdGlvbjogaHR0cHM6Ly9zZWFua2FuZXByaW0udGFibGUuY29zbW9zLmF6dXJlLmNvbS90YWJsZU5hbWU0NjU2NDE0MShQYXJ0aXRpb25LZXk9J3BhcnRpdGlvbicsUm93S2V5PSc5JykNCkNvbnRlbnQtSUQ6IDkNCg0KDQotLWNoYW5nZXNldHJlc3BvbnNlX2VlYjllN2MzLTM0MzItNGFkZC1iNzgyLTRkNWVhZDEyOTYwYQpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL2h0dHAKQ29udGVudC1UcmFuc2Zlci1FbmNvZGluZzogYmluYXJ5CgpIVFRQLzEuMSAyMDQgTm8gQ29udGVudA0KRVRhZzogVy8iZGF0ZXRpbWUnMjAyMS0wOC0wMlQxOCUzQTAxJTNBMzYuMjI0MjU2OFonIg0KUHJlZmVyZW5jZS1BcHBsaWVkOiByZXR1cm4tbm8tY29udGVudA0KTG9jYXRpb246IGh0dHBzOi8vc2VhbmthbmVwcmltLnRhYmxlLmNvc21vcy5henVyZS5jb20vdGFibGVOYW1lNDY1NjQxNDEoUGFydGl0aW9uS2V5PSdwYXJ0aXRpb24nLFJvd0tleT0nMTAnKQ0KQ29udGVudC1JRDogMTANCg0KDQotLWNoYW5nZXNldHJlc3BvbnNlX2VlYjllN2MzLTM0MzItNGFkZC1iNzgyLTRkNWVhZDEyOTYwYS0tCi0tYmF0Y2hyZXNwb25zZV8wNjJkZTUwMS04Mzc1LTQ0ZGEtODQ3Mi0yNmM5ZjJjZDllZWUtLQ0K" + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/tableName46564141()", + "RequestMethod": "GET", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "GET", + ":path": "/tableName46564141()", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:37 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "Date": "Mon, 02 Aug 2021 18:01:36 GMT", + "Transfer-Encoding": "chunked", + "x-ms-request-id": "e7b47633-7bc4-47a4-b938-83b9fcaedf70" + }, + "ResponseBody": { + "value": [ + { + "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A36.2198536Z\u0027\u0022", + "Bool": true, + "Byte": "c29tZWJ5dGVz", + "DateTime": "2021-07-13T00:00:00Z", + "Float": 3.14159, + "Integer": 1, + "PartitionKey": "partition", + "RowKey": "1", + "String": "someString", + "Timestamp": "2021-08-02T18:01:36.2198536Z" + }, + { + "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A36.2204680Z\u0027\u0022", + "Bool": true, + "Byte": "c29tZWJ5dGVz", + "DateTime": "2021-07-13T00:00:00Z", + "Float": 3.14159, + "Integer": 2, + "PartitionKey": "partition", + "RowKey": "2", + "String": "someString", + "Timestamp": "2021-08-02T18:01:36.2204680Z" + }, + { + "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A36.2209800Z\u0027\u0022", + "Bool": true, + "Byte": "c29tZWJ5dGVz", + "DateTime": "2021-07-13T00:00:00Z", + "Float": 3.14159, + "Integer": 3, + "PartitionKey": "partition", + "RowKey": "3", + "String": "someString", + "Timestamp": "2021-08-02T18:01:36.2209800Z" + }, + { + "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A36.2214920Z\u0027\u0022", + "Bool": true, + "Byte": "c29tZWJ5dGVz", + "DateTime": "2021-07-13T00:00:00Z", + "Float": 3.14159, + "Integer": 4, + "PartitionKey": "partition", + "RowKey": "4", + "String": "someString", + "Timestamp": "2021-08-02T18:01:36.2214920Z" + }, + { + "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A36.2219016Z\u0027\u0022", + "Bool": true, + "Byte": "c29tZWJ5dGVz", + "DateTime": "2021-07-13T00:00:00Z", + "Float": 3.14159, + "Integer": 5, + "PartitionKey": "partition", + "RowKey": "5", + "String": "someString", + "Timestamp": "2021-08-02T18:01:36.2219016Z" + }, + { + "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A36.2224136Z\u0027\u0022", + "Bool": true, + "Byte": "c29tZWJ5dGVz", + "DateTime": "2021-07-13T00:00:00Z", + "Float": 3.14159, + "Integer": 6, + "PartitionKey": "partition", + "RowKey": "6", + "String": "someString", + "Timestamp": "2021-08-02T18:01:36.2224136Z" + }, + { + "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A36.2229256Z\u0027\u0022", + "Bool": true, + "Byte": "c29tZWJ5dGVz", + "DateTime": "2021-07-13T00:00:00Z", + "Float": 3.14159, + "Integer": 7, + "PartitionKey": "partition", + "RowKey": "7", + "String": "someString", + "Timestamp": "2021-08-02T18:01:36.2229256Z" + }, + { + "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A36.2233352Z\u0027\u0022", + "Bool": true, + "Byte": "c29tZWJ5dGVz", + "DateTime": "2021-07-13T00:00:00Z", + "Float": 3.14159, + "Integer": 8, + "PartitionKey": "partition", + "RowKey": "8", + "String": "someString", + "Timestamp": "2021-08-02T18:01:36.2233352Z" + }, + { + "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A36.2238472Z\u0027\u0022", + "Bool": true, + "Byte": "c29tZWJ5dGVz", + "DateTime": "2021-07-13T00:00:00Z", + "Float": 3.14159, + "Integer": 9, + "PartitionKey": "partition", + "RowKey": "9", + "String": "someString", + "Timestamp": "2021-08-02T18:01:36.2238472Z" + }, + { + "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A36.2242568Z\u0027\u0022", + "Bool": true, + "Byte": "c29tZWJ5dGVz", + "DateTime": "2021-07-13T00:00:00Z", + "Float": 3.14159, + "Integer": 10, + "PartitionKey": "partition", + "RowKey": "10", + "String": "someString", + "Timestamp": "2021-08-02T18:01:36.2242568Z" + } + ], + "odata.metadata": "https://seankaneprim.table.cosmos.azure.com/$metadata#tableName46564141" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables(\u0027tableName46564141\u0027)", + "RequestMethod": "DELETE", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "DELETE", + ":path": "/Tables(\u0027tableName46564141\u0027)", + ":scheme": "https", + "Accept": "application/json", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:37 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "Date": "Mon, 02 Aug 2021 18:01:36 GMT", + "x-ms-request-id": "da197040-68a5-4456-95f4-6aee63705361" + }, + "ResponseBody": null + } + ], + "Variables": {} +} \ No newline at end of file diff --git a/sdk/tables/aztable/recordings/TestBatchAdd/TestBatchAdd_storage.json b/sdk/tables/aztable/recordings/TestBatchAdd/TestBatchAdd_storage.json new file mode 100644 index 000000000000..23df621fed6b --- /dev/null +++ b/sdk/tables/aztable/recordings/TestBatchAdd/TestBatchAdd_storage.json @@ -0,0 +1,270 @@ +{ + "Entries": [ + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/Tables", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "34", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:35 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "TableName": "tableName113044110" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", + "Date": "Mon, 02 Aug 2021 18:01:33 GMT", + "Location": "https://seankaneprim.table.core.windows.net/Tables(\u0027tableName113044110\u0027)", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b44d8-9002-0057-5ec8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": { + "odata.metadata": "https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element", + "TableName": "tableName113044110" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/$batch", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/$batch", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "6530", + "Content-Type": "multipart/mixed; boundary=batch_5c9213ba-0b13-4698-59cb-5dc0bdb24c9e", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:35 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": "LS1iYXRjaF81YzkyMTNiYS0wYjEzLTQ2OTgtNTljYi01ZGMwYmRiMjRjOWUNCkNvbnRlbnQtVHlwZTogbXVsdGlwYXJ0L21peGVkOyBib3VuZGFyeT1jaGFuZ2VzZXRfNDdjMWJjM2QtMDQ4Yy00OTQ0LTQ3ZGMtMmE5ZjQ4OTZiNzk5DQoNCi0tY2hhbmdlc2V0XzQ3YzFiYzNkLTA0OGMtNDk0NC00N2RjLTJhOWY0ODk2Yjc5OQ0KQ29udGVudC1UcmFuc2Zlci1FbmNvZGluZzogYmluYXJ5DQpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL2h0dHANCg0KUE9TVCBodHRwczovL3NlYW5rYW5lcHJpbS50YWJsZS5jb3JlLndpbmRvd3MubmV0L3RhYmxlTmFtZTExMzA0NDExMD8lMjRmb3JtYXQ9YXBwbGljYXRpb24lMkZqc29uJTNCb2RhdGElM0RtaW5pbWFsbWV0YWRhdGEgSFRUUC8xLjENCkFjY2VwdDogYXBwbGljYXRpb24vanNvbjtvZGF0YT1taW5pbWFsbWV0YWRhdGENCkNvbnRlbnQtTGVuZ3RoOiAxOTQNCkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vanNvbg0KRGF0YXNlcnZpY2V2ZXJzaW9uOiAzLjANClByZWZlcjogcmV0dXJuLW5vLWNvbnRlbnQNClgtTXMtVmVyc2lvbjogMjAxOS0wMi0wMg0KDQp7IkJvb2wiOnRydWUsIkJ5dGUiOiJjMjl0WldKNWRHVnoiLCJEYXRlVGltZSI6IjIwMjEtMDctMTNUMDA6MDA6MDBaIiwiRmxvYXQiOjMuMTQxNTksIkludGVnZXIiOjEsIlBhcnRpdGlvbktleSI6InBhcnRpdGlvbiIsIlJvd0tleSI6IjEiLCJTdHJpbmciOiJzb21lU3RyaW5nIiwiVGltZXN0YW1wIjoiMDAwMS0wMS0wMVQwMDowMDowMFoifQ0KLS1jaGFuZ2VzZXRfNDdjMWJjM2QtMDQ4Yy00OTQ0LTQ3ZGMtMmE5ZjQ4OTZiNzk5DQpDb250ZW50LVRyYW5zZmVyLUVuY29kaW5nOiBiaW5hcnkNCkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vaHR0cA0KDQpQT1NUIGh0dHBzOi8vc2VhbmthbmVwcmltLnRhYmxlLmNvcmUud2luZG93cy5uZXQvdGFibGVOYW1lMTEzMDQ0MTEwPyUyNGZvcm1hdD1hcHBsaWNhdGlvbiUyRmpzb24lM0JvZGF0YSUzRG1pbmltYWxtZXRhZGF0YSBIVFRQLzEuMQ0KQWNjZXB0OiBhcHBsaWNhdGlvbi9qc29uO29kYXRhPW1pbmltYWxtZXRhZGF0YQ0KQ29udGVudC1MZW5ndGg6IDE5NA0KQ29udGVudC1UeXBlOiBhcHBsaWNhdGlvbi9qc29uDQpEYXRhc2VydmljZXZlcnNpb246IDMuMA0KUHJlZmVyOiByZXR1cm4tbm8tY29udGVudA0KWC1Ncy1WZXJzaW9uOiAyMDE5LTAyLTAyDQoNCnsiQm9vbCI6dHJ1ZSwiQnl0ZSI6ImMyOXRaV0o1ZEdWeiIsIkRhdGVUaW1lIjoiMjAyMS0wNy0xM1QwMDowMDowMFoiLCJGbG9hdCI6My4xNDE1OSwiSW50ZWdlciI6MiwiUGFydGl0aW9uS2V5IjoicGFydGl0aW9uIiwiUm93S2V5IjoiMiIsIlN0cmluZyI6InNvbWVTdHJpbmciLCJUaW1lc3RhbXAiOiIwMDAxLTAxLTAxVDAwOjAwOjAwWiJ9DQotLWNoYW5nZXNldF80N2MxYmMzZC0wNDhjLTQ5NDQtNDdkYy0yYTlmNDg5NmI3OTkNCkNvbnRlbnQtVHJhbnNmZXItRW5jb2Rpbmc6IGJpbmFyeQ0KQ29udGVudC1UeXBlOiBhcHBsaWNhdGlvbi9odHRwDQoNClBPU1QgaHR0cHM6Ly9zZWFua2FuZXByaW0udGFibGUuY29yZS53aW5kb3dzLm5ldC90YWJsZU5hbWUxMTMwNDQxMTA/JTI0Zm9ybWF0PWFwcGxpY2F0aW9uJTJGanNvbiUzQm9kYXRhJTNEbWluaW1hbG1ldGFkYXRhIEhUVFAvMS4xDQpBY2NlcHQ6IGFwcGxpY2F0aW9uL2pzb247b2RhdGE9bWluaW1hbG1ldGFkYXRhDQpDb250ZW50LUxlbmd0aDogMTk0DQpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL2pzb24NCkRhdGFzZXJ2aWNldmVyc2lvbjogMy4wDQpQcmVmZXI6IHJldHVybi1uby1jb250ZW50DQpYLU1zLVZlcnNpb246IDIwMTktMDItMDINCg0KeyJCb29sIjp0cnVlLCJCeXRlIjoiYzI5dFpXSjVkR1Z6IiwiRGF0ZVRpbWUiOiIyMDIxLTA3LTEzVDAwOjAwOjAwWiIsIkZsb2F0IjozLjE0MTU5LCJJbnRlZ2VyIjozLCJQYXJ0aXRpb25LZXkiOiJwYXJ0aXRpb24iLCJSb3dLZXkiOiIzIiwiU3RyaW5nIjoic29tZVN0cmluZyIsIlRpbWVzdGFtcCI6IjAwMDEtMDEtMDFUMDA6MDA6MDBaIn0NCi0tY2hhbmdlc2V0XzQ3YzFiYzNkLTA0OGMtNDk0NC00N2RjLTJhOWY0ODk2Yjc5OQ0KQ29udGVudC1UcmFuc2Zlci1FbmNvZGluZzogYmluYXJ5DQpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL2h0dHANCg0KUE9TVCBodHRwczovL3NlYW5rYW5lcHJpbS50YWJsZS5jb3JlLndpbmRvd3MubmV0L3RhYmxlTmFtZTExMzA0NDExMD8lMjRmb3JtYXQ9YXBwbGljYXRpb24lMkZqc29uJTNCb2RhdGElM0RtaW5pbWFsbWV0YWRhdGEgSFRUUC8xLjENCkFjY2VwdDogYXBwbGljYXRpb24vanNvbjtvZGF0YT1taW5pbWFsbWV0YWRhdGENCkNvbnRlbnQtTGVuZ3RoOiAxOTQNCkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vanNvbg0KRGF0YXNlcnZpY2V2ZXJzaW9uOiAzLjANClByZWZlcjogcmV0dXJuLW5vLWNvbnRlbnQNClgtTXMtVmVyc2lvbjogMjAxOS0wMi0wMg0KDQp7IkJvb2wiOnRydWUsIkJ5dGUiOiJjMjl0WldKNWRHVnoiLCJEYXRlVGltZSI6IjIwMjEtMDctMTNUMDA6MDA6MDBaIiwiRmxvYXQiOjMuMTQxNTksIkludGVnZXIiOjQsIlBhcnRpdGlvbktleSI6InBhcnRpdGlvbiIsIlJvd0tleSI6IjQiLCJTdHJpbmciOiJzb21lU3RyaW5nIiwiVGltZXN0YW1wIjoiMDAwMS0wMS0wMVQwMDowMDowMFoifQ0KLS1jaGFuZ2VzZXRfNDdjMWJjM2QtMDQ4Yy00OTQ0LTQ3ZGMtMmE5ZjQ4OTZiNzk5DQpDb250ZW50LVRyYW5zZmVyLUVuY29kaW5nOiBiaW5hcnkNCkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vaHR0cA0KDQpQT1NUIGh0dHBzOi8vc2VhbmthbmVwcmltLnRhYmxlLmNvcmUud2luZG93cy5uZXQvdGFibGVOYW1lMTEzMDQ0MTEwPyUyNGZvcm1hdD1hcHBsaWNhdGlvbiUyRmpzb24lM0JvZGF0YSUzRG1pbmltYWxtZXRhZGF0YSBIVFRQLzEuMQ0KQWNjZXB0OiBhcHBsaWNhdGlvbi9qc29uO29kYXRhPW1pbmltYWxtZXRhZGF0YQ0KQ29udGVudC1MZW5ndGg6IDE5NA0KQ29udGVudC1UeXBlOiBhcHBsaWNhdGlvbi9qc29uDQpEYXRhc2VydmljZXZlcnNpb246IDMuMA0KUHJlZmVyOiByZXR1cm4tbm8tY29udGVudA0KWC1Ncy1WZXJzaW9uOiAyMDE5LTAyLTAyDQoNCnsiQm9vbCI6dHJ1ZSwiQnl0ZSI6ImMyOXRaV0o1ZEdWeiIsIkRhdGVUaW1lIjoiMjAyMS0wNy0xM1QwMDowMDowMFoiLCJGbG9hdCI6My4xNDE1OSwiSW50ZWdlciI6NSwiUGFydGl0aW9uS2V5IjoicGFydGl0aW9uIiwiUm93S2V5IjoiNSIsIlN0cmluZyI6InNvbWVTdHJpbmciLCJUaW1lc3RhbXAiOiIwMDAxLTAxLTAxVDAwOjAwOjAwWiJ9DQotLWNoYW5nZXNldF80N2MxYmMzZC0wNDhjLTQ5NDQtNDdkYy0yYTlmNDg5NmI3OTkNCkNvbnRlbnQtVHJhbnNmZXItRW5jb2Rpbmc6IGJpbmFyeQ0KQ29udGVudC1UeXBlOiBhcHBsaWNhdGlvbi9odHRwDQoNClBPU1QgaHR0cHM6Ly9zZWFua2FuZXByaW0udGFibGUuY29yZS53aW5kb3dzLm5ldC90YWJsZU5hbWUxMTMwNDQxMTA/JTI0Zm9ybWF0PWFwcGxpY2F0aW9uJTJGanNvbiUzQm9kYXRhJTNEbWluaW1hbG1ldGFkYXRhIEhUVFAvMS4xDQpBY2NlcHQ6IGFwcGxpY2F0aW9uL2pzb247b2RhdGE9bWluaW1hbG1ldGFkYXRhDQpDb250ZW50LUxlbmd0aDogMTk0DQpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL2pzb24NCkRhdGFzZXJ2aWNldmVyc2lvbjogMy4wDQpQcmVmZXI6IHJldHVybi1uby1jb250ZW50DQpYLU1zLVZlcnNpb246IDIwMTktMDItMDINCg0KeyJCb29sIjp0cnVlLCJCeXRlIjoiYzI5dFpXSjVkR1Z6IiwiRGF0ZVRpbWUiOiIyMDIxLTA3LTEzVDAwOjAwOjAwWiIsIkZsb2F0IjozLjE0MTU5LCJJbnRlZ2VyIjo2LCJQYXJ0aXRpb25LZXkiOiJwYXJ0aXRpb24iLCJSb3dLZXkiOiI2IiwiU3RyaW5nIjoic29tZVN0cmluZyIsIlRpbWVzdGFtcCI6IjAwMDEtMDEtMDFUMDA6MDA6MDBaIn0NCi0tY2hhbmdlc2V0XzQ3YzFiYzNkLTA0OGMtNDk0NC00N2RjLTJhOWY0ODk2Yjc5OQ0KQ29udGVudC1UcmFuc2Zlci1FbmNvZGluZzogYmluYXJ5DQpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL2h0dHANCg0KUE9TVCBodHRwczovL3NlYW5rYW5lcHJpbS50YWJsZS5jb3JlLndpbmRvd3MubmV0L3RhYmxlTmFtZTExMzA0NDExMD8lMjRmb3JtYXQ9YXBwbGljYXRpb24lMkZqc29uJTNCb2RhdGElM0RtaW5pbWFsbWV0YWRhdGEgSFRUUC8xLjENCkFjY2VwdDogYXBwbGljYXRpb24vanNvbjtvZGF0YT1taW5pbWFsbWV0YWRhdGENCkNvbnRlbnQtTGVuZ3RoOiAxOTQNCkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vanNvbg0KRGF0YXNlcnZpY2V2ZXJzaW9uOiAzLjANClByZWZlcjogcmV0dXJuLW5vLWNvbnRlbnQNClgtTXMtVmVyc2lvbjogMjAxOS0wMi0wMg0KDQp7IkJvb2wiOnRydWUsIkJ5dGUiOiJjMjl0WldKNWRHVnoiLCJEYXRlVGltZSI6IjIwMjEtMDctMTNUMDA6MDA6MDBaIiwiRmxvYXQiOjMuMTQxNTksIkludGVnZXIiOjcsIlBhcnRpdGlvbktleSI6InBhcnRpdGlvbiIsIlJvd0tleSI6IjciLCJTdHJpbmciOiJzb21lU3RyaW5nIiwiVGltZXN0YW1wIjoiMDAwMS0wMS0wMVQwMDowMDowMFoifQ0KLS1jaGFuZ2VzZXRfNDdjMWJjM2QtMDQ4Yy00OTQ0LTQ3ZGMtMmE5ZjQ4OTZiNzk5DQpDb250ZW50LVRyYW5zZmVyLUVuY29kaW5nOiBiaW5hcnkNCkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vaHR0cA0KDQpQT1NUIGh0dHBzOi8vc2VhbmthbmVwcmltLnRhYmxlLmNvcmUud2luZG93cy5uZXQvdGFibGVOYW1lMTEzMDQ0MTEwPyUyNGZvcm1hdD1hcHBsaWNhdGlvbiUyRmpzb24lM0JvZGF0YSUzRG1pbmltYWxtZXRhZGF0YSBIVFRQLzEuMQ0KQWNjZXB0OiBhcHBsaWNhdGlvbi9qc29uO29kYXRhPW1pbmltYWxtZXRhZGF0YQ0KQ29udGVudC1MZW5ndGg6IDE5NA0KQ29udGVudC1UeXBlOiBhcHBsaWNhdGlvbi9qc29uDQpEYXRhc2VydmljZXZlcnNpb246IDMuMA0KUHJlZmVyOiByZXR1cm4tbm8tY29udGVudA0KWC1Ncy1WZXJzaW9uOiAyMDE5LTAyLTAyDQoNCnsiQm9vbCI6dHJ1ZSwiQnl0ZSI6ImMyOXRaV0o1ZEdWeiIsIkRhdGVUaW1lIjoiMjAyMS0wNy0xM1QwMDowMDowMFoiLCJGbG9hdCI6My4xNDE1OSwiSW50ZWdlciI6OCwiUGFydGl0aW9uS2V5IjoicGFydGl0aW9uIiwiUm93S2V5IjoiOCIsIlN0cmluZyI6InNvbWVTdHJpbmciLCJUaW1lc3RhbXAiOiIwMDAxLTAxLTAxVDAwOjAwOjAwWiJ9DQotLWNoYW5nZXNldF80N2MxYmMzZC0wNDhjLTQ5NDQtNDdkYy0yYTlmNDg5NmI3OTkNCkNvbnRlbnQtVHJhbnNmZXItRW5jb2Rpbmc6IGJpbmFyeQ0KQ29udGVudC1UeXBlOiBhcHBsaWNhdGlvbi9odHRwDQoNClBPU1QgaHR0cHM6Ly9zZWFua2FuZXByaW0udGFibGUuY29yZS53aW5kb3dzLm5ldC90YWJsZU5hbWUxMTMwNDQxMTA/JTI0Zm9ybWF0PWFwcGxpY2F0aW9uJTJGanNvbiUzQm9kYXRhJTNEbWluaW1hbG1ldGFkYXRhIEhUVFAvMS4xDQpBY2NlcHQ6IGFwcGxpY2F0aW9uL2pzb247b2RhdGE9bWluaW1hbG1ldGFkYXRhDQpDb250ZW50LUxlbmd0aDogMTk0DQpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL2pzb24NCkRhdGFzZXJ2aWNldmVyc2lvbjogMy4wDQpQcmVmZXI6IHJldHVybi1uby1jb250ZW50DQpYLU1zLVZlcnNpb246IDIwMTktMDItMDINCg0KeyJCb29sIjp0cnVlLCJCeXRlIjoiYzI5dFpXSjVkR1Z6IiwiRGF0ZVRpbWUiOiIyMDIxLTA3LTEzVDAwOjAwOjAwWiIsIkZsb2F0IjozLjE0MTU5LCJJbnRlZ2VyIjo5LCJQYXJ0aXRpb25LZXkiOiJwYXJ0aXRpb24iLCJSb3dLZXkiOiI5IiwiU3RyaW5nIjoic29tZVN0cmluZyIsIlRpbWVzdGFtcCI6IjAwMDEtMDEtMDFUMDA6MDA6MDBaIn0NCi0tY2hhbmdlc2V0XzQ3YzFiYzNkLTA0OGMtNDk0NC00N2RjLTJhOWY0ODk2Yjc5OQ0KQ29udGVudC1UcmFuc2Zlci1FbmNvZGluZzogYmluYXJ5DQpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL2h0dHANCg0KUE9TVCBodHRwczovL3NlYW5rYW5lcHJpbS50YWJsZS5jb3JlLndpbmRvd3MubmV0L3RhYmxlTmFtZTExMzA0NDExMD8lMjRmb3JtYXQ9YXBwbGljYXRpb24lMkZqc29uJTNCb2RhdGElM0RtaW5pbWFsbWV0YWRhdGEgSFRUUC8xLjENCkFjY2VwdDogYXBwbGljYXRpb24vanNvbjtvZGF0YT1taW5pbWFsbWV0YWRhdGENCkNvbnRlbnQtTGVuZ3RoOiAxOTYNCkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vanNvbg0KRGF0YXNlcnZpY2V2ZXJzaW9uOiAzLjANClByZWZlcjogcmV0dXJuLW5vLWNvbnRlbnQNClgtTXMtVmVyc2lvbjogMjAxOS0wMi0wMg0KDQp7IkJvb2wiOnRydWUsIkJ5dGUiOiJjMjl0WldKNWRHVnoiLCJEYXRlVGltZSI6IjIwMjEtMDctMTNUMDA6MDA6MDBaIiwiRmxvYXQiOjMuMTQxNTksIkludGVnZXIiOjEwLCJQYXJ0aXRpb25LZXkiOiJwYXJ0aXRpb24iLCJSb3dLZXkiOiIxMCIsIlN0cmluZyI6InNvbWVTdHJpbmciLCJUaW1lc3RhbXAiOiIwMDAxLTAxLTAxVDAwOjAwOjAwWiJ9DQotLWNoYW5nZXNldF80N2MxYmMzZC0wNDhjLTQ5NDQtNDdkYy0yYTlmNDg5NmI3OTktLQ0KDQotLWJhdGNoXzVjOTIxM2JhLTBiMTMtNDY5OC01OWNiLTVkYzBiZGIyNGM5ZS0tDQo=", + "StatusCode": 202, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Type": "multipart/mixed; boundary=batchresponse_2b255a93-b5cc-4c5f-b980-be408924a282", + "Date": "Mon, 02 Aug 2021 18:01:33 GMT", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b4546-9002-0057-18c8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": "LS1iYXRjaHJlc3BvbnNlXzJiMjU1YTkzLWI1Y2MtNGM1Zi1iOTgwLWJlNDA4OTI0YTI4Mg0KQ29udGVudC1UeXBlOiBtdWx0aXBhcnQvbWl4ZWQ7IGJvdW5kYXJ5PWNoYW5nZXNldHJlc3BvbnNlXzdlZGYzZmJkLTVkMDYtNDhhNC05YWI3LTA4MmI5ZDgwYThhZg0KDQotLWNoYW5nZXNldHJlc3BvbnNlXzdlZGYzZmJkLTVkMDYtNDhhNC05YWI3LTA4MmI5ZDgwYThhZg0KQ29udGVudC1UeXBlOiBhcHBsaWNhdGlvbi9odHRwDQpDb250ZW50LVRyYW5zZmVyLUVuY29kaW5nOiBiaW5hcnkNCg0KSFRUUC8xLjEgMjA0IE5vIENvbnRlbnQNClgtQ29udGVudC1UeXBlLU9wdGlvbnM6IG5vc25pZmYNCkNhY2hlLUNvbnRyb2w6IG5vLWNhY2hlDQpQcmVmZXJlbmNlLUFwcGxpZWQ6IHJldHVybi1uby1jb250ZW50DQpEYXRhU2VydmljZVZlcnNpb246IDMuMDsNCkxvY2F0aW9uOiBodHRwczovL3NlYW5rYW5lcHJpbS50YWJsZS5jb3JlLndpbmRvd3MubmV0L3RhYmxlTmFtZTExMzA0NDExMChQYXJ0aXRpb25LZXk9J3BhcnRpdGlvbicsUm93S2V5PScxJykNCkRhdGFTZXJ2aWNlSWQ6IGh0dHBzOi8vc2VhbmthbmVwcmltLnRhYmxlLmNvcmUud2luZG93cy5uZXQvdGFibGVOYW1lMTEzMDQ0MTEwKFBhcnRpdGlvbktleT0ncGFydGl0aW9uJyxSb3dLZXk9JzEnKQ0KRVRhZzogVy8iZGF0ZXRpbWUnMjAyMS0wOC0wMlQxOCUzQTAxJTNBMzQuNTY4NTgzOVonIg0KDQoNCi0tY2hhbmdlc2V0cmVzcG9uc2VfN2VkZjNmYmQtNWQwNi00OGE0LTlhYjctMDgyYjlkODBhOGFmDQpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL2h0dHANCkNvbnRlbnQtVHJhbnNmZXItRW5jb2Rpbmc6IGJpbmFyeQ0KDQpIVFRQLzEuMSAyMDQgTm8gQ29udGVudA0KWC1Db250ZW50LVR5cGUtT3B0aW9uczogbm9zbmlmZg0KQ2FjaGUtQ29udHJvbDogbm8tY2FjaGUNClByZWZlcmVuY2UtQXBwbGllZDogcmV0dXJuLW5vLWNvbnRlbnQNCkRhdGFTZXJ2aWNlVmVyc2lvbjogMy4wOw0KTG9jYXRpb246IGh0dHBzOi8vc2VhbmthbmVwcmltLnRhYmxlLmNvcmUud2luZG93cy5uZXQvdGFibGVOYW1lMTEzMDQ0MTEwKFBhcnRpdGlvbktleT0ncGFydGl0aW9uJyxSb3dLZXk9JzInKQ0KRGF0YVNlcnZpY2VJZDogaHR0cHM6Ly9zZWFua2FuZXByaW0udGFibGUuY29yZS53aW5kb3dzLm5ldC90YWJsZU5hbWUxMTMwNDQxMTAoUGFydGl0aW9uS2V5PSdwYXJ0aXRpb24nLFJvd0tleT0nMicpDQpFVGFnOiBXLyJkYXRldGltZScyMDIxLTA4LTAyVDE4JTNBMDElM0EzNC41Njg1ODM5WiciDQoNCg0KLS1jaGFuZ2VzZXRyZXNwb25zZV83ZWRmM2ZiZC01ZDA2LTQ4YTQtOWFiNy0wODJiOWQ4MGE4YWYNCkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vaHR0cA0KQ29udGVudC1UcmFuc2Zlci1FbmNvZGluZzogYmluYXJ5DQoNCkhUVFAvMS4xIDIwNCBObyBDb250ZW50DQpYLUNvbnRlbnQtVHlwZS1PcHRpb25zOiBub3NuaWZmDQpDYWNoZS1Db250cm9sOiBuby1jYWNoZQ0KUHJlZmVyZW5jZS1BcHBsaWVkOiByZXR1cm4tbm8tY29udGVudA0KRGF0YVNlcnZpY2VWZXJzaW9uOiAzLjA7DQpMb2NhdGlvbjogaHR0cHM6Ly9zZWFua2FuZXByaW0udGFibGUuY29yZS53aW5kb3dzLm5ldC90YWJsZU5hbWUxMTMwNDQxMTAoUGFydGl0aW9uS2V5PSdwYXJ0aXRpb24nLFJvd0tleT0nMycpDQpEYXRhU2VydmljZUlkOiBodHRwczovL3NlYW5rYW5lcHJpbS50YWJsZS5jb3JlLndpbmRvd3MubmV0L3RhYmxlTmFtZTExMzA0NDExMChQYXJ0aXRpb25LZXk9J3BhcnRpdGlvbicsUm93S2V5PSczJykNCkVUYWc6IFcvImRhdGV0aW1lJzIwMjEtMDgtMDJUMTglM0EwMSUzQTM0LjU2ODU4MzlaJyINCg0KDQotLWNoYW5nZXNldHJlc3BvbnNlXzdlZGYzZmJkLTVkMDYtNDhhNC05YWI3LTA4MmI5ZDgwYThhZg0KQ29udGVudC1UeXBlOiBhcHBsaWNhdGlvbi9odHRwDQpDb250ZW50LVRyYW5zZmVyLUVuY29kaW5nOiBiaW5hcnkNCg0KSFRUUC8xLjEgMjA0IE5vIENvbnRlbnQNClgtQ29udGVudC1UeXBlLU9wdGlvbnM6IG5vc25pZmYNCkNhY2hlLUNvbnRyb2w6IG5vLWNhY2hlDQpQcmVmZXJlbmNlLUFwcGxpZWQ6IHJldHVybi1uby1jb250ZW50DQpEYXRhU2VydmljZVZlcnNpb246IDMuMDsNCkxvY2F0aW9uOiBodHRwczovL3NlYW5rYW5lcHJpbS50YWJsZS5jb3JlLndpbmRvd3MubmV0L3RhYmxlTmFtZTExMzA0NDExMChQYXJ0aXRpb25LZXk9J3BhcnRpdGlvbicsUm93S2V5PSc0JykNCkRhdGFTZXJ2aWNlSWQ6IGh0dHBzOi8vc2VhbmthbmVwcmltLnRhYmxlLmNvcmUud2luZG93cy5uZXQvdGFibGVOYW1lMTEzMDQ0MTEwKFBhcnRpdGlvbktleT0ncGFydGl0aW9uJyxSb3dLZXk9JzQnKQ0KRVRhZzogVy8iZGF0ZXRpbWUnMjAyMS0wOC0wMlQxOCUzQTAxJTNBMzQuNTY4NTgzOVonIg0KDQoNCi0tY2hhbmdlc2V0cmVzcG9uc2VfN2VkZjNmYmQtNWQwNi00OGE0LTlhYjctMDgyYjlkODBhOGFmDQpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL2h0dHANCkNvbnRlbnQtVHJhbnNmZXItRW5jb2Rpbmc6IGJpbmFyeQ0KDQpIVFRQLzEuMSAyMDQgTm8gQ29udGVudA0KWC1Db250ZW50LVR5cGUtT3B0aW9uczogbm9zbmlmZg0KQ2FjaGUtQ29udHJvbDogbm8tY2FjaGUNClByZWZlcmVuY2UtQXBwbGllZDogcmV0dXJuLW5vLWNvbnRlbnQNCkRhdGFTZXJ2aWNlVmVyc2lvbjogMy4wOw0KTG9jYXRpb246IGh0dHBzOi8vc2VhbmthbmVwcmltLnRhYmxlLmNvcmUud2luZG93cy5uZXQvdGFibGVOYW1lMTEzMDQ0MTEwKFBhcnRpdGlvbktleT0ncGFydGl0aW9uJyxSb3dLZXk9JzUnKQ0KRGF0YVNlcnZpY2VJZDogaHR0cHM6Ly9zZWFua2FuZXByaW0udGFibGUuY29yZS53aW5kb3dzLm5ldC90YWJsZU5hbWUxMTMwNDQxMTAoUGFydGl0aW9uS2V5PSdwYXJ0aXRpb24nLFJvd0tleT0nNScpDQpFVGFnOiBXLyJkYXRldGltZScyMDIxLTA4LTAyVDE4JTNBMDElM0EzNC41Njg1ODM5WiciDQoNCg0KLS1jaGFuZ2VzZXRyZXNwb25zZV83ZWRmM2ZiZC01ZDA2LTQ4YTQtOWFiNy0wODJiOWQ4MGE4YWYNCkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vaHR0cA0KQ29udGVudC1UcmFuc2Zlci1FbmNvZGluZzogYmluYXJ5DQoNCkhUVFAvMS4xIDIwNCBObyBDb250ZW50DQpYLUNvbnRlbnQtVHlwZS1PcHRpb25zOiBub3NuaWZmDQpDYWNoZS1Db250cm9sOiBuby1jYWNoZQ0KUHJlZmVyZW5jZS1BcHBsaWVkOiByZXR1cm4tbm8tY29udGVudA0KRGF0YVNlcnZpY2VWZXJzaW9uOiAzLjA7DQpMb2NhdGlvbjogaHR0cHM6Ly9zZWFua2FuZXByaW0udGFibGUuY29yZS53aW5kb3dzLm5ldC90YWJsZU5hbWUxMTMwNDQxMTAoUGFydGl0aW9uS2V5PSdwYXJ0aXRpb24nLFJvd0tleT0nNicpDQpEYXRhU2VydmljZUlkOiBodHRwczovL3NlYW5rYW5lcHJpbS50YWJsZS5jb3JlLndpbmRvd3MubmV0L3RhYmxlTmFtZTExMzA0NDExMChQYXJ0aXRpb25LZXk9J3BhcnRpdGlvbicsUm93S2V5PSc2JykNCkVUYWc6IFcvImRhdGV0aW1lJzIwMjEtMDgtMDJUMTglM0EwMSUzQTM0LjU2ODU4MzlaJyINCg0KDQotLWNoYW5nZXNldHJlc3BvbnNlXzdlZGYzZmJkLTVkMDYtNDhhNC05YWI3LTA4MmI5ZDgwYThhZg0KQ29udGVudC1UeXBlOiBhcHBsaWNhdGlvbi9odHRwDQpDb250ZW50LVRyYW5zZmVyLUVuY29kaW5nOiBiaW5hcnkNCg0KSFRUUC8xLjEgMjA0IE5vIENvbnRlbnQNClgtQ29udGVudC1UeXBlLU9wdGlvbnM6IG5vc25pZmYNCkNhY2hlLUNvbnRyb2w6IG5vLWNhY2hlDQpQcmVmZXJlbmNlLUFwcGxpZWQ6IHJldHVybi1uby1jb250ZW50DQpEYXRhU2VydmljZVZlcnNpb246IDMuMDsNCkxvY2F0aW9uOiBodHRwczovL3NlYW5rYW5lcHJpbS50YWJsZS5jb3JlLndpbmRvd3MubmV0L3RhYmxlTmFtZTExMzA0NDExMChQYXJ0aXRpb25LZXk9J3BhcnRpdGlvbicsUm93S2V5PSc3JykNCkRhdGFTZXJ2aWNlSWQ6IGh0dHBzOi8vc2VhbmthbmVwcmltLnRhYmxlLmNvcmUud2luZG93cy5uZXQvdGFibGVOYW1lMTEzMDQ0MTEwKFBhcnRpdGlvbktleT0ncGFydGl0aW9uJyxSb3dLZXk9JzcnKQ0KRVRhZzogVy8iZGF0ZXRpbWUnMjAyMS0wOC0wMlQxOCUzQTAxJTNBMzQuNTY4NTgzOVonIg0KDQoNCi0tY2hhbmdlc2V0cmVzcG9uc2VfN2VkZjNmYmQtNWQwNi00OGE0LTlhYjctMDgyYjlkODBhOGFmDQpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL2h0dHANCkNvbnRlbnQtVHJhbnNmZXItRW5jb2Rpbmc6IGJpbmFyeQ0KDQpIVFRQLzEuMSAyMDQgTm8gQ29udGVudA0KWC1Db250ZW50LVR5cGUtT3B0aW9uczogbm9zbmlmZg0KQ2FjaGUtQ29udHJvbDogbm8tY2FjaGUNClByZWZlcmVuY2UtQXBwbGllZDogcmV0dXJuLW5vLWNvbnRlbnQNCkRhdGFTZXJ2aWNlVmVyc2lvbjogMy4wOw0KTG9jYXRpb246IGh0dHBzOi8vc2VhbmthbmVwcmltLnRhYmxlLmNvcmUud2luZG93cy5uZXQvdGFibGVOYW1lMTEzMDQ0MTEwKFBhcnRpdGlvbktleT0ncGFydGl0aW9uJyxSb3dLZXk9JzgnKQ0KRGF0YVNlcnZpY2VJZDogaHR0cHM6Ly9zZWFua2FuZXByaW0udGFibGUuY29yZS53aW5kb3dzLm5ldC90YWJsZU5hbWUxMTMwNDQxMTAoUGFydGl0aW9uS2V5PSdwYXJ0aXRpb24nLFJvd0tleT0nOCcpDQpFVGFnOiBXLyJkYXRldGltZScyMDIxLTA4LTAyVDE4JTNBMDElM0EzNC41Njg1ODM5WiciDQoNCg0KLS1jaGFuZ2VzZXRyZXNwb25zZV83ZWRmM2ZiZC01ZDA2LTQ4YTQtOWFiNy0wODJiOWQ4MGE4YWYNCkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vaHR0cA0KQ29udGVudC1UcmFuc2Zlci1FbmNvZGluZzogYmluYXJ5DQoNCkhUVFAvMS4xIDIwNCBObyBDb250ZW50DQpYLUNvbnRlbnQtVHlwZS1PcHRpb25zOiBub3NuaWZmDQpDYWNoZS1Db250cm9sOiBuby1jYWNoZQ0KUHJlZmVyZW5jZS1BcHBsaWVkOiByZXR1cm4tbm8tY29udGVudA0KRGF0YVNlcnZpY2VWZXJzaW9uOiAzLjA7DQpMb2NhdGlvbjogaHR0cHM6Ly9zZWFua2FuZXByaW0udGFibGUuY29yZS53aW5kb3dzLm5ldC90YWJsZU5hbWUxMTMwNDQxMTAoUGFydGl0aW9uS2V5PSdwYXJ0aXRpb24nLFJvd0tleT0nOScpDQpEYXRhU2VydmljZUlkOiBodHRwczovL3NlYW5rYW5lcHJpbS50YWJsZS5jb3JlLndpbmRvd3MubmV0L3RhYmxlTmFtZTExMzA0NDExMChQYXJ0aXRpb25LZXk9J3BhcnRpdGlvbicsUm93S2V5PSc5JykNCkVUYWc6IFcvImRhdGV0aW1lJzIwMjEtMDgtMDJUMTglM0EwMSUzQTM0LjU2ODU4MzlaJyINCg0KDQotLWNoYW5nZXNldHJlc3BvbnNlXzdlZGYzZmJkLTVkMDYtNDhhNC05YWI3LTA4MmI5ZDgwYThhZg0KQ29udGVudC1UeXBlOiBhcHBsaWNhdGlvbi9odHRwDQpDb250ZW50LVRyYW5zZmVyLUVuY29kaW5nOiBiaW5hcnkNCg0KSFRUUC8xLjEgMjA0IE5vIENvbnRlbnQNClgtQ29udGVudC1UeXBlLU9wdGlvbnM6IG5vc25pZmYNCkNhY2hlLUNvbnRyb2w6IG5vLWNhY2hlDQpQcmVmZXJlbmNlLUFwcGxpZWQ6IHJldHVybi1uby1jb250ZW50DQpEYXRhU2VydmljZVZlcnNpb246IDMuMDsNCkxvY2F0aW9uOiBodHRwczovL3NlYW5rYW5lcHJpbS50YWJsZS5jb3JlLndpbmRvd3MubmV0L3RhYmxlTmFtZTExMzA0NDExMChQYXJ0aXRpb25LZXk9J3BhcnRpdGlvbicsUm93S2V5PScxMCcpDQpEYXRhU2VydmljZUlkOiBodHRwczovL3NlYW5rYW5lcHJpbS50YWJsZS5jb3JlLndpbmRvd3MubmV0L3RhYmxlTmFtZTExMzA0NDExMChQYXJ0aXRpb25LZXk9J3BhcnRpdGlvbicsUm93S2V5PScxMCcpDQpFVGFnOiBXLyJkYXRldGltZScyMDIxLTA4LTAyVDE4JTNBMDElM0EzNC41Njg1ODM5WiciDQoNCg0KLS1jaGFuZ2VzZXRyZXNwb25zZV83ZWRmM2ZiZC01ZDA2LTQ4YTQtOWFiNy0wODJiOWQ4MGE4YWYtLQ0KLS1iYXRjaHJlc3BvbnNlXzJiMjU1YTkzLWI1Y2MtNGM1Zi1iOTgwLWJlNDA4OTI0YTI4Mi0tDQo=" + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/tableName113044110()", + "RequestMethod": "GET", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "GET", + ":path": "/tableName113044110()", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:35 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", + "Date": "Mon, 02 Aug 2021 18:01:34 GMT", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "Vary": "Origin", + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b45e0-9002-0057-6dc8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": { + "odata.metadata": "https://seankaneprim.table.core.windows.net/$metadata#tableName113044110", + "value": [ + { + "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A34.5685839Z\u0027\u0022", + "PartitionKey": "partition", + "RowKey": "1", + "Timestamp": "2021-08-02T18:01:34.5685839Z", + "Bool": true, + "Byte": "c29tZWJ5dGVz", + "DateTime": "2021-07-13T00:00:00Z", + "Float": 3.14159, + "Integer": 1, + "String": "someString" + }, + { + "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A34.5685839Z\u0027\u0022", + "PartitionKey": "partition", + "RowKey": "10", + "Timestamp": "2021-08-02T18:01:34.5685839Z", + "Bool": true, + "Byte": "c29tZWJ5dGVz", + "DateTime": "2021-07-13T00:00:00Z", + "Float": 3.14159, + "Integer": 10, + "String": "someString" + }, + { + "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A34.5685839Z\u0027\u0022", + "PartitionKey": "partition", + "RowKey": "2", + "Timestamp": "2021-08-02T18:01:34.5685839Z", + "Bool": true, + "Byte": "c29tZWJ5dGVz", + "DateTime": "2021-07-13T00:00:00Z", + "Float": 3.14159, + "Integer": 2, + "String": "someString" + }, + { + "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A34.5685839Z\u0027\u0022", + "PartitionKey": "partition", + "RowKey": "3", + "Timestamp": "2021-08-02T18:01:34.5685839Z", + "Bool": true, + "Byte": "c29tZWJ5dGVz", + "DateTime": "2021-07-13T00:00:00Z", + "Float": 3.14159, + "Integer": 3, + "String": "someString" + }, + { + "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A34.5685839Z\u0027\u0022", + "PartitionKey": "partition", + "RowKey": "4", + "Timestamp": "2021-08-02T18:01:34.5685839Z", + "Bool": true, + "Byte": "c29tZWJ5dGVz", + "DateTime": "2021-07-13T00:00:00Z", + "Float": 3.14159, + "Integer": 4, + "String": "someString" + }, + { + "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A34.5685839Z\u0027\u0022", + "PartitionKey": "partition", + "RowKey": "5", + "Timestamp": "2021-08-02T18:01:34.5685839Z", + "Bool": true, + "Byte": "c29tZWJ5dGVz", + "DateTime": "2021-07-13T00:00:00Z", + "Float": 3.14159, + "Integer": 5, + "String": "someString" + }, + { + "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A34.5685839Z\u0027\u0022", + "PartitionKey": "partition", + "RowKey": "6", + "Timestamp": "2021-08-02T18:01:34.5685839Z", + "Bool": true, + "Byte": "c29tZWJ5dGVz", + "DateTime": "2021-07-13T00:00:00Z", + "Float": 3.14159, + "Integer": 6, + "String": "someString" + }, + { + "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A34.5685839Z\u0027\u0022", + "PartitionKey": "partition", + "RowKey": "7", + "Timestamp": "2021-08-02T18:01:34.5685839Z", + "Bool": true, + "Byte": "c29tZWJ5dGVz", + "DateTime": "2021-07-13T00:00:00Z", + "Float": 3.14159, + "Integer": 7, + "String": "someString" + }, + { + "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A34.5685839Z\u0027\u0022", + "PartitionKey": "partition", + "RowKey": "8", + "Timestamp": "2021-08-02T18:01:34.5685839Z", + "Bool": true, + "Byte": "c29tZWJ5dGVz", + "DateTime": "2021-07-13T00:00:00Z", + "Float": 3.14159, + "Integer": 8, + "String": "someString" + }, + { + "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A34.5685839Z\u0027\u0022", + "PartitionKey": "partition", + "RowKey": "9", + "Timestamp": "2021-08-02T18:01:34.5685839Z", + "Bool": true, + "Byte": "c29tZWJ5dGVz", + "DateTime": "2021-07-13T00:00:00Z", + "Float": 3.14159, + "Integer": 9, + "String": "someString" + } + ] + } + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables(\u0027tableName113044110\u0027)", + "RequestMethod": "DELETE", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "DELETE", + ":path": "/Tables(\u0027tableName113044110\u0027)", + ":scheme": "https", + "Accept": "application/json", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:35 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "0", + "Date": "Mon, 02 Aug 2021 18:01:34 GMT", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b467a-9002-0057-3dc8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": null + } + ], + "Variables": {} +} \ No newline at end of file diff --git a/sdk/tables/aztable/recordings/TestBatchComplex/TestBatchComplex_cosmos.json b/sdk/tables/aztable/recordings/TestBatchComplex/TestBatchComplex_cosmos.json new file mode 100644 index 000000000000..bb5f731f75fb --- /dev/null +++ b/sdk/tables/aztable/recordings/TestBatchComplex/TestBatchComplex_cosmos.json @@ -0,0 +1,237 @@ +{ + "Entries": [ + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/Tables", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "35", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:43 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "TableName": "tableName1074621383" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "Date": "Mon, 02 Aug 2021 18:01:43 GMT", + "ETag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A43.2411144Z\u0027\u0022", + "Location": "https://seankaneprim.table.cosmos.azure.com/Tables(\u0027tableName1074621383\u0027)", + "Transfer-Encoding": "chunked", + "x-ms-request-id": "75b664a4-3452-45a1-87dd-9f68fbdd4151" + }, + "ResponseBody": { + "TableName": "tableName1074621383", + "odata.metadata": "https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/$batch", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/$batch", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "4253", + "Content-Type": "multipart/mixed; boundary=batch_bc1877b8-a42d-42f7-69a7-42f6f586389e", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:44 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": "LS1iYXRjaF9iYzE4NzdiOC1hNDJkLTQyZjctNjlhNy00MmY2ZjU4NjM4OWUNCkNvbnRlbnQtVHlwZTogbXVsdGlwYXJ0L21peGVkOyBib3VuZGFyeT1jaGFuZ2VzZXRfYzAxMTE5NTctMjgzMC00ODQ0LTYzNzktOWY0MDYxYWE4YTIzDQoNCi0tY2hhbmdlc2V0X2MwMTExOTU3LTI4MzAtNDg0NC02Mzc5LTlmNDA2MWFhOGEyMw0KQ29udGVudC1UcmFuc2Zlci1FbmNvZGluZzogYmluYXJ5DQpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL2h0dHANCg0KUE9TVCBodHRwczovL3NlYW5rYW5lcHJpbS50YWJsZS5jb3Ntb3MuYXp1cmUuY29tL3RhYmxlTmFtZTEwNzQ2MjEzODM/JTI0Zm9ybWF0PWFwcGxpY2F0aW9uJTJGanNvbiUzQm9kYXRhJTNEbWluaW1hbG1ldGFkYXRhIEhUVFAvMS4xDQpBY2NlcHQ6IGFwcGxpY2F0aW9uL2pzb247b2RhdGE9bWluaW1hbG1ldGFkYXRhDQpDb250ZW50LUxlbmd0aDogMzY3DQpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL2pzb24NCkRhdGFzZXJ2aWNldmVyc2lvbjogMy4wDQpQcmVmZXI6IHJldHVybi1uby1jb250ZW50DQpYLU1zLVZlcnNpb246IDIwMTktMDItMDINCg0KeyJCaW5hcnkiOiJVMjl0WlVKcGJtRnllUT09IiwiQmluYXJ5QG9kYXRhLnR5cGUiOiJFZG0uQmluYXJ5IiwiQm9vbCI6ZmFsc2UsIkRhdGVUaW1lIjoiMjAxMy0wOC0wMlQxNzozNzo0My4wMDkwMDQzWiIsIkRhdGVUaW1lQG9kYXRhLnR5cGUiOiJFZG0uRGF0ZVRpbWUiLCJEb3VibGUiOjEyMzQuMTIzNCwiR3VpZCI6IjQxODU0MDRhLTU4MTgtNDhjMy1iOWJlLWYyMTdkZjBkYmE2ZiIsIkd1aWRAb2RhdGEudHlwZSI6IkVkbS5HdWlkIiwiSW50MzIiOjEyMzQsIkludDY0IjoiMTIzNDU2Nzg5MDEyIiwiSW50NjRAb2RhdGEudHlwZSI6IkVkbS5JbnQ2NCIsIlBhcnRpdGlvbktleSI6InBrMDAxIiwiUm93S2V5IjoiMSIsIlN0cmluZyI6InRlc3QifQ0KLS1jaGFuZ2VzZXRfYzAxMTE5NTctMjgzMC00ODQ0LTYzNzktOWY0MDYxYWE4YTIzDQpDb250ZW50LVRyYW5zZmVyLUVuY29kaW5nOiBiaW5hcnkNCkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vaHR0cA0KDQpQT1NUIGh0dHBzOi8vc2VhbmthbmVwcmltLnRhYmxlLmNvc21vcy5henVyZS5jb20vdGFibGVOYW1lMTA3NDYyMTM4Mz8lMjRmb3JtYXQ9YXBwbGljYXRpb24lMkZqc29uJTNCb2RhdGElM0RtaW5pbWFsbWV0YWRhdGEgSFRUUC8xLjENCkFjY2VwdDogYXBwbGljYXRpb24vanNvbjtvZGF0YT1taW5pbWFsbWV0YWRhdGENCkNvbnRlbnQtTGVuZ3RoOiAzNjcNCkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vanNvbg0KRGF0YXNlcnZpY2V2ZXJzaW9uOiAzLjANClByZWZlcjogcmV0dXJuLW5vLWNvbnRlbnQNClgtTXMtVmVyc2lvbjogMjAxOS0wMi0wMg0KDQp7IkJpbmFyeSI6IlUyOXRaVUpwYm1GeWVRPT0iLCJCaW5hcnlAb2RhdGEudHlwZSI6IkVkbS5CaW5hcnkiLCJCb29sIjpmYWxzZSwiRGF0ZVRpbWUiOiIyMDEzLTA4LTAyVDE3OjM3OjQzLjAwOTAwNDNaIiwiRGF0ZVRpbWVAb2RhdGEudHlwZSI6IkVkbS5EYXRlVGltZSIsIkRvdWJsZSI6MTIzNC4xMjM0LCJHdWlkIjoiNDE4NTQwNGEtNTgxOC00OGMzLWI5YmUtZjIxN2RmMGRiYTZmIiwiR3VpZEBvZGF0YS50eXBlIjoiRWRtLkd1aWQiLCJJbnQzMiI6MTIzNCwiSW50NjQiOiIxMjM0NTY3ODkwMTIiLCJJbnQ2NEBvZGF0YS50eXBlIjoiRWRtLkludDY0IiwiUGFydGl0aW9uS2V5IjoicGswMDEiLCJSb3dLZXkiOiIyIiwiU3RyaW5nIjoidGVzdCJ9DQotLWNoYW5nZXNldF9jMDExMTk1Ny0yODMwLTQ4NDQtNjM3OS05ZjQwNjFhYThhMjMNCkNvbnRlbnQtVHJhbnNmZXItRW5jb2Rpbmc6IGJpbmFyeQ0KQ29udGVudC1UeXBlOiBhcHBsaWNhdGlvbi9odHRwDQoNClBPU1QgaHR0cHM6Ly9zZWFua2FuZXByaW0udGFibGUuY29zbW9zLmF6dXJlLmNvbS90YWJsZU5hbWUxMDc0NjIxMzgzPyUyNGZvcm1hdD1hcHBsaWNhdGlvbiUyRmpzb24lM0JvZGF0YSUzRG1pbmltYWxtZXRhZGF0YSBIVFRQLzEuMQ0KQWNjZXB0OiBhcHBsaWNhdGlvbi9qc29uO29kYXRhPW1pbmltYWxtZXRhZGF0YQ0KQ29udGVudC1MZW5ndGg6IDM2Nw0KQ29udGVudC1UeXBlOiBhcHBsaWNhdGlvbi9qc29uDQpEYXRhc2VydmljZXZlcnNpb246IDMuMA0KUHJlZmVyOiByZXR1cm4tbm8tY29udGVudA0KWC1Ncy1WZXJzaW9uOiAyMDE5LTAyLTAyDQoNCnsiQmluYXJ5IjoiVTI5dFpVSnBibUZ5ZVE9PSIsIkJpbmFyeUBvZGF0YS50eXBlIjoiRWRtLkJpbmFyeSIsIkJvb2wiOmZhbHNlLCJEYXRlVGltZSI6IjIwMTMtMDgtMDJUMTc6Mzc6NDMuMDA5MDA0M1oiLCJEYXRlVGltZUBvZGF0YS50eXBlIjoiRWRtLkRhdGVUaW1lIiwiRG91YmxlIjoxMjM0LjEyMzQsIkd1aWQiOiI0MTg1NDA0YS01ODE4LTQ4YzMtYjliZS1mMjE3ZGYwZGJhNmYiLCJHdWlkQG9kYXRhLnR5cGUiOiJFZG0uR3VpZCIsIkludDMyIjoxMjM0LCJJbnQ2NCI6IjEyMzQ1Njc4OTAxMiIsIkludDY0QG9kYXRhLnR5cGUiOiJFZG0uSW50NjQiLCJQYXJ0aXRpb25LZXkiOiJwazAwMSIsIlJvd0tleSI6IjMiLCJTdHJpbmciOiJ0ZXN0In0NCi0tY2hhbmdlc2V0X2MwMTExOTU3LTI4MzAtNDg0NC02Mzc5LTlmNDA2MWFhOGEyMw0KQ29udGVudC1UcmFuc2Zlci1FbmNvZGluZzogYmluYXJ5DQpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL2h0dHANCg0KUE9TVCBodHRwczovL3NlYW5rYW5lcHJpbS50YWJsZS5jb3Ntb3MuYXp1cmUuY29tL3RhYmxlTmFtZTEwNzQ2MjEzODM/JTI0Zm9ybWF0PWFwcGxpY2F0aW9uJTJGanNvbiUzQm9kYXRhJTNEbWluaW1hbG1ldGFkYXRhIEhUVFAvMS4xDQpBY2NlcHQ6IGFwcGxpY2F0aW9uL2pzb247b2RhdGE9bWluaW1hbG1ldGFkYXRhDQpDb250ZW50LUxlbmd0aDogMzY3DQpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL2pzb24NCkRhdGFzZXJ2aWNldmVyc2lvbjogMy4wDQpQcmVmZXI6IHJldHVybi1uby1jb250ZW50DQpYLU1zLVZlcnNpb246IDIwMTktMDItMDINCg0KeyJCaW5hcnkiOiJVMjl0WlVKcGJtRnllUT09IiwiQmluYXJ5QG9kYXRhLnR5cGUiOiJFZG0uQmluYXJ5IiwiQm9vbCI6ZmFsc2UsIkRhdGVUaW1lIjoiMjAxMy0wOC0wMlQxNzozNzo0My4wMDkwMDQzWiIsIkRhdGVUaW1lQG9kYXRhLnR5cGUiOiJFZG0uRGF0ZVRpbWUiLCJEb3VibGUiOjEyMzQuMTIzNCwiR3VpZCI6IjQxODU0MDRhLTU4MTgtNDhjMy1iOWJlLWYyMTdkZjBkYmE2ZiIsIkd1aWRAb2RhdGEudHlwZSI6IkVkbS5HdWlkIiwiSW50MzIiOjEyMzQsIkludDY0IjoiMTIzNDU2Nzg5MDEyIiwiSW50NjRAb2RhdGEudHlwZSI6IkVkbS5JbnQ2NCIsIlBhcnRpdGlvbktleSI6InBrMDAxIiwiUm93S2V5IjoiNCIsIlN0cmluZyI6InRlc3QifQ0KLS1jaGFuZ2VzZXRfYzAxMTE5NTctMjgzMC00ODQ0LTYzNzktOWY0MDYxYWE4YTIzDQpDb250ZW50LVRyYW5zZmVyLUVuY29kaW5nOiBiaW5hcnkNCkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vaHR0cA0KDQpQT1NUIGh0dHBzOi8vc2VhbmthbmVwcmltLnRhYmxlLmNvc21vcy5henVyZS5jb20vdGFibGVOYW1lMTA3NDYyMTM4Mz8lMjRmb3JtYXQ9YXBwbGljYXRpb24lMkZqc29uJTNCb2RhdGElM0RtaW5pbWFsbWV0YWRhdGEgSFRUUC8xLjENCkFjY2VwdDogYXBwbGljYXRpb24vanNvbjtvZGF0YT1taW5pbWFsbWV0YWRhdGENCkNvbnRlbnQtTGVuZ3RoOiAzNjcNCkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vanNvbg0KRGF0YXNlcnZpY2V2ZXJzaW9uOiAzLjANClByZWZlcjogcmV0dXJuLW5vLWNvbnRlbnQNClgtTXMtVmVyc2lvbjogMjAxOS0wMi0wMg0KDQp7IkJpbmFyeSI6IlUyOXRaVUpwYm1GeWVRPT0iLCJCaW5hcnlAb2RhdGEudHlwZSI6IkVkbS5CaW5hcnkiLCJCb29sIjpmYWxzZSwiRGF0ZVRpbWUiOiIyMDEzLTA4LTAyVDE3OjM3OjQzLjAwOTAwNDNaIiwiRGF0ZVRpbWVAb2RhdGEudHlwZSI6IkVkbS5EYXRlVGltZSIsIkRvdWJsZSI6MTIzNC4xMjM0LCJHdWlkIjoiNDE4NTQwNGEtNTgxOC00OGMzLWI5YmUtZjIxN2RmMGRiYTZmIiwiR3VpZEBvZGF0YS50eXBlIjoiRWRtLkd1aWQiLCJJbnQzMiI6MTIzNCwiSW50NjQiOiIxMjM0NTY3ODkwMTIiLCJJbnQ2NEBvZGF0YS50eXBlIjoiRWRtLkludDY0IiwiUGFydGl0aW9uS2V5IjoicGswMDEiLCJSb3dLZXkiOiI1IiwiU3RyaW5nIjoidGVzdCJ9DQotLWNoYW5nZXNldF9jMDExMTk1Ny0yODMwLTQ4NDQtNjM3OS05ZjQwNjFhYThhMjMtLQ0KDQotLWJhdGNoX2JjMTg3N2I4LWE0MmQtNDJmNy02OWE3LTQyZjZmNTg2Mzg5ZS0tDQo=", + "StatusCode": 202, + "ResponseHeaders": { + "Content-Type": "multipart/mixed; boundary=batchresponse_79b09a64-14c4-48e8-ad69-a3d7358bdf94", + "Date": "Mon, 02 Aug 2021 18:01:43 GMT", + "Transfer-Encoding": "chunked", + "x-ms-request-id": "7138b65a-342a-4366-9657-f0a68587fe74" + }, + "ResponseBody": "LS1iYXRjaHJlc3BvbnNlXzc5YjA5YTY0LTE0YzQtNDhlOC1hZDY5LWEzZDczNThiZGY5NA0KQ29udGVudC1UeXBlOiBtdWx0aXBhcnQvbWl4ZWQ7IGJvdW5kYXJ5PWNoYW5nZXNldHJlc3BvbnNlXzhiNzU1MDg3LWI3MjItNGFmNy04MWFlLTRmNWFhNTBmMzY2MQ0KDQotLWNoYW5nZXNldHJlc3BvbnNlXzhiNzU1MDg3LWI3MjItNGFmNy04MWFlLTRmNWFhNTBmMzY2MQpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL2h0dHAKQ29udGVudC1UcmFuc2Zlci1FbmNvZGluZzogYmluYXJ5CgpIVFRQLzEuMSAyMDQgTm8gQ29udGVudA0KRVRhZzogVy8iZGF0ZXRpbWUnMjAyMS0wOC0wMlQxOCUzQTAxJTNBNDMuODk2MTY3MlonIg0KUHJlZmVyZW5jZS1BcHBsaWVkOiByZXR1cm4tbm8tY29udGVudA0KTG9jYXRpb246IGh0dHBzOi8vc2VhbmthbmVwcmltLnRhYmxlLmNvc21vcy5henVyZS5jb20vdGFibGVOYW1lMTA3NDYyMTM4MyhQYXJ0aXRpb25LZXk9J3BrMDAxJyxSb3dLZXk9JzEnKQ0KQ29udGVudC1JRDogMQ0KDQoNCi0tY2hhbmdlc2V0cmVzcG9uc2VfOGI3NTUwODctYjcyMi00YWY3LTgxYWUtNGY1YWE1MGYzNjYxCkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vaHR0cApDb250ZW50LVRyYW5zZmVyLUVuY29kaW5nOiBiaW5hcnkKCkhUVFAvMS4xIDIwNCBObyBDb250ZW50DQpFVGFnOiBXLyJkYXRldGltZScyMDIxLTA4LTAyVDE4JTNBMDElM0E0My44OTY2NzkyWiciDQpQcmVmZXJlbmNlLUFwcGxpZWQ6IHJldHVybi1uby1jb250ZW50DQpMb2NhdGlvbjogaHR0cHM6Ly9zZWFua2FuZXByaW0udGFibGUuY29zbW9zLmF6dXJlLmNvbS90YWJsZU5hbWUxMDc0NjIxMzgzKFBhcnRpdGlvbktleT0ncGswMDEnLFJvd0tleT0nMicpDQpDb250ZW50LUlEOiAyDQoNCg0KLS1jaGFuZ2VzZXRyZXNwb25zZV84Yjc1NTA4Ny1iNzIyLTRhZjctODFhZS00ZjVhYTUwZjM2NjEKQ29udGVudC1UeXBlOiBhcHBsaWNhdGlvbi9odHRwCkNvbnRlbnQtVHJhbnNmZXItRW5jb2Rpbmc6IGJpbmFyeQoKSFRUUC8xLjEgMjA0IE5vIENvbnRlbnQNCkVUYWc6IFcvImRhdGV0aW1lJzIwMjEtMDgtMDJUMTglM0EwMSUzQTQzLjg5NzA4ODhaJyINClByZWZlcmVuY2UtQXBwbGllZDogcmV0dXJuLW5vLWNvbnRlbnQNCkxvY2F0aW9uOiBodHRwczovL3NlYW5rYW5lcHJpbS50YWJsZS5jb3Ntb3MuYXp1cmUuY29tL3RhYmxlTmFtZTEwNzQ2MjEzODMoUGFydGl0aW9uS2V5PSdwazAwMScsUm93S2V5PSczJykNCkNvbnRlbnQtSUQ6IDMNCg0KDQotLWNoYW5nZXNldHJlc3BvbnNlXzhiNzU1MDg3LWI3MjItNGFmNy04MWFlLTRmNWFhNTBmMzY2MQpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL2h0dHAKQ29udGVudC1UcmFuc2Zlci1FbmNvZGluZzogYmluYXJ5CgpIVFRQLzEuMSAyMDQgTm8gQ29udGVudA0KRVRhZzogVy8iZGF0ZXRpbWUnMjAyMS0wOC0wMlQxOCUzQTAxJTNBNDMuODk3NDk4NFonIg0KUHJlZmVyZW5jZS1BcHBsaWVkOiByZXR1cm4tbm8tY29udGVudA0KTG9jYXRpb246IGh0dHBzOi8vc2VhbmthbmVwcmltLnRhYmxlLmNvc21vcy5henVyZS5jb20vdGFibGVOYW1lMTA3NDYyMTM4MyhQYXJ0aXRpb25LZXk9J3BrMDAxJyxSb3dLZXk9JzQnKQ0KQ29udGVudC1JRDogNA0KDQoNCi0tY2hhbmdlc2V0cmVzcG9uc2VfOGI3NTUwODctYjcyMi00YWY3LTgxYWUtNGY1YWE1MGYzNjYxCkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vaHR0cApDb250ZW50LVRyYW5zZmVyLUVuY29kaW5nOiBiaW5hcnkKCkhUVFAvMS4xIDIwNCBObyBDb250ZW50DQpFVGFnOiBXLyJkYXRldGltZScyMDIxLTA4LTAyVDE4JTNBMDElM0E0My44OTc5MDgwWiciDQpQcmVmZXJlbmNlLUFwcGxpZWQ6IHJldHVybi1uby1jb250ZW50DQpMb2NhdGlvbjogaHR0cHM6Ly9zZWFua2FuZXByaW0udGFibGUuY29zbW9zLmF6dXJlLmNvbS90YWJsZU5hbWUxMDc0NjIxMzgzKFBhcnRpdGlvbktleT0ncGswMDEnLFJvd0tleT0nNScpDQpDb250ZW50LUlEOiA1DQoNCg0KLS1jaGFuZ2VzZXRyZXNwb25zZV84Yjc1NTA4Ny1iNzIyLTRhZjctODFhZS00ZjVhYTUwZjM2NjEtLQotLWJhdGNocmVzcG9uc2VfNzliMDlhNjQtMTRjNC00OGU4LWFkNjktYTNkNzM1OGJkZjk0LS0NCg==" + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/$batch", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/$batch", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "2261", + "Content-Type": "multipart/mixed; boundary=batch_8c9f1c57-354b-4894-53b2-afe5e16b1a9a", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:44 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": "LS1iYXRjaF84YzlmMWM1Ny0zNTRiLTQ4OTQtNTNiMi1hZmU1ZTE2YjFhOWENCkNvbnRlbnQtVHlwZTogbXVsdGlwYXJ0L21peGVkOyBib3VuZGFyeT1jaGFuZ2VzZXRfNDM3NWQyZjItM2Y0ZC00NGQxLTc5NzctZDY0NjMwOTA0YzA3DQoNCi0tY2hhbmdlc2V0XzQzNzVkMmYyLTNmNGQtNDRkMS03OTc3LWQ2NDYzMDkwNGMwNw0KQ29udGVudC1UcmFuc2Zlci1FbmNvZGluZzogYmluYXJ5DQpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL2h0dHANCg0KUE9TVCBodHRwczovL3NlYW5rYW5lcHJpbS50YWJsZS5jb3Ntb3MuYXp1cmUuY29tL3RhYmxlTmFtZTEwNzQ2MjEzODMoUGFydGl0aW9uS2V5PSdwazAwMScsUm93S2V5PScxJyk/JTI0Zm9ybWF0PWFwcGxpY2F0aW9uJTJGanNvbiUzQm9kYXRhJTNEbWluaW1hbG1ldGFkYXRhIEhUVFAvMS4xDQpBY2NlcHQ6IGFwcGxpY2F0aW9uL2pzb24NCkNvbnRlbnQtTGVuZ3RoOiAzNjcNCkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vanNvbg0KRGF0YXNlcnZpY2V2ZXJzaW9uOiAzLjANCklmLU1hdGNoOiAqDQpYLUh0dHAtTWV0aG9kOiBNRVJHRQ0KWC1Ncy1WZXJzaW9uOiAyMDE5LTAyLTAyDQoNCnsiQmluYXJ5IjoiVTI5dFpVSnBibUZ5ZVE9PSIsIkJpbmFyeUBvZGF0YS50eXBlIjoiRWRtLkJpbmFyeSIsIkJvb2wiOmZhbHNlLCJEYXRlVGltZSI6IjIwMTMtMDgtMDJUMTc6Mzc6NDMuMDA5MDA0M1oiLCJEYXRlVGltZUBvZGF0YS50eXBlIjoiRWRtLkRhdGVUaW1lIiwiRG91YmxlIjoxMjM0LjEyMzQsIkd1aWQiOiI0MTg1NDA0YS01ODE4LTQ4YzMtYjliZS1mMjE3ZGYwZGJhNmYiLCJHdWlkQG9kYXRhLnR5cGUiOiJFZG0uR3VpZCIsIkludDMyIjoxMjM0LCJJbnQ2NCI6IjEyMzQ1Njc4OTAxMiIsIkludDY0QG9kYXRhLnR5cGUiOiJFZG0uSW50NjQiLCJQYXJ0aXRpb25LZXkiOiJwazAwMSIsIlJvd0tleSI6IjEiLCJTdHJpbmciOiJ0ZXN0In0NCi0tY2hhbmdlc2V0XzQzNzVkMmYyLTNmNGQtNDRkMS03OTc3LWQ2NDYzMDkwNGMwNw0KQ29udGVudC1UcmFuc2Zlci1FbmNvZGluZzogYmluYXJ5DQpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL2h0dHANCg0KUFVUIGh0dHBzOi8vc2VhbmthbmVwcmltLnRhYmxlLmNvc21vcy5henVyZS5jb20vdGFibGVOYW1lMTA3NDYyMTM4MyhQYXJ0aXRpb25LZXk9J3BrMDAxJyxSb3dLZXk9JzInKT8lMjRmb3JtYXQ9YXBwbGljYXRpb24lMkZqc29uJTNCb2RhdGElM0RtaW5pbWFsbWV0YWRhdGEgSFRUUC8xLjENCkFjY2VwdDogYXBwbGljYXRpb24vanNvbg0KQ29udGVudC1MZW5ndGg6IDM2NQ0KQ29udGVudC1UeXBlOiBhcHBsaWNhdGlvbi9qc29uDQpEYXRhc2VydmljZXZlcnNpb246IDMuMA0KSWYtTWF0Y2g6ICoNClgtTXMtVmVyc2lvbjogMjAxOS0wMi0wMg0KDQp7IkJpbmFyeSI6IlUyOXRaVUpwYm1GeWVRPT0iLCJCaW5hcnlAb2RhdGEudHlwZSI6IkVkbS5CaW5hcnkiLCJCb29sIjpmYWxzZSwiRGF0ZVRpbWUiOiIyMDEzLTA4LTAyVDE3OjM3OjQzLjAwOTAwNDNaIiwiRGF0ZVRpbWVAb2RhdGEudHlwZSI6IkVkbS5EYXRlVGltZSIsIkRvdWJsZSI6MTIzNC4xMjM0LCJHdWlkIjoiNDE4NTQwNGEtNTgxOC00OGMzLWI5YmUtZjIxN2RmMGRiYTZmIiwiR3VpZEBvZGF0YS50eXBlIjoiRWRtLkd1aWQiLCJJbnQzMiI6MTAsIkludDY0IjoiMTIzNDU2Nzg5MDEyIiwiSW50NjRAb2RhdGEudHlwZSI6IkVkbS5JbnQ2NCIsIlBhcnRpdGlvbktleSI6InBrMDAxIiwiUm93S2V5IjoiMiIsIlN0cmluZyI6InRlc3QifQ0KLS1jaGFuZ2VzZXRfNDM3NWQyZjItM2Y0ZC00NGQxLTc5NzctZDY0NjMwOTA0YzA3DQpDb250ZW50LVRyYW5zZmVyLUVuY29kaW5nOiBiaW5hcnkNCkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vaHR0cA0KDQpERUxFVEUgaHR0cHM6Ly9zZWFua2FuZXByaW0udGFibGUuY29zbW9zLmF6dXJlLmNvbS90YWJsZU5hbWUxMDc0NjIxMzgzKFBhcnRpdGlvbktleT0ncGswMDEnLFJvd0tleT0nMycpPyUyNGZvcm1hdD1hcHBsaWNhdGlvbiUyRmpzb24lM0JvZGF0YSUzRG1pbmltYWxtZXRhZGF0YSBIVFRQLzEuMQ0KQWNjZXB0OiBhcHBsaWNhdGlvbi9qc29uO29kYXRhPW1pbmltYWxtZXRhZGF0YQ0KRGF0YXNlcnZpY2V2ZXJzaW9uOiAzLjANCklmLU1hdGNoOiAqDQpYLU1zLVZlcnNpb246IDIwMTktMDItMDINCg0KDQotLWNoYW5nZXNldF80Mzc1ZDJmMi0zZjRkLTQ0ZDEtNzk3Ny1kNjQ2MzA5MDRjMDctLQ0KDQotLWJhdGNoXzhjOWYxYzU3LTM1NGItNDg5NC01M2IyLWFmZTVlMTZiMWE5YS0tDQo=", + "StatusCode": 202, + "ResponseHeaders": { + "Content-Type": "multipart/mixed; boundary=batchresponse_0037cfd4-65de-481a-af44-758570372054", + "Date": "Mon, 02 Aug 2021 18:01:43 GMT", + "Transfer-Encoding": "chunked", + "x-ms-request-id": "b86cfb14-de90-4173-b060-abb31494f4b3" + }, + "ResponseBody": "LS1iYXRjaHJlc3BvbnNlXzAwMzdjZmQ0LTY1ZGUtNDgxYS1hZjQ0LTc1ODU3MDM3MjA1NA0KQ29udGVudC1UeXBlOiBtdWx0aXBhcnQvbWl4ZWQ7IGJvdW5kYXJ5PWNoYW5nZXNldHJlc3BvbnNlXzYyZWRhZmE1LTE3MGQtNDZkYi1iZjJhLWQ1NjUxNjIxMmEwMQ0KDQotLWNoYW5nZXNldHJlc3BvbnNlXzYyZWRhZmE1LTE3MGQtNDZkYi1iZjJhLWQ1NjUxNjIxMmEwMQpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL2h0dHAKQ29udGVudC1UcmFuc2Zlci1FbmNvZGluZzogYmluYXJ5CgpIVFRQLzEuMSAyMDQgTm8gQ29udGVudA0KRVRhZzogVy8iZGF0ZXRpbWUnMjAyMS0wOC0wMlQxOCUzQTAxJTNBNDQuMDQ5ODY5NlonIg0KQ29udGVudC1JRDogMQ0KDQoNCi0tY2hhbmdlc2V0cmVzcG9uc2VfNjJlZGFmYTUtMTcwZC00NmRiLWJmMmEtZDU2NTE2MjEyYTAxCkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vaHR0cApDb250ZW50LVRyYW5zZmVyLUVuY29kaW5nOiBiaW5hcnkKCkhUVFAvMS4xIDIwNCBObyBDb250ZW50DQpFVGFnOiBXLyJkYXRldGltZScyMDIxLTA4LTAyVDE4JTNBMDElM0E0NC4wNTA2ODg4WiciDQpDb250ZW50LUlEOiAyDQoNCg0KLS1jaGFuZ2VzZXRyZXNwb25zZV82MmVkYWZhNS0xNzBkLTQ2ZGItYmYyYS1kNTY1MTYyMTJhMDEKQ29udGVudC1UeXBlOiBhcHBsaWNhdGlvbi9odHRwCkNvbnRlbnQtVHJhbnNmZXItRW5jb2Rpbmc6IGJpbmFyeQoKSFRUUC8xLjEgMjA0IE5vIENvbnRlbnQNCkNvbnRlbnQtSUQ6IDMNCg0KDQotLWNoYW5nZXNldHJlc3BvbnNlXzYyZWRhZmE1LTE3MGQtNDZkYi1iZjJhLWQ1NjUxNjIxMmEwMS0tCi0tYmF0Y2hyZXNwb25zZV8wMDM3Y2ZkNC02NWRlLTQ4MWEtYWY0NC03NTg1NzAzNzIwNTQtLQ0K" + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/tableName1074621383(PartitionKey=\u0027pk001\u0027,RowKey=\u00271\u0027)", + "RequestMethod": "GET", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "GET", + ":path": "/tableName1074621383(PartitionKey=\u0027pk001\u0027,RowKey=\u00271\u0027)", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:44 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "Date": "Mon, 02 Aug 2021 18:01:43 GMT", + "ETag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A44.0498696Z\u0027\u0022", + "Transfer-Encoding": "chunked", + "x-ms-request-id": "5995c940-6683-4393-8e83-bda2de896b25" + }, + "ResponseBody": { + "odata.metadata": "https://seankaneprim.table.cosmos.azure.com/tableName1074621383/$metadata#tableName1074621383/@Element", + "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A44.0498696Z\u0027\u0022", + "Binary@odata.type": "Edm.Binary", + "Binary": "U29tZUJpbmFyeQ==", + "Bool": false, + "DateTime@odata.type": "Edm.DateTime", + "DateTime": "2013-08-02T17:37:43.0090043Z", + "Double": 1234.1234, + "Guid@odata.type": "Edm.Guid", + "Guid": "4185404a-5818-48c3-b9be-f217df0dba6f", + "Int32": 1234, + "Int64@odata.type": "Edm.Int64", + "Int64": "123456789012", + "PartitionKey": "pk001", + "RowKey": "1", + "String": "test", + "Timestamp": "2021-08-02T18:01:44.0498696Z" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/tableName1074621383(PartitionKey=\u0027pk001\u0027,RowKey=\u00272\u0027)", + "RequestMethod": "GET", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "GET", + ":path": "/tableName1074621383(PartitionKey=\u0027pk001\u0027,RowKey=\u00272\u0027)", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:45 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "Date": "Mon, 02 Aug 2021 18:01:44 GMT", + "ETag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A44.0506888Z\u0027\u0022", + "Transfer-Encoding": "chunked", + "x-ms-request-id": "076c1953-6fad-49e2-8102-8355b4aa8d9f" + }, + "ResponseBody": { + "odata.metadata": "https://seankaneprim.table.cosmos.azure.com/tableName1074621383/$metadata#tableName1074621383/@Element", + "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A44.0506888Z\u0027\u0022", + "PartitionKey": "pk001", + "RowKey": "2", + "Binary@odata.type": "Edm.Binary", + "Binary": "U29tZUJpbmFyeQ==", + "Bool": false, + "DateTime@odata.type": "Edm.DateTime", + "DateTime": "2013-08-02T17:37:43.0090043Z", + "Double": 1234.1234, + "Guid@odata.type": "Edm.Guid", + "Guid": "4185404a-5818-48c3-b9be-f217df0dba6f", + "Int32": 10, + "Int64@odata.type": "Edm.Int64", + "Int64": "123456789012", + "String": "test", + "Timestamp": "2021-08-02T18:01:44.0506888Z" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/tableName1074621383(PartitionKey=\u0027pk001\u0027,RowKey=\u00273\u0027)", + "RequestMethod": "GET", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "GET", + ":path": "/tableName1074621383(PartitionKey=\u0027pk001\u0027,RowKey=\u00273\u0027)", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:45 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 404, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "Date": "Mon, 02 Aug 2021 18:01:44 GMT", + "Transfer-Encoding": "chunked", + "x-ms-request-id": "6636aa61-695f-47b9-930d-25a49b5f7cb4" + }, + "ResponseBody": [ + "{\u0022odata.error\u0022:{\u0022code\u0022:\u0022ResourceNotFound\u0022,\u0022message\u0022:{\u0022lang\u0022:\u0022en-us\u0022,\u0022value\u0022:\u0022The specified resource does not exist.\\nRequestID:6636aa61-695f-47b9-930d-25a49b5f7cb4\\n\u0022}}}\r\n" + ] + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables(\u0027tableName1074621383\u0027)", + "RequestMethod": "DELETE", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "DELETE", + ":path": "/Tables(\u0027tableName1074621383\u0027)", + ":scheme": "https", + "Accept": "application/json", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:45 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "Date": "Mon, 02 Aug 2021 18:01:44 GMT", + "x-ms-request-id": "6bbd5f8f-e01a-4b22-8e59-8032cf089291" + }, + "ResponseBody": null + } + ], + "Variables": {} +} \ No newline at end of file diff --git a/sdk/tables/aztable/recordings/TestBatchComplex/TestBatchComplex_storage.json b/sdk/tables/aztable/recordings/TestBatchComplex/TestBatchComplex_storage.json new file mode 100644 index 000000000000..8c32cf8ca5da --- /dev/null +++ b/sdk/tables/aztable/recordings/TestBatchComplex/TestBatchComplex_storage.json @@ -0,0 +1,295 @@ +{ + "Entries": [ + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/Tables", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "34", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:42 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "TableName": "tableName223571584" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", + "Date": "Mon, 02 Aug 2021 18:01:41 GMT", + "Location": "https://seankaneprim.table.core.windows.net/Tables(\u0027tableName223571584\u0027)", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b5035-9002-0057-67c8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": { + "odata.metadata": "https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element", + "TableName": "tableName223571584" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/$batch", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/$batch", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "4248", + "Content-Type": "multipart/mixed; boundary=batch_46b3211d-45e6-466c-7436-ebf92a82b7c2", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:42 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": "LS1iYXRjaF80NmIzMjExZC00NWU2LTQ2NmMtNzQzNi1lYmY5MmE4MmI3YzINCkNvbnRlbnQtVHlwZTogbXVsdGlwYXJ0L21peGVkOyBib3VuZGFyeT1jaGFuZ2VzZXRfZjE3YmFlMGYtN2Q0Zi00ZDRiLTU2MGItNDc5M2RiMzljNzcyDQoNCi0tY2hhbmdlc2V0X2YxN2JhZTBmLTdkNGYtNGQ0Yi01NjBiLTQ3OTNkYjM5Yzc3Mg0KQ29udGVudC1UcmFuc2Zlci1FbmNvZGluZzogYmluYXJ5DQpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL2h0dHANCg0KUE9TVCBodHRwczovL3NlYW5rYW5lcHJpbS50YWJsZS5jb3JlLndpbmRvd3MubmV0L3RhYmxlTmFtZTIyMzU3MTU4ND8lMjRmb3JtYXQ9YXBwbGljYXRpb24lMkZqc29uJTNCb2RhdGElM0RtaW5pbWFsbWV0YWRhdGEgSFRUUC8xLjENCkFjY2VwdDogYXBwbGljYXRpb24vanNvbjtvZGF0YT1taW5pbWFsbWV0YWRhdGENCkNvbnRlbnQtTGVuZ3RoOiAzNjcNCkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vanNvbg0KRGF0YXNlcnZpY2V2ZXJzaW9uOiAzLjANClByZWZlcjogcmV0dXJuLW5vLWNvbnRlbnQNClgtTXMtVmVyc2lvbjogMjAxOS0wMi0wMg0KDQp7IkJpbmFyeSI6IlUyOXRaVUpwYm1GeWVRPT0iLCJCaW5hcnlAb2RhdGEudHlwZSI6IkVkbS5CaW5hcnkiLCJCb29sIjpmYWxzZSwiRGF0ZVRpbWUiOiIyMDEzLTA4LTAyVDE3OjM3OjQzLjAwOTAwNDNaIiwiRGF0ZVRpbWVAb2RhdGEudHlwZSI6IkVkbS5EYXRlVGltZSIsIkRvdWJsZSI6MTIzNC4xMjM0LCJHdWlkIjoiNDE4NTQwNGEtNTgxOC00OGMzLWI5YmUtZjIxN2RmMGRiYTZmIiwiR3VpZEBvZGF0YS50eXBlIjoiRWRtLkd1aWQiLCJJbnQzMiI6MTIzNCwiSW50NjQiOiIxMjM0NTY3ODkwMTIiLCJJbnQ2NEBvZGF0YS50eXBlIjoiRWRtLkludDY0IiwiUGFydGl0aW9uS2V5IjoicGswMDEiLCJSb3dLZXkiOiIxIiwiU3RyaW5nIjoidGVzdCJ9DQotLWNoYW5nZXNldF9mMTdiYWUwZi03ZDRmLTRkNGItNTYwYi00NzkzZGIzOWM3NzINCkNvbnRlbnQtVHJhbnNmZXItRW5jb2Rpbmc6IGJpbmFyeQ0KQ29udGVudC1UeXBlOiBhcHBsaWNhdGlvbi9odHRwDQoNClBPU1QgaHR0cHM6Ly9zZWFua2FuZXByaW0udGFibGUuY29yZS53aW5kb3dzLm5ldC90YWJsZU5hbWUyMjM1NzE1ODQ/JTI0Zm9ybWF0PWFwcGxpY2F0aW9uJTJGanNvbiUzQm9kYXRhJTNEbWluaW1hbG1ldGFkYXRhIEhUVFAvMS4xDQpBY2NlcHQ6IGFwcGxpY2F0aW9uL2pzb247b2RhdGE9bWluaW1hbG1ldGFkYXRhDQpDb250ZW50LUxlbmd0aDogMzY3DQpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL2pzb24NCkRhdGFzZXJ2aWNldmVyc2lvbjogMy4wDQpQcmVmZXI6IHJldHVybi1uby1jb250ZW50DQpYLU1zLVZlcnNpb246IDIwMTktMDItMDINCg0KeyJCaW5hcnkiOiJVMjl0WlVKcGJtRnllUT09IiwiQmluYXJ5QG9kYXRhLnR5cGUiOiJFZG0uQmluYXJ5IiwiQm9vbCI6ZmFsc2UsIkRhdGVUaW1lIjoiMjAxMy0wOC0wMlQxNzozNzo0My4wMDkwMDQzWiIsIkRhdGVUaW1lQG9kYXRhLnR5cGUiOiJFZG0uRGF0ZVRpbWUiLCJEb3VibGUiOjEyMzQuMTIzNCwiR3VpZCI6IjQxODU0MDRhLTU4MTgtNDhjMy1iOWJlLWYyMTdkZjBkYmE2ZiIsIkd1aWRAb2RhdGEudHlwZSI6IkVkbS5HdWlkIiwiSW50MzIiOjEyMzQsIkludDY0IjoiMTIzNDU2Nzg5MDEyIiwiSW50NjRAb2RhdGEudHlwZSI6IkVkbS5JbnQ2NCIsIlBhcnRpdGlvbktleSI6InBrMDAxIiwiUm93S2V5IjoiMiIsIlN0cmluZyI6InRlc3QifQ0KLS1jaGFuZ2VzZXRfZjE3YmFlMGYtN2Q0Zi00ZDRiLTU2MGItNDc5M2RiMzljNzcyDQpDb250ZW50LVRyYW5zZmVyLUVuY29kaW5nOiBiaW5hcnkNCkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vaHR0cA0KDQpQT1NUIGh0dHBzOi8vc2VhbmthbmVwcmltLnRhYmxlLmNvcmUud2luZG93cy5uZXQvdGFibGVOYW1lMjIzNTcxNTg0PyUyNGZvcm1hdD1hcHBsaWNhdGlvbiUyRmpzb24lM0JvZGF0YSUzRG1pbmltYWxtZXRhZGF0YSBIVFRQLzEuMQ0KQWNjZXB0OiBhcHBsaWNhdGlvbi9qc29uO29kYXRhPW1pbmltYWxtZXRhZGF0YQ0KQ29udGVudC1MZW5ndGg6IDM2Nw0KQ29udGVudC1UeXBlOiBhcHBsaWNhdGlvbi9qc29uDQpEYXRhc2VydmljZXZlcnNpb246IDMuMA0KUHJlZmVyOiByZXR1cm4tbm8tY29udGVudA0KWC1Ncy1WZXJzaW9uOiAyMDE5LTAyLTAyDQoNCnsiQmluYXJ5IjoiVTI5dFpVSnBibUZ5ZVE9PSIsIkJpbmFyeUBvZGF0YS50eXBlIjoiRWRtLkJpbmFyeSIsIkJvb2wiOmZhbHNlLCJEYXRlVGltZSI6IjIwMTMtMDgtMDJUMTc6Mzc6NDMuMDA5MDA0M1oiLCJEYXRlVGltZUBvZGF0YS50eXBlIjoiRWRtLkRhdGVUaW1lIiwiRG91YmxlIjoxMjM0LjEyMzQsIkd1aWQiOiI0MTg1NDA0YS01ODE4LTQ4YzMtYjliZS1mMjE3ZGYwZGJhNmYiLCJHdWlkQG9kYXRhLnR5cGUiOiJFZG0uR3VpZCIsIkludDMyIjoxMjM0LCJJbnQ2NCI6IjEyMzQ1Njc4OTAxMiIsIkludDY0QG9kYXRhLnR5cGUiOiJFZG0uSW50NjQiLCJQYXJ0aXRpb25LZXkiOiJwazAwMSIsIlJvd0tleSI6IjMiLCJTdHJpbmciOiJ0ZXN0In0NCi0tY2hhbmdlc2V0X2YxN2JhZTBmLTdkNGYtNGQ0Yi01NjBiLTQ3OTNkYjM5Yzc3Mg0KQ29udGVudC1UcmFuc2Zlci1FbmNvZGluZzogYmluYXJ5DQpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL2h0dHANCg0KUE9TVCBodHRwczovL3NlYW5rYW5lcHJpbS50YWJsZS5jb3JlLndpbmRvd3MubmV0L3RhYmxlTmFtZTIyMzU3MTU4ND8lMjRmb3JtYXQ9YXBwbGljYXRpb24lMkZqc29uJTNCb2RhdGElM0RtaW5pbWFsbWV0YWRhdGEgSFRUUC8xLjENCkFjY2VwdDogYXBwbGljYXRpb24vanNvbjtvZGF0YT1taW5pbWFsbWV0YWRhdGENCkNvbnRlbnQtTGVuZ3RoOiAzNjcNCkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vanNvbg0KRGF0YXNlcnZpY2V2ZXJzaW9uOiAzLjANClByZWZlcjogcmV0dXJuLW5vLWNvbnRlbnQNClgtTXMtVmVyc2lvbjogMjAxOS0wMi0wMg0KDQp7IkJpbmFyeSI6IlUyOXRaVUpwYm1GeWVRPT0iLCJCaW5hcnlAb2RhdGEudHlwZSI6IkVkbS5CaW5hcnkiLCJCb29sIjpmYWxzZSwiRGF0ZVRpbWUiOiIyMDEzLTA4LTAyVDE3OjM3OjQzLjAwOTAwNDNaIiwiRGF0ZVRpbWVAb2RhdGEudHlwZSI6IkVkbS5EYXRlVGltZSIsIkRvdWJsZSI6MTIzNC4xMjM0LCJHdWlkIjoiNDE4NTQwNGEtNTgxOC00OGMzLWI5YmUtZjIxN2RmMGRiYTZmIiwiR3VpZEBvZGF0YS50eXBlIjoiRWRtLkd1aWQiLCJJbnQzMiI6MTIzNCwiSW50NjQiOiIxMjM0NTY3ODkwMTIiLCJJbnQ2NEBvZGF0YS50eXBlIjoiRWRtLkludDY0IiwiUGFydGl0aW9uS2V5IjoicGswMDEiLCJSb3dLZXkiOiI0IiwiU3RyaW5nIjoidGVzdCJ9DQotLWNoYW5nZXNldF9mMTdiYWUwZi03ZDRmLTRkNGItNTYwYi00NzkzZGIzOWM3NzINCkNvbnRlbnQtVHJhbnNmZXItRW5jb2Rpbmc6IGJpbmFyeQ0KQ29udGVudC1UeXBlOiBhcHBsaWNhdGlvbi9odHRwDQoNClBPU1QgaHR0cHM6Ly9zZWFua2FuZXByaW0udGFibGUuY29yZS53aW5kb3dzLm5ldC90YWJsZU5hbWUyMjM1NzE1ODQ/JTI0Zm9ybWF0PWFwcGxpY2F0aW9uJTJGanNvbiUzQm9kYXRhJTNEbWluaW1hbG1ldGFkYXRhIEhUVFAvMS4xDQpBY2NlcHQ6IGFwcGxpY2F0aW9uL2pzb247b2RhdGE9bWluaW1hbG1ldGFkYXRhDQpDb250ZW50LUxlbmd0aDogMzY3DQpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL2pzb24NCkRhdGFzZXJ2aWNldmVyc2lvbjogMy4wDQpQcmVmZXI6IHJldHVybi1uby1jb250ZW50DQpYLU1zLVZlcnNpb246IDIwMTktMDItMDINCg0KeyJCaW5hcnkiOiJVMjl0WlVKcGJtRnllUT09IiwiQmluYXJ5QG9kYXRhLnR5cGUiOiJFZG0uQmluYXJ5IiwiQm9vbCI6ZmFsc2UsIkRhdGVUaW1lIjoiMjAxMy0wOC0wMlQxNzozNzo0My4wMDkwMDQzWiIsIkRhdGVUaW1lQG9kYXRhLnR5cGUiOiJFZG0uRGF0ZVRpbWUiLCJEb3VibGUiOjEyMzQuMTIzNCwiR3VpZCI6IjQxODU0MDRhLTU4MTgtNDhjMy1iOWJlLWYyMTdkZjBkYmE2ZiIsIkd1aWRAb2RhdGEudHlwZSI6IkVkbS5HdWlkIiwiSW50MzIiOjEyMzQsIkludDY0IjoiMTIzNDU2Nzg5MDEyIiwiSW50NjRAb2RhdGEudHlwZSI6IkVkbS5JbnQ2NCIsIlBhcnRpdGlvbktleSI6InBrMDAxIiwiUm93S2V5IjoiNSIsIlN0cmluZyI6InRlc3QifQ0KLS1jaGFuZ2VzZXRfZjE3YmFlMGYtN2Q0Zi00ZDRiLTU2MGItNDc5M2RiMzljNzcyLS0NCg0KLS1iYXRjaF80NmIzMjExZC00NWU2LTQ2NmMtNzQzNi1lYmY5MmE4MmI3YzItLQ0K", + "StatusCode": 202, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Type": "multipart/mixed; boundary=batchresponse_d0e38155-c3f4-480c-97c2-d9f894713bff", + "Date": "Mon, 02 Aug 2021 18:01:41 GMT", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b5062-9002-0057-13c8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": "LS1iYXRjaHJlc3BvbnNlX2QwZTM4MTU1LWMzZjQtNDgwYy05N2MyLWQ5Zjg5NDcxM2JmZg0KQ29udGVudC1UeXBlOiBtdWx0aXBhcnQvbWl4ZWQ7IGJvdW5kYXJ5PWNoYW5nZXNldHJlc3BvbnNlX2ZkZjdkMDE0LTc3MjMtNDQ3Mi04YmQ4LTM4ZTljM2I2ZjJjOQ0KDQotLWNoYW5nZXNldHJlc3BvbnNlX2ZkZjdkMDE0LTc3MjMtNDQ3Mi04YmQ4LTM4ZTljM2I2ZjJjOQ0KQ29udGVudC1UeXBlOiBhcHBsaWNhdGlvbi9odHRwDQpDb250ZW50LVRyYW5zZmVyLUVuY29kaW5nOiBiaW5hcnkNCg0KSFRUUC8xLjEgMjA0IE5vIENvbnRlbnQNClgtQ29udGVudC1UeXBlLU9wdGlvbnM6IG5vc25pZmYNCkNhY2hlLUNvbnRyb2w6IG5vLWNhY2hlDQpQcmVmZXJlbmNlLUFwcGxpZWQ6IHJldHVybi1uby1jb250ZW50DQpEYXRhU2VydmljZVZlcnNpb246IDMuMDsNCkxvY2F0aW9uOiBodHRwczovL3NlYW5rYW5lcHJpbS50YWJsZS5jb3JlLndpbmRvd3MubmV0L3RhYmxlTmFtZTIyMzU3MTU4NChQYXJ0aXRpb25LZXk9J3BrMDAxJyxSb3dLZXk9JzEnKQ0KRGF0YVNlcnZpY2VJZDogaHR0cHM6Ly9zZWFua2FuZXByaW0udGFibGUuY29yZS53aW5kb3dzLm5ldC90YWJsZU5hbWUyMjM1NzE1ODQoUGFydGl0aW9uS2V5PSdwazAwMScsUm93S2V5PScxJykNCkVUYWc6IFcvImRhdGV0aW1lJzIwMjEtMDgtMDJUMTglM0EwMSUzQTQyLjEzMTkwMTdaJyINCg0KDQotLWNoYW5nZXNldHJlc3BvbnNlX2ZkZjdkMDE0LTc3MjMtNDQ3Mi04YmQ4LTM4ZTljM2I2ZjJjOQ0KQ29udGVudC1UeXBlOiBhcHBsaWNhdGlvbi9odHRwDQpDb250ZW50LVRyYW5zZmVyLUVuY29kaW5nOiBiaW5hcnkNCg0KSFRUUC8xLjEgMjA0IE5vIENvbnRlbnQNClgtQ29udGVudC1UeXBlLU9wdGlvbnM6IG5vc25pZmYNCkNhY2hlLUNvbnRyb2w6IG5vLWNhY2hlDQpQcmVmZXJlbmNlLUFwcGxpZWQ6IHJldHVybi1uby1jb250ZW50DQpEYXRhU2VydmljZVZlcnNpb246IDMuMDsNCkxvY2F0aW9uOiBodHRwczovL3NlYW5rYW5lcHJpbS50YWJsZS5jb3JlLndpbmRvd3MubmV0L3RhYmxlTmFtZTIyMzU3MTU4NChQYXJ0aXRpb25LZXk9J3BrMDAxJyxSb3dLZXk9JzInKQ0KRGF0YVNlcnZpY2VJZDogaHR0cHM6Ly9zZWFua2FuZXByaW0udGFibGUuY29yZS53aW5kb3dzLm5ldC90YWJsZU5hbWUyMjM1NzE1ODQoUGFydGl0aW9uS2V5PSdwazAwMScsUm93S2V5PScyJykNCkVUYWc6IFcvImRhdGV0aW1lJzIwMjEtMDgtMDJUMTglM0EwMSUzQTQyLjEzMTkwMTdaJyINCg0KDQotLWNoYW5nZXNldHJlc3BvbnNlX2ZkZjdkMDE0LTc3MjMtNDQ3Mi04YmQ4LTM4ZTljM2I2ZjJjOQ0KQ29udGVudC1UeXBlOiBhcHBsaWNhdGlvbi9odHRwDQpDb250ZW50LVRyYW5zZmVyLUVuY29kaW5nOiBiaW5hcnkNCg0KSFRUUC8xLjEgMjA0IE5vIENvbnRlbnQNClgtQ29udGVudC1UeXBlLU9wdGlvbnM6IG5vc25pZmYNCkNhY2hlLUNvbnRyb2w6IG5vLWNhY2hlDQpQcmVmZXJlbmNlLUFwcGxpZWQ6IHJldHVybi1uby1jb250ZW50DQpEYXRhU2VydmljZVZlcnNpb246IDMuMDsNCkxvY2F0aW9uOiBodHRwczovL3NlYW5rYW5lcHJpbS50YWJsZS5jb3JlLndpbmRvd3MubmV0L3RhYmxlTmFtZTIyMzU3MTU4NChQYXJ0aXRpb25LZXk9J3BrMDAxJyxSb3dLZXk9JzMnKQ0KRGF0YVNlcnZpY2VJZDogaHR0cHM6Ly9zZWFua2FuZXByaW0udGFibGUuY29yZS53aW5kb3dzLm5ldC90YWJsZU5hbWUyMjM1NzE1ODQoUGFydGl0aW9uS2V5PSdwazAwMScsUm93S2V5PSczJykNCkVUYWc6IFcvImRhdGV0aW1lJzIwMjEtMDgtMDJUMTglM0EwMSUzQTQyLjEzMTkwMTdaJyINCg0KDQotLWNoYW5nZXNldHJlc3BvbnNlX2ZkZjdkMDE0LTc3MjMtNDQ3Mi04YmQ4LTM4ZTljM2I2ZjJjOQ0KQ29udGVudC1UeXBlOiBhcHBsaWNhdGlvbi9odHRwDQpDb250ZW50LVRyYW5zZmVyLUVuY29kaW5nOiBiaW5hcnkNCg0KSFRUUC8xLjEgMjA0IE5vIENvbnRlbnQNClgtQ29udGVudC1UeXBlLU9wdGlvbnM6IG5vc25pZmYNCkNhY2hlLUNvbnRyb2w6IG5vLWNhY2hlDQpQcmVmZXJlbmNlLUFwcGxpZWQ6IHJldHVybi1uby1jb250ZW50DQpEYXRhU2VydmljZVZlcnNpb246IDMuMDsNCkxvY2F0aW9uOiBodHRwczovL3NlYW5rYW5lcHJpbS50YWJsZS5jb3JlLndpbmRvd3MubmV0L3RhYmxlTmFtZTIyMzU3MTU4NChQYXJ0aXRpb25LZXk9J3BrMDAxJyxSb3dLZXk9JzQnKQ0KRGF0YVNlcnZpY2VJZDogaHR0cHM6Ly9zZWFua2FuZXByaW0udGFibGUuY29yZS53aW5kb3dzLm5ldC90YWJsZU5hbWUyMjM1NzE1ODQoUGFydGl0aW9uS2V5PSdwazAwMScsUm93S2V5PSc0JykNCkVUYWc6IFcvImRhdGV0aW1lJzIwMjEtMDgtMDJUMTglM0EwMSUzQTQyLjEzMTkwMTdaJyINCg0KDQotLWNoYW5nZXNldHJlc3BvbnNlX2ZkZjdkMDE0LTc3MjMtNDQ3Mi04YmQ4LTM4ZTljM2I2ZjJjOQ0KQ29udGVudC1UeXBlOiBhcHBsaWNhdGlvbi9odHRwDQpDb250ZW50LVRyYW5zZmVyLUVuY29kaW5nOiBiaW5hcnkNCg0KSFRUUC8xLjEgMjA0IE5vIENvbnRlbnQNClgtQ29udGVudC1UeXBlLU9wdGlvbnM6IG5vc25pZmYNCkNhY2hlLUNvbnRyb2w6IG5vLWNhY2hlDQpQcmVmZXJlbmNlLUFwcGxpZWQ6IHJldHVybi1uby1jb250ZW50DQpEYXRhU2VydmljZVZlcnNpb246IDMuMDsNCkxvY2F0aW9uOiBodHRwczovL3NlYW5rYW5lcHJpbS50YWJsZS5jb3JlLndpbmRvd3MubmV0L3RhYmxlTmFtZTIyMzU3MTU4NChQYXJ0aXRpb25LZXk9J3BrMDAxJyxSb3dLZXk9JzUnKQ0KRGF0YVNlcnZpY2VJZDogaHR0cHM6Ly9zZWFua2FuZXByaW0udGFibGUuY29yZS53aW5kb3dzLm5ldC90YWJsZU5hbWUyMjM1NzE1ODQoUGFydGl0aW9uS2V5PSdwazAwMScsUm93S2V5PSc1JykNCkVUYWc6IFcvImRhdGV0aW1lJzIwMjEtMDgtMDJUMTglM0EwMSUzQTQyLjEzMTkwMTdaJyINCg0KDQotLWNoYW5nZXNldHJlc3BvbnNlX2ZkZjdkMDE0LTc3MjMtNDQ3Mi04YmQ4LTM4ZTljM2I2ZjJjOS0tDQotLWJhdGNocmVzcG9uc2VfZDBlMzgxNTUtYzNmNC00ODBjLTk3YzItZDlmODk0NzEzYmZmLS0NCg==" + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/$batch", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/$batch", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "2237", + "Content-Type": "multipart/mixed; boundary=batch_bbd2287c-a7b9-4631-7e34-bb6130733983", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:43 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": "LS1iYXRjaF9iYmQyMjg3Yy1hN2I5LTQ2MzEtN2UzNC1iYjYxMzA3MzM5ODMNCkNvbnRlbnQtVHlwZTogbXVsdGlwYXJ0L21peGVkOyBib3VuZGFyeT1jaGFuZ2VzZXRfOTE4M2VhMzItYjI2Yy00YTg1LTYyYjctZTQ4MDVjZDM5YTFkDQoNCi0tY2hhbmdlc2V0XzkxODNlYTMyLWIyNmMtNGE4NS02MmI3LWU0ODA1Y2QzOWExZA0KQ29udGVudC1UcmFuc2Zlci1FbmNvZGluZzogYmluYXJ5DQpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL2h0dHANCg0KUEFUQ0ggaHR0cHM6Ly9zZWFua2FuZXByaW0udGFibGUuY29yZS53aW5kb3dzLm5ldC90YWJsZU5hbWUyMjM1NzE1ODQoUGFydGl0aW9uS2V5PSdwazAwMScsUm93S2V5PScxJyk/JTI0Zm9ybWF0PWFwcGxpY2F0aW9uJTJGanNvbiUzQm9kYXRhJTNEbWluaW1hbG1ldGFkYXRhIEhUVFAvMS4xDQpBY2NlcHQ6IGFwcGxpY2F0aW9uL2pzb24NCkNvbnRlbnQtTGVuZ3RoOiAzNjcNCkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vanNvbg0KRGF0YXNlcnZpY2V2ZXJzaW9uOiAzLjANCklmLU1hdGNoOiAqDQpYLU1zLVZlcnNpb246IDIwMTktMDItMDINCg0KeyJCaW5hcnkiOiJVMjl0WlVKcGJtRnllUT09IiwiQmluYXJ5QG9kYXRhLnR5cGUiOiJFZG0uQmluYXJ5IiwiQm9vbCI6ZmFsc2UsIkRhdGVUaW1lIjoiMjAxMy0wOC0wMlQxNzozNzo0My4wMDkwMDQzWiIsIkRhdGVUaW1lQG9kYXRhLnR5cGUiOiJFZG0uRGF0ZVRpbWUiLCJEb3VibGUiOjEyMzQuMTIzNCwiR3VpZCI6IjQxODU0MDRhLTU4MTgtNDhjMy1iOWJlLWYyMTdkZjBkYmE2ZiIsIkd1aWRAb2RhdGEudHlwZSI6IkVkbS5HdWlkIiwiSW50MzIiOjEyMzQsIkludDY0IjoiMTIzNDU2Nzg5MDEyIiwiSW50NjRAb2RhdGEudHlwZSI6IkVkbS5JbnQ2NCIsIlBhcnRpdGlvbktleSI6InBrMDAxIiwiUm93S2V5IjoiMSIsIlN0cmluZyI6InRlc3QifQ0KLS1jaGFuZ2VzZXRfOTE4M2VhMzItYjI2Yy00YTg1LTYyYjctZTQ4MDVjZDM5YTFkDQpDb250ZW50LVRyYW5zZmVyLUVuY29kaW5nOiBiaW5hcnkNCkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vaHR0cA0KDQpQVVQgaHR0cHM6Ly9zZWFua2FuZXByaW0udGFibGUuY29yZS53aW5kb3dzLm5ldC90YWJsZU5hbWUyMjM1NzE1ODQoUGFydGl0aW9uS2V5PSdwazAwMScsUm93S2V5PScyJyk/JTI0Zm9ybWF0PWFwcGxpY2F0aW9uJTJGanNvbiUzQm9kYXRhJTNEbWluaW1hbG1ldGFkYXRhIEhUVFAvMS4xDQpBY2NlcHQ6IGFwcGxpY2F0aW9uL2pzb24NCkNvbnRlbnQtTGVuZ3RoOiAzNjUNCkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vanNvbg0KRGF0YXNlcnZpY2V2ZXJzaW9uOiAzLjANCklmLU1hdGNoOiAqDQpYLU1zLVZlcnNpb246IDIwMTktMDItMDINCg0KeyJCaW5hcnkiOiJVMjl0WlVKcGJtRnllUT09IiwiQmluYXJ5QG9kYXRhLnR5cGUiOiJFZG0uQmluYXJ5IiwiQm9vbCI6ZmFsc2UsIkRhdGVUaW1lIjoiMjAxMy0wOC0wMlQxNzozNzo0My4wMDkwMDQzWiIsIkRhdGVUaW1lQG9kYXRhLnR5cGUiOiJFZG0uRGF0ZVRpbWUiLCJEb3VibGUiOjEyMzQuMTIzNCwiR3VpZCI6IjQxODU0MDRhLTU4MTgtNDhjMy1iOWJlLWYyMTdkZjBkYmE2ZiIsIkd1aWRAb2RhdGEudHlwZSI6IkVkbS5HdWlkIiwiSW50MzIiOjEwLCJJbnQ2NCI6IjEyMzQ1Njc4OTAxMiIsIkludDY0QG9kYXRhLnR5cGUiOiJFZG0uSW50NjQiLCJQYXJ0aXRpb25LZXkiOiJwazAwMSIsIlJvd0tleSI6IjIiLCJTdHJpbmciOiJ0ZXN0In0NCi0tY2hhbmdlc2V0XzkxODNlYTMyLWIyNmMtNGE4NS02MmI3LWU0ODA1Y2QzOWExZA0KQ29udGVudC1UcmFuc2Zlci1FbmNvZGluZzogYmluYXJ5DQpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL2h0dHANCg0KREVMRVRFIGh0dHBzOi8vc2VhbmthbmVwcmltLnRhYmxlLmNvcmUud2luZG93cy5uZXQvdGFibGVOYW1lMjIzNTcxNTg0KFBhcnRpdGlvbktleT0ncGswMDEnLFJvd0tleT0nMycpPyUyNGZvcm1hdD1hcHBsaWNhdGlvbiUyRmpzb24lM0JvZGF0YSUzRG1pbmltYWxtZXRhZGF0YSBIVFRQLzEuMQ0KQWNjZXB0OiBhcHBsaWNhdGlvbi9qc29uO29kYXRhPW1pbmltYWxtZXRhZGF0YQ0KRGF0YXNlcnZpY2V2ZXJzaW9uOiAzLjANCklmLU1hdGNoOiAqDQpYLU1zLVZlcnNpb246IDIwMTktMDItMDINCg0KDQotLWNoYW5nZXNldF85MTgzZWEzMi1iMjZjLTRhODUtNjJiNy1lNDgwNWNkMzlhMWQtLQ0KDQotLWJhdGNoX2JiZDIyODdjLWE3YjktNDYzMS03ZTM0LWJiNjEzMDczMzk4My0tDQo=", + "StatusCode": 202, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Type": "multipart/mixed; boundary=batchresponse_f24ee2d2-7807-4a56-91e4-6642251a9fde", + "Date": "Mon, 02 Aug 2021 18:01:41 GMT", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b50c1-9002-0057-6fc8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": "LS1iYXRjaHJlc3BvbnNlX2YyNGVlMmQyLTc4MDctNGE1Ni05MWU0LTY2NDIyNTFhOWZkZQ0KQ29udGVudC1UeXBlOiBtdWx0aXBhcnQvbWl4ZWQ7IGJvdW5kYXJ5PWNoYW5nZXNldHJlc3BvbnNlXzMzZjU5MGU5LTkzZDUtNGMwMi05ZmE4LTNlMDQxOTYyMjA4MQ0KDQotLWNoYW5nZXNldHJlc3BvbnNlXzMzZjU5MGU5LTkzZDUtNGMwMi05ZmE4LTNlMDQxOTYyMjA4MQ0KQ29udGVudC1UeXBlOiBhcHBsaWNhdGlvbi9odHRwDQpDb250ZW50LVRyYW5zZmVyLUVuY29kaW5nOiBiaW5hcnkNCg0KSFRUUC8xLjEgMjA0IE5vIENvbnRlbnQNClgtQ29udGVudC1UeXBlLU9wdGlvbnM6IG5vc25pZmYNCkNhY2hlLUNvbnRyb2w6IG5vLWNhY2hlDQpEYXRhU2VydmljZVZlcnNpb246IDEuMDsNCkVUYWc6IFcvImRhdGV0aW1lJzIwMjEtMDgtMDJUMTglM0EwMSUzQTQyLjM5MDcyNDJaJyINCg0KDQotLWNoYW5nZXNldHJlc3BvbnNlXzMzZjU5MGU5LTkzZDUtNGMwMi05ZmE4LTNlMDQxOTYyMjA4MQ0KQ29udGVudC1UeXBlOiBhcHBsaWNhdGlvbi9odHRwDQpDb250ZW50LVRyYW5zZmVyLUVuY29kaW5nOiBiaW5hcnkNCg0KSFRUUC8xLjEgMjA0IE5vIENvbnRlbnQNClgtQ29udGVudC1UeXBlLU9wdGlvbnM6IG5vc25pZmYNCkNhY2hlLUNvbnRyb2w6IG5vLWNhY2hlDQpEYXRhU2VydmljZVZlcnNpb246IDEuMDsNCkVUYWc6IFcvImRhdGV0aW1lJzIwMjEtMDgtMDJUMTglM0EwMSUzQTQyLjM5MDcyNDJaJyINCg0KDQotLWNoYW5nZXNldHJlc3BvbnNlXzMzZjU5MGU5LTkzZDUtNGMwMi05ZmE4LTNlMDQxOTYyMjA4MQ0KQ29udGVudC1UeXBlOiBhcHBsaWNhdGlvbi9odHRwDQpDb250ZW50LVRyYW5zZmVyLUVuY29kaW5nOiBiaW5hcnkNCg0KSFRUUC8xLjEgMjA0IE5vIENvbnRlbnQNClgtQ29udGVudC1UeXBlLU9wdGlvbnM6IG5vc25pZmYNCkNhY2hlLUNvbnRyb2w6IG5vLWNhY2hlDQpEYXRhU2VydmljZVZlcnNpb246IDEuMDsNCg0KDQotLWNoYW5nZXNldHJlc3BvbnNlXzMzZjU5MGU5LTkzZDUtNGMwMi05ZmE4LTNlMDQxOTYyMjA4MS0tDQotLWJhdGNocmVzcG9uc2VfZjI0ZWUyZDItNzgwNy00YTU2LTkxZTQtNjY0MjI1MWE5ZmRlLS0NCg==" + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/tableName223571584(PartitionKey=\u0027pk001\u0027,RowKey=\u00271\u0027)", + "RequestMethod": "GET", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "GET", + ":path": "/tableName223571584(PartitionKey=\u0027pk001\u0027,RowKey=\u00271\u0027)", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:43 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", + "Date": "Mon, 02 Aug 2021 18:01:41 GMT", + "ETag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A42.3907242Z\u0027\u0022", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "Vary": "Origin", + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b50ef-9002-0057-1cc8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": { + "odata.metadata": "https://seankaneprim.table.core.windows.net/$metadata#tableName223571584/@Element", + "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A42.3907242Z\u0027\u0022", + "PartitionKey": "pk001", + "RowKey": "1", + "Timestamp": "2021-08-02T18:01:42.3907242Z", + "Binary@odata.type": "Edm.Binary", + "Binary": "U29tZUJpbmFyeQ==", + "Bool": false, + "DateTime@odata.type": "Edm.DateTime", + "DateTime": "2013-08-02T17:37:43.0090043Z", + "Double": 1234.1234, + "Guid@odata.type": "Edm.Guid", + "Guid": "4185404a-5818-48c3-b9be-f217df0dba6f", + "Int32": 1234, + "Int64@odata.type": "Edm.Int64", + "Int64": "123456789012", + "String": "test" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/tableName223571584(PartitionKey=\u0027pk001\u0027,RowKey=\u00272\u0027)", + "RequestMethod": "GET", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "GET", + ":path": "/tableName223571584(PartitionKey=\u0027pk001\u0027,RowKey=\u00272\u0027)", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:43 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", + "Date": "Mon, 02 Aug 2021 18:01:41 GMT", + "ETag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A42.3907242Z\u0027\u0022", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "Vary": "Origin", + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b511d-9002-0057-4ac8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": { + "odata.metadata": "https://seankaneprim.table.core.windows.net/$metadata#tableName223571584/@Element", + "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A42.3907242Z\u0027\u0022", + "PartitionKey": "pk001", + "RowKey": "2", + "Timestamp": "2021-08-02T18:01:42.3907242Z", + "Binary@odata.type": "Edm.Binary", + "Binary": "U29tZUJpbmFyeQ==", + "Bool": false, + "DateTime@odata.type": "Edm.DateTime", + "DateTime": "2013-08-02T17:37:43.0090043Z", + "Double": 1234.1234, + "Guid@odata.type": "Edm.Guid", + "Guid": "4185404a-5818-48c3-b9be-f217df0dba6f", + "Int32": 10, + "Int64@odata.type": "Edm.Int64", + "Int64": "123456789012", + "String": "test" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/tableName223571584(PartitionKey=\u0027pk001\u0027,RowKey=\u00273\u0027)", + "RequestMethod": "GET", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "GET", + ":path": "/tableName223571584(PartitionKey=\u0027pk001\u0027,RowKey=\u00273\u0027)", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:43 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 404, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", + "Date": "Mon, 02 Aug 2021 18:01:41 GMT", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "Vary": "Origin", + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b514d-9002-0057-78c8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": { + "odata.error": { + "code": "ResourceNotFound", + "message": { + "lang": "en-US", + "value": "The specified resource does not exist.\nRequestId:a05b514d-9002-0057-78c8-874646000000\nTime:2021-08-02T18:01:42.7873634Z" + } + } + } + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables(\u0027tableName223571584\u0027)", + "RequestMethod": "DELETE", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "DELETE", + ":path": "/Tables(\u0027tableName223571584\u0027)", + ":scheme": "https", + "Accept": "application/json", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:43 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "0", + "Date": "Mon, 02 Aug 2021 18:01:42 GMT", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b517f-9002-0057-26c8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": null + } + ], + "Variables": {} +} \ No newline at end of file diff --git a/sdk/tables/aztable/recordings/TestBatchError/TestBatchError_cosmos.json b/sdk/tables/aztable/recordings/TestBatchError/TestBatchError_cosmos.json new file mode 100644 index 000000000000..6bf8e852db1e --- /dev/null +++ b/sdk/tables/aztable/recordings/TestBatchError/TestBatchError_cosmos.json @@ -0,0 +1,131 @@ +{ + "Entries": [ + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/Tables", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "35", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:41 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "TableName": "tableName3265552871" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "Date": "Mon, 02 Aug 2021 18:01:40 GMT", + "ETag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A40.7454216Z\u0027\u0022", + "Location": "https://seankaneprim.table.cosmos.azure.com/Tables(\u0027tableName3265552871\u0027)", + "Transfer-Encoding": "chunked", + "x-ms-request-id": "d76d6352-4b4b-47ee-aa81-f539a2e836c3" + }, + "ResponseBody": { + "TableName": "tableName3265552871", + "odata.metadata": "https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/tableName3265552871", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/tableName3265552871", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "194", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "prefer": "return-no-content", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:41 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "Bool": true, + "Byte": "c29tZWJ5dGVz", + "DateTime": "2021-07-13T00:00:00Z", + "Float": 3.14159, + "Integer": 3, + "PartitionKey": "partition", + "RowKey": "3", + "String": "someString", + "Timestamp": "0001-01-01T00:00:00Z" + }, + "StatusCode": 204, + "ResponseHeaders": { + "Date": "Mon, 02 Aug 2021 18:01:41 GMT", + "ETag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A41.3673992Z\u0027\u0022", + "Location": "https://seankaneprim.table.cosmos.azure.com/tableName3265552871(PartitionKey=\u0027partition\u0027,RowKey=\u00273\u0027)", + "Preference-Applied": "return-no-content", + "x-ms-request-id": "19e449a2-d306-4791-b440-729500a69850" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/$batch", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/$batch", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "2128", + "Content-Type": "multipart/mixed; boundary=batch_c78db7be-ae44-4d89-7627-60c263af156f", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:42 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": "LS1iYXRjaF9jNzhkYjdiZS1hZTQ0LTRkODktNzYyNy02MGMyNjNhZjE1NmYNCkNvbnRlbnQtVHlwZTogbXVsdGlwYXJ0L21peGVkOyBib3VuZGFyeT1jaGFuZ2VzZXRfMTU0ZDQ1MzctZWM5OC00M2EyLTQxN2UtYTVkY2FhMzgwYjY3DQoNCi0tY2hhbmdlc2V0XzE1NGQ0NTM3LWVjOTgtNDNhMi00MTdlLWE1ZGNhYTM4MGI2Nw0KQ29udGVudC1UcmFuc2Zlci1FbmNvZGluZzogYmluYXJ5DQpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL2h0dHANCg0KUE9TVCBodHRwczovL3NlYW5rYW5lcHJpbS50YWJsZS5jb3Ntb3MuYXp1cmUuY29tL3RhYmxlTmFtZTMyNjU1NTI4NzE/JTI0Zm9ybWF0PWFwcGxpY2F0aW9uJTJGanNvbiUzQm9kYXRhJTNEbWluaW1hbG1ldGFkYXRhIEhUVFAvMS4xDQpBY2NlcHQ6IGFwcGxpY2F0aW9uL2pzb247b2RhdGE9bWluaW1hbG1ldGFkYXRhDQpDb250ZW50LUxlbmd0aDogMTk0DQpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL2pzb24NCkRhdGFzZXJ2aWNldmVyc2lvbjogMy4wDQpQcmVmZXI6IHJldHVybi1uby1jb250ZW50DQpYLU1zLVZlcnNpb246IDIwMTktMDItMDINCg0KeyJCb29sIjp0cnVlLCJCeXRlIjoiYzI5dFpXSjVkR1Z6IiwiRGF0ZVRpbWUiOiIyMDIxLTA3LTEzVDAwOjAwOjAwWiIsIkZsb2F0IjozLjE0MTU5LCJJbnRlZ2VyIjoxLCJQYXJ0aXRpb25LZXkiOiJwYXJ0aXRpb24iLCJSb3dLZXkiOiIxIiwiU3RyaW5nIjoic29tZVN0cmluZyIsIlRpbWVzdGFtcCI6IjAwMDEtMDEtMDFUMDA6MDA6MDBaIn0NCi0tY2hhbmdlc2V0XzE1NGQ0NTM3LWVjOTgtNDNhMi00MTdlLWE1ZGNhYTM4MGI2Nw0KQ29udGVudC1UcmFuc2Zlci1FbmNvZGluZzogYmluYXJ5DQpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL2h0dHANCg0KUE9TVCBodHRwczovL3NlYW5rYW5lcHJpbS50YWJsZS5jb3Ntb3MuYXp1cmUuY29tL3RhYmxlTmFtZTMyNjU1NTI4NzE/JTI0Zm9ybWF0PWFwcGxpY2F0aW9uJTJGanNvbiUzQm9kYXRhJTNEbWluaW1hbG1ldGFkYXRhIEhUVFAvMS4xDQpBY2NlcHQ6IGFwcGxpY2F0aW9uL2pzb247b2RhdGE9bWluaW1hbG1ldGFkYXRhDQpDb250ZW50LUxlbmd0aDogMTk0DQpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL2pzb24NCkRhdGFzZXJ2aWNldmVyc2lvbjogMy4wDQpQcmVmZXI6IHJldHVybi1uby1jb250ZW50DQpYLU1zLVZlcnNpb246IDIwMTktMDItMDINCg0KeyJCb29sIjp0cnVlLCJCeXRlIjoiYzI5dFpXSjVkR1Z6IiwiRGF0ZVRpbWUiOiIyMDIxLTA3LTEzVDAwOjAwOjAwWiIsIkZsb2F0IjozLjE0MTU5LCJJbnRlZ2VyIjoyLCJQYXJ0aXRpb25LZXkiOiJwYXJ0aXRpb24iLCJSb3dLZXkiOiIyIiwiU3RyaW5nIjoic29tZVN0cmluZyIsIlRpbWVzdGFtcCI6IjAwMDEtMDEtMDFUMDA6MDA6MDBaIn0NCi0tY2hhbmdlc2V0XzE1NGQ0NTM3LWVjOTgtNDNhMi00MTdlLWE1ZGNhYTM4MGI2Nw0KQ29udGVudC1UcmFuc2Zlci1FbmNvZGluZzogYmluYXJ5DQpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL2h0dHANCg0KUE9TVCBodHRwczovL3NlYW5rYW5lcHJpbS50YWJsZS5jb3Ntb3MuYXp1cmUuY29tL3RhYmxlTmFtZTMyNjU1NTI4NzE/JTI0Zm9ybWF0PWFwcGxpY2F0aW9uJTJGanNvbiUzQm9kYXRhJTNEbWluaW1hbG1ldGFkYXRhIEhUVFAvMS4xDQpBY2NlcHQ6IGFwcGxpY2F0aW9uL2pzb247b2RhdGE9bWluaW1hbG1ldGFkYXRhDQpDb250ZW50LUxlbmd0aDogMTk0DQpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL2pzb24NCkRhdGFzZXJ2aWNldmVyc2lvbjogMy4wDQpQcmVmZXI6IHJldHVybi1uby1jb250ZW50DQpYLU1zLVZlcnNpb246IDIwMTktMDItMDINCg0KeyJCb29sIjp0cnVlLCJCeXRlIjoiYzI5dFpXSjVkR1Z6IiwiRGF0ZVRpbWUiOiIyMDIxLTA3LTEzVDAwOjAwOjAwWiIsIkZsb2F0IjozLjE0MTU5LCJJbnRlZ2VyIjozLCJQYXJ0aXRpb25LZXkiOiJwYXJ0aXRpb24iLCJSb3dLZXkiOiIzIiwiU3RyaW5nIjoic29tZVN0cmluZyIsIlRpbWVzdGFtcCI6IjAwMDEtMDEtMDFUMDA6MDA6MDBaIn0NCi0tY2hhbmdlc2V0XzE1NGQ0NTM3LWVjOTgtNDNhMi00MTdlLWE1ZGNhYTM4MGI2Ny0tDQoNCi0tYmF0Y2hfYzc4ZGI3YmUtYWU0NC00ZDg5LTc2MjctNjBjMjYzYWYxNTZmLS0NCg==", + "StatusCode": 202, + "ResponseHeaders": { + "Content-Type": "multipart/mixed; boundary=batchresponse_c2153ceb-421e-4e7f-a593-2fc3fdc076ba", + "Date": "Mon, 02 Aug 2021 18:01:41 GMT", + "Transfer-Encoding": "chunked", + "x-ms-request-id": "8a3e0675-704c-450e-bd07-bdb82dccad9d" + }, + "ResponseBody": "LS1iYXRjaHJlc3BvbnNlX2MyMTUzY2ViLTQyMWUtNGU3Zi1hNTkzLTJmYzNmZGMwNzZiYQ0KQ29udGVudC1UeXBlOiBtdWx0aXBhcnQvbWl4ZWQ7IGJvdW5kYXJ5PWNoYW5nZXNldHJlc3BvbnNlXzcwN2E4MzkxLTk3NDgtNDgxNC05N2ZlLWM2MmNiMTA2N2ZlZA0KDQotLWNoYW5nZXNldHJlc3BvbnNlXzcwN2E4MzkxLTk3NDgtNDgxNC05N2ZlLWM2MmNiMTA2N2ZlZApDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL2h0dHAKQ29udGVudC1UcmFuc2Zlci1FbmNvZGluZzogYmluYXJ5CgpIVFRQLzEuMSA0MDkgQ29uZmxpY3QNCkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vanNvbjtvZGF0YT1mdWxsbWV0YWRhdGENCg0KeyJvZGF0YS5lcnJvciI6eyJjb2RlIjoiRW50aXR5QWxyZWFkeUV4aXN0cyIsIm1lc3NhZ2UiOnsibGFuZyI6ImVuLXVzIiwidmFsdWUiOiIyOlRoZSBzcGVjaWZpZWQgZW50aXR5IGFscmVhZHkgZXhpc3RzLlxuXG5SZXF1ZXN0SUQ6OGEzZTA2NzUtNzA0Yy00NTBlLWJkMDctYmRiODJkY2NhZDlkXG4ifX19DQotLWNoYW5nZXNldHJlc3BvbnNlXzcwN2E4MzkxLTk3NDgtNDgxNC05N2ZlLWM2MmNiMTA2N2ZlZC0tCi0tYmF0Y2hyZXNwb25zZV9jMjE1M2NlYi00MjFlLTRlN2YtYTU5My0yZmMzZmRjMDc2YmEtLQ0K" + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables(\u0027tableName3265552871\u0027)", + "RequestMethod": "DELETE", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "DELETE", + ":path": "/Tables(\u0027tableName3265552871\u0027)", + ":scheme": "https", + "Accept": "application/json", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:42 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "Date": "Mon, 02 Aug 2021 18:01:41 GMT", + "x-ms-request-id": "49c9df04-ca39-408c-a15c-329163ea404c" + }, + "ResponseBody": null + } + ], + "Variables": {} +} \ No newline at end of file diff --git a/sdk/tables/aztable/recordings/TestBatchError/TestBatchError_storage.json b/sdk/tables/aztable/recordings/TestBatchError/TestBatchError_storage.json new file mode 100644 index 000000000000..ffcc44703bbf --- /dev/null +++ b/sdk/tables/aztable/recordings/TestBatchError/TestBatchError_storage.json @@ -0,0 +1,161 @@ +{ + "Entries": [ + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/Tables", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "35", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:40 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "TableName": "tableName2163872032" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", + "Date": "Mon, 02 Aug 2021 18:01:39 GMT", + "Location": "https://seankaneprim.table.core.windows.net/Tables(\u0027tableName2163872032\u0027)", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b4dc2-9002-0057-12c8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": { + "odata.metadata": "https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element", + "TableName": "tableName2163872032" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/tableName2163872032", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/tableName2163872032", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "194", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "prefer": "return-no-content", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:40 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "Bool": true, + "Byte": "c29tZWJ5dGVz", + "DateTime": "2021-07-13T00:00:00Z", + "Float": 3.14159, + "Integer": 3, + "PartitionKey": "partition", + "RowKey": "3", + "String": "someString", + "Timestamp": "0001-01-01T00:00:00Z" + }, + "StatusCode": 204, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "0", + "DataServiceId": "https://seankaneprim.table.core.windows.net/tableName2163872032(PartitionKey=\u0027partition\u0027,RowKey=\u00273\u0027)", + "Date": "Mon, 02 Aug 2021 18:01:39 GMT", + "ETag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A40.1925388Z\u0027\u0022", + "Location": "https://seankaneprim.table.core.windows.net/tableName2163872032(PartitionKey=\u0027partition\u0027,RowKey=\u00273\u0027)", + "Preference-Applied": "return-no-content", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b4e21-9002-0057-6cc8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/$batch", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/$batch", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "2128", + "Content-Type": "multipart/mixed; boundary=batch_207dc542-8ea6-440a-4786-6b87efbf5fa2", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:40 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": "LS1iYXRjaF8yMDdkYzU0Mi04ZWE2LTQ0MGEtNDc4Ni02Yjg3ZWZiZjVmYTINCkNvbnRlbnQtVHlwZTogbXVsdGlwYXJ0L21peGVkOyBib3VuZGFyeT1jaGFuZ2VzZXRfZTRiNTEyNjktMjc3YS00ZDhkLTcyMGMtODVkNGE4ZDFlYWI5DQoNCi0tY2hhbmdlc2V0X2U0YjUxMjY5LTI3N2EtNGQ4ZC03MjBjLTg1ZDRhOGQxZWFiOQ0KQ29udGVudC1UcmFuc2Zlci1FbmNvZGluZzogYmluYXJ5DQpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL2h0dHANCg0KUE9TVCBodHRwczovL3NlYW5rYW5lcHJpbS50YWJsZS5jb3JlLndpbmRvd3MubmV0L3RhYmxlTmFtZTIxNjM4NzIwMzI/JTI0Zm9ybWF0PWFwcGxpY2F0aW9uJTJGanNvbiUzQm9kYXRhJTNEbWluaW1hbG1ldGFkYXRhIEhUVFAvMS4xDQpBY2NlcHQ6IGFwcGxpY2F0aW9uL2pzb247b2RhdGE9bWluaW1hbG1ldGFkYXRhDQpDb250ZW50LUxlbmd0aDogMTk0DQpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL2pzb24NCkRhdGFzZXJ2aWNldmVyc2lvbjogMy4wDQpQcmVmZXI6IHJldHVybi1uby1jb250ZW50DQpYLU1zLVZlcnNpb246IDIwMTktMDItMDINCg0KeyJCb29sIjp0cnVlLCJCeXRlIjoiYzI5dFpXSjVkR1Z6IiwiRGF0ZVRpbWUiOiIyMDIxLTA3LTEzVDAwOjAwOjAwWiIsIkZsb2F0IjozLjE0MTU5LCJJbnRlZ2VyIjoxLCJQYXJ0aXRpb25LZXkiOiJwYXJ0aXRpb24iLCJSb3dLZXkiOiIxIiwiU3RyaW5nIjoic29tZVN0cmluZyIsIlRpbWVzdGFtcCI6IjAwMDEtMDEtMDFUMDA6MDA6MDBaIn0NCi0tY2hhbmdlc2V0X2U0YjUxMjY5LTI3N2EtNGQ4ZC03MjBjLTg1ZDRhOGQxZWFiOQ0KQ29udGVudC1UcmFuc2Zlci1FbmNvZGluZzogYmluYXJ5DQpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL2h0dHANCg0KUE9TVCBodHRwczovL3NlYW5rYW5lcHJpbS50YWJsZS5jb3JlLndpbmRvd3MubmV0L3RhYmxlTmFtZTIxNjM4NzIwMzI/JTI0Zm9ybWF0PWFwcGxpY2F0aW9uJTJGanNvbiUzQm9kYXRhJTNEbWluaW1hbG1ldGFkYXRhIEhUVFAvMS4xDQpBY2NlcHQ6IGFwcGxpY2F0aW9uL2pzb247b2RhdGE9bWluaW1hbG1ldGFkYXRhDQpDb250ZW50LUxlbmd0aDogMTk0DQpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL2pzb24NCkRhdGFzZXJ2aWNldmVyc2lvbjogMy4wDQpQcmVmZXI6IHJldHVybi1uby1jb250ZW50DQpYLU1zLVZlcnNpb246IDIwMTktMDItMDINCg0KeyJCb29sIjp0cnVlLCJCeXRlIjoiYzI5dFpXSjVkR1Z6IiwiRGF0ZVRpbWUiOiIyMDIxLTA3LTEzVDAwOjAwOjAwWiIsIkZsb2F0IjozLjE0MTU5LCJJbnRlZ2VyIjoyLCJQYXJ0aXRpb25LZXkiOiJwYXJ0aXRpb24iLCJSb3dLZXkiOiIyIiwiU3RyaW5nIjoic29tZVN0cmluZyIsIlRpbWVzdGFtcCI6IjAwMDEtMDEtMDFUMDA6MDA6MDBaIn0NCi0tY2hhbmdlc2V0X2U0YjUxMjY5LTI3N2EtNGQ4ZC03MjBjLTg1ZDRhOGQxZWFiOQ0KQ29udGVudC1UcmFuc2Zlci1FbmNvZGluZzogYmluYXJ5DQpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL2h0dHANCg0KUE9TVCBodHRwczovL3NlYW5rYW5lcHJpbS50YWJsZS5jb3JlLndpbmRvd3MubmV0L3RhYmxlTmFtZTIxNjM4NzIwMzI/JTI0Zm9ybWF0PWFwcGxpY2F0aW9uJTJGanNvbiUzQm9kYXRhJTNEbWluaW1hbG1ldGFkYXRhIEhUVFAvMS4xDQpBY2NlcHQ6IGFwcGxpY2F0aW9uL2pzb247b2RhdGE9bWluaW1hbG1ldGFkYXRhDQpDb250ZW50LUxlbmd0aDogMTk0DQpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL2pzb24NCkRhdGFzZXJ2aWNldmVyc2lvbjogMy4wDQpQcmVmZXI6IHJldHVybi1uby1jb250ZW50DQpYLU1zLVZlcnNpb246IDIwMTktMDItMDINCg0KeyJCb29sIjp0cnVlLCJCeXRlIjoiYzI5dFpXSjVkR1Z6IiwiRGF0ZVRpbWUiOiIyMDIxLTA3LTEzVDAwOjAwOjAwWiIsIkZsb2F0IjozLjE0MTU5LCJJbnRlZ2VyIjozLCJQYXJ0aXRpb25LZXkiOiJwYXJ0aXRpb24iLCJSb3dLZXkiOiIzIiwiU3RyaW5nIjoic29tZVN0cmluZyIsIlRpbWVzdGFtcCI6IjAwMDEtMDEtMDFUMDA6MDA6MDBaIn0NCi0tY2hhbmdlc2V0X2U0YjUxMjY5LTI3N2EtNGQ4ZC03MjBjLTg1ZDRhOGQxZWFiOS0tDQoNCi0tYmF0Y2hfMjA3ZGM1NDItOGVhNi00NDBhLTQ3ODYtNmI4N2VmYmY1ZmEyLS0NCg==", + "StatusCode": 202, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Type": "multipart/mixed; boundary=batchresponse_c5bb0b10-d973-4bab-9713-7d8bb0a007f2", + "Date": "Mon, 02 Aug 2021 18:01:39 GMT", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b4e53-9002-0057-1cc8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": "LS1iYXRjaHJlc3BvbnNlX2M1YmIwYjEwLWQ5NzMtNGJhYi05NzEzLTdkOGJiMGEwMDdmMg0KQ29udGVudC1UeXBlOiBtdWx0aXBhcnQvbWl4ZWQ7IGJvdW5kYXJ5PWNoYW5nZXNldHJlc3BvbnNlX2FlZjE4OTBlLWQ0ZjYtNDk1Ni1iOWU1LTVjYmUxNjg3NmQ2Mg0KDQotLWNoYW5nZXNldHJlc3BvbnNlX2FlZjE4OTBlLWQ0ZjYtNDk1Ni1iOWU1LTVjYmUxNjg3NmQ2Mg0KQ29udGVudC1UeXBlOiBhcHBsaWNhdGlvbi9odHRwDQpDb250ZW50LVRyYW5zZmVyLUVuY29kaW5nOiBiaW5hcnkNCg0KSFRUUC8xLjEgNDA5IENvbmZsaWN0DQpYLUNvbnRlbnQtVHlwZS1PcHRpb25zOiBub3NuaWZmDQpDYWNoZS1Db250cm9sOiBuby1jYWNoZQ0KUHJlZmVyZW5jZS1BcHBsaWVkOiByZXR1cm4tbm8tY29udGVudA0KRGF0YVNlcnZpY2VWZXJzaW9uOiAzLjA7DQpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL2pzb247b2RhdGE9bWluaW1hbG1ldGFkYXRhO3N0cmVhbWluZz10cnVlO2NoYXJzZXQ9dXRmLTgNCg0KeyJvZGF0YS5lcnJvciI6eyJjb2RlIjoiRW50aXR5QWxyZWFkeUV4aXN0cyIsIm1lc3NhZ2UiOnsibGFuZyI6ImVuLVVTIiwidmFsdWUiOiIyOlRoZSBzcGVjaWZpZWQgZW50aXR5IGFscmVhZHkgZXhpc3RzLlxuUmVxdWVzdElkOmEwNWI0ZTUzLTkwMDItMDA1Ny0xY2M4LTg3NDY0NjAwMDAwMFxuVGltZToyMDIxLTA4LTAyVDE4OjAxOjQwLjMyOTYzNTBaIn19fQ0KLS1jaGFuZ2VzZXRyZXNwb25zZV9hZWYxODkwZS1kNGY2LTQ5NTYtYjllNS01Y2JlMTY4NzZkNjItLQ0KLS1iYXRjaHJlc3BvbnNlX2M1YmIwYjEwLWQ5NzMtNGJhYi05NzEzLTdkOGJiMGEwMDdmMi0tDQo=" + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables(\u0027tableName2163872032\u0027)", + "RequestMethod": "DELETE", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "DELETE", + ":path": "/Tables(\u0027tableName2163872032\u0027)", + ":scheme": "https", + "Accept": "application/json", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:41 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "0", + "Date": "Mon, 02 Aug 2021 18:01:39 GMT", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b4e80-9002-0057-46c8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": null + } + ], + "Variables": {} +} \ No newline at end of file diff --git a/sdk/tables/aztable/recordings/TestBatchMixed/TestBatchMixed_cosmos.json b/sdk/tables/aztable/recordings/TestBatchMixed/TestBatchMixed_cosmos.json new file mode 100644 index 000000000000..272a4c5d4ce1 --- /dev/null +++ b/sdk/tables/aztable/recordings/TestBatchMixed/TestBatchMixed_cosmos.json @@ -0,0 +1,204 @@ +{ + "Entries": [ + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/Tables", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "35", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:38 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "TableName": "tableName3966326013" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "Date": "Mon, 02 Aug 2021 18:01:38 GMT", + "ETag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A38.1683208Z\u0027\u0022", + "Location": "https://seankaneprim.table.cosmos.azure.com/Tables(\u0027tableName3966326013\u0027)", + "Transfer-Encoding": "chunked", + "x-ms-request-id": "f9440f43-ec74-41d4-b3d7-22a8762e829c" + }, + "ResponseBody": { + "TableName": "tableName3966326013", + "odata.metadata": "https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/$batch", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/$batch", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "2128", + "Content-Type": "multipart/mixed; boundary=batch_89492166-bc25-4d1c-422b-2fd7f3237b86", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:39 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": "LS1iYXRjaF84OTQ5MjE2Ni1iYzI1LTRkMWMtNDIyYi0yZmQ3ZjMyMzdiODYNCkNvbnRlbnQtVHlwZTogbXVsdGlwYXJ0L21peGVkOyBib3VuZGFyeT1jaGFuZ2VzZXRfMTQzMjU3NmEtNGVhNS00YWQzLTY4MjMtMmUxMWZkN2U3ODRkDQoNCi0tY2hhbmdlc2V0XzE0MzI1NzZhLTRlYTUtNGFkMy02ODIzLTJlMTFmZDdlNzg0ZA0KQ29udGVudC1UcmFuc2Zlci1FbmNvZGluZzogYmluYXJ5DQpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL2h0dHANCg0KUE9TVCBodHRwczovL3NlYW5rYW5lcHJpbS50YWJsZS5jb3Ntb3MuYXp1cmUuY29tL3RhYmxlTmFtZTM5NjYzMjYwMTM/JTI0Zm9ybWF0PWFwcGxpY2F0aW9uJTJGanNvbiUzQm9kYXRhJTNEbWluaW1hbG1ldGFkYXRhIEhUVFAvMS4xDQpBY2NlcHQ6IGFwcGxpY2F0aW9uL2pzb247b2RhdGE9bWluaW1hbG1ldGFkYXRhDQpDb250ZW50LUxlbmd0aDogMTk0DQpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL2pzb24NCkRhdGFzZXJ2aWNldmVyc2lvbjogMy4wDQpQcmVmZXI6IHJldHVybi1uby1jb250ZW50DQpYLU1zLVZlcnNpb246IDIwMTktMDItMDINCg0KeyJCb29sIjp0cnVlLCJCeXRlIjoiYzI5dFpXSjVkR1Z6IiwiRGF0ZVRpbWUiOiIyMDIxLTA3LTEzVDAwOjAwOjAwWiIsIkZsb2F0IjozLjE0MTU5LCJJbnRlZ2VyIjoxLCJQYXJ0aXRpb25LZXkiOiJwYXJ0aXRpb24iLCJSb3dLZXkiOiIxIiwiU3RyaW5nIjoic29tZVN0cmluZyIsIlRpbWVzdGFtcCI6IjAwMDEtMDEtMDFUMDA6MDA6MDBaIn0NCi0tY2hhbmdlc2V0XzE0MzI1NzZhLTRlYTUtNGFkMy02ODIzLTJlMTFmZDdlNzg0ZA0KQ29udGVudC1UcmFuc2Zlci1FbmNvZGluZzogYmluYXJ5DQpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL2h0dHANCg0KUE9TVCBodHRwczovL3NlYW5rYW5lcHJpbS50YWJsZS5jb3Ntb3MuYXp1cmUuY29tL3RhYmxlTmFtZTM5NjYzMjYwMTM/JTI0Zm9ybWF0PWFwcGxpY2F0aW9uJTJGanNvbiUzQm9kYXRhJTNEbWluaW1hbG1ldGFkYXRhIEhUVFAvMS4xDQpBY2NlcHQ6IGFwcGxpY2F0aW9uL2pzb247b2RhdGE9bWluaW1hbG1ldGFkYXRhDQpDb250ZW50LUxlbmd0aDogMTk0DQpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL2pzb24NCkRhdGFzZXJ2aWNldmVyc2lvbjogMy4wDQpQcmVmZXI6IHJldHVybi1uby1jb250ZW50DQpYLU1zLVZlcnNpb246IDIwMTktMDItMDINCg0KeyJCb29sIjp0cnVlLCJCeXRlIjoiYzI5dFpXSjVkR1Z6IiwiRGF0ZVRpbWUiOiIyMDIxLTA3LTEzVDAwOjAwOjAwWiIsIkZsb2F0IjozLjE0MTU5LCJJbnRlZ2VyIjoyLCJQYXJ0aXRpb25LZXkiOiJwYXJ0aXRpb24iLCJSb3dLZXkiOiIyIiwiU3RyaW5nIjoic29tZVN0cmluZyIsIlRpbWVzdGFtcCI6IjAwMDEtMDEtMDFUMDA6MDA6MDBaIn0NCi0tY2hhbmdlc2V0XzE0MzI1NzZhLTRlYTUtNGFkMy02ODIzLTJlMTFmZDdlNzg0ZA0KQ29udGVudC1UcmFuc2Zlci1FbmNvZGluZzogYmluYXJ5DQpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL2h0dHANCg0KUE9TVCBodHRwczovL3NlYW5rYW5lcHJpbS50YWJsZS5jb3Ntb3MuYXp1cmUuY29tL3RhYmxlTmFtZTM5NjYzMjYwMTM/JTI0Zm9ybWF0PWFwcGxpY2F0aW9uJTJGanNvbiUzQm9kYXRhJTNEbWluaW1hbG1ldGFkYXRhIEhUVFAvMS4xDQpBY2NlcHQ6IGFwcGxpY2F0aW9uL2pzb247b2RhdGE9bWluaW1hbG1ldGFkYXRhDQpDb250ZW50LUxlbmd0aDogMTk0DQpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL2pzb24NCkRhdGFzZXJ2aWNldmVyc2lvbjogMy4wDQpQcmVmZXI6IHJldHVybi1uby1jb250ZW50DQpYLU1zLVZlcnNpb246IDIwMTktMDItMDINCg0KeyJCb29sIjp0cnVlLCJCeXRlIjoiYzI5dFpXSjVkR1Z6IiwiRGF0ZVRpbWUiOiIyMDIxLTA3LTEzVDAwOjAwOjAwWiIsIkZsb2F0IjozLjE0MTU5LCJJbnRlZ2VyIjozLCJQYXJ0aXRpb25LZXkiOiJwYXJ0aXRpb24iLCJSb3dLZXkiOiIzIiwiU3RyaW5nIjoic29tZVN0cmluZyIsIlRpbWVzdGFtcCI6IjAwMDEtMDEtMDFUMDA6MDA6MDBaIn0NCi0tY2hhbmdlc2V0XzE0MzI1NzZhLTRlYTUtNGFkMy02ODIzLTJlMTFmZDdlNzg0ZC0tDQoNCi0tYmF0Y2hfODk0OTIxNjYtYmMyNS00ZDFjLTQyMmItMmZkN2YzMjM3Yjg2LS0NCg==", + "StatusCode": 202, + "ResponseHeaders": { + "Content-Type": "multipart/mixed; boundary=batchresponse_1e420bc0-eaf1-4d05-878e-106f1ee02cc0", + "Date": "Mon, 02 Aug 2021 18:01:38 GMT", + "Transfer-Encoding": "chunked", + "x-ms-request-id": "0870d2a0-1aad-4eac-be89-cb2ae19501a4" + }, + "ResponseBody": "LS1iYXRjaHJlc3BvbnNlXzFlNDIwYmMwLWVhZjEtNGQwNS04NzhlLTEwNmYxZWUwMmNjMA0KQ29udGVudC1UeXBlOiBtdWx0aXBhcnQvbWl4ZWQ7IGJvdW5kYXJ5PWNoYW5nZXNldHJlc3BvbnNlXzhjM2I3MDQxLTg1N2MtNGI4ZS05ODZmLTJjOWNjMjE1ZDBkZA0KDQotLWNoYW5nZXNldHJlc3BvbnNlXzhjM2I3MDQxLTg1N2MtNGI4ZS05ODZmLTJjOWNjMjE1ZDBkZApDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL2h0dHAKQ29udGVudC1UcmFuc2Zlci1FbmNvZGluZzogYmluYXJ5CgpIVFRQLzEuMSAyMDQgTm8gQ29udGVudA0KRVRhZzogVy8iZGF0ZXRpbWUnMjAyMS0wOC0wMlQxOCUzQTAxJTNBMzguOTg4NzQ5NlonIg0KUHJlZmVyZW5jZS1BcHBsaWVkOiByZXR1cm4tbm8tY29udGVudA0KTG9jYXRpb246IGh0dHBzOi8vc2VhbmthbmVwcmltLnRhYmxlLmNvc21vcy5henVyZS5jb20vdGFibGVOYW1lMzk2NjMyNjAxMyhQYXJ0aXRpb25LZXk9J3BhcnRpdGlvbicsUm93S2V5PScxJykNCkNvbnRlbnQtSUQ6IDENCg0KDQotLWNoYW5nZXNldHJlc3BvbnNlXzhjM2I3MDQxLTg1N2MtNGI4ZS05ODZmLTJjOWNjMjE1ZDBkZApDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL2h0dHAKQ29udGVudC1UcmFuc2Zlci1FbmNvZGluZzogYmluYXJ5CgpIVFRQLzEuMSAyMDQgTm8gQ29udGVudA0KRVRhZzogVy8iZGF0ZXRpbWUnMjAyMS0wOC0wMlQxOCUzQTAxJTNBMzguOTg5MzY0MFonIg0KUHJlZmVyZW5jZS1BcHBsaWVkOiByZXR1cm4tbm8tY29udGVudA0KTG9jYXRpb246IGh0dHBzOi8vc2VhbmthbmVwcmltLnRhYmxlLmNvc21vcy5henVyZS5jb20vdGFibGVOYW1lMzk2NjMyNjAxMyhQYXJ0aXRpb25LZXk9J3BhcnRpdGlvbicsUm93S2V5PScyJykNCkNvbnRlbnQtSUQ6IDINCg0KDQotLWNoYW5nZXNldHJlc3BvbnNlXzhjM2I3MDQxLTg1N2MtNGI4ZS05ODZmLTJjOWNjMjE1ZDBkZApDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL2h0dHAKQ29udGVudC1UcmFuc2Zlci1FbmNvZGluZzogYmluYXJ5CgpIVFRQLzEuMSAyMDQgTm8gQ29udGVudA0KRVRhZzogVy8iZGF0ZXRpbWUnMjAyMS0wOC0wMlQxOCUzQTAxJTNBMzguOTg5ODc2MFonIg0KUHJlZmVyZW5jZS1BcHBsaWVkOiByZXR1cm4tbm8tY29udGVudA0KTG9jYXRpb246IGh0dHBzOi8vc2VhbmthbmVwcmltLnRhYmxlLmNvc21vcy5henVyZS5jb20vdGFibGVOYW1lMzk2NjMyNjAxMyhQYXJ0aXRpb25LZXk9J3BhcnRpdGlvbicsUm93S2V5PSczJykNCkNvbnRlbnQtSUQ6IDMNCg0KDQotLWNoYW5nZXNldHJlc3BvbnNlXzhjM2I3MDQxLTg1N2MtNGI4ZS05ODZmLTJjOWNjMjE1ZDBkZC0tCi0tYmF0Y2hyZXNwb25zZV8xZTQyMGJjMC1lYWYxLTRkMDUtODc4ZS0xMDZmMWVlMDJjYzAtLQ0K" + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/tableName3966326013()?%24filter=RowKey\u002Beq\u002B%271%27", + "RequestMethod": "GET", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "GET", + ":path": "/tableName3966326013()?%24filter=RowKey\u002Beq\u002B%271%27", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:39 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "Date": "Mon, 02 Aug 2021 18:01:38 GMT", + "Transfer-Encoding": "chunked", + "x-ms-request-id": "4eab1d76-049d-4bfe-b203-c376d758bc07" + }, + "ResponseBody": { + "value": [ + { + "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A38.9887496Z\u0027\u0022", + "Bool": true, + "Byte": "c29tZWJ5dGVz", + "DateTime": "2021-07-13T00:00:00Z", + "Float": 3.14159, + "Integer": 1, + "PartitionKey": "partition", + "RowKey": "1", + "String": "someString", + "Timestamp": "2021-08-02T18:01:38.9887496Z" + } + ], + "odata.metadata": "https://seankaneprim.table.cosmos.azure.com/$metadata#tableName3966326013" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/$batch", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/$batch", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "2972", + "Content-Type": "multipart/mixed; boundary=batch_16923db7-5505-41ff-4b60-2ef74f28414f", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:39 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": "LS1iYXRjaF8xNjkyM2RiNy01NTA1LTQxZmYtNGI2MC0yZWY3NGYyODQxNGYNCkNvbnRlbnQtVHlwZTogbXVsdGlwYXJ0L21peGVkOyBib3VuZGFyeT1jaGFuZ2VzZXRfYzhiZGEyNWItMDk0NC00ZjYzLTQyMjYtOWQxMDk1ODhlZWI0DQoNCi0tY2hhbmdlc2V0X2M4YmRhMjViLTA5NDQtNGY2My00MjI2LTlkMTA5NTg4ZWViNA0KQ29udGVudC1UcmFuc2Zlci1FbmNvZGluZzogYmluYXJ5DQpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL2h0dHANCg0KUE9TVCBodHRwczovL3NlYW5rYW5lcHJpbS50YWJsZS5jb3Ntb3MuYXp1cmUuY29tL3RhYmxlTmFtZTM5NjYzMjYwMTMoUGFydGl0aW9uS2V5PSdwYXJ0aXRpb24nLFJvd0tleT0nMScpPyUyNGZvcm1hdD1hcHBsaWNhdGlvbiUyRmpzb24lM0JvZGF0YSUzRG1pbmltYWxtZXRhZGF0YSBIVFRQLzEuMQ0KQWNjZXB0OiBhcHBsaWNhdGlvbi9qc29uDQpDb250ZW50LUxlbmd0aDogNjMNCkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vanNvbg0KRGF0YXNlcnZpY2V2ZXJzaW9uOiAzLjANCklmLU1hdGNoOiBXLyJkYXRldGltZScyMDIxLTA4LTAyVDE4JTNBMDElM0EzOC45ODg3NDk2WiciDQpYLUh0dHAtTWV0aG9kOiBNRVJHRQ0KWC1Ncy1WZXJzaW9uOiAyMDE5LTAyLTAyDQoNCnsiTWVyZ2VQcm9wZXJ0eSI6ImZvbyIsIlBhcnRpdGlvbktleSI6InBhcnRpdGlvbiIsIlJvd0tleSI6IjEifQ0KLS1jaGFuZ2VzZXRfYzhiZGEyNWItMDk0NC00ZjYzLTQyMjYtOWQxMDk1ODhlZWI0DQpDb250ZW50LVRyYW5zZmVyLUVuY29kaW5nOiBiaW5hcnkNCkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vaHR0cA0KDQpERUxFVEUgaHR0cHM6Ly9zZWFua2FuZXByaW0udGFibGUuY29zbW9zLmF6dXJlLmNvbS90YWJsZU5hbWUzOTY2MzI2MDEzKFBhcnRpdGlvbktleT0ncGFydGl0aW9uJyxSb3dLZXk9JzInKT8lMjRmb3JtYXQ9YXBwbGljYXRpb24lMkZqc29uJTNCb2RhdGElM0RtaW5pbWFsbWV0YWRhdGEgSFRUUC8xLjENCkFjY2VwdDogYXBwbGljYXRpb24vanNvbjtvZGF0YT1taW5pbWFsbWV0YWRhdGENCkRhdGFzZXJ2aWNldmVyc2lvbjogMy4wDQpJZi1NYXRjaDogKg0KWC1Ncy1WZXJzaW9uOiAyMDE5LTAyLTAyDQoNCg0KLS1jaGFuZ2VzZXRfYzhiZGEyNWItMDk0NC00ZjYzLTQyMjYtOWQxMDk1ODhlZWI0DQpDb250ZW50LVRyYW5zZmVyLUVuY29kaW5nOiBiaW5hcnkNCkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vaHR0cA0KDQpQVVQgaHR0cHM6Ly9zZWFua2FuZXByaW0udGFibGUuY29zbW9zLmF6dXJlLmNvbS90YWJsZU5hbWUzOTY2MzI2MDEzKFBhcnRpdGlvbktleT0ncGFydGl0aW9uJyxSb3dLZXk9JzMnKT8lMjRmb3JtYXQ9YXBwbGljYXRpb24lMkZqc29uJTNCb2RhdGElM0RtaW5pbWFsbWV0YWRhdGEgSFRUUC8xLjENCkFjY2VwdDogYXBwbGljYXRpb24vanNvbg0KQ29udGVudC1MZW5ndGg6IDY1DQpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL2pzb24NCkRhdGFzZXJ2aWNldmVyc2lvbjogMy4wDQpJZi1NYXRjaDogKg0KWC1Ncy1WZXJzaW9uOiAyMDE5LTAyLTAyDQoNCnsiUGFydGl0aW9uS2V5IjoicGFydGl0aW9uIiwiUmVwbGFjZVByb3BlcnR5IjoiZm9vIiwiUm93S2V5IjoiMyJ9DQotLWNoYW5nZXNldF9jOGJkYTI1Yi0wOTQ0LTRmNjMtNDIyNi05ZDEwOTU4OGVlYjQNCkNvbnRlbnQtVHJhbnNmZXItRW5jb2Rpbmc6IGJpbmFyeQ0KQ29udGVudC1UeXBlOiBhcHBsaWNhdGlvbi9odHRwDQoNClBPU1QgaHR0cHM6Ly9zZWFua2FuZXByaW0udGFibGUuY29zbW9zLmF6dXJlLmNvbS90YWJsZU5hbWUzOTY2MzI2MDEzPyUyNGZvcm1hdD1hcHBsaWNhdGlvbiUyRmpzb24lM0JvZGF0YSUzRG1pbmltYWxtZXRhZGF0YSBIVFRQLzEuMQ0KQWNjZXB0OiBhcHBsaWNhdGlvbi9qc29uO29kYXRhPW1pbmltYWxtZXRhZGF0YQ0KQ29udGVudC1MZW5ndGg6IDE5NA0KQ29udGVudC1UeXBlOiBhcHBsaWNhdGlvbi9qc29uDQpEYXRhc2VydmljZXZlcnNpb246IDMuMA0KUHJlZmVyOiByZXR1cm4tbm8tY29udGVudA0KWC1Ncy1WZXJzaW9uOiAyMDE5LTAyLTAyDQoNCnsiQm9vbCI6dHJ1ZSwiQnl0ZSI6ImMyOXRaV0o1ZEdWeiIsIkRhdGVUaW1lIjoiMjAyMS0wNy0xM1QwMDowMDowMFoiLCJGbG9hdCI6My4xNDE1OSwiSW50ZWdlciI6NCwiUGFydGl0aW9uS2V5IjoicGFydGl0aW9uIiwiUm93S2V5IjoiNCIsIlN0cmluZyI6InNvbWVTdHJpbmciLCJUaW1lc3RhbXAiOiIwMDAxLTAxLTAxVDAwOjAwOjAwWiJ9DQotLWNoYW5nZXNldF9jOGJkYTI1Yi0wOTQ0LTRmNjMtNDIyNi05ZDEwOTU4OGVlYjQNCkNvbnRlbnQtVHJhbnNmZXItRW5jb2Rpbmc6IGJpbmFyeQ0KQ29udGVudC1UeXBlOiBhcHBsaWNhdGlvbi9odHRwDQoNClBPU1QgaHR0cHM6Ly9zZWFua2FuZXByaW0udGFibGUuY29zbW9zLmF6dXJlLmNvbS90YWJsZU5hbWUzOTY2MzI2MDEzPyUyNGZvcm1hdD1hcHBsaWNhdGlvbiUyRmpzb24lM0JvZGF0YSUzRG1pbmltYWxtZXRhZGF0YSBIVFRQLzEuMQ0KQWNjZXB0OiBhcHBsaWNhdGlvbi9qc29uO29kYXRhPW1pbmltYWxtZXRhZGF0YQ0KQ29udGVudC1MZW5ndGg6IDE5NA0KQ29udGVudC1UeXBlOiBhcHBsaWNhdGlvbi9qc29uDQpEYXRhc2VydmljZXZlcnNpb246IDMuMA0KUHJlZmVyOiByZXR1cm4tbm8tY29udGVudA0KWC1Ncy1WZXJzaW9uOiAyMDE5LTAyLTAyDQoNCnsiQm9vbCI6dHJ1ZSwiQnl0ZSI6ImMyOXRaV0o1ZEdWeiIsIkRhdGVUaW1lIjoiMjAyMS0wNy0xM1QwMDowMDowMFoiLCJGbG9hdCI6My4xNDE1OSwiSW50ZWdlciI6NSwiUGFydGl0aW9uS2V5IjoicGFydGl0aW9uIiwiUm93S2V5IjoiNSIsIlN0cmluZyI6InNvbWVTdHJpbmciLCJUaW1lc3RhbXAiOiIwMDAxLTAxLTAxVDAwOjAwOjAwWiJ9DQotLWNoYW5nZXNldF9jOGJkYTI1Yi0wOTQ0LTRmNjMtNDIyNi05ZDEwOTU4OGVlYjQtLQ0KDQotLWJhdGNoXzE2OTIzZGI3LTU1MDUtNDFmZi00YjYwLTJlZjc0ZjI4NDE0Zi0tDQo=", + "StatusCode": 202, + "ResponseHeaders": { + "Content-Type": "multipart/mixed; boundary=batchresponse_05787280-2376-4b6e-8c25-90411be1b408", + "Date": "Mon, 02 Aug 2021 18:01:38 GMT", + "Transfer-Encoding": "chunked", + "x-ms-request-id": "f36f527e-b34c-40c7-9f7f-1d87e0263a97" + }, + "ResponseBody": "LS1iYXRjaHJlc3BvbnNlXzA1Nzg3MjgwLTIzNzYtNGI2ZS04YzI1LTkwNDExYmUxYjQwOA0KQ29udGVudC1UeXBlOiBtdWx0aXBhcnQvbWl4ZWQ7IGJvdW5kYXJ5PWNoYW5nZXNldHJlc3BvbnNlXzlhMzBlZjc0LTdkNDEtNGIyNi04MWVkLTY2YjFkOWIxNjI4Yw0KDQotLWNoYW5nZXNldHJlc3BvbnNlXzlhMzBlZjc0LTdkNDEtNGIyNi04MWVkLTY2YjFkOWIxNjI4YwpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL2h0dHAKQ29udGVudC1UcmFuc2Zlci1FbmNvZGluZzogYmluYXJ5CgpIVFRQLzEuMSAyMDQgTm8gQ29udGVudA0KRVRhZzogVy8iZGF0ZXRpbWUnMjAyMS0wOC0wMlQxOCUzQTAxJTNBMzkuMzE2MjI0OFonIg0KQ29udGVudC1JRDogMQ0KDQoNCi0tY2hhbmdlc2V0cmVzcG9uc2VfOWEzMGVmNzQtN2Q0MS00YjI2LTgxZWQtNjZiMWQ5YjE2MjhjCkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vaHR0cApDb250ZW50LVRyYW5zZmVyLUVuY29kaW5nOiBiaW5hcnkKCkhUVFAvMS4xIDIwNCBObyBDb250ZW50DQpDb250ZW50LUlEOiAyDQoNCg0KLS1jaGFuZ2VzZXRyZXNwb25zZV85YTMwZWY3NC03ZDQxLTRiMjYtODFlZC02NmIxZDliMTYyOGMKQ29udGVudC1UeXBlOiBhcHBsaWNhdGlvbi9odHRwCkNvbnRlbnQtVHJhbnNmZXItRW5jb2Rpbmc6IGJpbmFyeQoKSFRUUC8xLjEgMjA0IE5vIENvbnRlbnQNCkVUYWc6IFcvImRhdGV0aW1lJzIwMjEtMDgtMDJUMTglM0EwMSUzQTM5LjMxNzQ1MzZaJyINCkNvbnRlbnQtSUQ6IDMNCg0KDQotLWNoYW5nZXNldHJlc3BvbnNlXzlhMzBlZjc0LTdkNDEtNGIyNi04MWVkLTY2YjFkOWIxNjI4YwpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL2h0dHAKQ29udGVudC1UcmFuc2Zlci1FbmNvZGluZzogYmluYXJ5CgpIVFRQLzEuMSAyMDQgTm8gQ29udGVudA0KRVRhZzogVy8iZGF0ZXRpbWUnMjAyMS0wOC0wMlQxOCUzQTAxJTNBMzkuMzE4MDY4MFonIg0KUHJlZmVyZW5jZS1BcHBsaWVkOiByZXR1cm4tbm8tY29udGVudA0KTG9jYXRpb246IGh0dHBzOi8vc2VhbmthbmVwcmltLnRhYmxlLmNvc21vcy5henVyZS5jb20vdGFibGVOYW1lMzk2NjMyNjAxMyhQYXJ0aXRpb25LZXk9J3BhcnRpdGlvbicsUm93S2V5PSc0JykNCkNvbnRlbnQtSUQ6IDQNCg0KDQotLWNoYW5nZXNldHJlc3BvbnNlXzlhMzBlZjc0LTdkNDEtNGIyNi04MWVkLTY2YjFkOWIxNjI4YwpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL2h0dHAKQ29udGVudC1UcmFuc2Zlci1FbmNvZGluZzogYmluYXJ5CgpIVFRQLzEuMSAyMDQgTm8gQ29udGVudA0KRVRhZzogVy8iZGF0ZXRpbWUnMjAyMS0wOC0wMlQxOCUzQTAxJTNBMzkuMzE4NDc3NlonIg0KUHJlZmVyZW5jZS1BcHBsaWVkOiByZXR1cm4tbm8tY29udGVudA0KTG9jYXRpb246IGh0dHBzOi8vc2VhbmthbmVwcmltLnRhYmxlLmNvc21vcy5henVyZS5jb20vdGFibGVOYW1lMzk2NjMyNjAxMyhQYXJ0aXRpb25LZXk9J3BhcnRpdGlvbicsUm93S2V5PSc1JykNCkNvbnRlbnQtSUQ6IDUNCg0KDQotLWNoYW5nZXNldHJlc3BvbnNlXzlhMzBlZjc0LTdkNDEtNGIyNi04MWVkLTY2YjFkOWIxNjI4Yy0tCi0tYmF0Y2hyZXNwb25zZV8wNTc4NzI4MC0yMzc2LTRiNmUtOGMyNS05MDQxMWJlMWI0MDgtLQ0K" + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/tableName3966326013()?%24filter=RowKey\u002Beq\u002B%271%27", + "RequestMethod": "GET", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "GET", + ":path": "/tableName3966326013()?%24filter=RowKey\u002Beq\u002B%271%27", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:40 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "Date": "Mon, 02 Aug 2021 18:01:39 GMT", + "Transfer-Encoding": "chunked", + "x-ms-request-id": "7e0accdc-445c-43dd-ab57-7e9c7c283054" + }, + "ResponseBody": { + "value": [ + { + "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A39.3162248Z\u0027\u0022", + "Bool": true, + "Byte": "c29tZWJ5dGVz", + "DateTime": "2021-07-13T00:00:00Z", + "Float": 3.14159, + "Integer": 1, + "PartitionKey": "partition", + "RowKey": "1", + "String": "someString", + "MergeProperty": "foo", + "Timestamp": "2021-08-02T18:01:39.3162248Z" + } + ], + "odata.metadata": "https://seankaneprim.table.cosmos.azure.com/$metadata#tableName3966326013" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables(\u0027tableName3966326013\u0027)", + "RequestMethod": "DELETE", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "DELETE", + ":path": "/Tables(\u0027tableName3966326013\u0027)", + ":scheme": "https", + "Accept": "application/json", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:40 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "Date": "Mon, 02 Aug 2021 18:01:39 GMT", + "x-ms-request-id": "edcc8be7-44f7-4b4b-97ab-7c13370eb234" + }, + "ResponseBody": null + } + ], + "Variables": {} +} \ No newline at end of file diff --git a/sdk/tables/aztable/recordings/TestBatchMixed/TestBatchMixed_storage.json b/sdk/tables/aztable/recordings/TestBatchMixed/TestBatchMixed_storage.json new file mode 100644 index 000000000000..40d5e4ada970 --- /dev/null +++ b/sdk/tables/aztable/recordings/TestBatchMixed/TestBatchMixed_storage.json @@ -0,0 +1,248 @@ +{ + "Entries": [ + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/Tables", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "35", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:37 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "TableName": "tableName1678010654" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", + "Date": "Mon, 02 Aug 2021 18:01:36 GMT", + "Location": "https://seankaneprim.table.core.windows.net/Tables(\u0027tableName1678010654\u0027)", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b4965-9002-0057-72c8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": { + "odata.metadata": "https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element", + "TableName": "tableName1678010654" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/$batch", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/$batch", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "2128", + "Content-Type": "multipart/mixed; boundary=batch_59628644-5f91-4d74-4e38-adfa297ce603", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:37 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": "LS1iYXRjaF81OTYyODY0NC01ZjkxLTRkNzQtNGUzOC1hZGZhMjk3Y2U2MDMNCkNvbnRlbnQtVHlwZTogbXVsdGlwYXJ0L21peGVkOyBib3VuZGFyeT1jaGFuZ2VzZXRfZWNkMGQwMzEtZDhiMy00ZjI0LTY1ZjMtYjY3N2YyY2E3NWVkDQoNCi0tY2hhbmdlc2V0X2VjZDBkMDMxLWQ4YjMtNGYyNC02NWYzLWI2NzdmMmNhNzVlZA0KQ29udGVudC1UcmFuc2Zlci1FbmNvZGluZzogYmluYXJ5DQpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL2h0dHANCg0KUE9TVCBodHRwczovL3NlYW5rYW5lcHJpbS50YWJsZS5jb3JlLndpbmRvd3MubmV0L3RhYmxlTmFtZTE2NzgwMTA2NTQ/JTI0Zm9ybWF0PWFwcGxpY2F0aW9uJTJGanNvbiUzQm9kYXRhJTNEbWluaW1hbG1ldGFkYXRhIEhUVFAvMS4xDQpBY2NlcHQ6IGFwcGxpY2F0aW9uL2pzb247b2RhdGE9bWluaW1hbG1ldGFkYXRhDQpDb250ZW50LUxlbmd0aDogMTk0DQpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL2pzb24NCkRhdGFzZXJ2aWNldmVyc2lvbjogMy4wDQpQcmVmZXI6IHJldHVybi1uby1jb250ZW50DQpYLU1zLVZlcnNpb246IDIwMTktMDItMDINCg0KeyJCb29sIjp0cnVlLCJCeXRlIjoiYzI5dFpXSjVkR1Z6IiwiRGF0ZVRpbWUiOiIyMDIxLTA3LTEzVDAwOjAwOjAwWiIsIkZsb2F0IjozLjE0MTU5LCJJbnRlZ2VyIjoxLCJQYXJ0aXRpb25LZXkiOiJwYXJ0aXRpb24iLCJSb3dLZXkiOiIxIiwiU3RyaW5nIjoic29tZVN0cmluZyIsIlRpbWVzdGFtcCI6IjAwMDEtMDEtMDFUMDA6MDA6MDBaIn0NCi0tY2hhbmdlc2V0X2VjZDBkMDMxLWQ4YjMtNGYyNC02NWYzLWI2NzdmMmNhNzVlZA0KQ29udGVudC1UcmFuc2Zlci1FbmNvZGluZzogYmluYXJ5DQpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL2h0dHANCg0KUE9TVCBodHRwczovL3NlYW5rYW5lcHJpbS50YWJsZS5jb3JlLndpbmRvd3MubmV0L3RhYmxlTmFtZTE2NzgwMTA2NTQ/JTI0Zm9ybWF0PWFwcGxpY2F0aW9uJTJGanNvbiUzQm9kYXRhJTNEbWluaW1hbG1ldGFkYXRhIEhUVFAvMS4xDQpBY2NlcHQ6IGFwcGxpY2F0aW9uL2pzb247b2RhdGE9bWluaW1hbG1ldGFkYXRhDQpDb250ZW50LUxlbmd0aDogMTk0DQpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL2pzb24NCkRhdGFzZXJ2aWNldmVyc2lvbjogMy4wDQpQcmVmZXI6IHJldHVybi1uby1jb250ZW50DQpYLU1zLVZlcnNpb246IDIwMTktMDItMDINCg0KeyJCb29sIjp0cnVlLCJCeXRlIjoiYzI5dFpXSjVkR1Z6IiwiRGF0ZVRpbWUiOiIyMDIxLTA3LTEzVDAwOjAwOjAwWiIsIkZsb2F0IjozLjE0MTU5LCJJbnRlZ2VyIjoyLCJQYXJ0aXRpb25LZXkiOiJwYXJ0aXRpb24iLCJSb3dLZXkiOiIyIiwiU3RyaW5nIjoic29tZVN0cmluZyIsIlRpbWVzdGFtcCI6IjAwMDEtMDEtMDFUMDA6MDA6MDBaIn0NCi0tY2hhbmdlc2V0X2VjZDBkMDMxLWQ4YjMtNGYyNC02NWYzLWI2NzdmMmNhNzVlZA0KQ29udGVudC1UcmFuc2Zlci1FbmNvZGluZzogYmluYXJ5DQpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL2h0dHANCg0KUE9TVCBodHRwczovL3NlYW5rYW5lcHJpbS50YWJsZS5jb3JlLndpbmRvd3MubmV0L3RhYmxlTmFtZTE2NzgwMTA2NTQ/JTI0Zm9ybWF0PWFwcGxpY2F0aW9uJTJGanNvbiUzQm9kYXRhJTNEbWluaW1hbG1ldGFkYXRhIEhUVFAvMS4xDQpBY2NlcHQ6IGFwcGxpY2F0aW9uL2pzb247b2RhdGE9bWluaW1hbG1ldGFkYXRhDQpDb250ZW50LUxlbmd0aDogMTk0DQpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL2pzb24NCkRhdGFzZXJ2aWNldmVyc2lvbjogMy4wDQpQcmVmZXI6IHJldHVybi1uby1jb250ZW50DQpYLU1zLVZlcnNpb246IDIwMTktMDItMDINCg0KeyJCb29sIjp0cnVlLCJCeXRlIjoiYzI5dFpXSjVkR1Z6IiwiRGF0ZVRpbWUiOiIyMDIxLTA3LTEzVDAwOjAwOjAwWiIsIkZsb2F0IjozLjE0MTU5LCJJbnRlZ2VyIjozLCJQYXJ0aXRpb25LZXkiOiJwYXJ0aXRpb24iLCJSb3dLZXkiOiIzIiwiU3RyaW5nIjoic29tZVN0cmluZyIsIlRpbWVzdGFtcCI6IjAwMDEtMDEtMDFUMDA6MDA6MDBaIn0NCi0tY2hhbmdlc2V0X2VjZDBkMDMxLWQ4YjMtNGYyNC02NWYzLWI2NzdmMmNhNzVlZC0tDQoNCi0tYmF0Y2hfNTk2Mjg2NDQtNWY5MS00ZDc0LTRlMzgtYWRmYTI5N2NlNjAzLS0NCg==", + "StatusCode": 202, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Type": "multipart/mixed; boundary=batchresponse_2108a03f-4118-4205-8f28-8e545d47e0b2", + "Date": "Mon, 02 Aug 2021 18:01:36 GMT", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b49ac-9002-0057-32c8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": "LS1iYXRjaHJlc3BvbnNlXzIxMDhhMDNmLTQxMTgtNDIwNS04ZjI4LThlNTQ1ZDQ3ZTBiMg0KQ29udGVudC1UeXBlOiBtdWx0aXBhcnQvbWl4ZWQ7IGJvdW5kYXJ5PWNoYW5nZXNldHJlc3BvbnNlX2IwMDEzNmIwLWJhNjctNDRjMi1hZTEyLTAyOGIwNWRhMjUzMQ0KDQotLWNoYW5nZXNldHJlc3BvbnNlX2IwMDEzNmIwLWJhNjctNDRjMi1hZTEyLTAyOGIwNWRhMjUzMQ0KQ29udGVudC1UeXBlOiBhcHBsaWNhdGlvbi9odHRwDQpDb250ZW50LVRyYW5zZmVyLUVuY29kaW5nOiBiaW5hcnkNCg0KSFRUUC8xLjEgMjA0IE5vIENvbnRlbnQNClgtQ29udGVudC1UeXBlLU9wdGlvbnM6IG5vc25pZmYNCkNhY2hlLUNvbnRyb2w6IG5vLWNhY2hlDQpQcmVmZXJlbmNlLUFwcGxpZWQ6IHJldHVybi1uby1jb250ZW50DQpEYXRhU2VydmljZVZlcnNpb246IDMuMDsNCkxvY2F0aW9uOiBodHRwczovL3NlYW5rYW5lcHJpbS50YWJsZS5jb3JlLndpbmRvd3MubmV0L3RhYmxlTmFtZTE2NzgwMTA2NTQoUGFydGl0aW9uS2V5PSdwYXJ0aXRpb24nLFJvd0tleT0nMScpDQpEYXRhU2VydmljZUlkOiBodHRwczovL3NlYW5rYW5lcHJpbS50YWJsZS5jb3JlLndpbmRvd3MubmV0L3RhYmxlTmFtZTE2NzgwMTA2NTQoUGFydGl0aW9uS2V5PSdwYXJ0aXRpb24nLFJvd0tleT0nMScpDQpFVGFnOiBXLyJkYXRldGltZScyMDIxLTA4LTAyVDE4JTNBMDElM0EzNy4wNTUzMzI0WiciDQoNCg0KLS1jaGFuZ2VzZXRyZXNwb25zZV9iMDAxMzZiMC1iYTY3LTQ0YzItYWUxMi0wMjhiMDVkYTI1MzENCkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vaHR0cA0KQ29udGVudC1UcmFuc2Zlci1FbmNvZGluZzogYmluYXJ5DQoNCkhUVFAvMS4xIDIwNCBObyBDb250ZW50DQpYLUNvbnRlbnQtVHlwZS1PcHRpb25zOiBub3NuaWZmDQpDYWNoZS1Db250cm9sOiBuby1jYWNoZQ0KUHJlZmVyZW5jZS1BcHBsaWVkOiByZXR1cm4tbm8tY29udGVudA0KRGF0YVNlcnZpY2VWZXJzaW9uOiAzLjA7DQpMb2NhdGlvbjogaHR0cHM6Ly9zZWFua2FuZXByaW0udGFibGUuY29yZS53aW5kb3dzLm5ldC90YWJsZU5hbWUxNjc4MDEwNjU0KFBhcnRpdGlvbktleT0ncGFydGl0aW9uJyxSb3dLZXk9JzInKQ0KRGF0YVNlcnZpY2VJZDogaHR0cHM6Ly9zZWFua2FuZXByaW0udGFibGUuY29yZS53aW5kb3dzLm5ldC90YWJsZU5hbWUxNjc4MDEwNjU0KFBhcnRpdGlvbktleT0ncGFydGl0aW9uJyxSb3dLZXk9JzInKQ0KRVRhZzogVy8iZGF0ZXRpbWUnMjAyMS0wOC0wMlQxOCUzQTAxJTNBMzcuMDU1MzMyNFonIg0KDQoNCi0tY2hhbmdlc2V0cmVzcG9uc2VfYjAwMTM2YjAtYmE2Ny00NGMyLWFlMTItMDI4YjA1ZGEyNTMxDQpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL2h0dHANCkNvbnRlbnQtVHJhbnNmZXItRW5jb2Rpbmc6IGJpbmFyeQ0KDQpIVFRQLzEuMSAyMDQgTm8gQ29udGVudA0KWC1Db250ZW50LVR5cGUtT3B0aW9uczogbm9zbmlmZg0KQ2FjaGUtQ29udHJvbDogbm8tY2FjaGUNClByZWZlcmVuY2UtQXBwbGllZDogcmV0dXJuLW5vLWNvbnRlbnQNCkRhdGFTZXJ2aWNlVmVyc2lvbjogMy4wOw0KTG9jYXRpb246IGh0dHBzOi8vc2VhbmthbmVwcmltLnRhYmxlLmNvcmUud2luZG93cy5uZXQvdGFibGVOYW1lMTY3ODAxMDY1NChQYXJ0aXRpb25LZXk9J3BhcnRpdGlvbicsUm93S2V5PSczJykNCkRhdGFTZXJ2aWNlSWQ6IGh0dHBzOi8vc2VhbmthbmVwcmltLnRhYmxlLmNvcmUud2luZG93cy5uZXQvdGFibGVOYW1lMTY3ODAxMDY1NChQYXJ0aXRpb25LZXk9J3BhcnRpdGlvbicsUm93S2V5PSczJykNCkVUYWc6IFcvImRhdGV0aW1lJzIwMjEtMDgtMDJUMTglM0EwMSUzQTM3LjA1NTMzMjRaJyINCg0KDQotLWNoYW5nZXNldHJlc3BvbnNlX2IwMDEzNmIwLWJhNjctNDRjMi1hZTEyLTAyOGIwNWRhMjUzMS0tDQotLWJhdGNocmVzcG9uc2VfMjEwOGEwM2YtNDExOC00MjA1LThmMjgtOGU1NDVkNDdlMGIyLS0NCg==" + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/tableName1678010654()?%24filter=RowKey\u002Beq\u002B%271%27", + "RequestMethod": "GET", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "GET", + ":path": "/tableName1678010654()?%24filter=RowKey\u002Beq\u002B%271%27", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:37 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", + "Date": "Mon, 02 Aug 2021 18:01:36 GMT", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "Vary": "Origin", + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b49e3-9002-0057-61c8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": { + "odata.metadata": "https://seankaneprim.table.core.windows.net/$metadata#tableName1678010654", + "value": [ + { + "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A37.0553324Z\u0027\u0022", + "PartitionKey": "partition", + "RowKey": "1", + "Timestamp": "2021-08-02T18:01:37.0553324Z", + "Bool": true, + "Byte": "c29tZWJ5dGVz", + "DateTime": "2021-07-13T00:00:00Z", + "Float": 3.14159, + "Integer": 1, + "String": "someString" + } + ] + } + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/$batch", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/$batch", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "2951", + "Content-Type": "multipart/mixed; boundary=batch_8c3530a3-8793-4181-667c-592dc6ecaa4b", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:37 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": "LS1iYXRjaF84YzM1MzBhMy04NzkzLTQxODEtNjY3Yy01OTJkYzZlY2FhNGINCkNvbnRlbnQtVHlwZTogbXVsdGlwYXJ0L21peGVkOyBib3VuZGFyeT1jaGFuZ2VzZXRfZmY3MzUzMTEtMzAwOC00ZDY3LTUzM2EtNmZhOTIzYWI5ZGFmDQoNCi0tY2hhbmdlc2V0X2ZmNzM1MzExLTMwMDgtNGQ2Ny01MzNhLTZmYTkyM2FiOWRhZg0KQ29udGVudC1UcmFuc2Zlci1FbmNvZGluZzogYmluYXJ5DQpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL2h0dHANCg0KUEFUQ0ggaHR0cHM6Ly9zZWFua2FuZXByaW0udGFibGUuY29yZS53aW5kb3dzLm5ldC90YWJsZU5hbWUxNjc4MDEwNjU0KFBhcnRpdGlvbktleT0ncGFydGl0aW9uJyxSb3dLZXk9JzEnKT8lMjRmb3JtYXQ9YXBwbGljYXRpb24lMkZqc29uJTNCb2RhdGElM0RtaW5pbWFsbWV0YWRhdGEgSFRUUC8xLjENCkFjY2VwdDogYXBwbGljYXRpb24vanNvbg0KQ29udGVudC1MZW5ndGg6IDYzDQpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL2pzb24NCkRhdGFzZXJ2aWNldmVyc2lvbjogMy4wDQpJZi1NYXRjaDogVy8iZGF0ZXRpbWUnMjAyMS0wOC0wMlQxOCUzQTAxJTNBMzcuMDU1MzMyNFonIg0KWC1Ncy1WZXJzaW9uOiAyMDE5LTAyLTAyDQoNCnsiTWVyZ2VQcm9wZXJ0eSI6ImZvbyIsIlBhcnRpdGlvbktleSI6InBhcnRpdGlvbiIsIlJvd0tleSI6IjEifQ0KLS1jaGFuZ2VzZXRfZmY3MzUzMTEtMzAwOC00ZDY3LTUzM2EtNmZhOTIzYWI5ZGFmDQpDb250ZW50LVRyYW5zZmVyLUVuY29kaW5nOiBiaW5hcnkNCkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vaHR0cA0KDQpERUxFVEUgaHR0cHM6Ly9zZWFua2FuZXByaW0udGFibGUuY29yZS53aW5kb3dzLm5ldC90YWJsZU5hbWUxNjc4MDEwNjU0KFBhcnRpdGlvbktleT0ncGFydGl0aW9uJyxSb3dLZXk9JzInKT8lMjRmb3JtYXQ9YXBwbGljYXRpb24lMkZqc29uJTNCb2RhdGElM0RtaW5pbWFsbWV0YWRhdGEgSFRUUC8xLjENCkFjY2VwdDogYXBwbGljYXRpb24vanNvbjtvZGF0YT1taW5pbWFsbWV0YWRhdGENCkRhdGFzZXJ2aWNldmVyc2lvbjogMy4wDQpJZi1NYXRjaDogKg0KWC1Ncy1WZXJzaW9uOiAyMDE5LTAyLTAyDQoNCg0KLS1jaGFuZ2VzZXRfZmY3MzUzMTEtMzAwOC00ZDY3LTUzM2EtNmZhOTIzYWI5ZGFmDQpDb250ZW50LVRyYW5zZmVyLUVuY29kaW5nOiBiaW5hcnkNCkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vaHR0cA0KDQpQVVQgaHR0cHM6Ly9zZWFua2FuZXByaW0udGFibGUuY29yZS53aW5kb3dzLm5ldC90YWJsZU5hbWUxNjc4MDEwNjU0KFBhcnRpdGlvbktleT0ncGFydGl0aW9uJyxSb3dLZXk9JzMnKT8lMjRmb3JtYXQ9YXBwbGljYXRpb24lMkZqc29uJTNCb2RhdGElM0RtaW5pbWFsbWV0YWRhdGEgSFRUUC8xLjENCkFjY2VwdDogYXBwbGljYXRpb24vanNvbg0KQ29udGVudC1MZW5ndGg6IDY1DQpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL2pzb24NCkRhdGFzZXJ2aWNldmVyc2lvbjogMy4wDQpJZi1NYXRjaDogKg0KWC1Ncy1WZXJzaW9uOiAyMDE5LTAyLTAyDQoNCnsiUGFydGl0aW9uS2V5IjoicGFydGl0aW9uIiwiUmVwbGFjZVByb3BlcnR5IjoiZm9vIiwiUm93S2V5IjoiMyJ9DQotLWNoYW5nZXNldF9mZjczNTMxMS0zMDA4LTRkNjctNTMzYS02ZmE5MjNhYjlkYWYNCkNvbnRlbnQtVHJhbnNmZXItRW5jb2Rpbmc6IGJpbmFyeQ0KQ29udGVudC1UeXBlOiBhcHBsaWNhdGlvbi9odHRwDQoNClBPU1QgaHR0cHM6Ly9zZWFua2FuZXByaW0udGFibGUuY29yZS53aW5kb3dzLm5ldC90YWJsZU5hbWUxNjc4MDEwNjU0PyUyNGZvcm1hdD1hcHBsaWNhdGlvbiUyRmpzb24lM0JvZGF0YSUzRG1pbmltYWxtZXRhZGF0YSBIVFRQLzEuMQ0KQWNjZXB0OiBhcHBsaWNhdGlvbi9qc29uO29kYXRhPW1pbmltYWxtZXRhZGF0YQ0KQ29udGVudC1MZW5ndGg6IDE5NA0KQ29udGVudC1UeXBlOiBhcHBsaWNhdGlvbi9qc29uDQpEYXRhc2VydmljZXZlcnNpb246IDMuMA0KUHJlZmVyOiByZXR1cm4tbm8tY29udGVudA0KWC1Ncy1WZXJzaW9uOiAyMDE5LTAyLTAyDQoNCnsiQm9vbCI6dHJ1ZSwiQnl0ZSI6ImMyOXRaV0o1ZEdWeiIsIkRhdGVUaW1lIjoiMjAyMS0wNy0xM1QwMDowMDowMFoiLCJGbG9hdCI6My4xNDE1OSwiSW50ZWdlciI6NCwiUGFydGl0aW9uS2V5IjoicGFydGl0aW9uIiwiUm93S2V5IjoiNCIsIlN0cmluZyI6InNvbWVTdHJpbmciLCJUaW1lc3RhbXAiOiIwMDAxLTAxLTAxVDAwOjAwOjAwWiJ9DQotLWNoYW5nZXNldF9mZjczNTMxMS0zMDA4LTRkNjctNTMzYS02ZmE5MjNhYjlkYWYNCkNvbnRlbnQtVHJhbnNmZXItRW5jb2Rpbmc6IGJpbmFyeQ0KQ29udGVudC1UeXBlOiBhcHBsaWNhdGlvbi9odHRwDQoNClBPU1QgaHR0cHM6Ly9zZWFua2FuZXByaW0udGFibGUuY29yZS53aW5kb3dzLm5ldC90YWJsZU5hbWUxNjc4MDEwNjU0PyUyNGZvcm1hdD1hcHBsaWNhdGlvbiUyRmpzb24lM0JvZGF0YSUzRG1pbmltYWxtZXRhZGF0YSBIVFRQLzEuMQ0KQWNjZXB0OiBhcHBsaWNhdGlvbi9qc29uO29kYXRhPW1pbmltYWxtZXRhZGF0YQ0KQ29udGVudC1MZW5ndGg6IDE5NA0KQ29udGVudC1UeXBlOiBhcHBsaWNhdGlvbi9qc29uDQpEYXRhc2VydmljZXZlcnNpb246IDMuMA0KUHJlZmVyOiByZXR1cm4tbm8tY29udGVudA0KWC1Ncy1WZXJzaW9uOiAyMDE5LTAyLTAyDQoNCnsiQm9vbCI6dHJ1ZSwiQnl0ZSI6ImMyOXRaV0o1ZEdWeiIsIkRhdGVUaW1lIjoiMjAyMS0wNy0xM1QwMDowMDowMFoiLCJGbG9hdCI6My4xNDE1OSwiSW50ZWdlciI6NSwiUGFydGl0aW9uS2V5IjoicGFydGl0aW9uIiwiUm93S2V5IjoiNSIsIlN0cmluZyI6InNvbWVTdHJpbmciLCJUaW1lc3RhbXAiOiIwMDAxLTAxLTAxVDAwOjAwOjAwWiJ9DQotLWNoYW5nZXNldF9mZjczNTMxMS0zMDA4LTRkNjctNTMzYS02ZmE5MjNhYjlkYWYtLQ0KDQotLWJhdGNoXzhjMzUzMGEzLTg3OTMtNDE4MS02NjdjLTU5MmRjNmVjYWE0Yi0tDQo=", + "StatusCode": 202, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Type": "multipart/mixed; boundary=batchresponse_820e8e2e-9cdf-4dae-a14e-6318792c83b9", + "Date": "Mon, 02 Aug 2021 18:01:36 GMT", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b4a1c-9002-0057-17c8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": "LS1iYXRjaHJlc3BvbnNlXzgyMGU4ZTJlLTljZGYtNGRhZS1hMTRlLTYzMTg3OTJjODNiOQ0KQ29udGVudC1UeXBlOiBtdWx0aXBhcnQvbWl4ZWQ7IGJvdW5kYXJ5PWNoYW5nZXNldHJlc3BvbnNlXzU3NzY4MDRlLTllODMtNDIyNy1hY2Y1LTdiNzIxNDcwNDliOA0KDQotLWNoYW5nZXNldHJlc3BvbnNlXzU3NzY4MDRlLTllODMtNDIyNy1hY2Y1LTdiNzIxNDcwNDliOA0KQ29udGVudC1UeXBlOiBhcHBsaWNhdGlvbi9odHRwDQpDb250ZW50LVRyYW5zZmVyLUVuY29kaW5nOiBiaW5hcnkNCg0KSFRUUC8xLjEgMjA0IE5vIENvbnRlbnQNClgtQ29udGVudC1UeXBlLU9wdGlvbnM6IG5vc25pZmYNCkNhY2hlLUNvbnRyb2w6IG5vLWNhY2hlDQpEYXRhU2VydmljZVZlcnNpb246IDEuMDsNCkVUYWc6IFcvImRhdGV0aW1lJzIwMjEtMDgtMDJUMTglM0EwMSUzQTM3LjMzODA5NjRaJyINCg0KDQotLWNoYW5nZXNldHJlc3BvbnNlXzU3NzY4MDRlLTllODMtNDIyNy1hY2Y1LTdiNzIxNDcwNDliOA0KQ29udGVudC1UeXBlOiBhcHBsaWNhdGlvbi9odHRwDQpDb250ZW50LVRyYW5zZmVyLUVuY29kaW5nOiBiaW5hcnkNCg0KSFRUUC8xLjEgMjA0IE5vIENvbnRlbnQNClgtQ29udGVudC1UeXBlLU9wdGlvbnM6IG5vc25pZmYNCkNhY2hlLUNvbnRyb2w6IG5vLWNhY2hlDQpEYXRhU2VydmljZVZlcnNpb246IDEuMDsNCg0KDQotLWNoYW5nZXNldHJlc3BvbnNlXzU3NzY4MDRlLTllODMtNDIyNy1hY2Y1LTdiNzIxNDcwNDliOA0KQ29udGVudC1UeXBlOiBhcHBsaWNhdGlvbi9odHRwDQpDb250ZW50LVRyYW5zZmVyLUVuY29kaW5nOiBiaW5hcnkNCg0KSFRUUC8xLjEgMjA0IE5vIENvbnRlbnQNClgtQ29udGVudC1UeXBlLU9wdGlvbnM6IG5vc25pZmYNCkNhY2hlLUNvbnRyb2w6IG5vLWNhY2hlDQpEYXRhU2VydmljZVZlcnNpb246IDEuMDsNCkVUYWc6IFcvImRhdGV0aW1lJzIwMjEtMDgtMDJUMTglM0EwMSUzQTM3LjMzOTA5NzNaJyINCg0KDQotLWNoYW5nZXNldHJlc3BvbnNlXzU3NzY4MDRlLTllODMtNDIyNy1hY2Y1LTdiNzIxNDcwNDliOA0KQ29udGVudC1UeXBlOiBhcHBsaWNhdGlvbi9odHRwDQpDb250ZW50LVRyYW5zZmVyLUVuY29kaW5nOiBiaW5hcnkNCg0KSFRUUC8xLjEgMjA0IE5vIENvbnRlbnQNClgtQ29udGVudC1UeXBlLU9wdGlvbnM6IG5vc25pZmYNCkNhY2hlLUNvbnRyb2w6IG5vLWNhY2hlDQpQcmVmZXJlbmNlLUFwcGxpZWQ6IHJldHVybi1uby1jb250ZW50DQpEYXRhU2VydmljZVZlcnNpb246IDMuMDsNCkxvY2F0aW9uOiBodHRwczovL3NlYW5rYW5lcHJpbS50YWJsZS5jb3JlLndpbmRvd3MubmV0L3RhYmxlTmFtZTE2NzgwMTA2NTQoUGFydGl0aW9uS2V5PSdwYXJ0aXRpb24nLFJvd0tleT0nNCcpDQpEYXRhU2VydmljZUlkOiBodHRwczovL3NlYW5rYW5lcHJpbS50YWJsZS5jb3JlLndpbmRvd3MubmV0L3RhYmxlTmFtZTE2NzgwMTA2NTQoUGFydGl0aW9uS2V5PSdwYXJ0aXRpb24nLFJvd0tleT0nNCcpDQpFVGFnOiBXLyJkYXRldGltZScyMDIxLTA4LTAyVDE4JTNBMDElM0EzNy4zMzg1MzEzWiciDQoNCg0KLS1jaGFuZ2VzZXRyZXNwb25zZV81Nzc2ODA0ZS05ZTgzLTQyMjctYWNmNS03YjcyMTQ3MDQ5YjgNCkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vaHR0cA0KQ29udGVudC1UcmFuc2Zlci1FbmNvZGluZzogYmluYXJ5DQoNCkhUVFAvMS4xIDIwNCBObyBDb250ZW50DQpYLUNvbnRlbnQtVHlwZS1PcHRpb25zOiBub3NuaWZmDQpDYWNoZS1Db250cm9sOiBuby1jYWNoZQ0KUHJlZmVyZW5jZS1BcHBsaWVkOiByZXR1cm4tbm8tY29udGVudA0KRGF0YVNlcnZpY2VWZXJzaW9uOiAzLjA7DQpMb2NhdGlvbjogaHR0cHM6Ly9zZWFua2FuZXByaW0udGFibGUuY29yZS53aW5kb3dzLm5ldC90YWJsZU5hbWUxNjc4MDEwNjU0KFBhcnRpdGlvbktleT0ncGFydGl0aW9uJyxSb3dLZXk9JzUnKQ0KRGF0YVNlcnZpY2VJZDogaHR0cHM6Ly9zZWFua2FuZXByaW0udGFibGUuY29yZS53aW5kb3dzLm5ldC90YWJsZU5hbWUxNjc4MDEwNjU0KFBhcnRpdGlvbktleT0ncGFydGl0aW9uJyxSb3dLZXk9JzUnKQ0KRVRhZzogVy8iZGF0ZXRpbWUnMjAyMS0wOC0wMlQxOCUzQTAxJTNBMzcuMzM4NTMxM1onIg0KDQoNCi0tY2hhbmdlc2V0cmVzcG9uc2VfNTc3NjgwNGUtOWU4My00MjI3LWFjZjUtN2I3MjE0NzA0OWI4LS0NCi0tYmF0Y2hyZXNwb25zZV84MjBlOGUyZS05Y2RmLTRkYWUtYTE0ZS02MzE4NzkyYzgzYjktLQ0K" + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/tableName1678010654()?%24filter=RowKey\u002Beq\u002B%271%27", + "RequestMethod": "GET", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "GET", + ":path": "/tableName1678010654()?%24filter=RowKey\u002Beq\u002B%271%27", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:38 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", + "Date": "Mon, 02 Aug 2021 18:01:36 GMT", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "Vary": "Origin", + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b4a63-9002-0057-5ec8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": { + "odata.metadata": "https://seankaneprim.table.core.windows.net/$metadata#tableName1678010654", + "value": [ + { + "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A37.3380964Z\u0027\u0022", + "PartitionKey": "partition", + "RowKey": "1", + "Timestamp": "2021-08-02T18:01:37.3380964Z", + "Bool": true, + "Byte": "c29tZWJ5dGVz", + "DateTime": "2021-07-13T00:00:00Z", + "Float": 3.14159, + "Integer": 1, + "MergeProperty": "foo", + "String": "someString" + } + ] + } + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables(\u0027tableName1678010654\u0027)", + "RequestMethod": "DELETE", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "DELETE", + ":path": "/Tables(\u0027tableName1678010654\u0027)", + ":scheme": "https", + "Accept": "application/json", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:38 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "0", + "Date": "Mon, 02 Aug 2021 18:01:37 GMT", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b4aba-9002-0057-32c8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": null + } + ], + "Variables": {} +} \ No newline at end of file diff --git a/sdk/tables/aztable/recordings/TestCreateTable/TestCreateTable_cosmos.json b/sdk/tables/aztable/recordings/TestCreateTable/TestCreateTable_cosmos.json new file mode 100644 index 000000000000..fad01639b27d --- /dev/null +++ b/sdk/tables/aztable/recordings/TestCreateTable/TestCreateTable_cosmos.json @@ -0,0 +1,63 @@ +{ + "Entries": [ + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/Tables", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "34", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:47 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "TableName": "tableName140918625" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "Date": "Mon, 02 Aug 2021 18:01:47 GMT", + "ETag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A47.1639560Z\u0027\u0022", + "Location": "https://seankaneprim.table.cosmos.azure.com/Tables(\u0027tableName140918625\u0027)", + "Transfer-Encoding": "chunked", + "x-ms-request-id": "93a43bb5-6189-43c8-a079-55cddd470dc2" + }, + "ResponseBody": { + "TableName": "tableName140918625", + "odata.metadata": "https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables(\u0027tableName140918625\u0027)", + "RequestMethod": "DELETE", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "DELETE", + ":path": "/Tables(\u0027tableName140918625\u0027)", + ":scheme": "https", + "Accept": "application/json", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:48 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "Date": "Mon, 02 Aug 2021 18:01:47 GMT", + "x-ms-request-id": "b415a211-a871-4ddc-8034-890e88c2bf46" + }, + "ResponseBody": null + } + ], + "Variables": {} +} \ No newline at end of file diff --git a/sdk/tables/aztable/recordings/TestCreateTable/TestCreateTable_storage.json b/sdk/tables/aztable/recordings/TestCreateTable/TestCreateTable_storage.json new file mode 100644 index 000000000000..2627af4a28a3 --- /dev/null +++ b/sdk/tables/aztable/recordings/TestCreateTable/TestCreateTable_storage.json @@ -0,0 +1,77 @@ +{ + "Entries": [ + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/Tables", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "35", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:47 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "TableName": "tableName1543039234" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", + "Date": "Mon, 02 Aug 2021 18:01:45 GMT", + "Location": "https://seankaneprim.table.core.windows.net/Tables(\u0027tableName1543039234\u0027)", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b560d-9002-0057-58c8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": { + "odata.metadata": "https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element", + "TableName": "tableName1543039234" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables(\u0027tableName1543039234\u0027)", + "RequestMethod": "DELETE", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "DELETE", + ":path": "/Tables(\u0027tableName1543039234\u0027)", + ":scheme": "https", + "Accept": "application/json", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:47 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "0", + "Date": "Mon, 02 Aug 2021 18:01:46 GMT", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b5634-9002-0057-7ac8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": null + } + ], + "Variables": {} +} \ No newline at end of file diff --git a/sdk/tables/aztable/recordings/TestCreateTableFromService/TestCreateTableFromService_cosmos.json b/sdk/tables/aztable/recordings/TestCreateTableFromService/TestCreateTableFromService_cosmos.json new file mode 100644 index 000000000000..247d240271ff --- /dev/null +++ b/sdk/tables/aztable/recordings/TestCreateTableFromService/TestCreateTableFromService_cosmos.json @@ -0,0 +1,63 @@ +{ + "Entries": [ + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/Tables", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "35", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:12 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "TableName": "tableName2528422725" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "Date": "Mon, 02 Aug 2021 18:02:12 GMT", + "ETag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A11.9961608Z\u0027\u0022", + "Location": "https://seankaneprim.table.cosmos.azure.com/Tables(\u0027tableName2528422725\u0027)", + "Transfer-Encoding": "chunked", + "x-ms-request-id": "8071dcee-1ff0-4914-933f-71dd2c7c4e3e" + }, + "ResponseBody": { + "TableName": "tableName2528422725", + "odata.metadata": "https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables(\u0027tableName2528422725\u0027)", + "RequestMethod": "DELETE", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "DELETE", + ":path": "/Tables(\u0027tableName2528422725\u0027)", + ":scheme": "https", + "Accept": "application/json", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:13 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "Date": "Mon, 02 Aug 2021 18:02:12 GMT", + "x-ms-request-id": "b0dc55b5-e072-4ae3-b682-f10d212c9075" + }, + "ResponseBody": null + } + ], + "Variables": {} +} \ No newline at end of file diff --git a/sdk/tables/aztable/recordings/TestCreateTableFromService/TestCreateTableFromService_storage.json b/sdk/tables/aztable/recordings/TestCreateTableFromService/TestCreateTableFromService_storage.json new file mode 100644 index 000000000000..74ef489fa259 --- /dev/null +++ b/sdk/tables/aztable/recordings/TestCreateTableFromService/TestCreateTableFromService_storage.json @@ -0,0 +1,77 @@ +{ + "Entries": [ + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/Tables", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "35", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:12 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "TableName": "tableName3702490422" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", + "Date": "Mon, 02 Aug 2021 18:02:10 GMT", + "Location": "https://seankaneprim.table.core.windows.net/Tables(\u0027tableName3702490422\u0027)", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b73e8-9002-0057-09c8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": { + "odata.metadata": "https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element", + "TableName": "tableName3702490422" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables(\u0027tableName3702490422\u0027)", + "RequestMethod": "DELETE", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "DELETE", + ":path": "/Tables(\u0027tableName3702490422\u0027)", + ":scheme": "https", + "Accept": "application/json", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:12 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "0", + "Date": "Mon, 02 Aug 2021 18:02:10 GMT", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b7420-9002-0057-3ec8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": null + } + ], + "Variables": {} +} \ No newline at end of file diff --git a/sdk/tables/aztable/recordings/TestDeleteEntity/TestDeleteEntity_cosmos.json b/sdk/tables/aztable/recordings/TestDeleteEntity/TestDeleteEntity_cosmos.json new file mode 100644 index 000000000000..486776446619 --- /dev/null +++ b/sdk/tables/aztable/recordings/TestDeleteEntity/TestDeleteEntity_cosmos.json @@ -0,0 +1,125 @@ +{ + "Entries": [ + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/Tables", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "35", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:54 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "TableName": "tableName3693089459" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "Date": "Mon, 02 Aug 2021 18:01:54 GMT", + "ETag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A53.9896328Z\u0027\u0022", + "Location": "https://seankaneprim.table.cosmos.azure.com/Tables(\u0027tableName3693089459\u0027)", + "Transfer-Encoding": "chunked", + "x-ms-request-id": "455f4cbf-f8af-4dc7-9765-ecf36c2fb745" + }, + "ResponseBody": { + "TableName": "tableName3693089459", + "odata.metadata": "https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/tableName3693089459", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/tableName3693089459", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "125", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "prefer": "return-no-content", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:55 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "Bool": true, + "Integer": 1, + "PartitionKey": "partition", + "RowKey": "1", + "String": "some string 1", + "Timestamp": "0001-01-01T00:00:00Z" + }, + "StatusCode": 204, + "ResponseHeaders": { + "Date": "Mon, 02 Aug 2021 18:01:54 GMT", + "ETag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A54.6005512Z\u0027\u0022", + "Location": "https://seankaneprim.table.cosmos.azure.com/tableName3693089459(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", + "Preference-Applied": "return-no-content", + "x-ms-request-id": "757e727f-60db-4669-bad8-ed69d583a95a" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/tableName3693089459(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", + "RequestMethod": "DELETE", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "DELETE", + ":path": "/tableName3693089459(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "dataserviceversion": "3.0", + "If-Match": "*", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:55 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "Date": "Mon, 02 Aug 2021 18:01:54 GMT", + "x-ms-request-id": "a92e53c2-5072-4797-af15-8f6a4294684b" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables(\u0027tableName3693089459\u0027)", + "RequestMethod": "DELETE", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "DELETE", + ":path": "/Tables(\u0027tableName3693089459\u0027)", + ":scheme": "https", + "Accept": "application/json", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:55 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "Date": "Mon, 02 Aug 2021 18:01:54 GMT", + "x-ms-request-id": "b8459cee-baef-4bc4-b66c-dcfada84e351" + }, + "ResponseBody": null + } + ], + "Variables": {} +} \ No newline at end of file diff --git a/sdk/tables/aztable/recordings/TestDeleteEntity/TestDeleteEntity_storage.json b/sdk/tables/aztable/recordings/TestDeleteEntity/TestDeleteEntity_storage.json new file mode 100644 index 000000000000..f86b8a175065 --- /dev/null +++ b/sdk/tables/aztable/recordings/TestDeleteEntity/TestDeleteEntity_storage.json @@ -0,0 +1,156 @@ +{ + "Entries": [ + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/Tables", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "35", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:53 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "TableName": "tableName1166831868" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", + "Date": "Mon, 02 Aug 2021 18:01:52 GMT", + "Location": "https://seankaneprim.table.core.windows.net/Tables(\u0027tableName1166831868\u0027)", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b5dcb-9002-0057-33c8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": { + "odata.metadata": "https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element", + "TableName": "tableName1166831868" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/tableName1166831868", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/tableName1166831868", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "125", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "prefer": "return-no-content", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:53 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "Bool": true, + "Integer": 1, + "PartitionKey": "partition", + "RowKey": "1", + "String": "some string 1", + "Timestamp": "0001-01-01T00:00:00Z" + }, + "StatusCode": 204, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "0", + "DataServiceId": "https://seankaneprim.table.core.windows.net/tableName1166831868(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", + "Date": "Mon, 02 Aug 2021 18:01:52 GMT", + "ETag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A53.3858168Z\u0027\u0022", + "Location": "https://seankaneprim.table.core.windows.net/tableName1166831868(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", + "Preference-Applied": "return-no-content", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b5e17-9002-0057-7ac8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/tableName1166831868(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", + "RequestMethod": "DELETE", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "DELETE", + ":path": "/tableName1166831868(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "dataserviceversion": "3.0", + "If-Match": "*", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:54 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "0", + "Date": "Mon, 02 Aug 2021 18:01:52 GMT", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b5e42-9002-0057-23c8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables(\u0027tableName1166831868\u0027)", + "RequestMethod": "DELETE", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "DELETE", + ":path": "/Tables(\u0027tableName1166831868\u0027)", + ":scheme": "https", + "Accept": "application/json", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:54 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "0", + "Date": "Mon, 02 Aug 2021 18:01:52 GMT", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b5e68-9002-0057-48c8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": null + } + ], + "Variables": {} +} \ No newline at end of file diff --git a/sdk/tables/aztable/recordings/TestEdmMarshalling/TestEdmMarshalling_cosmos.json b/sdk/tables/aztable/recordings/TestEdmMarshalling/TestEdmMarshalling_cosmos.json new file mode 100644 index 000000000000..2ca4622d5385 --- /dev/null +++ b/sdk/tables/aztable/recordings/TestEdmMarshalling/TestEdmMarshalling_cosmos.json @@ -0,0 +1,153 @@ +{ + "Entries": [ + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/Tables", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "35", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:29 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "TableName": "tableName3051201099" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "Date": "Mon, 02 Aug 2021 18:01:29 GMT", + "ETag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A29.5478792Z\u0027\u0022", + "Location": "https://seankaneprim.table.cosmos.azure.com/Tables(\u0027tableName3051201099\u0027)", + "Transfer-Encoding": "chunked", + "x-ms-request-id": "7b2cd034-8393-4ed3-abd0-d8b2500f0f23" + }, + "ResponseBody": { + "TableName": "tableName3051201099", + "odata.metadata": "https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/tableName3051201099", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/tableName3051201099", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "371", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "prefer": "return-no-content", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:30 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "Binary": "U29tZUJpbmFyeQ==", + "Binary@odata.type": "Edm.Binary", + "Bool": false, + "DateTime": "2013-08-02T17:37:43.0090043Z", + "DateTime@odata.type": "Edm.DateTime", + "Double": 1234.1234, + "Guid": "4185404a-5818-48c3-b9be-f217df0dba6f", + "Guid@odata.type": "Edm.Guid", + "Int32": 1234, + "Int64": "123456789012", + "Int64@odata.type": "Edm.Int64", + "PartitionKey": "partition", + "RowKey": "1", + "String": "test" + }, + "StatusCode": 204, + "ResponseHeaders": { + "Date": "Mon, 02 Aug 2021 18:01:29 GMT", + "ETag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A30.2675464Z\u0027\u0022", + "Location": "https://seankaneprim.table.cosmos.azure.com/tableName3051201099(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", + "Preference-Applied": "return-no-content", + "x-ms-request-id": "74214dc3-d3d6-4e72-a95f-b8aad84e7ee9" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/tableName3051201099(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)?%24format=application%2Fjson%3Bodata%3Dfullmetadata", + "RequestMethod": "GET", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "GET", + ":path": "/tableName3051201099(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)?%24format=application%2Fjson%3Bodata%3Dfullmetadata", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:31 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "Date": "Mon, 02 Aug 2021 18:01:30 GMT", + "ETag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A30.2675464Z\u0027\u0022", + "Transfer-Encoding": "chunked", + "x-ms-request-id": "5ee6bbcb-a21b-4ee9-a45f-bfc8d2419181" + }, + "ResponseBody": { + "odata.metadata": "https://seankaneprim.table.cosmos.azure.com/tableName3051201099/$metadata#tableName3051201099/@Element", + "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A30.2675464Z\u0027\u0022", + "Binary@odata.type": "Edm.Binary", + "Binary": "U29tZUJpbmFyeQ==", + "Bool": false, + "DateTime@odata.type": "Edm.DateTime", + "DateTime": "2013-08-02T17:37:43.0090043Z", + "Double": 1234.1234, + "Guid@odata.type": "Edm.Guid", + "Guid": "4185404a-5818-48c3-b9be-f217df0dba6f", + "Int32": 1234, + "Int64@odata.type": "Edm.Int64", + "Int64": "123456789012", + "PartitionKey": "partition", + "RowKey": "1", + "String": "test", + "Timestamp": "2021-08-02T18:01:30.2675464Z" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables(\u0027tableName3051201099\u0027)", + "RequestMethod": "DELETE", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "DELETE", + ":path": "/Tables(\u0027tableName3051201099\u0027)", + ":scheme": "https", + "Accept": "application/json", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:31 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "Date": "Mon, 02 Aug 2021 18:01:30 GMT", + "x-ms-request-id": "77321a9f-7b00-4e40-ba97-ce9878f881be" + }, + "ResponseBody": null + } + ], + "Variables": {} +} \ No newline at end of file diff --git a/sdk/tables/aztable/recordings/TestEdmMarshalling/TestEdmMarshalling_storage.json b/sdk/tables/aztable/recordings/TestEdmMarshalling/TestEdmMarshalling_storage.json new file mode 100644 index 000000000000..b651e9d4e6cc --- /dev/null +++ b/sdk/tables/aztable/recordings/TestEdmMarshalling/TestEdmMarshalling_storage.json @@ -0,0 +1,188 @@ +{ + "Entries": [ + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/Tables", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "35", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:29 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "TableName": "tableName1318965604" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", + "Date": "Mon, 02 Aug 2021 18:01:27 GMT", + "Location": "https://seankaneprim.table.core.windows.net/Tables(\u0027tableName1318965604\u0027)", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b3516-9002-0057-63c8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": { + "odata.metadata": "https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element", + "TableName": "tableName1318965604" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/tableName1318965604", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/tableName1318965604", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "371", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "prefer": "return-no-content", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:29 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "Binary": "U29tZUJpbmFyeQ==", + "Binary@odata.type": "Edm.Binary", + "Bool": false, + "DateTime": "2013-08-02T17:37:43.0090043Z", + "DateTime@odata.type": "Edm.DateTime", + "Double": 1234.1234, + "Guid": "4185404a-5818-48c3-b9be-f217df0dba6f", + "Guid@odata.type": "Edm.Guid", + "Int32": 1234, + "Int64": "123456789012", + "Int64@odata.type": "Edm.Int64", + "PartitionKey": "partition", + "RowKey": "1", + "String": "test" + }, + "StatusCode": 204, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "0", + "DataServiceId": "https://seankaneprim.table.core.windows.net/tableName1318965604(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", + "Date": "Mon, 02 Aug 2021 18:01:27 GMT", + "ETag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A28.7214731Z\u0027\u0022", + "Location": "https://seankaneprim.table.core.windows.net/tableName1318965604(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", + "Preference-Applied": "return-no-content", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b3584-9002-0057-1bc8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/tableName1318965604(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)?%24format=application%2Fjson%3Bodata%3Dfullmetadata", + "RequestMethod": "GET", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "GET", + ":path": "/tableName1318965604(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)?%24format=application%2Fjson%3Bodata%3Dfullmetadata", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:29 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Type": "application/json; odata=fullmetadata; streaming=true; charset=utf-8", + "Date": "Mon, 02 Aug 2021 18:01:28 GMT", + "ETag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A28.7214731Z\u0027\u0022", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "Vary": "Origin", + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b35e2-9002-0057-4cc8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": { + "odata.metadata": "https://seankaneprim.table.core.windows.net/$metadata#tableName1318965604/@Element", + "odata.type": "seankaneprim.tableName1318965604", + "odata.id": "https://seankaneprim.table.core.windows.net/tableName1318965604(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", + "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A28.7214731Z\u0027\u0022", + "odata.editLink": "tableName1318965604(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", + "PartitionKey": "partition", + "RowKey": "1", + "Timestamp@odata.type": "Edm.DateTime", + "Timestamp": "2021-08-02T18:01:28.7214731Z", + "Binary@odata.type": "Edm.Binary", + "Binary": "U29tZUJpbmFyeQ==", + "Bool": false, + "DateTime@odata.type": "Edm.DateTime", + "DateTime": "2013-08-02T17:37:43.0090043Z", + "Double": 1234.1234, + "Guid@odata.type": "Edm.Guid", + "Guid": "4185404a-5818-48c3-b9be-f217df0dba6f", + "Int32": 1234, + "Int64@odata.type": "Edm.Int64", + "Int64": "123456789012", + "String": "test" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables(\u0027tableName1318965604\u0027)", + "RequestMethod": "DELETE", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "DELETE", + ":path": "/Tables(\u0027tableName1318965604\u0027)", + ":scheme": "https", + "Accept": "application/json", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:29 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "0", + "Date": "Mon, 02 Aug 2021 18:01:28 GMT", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b36d0-9002-0057-43c8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": null + } + ], + "Variables": {} +} \ No newline at end of file diff --git a/sdk/tables/aztable/recordings/TestGetProperties.json b/sdk/tables/aztable/recordings/TestGetProperties.json new file mode 100644 index 000000000000..4e9b8c2dc35b --- /dev/null +++ b/sdk/tables/aztable/recordings/TestGetProperties.json @@ -0,0 +1,36 @@ +{ + "Entries": [ + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/?comp=properties\u0026restype=service", + "RequestMethod": "GET", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "GET", + ":path": "/?comp=properties\u0026restype=service", + ":scheme": "https", + "Accept": "application/xml", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:32 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/xml", + "Date": "Mon, 02 Aug 2021 18:02:31 GMT", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "Vary": "Origin", + "x-ms-request-id": "a05b8b04-9002-0057-22c8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": "\uFEFF\u003C?xml version=\u00221.0\u0022 encoding=\u0022utf-8\u0022?\u003E\u003CStorageServiceProperties\u003E\u003CLogging\u003E\u003CVersion\u003E1.0\u003C/Version\u003E\u003CRead\u003Etrue\u003C/Read\u003E\u003CWrite\u003Etrue\u003C/Write\u003E\u003CDelete\u003Etrue\u003C/Delete\u003E\u003CRetentionPolicy\u003E\u003CEnabled\u003Etrue\u003C/Enabled\u003E\u003CDays\u003E5\u003C/Days\u003E\u003C/RetentionPolicy\u003E\u003C/Logging\u003E\u003CHourMetrics\u003E\u003CVersion\u003E1.0\u003C/Version\u003E\u003CEnabled\u003Etrue\u003C/Enabled\u003E\u003CIncludeAPIs\u003Etrue\u003C/IncludeAPIs\u003E\u003CRetentionPolicy\u003E\u003CEnabled\u003Etrue\u003C/Enabled\u003E\u003CDays\u003E5\u003C/Days\u003E\u003C/RetentionPolicy\u003E\u003C/HourMetrics\u003E\u003CMinuteMetrics\u003E\u003CVersion\u003E1.0\u003C/Version\u003E\u003CEnabled\u003Etrue\u003C/Enabled\u003E\u003CIncludeAPIs\u003Etrue\u003C/IncludeAPIs\u003E\u003CRetentionPolicy\u003E\u003CEnabled\u003Etrue\u003C/Enabled\u003E\u003CDays\u003E5\u003C/Days\u003E\u003C/RetentionPolicy\u003E\u003C/MinuteMetrics\u003E\u003CCors\u003E\u003CCorsRule\u003E\u003CAllowedMethods\u003EPUT\u003C/AllowedMethods\u003E\u003CAllowedOrigins\u003Ewww.xyz.com\u003C/AllowedOrigins\u003E\u003CAllowedHeaders\u003Ex-ms-meta-data*\u003C/AllowedHeaders\u003E\u003CExposedHeaders\u003Ex-ms-meta-source*\u003C/ExposedHeaders\u003E\u003CMaxAgeInSeconds\u003E500\u003C/MaxAgeInSeconds\u003E\u003C/CorsRule\u003E\u003C/Cors\u003E\u003C/StorageServiceProperties\u003E" + } + ], + "Variables": {} +} \ No newline at end of file diff --git a/sdk/tables/aztable/recordings/TestInvalidEntity/TestInvalidEntity_cosmos.json b/sdk/tables/aztable/recordings/TestInvalidEntity/TestInvalidEntity_cosmos.json new file mode 100644 index 000000000000..ceaf5d00c5c2 --- /dev/null +++ b/sdk/tables/aztable/recordings/TestInvalidEntity/TestInvalidEntity_cosmos.json @@ -0,0 +1,97 @@ +{ + "Entries": [ + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/Tables", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "35", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:07 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "TableName": "tableName3912403841" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "Date": "Mon, 02 Aug 2021 18:02:07 GMT", + "ETag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A06.9482504Z\u0027\u0022", + "Location": "https://seankaneprim.table.cosmos.azure.com/Tables(\u0027tableName3912403841\u0027)", + "Transfer-Encoding": "chunked", + "x-ms-request-id": "a6b9d117-2399-4059-8cd5-5ac2b5b72527" + }, + "ResponseBody": { + "TableName": "tableName3912403841", + "odata.metadata": "https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/tableName3912403841", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/tableName3912403841", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "37", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "prefer": "return-no-content", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:08 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "String": "stringystring", + "Value": 10 + }, + "StatusCode": 400, + "ResponseHeaders": { + "Content-Type": "application/json; odata=fullmetadata", + "Date": "Mon, 02 Aug 2021 18:02:07 GMT", + "Transfer-Encoding": "chunked", + "x-ms-request-id": "34f62405-8424-4102-b4c6-516950e781b4" + }, + "ResponseBody": [ + "{\u0022odata.error\u0022:{\u0022code\u0022:\u0022PropertiesNeedValue\u0022,\u0022message\u0022:{\u0022lang\u0022:\u0022en-us\u0022,\u0022value\u0022:\u0022PartitionKey/RowKey cannot be empty\\r\\nActivityId: 34f62405-8424-4102-b4c6-516950e781b4, documentdb-dotnet-sdk/2.14.0 Host/64-bit MicrosoftWindowsNT/6.2.9200.0\\nRequestID:34f62405-8424-4102-b4c6-516950e781b4\\n\u0022}}}\r\n" + ] + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables(\u0027tableName3912403841\u0027)", + "RequestMethod": "DELETE", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "DELETE", + ":path": "/Tables(\u0027tableName3912403841\u0027)", + ":scheme": "https", + "Accept": "application/json", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:08 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "Date": "Mon, 02 Aug 2021 18:02:07 GMT", + "x-ms-request-id": "18ba8fbf-42a7-4a2c-b2b4-46036d641602" + }, + "ResponseBody": null + } + ], + "Variables": {} +} \ No newline at end of file diff --git a/sdk/tables/aztable/recordings/TestInvalidEntity/TestInvalidEntity_storage.json b/sdk/tables/aztable/recordings/TestInvalidEntity/TestInvalidEntity_storage.json new file mode 100644 index 000000000000..793e598fd897 --- /dev/null +++ b/sdk/tables/aztable/recordings/TestInvalidEntity/TestInvalidEntity_storage.json @@ -0,0 +1,125 @@ +{ + "Entries": [ + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/Tables", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "35", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:07 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "TableName": "tableName1196245666" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", + "Date": "Mon, 02 Aug 2021 18:02:05 GMT", + "Location": "https://seankaneprim.table.core.windows.net/Tables(\u0027tableName1196245666\u0027)", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b6da0-9002-0057-2dc8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": { + "odata.metadata": "https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element", + "TableName": "tableName1196245666" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/tableName1196245666", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/tableName1196245666", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "37", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "prefer": "return-no-content", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:07 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "String": "stringystring", + "Value": 10 + }, + "StatusCode": 400, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", + "Date": "Mon, 02 Aug 2021 18:02:05 GMT", + "Preference-Applied": "return-no-content", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b6db4-9002-0057-40c8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": { + "odata.error": { + "code": "PropertiesNeedValue", + "message": { + "lang": "en-US", + "value": "The values are not specified for all properties in the entity.\nRequestId:a05b6db4-9002-0057-40c8-874646000000\nTime:2021-08-02T18:02:06.4920337Z" + } + } + } + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables(\u0027tableName1196245666\u0027)", + "RequestMethod": "DELETE", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "DELETE", + ":path": "/Tables(\u0027tableName1196245666\u0027)", + ":scheme": "https", + "Accept": "application/json", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:07 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "0", + "Date": "Mon, 02 Aug 2021 18:02:05 GMT", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b6dd5-9002-0057-60c8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": null + } + ], + "Variables": {} +} \ No newline at end of file diff --git a/sdk/tables/aztable/recordings/TestListTables/TestListTables_cosmos.json b/sdk/tables/aztable/recordings/TestListTables/TestListTables_cosmos.json new file mode 100644 index 000000000000..1a11361a4db6 --- /dev/null +++ b/sdk/tables/aztable/recordings/TestListTables/TestListTables_cosmos.json @@ -0,0 +1,369 @@ +{ + "Entries": [ + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables", + "RequestMethod": "GET", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "GET", + ":path": "/Tables", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:26 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "Date": "Mon, 02 Aug 2021 18:02:25 GMT", + "Transfer-Encoding": "chunked", + "x-ms-request-id": "b8a7ccad-bbbb-4272-8b71-d3892b6e2c8b" + }, + "ResponseBody": { + "value": [], + "odata.metadata": "https://seankaneprim.table.cosmos.azure.com/$metadata#Tables" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/Tables", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "35", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:26 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "TableName": "tableName6857269490" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "Date": "Mon, 02 Aug 2021 18:02:25 GMT", + "ETag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A25.7671176Z\u0027\u0022", + "Location": "https://seankaneprim.table.cosmos.azure.com/Tables(\u0027tableName6857269490\u0027)", + "Transfer-Encoding": "chunked", + "x-ms-request-id": "723da669-2754-4da9-b717-90baedd0a7e6" + }, + "ResponseBody": { + "TableName": "tableName6857269490", + "odata.metadata": "https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/Tables", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "35", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:26 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "TableName": "tableName6857269491" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "Date": "Mon, 02 Aug 2021 18:02:26 GMT", + "ETag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A26.4805384Z\u0027\u0022", + "Location": "https://seankaneprim.table.cosmos.azure.com/Tables(\u0027tableName6857269491\u0027)", + "Transfer-Encoding": "chunked", + "x-ms-request-id": "3e4aa00d-3b46-48d1-9c1f-f3b8faa866e0" + }, + "ResponseBody": { + "TableName": "tableName6857269491", + "odata.metadata": "https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/Tables", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "35", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:27 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "TableName": "tableName6857269492" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "Date": "Mon, 02 Aug 2021 18:02:27 GMT", + "ETag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A27.2218120Z\u0027\u0022", + "Location": "https://seankaneprim.table.cosmos.azure.com/Tables(\u0027tableName6857269492\u0027)", + "Transfer-Encoding": "chunked", + "x-ms-request-id": "bb925f3c-07a1-4525-9061-4bcc16dbcb7c" + }, + "ResponseBody": { + "TableName": "tableName6857269492", + "odata.metadata": "https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/Tables", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "35", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:28 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "TableName": "tableName6857269493" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "Date": "Mon, 02 Aug 2021 18:02:28 GMT", + "ETag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A27.9632904Z\u0027\u0022", + "Location": "https://seankaneprim.table.cosmos.azure.com/Tables(\u0027tableName6857269493\u0027)", + "Transfer-Encoding": "chunked", + "x-ms-request-id": "c5952d6a-6df0-4624-a332-051f5e8c1240" + }, + "ResponseBody": { + "TableName": "tableName6857269493", + "odata.metadata": "https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/Tables", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "35", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:29 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "TableName": "tableName6857269494" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "Date": "Mon, 02 Aug 2021 18:02:28 GMT", + "ETag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A28.7885320Z\u0027\u0022", + "Location": "https://seankaneprim.table.cosmos.azure.com/Tables(\u0027tableName6857269494\u0027)", + "Transfer-Encoding": "chunked", + "x-ms-request-id": "29bf0491-ae23-4475-be78-350322e60d26" + }, + "ResponseBody": { + "TableName": "tableName6857269494", + "odata.metadata": "https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables", + "RequestMethod": "GET", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "GET", + ":path": "/Tables", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:30 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "Date": "Mon, 02 Aug 2021 18:02:29 GMT", + "Transfer-Encoding": "chunked", + "x-ms-request-id": "2191ba0f-9940-42ba-b1c3-59cbdf13cfcf" + }, + "ResponseBody": { + "value": [ + { + "TableName": "tableName6857269493" + }, + { + "TableName": "tableName6857269491" + }, + { + "TableName": "tableName6857269492" + }, + { + "TableName": "tableName6857269490" + }, + { + "TableName": "tableName6857269494" + } + ], + "odata.metadata": "https://seankaneprim.table.cosmos.azure.com/$metadata#Tables" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables(\u0027tableName6857269490\u0027)", + "RequestMethod": "DELETE", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "DELETE", + ":path": "/Tables(\u0027tableName6857269490\u0027)", + ":scheme": "https", + "Accept": "application/json", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:30 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "Date": "Mon, 02 Aug 2021 18:02:29 GMT", + "x-ms-request-id": "42f373c9-7531-4e63-9985-dcb110bff66d" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables(\u0027tableName6857269491\u0027)", + "RequestMethod": "DELETE", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "DELETE", + ":path": "/Tables(\u0027tableName6857269491\u0027)", + ":scheme": "https", + "Accept": "application/json", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:30 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "Date": "Mon, 02 Aug 2021 18:02:29 GMT", + "x-ms-request-id": "bd4e226b-fd5c-4e02-9768-3c986c5dc4f0" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables(\u0027tableName6857269492\u0027)", + "RequestMethod": "DELETE", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "DELETE", + ":path": "/Tables(\u0027tableName6857269492\u0027)", + ":scheme": "https", + "Accept": "application/json", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:30 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "Date": "Mon, 02 Aug 2021 18:02:30 GMT", + "x-ms-request-id": "d52217d5-6a02-45a3-8950-df86e2a205a8" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables(\u0027tableName6857269493\u0027)", + "RequestMethod": "DELETE", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "DELETE", + ":path": "/Tables(\u0027tableName6857269493\u0027)", + ":scheme": "https", + "Accept": "application/json", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:31 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "Date": "Mon, 02 Aug 2021 18:02:30 GMT", + "x-ms-request-id": "057c53f4-d3d4-4b85-b199-98922a5a1660" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables(\u0027tableName6857269494\u0027)", + "RequestMethod": "DELETE", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "DELETE", + ":path": "/Tables(\u0027tableName6857269494\u0027)", + ":scheme": "https", + "Accept": "application/json", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:31 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "Date": "Mon, 02 Aug 2021 18:02:30 GMT", + "x-ms-request-id": "9013141a-509c-4869-9272-48a17b1e988b" + }, + "ResponseBody": null + } + ], + "Variables": {} +} \ No newline at end of file diff --git a/sdk/tables/aztable/recordings/TestListTables/TestListTables_storage.json b/sdk/tables/aztable/recordings/TestListTables/TestListTables_storage.json new file mode 100644 index 000000000000..833e3a5b841c --- /dev/null +++ b/sdk/tables/aztable/recordings/TestListTables/TestListTables_storage.json @@ -0,0 +1,455 @@ +{ + "Entries": [ + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables", + "RequestMethod": "GET", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "GET", + ":path": "/Tables", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:23 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", + "Date": "Mon, 02 Aug 2021 18:02:22 GMT", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "Vary": "Origin", + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b80ac-9002-0057-74c8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": { + "odata.metadata": "https://seankaneprim.table.core.windows.net/$metadata#Tables", + "value": [] + } + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/Tables", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "35", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:23 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "TableName": "tableName6987239260" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", + "Date": "Mon, 02 Aug 2021 18:02:22 GMT", + "Location": "https://seankaneprim.table.core.windows.net/Tables(\u0027tableName6987239260\u0027)", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b80ec-9002-0057-2ec8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": { + "odata.metadata": "https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element", + "TableName": "tableName6987239260" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/Tables", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "35", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:23 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "TableName": "tableName6987239261" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", + "Date": "Mon, 02 Aug 2021 18:02:22 GMT", + "Location": "https://seankaneprim.table.core.windows.net/Tables(\u0027tableName6987239261\u0027)", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b812e-9002-0057-6ec8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": { + "odata.metadata": "https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element", + "TableName": "tableName6987239261" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/Tables", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "35", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:24 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "TableName": "tableName6987239262" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", + "Date": "Mon, 02 Aug 2021 18:02:22 GMT", + "Location": "https://seankaneprim.table.core.windows.net/Tables(\u0027tableName6987239262\u0027)", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b8160-9002-0057-1dc8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": { + "odata.metadata": "https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element", + "TableName": "tableName6987239262" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/Tables", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "35", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:24 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "TableName": "tableName6987239263" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", + "Date": "Mon, 02 Aug 2021 18:02:22 GMT", + "Location": "https://seankaneprim.table.core.windows.net/Tables(\u0027tableName6987239263\u0027)", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b81a5-9002-0057-5dc8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": { + "odata.metadata": "https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element", + "TableName": "tableName6987239263" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/Tables", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "35", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:24 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "TableName": "tableName6987239264" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", + "Date": "Mon, 02 Aug 2021 18:02:23 GMT", + "Location": "https://seankaneprim.table.core.windows.net/Tables(\u0027tableName6987239264\u0027)", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b81f6-9002-0057-27c8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": { + "odata.metadata": "https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element", + "TableName": "tableName6987239264" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables", + "RequestMethod": "GET", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "GET", + ":path": "/Tables", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:24 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", + "Date": "Mon, 02 Aug 2021 18:02:23 GMT", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "Vary": "Origin", + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b826c-9002-0057-13c8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": { + "odata.metadata": "https://seankaneprim.table.core.windows.net/$metadata#Tables", + "value": [ + { + "TableName": "tableName6987239260" + }, + { + "TableName": "tableName6987239261" + }, + { + "TableName": "tableName6987239262" + }, + { + "TableName": "tableName6987239263" + }, + { + "TableName": "tableName6987239264" + } + ] + } + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables(\u0027tableName6987239260\u0027)", + "RequestMethod": "DELETE", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "DELETE", + ":path": "/Tables(\u0027tableName6987239260\u0027)", + ":scheme": "https", + "Accept": "application/json", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:25 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "0", + "Date": "Mon, 02 Aug 2021 18:02:23 GMT", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b82aa-9002-0057-4bc8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables(\u0027tableName6987239261\u0027)", + "RequestMethod": "DELETE", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "DELETE", + ":path": "/Tables(\u0027tableName6987239261\u0027)", + ":scheme": "https", + "Accept": "application/json", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:25 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "0", + "Date": "Mon, 02 Aug 2021 18:02:23 GMT", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b82cb-9002-0057-6cc8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables(\u0027tableName6987239262\u0027)", + "RequestMethod": "DELETE", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "DELETE", + ":path": "/Tables(\u0027tableName6987239262\u0027)", + ":scheme": "https", + "Accept": "application/json", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:25 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "0", + "Date": "Mon, 02 Aug 2021 18:02:24 GMT", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b8319-9002-0057-32c8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables(\u0027tableName6987239263\u0027)", + "RequestMethod": "DELETE", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "DELETE", + ":path": "/Tables(\u0027tableName6987239263\u0027)", + ":scheme": "https", + "Accept": "application/json", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:25 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "0", + "Date": "Mon, 02 Aug 2021 18:02:24 GMT", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b836d-9002-0057-7fc8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables(\u0027tableName6987239264\u0027)", + "RequestMethod": "DELETE", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "DELETE", + ":path": "/Tables(\u0027tableName6987239264\u0027)", + ":scheme": "https", + "Accept": "application/json", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:25 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "0", + "Date": "Mon, 02 Aug 2021 18:02:24 GMT", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b838b-9002-0057-1bc8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": null + } + ], + "Variables": {} +} \ No newline at end of file diff --git a/sdk/tables/aztable/recordings/TestMergeEntity/TestMergeEntity_cosmos.json b/sdk/tables/aztable/recordings/TestMergeEntity/TestMergeEntity_cosmos.json new file mode 100644 index 000000000000..013b94f70928 --- /dev/null +++ b/sdk/tables/aztable/recordings/TestMergeEntity/TestMergeEntity_cosmos.json @@ -0,0 +1,213 @@ +{ + "Entries": [ + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/Tables", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "35", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:56 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "TableName": "tableName1856152197" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "Date": "Mon, 02 Aug 2021 18:01:56 GMT", + "ETag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A56.2060808Z\u0027\u0022", + "Location": "https://seankaneprim.table.cosmos.azure.com/Tables(\u0027tableName1856152197\u0027)", + "Transfer-Encoding": "chunked", + "x-ms-request-id": "946f7f2e-5215-4c5d-89de-a2789163a1fb" + }, + "ResponseBody": { + "TableName": "tableName1856152197", + "odata.metadata": "https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/tableName1856152197", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/tableName1856152197", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "125", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "prefer": "return-no-content", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:57 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "Bool": true, + "Integer": 1, + "PartitionKey": "partition", + "RowKey": "1", + "String": "some string 1", + "Timestamp": "0001-01-01T00:00:00Z" + }, + "StatusCode": 204, + "ResponseHeaders": { + "Date": "Mon, 02 Aug 2021 18:01:56 GMT", + "ETag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A56.8062472Z\u0027\u0022", + "Location": "https://seankaneprim.table.cosmos.azure.com/tableName1856152197(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", + "Preference-Applied": "return-no-content", + "x-ms-request-id": "3a247460-4436-4ee0-b000-ba35e8e2b77b" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/tableName1856152197(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", + "RequestMethod": "GET", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "GET", + ":path": "/tableName1856152197(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:57 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "Date": "Mon, 02 Aug 2021 18:01:56 GMT", + "ETag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A56.8062472Z\u0027\u0022", + "Transfer-Encoding": "chunked", + "x-ms-request-id": "318ab877-7704-4c9e-aa5a-fe2a4fe44e87" + }, + "ResponseBody": { + "odata.metadata": "https://seankaneprim.table.cosmos.azure.com/tableName1856152197/$metadata#tableName1856152197/@Element", + "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A56.8062472Z\u0027\u0022", + "Bool": true, + "Integer": 1, + "PartitionKey": "partition", + "RowKey": "1", + "String": "some string 1", + "Timestamp": "2021-08-02T18:01:56.8062472Z" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/tableName1856152197(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/tableName1856152197(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", + ":scheme": "https", + "Accept": "application/json", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "147", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "If-Match": "*", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-http-method": "MERGE", + "x-ms-date": "Mon, 02 Aug 2021 18:01:57 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "Bool": true, + "Integer": 1, + "MergeProperty": "foo", + "PartitionKey": "partition", + "RowKey": "1", + "String": "some string 1", + "Timestamp": "0001-01-01T00:00:00Z" + }, + "StatusCode": 204, + "ResponseHeaders": { + "Date": "Mon, 02 Aug 2021 18:01:56 GMT", + "ETag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A57.0623496Z\u0027\u0022", + "x-ms-request-id": "4904d9ab-efe3-4eac-bbfc-6c9dc2718e11" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/tableName1856152197()?%24filter=RowKey\u002Beq\u002B%271%27", + "RequestMethod": "GET", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "GET", + ":path": "/tableName1856152197()?%24filter=RowKey\u002Beq\u002B%271%27", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:57 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "Date": "Mon, 02 Aug 2021 18:01:56 GMT", + "Transfer-Encoding": "chunked", + "x-ms-request-id": "8a0be61d-e8a0-4976-b86c-de540766c7ba" + }, + "ResponseBody": { + "value": [ + { + "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A57.0623496Z\u0027\u0022", + "Bool": true, + "Integer": 1, + "PartitionKey": "partition", + "RowKey": "1", + "String": "some string 1", + "MergeProperty": "foo", + "Timestamp": "2021-08-02T18:01:57.0623496Z" + } + ], + "odata.metadata": "https://seankaneprim.table.cosmos.azure.com/$metadata#tableName1856152197" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables(\u0027tableName1856152197\u0027)", + "RequestMethod": "DELETE", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "DELETE", + ":path": "/Tables(\u0027tableName1856152197\u0027)", + ":scheme": "https", + "Accept": "application/json", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:57 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "Date": "Mon, 02 Aug 2021 18:01:57 GMT", + "x-ms-request-id": "9f0c5e31-feaf-482d-88e9-b02d296a8c6f" + }, + "ResponseBody": null + } + ], + "Variables": {} +} \ No newline at end of file diff --git a/sdk/tables/aztable/recordings/TestMergeEntity/TestMergeEntity_storage.json b/sdk/tables/aztable/recordings/TestMergeEntity/TestMergeEntity_storage.json new file mode 100644 index 000000000000..7cce51c0f7a8 --- /dev/null +++ b/sdk/tables/aztable/recordings/TestMergeEntity/TestMergeEntity_storage.json @@ -0,0 +1,259 @@ +{ + "Entries": [ + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/Tables", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "35", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:55 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "TableName": "tableName1539808374" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", + "Date": "Mon, 02 Aug 2021 18:01:54 GMT", + "Location": "https://seankaneprim.table.core.windows.net/Tables(\u0027tableName1539808374\u0027)", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b60f4-9002-0057-3ac8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": { + "odata.metadata": "https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element", + "TableName": "tableName1539808374" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/tableName1539808374", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/tableName1539808374", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "125", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "prefer": "return-no-content", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:55 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "Bool": true, + "Integer": 1, + "PartitionKey": "partition", + "RowKey": "1", + "String": "some string 1", + "Timestamp": "0001-01-01T00:00:00Z" + }, + "StatusCode": 204, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "0", + "DataServiceId": "https://seankaneprim.table.core.windows.net/tableName1539808374(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", + "Date": "Mon, 02 Aug 2021 18:01:54 GMT", + "ETag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A55.3111703Z\u0027\u0022", + "Location": "https://seankaneprim.table.core.windows.net/tableName1539808374(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", + "Preference-Applied": "return-no-content", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b6144-9002-0057-06c8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/tableName1539808374(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", + "RequestMethod": "GET", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "GET", + ":path": "/tableName1539808374(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:56 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", + "Date": "Mon, 02 Aug 2021 18:01:54 GMT", + "ETag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A55.3111703Z\u0027\u0022", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "Vary": "Origin", + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b6179-9002-0057-3ac8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": { + "odata.metadata": "https://seankaneprim.table.core.windows.net/$metadata#tableName1539808374/@Element", + "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A55.3111703Z\u0027\u0022", + "PartitionKey": "partition", + "RowKey": "1", + "Timestamp": "2021-08-02T18:01:55.3111703Z", + "Bool": true, + "Integer": 1, + "String": "some string 1" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/tableName1539808374(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", + "RequestMethod": "PATCH", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "PATCH", + ":path": "/tableName1539808374(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", + ":scheme": "https", + "Accept": "application/json", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "147", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "If-Match": "*", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:56 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "Bool": true, + "Integer": 1, + "MergeProperty": "foo", + "PartitionKey": "partition", + "RowKey": "1", + "String": "some string 1", + "Timestamp": "0001-01-01T00:00:00Z" + }, + "StatusCode": 204, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "0", + "Date": "Mon, 02 Aug 2021 18:01:54 GMT", + "ETag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A55.5861844Z\u0027\u0022", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b61ac-9002-0057-6dc8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/tableName1539808374()?%24filter=RowKey\u002Beq\u002B%271%27", + "RequestMethod": "GET", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "GET", + ":path": "/tableName1539808374()?%24filter=RowKey\u002Beq\u002B%271%27", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:56 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", + "Date": "Mon, 02 Aug 2021 18:01:54 GMT", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "Vary": "Origin", + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b61da-9002-0057-19c8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": { + "odata.metadata": "https://seankaneprim.table.core.windows.net/$metadata#tableName1539808374", + "value": [ + { + "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A55.5861844Z\u0027\u0022", + "PartitionKey": "partition", + "RowKey": "1", + "Timestamp": "2021-08-02T18:01:55.5861844Z", + "Bool": true, + "Integer": 1, + "MergeProperty": "foo", + "String": "some string 1" + } + ] + } + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables(\u0027tableName1539808374\u0027)", + "RequestMethod": "DELETE", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "DELETE", + ":path": "/Tables(\u0027tableName1539808374\u0027)", + ":scheme": "https", + "Accept": "application/json", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:56 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "0", + "Date": "Mon, 02 Aug 2021 18:01:55 GMT", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b621b-9002-0057-56c8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": null + } + ], + "Variables": {} +} \ No newline at end of file diff --git a/sdk/tables/aztable/recordings/TestQueryComplexEntity/TestQueryComplexEntity_cosmos.json b/sdk/tables/aztable/recordings/TestQueryComplexEntity/TestQueryComplexEntity_cosmos.json new file mode 100644 index 000000000000..fb9854048349 --- /dev/null +++ b/sdk/tables/aztable/recordings/TestQueryComplexEntity/TestQueryComplexEntity_cosmos.json @@ -0,0 +1,341 @@ +{ + "Entries": [ + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/Tables", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "34", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:05 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "TableName": "tableName904913677" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "Date": "Mon, 02 Aug 2021 18:02:04 GMT", + "ETag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A04.6192648Z\u0027\u0022", + "Location": "https://seankaneprim.table.cosmos.azure.com/Tables(\u0027tableName904913677\u0027)", + "Transfer-Encoding": "chunked", + "x-ms-request-id": "a76e238c-fc5a-44be-bd6f-cd89cbfb46dc" + }, + "ResponseBody": { + "TableName": "tableName904913677", + "odata.metadata": "https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/tableName904913677", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/tableName904913677", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "194", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "prefer": "return-no-content", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:05 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "Bool": true, + "Byte": "c29tZWJ5dGVz", + "DateTime": "2021-07-13T00:00:00Z", + "Float": 3.14159, + "Integer": 1, + "PartitionKey": "partition", + "RowKey": "1", + "String": "someString", + "Timestamp": "0001-01-01T00:00:00Z" + }, + "StatusCode": 204, + "ResponseHeaders": { + "Date": "Mon, 02 Aug 2021 18:02:04 GMT", + "ETag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A05.2071432Z\u0027\u0022", + "Location": "https://seankaneprim.table.cosmos.azure.com/tableName904913677(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", + "Preference-Applied": "return-no-content", + "x-ms-request-id": "6dfe03c8-806e-40ad-9f8a-34d66b99a13a" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/tableName904913677", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/tableName904913677", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "194", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "prefer": "return-no-content", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:05 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "Bool": true, + "Byte": "c29tZWJ5dGVz", + "DateTime": "2021-07-13T00:00:00Z", + "Float": 3.14159, + "Integer": 2, + "PartitionKey": "partition", + "RowKey": "2", + "String": "someString", + "Timestamp": "0001-01-01T00:00:00Z" + }, + "StatusCode": 204, + "ResponseHeaders": { + "Date": "Mon, 02 Aug 2021 18:02:05 GMT", + "ETag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A05.3329928Z\u0027\u0022", + "Location": "https://seankaneprim.table.cosmos.azure.com/tableName904913677(PartitionKey=\u0027partition\u0027,RowKey=\u00272\u0027)", + "Preference-Applied": "return-no-content", + "x-ms-request-id": "6b204c88-48e6-469f-a897-f122a6f629ae" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/tableName904913677", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/tableName904913677", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "194", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "prefer": "return-no-content", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:06 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "Bool": true, + "Byte": "c29tZWJ5dGVz", + "DateTime": "2021-07-13T00:00:00Z", + "Float": 3.14159, + "Integer": 3, + "PartitionKey": "partition", + "RowKey": "3", + "String": "someString", + "Timestamp": "0001-01-01T00:00:00Z" + }, + "StatusCode": 204, + "ResponseHeaders": { + "Date": "Mon, 02 Aug 2021 18:02:05 GMT", + "ETag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A05.4596616Z\u0027\u0022", + "Location": "https://seankaneprim.table.cosmos.azure.com/tableName904913677(PartitionKey=\u0027partition\u0027,RowKey=\u00273\u0027)", + "Preference-Applied": "return-no-content", + "x-ms-request-id": "ab78fe5a-5a74-4b13-9ee0-65f9196f4d40" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/tableName904913677", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/tableName904913677", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "194", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "prefer": "return-no-content", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:06 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "Bool": true, + "Byte": "c29tZWJ5dGVz", + "DateTime": "2021-07-13T00:00:00Z", + "Float": 3.14159, + "Integer": 4, + "PartitionKey": "partition", + "RowKey": "4", + "String": "someString", + "Timestamp": "0001-01-01T00:00:00Z" + }, + "StatusCode": 204, + "ResponseHeaders": { + "Date": "Mon, 02 Aug 2021 18:02:05 GMT", + "ETag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A05.5877640Z\u0027\u0022", + "Location": "https://seankaneprim.table.cosmos.azure.com/tableName904913677(PartitionKey=\u0027partition\u0027,RowKey=\u00274\u0027)", + "Preference-Applied": "return-no-content", + "x-ms-request-id": "e9002f26-312a-47e7-abe7-b4d88b5280d3" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/tableName904913677", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/tableName904913677", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "194", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "prefer": "return-no-content", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:06 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "Bool": true, + "Byte": "c29tZWJ5dGVz", + "DateTime": "2021-07-13T00:00:00Z", + "Float": 3.14159, + "Integer": 5, + "PartitionKey": "partition", + "RowKey": "5", + "String": "someString", + "Timestamp": "0001-01-01T00:00:00Z" + }, + "StatusCode": 204, + "ResponseHeaders": { + "Date": "Mon, 02 Aug 2021 18:02:05 GMT", + "ETag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A05.7221128Z\u0027\u0022", + "Location": "https://seankaneprim.table.cosmos.azure.com/tableName904913677(PartitionKey=\u0027partition\u0027,RowKey=\u00275\u0027)", + "Preference-Applied": "return-no-content", + "x-ms-request-id": "eaeb382b-182f-4368-9cd9-0ba3df08dc4e" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/tableName904913677()?%24filter=RowKey\u002Blt\u002B%275%27", + "RequestMethod": "GET", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "GET", + ":path": "/tableName904913677()?%24filter=RowKey\u002Blt\u002B%275%27", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:06 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "Date": "Mon, 02 Aug 2021 18:02:05 GMT", + "Transfer-Encoding": "chunked", + "x-ms-request-id": "d430cc2c-147a-4f45-bfeb-696c937127d9" + }, + "ResponseBody": { + "value": [ + { + "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A05.2071432Z\u0027\u0022", + "Bool": true, + "Byte": "c29tZWJ5dGVz", + "DateTime": "2021-07-13T00:00:00Z", + "Float": 3.14159, + "Integer": 1, + "PartitionKey": "partition", + "RowKey": "1", + "String": "someString", + "Timestamp": "2021-08-02T18:02:05.2071432Z" + }, + { + "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A05.3329928Z\u0027\u0022", + "Bool": true, + "Byte": "c29tZWJ5dGVz", + "DateTime": "2021-07-13T00:00:00Z", + "Float": 3.14159, + "Integer": 2, + "PartitionKey": "partition", + "RowKey": "2", + "String": "someString", + "Timestamp": "2021-08-02T18:02:05.3329928Z" + }, + { + "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A05.4596616Z\u0027\u0022", + "Bool": true, + "Byte": "c29tZWJ5dGVz", + "DateTime": "2021-07-13T00:00:00Z", + "Float": 3.14159, + "Integer": 3, + "PartitionKey": "partition", + "RowKey": "3", + "String": "someString", + "Timestamp": "2021-08-02T18:02:05.4596616Z" + }, + { + "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A05.5877640Z\u0027\u0022", + "Bool": true, + "Byte": "c29tZWJ5dGVz", + "DateTime": "2021-07-13T00:00:00Z", + "Float": 3.14159, + "Integer": 4, + "PartitionKey": "partition", + "RowKey": "4", + "String": "someString", + "Timestamp": "2021-08-02T18:02:05.5877640Z" + } + ], + "odata.metadata": "https://seankaneprim.table.cosmos.azure.com/$metadata#tableName904913677" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables(\u0027tableName904913677\u0027)", + "RequestMethod": "DELETE", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "DELETE", + ":path": "/Tables(\u0027tableName904913677\u0027)", + ":scheme": "https", + "Accept": "application/json", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:06 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "Date": "Mon, 02 Aug 2021 18:02:05 GMT", + "x-ms-request-id": "7783fb11-ecf6-41b7-96f9-76895753afcb" + }, + "ResponseBody": null + } + ], + "Variables": {} +} \ No newline at end of file diff --git a/sdk/tables/aztable/recordings/TestQueryComplexEntity/TestQueryComplexEntity_storage.json b/sdk/tables/aztable/recordings/TestQueryComplexEntity/TestQueryComplexEntity_storage.json new file mode 100644 index 000000000000..1979d8d1bcef --- /dev/null +++ b/sdk/tables/aztable/recordings/TestQueryComplexEntity/TestQueryComplexEntity_storage.json @@ -0,0 +1,408 @@ +{ + "Entries": [ + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/Tables", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "34", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:03 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "TableName": "tableName160818926" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", + "Date": "Mon, 02 Aug 2021 18:02:02 GMT", + "Location": "https://seankaneprim.table.core.windows.net/Tables(\u0027tableName160818926\u0027)", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b6ad2-9002-0057-1ac8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": { + "odata.metadata": "https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element", + "TableName": "tableName160818926" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/tableName160818926", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/tableName160818926", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "194", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "prefer": "return-no-content", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:04 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "Bool": true, + "Byte": "c29tZWJ5dGVz", + "DateTime": "2021-07-13T00:00:00Z", + "Float": 3.14159, + "Integer": 1, + "PartitionKey": "partition", + "RowKey": "1", + "String": "someString", + "Timestamp": "0001-01-01T00:00:00Z" + }, + "StatusCode": 204, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "0", + "DataServiceId": "https://seankaneprim.table.core.windows.net/tableName160818926(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", + "Date": "Mon, 02 Aug 2021 18:02:02 GMT", + "ETag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A03.4589Z\u0027\u0022", + "Location": "https://seankaneprim.table.core.windows.net/tableName160818926(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", + "Preference-Applied": "return-no-content", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b6af4-9002-0057-38c8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/tableName160818926", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/tableName160818926", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "194", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "prefer": "return-no-content", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:04 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "Bool": true, + "Byte": "c29tZWJ5dGVz", + "DateTime": "2021-07-13T00:00:00Z", + "Float": 3.14159, + "Integer": 2, + "PartitionKey": "partition", + "RowKey": "2", + "String": "someString", + "Timestamp": "0001-01-01T00:00:00Z" + }, + "StatusCode": 204, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "0", + "DataServiceId": "https://seankaneprim.table.core.windows.net/tableName160818926(PartitionKey=\u0027partition\u0027,RowKey=\u00272\u0027)", + "Date": "Mon, 02 Aug 2021 18:02:02 GMT", + "ETag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A03.5829882Z\u0027\u0022", + "Location": "https://seankaneprim.table.core.windows.net/tableName160818926(PartitionKey=\u0027partition\u0027,RowKey=\u00272\u0027)", + "Preference-Applied": "return-no-content", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b6b14-9002-0057-55c8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/tableName160818926", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/tableName160818926", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "194", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "prefer": "return-no-content", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:04 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "Bool": true, + "Byte": "c29tZWJ5dGVz", + "DateTime": "2021-07-13T00:00:00Z", + "Float": 3.14159, + "Integer": 3, + "PartitionKey": "partition", + "RowKey": "3", + "String": "someString", + "Timestamp": "0001-01-01T00:00:00Z" + }, + "StatusCode": 204, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "0", + "DataServiceId": "https://seankaneprim.table.core.windows.net/tableName160818926(PartitionKey=\u0027partition\u0027,RowKey=\u00273\u0027)", + "Date": "Mon, 02 Aug 2021 18:02:02 GMT", + "ETag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A03.7060745Z\u0027\u0022", + "Location": "https://seankaneprim.table.core.windows.net/tableName160818926(PartitionKey=\u0027partition\u0027,RowKey=\u00273\u0027)", + "Preference-Applied": "return-no-content", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b6b3f-9002-0057-7dc8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/tableName160818926", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/tableName160818926", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "194", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "prefer": "return-no-content", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:04 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "Bool": true, + "Byte": "c29tZWJ5dGVz", + "DateTime": "2021-07-13T00:00:00Z", + "Float": 3.14159, + "Integer": 4, + "PartitionKey": "partition", + "RowKey": "4", + "String": "someString", + "Timestamp": "0001-01-01T00:00:00Z" + }, + "StatusCode": 204, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "0", + "DataServiceId": "https://seankaneprim.table.core.windows.net/tableName160818926(PartitionKey=\u0027partition\u0027,RowKey=\u00274\u0027)", + "Date": "Mon, 02 Aug 2021 18:02:03 GMT", + "ETag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A03.8301613Z\u0027\u0022", + "Location": "https://seankaneprim.table.core.windows.net/tableName160818926(PartitionKey=\u0027partition\u0027,RowKey=\u00274\u0027)", + "Preference-Applied": "return-no-content", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b6b59-9002-0057-15c8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/tableName160818926", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/tableName160818926", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "194", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "prefer": "return-no-content", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:04 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "Bool": true, + "Byte": "c29tZWJ5dGVz", + "DateTime": "2021-07-13T00:00:00Z", + "Float": 3.14159, + "Integer": 5, + "PartitionKey": "partition", + "RowKey": "5", + "String": "someString", + "Timestamp": "0001-01-01T00:00:00Z" + }, + "StatusCode": 204, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "0", + "DataServiceId": "https://seankaneprim.table.core.windows.net/tableName160818926(PartitionKey=\u0027partition\u0027,RowKey=\u00275\u0027)", + "Date": "Mon, 02 Aug 2021 18:02:03 GMT", + "ETag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A03.9562509Z\u0027\u0022", + "Location": "https://seankaneprim.table.core.windows.net/tableName160818926(PartitionKey=\u0027partition\u0027,RowKey=\u00275\u0027)", + "Preference-Applied": "return-no-content", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b6b6d-9002-0057-29c8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/tableName160818926()?%24filter=RowKey\u002Blt\u002B%275%27", + "RequestMethod": "GET", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "GET", + ":path": "/tableName160818926()?%24filter=RowKey\u002Blt\u002B%275%27", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:04 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", + "Date": "Mon, 02 Aug 2021 18:02:03 GMT", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "Vary": "Origin", + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b6b92-9002-0057-4bc8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": { + "odata.metadata": "https://seankaneprim.table.core.windows.net/$metadata#tableName160818926", + "value": [ + { + "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A03.4589Z\u0027\u0022", + "PartitionKey": "partition", + "RowKey": "1", + "Timestamp": "2021-08-02T18:02:03.4589Z", + "Bool": true, + "Byte": "c29tZWJ5dGVz", + "DateTime": "2021-07-13T00:00:00Z", + "Float": 3.14159, + "Integer": 1, + "String": "someString" + }, + { + "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A03.5829882Z\u0027\u0022", + "PartitionKey": "partition", + "RowKey": "2", + "Timestamp": "2021-08-02T18:02:03.5829882Z", + "Bool": true, + "Byte": "c29tZWJ5dGVz", + "DateTime": "2021-07-13T00:00:00Z", + "Float": 3.14159, + "Integer": 2, + "String": "someString" + }, + { + "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A03.7060745Z\u0027\u0022", + "PartitionKey": "partition", + "RowKey": "3", + "Timestamp": "2021-08-02T18:02:03.7060745Z", + "Bool": true, + "Byte": "c29tZWJ5dGVz", + "DateTime": "2021-07-13T00:00:00Z", + "Float": 3.14159, + "Integer": 3, + "String": "someString" + }, + { + "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A03.8301613Z\u0027\u0022", + "PartitionKey": "partition", + "RowKey": "4", + "Timestamp": "2021-08-02T18:02:03.8301613Z", + "Bool": true, + "Byte": "c29tZWJ5dGVz", + "DateTime": "2021-07-13T00:00:00Z", + "Float": 3.14159, + "Integer": 4, + "String": "someString" + } + ] + } + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables(\u0027tableName160818926\u0027)", + "RequestMethod": "DELETE", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "DELETE", + ":path": "/Tables(\u0027tableName160818926\u0027)", + ":scheme": "https", + "Accept": "application/json", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:04 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "0", + "Date": "Mon, 02 Aug 2021 18:02:03 GMT", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b6bb9-9002-0057-72c8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": null + } + ], + "Variables": {} +} \ No newline at end of file diff --git a/sdk/tables/aztable/recordings/TestQuerySimpleEntity/TestQuerySimpleEntity_cosmos.json b/sdk/tables/aztable/recordings/TestQuerySimpleEntity/TestQuerySimpleEntity_cosmos.json new file mode 100644 index 000000000000..1b1e2b28e5e1 --- /dev/null +++ b/sdk/tables/aztable/recordings/TestQuerySimpleEntity/TestQuerySimpleEntity_cosmos.json @@ -0,0 +1,314 @@ +{ + "Entries": [ + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/Tables", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "34", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:01 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "TableName": "tableName978986389" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "Date": "Mon, 02 Aug 2021 18:02:01 GMT", + "ETag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A01.5497224Z\u0027\u0022", + "Location": "https://seankaneprim.table.cosmos.azure.com/Tables(\u0027tableName978986389\u0027)", + "Transfer-Encoding": "chunked", + "x-ms-request-id": "e9291aba-7233-4c68-a8e2-ebdcaac6b3d7" + }, + "ResponseBody": { + "TableName": "tableName978986389", + "odata.metadata": "https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/tableName978986389", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/tableName978986389", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "125", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "prefer": "return-no-content", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:02 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "Bool": true, + "Integer": 1, + "PartitionKey": "partition", + "RowKey": "1", + "String": "some string 1", + "Timestamp": "0001-01-01T00:00:00Z" + }, + "StatusCode": 204, + "ResponseHeaders": { + "Date": "Mon, 02 Aug 2021 18:02:01 GMT", + "ETag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A02.1867528Z\u0027\u0022", + "Location": "https://seankaneprim.table.cosmos.azure.com/tableName978986389(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", + "Preference-Applied": "return-no-content", + "x-ms-request-id": "2c98279e-9097-4312-a7bd-fe4782695dfe" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/tableName978986389", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/tableName978986389", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "125", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "prefer": "return-no-content", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:02 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "Bool": true, + "Integer": 2, + "PartitionKey": "partition", + "RowKey": "2", + "String": "some string 2", + "Timestamp": "0001-01-01T00:00:00Z" + }, + "StatusCode": 204, + "ResponseHeaders": { + "Date": "Mon, 02 Aug 2021 18:02:02 GMT", + "ETag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A02.3116808Z\u0027\u0022", + "Location": "https://seankaneprim.table.cosmos.azure.com/tableName978986389(PartitionKey=\u0027partition\u0027,RowKey=\u00272\u0027)", + "Preference-Applied": "return-no-content", + "x-ms-request-id": "e1b9e14f-b4f8-4e83-bb8e-d3fb5c79d306" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/tableName978986389", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/tableName978986389", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "125", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "prefer": "return-no-content", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:03 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "Bool": true, + "Integer": 3, + "PartitionKey": "partition", + "RowKey": "3", + "String": "some string 3", + "Timestamp": "0001-01-01T00:00:00Z" + }, + "StatusCode": 204, + "ResponseHeaders": { + "Date": "Mon, 02 Aug 2021 18:02:02 GMT", + "ETag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A02.4440840Z\u0027\u0022", + "Location": "https://seankaneprim.table.cosmos.azure.com/tableName978986389(PartitionKey=\u0027partition\u0027,RowKey=\u00273\u0027)", + "Preference-Applied": "return-no-content", + "x-ms-request-id": "83965c23-e9e3-464d-9cdd-ae04d2464dbb" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/tableName978986389", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/tableName978986389", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "125", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "prefer": "return-no-content", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:03 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "Bool": true, + "Integer": 4, + "PartitionKey": "partition", + "RowKey": "4", + "String": "some string 4", + "Timestamp": "0001-01-01T00:00:00Z" + }, + "StatusCode": 204, + "ResponseHeaders": { + "Date": "Mon, 02 Aug 2021 18:02:02 GMT", + "ETag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A02.5690120Z\u0027\u0022", + "Location": "https://seankaneprim.table.cosmos.azure.com/tableName978986389(PartitionKey=\u0027partition\u0027,RowKey=\u00274\u0027)", + "Preference-Applied": "return-no-content", + "x-ms-request-id": "3343dbb9-e680-4fb6-aa69-b023a918ac87" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/tableName978986389", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/tableName978986389", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "125", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "prefer": "return-no-content", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:03 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "Bool": true, + "Integer": 5, + "PartitionKey": "partition", + "RowKey": "5", + "String": "some string 5", + "Timestamp": "0001-01-01T00:00:00Z" + }, + "StatusCode": 204, + "ResponseHeaders": { + "Date": "Mon, 02 Aug 2021 18:02:02 GMT", + "ETag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A02.6977288Z\u0027\u0022", + "Location": "https://seankaneprim.table.cosmos.azure.com/tableName978986389(PartitionKey=\u0027partition\u0027,RowKey=\u00275\u0027)", + "Preference-Applied": "return-no-content", + "x-ms-request-id": "fc29c204-724e-44d5-a7ec-1e6ebfeb60cc" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/tableName978986389()?%24filter=RowKey\u002Blt\u002B%275%27", + "RequestMethod": "GET", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "GET", + ":path": "/tableName978986389()?%24filter=RowKey\u002Blt\u002B%275%27", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:03 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "Date": "Mon, 02 Aug 2021 18:02:02 GMT", + "Transfer-Encoding": "chunked", + "x-ms-request-id": "17b4e9ec-ea75-4962-b6bf-6346b715458a" + }, + "ResponseBody": { + "value": [ + { + "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A02.1867528Z\u0027\u0022", + "Bool": true, + "Integer": 1, + "PartitionKey": "partition", + "RowKey": "1", + "String": "some string 1", + "Timestamp": "2021-08-02T18:02:02.1867528Z" + }, + { + "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A02.3116808Z\u0027\u0022", + "Bool": true, + "Integer": 2, + "PartitionKey": "partition", + "RowKey": "2", + "String": "some string 2", + "Timestamp": "2021-08-02T18:02:02.3116808Z" + }, + { + "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A02.4440840Z\u0027\u0022", + "Bool": true, + "Integer": 3, + "PartitionKey": "partition", + "RowKey": "3", + "String": "some string 3", + "Timestamp": "2021-08-02T18:02:02.4440840Z" + }, + { + "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A02.5690120Z\u0027\u0022", + "Bool": true, + "Integer": 4, + "PartitionKey": "partition", + "RowKey": "4", + "String": "some string 4", + "Timestamp": "2021-08-02T18:02:02.5690120Z" + } + ], + "odata.metadata": "https://seankaneprim.table.cosmos.azure.com/$metadata#tableName978986389" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables(\u0027tableName978986389\u0027)", + "RequestMethod": "DELETE", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "DELETE", + ":path": "/Tables(\u0027tableName978986389\u0027)", + ":scheme": "https", + "Accept": "application/json", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:03 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "Date": "Mon, 02 Aug 2021 18:02:02 GMT", + "x-ms-request-id": "321043e2-6362-406a-bd06-86943ba97a42" + }, + "ResponseBody": null + } + ], + "Variables": {} +} \ No newline at end of file diff --git a/sdk/tables/aztable/recordings/TestQuerySimpleEntity/TestQuerySimpleEntity_storage.json b/sdk/tables/aztable/recordings/TestQuerySimpleEntity/TestQuerySimpleEntity_storage.json new file mode 100644 index 000000000000..20353dcdc395 --- /dev/null +++ b/sdk/tables/aztable/recordings/TestQuerySimpleEntity/TestQuerySimpleEntity_storage.json @@ -0,0 +1,381 @@ +{ + "Entries": [ + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/Tables", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "34", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:00 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "TableName": "tableName246899398" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", + "Date": "Mon, 02 Aug 2021 18:01:59 GMT", + "Location": "https://seankaneprim.table.core.windows.net/Tables(\u0027tableName246899398\u0027)", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b6717-9002-0057-18c8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": { + "odata.metadata": "https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element", + "TableName": "tableName246899398" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/tableName246899398", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/tableName246899398", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "125", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "prefer": "return-no-content", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:01 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "Bool": true, + "Integer": 1, + "PartitionKey": "partition", + "RowKey": "1", + "String": "some string 1", + "Timestamp": "0001-01-01T00:00:00Z" + }, + "StatusCode": 204, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "0", + "DataServiceId": "https://seankaneprim.table.core.windows.net/tableName246899398(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", + "Date": "Mon, 02 Aug 2021 18:01:59 GMT", + "ETag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A00.378734Z\u0027\u0022", + "Location": "https://seankaneprim.table.core.windows.net/tableName246899398(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", + "Preference-Applied": "return-no-content", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b674b-9002-0057-48c8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/tableName246899398", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/tableName246899398", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "125", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "prefer": "return-no-content", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:01 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "Bool": true, + "Integer": 2, + "PartitionKey": "partition", + "RowKey": "2", + "String": "some string 2", + "Timestamp": "0001-01-01T00:00:00Z" + }, + "StatusCode": 204, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "0", + "DataServiceId": "https://seankaneprim.table.core.windows.net/tableName246899398(PartitionKey=\u0027partition\u0027,RowKey=\u00272\u0027)", + "Date": "Mon, 02 Aug 2021 18:01:59 GMT", + "ETag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A00.5048231Z\u0027\u0022", + "Location": "https://seankaneprim.table.core.windows.net/tableName246899398(PartitionKey=\u0027partition\u0027,RowKey=\u00272\u0027)", + "Preference-Applied": "return-no-content", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b6773-9002-0057-6dc8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/tableName246899398", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/tableName246899398", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "125", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "prefer": "return-no-content", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:01 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "Bool": true, + "Integer": 3, + "PartitionKey": "partition", + "RowKey": "3", + "String": "some string 3", + "Timestamp": "0001-01-01T00:00:00Z" + }, + "StatusCode": 204, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "0", + "DataServiceId": "https://seankaneprim.table.core.windows.net/tableName246899398(PartitionKey=\u0027partition\u0027,RowKey=\u00273\u0027)", + "Date": "Mon, 02 Aug 2021 18:01:59 GMT", + "ETag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A00.6309113Z\u0027\u0022", + "Location": "https://seankaneprim.table.core.windows.net/tableName246899398(PartitionKey=\u0027partition\u0027,RowKey=\u00273\u0027)", + "Preference-Applied": "return-no-content", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b67a6-9002-0057-1cc8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/tableName246899398", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/tableName246899398", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "125", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "prefer": "return-no-content", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:01 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "Bool": true, + "Integer": 4, + "PartitionKey": "partition", + "RowKey": "4", + "String": "some string 4", + "Timestamp": "0001-01-01T00:00:00Z" + }, + "StatusCode": 204, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "0", + "DataServiceId": "https://seankaneprim.table.core.windows.net/tableName246899398(PartitionKey=\u0027partition\u0027,RowKey=\u00274\u0027)", + "Date": "Mon, 02 Aug 2021 18:01:59 GMT", + "ETag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A00.7740122Z\u0027\u0022", + "Location": "https://seankaneprim.table.core.windows.net/tableName246899398(PartitionKey=\u0027partition\u0027,RowKey=\u00274\u0027)", + "Preference-Applied": "return-no-content", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b67c9-9002-0057-3ec8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/tableName246899398", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/tableName246899398", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "125", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "prefer": "return-no-content", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:01 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "Bool": true, + "Integer": 5, + "PartitionKey": "partition", + "RowKey": "5", + "String": "some string 5", + "Timestamp": "0001-01-01T00:00:00Z" + }, + "StatusCode": 204, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "0", + "DataServiceId": "https://seankaneprim.table.core.windows.net/tableName246899398(PartitionKey=\u0027partition\u0027,RowKey=\u00275\u0027)", + "Date": "Mon, 02 Aug 2021 18:02:00 GMT", + "ETag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A00.9151112Z\u0027\u0022", + "Location": "https://seankaneprim.table.core.windows.net/tableName246899398(PartitionKey=\u0027partition\u0027,RowKey=\u00275\u0027)", + "Preference-Applied": "return-no-content", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b67f8-9002-0057-6dc8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/tableName246899398()?%24filter=RowKey\u002Blt\u002B%275%27", + "RequestMethod": "GET", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "GET", + ":path": "/tableName246899398()?%24filter=RowKey\u002Blt\u002B%275%27", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:01 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", + "Date": "Mon, 02 Aug 2021 18:02:00 GMT", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "Vary": "Origin", + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b681b-9002-0057-0ec8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": { + "odata.metadata": "https://seankaneprim.table.core.windows.net/$metadata#tableName246899398", + "value": [ + { + "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A00.378734Z\u0027\u0022", + "PartitionKey": "partition", + "RowKey": "1", + "Timestamp": "2021-08-02T18:02:00.378734Z", + "Bool": true, + "Integer": 1, + "String": "some string 1" + }, + { + "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A00.5048231Z\u0027\u0022", + "PartitionKey": "partition", + "RowKey": "2", + "Timestamp": "2021-08-02T18:02:00.5048231Z", + "Bool": true, + "Integer": 2, + "String": "some string 2" + }, + { + "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A00.6309113Z\u0027\u0022", + "PartitionKey": "partition", + "RowKey": "3", + "Timestamp": "2021-08-02T18:02:00.6309113Z", + "Bool": true, + "Integer": 3, + "String": "some string 3" + }, + { + "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A00.7740122Z\u0027\u0022", + "PartitionKey": "partition", + "RowKey": "4", + "Timestamp": "2021-08-02T18:02:00.7740122Z", + "Bool": true, + "Integer": 4, + "String": "some string 4" + } + ] + } + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables(\u0027tableName246899398\u0027)", + "RequestMethod": "DELETE", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "DELETE", + ":path": "/Tables(\u0027tableName246899398\u0027)", + ":scheme": "https", + "Accept": "application/json", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:01 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "0", + "Date": "Mon, 02 Aug 2021 18:02:00 GMT", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b684b-9002-0057-38c8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": null + } + ], + "Variables": {} +} \ No newline at end of file diff --git a/sdk/tables/aztable/recordings/TestQueryTable/TestQueryTable_cosmos.json b/sdk/tables/aztable/recordings/TestQueryTable/TestQueryTable_cosmos.json new file mode 100644 index 000000000000..88337075fcc9 --- /dev/null +++ b/sdk/tables/aztable/recordings/TestQueryTable/TestQueryTable_cosmos.json @@ -0,0 +1,485 @@ +{ + "Entries": [ + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/Tables", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "21", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:16 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "TableName": "zzza0" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "Date": "Mon, 02 Aug 2021 18:02:15 GMT", + "ETag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A15.6441608Z\u0027\u0022", + "Location": "https://seankaneprim.table.cosmos.azure.com/Tables(\u0027zzza0\u0027)", + "Transfer-Encoding": "chunked", + "x-ms-request-id": "f08a29ed-0e4c-496b-9c97-325e02c7cef1" + }, + "ResponseBody": { + "TableName": "zzza0", + "odata.metadata": "https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/Tables", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "21", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:16 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "TableName": "zzza1" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "Date": "Mon, 02 Aug 2021 18:02:16 GMT", + "ETag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A16.4076552Z\u0027\u0022", + "Location": "https://seankaneprim.table.cosmos.azure.com/Tables(\u0027zzza1\u0027)", + "Transfer-Encoding": "chunked", + "x-ms-request-id": "6d8a02af-1675-402b-945f-a3b9ef7b4ead" + }, + "ResponseBody": { + "TableName": "zzza1", + "odata.metadata": "https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/Tables", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "21", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:17 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "TableName": "zzza2" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "Date": "Mon, 02 Aug 2021 18:02:17 GMT", + "ETag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A17.1583496Z\u0027\u0022", + "Location": "https://seankaneprim.table.cosmos.azure.com/Tables(\u0027zzza2\u0027)", + "Transfer-Encoding": "chunked", + "x-ms-request-id": "5233208b-8940-4135-8ecd-bb98b15c1e24" + }, + "ResponseBody": { + "TableName": "zzza2", + "odata.metadata": "https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/Tables", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "21", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:18 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "TableName": "zzza3" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "Date": "Mon, 02 Aug 2021 18:02:18 GMT", + "ETag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A17.9521544Z\u0027\u0022", + "Location": "https://seankaneprim.table.cosmos.azure.com/Tables(\u0027zzza3\u0027)", + "Transfer-Encoding": "chunked", + "x-ms-request-id": "0a7f5e9f-3af7-41b0-aece-2ebda3d60b6d" + }, + "ResponseBody": { + "TableName": "zzza3", + "odata.metadata": "https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/Tables", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "21", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:19 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "TableName": "zzzb4" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "Date": "Mon, 02 Aug 2021 18:02:18 GMT", + "ETag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A18.7719688Z\u0027\u0022", + "Location": "https://seankaneprim.table.cosmos.azure.com/Tables(\u0027zzzb4\u0027)", + "Transfer-Encoding": "chunked", + "x-ms-request-id": "8a89d850-cd07-401f-acff-a16095f56252" + }, + "ResponseBody": { + "TableName": "zzzb4", + "odata.metadata": "https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables?%24filter=TableName\u002Bge\u002B%27zzza%27\u002Band\u002BTableName\u002Blt\u002B%27zzzb%27", + "RequestMethod": "GET", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "GET", + ":path": "/Tables?%24filter=TableName\u002Bge\u002B%27zzza%27\u002Band\u002BTableName\u002Blt\u002B%27zzzb%27", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:20 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "Date": "Mon, 02 Aug 2021 18:02:19 GMT", + "Transfer-Encoding": "chunked", + "x-ms-request-id": "180dcca7-a969-4771-8f9a-b6523df4bed7" + }, + "ResponseBody": { + "value": [ + { + "TableName": "zzza0" + }, + { + "TableName": "zzza3" + }, + { + "TableName": "zzza1" + }, + { + "TableName": "zzza2" + } + ], + "odata.metadata": "https://seankaneprim.table.cosmos.azure.com/$metadata#Tables" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables?%24filter=TableName\u002Bge\u002B%27zzza%27\u002Band\u002BTableName\u002Blt\u002B%27zzzb%27\u0026%24top=2", + "RequestMethod": "GET", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "GET", + ":path": "/Tables?%24filter=TableName\u002Bge\u002B%27zzza%27\u002Band\u002BTableName\u002Blt\u002B%27zzzb%27\u0026%24top=2", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:20 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "Date": "Mon, 02 Aug 2021 18:02:19 GMT", + "Transfer-Encoding": "chunked", + "x-ms-continuation-NextTableName": "-RID:~yatLAPMFP4M=#RT:1#TRC:2", + "x-ms-request-id": "4deb9f37-feab-4c23-8e93-0d359da5057b" + }, + "ResponseBody": { + "value": [ + { + "TableName": "zzza0" + }, + { + "TableName": "zzza3" + } + ], + "odata.metadata": "https://seankaneprim.table.cosmos.azure.com/$metadata#Tables" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables?%24filter=TableName\u002Bge\u002B%27zzza%27\u002Band\u002BTableName\u002Blt\u002B%27zzzb%27\u0026%24top=2\u0026NextTableName=-RID%3A~yatLAPMFP4M%3D%23RT%3A1%23TRC%3A2", + "RequestMethod": "GET", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "GET", + ":path": "/Tables?%24filter=TableName\u002Bge\u002B%27zzza%27\u002Band\u002BTableName\u002Blt\u002B%27zzzb%27\u0026%24top=2\u0026NextTableName=-RID%3A~yatLAPMFP4M%3D%23RT%3A1%23TRC%3A2", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:20 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "Date": "Mon, 02 Aug 2021 18:02:19 GMT", + "Transfer-Encoding": "chunked", + "x-ms-continuation-NextTableName": "-RID:~yatLALb4G9c=#RT:2#TRC:4", + "x-ms-request-id": "4467d925-cd70-42d8-b43e-c7c846e96fa4" + }, + "ResponseBody": { + "value": [ + { + "TableName": "zzza1" + }, + { + "TableName": "zzza2" + } + ], + "odata.metadata": "https://seankaneprim.table.cosmos.azure.com/$metadata#Tables" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables?%24filter=TableName\u002Bge\u002B%27zzza%27\u002Band\u002BTableName\u002Blt\u002B%27zzzb%27\u0026%24top=2\u0026NextTableName=-RID%3A~yatLALb4G9c%3D%23RT%3A2%23TRC%3A4", + "RequestMethod": "GET", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "GET", + ":path": "/Tables?%24filter=TableName\u002Bge\u002B%27zzza%27\u002Band\u002BTableName\u002Blt\u002B%27zzzb%27\u0026%24top=2\u0026NextTableName=-RID%3A~yatLALb4G9c%3D%23RT%3A2%23TRC%3A4", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:20 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "Date": "Mon, 02 Aug 2021 18:02:19 GMT", + "Transfer-Encoding": "chunked", + "x-ms-request-id": "11918ddc-78bc-4649-9217-b103371422bb" + }, + "ResponseBody": { + "value": [], + "odata.metadata": "https://seankaneprim.table.cosmos.azure.com/$metadata#Tables" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables", + "RequestMethod": "GET", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "GET", + ":path": "/Tables", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:20 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "Date": "Mon, 02 Aug 2021 18:02:19 GMT", + "Transfer-Encoding": "chunked", + "x-ms-request-id": "2ae878d6-b367-4b6b-8dba-c4be9854e272" + }, + "ResponseBody": { + "value": [ + { + "TableName": "zzza0" + }, + { + "TableName": "zzza3" + }, + { + "TableName": "zzza1" + }, + { + "TableName": "zzzb4" + }, + { + "TableName": "zzza2" + } + ], + "odata.metadata": "https://seankaneprim.table.cosmos.azure.com/$metadata#Tables" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables(\u0027zzza0\u0027)", + "RequestMethod": "DELETE", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "DELETE", + ":path": "/Tables(\u0027zzza0\u0027)", + ":scheme": "https", + "Accept": "application/json", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:20 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "Date": "Mon, 02 Aug 2021 18:02:20 GMT", + "x-ms-request-id": "8a84bd87-d58b-423e-b4e9-a2666cedf002" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables(\u0027zzza3\u0027)", + "RequestMethod": "DELETE", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "DELETE", + ":path": "/Tables(\u0027zzza3\u0027)", + ":scheme": "https", + "Accept": "application/json", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:21 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "Date": "Mon, 02 Aug 2021 18:02:20 GMT", + "x-ms-request-id": "b7343aa8-9358-430f-8a54-21a6202fb97e" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables(\u0027zzza1\u0027)", + "RequestMethod": "DELETE", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "DELETE", + ":path": "/Tables(\u0027zzza1\u0027)", + ":scheme": "https", + "Accept": "application/json", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:21 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "Date": "Mon, 02 Aug 2021 18:02:20 GMT", + "x-ms-request-id": "84eb2a70-be21-4853-81b6-4054571b8f3b" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables(\u0027zzzb4\u0027)", + "RequestMethod": "DELETE", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "DELETE", + ":path": "/Tables(\u0027zzzb4\u0027)", + ":scheme": "https", + "Accept": "application/json", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:22 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "Date": "Mon, 02 Aug 2021 18:02:21 GMT", + "x-ms-request-id": "2c6a27c2-b190-455f-a838-a1a245cec07b" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables(\u0027zzza2\u0027)", + "RequestMethod": "DELETE", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "DELETE", + ":path": "/Tables(\u0027zzza2\u0027)", + ":scheme": "https", + "Accept": "application/json", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:22 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "Date": "Mon, 02 Aug 2021 18:02:21 GMT", + "x-ms-request-id": "6b6d66de-bdc9-4812-8973-356a0d74551e" + }, + "ResponseBody": null + } + ], + "Variables": {} +} \ No newline at end of file diff --git a/sdk/tables/aztable/recordings/TestQueryTable/TestQueryTable_storage.json b/sdk/tables/aztable/recordings/TestQueryTable/TestQueryTable_storage.json new file mode 100644 index 000000000000..317df177e52b --- /dev/null +++ b/sdk/tables/aztable/recordings/TestQueryTable/TestQueryTable_storage.json @@ -0,0 +1,557 @@ +{ + "Entries": [ + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/Tables", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "21", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:14 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "TableName": "zzza0" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", + "Date": "Mon, 02 Aug 2021 18:02:12 GMT", + "Location": "https://seankaneprim.table.core.windows.net/Tables(\u0027zzza0\u0027)", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b7636-9002-0057-3bc8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": { + "odata.metadata": "https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element", + "TableName": "zzza0" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/Tables", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "21", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:14 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "TableName": "zzza1" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", + "Date": "Mon, 02 Aug 2021 18:02:12 GMT", + "Location": "https://seankaneprim.table.core.windows.net/Tables(\u0027zzza1\u0027)", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b765f-9002-0057-62c8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": { + "odata.metadata": "https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element", + "TableName": "zzza1" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/Tables", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "21", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:14 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "TableName": "zzza2" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", + "Date": "Mon, 02 Aug 2021 18:02:12 GMT", + "Location": "https://seankaneprim.table.core.windows.net/Tables(\u0027zzza2\u0027)", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b7687-9002-0057-04c8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": { + "odata.metadata": "https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element", + "TableName": "zzza2" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/Tables", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "21", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:14 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "TableName": "zzza3" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", + "Date": "Mon, 02 Aug 2021 18:02:13 GMT", + "Location": "https://seankaneprim.table.core.windows.net/Tables(\u0027zzza3\u0027)", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b76ae-9002-0057-26c8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": { + "odata.metadata": "https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element", + "TableName": "zzza3" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/Tables", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "21", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:14 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "TableName": "zzzb4" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", + "Date": "Mon, 02 Aug 2021 18:02:13 GMT", + "Location": "https://seankaneprim.table.core.windows.net/Tables(\u0027zzzb4\u0027)", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b76d3-9002-0057-4ac8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": { + "odata.metadata": "https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element", + "TableName": "zzzb4" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables?%24filter=TableName\u002Bge\u002B%27zzza%27\u002Band\u002BTableName\u002Blt\u002B%27zzzb%27", + "RequestMethod": "GET", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "GET", + ":path": "/Tables?%24filter=TableName\u002Bge\u002B%27zzza%27\u002Band\u002BTableName\u002Blt\u002B%27zzzb%27", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:14 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", + "Date": "Mon, 02 Aug 2021 18:02:13 GMT", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "Vary": "Origin", + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b770b-9002-0057-7ec8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": { + "odata.metadata": "https://seankaneprim.table.core.windows.net/$metadata#Tables", + "value": [ + { + "TableName": "zzza0" + }, + { + "TableName": "zzza1" + }, + { + "TableName": "zzza2" + }, + { + "TableName": "zzza3" + } + ] + } + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables?%24filter=TableName\u002Bge\u002B%27zzza%27\u002Band\u002BTableName\u002Blt\u002B%27zzzb%27\u0026%24top=2", + "RequestMethod": "GET", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "GET", + ":path": "/Tables?%24filter=TableName\u002Bge\u002B%27zzza%27\u002Band\u002BTableName\u002Blt\u002B%27zzzb%27\u0026%24top=2", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:15 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", + "Date": "Mon, 02 Aug 2021 18:02:13 GMT", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "Vary": "Origin", + "X-Content-Type-Options": "nosniff", + "x-ms-continuation-NextTableName": "1!32!enp6YTIBMDFkNzg3Yzg4NWMxMTg0ZA--", + "x-ms-request-id": "a05b7745-9002-0057-33c8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": { + "odata.metadata": "https://seankaneprim.table.core.windows.net/$metadata#Tables", + "value": [ + { + "TableName": "zzza0" + }, + { + "TableName": "zzza1" + } + ] + } + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables?%24filter=TableName\u002Bge\u002B%27zzza%27\u002Band\u002BTableName\u002Blt\u002B%27zzzb%27\u0026%24top=2\u0026NextTableName=1%2132%21enp6YTIBMDFkNzg3Yzg4NWMxMTg0ZA--", + "RequestMethod": "GET", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "GET", + ":path": "/Tables?%24filter=TableName\u002Bge\u002B%27zzza%27\u002Band\u002BTableName\u002Blt\u002B%27zzzb%27\u0026%24top=2\u0026NextTableName=1%2132%21enp6YTIBMDFkNzg3Yzg4NWMxMTg0ZA--", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:15 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", + "Date": "Mon, 02 Aug 2021 18:02:13 GMT", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "Vary": "Origin", + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b7778-9002-0057-66c8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": { + "odata.metadata": "https://seankaneprim.table.core.windows.net/$metadata#Tables", + "value": [ + { + "TableName": "zzza2" + }, + { + "TableName": "zzza3" + } + ] + } + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables", + "RequestMethod": "GET", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "GET", + ":path": "/Tables", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:15 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", + "Date": "Mon, 02 Aug 2021 18:02:13 GMT", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "Vary": "Origin", + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b77b1-9002-0057-19c8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": { + "odata.metadata": "https://seankaneprim.table.core.windows.net/$metadata#Tables", + "value": [ + { + "TableName": "zzza0" + }, + { + "TableName": "zzza1" + }, + { + "TableName": "zzza2" + }, + { + "TableName": "zzza3" + }, + { + "TableName": "zzzb4" + } + ] + } + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables(\u0027zzza0\u0027)", + "RequestMethod": "DELETE", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "DELETE", + ":path": "/Tables(\u0027zzza0\u0027)", + ":scheme": "https", + "Accept": "application/json", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:15 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "0", + "Date": "Mon, 02 Aug 2021 18:02:13 GMT", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b77cf-9002-0057-37c8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables(\u0027zzza1\u0027)", + "RequestMethod": "DELETE", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "DELETE", + ":path": "/Tables(\u0027zzza1\u0027)", + ":scheme": "https", + "Accept": "application/json", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:15 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "0", + "Date": "Mon, 02 Aug 2021 18:02:14 GMT", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b77f0-9002-0057-58c8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables(\u0027zzza2\u0027)", + "RequestMethod": "DELETE", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "DELETE", + ":path": "/Tables(\u0027zzza2\u0027)", + ":scheme": "https", + "Accept": "application/json", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:15 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "0", + "Date": "Mon, 02 Aug 2021 18:02:14 GMT", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b7819-9002-0057-01c8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables(\u0027zzza3\u0027)", + "RequestMethod": "DELETE", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "DELETE", + ":path": "/Tables(\u0027zzza3\u0027)", + ":scheme": "https", + "Accept": "application/json", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:15 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "0", + "Date": "Mon, 02 Aug 2021 18:02:14 GMT", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b784b-9002-0057-2cc8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables(\u0027zzzb4\u0027)", + "RequestMethod": "DELETE", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "DELETE", + ":path": "/Tables(\u0027zzzb4\u0027)", + ":scheme": "https", + "Accept": "application/json", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:15 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "0", + "Date": "Mon, 02 Aug 2021 18:02:14 GMT", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b7871-9002-0057-4fc8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": null + } + ], + "Variables": {} +} \ No newline at end of file diff --git a/sdk/tables/aztable/recordings/TestRetentionTooLong.json b/sdk/tables/aztable/recordings/TestRetentionTooLong.json new file mode 100644 index 000000000000..3b8d65de6525 --- /dev/null +++ b/sdk/tables/aztable/recordings/TestRetentionTooLong.json @@ -0,0 +1,42 @@ +{ + "Entries": [ + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/?comp=properties\u0026restype=service", + "RequestMethod": "PUT", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "PUT", + ":path": "/?comp=properties\u0026restype=service", + ":scheme": "https", + "Accept": "application/xml", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "234", + "Content-Type": "application/xml", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:05:39 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": "\u003CStorageServiceProperties\u003E\u003CMinuteMetrics\u003E\u003CEnabled\u003Etrue\u003C/Enabled\u003E\u003CIncludeAPIs\u003Etrue\u003C/IncludeAPIs\u003E\u003CRetentionPolicy\u003E\u003CEnabled\u003Etrue\u003C/Enabled\u003E\u003CDays\u003E366\u003C/Days\u003E\u003C/RetentionPolicy\u003E\u003CVersion\u003E1.0\u003C/Version\u003E\u003C/MinuteMetrics\u003E\u003C/StorageServiceProperties\u003E", + "StatusCode": 400, + "ResponseHeaders": { + "Content-Length": "327", + "Content-Type": "application/xml", + "Date": "Mon, 02 Aug 2021 18:05:38 GMT", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-error-code": "InvalidXmlDocument", + "x-ms-request-id": "a05c5eae-9002-0057-1bc9-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": [ + "\u003C?xml version=\u00221.0\u0022 encoding=\u0022utf-8\u0022?\u003E\u003Cm:error xmlns:m=\u0022http://schemas.microsoft.com/ado/2007/08/dataservices/metadata\u0022\u003E\u003Cm:code\u003EInvalidXmlDocument\u003C/m:code\u003E\u003Cm:message xml:lang=\u0022en-US\u0022\u003EXML specified is not syntactically valid.\n", + "RequestId:a05c5eae-9002-0057-1bc9-874646000000\n", + "Time:2021-08-02T18:05:38.9930483Z\u003C/m:message\u003E\u003C/m:error\u003E" + ] + } + ], + "Variables": {} +} \ No newline at end of file diff --git a/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestCreateTable-variables.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestCreateTable-variables.yaml deleted file mode 100644 index 7c9e2af36ee8..000000000000 --- a/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestCreateTable-variables.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com -TABLES_COSMOS_ACCOUNT_NAME: chrisstablesprim -TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== -randomSeed: "1617573293" diff --git a/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestCreateTable.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestCreateTable.yaml deleted file mode 100644 index 032f93240511..000000000000 --- a/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestCreateTable.yaml +++ /dev/null @@ -1,75 +0,0 @@ ---- -version: 1 -interactions: -- request: - body: '{"TableName":"gotablecwmvbx3xi23m7"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "36" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; - Windows_NT) - X-Ms-Date: - - Sun, 04 Apr 2021 21:54:53 GMT - X-Ms-Version: - - "2019-02-02" - url: https://chrisstablesprim.table.cosmos.azure.com/Tables - method: POST - response: - body: '{"TableName":"gotablecwmvbx3xi23m7","odata.metadata":"https://chrisstablesprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' - headers: - Content-Type: - - application/json;odata=minimalmetadata - Date: - - Sun, 04 Apr 2021 21:54:53 GMT - Etag: - - W/"datetime'2021-04-04T21%3A54%3A53.3743624Z'" - Location: - - https://chrisstablesprim.table.cosmos.azure.com/Tables('gotablecwmvbx3xi23m7') - Server: - - Microsoft-HTTPAPI/2.0 - X-Ms-Request-Id: - - 33edc858-c2fc-436f-a0a0-8f909cfd1114 - status: 201 Created - code: 201 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; - Windows_NT) - X-Ms-Date: - - Sun, 04 Apr 2021 21:54:53 GMT - X-Ms-Version: - - "2019-02-02" - url: https://chrisstablesprim.table.cosmos.azure.com/Tables('gotablecwmvbx3xi23m7') - method: DELETE - response: - body: "" - headers: - Content-Length: - - "0" - Date: - - Sun, 04 Apr 2021 21:54:53 GMT - Server: - - Microsoft-HTTPAPI/2.0 - X-Ms-Request-Id: - - 654da1b1-025b-451e-8d64-d3c4afe7739a - status: 204 No Content - code: 204 - duration: "" diff --git a/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestGetProperties-variables.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestGetProperties-variables.yaml deleted file mode 100644 index 4944bc270a8f..000000000000 --- a/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestGetProperties-variables.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com -TABLES_COSMOS_ACCOUNT_NAME: seankaneprim -TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== diff --git a/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestGetStatistics-variables.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestGetStatistics-variables.yaml deleted file mode 100644 index 4944bc270a8f..000000000000 --- a/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestGetStatistics-variables.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com -TABLES_COSMOS_ACCOUNT_NAME: seankaneprim -TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== diff --git a/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestListTables-variables.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestListTables-variables.yaml deleted file mode 100644 index c6777751d235..000000000000 --- a/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestListTables-variables.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com -TABLES_COSMOS_ACCOUNT_NAME: seankaneprim -TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== -randomSeed: "1626796896" diff --git a/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestListTables.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestListTables.yaml deleted file mode 100644 index ba3f4296d831..000000000000 --- a/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestListTables.yaml +++ /dev/null @@ -1,557 +0,0 @@ ---- -version: 1 -interactions: -- request: - body: "" - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Tue, 20 Jul 2021 16:01:36 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/Tables - method: GET - response: - body: '{"value":[{"TableName":"gotable5jq3v0tq94aql4"},{"TableName":"gotableq7wc90zjsaq4o4"},{"TableName":"gotable5jq3v0tq94aql0"},{"TableName":"gotable5jq3v0tq94aql3"},{"TableName":"gotable5jq3v0tq94aql2"},{"TableName":"gotableq7wc90zjsaq4o3"},{"TableName":"gotablel4p8jpfnr5wfc"},{"TableName":"gotableq7wc90zjsaq4o2"},{"TableName":"gotable5jq3v0tq94aql1"},{"TableName":"gotableq7wc90zjsaq4o1"},{"TableName":"gotableq7wc90zjsaq4o0"}],"odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables"}' - headers: - Content-Type: - - application/json;odata=minimalmetadata - Date: - - Tue, 20 Jul 2021 16:01:36 GMT - X-Ms-Request-Id: - - d1a623e2-60a3-4471-bbdd-c9177dd251b8 - status: 200 OK - code: 200 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Tue, 20 Jul 2021 16:01:36 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/Tables('gotable5jq3v0tq94aql4') - method: DELETE - response: - body: "" - headers: - Date: - - Tue, 20 Jul 2021 16:01:36 GMT - X-Ms-Request-Id: - - c831b329-33a4-422d-bcb2-f521a44e73cd - status: 204 No Content - code: 204 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Tue, 20 Jul 2021 16:01:37 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/Tables('gotableq7wc90zjsaq4o4') - method: DELETE - response: - body: "" - headers: - Date: - - Tue, 20 Jul 2021 16:01:37 GMT - X-Ms-Request-Id: - - ec89c3e4-62c9-4298-87ff-e764077fc45e - status: 204 No Content - code: 204 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Tue, 20 Jul 2021 16:01:37 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/Tables('gotable5jq3v0tq94aql0') - method: DELETE - response: - body: "" - headers: - Date: - - Tue, 20 Jul 2021 16:01:37 GMT - X-Ms-Request-Id: - - 3870142d-c5ec-417d-ba17-46a852cac90c - status: 204 No Content - code: 204 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Tue, 20 Jul 2021 16:01:38 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/Tables('gotable5jq3v0tq94aql3') - method: DELETE - response: - body: "" - headers: - Date: - - Tue, 20 Jul 2021 16:01:37 GMT - X-Ms-Request-Id: - - 5e74aa0a-336a-4f5f-9ce5-314b3423dc47 - status: 204 No Content - code: 204 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Tue, 20 Jul 2021 16:01:38 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/Tables('gotable5jq3v0tq94aql2') - method: DELETE - response: - body: "" - headers: - Date: - - Tue, 20 Jul 2021 16:01:38 GMT - X-Ms-Request-Id: - - e72a9553-2139-4d23-8587-0597293e230d - status: 204 No Content - code: 204 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Tue, 20 Jul 2021 16:01:38 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/Tables('gotableq7wc90zjsaq4o3') - method: DELETE - response: - body: "" - headers: - Date: - - Tue, 20 Jul 2021 16:01:38 GMT - X-Ms-Request-Id: - - 2b2ac4dd-95d3-479f-b43c-dbbe95e24a35 - status: 204 No Content - code: 204 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Tue, 20 Jul 2021 16:01:39 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/Tables('gotablel4p8jpfnr5wfc') - method: DELETE - response: - body: "" - headers: - Date: - - Tue, 20 Jul 2021 16:01:39 GMT - X-Ms-Request-Id: - - 506ecd01-1315-4fdb-87c3-9565da3a8d35 - status: 204 No Content - code: 204 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Tue, 20 Jul 2021 16:01:39 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/Tables('gotableq7wc90zjsaq4o2') - method: DELETE - response: - body: "" - headers: - Date: - - Tue, 20 Jul 2021 16:01:39 GMT - X-Ms-Request-Id: - - de18a430-15e8-44b8-8102-b22c1ad23e31 - status: 204 No Content - code: 204 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Tue, 20 Jul 2021 16:01:39 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/Tables('gotable5jq3v0tq94aql1') - method: DELETE - response: - body: "" - headers: - Date: - - Tue, 20 Jul 2021 16:01:39 GMT - X-Ms-Request-Id: - - ad3e784e-5fe6-48bd-8281-107fab2d16b4 - status: 204 No Content - code: 204 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Tue, 20 Jul 2021 16:01:40 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/Tables('gotableq7wc90zjsaq4o1') - method: DELETE - response: - body: "" - headers: - Date: - - Tue, 20 Jul 2021 16:01:40 GMT - X-Ms-Request-Id: - - c6c69d9b-a4a5-469f-94d5-fa0dbbc7ed30 - status: 204 No Content - code: 204 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Tue, 20 Jul 2021 16:01:40 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/Tables('gotableq7wc90zjsaq4o0') - method: DELETE - response: - body: "" - headers: - Date: - - Tue, 20 Jul 2021 16:01:40 GMT - X-Ms-Request-Id: - - 4e3c0641-f714-49c9-9a24-f9f22df2afa5 - status: 204 No Content - code: 204 - duration: "" -- request: - body: '{"TableName":"gotabled7f5qwr5hskdg0"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "37" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Tue, 20 Jul 2021 16:01:41 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/Tables - method: POST - response: - body: '{"TableName":"gotabled7f5qwr5hskdg0","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' - headers: - Content-Type: - - application/json;odata=minimalmetadata - Date: - - Tue, 20 Jul 2021 16:01:41 GMT - Etag: - - W/"datetime'2021-07-20T16%3A01%3A41.6731656Z'" - Location: - - https://seankaneprim.table.cosmos.azure.com/Tables('gotabled7f5qwr5hskdg0') - X-Ms-Request-Id: - - df88e6cf-9bd6-4115-8177-b6aaaf2262e1 - status: 201 Created - code: 201 - duration: "" -- request: - body: '{"TableName":"gotabled7f5qwr5hskdg1"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "37" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Tue, 20 Jul 2021 16:01:42 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/Tables - method: POST - response: - body: '{"TableName":"gotabled7f5qwr5hskdg1","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' - headers: - Content-Type: - - application/json;odata=minimalmetadata - Date: - - Tue, 20 Jul 2021 16:01:42 GMT - Etag: - - W/"datetime'2021-07-20T16%3A01%3A42.5668104Z'" - Location: - - https://seankaneprim.table.cosmos.azure.com/Tables('gotabled7f5qwr5hskdg1') - X-Ms-Request-Id: - - 26d147ca-dc5f-4475-aafb-08091ce29e69 - status: 201 Created - code: 201 - duration: "" -- request: - body: '{"TableName":"gotabled7f5qwr5hskdg2"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "37" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Tue, 20 Jul 2021 16:01:43 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/Tables - method: POST - response: - body: '{"TableName":"gotabled7f5qwr5hskdg2","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' - headers: - Content-Type: - - application/json;odata=minimalmetadata - Date: - - Tue, 20 Jul 2021 16:01:43 GMT - Etag: - - W/"datetime'2021-07-20T16%3A01%3A43.3920520Z'" - Location: - - https://seankaneprim.table.cosmos.azure.com/Tables('gotabled7f5qwr5hskdg2') - X-Ms-Request-Id: - - ff314918-0c36-4935-8a12-e80e383d60cb - status: 201 Created - code: 201 - duration: "" -- request: - body: '{"TableName":"gotabled7f5qwr5hskdg3"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "37" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Tue, 20 Jul 2021 16:01:43 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/Tables - method: POST - response: - body: '{"TableName":"gotabled7f5qwr5hskdg3","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' - headers: - Content-Type: - - application/json;odata=minimalmetadata - Date: - - Tue, 20 Jul 2021 16:01:44 GMT - Etag: - - W/"datetime'2021-07-20T16%3A01%3A44.2174984Z'" - Location: - - https://seankaneprim.table.cosmos.azure.com/Tables('gotabled7f5qwr5hskdg3') - X-Ms-Request-Id: - - a61384c7-ab17-424c-9c04-b0309eea72d0 - status: 201 Created - code: 201 - duration: "" -- request: - body: '{"TableName":"gotabled7f5qwr5hskdg4"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "37" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Tue, 20 Jul 2021 16:01:44 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/Tables - method: POST - response: - body: '{"TableName":"gotabled7f5qwr5hskdg4","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' - headers: - Content-Type: - - application/json;odata=minimalmetadata - Date: - - Tue, 20 Jul 2021 16:01:44 GMT - Etag: - - W/"datetime'2021-07-20T16%3A01%3A45.0529800Z'" - Location: - - https://seankaneprim.table.cosmos.azure.com/Tables('gotabled7f5qwr5hskdg4') - X-Ms-Request-Id: - - 31a463d8-b07a-4360-8306-b1e05febc688 - status: 201 Created - code: 201 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Tue, 20 Jul 2021 16:01:45 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/Tables - method: GET - response: - body: '{"value":[{"TableName":"gotabled7f5qwr5hskdg3"},{"TableName":"gotabled7f5qwr5hskdg1"},{"TableName":"gotabled7f5qwr5hskdg0"},{"TableName":"gotabled7f5qwr5hskdg4"},{"TableName":"gotabled7f5qwr5hskdg2"}],"odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables"}' - headers: - Content-Type: - - application/json;odata=minimalmetadata - Date: - - Tue, 20 Jul 2021 16:01:45 GMT - X-Ms-Request-Id: - - a88f3060-ca4b-44e0-9ad2-15ec2205999a - status: 200 OK - code: 200 - duration: "" diff --git a/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestQueryTable-variables.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestQueryTable-variables.yaml deleted file mode 100644 index e1d3c746ac8b..000000000000 --- a/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestQueryTable-variables.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com -TABLES_COSMOS_ACCOUNT_NAME: chrisstablesprim -TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== -randomSeed: "1617573294" diff --git a/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestQueryTable.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestQueryTable.yaml deleted file mode 100644 index 4451edbf754c..000000000000 --- a/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestQueryTable.yaml +++ /dev/null @@ -1,499 +0,0 @@ ---- -version: 1 -interactions: -- request: - body: '{"TableName":"zzza6868drab2e097oxu"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "36" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; - Windows_NT) - X-Ms-Date: - - Sun, 04 Apr 2021 21:54:54 GMT - X-Ms-Version: - - "2019-02-02" - url: https://chrisstablesprim.table.cosmos.azure.com/Tables - method: POST - response: - body: '{"TableName":"zzza6868drab2e097oxu","odata.metadata":"https://chrisstablesprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' - headers: - Content-Type: - - application/json;odata=minimalmetadata - Date: - - Sun, 04 Apr 2021 21:54:53 GMT - Etag: - - W/"datetime'2021-04-04T21%3A54%3A54.2225416Z'" - Location: - - https://chrisstablesprim.table.cosmos.azure.com/Tables('zzza6868drab2e097oxu') - Server: - - Microsoft-HTTPAPI/2.0 - X-Ms-Request-Id: - - b9dd1425-f416-44cd-9759-fa6ddc763d8e - status: 201 Created - code: 201 - duration: "" -- request: - body: '{"TableName":"zzza47kqkxef1dqg6hk5"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "36" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; - Windows_NT) - X-Ms-Date: - - Sun, 04 Apr 2021 21:54:54 GMT - X-Ms-Version: - - "2019-02-02" - url: https://chrisstablesprim.table.cosmos.azure.com/Tables - method: POST - response: - body: '{"TableName":"zzza47kqkxef1dqg6hk5","odata.metadata":"https://chrisstablesprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' - headers: - Content-Type: - - application/json;odata=minimalmetadata - Date: - - Sun, 04 Apr 2021 21:54:55 GMT - Etag: - - W/"datetime'2021-04-04T21%3A54%3A54.7395592Z'" - Location: - - https://chrisstablesprim.table.cosmos.azure.com/Tables('zzza47kqkxef1dqg6hk5') - Server: - - Microsoft-HTTPAPI/2.0 - X-Ms-Request-Id: - - 7cc0bdc4-bc2e-41a5-a9d5-718481425834 - status: 201 Created - code: 201 - duration: "" -- request: - body: '{"TableName":"zzzancjsimv46ssmus2y"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "36" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; - Windows_NT) - X-Ms-Date: - - Sun, 04 Apr 2021 21:54:55 GMT - X-Ms-Version: - - "2019-02-02" - url: https://chrisstablesprim.table.cosmos.azure.com/Tables - method: POST - response: - body: '{"TableName":"zzzancjsimv46ssmus2y","odata.metadata":"https://chrisstablesprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' - headers: - Content-Type: - - application/json;odata=minimalmetadata - Date: - - Sun, 04 Apr 2021 21:54:55 GMT - Etag: - - W/"datetime'2021-04-04T21%3A54%3A55.2994824Z'" - Location: - - https://chrisstablesprim.table.cosmos.azure.com/Tables('zzzancjsimv46ssmus2y') - Server: - - Microsoft-HTTPAPI/2.0 - X-Ms-Request-Id: - - 458c58e3-3247-448a-a542-de9f20e68872 - status: 201 Created - code: 201 - duration: "" -- request: - body: '{"TableName":"zzzau7wd11jeadrhkzia"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "36" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; - Windows_NT) - X-Ms-Date: - - Sun, 04 Apr 2021 21:54:55 GMT - X-Ms-Version: - - "2019-02-02" - url: https://chrisstablesprim.table.cosmos.azure.com/Tables - method: POST - response: - body: '{"TableName":"zzzau7wd11jeadrhkzia","odata.metadata":"https://chrisstablesprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' - headers: - Content-Type: - - application/json;odata=minimalmetadata - Date: - - Sun, 04 Apr 2021 21:54:56 GMT - Etag: - - W/"datetime'2021-04-04T21%3A54%3A55.8298120Z'" - Location: - - https://chrisstablesprim.table.cosmos.azure.com/Tables('zzzau7wd11jeadrhkzia') - Server: - - Microsoft-HTTPAPI/2.0 - X-Ms-Request-Id: - - e08277e1-0ac2-4cb7-a9c2-3ad4d593d33e - status: 201 Created - code: 201 - duration: "" -- request: - body: '{"TableName":"zzzbm74eob1xykl1zb71"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "36" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; - Windows_NT) - X-Ms-Date: - - Sun, 04 Apr 2021 21:54:56 GMT - X-Ms-Version: - - "2019-02-02" - url: https://chrisstablesprim.table.cosmos.azure.com/Tables - method: POST - response: - body: '{"TableName":"zzzbm74eob1xykl1zb71","odata.metadata":"https://chrisstablesprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' - headers: - Content-Type: - - application/json;odata=minimalmetadata - Date: - - Sun, 04 Apr 2021 21:54:56 GMT - Etag: - - W/"datetime'2021-04-04T21%3A54%3A56.4097032Z'" - Location: - - https://chrisstablesprim.table.cosmos.azure.com/Tables('zzzbm74eob1xykl1zb71') - Server: - - Microsoft-HTTPAPI/2.0 - X-Ms-Request-Id: - - aba90f45-d352-46e5-8d0b-32d749a29ac3 - status: 201 Created - code: 201 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; - Windows_NT) - X-Ms-Date: - - Sun, 04 Apr 2021 21:54:56 GMT - X-Ms-Version: - - "2019-02-02" - url: https://chrisstablesprim.table.cosmos.azure.com/Tables?%24filter=TableName+ge+%27zzza%27+and+TableName+lt+%27zzzb%27 - method: GET - response: - body: '{"value":[{"TableName":"zzza6868drab2e097oxu"},{"TableName":"zzza47kqkxef1dqg6hk5"},{"TableName":"zzzancjsimv46ssmus2y"},{"TableName":"zzzau7wd11jeadrhkzia"}],"odata.metadata":"https://chrisstablesprim.table.cosmos.azure.com/$metadata#Tables"}' - headers: - Content-Type: - - application/json;odata=minimalmetadata - Date: - - Sun, 04 Apr 2021 21:54:56 GMT - Server: - - Microsoft-HTTPAPI/2.0 - X-Ms-Request-Id: - - e277f56f-be38-4847-bcc7-d404818cc2a4 - status: 200 OK - code: 200 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; - Windows_NT) - X-Ms-Date: - - Sun, 04 Apr 2021 21:54:57 GMT - X-Ms-Version: - - "2019-02-02" - url: https://chrisstablesprim.table.cosmos.azure.com/Tables?%24filter=TableName+ge+%27zzza%27+and+TableName+lt+%27zzzb%27&%24top=2 - method: GET - response: - body: '{"value":[{"TableName":"zzza6868drab2e097oxu"},{"TableName":"zzza47kqkxef1dqg6hk5"}],"odata.metadata":"https://chrisstablesprim.table.cosmos.azure.com/$metadata#Tables"}' - headers: - Content-Type: - - application/json;odata=minimalmetadata - Date: - - Sun, 04 Apr 2021 21:54:56 GMT - Server: - - Microsoft-HTTPAPI/2.0 - X-Ms-Continuation-Nexttablename: - - -RID:~-mg9ANt+LD8=#RT:1#TRC:2 - X-Ms-Request-Id: - - 89b83810-e42f-46f9-a174-3a0cd1ebd42b - status: 200 OK - code: 200 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; - Windows_NT) - X-Ms-Date: - - Sun, 04 Apr 2021 21:54:57 GMT - X-Ms-Version: - - "2019-02-02" - url: https://chrisstablesprim.table.cosmos.azure.com/Tables?%24filter=TableName+ge+%27zzza%27+and+TableName+lt+%27zzzb%27&%24top=2&NextTableName=-RID%3A~-mg9ANt%2BLD8%3D%23RT%3A1%23TRC%3A2 - method: GET - response: - body: '{"value":[{"TableName":"zzzancjsimv46ssmus2y"},{"TableName":"zzzau7wd11jeadrhkzia"}],"odata.metadata":"https://chrisstablesprim.table.cosmos.azure.com/$metadata#Tables"}' - headers: - Content-Type: - - application/json;odata=minimalmetadata - Date: - - Sun, 04 Apr 2021 21:54:56 GMT - Server: - - Microsoft-HTTPAPI/2.0 - X-Ms-Continuation-Nexttablename: - - -RID:~-mg9AOab5rE=#RT:2#TRC:4 - X-Ms-Request-Id: - - 5b359f2a-f01b-4b51-88b8-f555384be342 - status: 200 OK - code: 200 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; - Windows_NT) - X-Ms-Date: - - Sun, 04 Apr 2021 21:54:57 GMT - X-Ms-Version: - - "2019-02-02" - url: https://chrisstablesprim.table.cosmos.azure.com/Tables?%24filter=TableName+ge+%27zzza%27+and+TableName+lt+%27zzzb%27&%24top=2&NextTableName=-RID%3A~-mg9AOab5rE%3D%23RT%3A2%23TRC%3A4 - method: GET - response: - body: '{"value":[],"odata.metadata":"https://chrisstablesprim.table.cosmos.azure.com/$metadata#Tables"}' - headers: - Content-Type: - - application/json;odata=minimalmetadata - Date: - - Sun, 04 Apr 2021 21:54:56 GMT - Server: - - Microsoft-HTTPAPI/2.0 - X-Ms-Request-Id: - - bac31683-48dc-4dba-86b7-5299f8f80b14 - status: 200 OK - code: 200 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; - Windows_NT) - X-Ms-Date: - - Sun, 04 Apr 2021 21:54:57 GMT - X-Ms-Version: - - "2019-02-02" - url: https://chrisstablesprim.table.cosmos.azure.com/Tables('zzza6868drab2e097oxu') - method: DELETE - response: - body: "" - headers: - Content-Length: - - "0" - Date: - - Sun, 04 Apr 2021 21:54:57 GMT - Server: - - Microsoft-HTTPAPI/2.0 - X-Ms-Request-Id: - - 4e2b7f94-e9a9-4397-9ec1-c4808f908cf0 - status: 204 No Content - code: 204 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; - Windows_NT) - X-Ms-Date: - - Sun, 04 Apr 2021 21:54:57 GMT - X-Ms-Version: - - "2019-02-02" - url: https://chrisstablesprim.table.cosmos.azure.com/Tables('zzza47kqkxef1dqg6hk5') - method: DELETE - response: - body: "" - headers: - Content-Length: - - "0" - Date: - - Sun, 04 Apr 2021 21:54:57 GMT - Server: - - Microsoft-HTTPAPI/2.0 - X-Ms-Request-Id: - - 0c5dda5b-2983-493f-8114-90378a12a073 - status: 204 No Content - code: 204 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; - Windows_NT) - X-Ms-Date: - - Sun, 04 Apr 2021 21:54:58 GMT - X-Ms-Version: - - "2019-02-02" - url: https://chrisstablesprim.table.cosmos.azure.com/Tables('zzzancjsimv46ssmus2y') - method: DELETE - response: - body: "" - headers: - Content-Length: - - "0" - Date: - - Sun, 04 Apr 2021 21:54:57 GMT - Server: - - Microsoft-HTTPAPI/2.0 - X-Ms-Request-Id: - - 7f4c8bcf-9801-493b-90b8-84ee3935af02 - status: 204 No Content - code: 204 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; - Windows_NT) - X-Ms-Date: - - Sun, 04 Apr 2021 21:54:58 GMT - X-Ms-Version: - - "2019-02-02" - url: https://chrisstablesprim.table.cosmos.azure.com/Tables('zzzau7wd11jeadrhkzia') - method: DELETE - response: - body: "" - headers: - Content-Length: - - "0" - Date: - - Sun, 04 Apr 2021 21:54:58 GMT - Server: - - Microsoft-HTTPAPI/2.0 - X-Ms-Request-Id: - - a05000dd-1cfe-4256-88b7-e6be74a2d7df - status: 204 No Content - code: 204 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; - Windows_NT) - X-Ms-Date: - - Sun, 04 Apr 2021 21:54:58 GMT - X-Ms-Version: - - "2019-02-02" - url: https://chrisstablesprim.table.cosmos.azure.com/Tables('zzzbm74eob1xykl1zb71') - method: DELETE - response: - body: "" - headers: - Content-Length: - - "0" - Date: - - Sun, 04 Apr 2021 21:54:58 GMT - Server: - - Microsoft-HTTPAPI/2.0 - X-Ms-Request-Id: - - 81acb8ac-7460-4aa8-b548-e426c88aba21 - status: 204 No Content - code: 204 - duration: "" diff --git a/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestRetentionTooLong-variables.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestRetentionTooLong-variables.yaml deleted file mode 100644 index 4944bc270a8f..000000000000 --- a/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestRetentionTooLong-variables.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com -TABLES_COSMOS_ACCOUNT_NAME: seankaneprim -TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== diff --git a/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestServiceErrors-variables.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestServiceErrors-variables.yaml deleted file mode 100644 index 760bc4d4fdfb..000000000000 --- a/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestServiceErrors-variables.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com -TABLES_COSMOS_ACCOUNT_NAME: chrisstablesprim -TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== -randomSeed: "1617573550" diff --git a/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestServiceErrors.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestServiceErrors.yaml deleted file mode 100644 index d3b9bf432eb8..000000000000 --- a/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestServiceErrors.yaml +++ /dev/null @@ -1,113 +0,0 @@ ---- -version: 1 -interactions: -- request: - body: '{"TableName":"gotable5hickrxl8lpbo"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "36" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; - Windows_NT) - X-Ms-Date: - - Sun, 04 Apr 2021 21:59:10 GMT - X-Ms-Version: - - "2019-02-02" - url: https://chrisstablesprim.table.cosmos.azure.com/Tables - method: POST - response: - body: '{"TableName":"gotable5hickrxl8lpbo","odata.metadata":"https://chrisstablesprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' - headers: - Content-Type: - - application/json;odata=minimalmetadata - Date: - - Sun, 04 Apr 2021 21:59:11 GMT - Etag: - - W/"datetime'2021-04-04T21%3A59%3A10.9652488Z'" - Location: - - https://chrisstablesprim.table.cosmos.azure.com/Tables('gotable5hickrxl8lpbo') - Server: - - Microsoft-HTTPAPI/2.0 - X-Ms-Request-Id: - - a5903255-58e5-4c43-bad9-f5e92cd5bd68 - status: 201 Created - code: 201 - duration: "" -- request: - body: '{"TableName":"gotable5hickrxl8lpbo"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "36" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; - Windows_NT) - X-Ms-Date: - - Sun, 04 Apr 2021 21:59:11 GMT - X-Ms-Version: - - "2019-02-02" - url: https://chrisstablesprim.table.cosmos.azure.com/Tables - method: POST - response: - body: "{\"odata.error\":{\"code\":\"TableAlreadyExists\",\"message\":{\"lang\":\"en-us\",\"value\":\"The - specified table already exists.\\nRequestID:e216471c-9dae-4105-99a9-66a274775cce\\n\"}}}\r\n" - headers: - Content-Type: - - application/json;odata=minimalmetadata - Date: - - Sun, 04 Apr 2021 21:59:11 GMT - Server: - - Microsoft-HTTPAPI/2.0 - X-Ms-Request-Id: - - e216471c-9dae-4105-99a9-66a274775cce - status: 409 Conflict - code: 409 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; - Windows_NT) - X-Ms-Date: - - Sun, 04 Apr 2021 21:59:11 GMT - X-Ms-Version: - - "2019-02-02" - url: https://chrisstablesprim.table.cosmos.azure.com/Tables('gotable5hickrxl8lpbo') - method: DELETE - response: - body: "" - headers: - Content-Length: - - "0" - Date: - - Sun, 04 Apr 2021 21:59:11 GMT - Server: - - Microsoft-HTTPAPI/2.0 - X-Ms-Request-Id: - - c8bbfa46-7d78-46af-a6cb-b54bd57237af - status: 204 No Content - code: 204 - duration: "" diff --git a/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestSetCors-variables.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestSetCors-variables.yaml deleted file mode 100644 index 4944bc270a8f..000000000000 --- a/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestSetCors-variables.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com -TABLES_COSMOS_ACCOUNT_NAME: seankaneprim -TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== diff --git a/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestSetHoursMetrics-variables.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestSetHoursMetrics-variables.yaml deleted file mode 100644 index 4944bc270a8f..000000000000 --- a/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestSetHoursMetrics-variables.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com -TABLES_COSMOS_ACCOUNT_NAME: seankaneprim -TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== diff --git a/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestSetLogging-variables.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestSetLogging-variables.yaml deleted file mode 100644 index 4944bc270a8f..000000000000 --- a/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestSetLogging-variables.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com -TABLES_COSMOS_ACCOUNT_NAME: seankaneprim -TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== diff --git a/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestSetMinuteMetrics-variables.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestSetMinuteMetrics-variables.yaml deleted file mode 100644 index 4944bc270a8f..000000000000 --- a/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestSetMinuteMetrics-variables.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com -TABLES_COSMOS_ACCOUNT_NAME: seankaneprim -TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== diff --git a/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestSetProperties-variables.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestSetProperties-variables.yaml deleted file mode 100644 index 4944bc270a8f..000000000000 --- a/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestSetProperties-variables.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com -TABLES_COSMOS_ACCOUNT_NAME: seankaneprim -TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== diff --git a/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestSetTooManyCors-variables.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestSetTooManyCors-variables.yaml deleted file mode 100644 index 4944bc270a8f..000000000000 --- a/sdk/tables/aztable/recordings/TestServiceClient_Cosmos/TestSetTooManyCors-variables.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com -TABLES_COSMOS_ACCOUNT_NAME: seankaneprim -TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== diff --git a/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestCreateTable-variables.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestCreateTable-variables.yaml deleted file mode 100644 index 9b7c965397f6..000000000000 --- a/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestCreateTable-variables.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -STORAGE_ENDPOINT_SUFFIX: core.windows.net -TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== -TABLES_STORAGE_ACCOUNT_NAME: chrisstablesprim -randomSeed: "1617573291" diff --git a/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestCreateTable.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestCreateTable.yaml deleted file mode 100644 index f5f90205815d..000000000000 --- a/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestCreateTable.yaml +++ /dev/null @@ -1,85 +0,0 @@ ---- -version: 1 -interactions: -- request: - body: '{"TableName":"gotablep06y44pq0dcqy"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "36" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; - Windows_NT) - X-Ms-Date: - - Sun, 04 Apr 2021 21:54:51 GMT - X-Ms-Version: - - "2019-02-02" - url: https://chrisstablesprim.table.core.windows.net/Tables - method: POST - response: - body: '{"odata.metadata":"https://chrisstablesprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotablep06y44pq0dcqy"}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - Date: - - Sun, 04 Apr 2021 21:54:51 GMT - Location: - - https://chrisstablesprim.table.core.windows.net/Tables('gotablep06y44pq0dcqy') - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - aa171c82-c002-0053-409d-291720000000 - X-Ms-Version: - - "2019-02-02" - status: 201 Created - code: 201 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; - Windows_NT) - X-Ms-Date: - - Sun, 04 Apr 2021 21:54:51 GMT - X-Ms-Version: - - "2019-02-02" - url: https://chrisstablesprim.table.core.windows.net/Tables('gotablep06y44pq0dcqy') - method: DELETE - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Date: - - Sun, 04 Apr 2021 21:54:51 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - aa171c8d-c002-0053-4a9d-291720000000 - X-Ms-Version: - - "2019-02-02" - status: 204 No Content - code: 204 - duration: "" diff --git a/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestGetProperties-variables.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestGetProperties-variables.yaml deleted file mode 100644 index 57d67241a73e..000000000000 --- a/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestGetProperties-variables.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -STORAGE_ENDPOINT_SUFFIX: core.windows.net -TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== -TABLES_STORAGE_ACCOUNT_NAME: seankaneprim diff --git a/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestGetProperties.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestGetProperties.yaml deleted file mode 100644 index 84c6e1de98a2..000000000000 --- a/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestGetProperties.yaml +++ /dev/null @@ -1,36 +0,0 @@ ---- -version: 1 -interactions: -- request: - body: "" - form: {} - headers: - Accept: - - application/xml - Authorization: - - sanitized - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Wed, 21 Jul 2021 17:18:23 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/?comp=properties&restype=service - method: GET - response: - body: "\uFEFF\x3C\x3F\x78\x6D\x6C\x20\x76\x65\x72\x73\x69\x6F\x6E\x3D\"\x31\x2E\x30\"\x20\x65\x6E\x63\x6F\x64\x69\x6E\x67\x3D\"\x75\x74\x66\x2D\x38\"\x3F\x3E\x3C\x53\x74\x6F\x72\x61\x67\x65\x53\x65\x72\x76\x69\x63\x65\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x3E\x3C\x4C\x6F\x67\x67\x69\x6E\x67\x3E\x3C\x56\x65\x72\x73\x69\x6F\x6E\x3E\x31\x2E\x30\x3C\x2F\x56\x65\x72\x73\x69\x6F\x6E\x3E\x3C\x52\x65\x61\x64\x3E\x66\x61\x6C\x73\x65\x3C\x2F\x52\x65\x61\x64\x3E\x3C\x57\x72\x69\x74\x65\x3E\x74\x72\x75\x65\x3C\x2F\x57\x72\x69\x74\x65\x3E\x3C\x44\x65\x6C\x65\x74\x65\x3E\x66\x61\x6C\x73\x65\x3C\x2F\x44\x65\x6C\x65\x74\x65\x3E\x3C\x52\x65\x74\x65\x6E\x74\x69\x6F\x6E\x50\x6F\x6C\x69\x63\x79\x3E\x3C\x45\x6E\x61\x62\x6C\x65\x64\x3E\x66\x61\x6C\x73\x65\x3C\x2F\x45\x6E\x61\x62\x6C\x65\x64\x3E\x3C\x2F\x52\x65\x74\x65\x6E\x74\x69\x6F\x6E\x50\x6F\x6C\x69\x63\x79\x3E\x3C\x2F\x4C\x6F\x67\x67\x69\x6E\x67\x3E\x3C\x48\x6F\x75\x72\x4D\x65\x74\x72\x69\x63\x73\x3E\x3C\x56\x65\x72\x73\x69\x6F\x6E\x3E\x31\x2E\x30\x3C\x2F\x56\x65\x72\x73\x69\x6F\x6E\x3E\x3C\x45\x6E\x61\x62\x6C\x65\x64\x3E\x74\x72\x75\x65\x3C\x2F\x45\x6E\x61\x62\x6C\x65\x64\x3E\x3C\x49\x6E\x63\x6C\x75\x64\x65\x41\x50\x49\x73\x3E\x74\x72\x75\x65\x3C\x2F\x49\x6E\x63\x6C\x75\x64\x65\x41\x50\x49\x73\x3E\x3C\x52\x65\x74\x65\x6E\x74\x69\x6F\x6E\x50\x6F\x6C\x69\x63\x79\x3E\x3C\x45\x6E\x61\x62\x6C\x65\x64\x3E\x74\x72\x75\x65\x3C\x2F\x45\x6E\x61\x62\x6C\x65\x64\x3E\x3C\x44\x61\x79\x73\x3E\x37\x3C\x2F\x44\x61\x79\x73\x3E\x3C\x2F\x52\x65\x74\x65\x6E\x74\x69\x6F\x6E\x50\x6F\x6C\x69\x63\x79\x3E\x3C\x2F\x48\x6F\x75\x72\x4D\x65\x74\x72\x69\x63\x73\x3E\x3C\x4D\x69\x6E\x75\x74\x65\x4D\x65\x74\x72\x69\x63\x73\x3E\x3C\x56\x65\x72\x73\x69\x6F\x6E\x3E\x31\x2E\x30\x3C\x2F\x56\x65\x72\x73\x69\x6F\x6E\x3E\x3C\x45\x6E\x61\x62\x6C\x65\x64\x3E\x74\x72\x75\x65\x3C\x2F\x45\x6E\x61\x62\x6C\x65\x64\x3E\x3C\x49\x6E\x63\x6C\x75\x64\x65\x41\x50\x49\x73\x3E\x74\x72\x75\x65\x3C\x2F\x49\x6E\x63\x6C\x75\x64\x65\x41\x50\x49\x73\x3E\x3C\x52\x65\x74\x65\x6E\x74\x69\x6F\x6E\x50\x6F\x6C\x69\x63\x79\x3E\x3C\x45\x6E\x61\x62\x6C\x65\x64\x3E\x74\x72\x75\x65\x3C\x2F\x45\x6E\x61\x62\x6C\x65\x64\x3E\x3C\x44\x61\x79\x73\x3E\x35\x3C\x2F\x44\x61\x79\x73\x3E\x3C\x2F\x52\x65\x74\x65\x6E\x74\x69\x6F\x6E\x50\x6F\x6C\x69\x63\x79\x3E\x3C\x2F\x4D\x69\x6E\x75\x74\x65\x4D\x65\x74\x72\x69\x63\x73\x3E\x3C\x43\x6F\x72\x73\x20\x2F\x3E\x3C\x2F\x53\x74\x6F\x72\x61\x67\x65\x53\x65\x72\x76\x69\x63\x65\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x3E" - headers: - Content-Type: - - application/xml - Date: - - Wed, 21 Jul 2021 17:18:24 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Ms-Request-Id: - - 09d89e8d-5002-0005-4254-7e3aae000000 - X-Ms-Version: - - "2019-02-02" - status: 200 OK - code: 200 - duration: "" diff --git a/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestGetStatistics-variables.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestGetStatistics-variables.yaml deleted file mode 100644 index 57d67241a73e..000000000000 --- a/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestGetStatistics-variables.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -STORAGE_ENDPOINT_SUFFIX: core.windows.net -TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== -TABLES_STORAGE_ACCOUNT_NAME: seankaneprim diff --git a/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestGetStatistics.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestGetStatistics.yaml deleted file mode 100644 index 43e184ead2dc..000000000000 --- a/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestGetStatistics.yaml +++ /dev/null @@ -1,44 +0,0 @@ ---- -version: 1 -interactions: -- request: - body: "" - form: {} - headers: - Accept: - - application/xml - Authorization: - - sanitized - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Wed, 21 Jul 2021 17:03:47 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/?comp=stats&restype=service - method: GET - response: - body: |- - InvalidQueryParameterValueValue for one of the query parameters specified in the request URI is invalid. - RequestId:6dee6431-9002-009c-7552-7e4513000000 - Time:2021-07-21T17:03:47.8339546Z - headers: - Content-Length: - - "372" - Content-Type: - - application/xml - Date: - - Wed, 21 Jul 2021 17:03:47 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Ms-Error-Code: - - InvalidQueryParameterValue - X-Ms-Request-Id: - - 6dee6431-9002-009c-7552-7e4513000000 - X-Ms-Version: - - "2019-02-02" - status: 400 Value for one of the query parameters specified in the request URI - is invalid. - code: 400 - duration: "" diff --git a/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestListTables-variables.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestListTables-variables.yaml deleted file mode 100644 index 5134b5eef979..000000000000 --- a/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestListTables-variables.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -STORAGE_ENDPOINT_SUFFIX: core.windows.net -TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== -TABLES_STORAGE_ACCOUNT_NAME: seankaneprim -randomSeed: "1626796893" diff --git a/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestListTables.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestListTables.yaml deleted file mode 100644 index e95cb124c90e..000000000000 --- a/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestListTables.yaml +++ /dev/null @@ -1,713 +0,0 @@ ---- -version: 1 -interactions: -- request: - body: "" - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Tue, 20 Jul 2021 16:01:33 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/Tables - method: GET - response: - body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#Tables","value":[{"TableName":"gotable1v1a7j87nvs5o"},{"TableName":"gotable5jq3v0tq94aql0"},{"TableName":"gotable5jq3v0tq94aql1"},{"TableName":"gotable5jq3v0tq94aql2"},{"TableName":"gotable5jq3v0tq94aql3"},{"TableName":"gotable5jq3v0tq94aql4"},{"TableName":"gotablekyd305p8fhn460"},{"TableName":"gotablekyd305p8fhn461"},{"TableName":"gotablekyd305p8fhn462"},{"TableName":"gotablekyd305p8fhn463"},{"TableName":"gotablekyd305p8fhn464"}]}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - Date: - - Tue, 20 Jul 2021 16:01:33 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - dbf5925b-d002-0079-7380-7d1451000000 - X-Ms-Version: - - "2019-02-02" - status: 200 OK - code: 200 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Tue, 20 Jul 2021 16:01:34 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/Tables('gotable1v1a7j87nvs5o') - method: DELETE - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Date: - - Tue, 20 Jul 2021 16:01:33 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - dbf592d4-d002-0079-6580-7d1451000000 - X-Ms-Version: - - "2019-02-02" - status: 204 No Content - code: 204 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Tue, 20 Jul 2021 16:01:34 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/Tables('gotable5jq3v0tq94aql0') - method: DELETE - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Date: - - Tue, 20 Jul 2021 16:01:33 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - dbf59332-d002-0079-3f80-7d1451000000 - X-Ms-Version: - - "2019-02-02" - status: 204 No Content - code: 204 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Tue, 20 Jul 2021 16:01:34 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/Tables('gotable5jq3v0tq94aql1') - method: DELETE - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Date: - - Tue, 20 Jul 2021 16:01:33 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - dbf59365-d002-0079-7280-7d1451000000 - X-Ms-Version: - - "2019-02-02" - status: 204 No Content - code: 204 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Tue, 20 Jul 2021 16:01:34 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/Tables('gotable5jq3v0tq94aql2') - method: DELETE - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Date: - - Tue, 20 Jul 2021 16:01:34 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - dbf59394-d002-0079-2080-7d1451000000 - X-Ms-Version: - - "2019-02-02" - status: 204 No Content - code: 204 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Tue, 20 Jul 2021 16:01:34 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/Tables('gotable5jq3v0tq94aql3') - method: DELETE - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Date: - - Tue, 20 Jul 2021 16:01:34 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - dbf593f1-d002-0079-7a80-7d1451000000 - X-Ms-Version: - - "2019-02-02" - status: 204 No Content - code: 204 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Tue, 20 Jul 2021 16:01:34 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/Tables('gotable5jq3v0tq94aql4') - method: DELETE - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Date: - - Tue, 20 Jul 2021 16:01:34 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - dbf59437-d002-0079-3f80-7d1451000000 - X-Ms-Version: - - "2019-02-02" - status: 204 No Content - code: 204 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Tue, 20 Jul 2021 16:01:35 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/Tables('gotablekyd305p8fhn460') - method: DELETE - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Date: - - Tue, 20 Jul 2021 16:01:34 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - dbf59477-d002-0079-7e80-7d1451000000 - X-Ms-Version: - - "2019-02-02" - status: 204 No Content - code: 204 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Tue, 20 Jul 2021 16:01:35 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/Tables('gotablekyd305p8fhn461') - method: DELETE - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Date: - - Tue, 20 Jul 2021 16:01:34 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - dbf594b1-d002-0079-3780-7d1451000000 - X-Ms-Version: - - "2019-02-02" - status: 204 No Content - code: 204 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Tue, 20 Jul 2021 16:01:35 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/Tables('gotablekyd305p8fhn462') - method: DELETE - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Date: - - Tue, 20 Jul 2021 16:01:34 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - dbf594e9-d002-0079-6f80-7d1451000000 - X-Ms-Version: - - "2019-02-02" - status: 204 No Content - code: 204 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Tue, 20 Jul 2021 16:01:35 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/Tables('gotablekyd305p8fhn463') - method: DELETE - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Date: - - Tue, 20 Jul 2021 16:01:34 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - dbf5952d-d002-0079-3180-7d1451000000 - X-Ms-Version: - - "2019-02-02" - status: 204 No Content - code: 204 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Tue, 20 Jul 2021 16:01:35 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/Tables('gotablekyd305p8fhn464') - method: DELETE - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Date: - - Tue, 20 Jul 2021 16:01:34 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - dbf59575-d002-0079-7480-7d1451000000 - X-Ms-Version: - - "2019-02-02" - status: 204 No Content - code: 204 - duration: "" -- request: - body: '{"TableName":"gotablebyhusoz3ewumo0"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "37" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Tue, 20 Jul 2021 16:01:35 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/Tables - method: POST - response: - body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotablebyhusoz3ewumo0"}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - Date: - - Tue, 20 Jul 2021 16:01:34 GMT - Location: - - https://seankaneprim.table.core.windows.net/Tables('gotablebyhusoz3ewumo0') - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - dbf595ad-d002-0079-2980-7d1451000000 - X-Ms-Version: - - "2019-02-02" - status: 201 Created - code: 201 - duration: "" -- request: - body: '{"TableName":"gotablebyhusoz3ewumo1"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "37" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Tue, 20 Jul 2021 16:01:35 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/Tables - method: POST - response: - body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotablebyhusoz3ewumo1"}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - Date: - - Tue, 20 Jul 2021 16:01:35 GMT - Location: - - https://seankaneprim.table.core.windows.net/Tables('gotablebyhusoz3ewumo1') - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - dbf595fa-d002-0079-7280-7d1451000000 - X-Ms-Version: - - "2019-02-02" - status: 201 Created - code: 201 - duration: "" -- request: - body: '{"TableName":"gotablebyhusoz3ewumo2"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "37" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Tue, 20 Jul 2021 16:01:35 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/Tables - method: POST - response: - body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotablebyhusoz3ewumo2"}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - Date: - - Tue, 20 Jul 2021 16:01:35 GMT - Location: - - https://seankaneprim.table.core.windows.net/Tables('gotablebyhusoz3ewumo2') - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - dbf5963a-d002-0079-2e80-7d1451000000 - X-Ms-Version: - - "2019-02-02" - status: 201 Created - code: 201 - duration: "" -- request: - body: '{"TableName":"gotablebyhusoz3ewumo3"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "37" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Tue, 20 Jul 2021 16:01:35 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/Tables - method: POST - response: - body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotablebyhusoz3ewumo3"}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - Date: - - Tue, 20 Jul 2021 16:01:35 GMT - Location: - - https://seankaneprim.table.core.windows.net/Tables('gotablebyhusoz3ewumo3') - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - dbf59673-d002-0079-6580-7d1451000000 - X-Ms-Version: - - "2019-02-02" - status: 201 Created - code: 201 - duration: "" -- request: - body: '{"TableName":"gotablebyhusoz3ewumo4"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "37" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Tue, 20 Jul 2021 16:01:35 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/Tables - method: POST - response: - body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotablebyhusoz3ewumo4"}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - Date: - - Tue, 20 Jul 2021 16:01:35 GMT - Location: - - https://seankaneprim.table.core.windows.net/Tables('gotablebyhusoz3ewumo4') - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - dbf596a6-d002-0079-1780-7d1451000000 - X-Ms-Version: - - "2019-02-02" - status: 201 Created - code: 201 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Tue, 20 Jul 2021 16:01:36 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/Tables - method: GET - response: - body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#Tables","value":[{"TableName":"gotablebyhusoz3ewumo0"},{"TableName":"gotablebyhusoz3ewumo1"},{"TableName":"gotablebyhusoz3ewumo2"},{"TableName":"gotablebyhusoz3ewumo3"},{"TableName":"gotablebyhusoz3ewumo4"}]}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - Date: - - Tue, 20 Jul 2021 16:01:35 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - dbf596db-d002-0079-4980-7d1451000000 - X-Ms-Version: - - "2019-02-02" - status: 200 OK - code: 200 - duration: "" diff --git a/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestQueryTable-variables.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestQueryTable-variables.yaml deleted file mode 100644 index 9b7c965397f6..000000000000 --- a/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestQueryTable-variables.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -STORAGE_ENDPOINT_SUFFIX: core.windows.net -TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== -TABLES_STORAGE_ACCOUNT_NAME: chrisstablesprim -randomSeed: "1617573291" diff --git a/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestQueryTable.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestQueryTable.yaml deleted file mode 100644 index 2431a475cb56..000000000000 --- a/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestQueryTable.yaml +++ /dev/null @@ -1,532 +0,0 @@ ---- -version: 1 -interactions: -- request: - body: '{"TableName":"zzzap06y44pq0dcqyefd"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "36" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; - Windows_NT) - X-Ms-Date: - - Sun, 04 Apr 2021 21:54:51 GMT - X-Ms-Version: - - "2019-02-02" - url: https://chrisstablesprim.table.core.windows.net/Tables - method: POST - response: - body: '{"odata.metadata":"https://chrisstablesprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"zzzap06y44pq0dcqyefd"}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - Date: - - Sun, 04 Apr 2021 21:54:51 GMT - Location: - - https://chrisstablesprim.table.core.windows.net/Tables('zzzap06y44pq0dcqyefd') - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - aa171c98-c002-0053-539d-291720000000 - X-Ms-Version: - - "2019-02-02" - status: 201 Created - code: 201 - duration: "" -- request: - body: '{"TableName":"zzzas5q9cqk9i1o44v25"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "36" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; - Windows_NT) - X-Ms-Date: - - Sun, 04 Apr 2021 21:54:52 GMT - X-Ms-Version: - - "2019-02-02" - url: https://chrisstablesprim.table.core.windows.net/Tables - method: POST - response: - body: '{"odata.metadata":"https://chrisstablesprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"zzzas5q9cqk9i1o44v25"}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - Date: - - Sun, 04 Apr 2021 21:54:51 GMT - Location: - - https://chrisstablesprim.table.core.windows.net/Tables('zzzas5q9cqk9i1o44v25') - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - aa171ca1-c002-0053-5b9d-291720000000 - X-Ms-Version: - - "2019-02-02" - status: 201 Created - code: 201 - duration: "" -- request: - body: '{"TableName":"zzzavphdrg4ipo7z4boc"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "36" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; - Windows_NT) - X-Ms-Date: - - Sun, 04 Apr 2021 21:54:52 GMT - X-Ms-Version: - - "2019-02-02" - url: https://chrisstablesprim.table.core.windows.net/Tables - method: POST - response: - body: '{"odata.metadata":"https://chrisstablesprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"zzzavphdrg4ipo7z4boc"}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - Date: - - Sun, 04 Apr 2021 21:54:51 GMT - Location: - - https://chrisstablesprim.table.core.windows.net/Tables('zzzavphdrg4ipo7z4boc') - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - aa171ca9-c002-0053-629d-291720000000 - X-Ms-Version: - - "2019-02-02" - status: 201 Created - code: 201 - duration: "" -- request: - body: '{"TableName":"zzzanoa2c4lxhmr55w1n"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "36" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; - Windows_NT) - X-Ms-Date: - - Sun, 04 Apr 2021 21:54:52 GMT - X-Ms-Version: - - "2019-02-02" - url: https://chrisstablesprim.table.core.windows.net/Tables - method: POST - response: - body: '{"odata.metadata":"https://chrisstablesprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"zzzanoa2c4lxhmr55w1n"}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - Date: - - Sun, 04 Apr 2021 21:54:51 GMT - Location: - - https://chrisstablesprim.table.core.windows.net/Tables('zzzanoa2c4lxhmr55w1n') - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - aa171cb5-c002-0053-6c9d-291720000000 - X-Ms-Version: - - "2019-02-02" - status: 201 Created - code: 201 - duration: "" -- request: - body: '{"TableName":"zzzbq0ics0v4b1nbyytz"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "36" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; - Windows_NT) - X-Ms-Date: - - Sun, 04 Apr 2021 21:54:52 GMT - X-Ms-Version: - - "2019-02-02" - url: https://chrisstablesprim.table.core.windows.net/Tables - method: POST - response: - body: '{"odata.metadata":"https://chrisstablesprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"zzzbq0ics0v4b1nbyytz"}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - Date: - - Sun, 04 Apr 2021 21:54:51 GMT - Location: - - https://chrisstablesprim.table.core.windows.net/Tables('zzzbq0ics0v4b1nbyytz') - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - aa171cbe-c002-0053-739d-291720000000 - X-Ms-Version: - - "2019-02-02" - status: 201 Created - code: 201 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; - Windows_NT) - X-Ms-Date: - - Sun, 04 Apr 2021 21:54:52 GMT - X-Ms-Version: - - "2019-02-02" - url: https://chrisstablesprim.table.core.windows.net/Tables?%24filter=TableName+ge+%27zzza%27+and+TableName+lt+%27zzzb%27 - method: GET - response: - body: '{"odata.metadata":"https://chrisstablesprim.table.core.windows.net/$metadata#Tables","value":[{"TableName":"zzzanoa2c4lxhmr55w1n"},{"TableName":"zzzap06y44pq0dcqyefd"},{"TableName":"zzzas5q9cqk9i1o44v25"},{"TableName":"zzzavphdrg4ipo7z4boc"}]}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - Date: - - Sun, 04 Apr 2021 21:54:51 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - aa171ccc-c002-0053-7f9d-291720000000 - X-Ms-Version: - - "2019-02-02" - status: 200 OK - code: 200 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; - Windows_NT) - X-Ms-Date: - - Sun, 04 Apr 2021 21:54:52 GMT - X-Ms-Version: - - "2019-02-02" - url: https://chrisstablesprim.table.core.windows.net/Tables?%24filter=TableName+ge+%27zzza%27+and+TableName+lt+%27zzzb%27&%24top=2 - method: GET - response: - body: '{"odata.metadata":"https://chrisstablesprim.table.core.windows.net/$metadata#Tables","value":[{"TableName":"zzzanoa2c4lxhmr55w1n"},{"TableName":"zzzap06y44pq0dcqyefd"}]}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - Date: - - Sun, 04 Apr 2021 21:54:51 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Continuation-Nexttablename: - - 1!52!enp6YXM1cTljcWs5aTFvNDR2MjUBMDFkNzI5OWQyM2U4NjU2Yw-- - X-Ms-Request-Id: - - aa171ce3-c002-0053-159d-291720000000 - X-Ms-Version: - - "2019-02-02" - status: 200 OK - code: 200 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; - Windows_NT) - X-Ms-Date: - - Sun, 04 Apr 2021 21:54:52 GMT - X-Ms-Version: - - "2019-02-02" - url: https://chrisstablesprim.table.core.windows.net/Tables?%24filter=TableName+ge+%27zzza%27+and+TableName+lt+%27zzzb%27&%24top=2&NextTableName=1%2152%21enp6YXM1cTljcWs5aTFvNDR2MjUBMDFkNzI5OWQyM2U4NjU2Yw-- - method: GET - response: - body: '{"odata.metadata":"https://chrisstablesprim.table.core.windows.net/$metadata#Tables","value":[{"TableName":"zzzas5q9cqk9i1o44v25"},{"TableName":"zzzavphdrg4ipo7z4boc"}]}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - Date: - - Sun, 04 Apr 2021 21:54:51 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - aa171cf4-c002-0053-269d-291720000000 - X-Ms-Version: - - "2019-02-02" - status: 200 OK - code: 200 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; - Windows_NT) - X-Ms-Date: - - Sun, 04 Apr 2021 21:54:52 GMT - X-Ms-Version: - - "2019-02-02" - url: https://chrisstablesprim.table.core.windows.net/Tables('zzzap06y44pq0dcqyefd') - method: DELETE - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Date: - - Sun, 04 Apr 2021 21:54:52 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - aa171d07-c002-0053-369d-291720000000 - X-Ms-Version: - - "2019-02-02" - status: 204 No Content - code: 204 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; - Windows_NT) - X-Ms-Date: - - Sun, 04 Apr 2021 21:54:52 GMT - X-Ms-Version: - - "2019-02-02" - url: https://chrisstablesprim.table.core.windows.net/Tables('zzzas5q9cqk9i1o44v25') - method: DELETE - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Date: - - Sun, 04 Apr 2021 21:54:52 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - aa171d16-c002-0053-459d-291720000000 - X-Ms-Version: - - "2019-02-02" - status: 204 No Content - code: 204 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; - Windows_NT) - X-Ms-Date: - - Sun, 04 Apr 2021 21:54:52 GMT - X-Ms-Version: - - "2019-02-02" - url: https://chrisstablesprim.table.core.windows.net/Tables('zzzavphdrg4ipo7z4boc') - method: DELETE - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Date: - - Sun, 04 Apr 2021 21:54:52 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - aa171d2a-c002-0053-599d-291720000000 - X-Ms-Version: - - "2019-02-02" - status: 204 No Content - code: 204 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; - Windows_NT) - X-Ms-Date: - - Sun, 04 Apr 2021 21:54:52 GMT - X-Ms-Version: - - "2019-02-02" - url: https://chrisstablesprim.table.core.windows.net/Tables('zzzanoa2c4lxhmr55w1n') - method: DELETE - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Date: - - Sun, 04 Apr 2021 21:54:52 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - aa171d3d-c002-0053-6c9d-291720000000 - X-Ms-Version: - - "2019-02-02" - status: 204 No Content - code: 204 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; - Windows_NT) - X-Ms-Date: - - Sun, 04 Apr 2021 21:54:53 GMT - X-Ms-Version: - - "2019-02-02" - url: https://chrisstablesprim.table.core.windows.net/Tables('zzzbq0ics0v4b1nbyytz') - method: DELETE - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Date: - - Sun, 04 Apr 2021 21:54:52 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - aa171d51-c002-0053-7d9d-291720000000 - X-Ms-Version: - - "2019-02-02" - status: 204 No Content - code: 204 - duration: "" diff --git a/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestRetentionTooLong-variables.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestRetentionTooLong-variables.yaml deleted file mode 100644 index 57d67241a73e..000000000000 --- a/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestRetentionTooLong-variables.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -STORAGE_ENDPOINT_SUFFIX: core.windows.net -TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== -TABLES_STORAGE_ACCOUNT_NAME: seankaneprim diff --git a/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestRetentionTooLong.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestRetentionTooLong.yaml deleted file mode 100644 index 2f20077eaa17..000000000000 --- a/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestRetentionTooLong.yaml +++ /dev/null @@ -1,47 +0,0 @@ ---- -version: 1 -interactions: -- request: - body: truetruetrue3661.0 - form: {} - headers: - Accept: - - application/xml - Authorization: - - sanitized - Content-Length: - - "234" - Content-Type: - - application/xml - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Wed, 21 Jul 2021 18:51:15 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/?comp=properties&restype=service - method: PUT - response: - body: |- - InvalidXmlDocumentXML specified is not syntactically valid. - RequestId:3ef1f362-6002-00a7-5261-7e00b7000000 - Time:2021-07-21T18:51:16.5818083Z - headers: - Content-Length: - - "327" - Content-Type: - - application/xml - Date: - - Wed, 21 Jul 2021 18:51:15 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Ms-Error-Code: - - InvalidXmlDocument - X-Ms-Request-Id: - - 3ef1f362-6002-00a7-5261-7e00b7000000 - X-Ms-Version: - - "2019-02-02" - status: 400 XML specified is not syntactically valid. - code: 400 - duration: "" diff --git a/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestServiceErrors-variables.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestServiceErrors-variables.yaml deleted file mode 100644 index 3f5acca6cabc..000000000000 --- a/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestServiceErrors-variables.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -STORAGE_ENDPOINT_SUFFIX: core.windows.net -TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== -TABLES_STORAGE_ACCOUNT_NAME: chrisstablesprim -randomSeed: "1617573550" diff --git a/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestServiceErrors.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestServiceErrors.yaml deleted file mode 100644 index 55b918ae4d98..000000000000 --- a/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestServiceErrors.yaml +++ /dev/null @@ -1,129 +0,0 @@ ---- -version: 1 -interactions: -- request: - body: '{"TableName":"gotable5hickrxl8lpbo"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "36" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; - Windows_NT) - X-Ms-Date: - - Sun, 04 Apr 2021 21:59:10 GMT - X-Ms-Version: - - "2019-02-02" - url: https://chrisstablesprim.table.core.windows.net/Tables - method: POST - response: - body: '{"odata.metadata":"https://chrisstablesprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotable5hickrxl8lpbo"}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - Date: - - Sun, 04 Apr 2021 21:59:09 GMT - Location: - - https://chrisstablesprim.table.core.windows.net/Tables('gotable5hickrxl8lpbo') - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - a5bfa352-3002-0057-209d-299a27000000 - X-Ms-Version: - - "2019-02-02" - status: 201 Created - code: 201 - duration: "" -- request: - body: '{"TableName":"gotable5hickrxl8lpbo"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "36" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; - Windows_NT) - X-Ms-Date: - - Sun, 04 Apr 2021 21:59:10 GMT - X-Ms-Version: - - "2019-02-02" - url: https://chrisstablesprim.table.core.windows.net/Tables - method: POST - response: - body: '{"odata.error":{"code":"TableAlreadyExists","message":{"lang":"en-US","value":"The - table specified already exists.\nRequestId:a5bfa358-3002-0057-259d-299a27000000\nTime:2021-04-04T21:59:10.6883876Z"}}}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - Date: - - Sun, 04 Apr 2021 21:59:10 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - a5bfa358-3002-0057-259d-299a27000000 - X-Ms-Version: - - "2019-02-02" - status: 409 Conflict - code: 409 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; - Windows_NT) - X-Ms-Date: - - Sun, 04 Apr 2021 21:59:10 GMT - X-Ms-Version: - - "2019-02-02" - url: https://chrisstablesprim.table.core.windows.net/Tables('gotable5hickrxl8lpbo') - method: DELETE - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Date: - - Sun, 04 Apr 2021 21:59:10 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - a5bfa35c-3002-0057-299d-299a27000000 - X-Ms-Version: - - "2019-02-02" - status: 204 No Content - code: 204 - duration: "" diff --git a/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetCors-variables.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetCors-variables.yaml deleted file mode 100644 index 57d67241a73e..000000000000 --- a/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetCors-variables.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -STORAGE_ENDPOINT_SUFFIX: core.windows.net -TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== -TABLES_STORAGE_ACCOUNT_NAME: seankaneprim diff --git a/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetCors.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetCors.yaml deleted file mode 100644 index 5dac8cff5084..000000000000 --- a/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetCors.yaml +++ /dev/null @@ -1,73 +0,0 @@ ---- -version: 1 -interactions: -- request: - body: x-ms-meta-data*PUTwww.xyz.comx-ms-meta-source*500 - form: {} - headers: - Accept: - - application/xml - Authorization: - - sanitized - Content-Length: - - "303" - Content-Type: - - application/xml - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Wed, 21 Jul 2021 18:41:41 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/?comp=properties&restype=service - method: PUT - response: - body: "" - headers: - Date: - - Wed, 21 Jul 2021 18:41:42 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Ms-Request-Id: - - 4e9e991e-b002-006f-7560-7ee286000000 - X-Ms-Version: - - "2019-02-02" - status: 202 Accepted - code: 202 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/xml - Authorization: - - sanitized - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Wed, 21 Jul 2021 18:42:27 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/?comp=properties&restype=service - method: GET - response: - body: "\uFEFF\x3C\x3F\x78\x6D\x6C\x20\x76\x65\x72\x73\x69\x6F\x6E\x3D\"\x31\x2E\x30\"\x20\x65\x6E\x63\x6F\x64\x69\x6E\x67\x3D\"\x75\x74\x66\x2D\x38\"\x3F\x3E\x3C\x53\x74\x6F\x72\x61\x67\x65\x53\x65\x72\x76\x69\x63\x65\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x3E\x3C\x4C\x6F\x67\x67\x69\x6E\x67\x3E\x3C\x56\x65\x72\x73\x69\x6F\x6E\x3E\x31\x2E\x30\x3C\x2F\x56\x65\x72\x73\x69\x6F\x6E\x3E\x3C\x52\x65\x61\x64\x3E\x74\x72\x75\x65\x3C\x2F\x52\x65\x61\x64\x3E\x3C\x57\x72\x69\x74\x65\x3E\x74\x72\x75\x65\x3C\x2F\x57\x72\x69\x74\x65\x3E\x3C\x44\x65\x6C\x65\x74\x65\x3E\x74\x72\x75\x65\x3C\x2F\x44\x65\x6C\x65\x74\x65\x3E\x3C\x52\x65\x74\x65\x6E\x74\x69\x6F\x6E\x50\x6F\x6C\x69\x63\x79\x3E\x3C\x45\x6E\x61\x62\x6C\x65\x64\x3E\x74\x72\x75\x65\x3C\x2F\x45\x6E\x61\x62\x6C\x65\x64\x3E\x3C\x44\x61\x79\x73\x3E\x35\x3C\x2F\x44\x61\x79\x73\x3E\x3C\x2F\x52\x65\x74\x65\x6E\x74\x69\x6F\x6E\x50\x6F\x6C\x69\x63\x79\x3E\x3C\x2F\x4C\x6F\x67\x67\x69\x6E\x67\x3E\x3C\x48\x6F\x75\x72\x4D\x65\x74\x72\x69\x63\x73\x3E\x3C\x56\x65\x72\x73\x69\x6F\x6E\x3E\x31\x2E\x30\x3C\x2F\x56\x65\x72\x73\x69\x6F\x6E\x3E\x3C\x45\x6E\x61\x62\x6C\x65\x64\x3E\x74\x72\x75\x65\x3C\x2F\x45\x6E\x61\x62\x6C\x65\x64\x3E\x3C\x49\x6E\x63\x6C\x75\x64\x65\x41\x50\x49\x73\x3E\x74\x72\x75\x65\x3C\x2F\x49\x6E\x63\x6C\x75\x64\x65\x41\x50\x49\x73\x3E\x3C\x52\x65\x74\x65\x6E\x74\x69\x6F\x6E\x50\x6F\x6C\x69\x63\x79\x3E\x3C\x45\x6E\x61\x62\x6C\x65\x64\x3E\x74\x72\x75\x65\x3C\x2F\x45\x6E\x61\x62\x6C\x65\x64\x3E\x3C\x44\x61\x79\x73\x3E\x35\x3C\x2F\x44\x61\x79\x73\x3E\x3C\x2F\x52\x65\x74\x65\x6E\x74\x69\x6F\x6E\x50\x6F\x6C\x69\x63\x79\x3E\x3C\x2F\x48\x6F\x75\x72\x4D\x65\x74\x72\x69\x63\x73\x3E\x3C\x4D\x69\x6E\x75\x74\x65\x4D\x65\x74\x72\x69\x63\x73\x3E\x3C\x56\x65\x72\x73\x69\x6F\x6E\x3E\x31\x2E\x30\x3C\x2F\x56\x65\x72\x73\x69\x6F\x6E\x3E\x3C\x45\x6E\x61\x62\x6C\x65\x64\x3E\x74\x72\x75\x65\x3C\x2F\x45\x6E\x61\x62\x6C\x65\x64\x3E\x3C\x49\x6E\x63\x6C\x75\x64\x65\x41\x50\x49\x73\x3E\x74\x72\x75\x65\x3C\x2F\x49\x6E\x63\x6C\x75\x64\x65\x41\x50\x49\x73\x3E\x3C\x52\x65\x74\x65\x6E\x74\x69\x6F\x6E\x50\x6F\x6C\x69\x63\x79\x3E\x3C\x45\x6E\x61\x62\x6C\x65\x64\x3E\x74\x72\x75\x65\x3C\x2F\x45\x6E\x61\x62\x6C\x65\x64\x3E\x3C\x44\x61\x79\x73\x3E\x35\x3C\x2F\x44\x61\x79\x73\x3E\x3C\x2F\x52\x65\x74\x65\x6E\x74\x69\x6F\x6E\x50\x6F\x6C\x69\x63\x79\x3E\x3C\x2F\x4D\x69\x6E\x75\x74\x65\x4D\x65\x74\x72\x69\x63\x73\x3E\x3C\x43\x6F\x72\x73\x3E\x3C\x43\x6F\x72\x73\x52\x75\x6C\x65\x3E\x3C\x41\x6C\x6C\x6F\x77\x65\x64\x4D\x65\x74\x68\x6F\x64\x73\x3E\x50\x55\x54\x3C\x2F\x41\x6C\x6C\x6F\x77\x65\x64\x4D\x65\x74\x68\x6F\x64\x73\x3E\x3C\x41\x6C\x6C\x6F\x77\x65\x64\x4F\x72\x69\x67\x69\x6E\x73\x3E\x77\x77\x77\x2E\x78\x79\x7A\x2E\x63\x6F\x6D\x3C\x2F\x41\x6C\x6C\x6F\x77\x65\x64\x4F\x72\x69\x67\x69\x6E\x73\x3E\x3C\x41\x6C\x6C\x6F\x77\x65\x64\x48\x65\x61\x64\x65\x72\x73\x3E\x78\x2D\x6D\x73\x2D\x6D\x65\x74\x61\x2D\x64\x61\x74\x61\x2A\x3C\x2F\x41\x6C\x6C\x6F\x77\x65\x64\x48\x65\x61\x64\x65\x72\x73\x3E\x3C\x45\x78\x70\x6F\x73\x65\x64\x48\x65\x61\x64\x65\x72\x73\x3E\x78\x2D\x6D\x73\x2D\x6D\x65\x74\x61\x2D\x73\x6F\x75\x72\x63\x65\x2A\x3C\x2F\x45\x78\x70\x6F\x73\x65\x64\x48\x65\x61\x64\x65\x72\x73\x3E\x3C\x4D\x61\x78\x41\x67\x65\x49\x6E\x53\x65\x63\x6F\x6E\x64\x73\x3E\x35\x30\x30\x3C\x2F\x4D\x61\x78\x41\x67\x65\x49\x6E\x53\x65\x63\x6F\x6E\x64\x73\x3E\x3C\x2F\x43\x6F\x72\x73\x52\x75\x6C\x65\x3E\x3C\x2F\x43\x6F\x72\x73\x3E\x3C\x2F\x53\x74\x6F\x72\x61\x67\x65\x53\x65\x72\x76\x69\x63\x65\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x3E" - headers: - Content-Type: - - application/xml - Date: - - Wed, 21 Jul 2021 18:42:27 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - Vary: - - Origin - X-Ms-Request-Id: - - 4e9f1573-b002-006f-5a60-7ee286000000 - X-Ms-Version: - - "2019-02-02" - status: 200 OK - code: 200 - duration: "" diff --git a/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetHoursMetrics-variables.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetHoursMetrics-variables.yaml deleted file mode 100644 index 57d67241a73e..000000000000 --- a/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetHoursMetrics-variables.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -STORAGE_ENDPOINT_SUFFIX: core.windows.net -TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== -TABLES_STORAGE_ACCOUNT_NAME: seankaneprim diff --git a/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetHoursMetrics.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetHoursMetrics.yaml deleted file mode 100644 index 2145855a36a6..000000000000 --- a/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetHoursMetrics.yaml +++ /dev/null @@ -1,71 +0,0 @@ ---- -version: 1 -interactions: -- request: - body: truetruetrue51.0 - form: {} - headers: - Accept: - - application/xml - Authorization: - - sanitized - Content-Length: - - "228" - Content-Type: - - application/xml - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Wed, 21 Jul 2021 18:28:42 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/?comp=properties&restype=service - method: PUT - response: - body: "" - headers: - Date: - - Wed, 21 Jul 2021 18:28:43 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Ms-Request-Id: - - b3e7e057-f002-0033-575e-7eb7de000000 - X-Ms-Version: - - "2019-02-02" - status: 202 Accepted - code: 202 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/xml - Authorization: - - sanitized - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Wed, 21 Jul 2021 18:29:29 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/?comp=properties&restype=service - method: GET - response: - body: "\uFEFF\x3C\x3F\x78\x6D\x6C\x20\x76\x65\x72\x73\x69\x6F\x6E\x3D\"\x31\x2E\x30\"\x20\x65\x6E\x63\x6F\x64\x69\x6E\x67\x3D\"\x75\x74\x66\x2D\x38\"\x3F\x3E\x3C\x53\x74\x6F\x72\x61\x67\x65\x53\x65\x72\x76\x69\x63\x65\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x3E\x3C\x4C\x6F\x67\x67\x69\x6E\x67\x3E\x3C\x56\x65\x72\x73\x69\x6F\x6E\x3E\x31\x2E\x30\x3C\x2F\x56\x65\x72\x73\x69\x6F\x6E\x3E\x3C\x52\x65\x61\x64\x3E\x74\x72\x75\x65\x3C\x2F\x52\x65\x61\x64\x3E\x3C\x57\x72\x69\x74\x65\x3E\x74\x72\x75\x65\x3C\x2F\x57\x72\x69\x74\x65\x3E\x3C\x44\x65\x6C\x65\x74\x65\x3E\x74\x72\x75\x65\x3C\x2F\x44\x65\x6C\x65\x74\x65\x3E\x3C\x52\x65\x74\x65\x6E\x74\x69\x6F\x6E\x50\x6F\x6C\x69\x63\x79\x3E\x3C\x45\x6E\x61\x62\x6C\x65\x64\x3E\x74\x72\x75\x65\x3C\x2F\x45\x6E\x61\x62\x6C\x65\x64\x3E\x3C\x44\x61\x79\x73\x3E\x35\x3C\x2F\x44\x61\x79\x73\x3E\x3C\x2F\x52\x65\x74\x65\x6E\x74\x69\x6F\x6E\x50\x6F\x6C\x69\x63\x79\x3E\x3C\x2F\x4C\x6F\x67\x67\x69\x6E\x67\x3E\x3C\x48\x6F\x75\x72\x4D\x65\x74\x72\x69\x63\x73\x3E\x3C\x56\x65\x72\x73\x69\x6F\x6E\x3E\x31\x2E\x30\x3C\x2F\x56\x65\x72\x73\x69\x6F\x6E\x3E\x3C\x45\x6E\x61\x62\x6C\x65\x64\x3E\x74\x72\x75\x65\x3C\x2F\x45\x6E\x61\x62\x6C\x65\x64\x3E\x3C\x49\x6E\x63\x6C\x75\x64\x65\x41\x50\x49\x73\x3E\x74\x72\x75\x65\x3C\x2F\x49\x6E\x63\x6C\x75\x64\x65\x41\x50\x49\x73\x3E\x3C\x52\x65\x74\x65\x6E\x74\x69\x6F\x6E\x50\x6F\x6C\x69\x63\x79\x3E\x3C\x45\x6E\x61\x62\x6C\x65\x64\x3E\x74\x72\x75\x65\x3C\x2F\x45\x6E\x61\x62\x6C\x65\x64\x3E\x3C\x44\x61\x79\x73\x3E\x35\x3C\x2F\x44\x61\x79\x73\x3E\x3C\x2F\x52\x65\x74\x65\x6E\x74\x69\x6F\x6E\x50\x6F\x6C\x69\x63\x79\x3E\x3C\x2F\x48\x6F\x75\x72\x4D\x65\x74\x72\x69\x63\x73\x3E\x3C\x4D\x69\x6E\x75\x74\x65\x4D\x65\x74\x72\x69\x63\x73\x3E\x3C\x56\x65\x72\x73\x69\x6F\x6E\x3E\x31\x2E\x30\x3C\x2F\x56\x65\x72\x73\x69\x6F\x6E\x3E\x3C\x45\x6E\x61\x62\x6C\x65\x64\x3E\x74\x72\x75\x65\x3C\x2F\x45\x6E\x61\x62\x6C\x65\x64\x3E\x3C\x49\x6E\x63\x6C\x75\x64\x65\x41\x50\x49\x73\x3E\x74\x72\x75\x65\x3C\x2F\x49\x6E\x63\x6C\x75\x64\x65\x41\x50\x49\x73\x3E\x3C\x52\x65\x74\x65\x6E\x74\x69\x6F\x6E\x50\x6F\x6C\x69\x63\x79\x3E\x3C\x45\x6E\x61\x62\x6C\x65\x64\x3E\x74\x72\x75\x65\x3C\x2F\x45\x6E\x61\x62\x6C\x65\x64\x3E\x3C\x44\x61\x79\x73\x3E\x35\x3C\x2F\x44\x61\x79\x73\x3E\x3C\x2F\x52\x65\x74\x65\x6E\x74\x69\x6F\x6E\x50\x6F\x6C\x69\x63\x79\x3E\x3C\x2F\x4D\x69\x6E\x75\x74\x65\x4D\x65\x74\x72\x69\x63\x73\x3E\x3C\x43\x6F\x72\x73\x20\x2F\x3E\x3C\x2F\x53\x74\x6F\x72\x61\x67\x65\x53\x65\x72\x76\x69\x63\x65\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x3E" - headers: - Content-Type: - - application/xml - Date: - - Wed, 21 Jul 2021 18:29:30 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Ms-Request-Id: - - b3e84299-f002-0033-435e-7eb7de000000 - X-Ms-Version: - - "2019-02-02" - status: 200 OK - code: 200 - duration: "" diff --git a/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetLogging-variables.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetLogging-variables.yaml deleted file mode 100644 index 57d67241a73e..000000000000 --- a/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetLogging-variables.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -STORAGE_ENDPOINT_SUFFIX: core.windows.net -TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== -TABLES_STORAGE_ACCOUNT_NAME: seankaneprim diff --git a/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetLogging.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetLogging.yaml deleted file mode 100644 index dd68a1837ce1..000000000000 --- a/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetLogging.yaml +++ /dev/null @@ -1,71 +0,0 @@ ---- -version: 1 -interactions: -- request: - body: truetruetrue51.0true - form: {} - headers: - Accept: - - application/xml - Authorization: - - sanitized - Content-Length: - - "223" - Content-Type: - - application/xml - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Wed, 21 Jul 2021 18:29:29 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/?comp=properties&restype=service - method: PUT - response: - body: "" - headers: - Date: - - Wed, 21 Jul 2021 18:29:30 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Ms-Request-Id: - - b3e842e4-f002-0033-0b5e-7eb7de000000 - X-Ms-Version: - - "2019-02-02" - status: 202 Accepted - code: 202 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/xml - Authorization: - - sanitized - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Wed, 21 Jul 2021 18:30:15 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/?comp=properties&restype=service - method: GET - response: - body: "\uFEFF\x3C\x3F\x78\x6D\x6C\x20\x76\x65\x72\x73\x69\x6F\x6E\x3D\"\x31\x2E\x30\"\x20\x65\x6E\x63\x6F\x64\x69\x6E\x67\x3D\"\x75\x74\x66\x2D\x38\"\x3F\x3E\x3C\x53\x74\x6F\x72\x61\x67\x65\x53\x65\x72\x76\x69\x63\x65\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x3E\x3C\x4C\x6F\x67\x67\x69\x6E\x67\x3E\x3C\x56\x65\x72\x73\x69\x6F\x6E\x3E\x31\x2E\x30\x3C\x2F\x56\x65\x72\x73\x69\x6F\x6E\x3E\x3C\x52\x65\x61\x64\x3E\x74\x72\x75\x65\x3C\x2F\x52\x65\x61\x64\x3E\x3C\x57\x72\x69\x74\x65\x3E\x74\x72\x75\x65\x3C\x2F\x57\x72\x69\x74\x65\x3E\x3C\x44\x65\x6C\x65\x74\x65\x3E\x74\x72\x75\x65\x3C\x2F\x44\x65\x6C\x65\x74\x65\x3E\x3C\x52\x65\x74\x65\x6E\x74\x69\x6F\x6E\x50\x6F\x6C\x69\x63\x79\x3E\x3C\x45\x6E\x61\x62\x6C\x65\x64\x3E\x74\x72\x75\x65\x3C\x2F\x45\x6E\x61\x62\x6C\x65\x64\x3E\x3C\x44\x61\x79\x73\x3E\x35\x3C\x2F\x44\x61\x79\x73\x3E\x3C\x2F\x52\x65\x74\x65\x6E\x74\x69\x6F\x6E\x50\x6F\x6C\x69\x63\x79\x3E\x3C\x2F\x4C\x6F\x67\x67\x69\x6E\x67\x3E\x3C\x48\x6F\x75\x72\x4D\x65\x74\x72\x69\x63\x73\x3E\x3C\x56\x65\x72\x73\x69\x6F\x6E\x3E\x31\x2E\x30\x3C\x2F\x56\x65\x72\x73\x69\x6F\x6E\x3E\x3C\x45\x6E\x61\x62\x6C\x65\x64\x3E\x74\x72\x75\x65\x3C\x2F\x45\x6E\x61\x62\x6C\x65\x64\x3E\x3C\x49\x6E\x63\x6C\x75\x64\x65\x41\x50\x49\x73\x3E\x74\x72\x75\x65\x3C\x2F\x49\x6E\x63\x6C\x75\x64\x65\x41\x50\x49\x73\x3E\x3C\x52\x65\x74\x65\x6E\x74\x69\x6F\x6E\x50\x6F\x6C\x69\x63\x79\x3E\x3C\x45\x6E\x61\x62\x6C\x65\x64\x3E\x74\x72\x75\x65\x3C\x2F\x45\x6E\x61\x62\x6C\x65\x64\x3E\x3C\x44\x61\x79\x73\x3E\x35\x3C\x2F\x44\x61\x79\x73\x3E\x3C\x2F\x52\x65\x74\x65\x6E\x74\x69\x6F\x6E\x50\x6F\x6C\x69\x63\x79\x3E\x3C\x2F\x48\x6F\x75\x72\x4D\x65\x74\x72\x69\x63\x73\x3E\x3C\x4D\x69\x6E\x75\x74\x65\x4D\x65\x74\x72\x69\x63\x73\x3E\x3C\x56\x65\x72\x73\x69\x6F\x6E\x3E\x31\x2E\x30\x3C\x2F\x56\x65\x72\x73\x69\x6F\x6E\x3E\x3C\x45\x6E\x61\x62\x6C\x65\x64\x3E\x74\x72\x75\x65\x3C\x2F\x45\x6E\x61\x62\x6C\x65\x64\x3E\x3C\x49\x6E\x63\x6C\x75\x64\x65\x41\x50\x49\x73\x3E\x74\x72\x75\x65\x3C\x2F\x49\x6E\x63\x6C\x75\x64\x65\x41\x50\x49\x73\x3E\x3C\x52\x65\x74\x65\x6E\x74\x69\x6F\x6E\x50\x6F\x6C\x69\x63\x79\x3E\x3C\x45\x6E\x61\x62\x6C\x65\x64\x3E\x74\x72\x75\x65\x3C\x2F\x45\x6E\x61\x62\x6C\x65\x64\x3E\x3C\x44\x61\x79\x73\x3E\x35\x3C\x2F\x44\x61\x79\x73\x3E\x3C\x2F\x52\x65\x74\x65\x6E\x74\x69\x6F\x6E\x50\x6F\x6C\x69\x63\x79\x3E\x3C\x2F\x4D\x69\x6E\x75\x74\x65\x4D\x65\x74\x72\x69\x63\x73\x3E\x3C\x43\x6F\x72\x73\x20\x2F\x3E\x3C\x2F\x53\x74\x6F\x72\x61\x67\x65\x53\x65\x72\x76\x69\x63\x65\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x3E" - headers: - Content-Type: - - application/xml - Date: - - Wed, 21 Jul 2021 18:30:15 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Ms-Request-Id: - - b3e89cec-f002-0033-515e-7eb7de000000 - X-Ms-Version: - - "2019-02-02" - status: 200 OK - code: 200 - duration: "" diff --git a/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetMinuteMetrics-variables.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetMinuteMetrics-variables.yaml deleted file mode 100644 index 57d67241a73e..000000000000 --- a/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetMinuteMetrics-variables.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -STORAGE_ENDPOINT_SUFFIX: core.windows.net -TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== -TABLES_STORAGE_ACCOUNT_NAME: seankaneprim diff --git a/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetMinuteMetrics.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetMinuteMetrics.yaml deleted file mode 100644 index c088bcbc6646..000000000000 --- a/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetMinuteMetrics.yaml +++ /dev/null @@ -1,71 +0,0 @@ ---- -version: 1 -interactions: -- request: - body: truetruetrue51.0 - form: {} - headers: - Accept: - - application/xml - Authorization: - - sanitized - Content-Length: - - "232" - Content-Type: - - application/xml - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Wed, 21 Jul 2021 18:30:15 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/?comp=properties&restype=service - method: PUT - response: - body: "" - headers: - Date: - - Wed, 21 Jul 2021 18:30:15 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Ms-Request-Id: - - b3e89d7a-f002-0033-595e-7eb7de000000 - X-Ms-Version: - - "2019-02-02" - status: 202 Accepted - code: 202 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/xml - Authorization: - - sanitized - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Wed, 21 Jul 2021 18:31:00 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/?comp=properties&restype=service - method: GET - response: - body: "\uFEFF\x3C\x3F\x78\x6D\x6C\x20\x76\x65\x72\x73\x69\x6F\x6E\x3D\"\x31\x2E\x30\"\x20\x65\x6E\x63\x6F\x64\x69\x6E\x67\x3D\"\x75\x74\x66\x2D\x38\"\x3F\x3E\x3C\x53\x74\x6F\x72\x61\x67\x65\x53\x65\x72\x76\x69\x63\x65\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x3E\x3C\x4C\x6F\x67\x67\x69\x6E\x67\x3E\x3C\x56\x65\x72\x73\x69\x6F\x6E\x3E\x31\x2E\x30\x3C\x2F\x56\x65\x72\x73\x69\x6F\x6E\x3E\x3C\x52\x65\x61\x64\x3E\x74\x72\x75\x65\x3C\x2F\x52\x65\x61\x64\x3E\x3C\x57\x72\x69\x74\x65\x3E\x74\x72\x75\x65\x3C\x2F\x57\x72\x69\x74\x65\x3E\x3C\x44\x65\x6C\x65\x74\x65\x3E\x74\x72\x75\x65\x3C\x2F\x44\x65\x6C\x65\x74\x65\x3E\x3C\x52\x65\x74\x65\x6E\x74\x69\x6F\x6E\x50\x6F\x6C\x69\x63\x79\x3E\x3C\x45\x6E\x61\x62\x6C\x65\x64\x3E\x74\x72\x75\x65\x3C\x2F\x45\x6E\x61\x62\x6C\x65\x64\x3E\x3C\x44\x61\x79\x73\x3E\x35\x3C\x2F\x44\x61\x79\x73\x3E\x3C\x2F\x52\x65\x74\x65\x6E\x74\x69\x6F\x6E\x50\x6F\x6C\x69\x63\x79\x3E\x3C\x2F\x4C\x6F\x67\x67\x69\x6E\x67\x3E\x3C\x48\x6F\x75\x72\x4D\x65\x74\x72\x69\x63\x73\x3E\x3C\x56\x65\x72\x73\x69\x6F\x6E\x3E\x31\x2E\x30\x3C\x2F\x56\x65\x72\x73\x69\x6F\x6E\x3E\x3C\x45\x6E\x61\x62\x6C\x65\x64\x3E\x74\x72\x75\x65\x3C\x2F\x45\x6E\x61\x62\x6C\x65\x64\x3E\x3C\x49\x6E\x63\x6C\x75\x64\x65\x41\x50\x49\x73\x3E\x74\x72\x75\x65\x3C\x2F\x49\x6E\x63\x6C\x75\x64\x65\x41\x50\x49\x73\x3E\x3C\x52\x65\x74\x65\x6E\x74\x69\x6F\x6E\x50\x6F\x6C\x69\x63\x79\x3E\x3C\x45\x6E\x61\x62\x6C\x65\x64\x3E\x74\x72\x75\x65\x3C\x2F\x45\x6E\x61\x62\x6C\x65\x64\x3E\x3C\x44\x61\x79\x73\x3E\x35\x3C\x2F\x44\x61\x79\x73\x3E\x3C\x2F\x52\x65\x74\x65\x6E\x74\x69\x6F\x6E\x50\x6F\x6C\x69\x63\x79\x3E\x3C\x2F\x48\x6F\x75\x72\x4D\x65\x74\x72\x69\x63\x73\x3E\x3C\x4D\x69\x6E\x75\x74\x65\x4D\x65\x74\x72\x69\x63\x73\x3E\x3C\x56\x65\x72\x73\x69\x6F\x6E\x3E\x31\x2E\x30\x3C\x2F\x56\x65\x72\x73\x69\x6F\x6E\x3E\x3C\x45\x6E\x61\x62\x6C\x65\x64\x3E\x74\x72\x75\x65\x3C\x2F\x45\x6E\x61\x62\x6C\x65\x64\x3E\x3C\x49\x6E\x63\x6C\x75\x64\x65\x41\x50\x49\x73\x3E\x74\x72\x75\x65\x3C\x2F\x49\x6E\x63\x6C\x75\x64\x65\x41\x50\x49\x73\x3E\x3C\x52\x65\x74\x65\x6E\x74\x69\x6F\x6E\x50\x6F\x6C\x69\x63\x79\x3E\x3C\x45\x6E\x61\x62\x6C\x65\x64\x3E\x74\x72\x75\x65\x3C\x2F\x45\x6E\x61\x62\x6C\x65\x64\x3E\x3C\x44\x61\x79\x73\x3E\x35\x3C\x2F\x44\x61\x79\x73\x3E\x3C\x2F\x52\x65\x74\x65\x6E\x74\x69\x6F\x6E\x50\x6F\x6C\x69\x63\x79\x3E\x3C\x2F\x4D\x69\x6E\x75\x74\x65\x4D\x65\x74\x72\x69\x63\x73\x3E\x3C\x43\x6F\x72\x73\x20\x2F\x3E\x3C\x2F\x53\x74\x6F\x72\x61\x67\x65\x53\x65\x72\x76\x69\x63\x65\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x3E" - headers: - Content-Type: - - application/xml - Date: - - Wed, 21 Jul 2021 18:31:01 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Ms-Request-Id: - - b3e8f8da-f002-0033-5c5e-7eb7de000000 - X-Ms-Version: - - "2019-02-02" - status: 200 OK - code: 200 - duration: "" diff --git a/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetProperties-variables.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetProperties-variables.yaml deleted file mode 100644 index 57d67241a73e..000000000000 --- a/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetProperties-variables.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -STORAGE_ENDPOINT_SUFFIX: core.windows.net -TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== -TABLES_STORAGE_ACCOUNT_NAME: seankaneprim diff --git a/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetProperties.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetProperties.yaml deleted file mode 100644 index 51c92a3c9064..000000000000 --- a/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetProperties.yaml +++ /dev/null @@ -1,71 +0,0 @@ ---- -version: 1 -interactions: -- request: - body: truetruefalse1.0true - form: {} - headers: - Accept: - - application/xml - Authorization: - - sanitized - Content-Length: - - "210" - Content-Type: - - application/xml - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Wed, 21 Jul 2021 17:38:34 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/?comp=properties&restype=service - method: PUT - response: - body: "" - headers: - Date: - - Wed, 21 Jul 2021 17:38:35 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Ms-Request-Id: - - 1d06287b-a002-0097-3657-7ebe78000000 - X-Ms-Version: - - "2019-02-02" - status: 202 Accepted - code: 202 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/xml - Authorization: - - sanitized - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Wed, 21 Jul 2021 17:38:35 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/?comp=properties&restype=service - method: GET - response: - body: "\uFEFF\x3C\x3F\x78\x6D\x6C\x20\x76\x65\x72\x73\x69\x6F\x6E\x3D\"\x31\x2E\x30\"\x20\x65\x6E\x63\x6F\x64\x69\x6E\x67\x3D\"\x75\x74\x66\x2D\x38\"\x3F\x3E\x3C\x53\x74\x6F\x72\x61\x67\x65\x53\x65\x72\x76\x69\x63\x65\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x3E\x3C\x4C\x6F\x67\x67\x69\x6E\x67\x3E\x3C\x56\x65\x72\x73\x69\x6F\x6E\x3E\x31\x2E\x30\x3C\x2F\x56\x65\x72\x73\x69\x6F\x6E\x3E\x3C\x52\x65\x61\x64\x3E\x66\x61\x6C\x73\x65\x3C\x2F\x52\x65\x61\x64\x3E\x3C\x57\x72\x69\x74\x65\x3E\x74\x72\x75\x65\x3C\x2F\x57\x72\x69\x74\x65\x3E\x3C\x44\x65\x6C\x65\x74\x65\x3E\x66\x61\x6C\x73\x65\x3C\x2F\x44\x65\x6C\x65\x74\x65\x3E\x3C\x52\x65\x74\x65\x6E\x74\x69\x6F\x6E\x50\x6F\x6C\x69\x63\x79\x3E\x3C\x45\x6E\x61\x62\x6C\x65\x64\x3E\x66\x61\x6C\x73\x65\x3C\x2F\x45\x6E\x61\x62\x6C\x65\x64\x3E\x3C\x2F\x52\x65\x74\x65\x6E\x74\x69\x6F\x6E\x50\x6F\x6C\x69\x63\x79\x3E\x3C\x2F\x4C\x6F\x67\x67\x69\x6E\x67\x3E\x3C\x48\x6F\x75\x72\x4D\x65\x74\x72\x69\x63\x73\x3E\x3C\x56\x65\x72\x73\x69\x6F\x6E\x3E\x31\x2E\x30\x3C\x2F\x56\x65\x72\x73\x69\x6F\x6E\x3E\x3C\x45\x6E\x61\x62\x6C\x65\x64\x3E\x74\x72\x75\x65\x3C\x2F\x45\x6E\x61\x62\x6C\x65\x64\x3E\x3C\x49\x6E\x63\x6C\x75\x64\x65\x41\x50\x49\x73\x3E\x74\x72\x75\x65\x3C\x2F\x49\x6E\x63\x6C\x75\x64\x65\x41\x50\x49\x73\x3E\x3C\x52\x65\x74\x65\x6E\x74\x69\x6F\x6E\x50\x6F\x6C\x69\x63\x79\x3E\x3C\x45\x6E\x61\x62\x6C\x65\x64\x3E\x74\x72\x75\x65\x3C\x2F\x45\x6E\x61\x62\x6C\x65\x64\x3E\x3C\x44\x61\x79\x73\x3E\x37\x3C\x2F\x44\x61\x79\x73\x3E\x3C\x2F\x52\x65\x74\x65\x6E\x74\x69\x6F\x6E\x50\x6F\x6C\x69\x63\x79\x3E\x3C\x2F\x48\x6F\x75\x72\x4D\x65\x74\x72\x69\x63\x73\x3E\x3C\x4D\x69\x6E\x75\x74\x65\x4D\x65\x74\x72\x69\x63\x73\x3E\x3C\x56\x65\x72\x73\x69\x6F\x6E\x3E\x31\x2E\x30\x3C\x2F\x56\x65\x72\x73\x69\x6F\x6E\x3E\x3C\x45\x6E\x61\x62\x6C\x65\x64\x3E\x74\x72\x75\x65\x3C\x2F\x45\x6E\x61\x62\x6C\x65\x64\x3E\x3C\x49\x6E\x63\x6C\x75\x64\x65\x41\x50\x49\x73\x3E\x74\x72\x75\x65\x3C\x2F\x49\x6E\x63\x6C\x75\x64\x65\x41\x50\x49\x73\x3E\x3C\x52\x65\x74\x65\x6E\x74\x69\x6F\x6E\x50\x6F\x6C\x69\x63\x79\x3E\x3C\x45\x6E\x61\x62\x6C\x65\x64\x3E\x74\x72\x75\x65\x3C\x2F\x45\x6E\x61\x62\x6C\x65\x64\x3E\x3C\x44\x61\x79\x73\x3E\x35\x3C\x2F\x44\x61\x79\x73\x3E\x3C\x2F\x52\x65\x74\x65\x6E\x74\x69\x6F\x6E\x50\x6F\x6C\x69\x63\x79\x3E\x3C\x2F\x4D\x69\x6E\x75\x74\x65\x4D\x65\x74\x72\x69\x63\x73\x3E\x3C\x43\x6F\x72\x73\x20\x2F\x3E\x3C\x2F\x53\x74\x6F\x72\x61\x67\x65\x53\x65\x72\x76\x69\x63\x65\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x3E" - headers: - Content-Type: - - application/xml - Date: - - Wed, 21 Jul 2021 17:38:35 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Ms-Request-Id: - - 1d0628fb-a002-0097-2957-7ebe78000000 - X-Ms-Version: - - "2019-02-02" - status: 200 OK - code: 200 - duration: "" diff --git a/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetTooManyCors-variables.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetTooManyCors-variables.yaml deleted file mode 100644 index 57d67241a73e..000000000000 --- a/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetTooManyCors-variables.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -STORAGE_ENDPOINT_SUFFIX: core.windows.net -TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== -TABLES_STORAGE_ACCOUNT_NAME: seankaneprim diff --git a/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetTooManyCors.yaml b/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetTooManyCors.yaml deleted file mode 100644 index 5ba450161551..000000000000 --- a/sdk/tables/aztable/recordings/TestServiceClient_Storage/TestSetTooManyCors.yaml +++ /dev/null @@ -1,47 +0,0 @@ ---- -version: 1 -interactions: -- request: - body: x-ms-meta-data*PUTwww.xyz.comx-ms-meta-source*500x-ms-meta-data*PUTwww.xyz.comx-ms-meta-source*500x-ms-meta-data*PUTwww.xyz.comx-ms-meta-source*500x-ms-meta-data*PUTwww.xyz.comx-ms-meta-source*500x-ms-meta-data*PUTwww.xyz.comx-ms-meta-source*500x-ms-meta-data*PUTwww.xyz.comx-ms-meta-source*500 - form: {} - headers: - Accept: - - application/xml - Authorization: - - sanitized - Content-Length: - - "1488" - Content-Type: - - application/xml - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Wed, 21 Jul 2021 18:46:03 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/?comp=properties&restype=service - method: PUT - response: - body: |- - InvalidXmlDocumentXML specified is not syntactically valid. - RequestId:a3fe73f8-7002-0084-4b60-7e9a74000000 - Time:2021-07-21T18:46:04.7286836Z - headers: - Content-Length: - - "327" - Content-Type: - - application/xml - Date: - - Wed, 21 Jul 2021 18:46:03 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Ms-Error-Code: - - InvalidXmlDocument - X-Ms-Request-Id: - - a3fe73f8-7002-0084-4b60-7e9a74000000 - X-Ms-Version: - - "2019-02-02" - status: 400 XML specified is not syntactically valid. - code: 400 - duration: "" diff --git a/sdk/tables/aztable/recordings/TestServiceErrors/TestServiceErrors_cosmos.json b/sdk/tables/aztable/recordings/TestServiceErrors/TestServiceErrors_cosmos.json new file mode 100644 index 000000000000..027d8453ac18 --- /dev/null +++ b/sdk/tables/aztable/recordings/TestServiceErrors/TestServiceErrors_cosmos.json @@ -0,0 +1,95 @@ +{ + "Entries": [ + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/Tables", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "35", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:46 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "TableName": "tableName1681369605" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "Date": "Mon, 02 Aug 2021 18:01:45 GMT", + "ETag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A45.6436232Z\u0027\u0022", + "Location": "https://seankaneprim.table.cosmos.azure.com/Tables(\u0027tableName1681369605\u0027)", + "Transfer-Encoding": "chunked", + "x-ms-request-id": "130b5d13-e1c7-4b6c-a439-1d3378c9ff17" + }, + "ResponseBody": { + "TableName": "tableName1681369605", + "odata.metadata": "https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/Tables", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "35", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:46 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "TableName": "tableName1681369605" + }, + "StatusCode": 409, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "Date": "Mon, 02 Aug 2021 18:01:46 GMT", + "Transfer-Encoding": "chunked", + "x-ms-request-id": "7ac17dd1-7e8b-4ddd-b0ca-2ef8b7187cb8" + }, + "ResponseBody": [ + "{\u0022odata.error\u0022:{\u0022code\u0022:\u0022TableAlreadyExists\u0022,\u0022message\u0022:{\u0022lang\u0022:\u0022en-us\u0022,\u0022value\u0022:\u0022The specified table already exists.\\nRequestID:7ac17dd1-7e8b-4ddd-b0ca-2ef8b7187cb8\\n\u0022}}}\r\n" + ] + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables(\u0027tableName1681369605\u0027)", + "RequestMethod": "DELETE", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "DELETE", + ":path": "/Tables(\u0027tableName1681369605\u0027)", + ":scheme": "https", + "Accept": "application/json", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:47 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "Date": "Mon, 02 Aug 2021 18:01:46 GMT", + "x-ms-request-id": "13e0e453-d648-4852-a7db-6987f5d5af3e" + }, + "ResponseBody": null + } + ], + "Variables": {} +} \ No newline at end of file diff --git a/sdk/tables/aztable/recordings/TestServiceErrors/TestServiceErrors_storage.json b/sdk/tables/aztable/recordings/TestServiceErrors/TestServiceErrors_storage.json new file mode 100644 index 000000000000..2f36fc18b9c1 --- /dev/null +++ b/sdk/tables/aztable/recordings/TestServiceErrors/TestServiceErrors_storage.json @@ -0,0 +1,122 @@ +{ + "Entries": [ + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/Tables", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "35", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:45 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "TableName": "tableName1969384182" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", + "Date": "Mon, 02 Aug 2021 18:01:44 GMT", + "Location": "https://seankaneprim.table.core.windows.net/Tables(\u0027tableName1969384182\u0027)", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b541f-9002-0057-25c8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": { + "odata.metadata": "https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element", + "TableName": "tableName1969384182" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/Tables", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "35", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:45 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "TableName": "tableName1969384182" + }, + "StatusCode": 409, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", + "Date": "Mon, 02 Aug 2021 18:01:44 GMT", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b5447-9002-0057-4ac8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": { + "odata.error": { + "code": "TableAlreadyExists", + "message": { + "lang": "en-US", + "value": "The table specified already exists.\nRequestId:a05b5447-9002-0057-4ac8-874646000000\nTime:2021-08-02T18:01:45.1460223Z" + } + } + } + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables(\u0027tableName1969384182\u0027)", + "RequestMethod": "DELETE", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "DELETE", + ":path": "/Tables(\u0027tableName1969384182\u0027)", + ":scheme": "https", + "Accept": "application/json", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:45 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "0", + "Date": "Mon, 02 Aug 2021 18:01:44 GMT", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b546e-9002-0057-70c8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": null + } + ], + "Variables": {} +} \ No newline at end of file diff --git a/sdk/tables/aztable/recordings/TestServiceErrorsServiceClient/TestServiceErrorsServiceClient_cosmos.json b/sdk/tables/aztable/recordings/TestServiceErrorsServiceClient/TestServiceErrorsServiceClient_cosmos.json new file mode 100644 index 000000000000..4637eb292845 --- /dev/null +++ b/sdk/tables/aztable/recordings/TestServiceErrorsServiceClient/TestServiceErrorsServiceClient_cosmos.json @@ -0,0 +1,95 @@ +{ + "Entries": [ + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/Tables", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "25", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:10 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "TableName": "tableName" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "Date": "Mon, 02 Aug 2021 18:02:09 GMT", + "ETag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A09.7852424Z\u0027\u0022", + "Location": "https://seankaneprim.table.cosmos.azure.com/Tables(\u0027tableName\u0027)", + "Transfer-Encoding": "chunked", + "x-ms-request-id": "e9d25d08-5ac8-4fc1-b3b2-cf1901b7f95d" + }, + "ResponseBody": { + "TableName": "tableName", + "odata.metadata": "https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/Tables", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "25", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:10 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "TableName": "tableName" + }, + "StatusCode": 409, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "Date": "Mon, 02 Aug 2021 18:02:10 GMT", + "Transfer-Encoding": "chunked", + "x-ms-request-id": "9385f1ff-3d0f-4a34-a196-072200111488" + }, + "ResponseBody": [ + "{\u0022odata.error\u0022:{\u0022code\u0022:\u0022TableAlreadyExists\u0022,\u0022message\u0022:{\u0022lang\u0022:\u0022en-us\u0022,\u0022value\u0022:\u0022The specified table already exists.\\nRequestID:9385f1ff-3d0f-4a34-a196-072200111488\\n\u0022}}}\r\n" + ] + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables(\u0027tableName\u0027)", + "RequestMethod": "DELETE", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "DELETE", + ":path": "/Tables(\u0027tableName\u0027)", + ":scheme": "https", + "Accept": "application/json", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:11 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "Date": "Mon, 02 Aug 2021 18:02:10 GMT", + "x-ms-request-id": "fed9ae14-6c81-4721-bca1-7b7e6200d6a0" + }, + "ResponseBody": null + } + ], + "Variables": {} +} \ No newline at end of file diff --git a/sdk/tables/aztable/recordings/TestServiceErrorsServiceClient/TestServiceErrorsServiceClient_storage.json b/sdk/tables/aztable/recordings/TestServiceErrorsServiceClient/TestServiceErrorsServiceClient_storage.json new file mode 100644 index 000000000000..2c5f52d3ba04 --- /dev/null +++ b/sdk/tables/aztable/recordings/TestServiceErrorsServiceClient/TestServiceErrorsServiceClient_storage.json @@ -0,0 +1,122 @@ +{ + "Entries": [ + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/Tables", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "25", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:09 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "TableName": "tableName" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", + "Date": "Mon, 02 Aug 2021 18:02:08 GMT", + "Location": "https://seankaneprim.table.core.windows.net/Tables(\u0027tableName\u0027)", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b709e-9002-0057-70c8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": { + "odata.metadata": "https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element", + "TableName": "tableName" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/Tables", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "25", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:09 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "TableName": "tableName" + }, + "StatusCode": 409, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", + "Date": "Mon, 02 Aug 2021 18:02:08 GMT", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b710e-9002-0057-59c8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": { + "odata.error": { + "code": "TableAlreadyExists", + "message": { + "lang": "en-US", + "value": "The table specified already exists.\nRequestId:a05b710e-9002-0057-59c8-874646000000\nTime:2021-08-02T18:02:09.2879995Z" + } + } + } + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables(\u0027tableName\u0027)", + "RequestMethod": "DELETE", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "DELETE", + ":path": "/Tables(\u0027tableName\u0027)", + ":scheme": "https", + "Accept": "application/json", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:10 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "0", + "Date": "Mon, 02 Aug 2021 18:02:08 GMT", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b7145-9002-0057-0cc8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": null + } + ], + "Variables": {} +} \ No newline at end of file diff --git a/sdk/tables/aztable/recordings/TestSetAccessPolicy.json b/sdk/tables/aztable/recordings/TestSetAccessPolicy.json new file mode 100644 index 000000000000..24d6311fd2a6 --- /dev/null +++ b/sdk/tables/aztable/recordings/TestSetAccessPolicy.json @@ -0,0 +1,108 @@ +{ + "Entries": [ + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/Tables", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "35", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:32 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "TableName": "tableName4016778387" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", + "Date": "Mon, 02 Aug 2021 18:01:30 GMT", + "Location": "https://seankaneprim.table.core.windows.net/Tables(\u0027tableName4016778387\u0027)", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b3ee2-9002-0057-37c8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": { + "odata.metadata": "https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element", + "TableName": "tableName4016778387" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/tableName4016778387?comp=acl", + "RequestMethod": "PUT", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "PUT", + ":path": "/tableName4016778387?comp=acl", + ":scheme": "https", + "Accept": "application/xml", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "213", + "Content-Type": "application/xml", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:32 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": "\u003CSignedIdentifiers\u003E\u003CSignedIdentifier\u003E\u003CAccessPolicy\u003E\u003CPermission\u003Er\u003C/Permission\u003E\u003CExpiry\u003E2024-01-01T00:00:00Z\u003C/Expiry\u003E\u003CStart\u003E2020-01-01T00:00:00Z\u003C/Start\u003E\u003C/AccessPolicy\u003E\u003CId\u003E1\u003C/Id\u003E\u003C/SignedIdentifier\u003E\u003C/SignedIdentifiers\u003E", + "StatusCode": 204, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 02 Aug 2021 18:01:31 GMT", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": "a05b3f2c-9002-0057-5bc8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables(\u0027tableName4016778387\u0027)", + "RequestMethod": "DELETE", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "DELETE", + ":path": "/Tables(\u0027tableName4016778387\u0027)", + ":scheme": "https", + "Accept": "application/json", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:32 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "0", + "Date": "Mon, 02 Aug 2021 18:01:31 GMT", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b3f69-9002-0057-7cc8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": null + } + ], + "Variables": {} +} \ No newline at end of file diff --git a/sdk/tables/aztable/recordings/TestSetCors.json b/sdk/tables/aztable/recordings/TestSetCors.json new file mode 100644 index 000000000000..547cf7635e67 --- /dev/null +++ b/sdk/tables/aztable/recordings/TestSetCors.json @@ -0,0 +1,67 @@ +{ + "Entries": [ + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/?comp=properties\u0026restype=service", + "RequestMethod": "PUT", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "PUT", + ":path": "/?comp=properties\u0026restype=service", + ":scheme": "https", + "Accept": "application/xml", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "303", + "Content-Type": "application/xml", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:04:51 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": "\u003CStorageServiceProperties\u003E\u003CCors\u003E\u003CCorsRule\u003E\u003CAllowedHeaders\u003Ex-ms-meta-data*\u003C/AllowedHeaders\u003E\u003CAllowedMethods\u003EPUT\u003C/AllowedMethods\u003E\u003CAllowedOrigins\u003Ewww.xyz.com\u003C/AllowedOrigins\u003E\u003CExposedHeaders\u003Ex-ms-meta-source*\u003C/ExposedHeaders\u003E\u003CMaxAgeInSeconds\u003E500\u003C/MaxAgeInSeconds\u003E\u003C/CorsRule\u003E\u003C/Cors\u003E\u003C/StorageServiceProperties\u003E", + "StatusCode": 202, + "ResponseHeaders": { + "Date": "Mon, 02 Aug 2021 18:04:50 GMT", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "x-ms-request-id": "a05c1f5e-9002-0057-67c8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/?comp=properties\u0026restype=service", + "RequestMethod": "GET", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "GET", + ":path": "/?comp=properties\u0026restype=service", + ":scheme": "https", + "Accept": "application/xml", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:05:36 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/xml", + "Date": "Mon, 02 Aug 2021 18:05:35 GMT", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "Vary": "Origin", + "x-ms-request-id": "a05c59dd-9002-0057-2cc8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": "\uFEFF\u003C?xml version=\u00221.0\u0022 encoding=\u0022utf-8\u0022?\u003E\u003CStorageServiceProperties\u003E\u003CLogging\u003E\u003CVersion\u003E1.0\u003C/Version\u003E\u003CRead\u003Etrue\u003C/Read\u003E\u003CWrite\u003Etrue\u003C/Write\u003E\u003CDelete\u003Etrue\u003C/Delete\u003E\u003CRetentionPolicy\u003E\u003CEnabled\u003Etrue\u003C/Enabled\u003E\u003CDays\u003E5\u003C/Days\u003E\u003C/RetentionPolicy\u003E\u003C/Logging\u003E\u003CHourMetrics\u003E\u003CVersion\u003E1.0\u003C/Version\u003E\u003CEnabled\u003Etrue\u003C/Enabled\u003E\u003CIncludeAPIs\u003Etrue\u003C/IncludeAPIs\u003E\u003CRetentionPolicy\u003E\u003CEnabled\u003Etrue\u003C/Enabled\u003E\u003CDays\u003E5\u003C/Days\u003E\u003C/RetentionPolicy\u003E\u003C/HourMetrics\u003E\u003CMinuteMetrics\u003E\u003CVersion\u003E1.0\u003C/Version\u003E\u003CEnabled\u003Etrue\u003C/Enabled\u003E\u003CIncludeAPIs\u003Etrue\u003C/IncludeAPIs\u003E\u003CRetentionPolicy\u003E\u003CEnabled\u003Etrue\u003C/Enabled\u003E\u003CDays\u003E5\u003C/Days\u003E\u003C/RetentionPolicy\u003E\u003C/MinuteMetrics\u003E\u003CCors\u003E\u003CCorsRule\u003E\u003CAllowedMethods\u003EPUT\u003C/AllowedMethods\u003E\u003CAllowedOrigins\u003Ewww.xyz.com\u003C/AllowedOrigins\u003E\u003CAllowedHeaders\u003Ex-ms-meta-data*\u003C/AllowedHeaders\u003E\u003CExposedHeaders\u003Ex-ms-meta-source*\u003C/ExposedHeaders\u003E\u003CMaxAgeInSeconds\u003E500\u003C/MaxAgeInSeconds\u003E\u003C/CorsRule\u003E\u003C/Cors\u003E\u003C/StorageServiceProperties\u003E" + } + ], + "Variables": {} +} \ No newline at end of file diff --git a/sdk/tables/aztable/recordings/TestSetEmptyAccessPolicy.json b/sdk/tables/aztable/recordings/TestSetEmptyAccessPolicy.json new file mode 100644 index 000000000000..b9a315608fb3 --- /dev/null +++ b/sdk/tables/aztable/recordings/TestSetEmptyAccessPolicy.json @@ -0,0 +1,107 @@ +{ + "Entries": [ + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/Tables", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "35", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:31 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "TableName": "tableName1201868612" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", + "Date": "Mon, 02 Aug 2021 18:01:30 GMT", + "Location": "https://seankaneprim.table.core.windows.net/Tables(\u0027tableName1201868612\u0027)", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b3d54-9002-0057-54c8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": { + "odata.metadata": "https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element", + "TableName": "tableName1201868612" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/tableName1201868612?comp=acl", + "RequestMethod": "PUT", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "PUT", + ":path": "/tableName1201868612?comp=acl", + ":scheme": "https", + "Accept": "application/xml", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:31 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 02 Aug 2021 18:01:30 GMT", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": "a05b3dd1-9002-0057-1fc8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables(\u0027tableName1201868612\u0027)", + "RequestMethod": "DELETE", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "DELETE", + ":path": "/Tables(\u0027tableName1201868612\u0027)", + ":scheme": "https", + "Accept": "application/json", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:32 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "0", + "Date": "Mon, 02 Aug 2021 18:01:30 GMT", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b3e6b-9002-0057-79c8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": null + } + ], + "Variables": {} +} \ No newline at end of file diff --git a/sdk/tables/aztable/recordings/TestSetHoursMetrics.json b/sdk/tables/aztable/recordings/TestSetHoursMetrics.json new file mode 100644 index 000000000000..58cab9af2246 --- /dev/null +++ b/sdk/tables/aztable/recordings/TestSetHoursMetrics.json @@ -0,0 +1,67 @@ +{ + "Entries": [ + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/?comp=properties\u0026restype=service", + "RequestMethod": "PUT", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "PUT", + ":path": "/?comp=properties\u0026restype=service", + ":scheme": "https", + "Accept": "application/xml", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "228", + "Content-Type": "application/xml", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:03:19 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": "\u003CStorageServiceProperties\u003E\u003CHourMetrics\u003E\u003CEnabled\u003Etrue\u003C/Enabled\u003E\u003CIncludeAPIs\u003Etrue\u003C/IncludeAPIs\u003E\u003CRetentionPolicy\u003E\u003CEnabled\u003Etrue\u003C/Enabled\u003E\u003CDays\u003E5\u003C/Days\u003E\u003C/RetentionPolicy\u003E\u003CVersion\u003E1.0\u003C/Version\u003E\u003C/HourMetrics\u003E\u003C/StorageServiceProperties\u003E", + "StatusCode": 202, + "ResponseHeaders": { + "Date": "Mon, 02 Aug 2021 18:03:18 GMT", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "x-ms-request-id": "a05bbaea-9002-0057-3fc8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/?comp=properties\u0026restype=service", + "RequestMethod": "GET", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "GET", + ":path": "/?comp=properties\u0026restype=service", + ":scheme": "https", + "Accept": "application/xml", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:04:04 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/xml", + "Date": "Mon, 02 Aug 2021 18:04:03 GMT", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "Vary": "Origin", + "x-ms-request-id": "a05be517-9002-0057-3dc8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": "\uFEFF\u003C?xml version=\u00221.0\u0022 encoding=\u0022utf-8\u0022?\u003E\u003CStorageServiceProperties\u003E\u003CLogging\u003E\u003CVersion\u003E1.0\u003C/Version\u003E\u003CRead\u003Etrue\u003C/Read\u003E\u003CWrite\u003Etrue\u003C/Write\u003E\u003CDelete\u003Etrue\u003C/Delete\u003E\u003CRetentionPolicy\u003E\u003CEnabled\u003Etrue\u003C/Enabled\u003E\u003CDays\u003E5\u003C/Days\u003E\u003C/RetentionPolicy\u003E\u003C/Logging\u003E\u003CHourMetrics\u003E\u003CVersion\u003E1.0\u003C/Version\u003E\u003CEnabled\u003Etrue\u003C/Enabled\u003E\u003CIncludeAPIs\u003Etrue\u003C/IncludeAPIs\u003E\u003CRetentionPolicy\u003E\u003CEnabled\u003Etrue\u003C/Enabled\u003E\u003CDays\u003E5\u003C/Days\u003E\u003C/RetentionPolicy\u003E\u003C/HourMetrics\u003E\u003CMinuteMetrics\u003E\u003CVersion\u003E1.0\u003C/Version\u003E\u003CEnabled\u003Etrue\u003C/Enabled\u003E\u003CIncludeAPIs\u003Etrue\u003C/IncludeAPIs\u003E\u003CRetentionPolicy\u003E\u003CEnabled\u003Etrue\u003C/Enabled\u003E\u003CDays\u003E5\u003C/Days\u003E\u003C/RetentionPolicy\u003E\u003C/MinuteMetrics\u003E\u003CCors\u003E\u003CCorsRule\u003E\u003CAllowedMethods\u003EPUT\u003C/AllowedMethods\u003E\u003CAllowedOrigins\u003Ewww.xyz.com\u003C/AllowedOrigins\u003E\u003CAllowedHeaders\u003Ex-ms-meta-data*\u003C/AllowedHeaders\u003E\u003CExposedHeaders\u003Ex-ms-meta-source*\u003C/ExposedHeaders\u003E\u003CMaxAgeInSeconds\u003E500\u003C/MaxAgeInSeconds\u003E\u003C/CorsRule\u003E\u003C/Cors\u003E\u003C/StorageServiceProperties\u003E" + } + ], + "Variables": {} +} \ No newline at end of file diff --git a/sdk/tables/aztable/recordings/TestSetLogging.json b/sdk/tables/aztable/recordings/TestSetLogging.json new file mode 100644 index 000000000000..5d90ec0bed4c --- /dev/null +++ b/sdk/tables/aztable/recordings/TestSetLogging.json @@ -0,0 +1,67 @@ +{ + "Entries": [ + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/?comp=properties\u0026restype=service", + "RequestMethod": "PUT", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "PUT", + ":path": "/?comp=properties\u0026restype=service", + ":scheme": "https", + "Accept": "application/xml", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "223", + "Content-Type": "application/xml", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:33 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": "\u003CStorageServiceProperties\u003E\u003CLogging\u003E\u003CDelete\u003Etrue\u003C/Delete\u003E\u003CRead\u003Etrue\u003C/Read\u003E\u003CRetentionPolicy\u003E\u003CEnabled\u003Etrue\u003C/Enabled\u003E\u003CDays\u003E5\u003C/Days\u003E\u003C/RetentionPolicy\u003E\u003CVersion\u003E1.0\u003C/Version\u003E\u003CWrite\u003Etrue\u003C/Write\u003E\u003C/Logging\u003E\u003C/StorageServiceProperties\u003E", + "StatusCode": 202, + "ResponseHeaders": { + "Date": "Mon, 02 Aug 2021 18:02:32 GMT", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "x-ms-request-id": "a05b8be4-9002-0057-72c8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/?comp=properties\u0026restype=service", + "RequestMethod": "GET", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "GET", + ":path": "/?comp=properties\u0026restype=service", + ":scheme": "https", + "Accept": "application/xml", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:03:18 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/xml", + "Date": "Mon, 02 Aug 2021 18:03:17 GMT", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "Vary": "Origin", + "x-ms-request-id": "a05bba51-9002-0057-3cc8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": "\uFEFF\u003C?xml version=\u00221.0\u0022 encoding=\u0022utf-8\u0022?\u003E\u003CStorageServiceProperties\u003E\u003CLogging\u003E\u003CVersion\u003E1.0\u003C/Version\u003E\u003CRead\u003Etrue\u003C/Read\u003E\u003CWrite\u003Etrue\u003C/Write\u003E\u003CDelete\u003Etrue\u003C/Delete\u003E\u003CRetentionPolicy\u003E\u003CEnabled\u003Etrue\u003C/Enabled\u003E\u003CDays\u003E5\u003C/Days\u003E\u003C/RetentionPolicy\u003E\u003C/Logging\u003E\u003CHourMetrics\u003E\u003CVersion\u003E1.0\u003C/Version\u003E\u003CEnabled\u003Etrue\u003C/Enabled\u003E\u003CIncludeAPIs\u003Etrue\u003C/IncludeAPIs\u003E\u003CRetentionPolicy\u003E\u003CEnabled\u003Etrue\u003C/Enabled\u003E\u003CDays\u003E5\u003C/Days\u003E\u003C/RetentionPolicy\u003E\u003C/HourMetrics\u003E\u003CMinuteMetrics\u003E\u003CVersion\u003E1.0\u003C/Version\u003E\u003CEnabled\u003Etrue\u003C/Enabled\u003E\u003CIncludeAPIs\u003Etrue\u003C/IncludeAPIs\u003E\u003CRetentionPolicy\u003E\u003CEnabled\u003Etrue\u003C/Enabled\u003E\u003CDays\u003E5\u003C/Days\u003E\u003C/RetentionPolicy\u003E\u003C/MinuteMetrics\u003E\u003CCors\u003E\u003CCorsRule\u003E\u003CAllowedMethods\u003EPUT\u003C/AllowedMethods\u003E\u003CAllowedOrigins\u003Ewww.xyz.com\u003C/AllowedOrigins\u003E\u003CAllowedHeaders\u003Ex-ms-meta-data*\u003C/AllowedHeaders\u003E\u003CExposedHeaders\u003Ex-ms-meta-source*\u003C/ExposedHeaders\u003E\u003CMaxAgeInSeconds\u003E500\u003C/MaxAgeInSeconds\u003E\u003C/CorsRule\u003E\u003C/Cors\u003E\u003C/StorageServiceProperties\u003E" + } + ], + "Variables": {} +} \ No newline at end of file diff --git a/sdk/tables/aztable/recordings/TestSetMinuteMetrics.json b/sdk/tables/aztable/recordings/TestSetMinuteMetrics.json new file mode 100644 index 000000000000..2f1c1943a016 --- /dev/null +++ b/sdk/tables/aztable/recordings/TestSetMinuteMetrics.json @@ -0,0 +1,67 @@ +{ + "Entries": [ + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/?comp=properties\u0026restype=service", + "RequestMethod": "PUT", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "PUT", + ":path": "/?comp=properties\u0026restype=service", + ":scheme": "https", + "Accept": "application/xml", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "232", + "Content-Type": "application/xml", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:04:05 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": "\u003CStorageServiceProperties\u003E\u003CMinuteMetrics\u003E\u003CEnabled\u003Etrue\u003C/Enabled\u003E\u003CIncludeAPIs\u003Etrue\u003C/IncludeAPIs\u003E\u003CRetentionPolicy\u003E\u003CEnabled\u003Etrue\u003C/Enabled\u003E\u003CDays\u003E5\u003C/Days\u003E\u003C/RetentionPolicy\u003E\u003CVersion\u003E1.0\u003C/Version\u003E\u003C/MinuteMetrics\u003E\u003C/StorageServiceProperties\u003E", + "StatusCode": 202, + "ResponseHeaders": { + "Date": "Mon, 02 Aug 2021 18:04:03 GMT", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "x-ms-request-id": "a05be62c-9002-0057-48c8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/?comp=properties\u0026restype=service", + "RequestMethod": "GET", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "GET", + ":path": "/?comp=properties\u0026restype=service", + ":scheme": "https", + "Accept": "application/xml", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:04:50 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/xml", + "Date": "Mon, 02 Aug 2021 18:04:50 GMT", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "Vary": "Origin", + "x-ms-request-id": "a05c1e81-9002-0057-1cc8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": "\uFEFF\u003C?xml version=\u00221.0\u0022 encoding=\u0022utf-8\u0022?\u003E\u003CStorageServiceProperties\u003E\u003CLogging\u003E\u003CVersion\u003E1.0\u003C/Version\u003E\u003CRead\u003Etrue\u003C/Read\u003E\u003CWrite\u003Etrue\u003C/Write\u003E\u003CDelete\u003Etrue\u003C/Delete\u003E\u003CRetentionPolicy\u003E\u003CEnabled\u003Etrue\u003C/Enabled\u003E\u003CDays\u003E5\u003C/Days\u003E\u003C/RetentionPolicy\u003E\u003C/Logging\u003E\u003CHourMetrics\u003E\u003CVersion\u003E1.0\u003C/Version\u003E\u003CEnabled\u003Etrue\u003C/Enabled\u003E\u003CIncludeAPIs\u003Etrue\u003C/IncludeAPIs\u003E\u003CRetentionPolicy\u003E\u003CEnabled\u003Etrue\u003C/Enabled\u003E\u003CDays\u003E5\u003C/Days\u003E\u003C/RetentionPolicy\u003E\u003C/HourMetrics\u003E\u003CMinuteMetrics\u003E\u003CVersion\u003E1.0\u003C/Version\u003E\u003CEnabled\u003Etrue\u003C/Enabled\u003E\u003CIncludeAPIs\u003Etrue\u003C/IncludeAPIs\u003E\u003CRetentionPolicy\u003E\u003CEnabled\u003Etrue\u003C/Enabled\u003E\u003CDays\u003E5\u003C/Days\u003E\u003C/RetentionPolicy\u003E\u003C/MinuteMetrics\u003E\u003CCors\u003E\u003CCorsRule\u003E\u003CAllowedMethods\u003EPUT\u003C/AllowedMethods\u003E\u003CAllowedOrigins\u003Ewww.xyz.com\u003C/AllowedOrigins\u003E\u003CAllowedHeaders\u003Ex-ms-meta-data*\u003C/AllowedHeaders\u003E\u003CExposedHeaders\u003Ex-ms-meta-source*\u003C/ExposedHeaders\u003E\u003CMaxAgeInSeconds\u003E500\u003C/MaxAgeInSeconds\u003E\u003C/CorsRule\u003E\u003C/Cors\u003E\u003C/StorageServiceProperties\u003E" + } + ], + "Variables": {} +} \ No newline at end of file diff --git a/sdk/tables/aztable/recordings/TestSetMultipleAccessPolicies.json b/sdk/tables/aztable/recordings/TestSetMultipleAccessPolicies.json new file mode 100644 index 000000000000..a72683f7c9f7 --- /dev/null +++ b/sdk/tables/aztable/recordings/TestSetMultipleAccessPolicies.json @@ -0,0 +1,139 @@ +{ + "Entries": [ + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/Tables", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "34", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:32 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "TableName": "tableName507237871" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", + "Date": "Mon, 02 Aug 2021 18:01:31 GMT", + "Location": "https://seankaneprim.table.core.windows.net/Tables(\u0027tableName507237871\u0027)", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b3fc0-9002-0057-29c8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": { + "odata.metadata": "https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element", + "TableName": "tableName507237871" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/tableName507237871?comp=acl", + "RequestMethod": "PUT", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "PUT", + ":path": "/tableName507237871?comp=acl", + ":scheme": "https", + "Accept": "application/xml", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "375", + "Content-Type": "application/xml", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:32 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": "\u003CSignedIdentifiers\u003E\u003CSignedIdentifier\u003E\u003CId\u003Eempty\u003C/Id\u003E\u003C/SignedIdentifier\u003E\u003CSignedIdentifier\u003E\u003CAccessPolicy\u003E\u003CPermission\u003Er\u003C/Permission\u003E\u003C/AccessPolicy\u003E\u003CId\u003Epartial\u003C/Id\u003E\u003C/SignedIdentifier\u003E\u003CSignedIdentifier\u003E\u003CAccessPolicy\u003E\u003CPermission\u003Er\u003C/Permission\u003E\u003CExpiry\u003E2021-06-08T02:10:09Z\u003C/Expiry\u003E\u003CStart\u003E2021-06-08T02:10:09Z\u003C/Start\u003E\u003C/AccessPolicy\u003E\u003CId\u003Efull\u003C/Id\u003E\u003C/SignedIdentifier\u003E\u003C/SignedIdentifiers\u003E", + "StatusCode": 204, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 02 Aug 2021 18:01:31 GMT", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": "a05b4016-9002-0057-5dc8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/tableName507237871?comp=acl", + "RequestMethod": "GET", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "GET", + ":path": "/tableName507237871?comp=acl", + ":scheme": "https", + "Accept": "application/xml", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:33 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/xml", + "Date": "Mon, 02 Aug 2021 18:01:31 GMT", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "Vary": "Origin", + "x-ms-request-id": "a05b408b-9002-0057-20c8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": "\uFEFF\u003C?xml version=\u00221.0\u0022 encoding=\u0022utf-8\u0022?\u003E\u003CSignedIdentifiers\u003E\u003CSignedIdentifier\u003E\u003CId\u003Eempty\u003C/Id\u003E\u003C/SignedIdentifier\u003E\u003CSignedIdentifier\u003E\u003CId\u003Epartial\u003C/Id\u003E\u003CAccessPolicy\u003E\u003CPermission\u003Er\u003C/Permission\u003E\u003C/AccessPolicy\u003E\u003C/SignedIdentifier\u003E\u003CSignedIdentifier\u003E\u003CId\u003Efull\u003C/Id\u003E\u003CAccessPolicy\u003E\u003CStart\u003E2021-06-08T02:10:09.0000000Z\u003C/Start\u003E\u003CExpiry\u003E2021-06-08T02:10:09.0000000Z\u003C/Expiry\u003E\u003CPermission\u003Er\u003C/Permission\u003E\u003C/AccessPolicy\u003E\u003C/SignedIdentifier\u003E\u003C/SignedIdentifiers\u003E" + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables(\u0027tableName507237871\u0027)", + "RequestMethod": "DELETE", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "DELETE", + ":path": "/Tables(\u0027tableName507237871\u0027)", + ":scheme": "https", + "Accept": "application/json", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:33 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "0", + "Date": "Mon, 02 Aug 2021 18:01:31 GMT", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b4123-9002-0057-71c8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": null + } + ], + "Variables": {} +} \ No newline at end of file diff --git a/sdk/tables/aztable/recordings/TestSetNullAccessPolicy.json b/sdk/tables/aztable/recordings/TestSetNullAccessPolicy.json new file mode 100644 index 000000000000..31b1ca6e700b --- /dev/null +++ b/sdk/tables/aztable/recordings/TestSetNullAccessPolicy.json @@ -0,0 +1,139 @@ +{ + "Entries": [ + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/Tables", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "34", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:33 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "TableName": "tableName592901018" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", + "Date": "Mon, 02 Aug 2021 18:01:32 GMT", + "Location": "https://seankaneprim.table.core.windows.net/Tables(\u0027tableName592901018\u0027)", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b427d-9002-0057-22c8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": { + "odata.metadata": "https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element", + "TableName": "tableName592901018" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/tableName592901018?comp=acl", + "RequestMethod": "PUT", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "PUT", + ":path": "/tableName592901018?comp=acl", + ":scheme": "https", + "Accept": "application/xml", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "89", + "Content-Type": "application/xml", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:34 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": "\u003CSignedIdentifiers\u003E\u003CSignedIdentifier\u003E\u003CId\u003Enull\u003C/Id\u003E\u003C/SignedIdentifier\u003E\u003C/SignedIdentifiers\u003E", + "StatusCode": 204, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Mon, 02 Aug 2021 18:01:32 GMT", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-request-id": "a05b42d7-9002-0057-51c8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/tableName592901018?comp=acl", + "RequestMethod": "GET", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "GET", + ":path": "/tableName592901018?comp=acl", + ":scheme": "https", + "Accept": "application/xml", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:34 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/xml", + "Date": "Mon, 02 Aug 2021 18:01:32 GMT", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "Vary": "Origin", + "x-ms-request-id": "a05b4384-9002-0057-28c8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": "\uFEFF\u003C?xml version=\u00221.0\u0022 encoding=\u0022utf-8\u0022?\u003E\u003CSignedIdentifiers\u003E\u003CSignedIdentifier\u003E\u003CId\u003Enull\u003C/Id\u003E\u003C/SignedIdentifier\u003E\u003C/SignedIdentifiers\u003E" + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables(\u0027tableName592901018\u0027)", + "RequestMethod": "DELETE", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "DELETE", + ":path": "/Tables(\u0027tableName592901018\u0027)", + ":scheme": "https", + "Accept": "application/json", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:34 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "0", + "Date": "Mon, 02 Aug 2021 18:01:33 GMT", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b43e0-9002-0057-58c8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": null + } + ], + "Variables": {} +} \ No newline at end of file diff --git a/sdk/tables/aztable/recordings/TestSetTooManyAccessPolicies.json b/sdk/tables/aztable/recordings/TestSetTooManyAccessPolicies.json new file mode 100644 index 000000000000..5a9701884c01 --- /dev/null +++ b/sdk/tables/aztable/recordings/TestSetTooManyAccessPolicies.json @@ -0,0 +1,114 @@ +{ + "Entries": [ + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/Tables", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "35", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:33 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "TableName": "tableName1429617116" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", + "Date": "Mon, 02 Aug 2021 18:01:32 GMT", + "Location": "https://seankaneprim.table.core.windows.net/Tables(\u0027tableName1429617116\u0027)", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b41a0-9002-0057-32c8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": { + "odata.metadata": "https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element", + "TableName": "tableName1429617116" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/tableName1429617116?comp=acl", + "RequestMethod": "PUT", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "PUT", + ":path": "/tableName1429617116?comp=acl", + ":scheme": "https", + "Accept": "application/xml", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "1083", + "Content-Type": "application/xml", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:33 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": "\u003CSignedIdentifiers\u003E\u003CSignedIdentifier\u003E\u003CAccessPolicy\u003E\u003CPermission\u003Er\u003C/Permission\u003E\u003CExpiry\u003E2029-01-01T00:00:00Z\u003C/Expiry\u003E\u003CStart\u003E2020-01-01T00:00:00Z\u003C/Start\u003E\u003C/AccessPolicy\u003E\u003CId\u003E5\u003C/Id\u003E\u003C/SignedIdentifier\u003E\u003CSignedIdentifier\u003E\u003CAccessPolicy\u003E\u003CPermission\u003Er\u003C/Permission\u003E\u003CExpiry\u003E2029-01-01T00:00:00Z\u003C/Expiry\u003E\u003CStart\u003E2020-01-01T00:00:00Z\u003C/Start\u003E\u003C/AccessPolicy\u003E\u003CId\u003E5\u003C/Id\u003E\u003C/SignedIdentifier\u003E\u003CSignedIdentifier\u003E\u003CAccessPolicy\u003E\u003CPermission\u003Er\u003C/Permission\u003E\u003CExpiry\u003E2029-01-01T00:00:00Z\u003C/Expiry\u003E\u003CStart\u003E2020-01-01T00:00:00Z\u003C/Start\u003E\u003C/AccessPolicy\u003E\u003CId\u003E5\u003C/Id\u003E\u003C/SignedIdentifier\u003E\u003CSignedIdentifier\u003E\u003CAccessPolicy\u003E\u003CPermission\u003Er\u003C/Permission\u003E\u003CExpiry\u003E2029-01-01T00:00:00Z\u003C/Expiry\u003E\u003CStart\u003E2020-01-01T00:00:00Z\u003C/Start\u003E\u003C/AccessPolicy\u003E\u003CId\u003E5\u003C/Id\u003E\u003C/SignedIdentifier\u003E\u003CSignedIdentifier\u003E\u003CAccessPolicy\u003E\u003CPermission\u003Er\u003C/Permission\u003E\u003CExpiry\u003E2029-01-01T00:00:00Z\u003C/Expiry\u003E\u003CStart\u003E2020-01-01T00:00:00Z\u003C/Start\u003E\u003C/AccessPolicy\u003E\u003CId\u003E5\u003C/Id\u003E\u003C/SignedIdentifier\u003E\u003CSignedIdentifier\u003E\u003CAccessPolicy\u003E\u003CPermission\u003Er\u003C/Permission\u003E\u003CExpiry\u003E2029-01-01T00:00:00Z\u003C/Expiry\u003E\u003CStart\u003E2020-01-01T00:00:00Z\u003C/Start\u003E\u003C/AccessPolicy\u003E\u003CId\u003E5\u003C/Id\u003E\u003C/SignedIdentifier\u003E\u003C/SignedIdentifiers\u003E", + "StatusCode": 400, + "ResponseHeaders": { + "Content-Length": "327", + "Content-Type": "application/xml", + "Date": "Mon, 02 Aug 2021 18:01:32 GMT", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-error-code": "InvalidXmlDocument", + "x-ms-request-id": "a05b41e1-9002-0057-54c8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": [ + "\u003C?xml version=\u00221.0\u0022 encoding=\u0022utf-8\u0022?\u003E\u003Cm:error xmlns:m=\u0022http://schemas.microsoft.com/ado/2007/08/dataservices/metadata\u0022\u003E\u003Cm:code\u003EInvalidXmlDocument\u003C/m:code\u003E\u003Cm:message xml:lang=\u0022en-US\u0022\u003EXML specified is not syntactically valid.\n", + "RequestId:a05b41e1-9002-0057-54c8-874646000000\n", + "Time:2021-08-02T18:01:32.9924757Z\u003C/m:message\u003E\u003C/m:error\u003E" + ] + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables(\u0027tableName1429617116\u0027)", + "RequestMethod": "DELETE", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "DELETE", + ":path": "/Tables(\u0027tableName1429617116\u0027)", + ":scheme": "https", + "Accept": "application/json", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:33 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "0", + "Date": "Mon, 02 Aug 2021 18:01:32 GMT", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b4231-9002-0057-7dc8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": null + } + ], + "Variables": {} +} \ No newline at end of file diff --git a/sdk/tables/aztable/recordings/TestSetTooManyCors.json b/sdk/tables/aztable/recordings/TestSetTooManyCors.json new file mode 100644 index 000000000000..d067f54a41e6 --- /dev/null +++ b/sdk/tables/aztable/recordings/TestSetTooManyCors.json @@ -0,0 +1,42 @@ +{ + "Entries": [ + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/?comp=properties\u0026restype=service", + "RequestMethod": "PUT", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "PUT", + ":path": "/?comp=properties\u0026restype=service", + ":scheme": "https", + "Accept": "application/xml", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "1488", + "Content-Type": "application/xml", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:05:37 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": "\u003CStorageServiceProperties\u003E\u003CCors\u003E\u003CCorsRule\u003E\u003CAllowedHeaders\u003Ex-ms-meta-data*\u003C/AllowedHeaders\u003E\u003CAllowedMethods\u003EPUT\u003C/AllowedMethods\u003E\u003CAllowedOrigins\u003Ewww.xyz.com\u003C/AllowedOrigins\u003E\u003CExposedHeaders\u003Ex-ms-meta-source*\u003C/ExposedHeaders\u003E\u003CMaxAgeInSeconds\u003E500\u003C/MaxAgeInSeconds\u003E\u003C/CorsRule\u003E\u003CCorsRule\u003E\u003CAllowedHeaders\u003Ex-ms-meta-data*\u003C/AllowedHeaders\u003E\u003CAllowedMethods\u003EPUT\u003C/AllowedMethods\u003E\u003CAllowedOrigins\u003Ewww.xyz.com\u003C/AllowedOrigins\u003E\u003CExposedHeaders\u003Ex-ms-meta-source*\u003C/ExposedHeaders\u003E\u003CMaxAgeInSeconds\u003E500\u003C/MaxAgeInSeconds\u003E\u003C/CorsRule\u003E\u003CCorsRule\u003E\u003CAllowedHeaders\u003Ex-ms-meta-data*\u003C/AllowedHeaders\u003E\u003CAllowedMethods\u003EPUT\u003C/AllowedMethods\u003E\u003CAllowedOrigins\u003Ewww.xyz.com\u003C/AllowedOrigins\u003E\u003CExposedHeaders\u003Ex-ms-meta-source*\u003C/ExposedHeaders\u003E\u003CMaxAgeInSeconds\u003E500\u003C/MaxAgeInSeconds\u003E\u003C/CorsRule\u003E\u003CCorsRule\u003E\u003CAllowedHeaders\u003Ex-ms-meta-data*\u003C/AllowedHeaders\u003E\u003CAllowedMethods\u003EPUT\u003C/AllowedMethods\u003E\u003CAllowedOrigins\u003Ewww.xyz.com\u003C/AllowedOrigins\u003E\u003CExposedHeaders\u003Ex-ms-meta-source*\u003C/ExposedHeaders\u003E\u003CMaxAgeInSeconds\u003E500\u003C/MaxAgeInSeconds\u003E\u003C/CorsRule\u003E\u003CCorsRule\u003E\u003CAllowedHeaders\u003Ex-ms-meta-data*\u003C/AllowedHeaders\u003E\u003CAllowedMethods\u003EPUT\u003C/AllowedMethods\u003E\u003CAllowedOrigins\u003Ewww.xyz.com\u003C/AllowedOrigins\u003E\u003CExposedHeaders\u003Ex-ms-meta-source*\u003C/ExposedHeaders\u003E\u003CMaxAgeInSeconds\u003E500\u003C/MaxAgeInSeconds\u003E\u003C/CorsRule\u003E\u003CCorsRule\u003E\u003CAllowedHeaders\u003Ex-ms-meta-data*\u003C/AllowedHeaders\u003E\u003CAllowedMethods\u003EPUT\u003C/AllowedMethods\u003E\u003CAllowedOrigins\u003Ewww.xyz.com\u003C/AllowedOrigins\u003E\u003CExposedHeaders\u003Ex-ms-meta-source*\u003C/ExposedHeaders\u003E\u003CMaxAgeInSeconds\u003E500\u003C/MaxAgeInSeconds\u003E\u003C/CorsRule\u003E\u003C/Cors\u003E\u003C/StorageServiceProperties\u003E", + "StatusCode": 400, + "ResponseHeaders": { + "Content-Length": "327", + "Content-Type": "application/xml", + "Date": "Mon, 02 Aug 2021 18:05:38 GMT", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-error-code": "InvalidXmlDocument", + "x-ms-request-id": "a05c5d25-9002-0057-40c8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": [ + "\u003C?xml version=\u00221.0\u0022 encoding=\u0022utf-8\u0022?\u003E\u003Cm:error xmlns:m=\u0022http://schemas.microsoft.com/ado/2007/08/dataservices/metadata\u0022\u003E\u003Cm:code\u003EInvalidXmlDocument\u003C/m:code\u003E\u003Cm:message xml:lang=\u0022en-US\u0022\u003EXML specified is not syntactically valid.\n", + "RequestId:a05c5d25-9002-0057-40c8-874646000000\n", + "Time:2021-08-02T18:05:38.1364401Z\u003C/m:message\u003E\u003C/m:error\u003E" + ] + } + ], + "Variables": {} +} \ No newline at end of file diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddBasicEntity-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddBasicEntity-variables.yaml deleted file mode 100644 index 96cebe74a3fc..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddBasicEntity-variables.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com -TABLES_COSMOS_ACCOUNT_NAME: seankaneprim -TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== -randomSeed: "1627334282" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddBasicEntity.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddBasicEntity.yaml deleted file mode 100644 index 3d488093c902..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddBasicEntity.yaml +++ /dev/null @@ -1,174 +0,0 @@ ---- -version: 1 -interactions: -- request: - body: '{"TableName":"gotableamcn20ijkx7u4"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "36" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 21:18:02 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/Tables - method: POST - response: - body: '{"TableName":"gotableamcn20ijkx7u4","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' - headers: - Content-Type: - - application/json;odata=minimalmetadata - Date: - - Mon, 26 Jul 2021 21:18:03 GMT - Etag: - - W/"datetime'2021-07-26T21%3A18%3A04.0339464Z'" - Location: - - https://seankaneprim.table.cosmos.azure.com/Tables('gotableamcn20ijkx7u4') - X-Ms-Request-Id: - - f8d50058-35e2-42b3-8184-eab741185b85 - status: 201 Created - code: 201 - duration: "" -- request: - body: '{"Bool":true,"Integer":10,"PartitionKey":"pk001","RowKey":"rk001","String":"abcdef","Timestamp":"0001-01-01T00:00:00Z"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "119" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - Prefer: - - return-no-content - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 21:18:04 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotableamcn20ijkx7u4 - method: POST - response: - body: "" - headers: - Date: - - Mon, 26 Jul 2021 21:18:04 GMT - Etag: - - W/"datetime'2021-07-26T21%3A18%3A04.7328264Z'" - Location: - - https://seankaneprim.table.cosmos.azure.com/gotableamcn20ijkx7u4(PartitionKey='pk001',RowKey='rk001') - Preference-Applied: - - return-no-content - X-Ms-Request-Id: - - 10192d8b-5f8e-4937-bfe3-edc3aaf141bf - status: 204 No Content - code: 204 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 21:18:04 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotableamcn20ijkx7u4(PartitionKey='pk001',RowKey='rk001') - method: GET - response: - body: '{"odata.metadata":"https://seankaneprim.table.cosmos.azure.com/gotableamcn20ijkx7u4/$metadata#gotableamcn20ijkx7u4/@Element","odata.etag":"W/\"datetime''2021-07-26T21%3A18%3A04.7328264Z''\"","Bool":true,"Integer":10,"PartitionKey":"pk001","RowKey":"rk001","String":"abcdef","Timestamp":"2021-07-26T21:18:04.7328264Z"}' - headers: - Content-Type: - - application/json;odata=minimalmetadata - Date: - - Mon, 26 Jul 2021 21:18:04 GMT - Etag: - - W/"datetime'2021-07-26T21%3A18%3A04.7328264Z'" - X-Ms-Request-Id: - - d21ce88b-42a5-42f6-b690-76ae28f946f8 - status: 200 OK - code: 200 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 21:18:04 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotableamcn20ijkx7u4()?%24filter=PartitionKey+eq+%27pk001%27 - method: GET - response: - body: '{"value":[{"odata.etag":"W/\"datetime''2021-07-26T21%3A18%3A04.7328264Z''\"","Bool":true,"Integer":10,"PartitionKey":"pk001","RowKey":"rk001","String":"abcdef","Timestamp":"2021-07-26T21:18:04.7328264Z"}],"odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#gotableamcn20ijkx7u4"}' - headers: - Content-Type: - - application/json;odata=minimalmetadata - Date: - - Mon, 26 Jul 2021 21:18:04 GMT - X-Ms-Request-Id: - - 07ad4f7a-8845-4566-8d59-fd929100fbc2 - status: 200 OK - code: 200 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 21:18:04 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/Tables('gotableamcn20ijkx7u4') - method: DELETE - response: - body: "" - headers: - Date: - - Mon, 26 Jul 2021 21:18:04 GMT - X-Ms-Request-Id: - - 6f127575-c97c-4047-879a-42873cd8abdf - status: 204 No Content - code: 204 - duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddComplexEntity-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddComplexEntity-variables.yaml deleted file mode 100644 index e574b5c9e034..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddComplexEntity-variables.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com -TABLES_COSMOS_ACCOUNT_NAME: seankaneprim -TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== -randomSeed: "1627334285" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddComplexEntity.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddComplexEntity.yaml deleted file mode 100644 index 7201fe41ff27..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddComplexEntity.yaml +++ /dev/null @@ -1,110 +0,0 @@ ---- -version: 1 -interactions: -- request: - body: '{"TableName":"gotablecvs8l6496wx51"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "36" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 21:18:05 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/Tables - method: POST - response: - body: '{"TableName":"gotablecvs8l6496wx51","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' - headers: - Content-Type: - - application/json;odata=minimalmetadata - Date: - - Mon, 26 Jul 2021 21:18:05 GMT - Etag: - - W/"datetime'2021-07-26T21%3A18%3A05.6182792Z'" - Location: - - https://seankaneprim.table.cosmos.azure.com/Tables('gotablecvs8l6496wx51') - X-Ms-Request-Id: - - 9ad2109a-edb0-41ae-ab54-c42cd11d7e9b - status: 201 Created - code: 201 - duration: "" -- request: - body: '{"Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":1,"PartitionKey":"partition","RowKey":"1","String":"someString","Timestamp":"0001-01-01T00:00:00Z"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "194" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - Prefer: - - return-no-content - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 21:18:06 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotablecvs8l6496wx51 - method: POST - response: - body: "" - headers: - Date: - - Mon, 26 Jul 2021 21:18:05 GMT - Etag: - - W/"datetime'2021-07-26T21%3A18%3A06.3533064Z'" - Location: - - https://seankaneprim.table.cosmos.azure.com/gotablecvs8l6496wx51(PartitionKey='partition',RowKey='1') - Preference-Applied: - - return-no-content - X-Ms-Request-Id: - - 609ee405-b189-4e30-aa56-a821bffa806a - status: 204 No Content - code: 204 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 21:18:06 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/Tables('gotablecvs8l6496wx51') - method: DELETE - response: - body: "" - headers: - Date: - - Mon, 26 Jul 2021 21:18:06 GMT - X-Ms-Request-Id: - - 73450a84-9f70-4f79-b08f-170416d3faa1 - status: 204 No Content - code: 204 - duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddEntity-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddEntity-variables.yaml deleted file mode 100644 index 280bddb58661..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddEntity-variables.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com -TABLES_COSMOS_ACCOUNT_NAME: seankaneprim -TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== -randomSeed: "1628004298" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddEntity.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddEntity.yaml deleted file mode 100644 index d435932ce9f8..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestAddEntity.yaml +++ /dev/null @@ -1,111 +0,0 @@ ---- -version: 1 -interactions: -- request: - body: '{"TableName":"gotable8jdoawmoqnmjx"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "36" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Tue, 03 Aug 2021 15:24:58 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/Tables - method: POST - response: - body: '{"TableName":"gotable8jdoawmoqnmjx","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' - headers: - Content-Type: - - application/json;odata=minimalmetadata - Date: - - Tue, 03 Aug 2021 15:24:59 GMT - Etag: - - W/"datetime'2021-08-03T15%3A24%3A58.8577800Z'" - Location: - - https://seankaneprim.table.cosmos.azure.com/Tables('gotable8jdoawmoqnmjx') - X-Ms-Request-Id: - - a30ff87f-cef8-47ce-8c48-ad2346793917 - status: 201 Created - code: 201 - duration: "" -- request: - body: '{"Bool":true,"Integer":1,"PartitionKey":"partition","RowKey":"1","String":"some - string 1","Timestamp":"0001-01-01T00:00:00Z"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "125" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - Prefer: - - return-no-content - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Tue, 03 Aug 2021 15:24:59 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotable8jdoawmoqnmjx - method: POST - response: - body: "" - headers: - Date: - - Tue, 03 Aug 2021 15:24:59 GMT - Etag: - - W/"datetime'2021-08-03T15%3A24%3A59.4564104Z'" - Location: - - https://seankaneprim.table.cosmos.azure.com/gotable8jdoawmoqnmjx(PartitionKey='partition',RowKey='1') - Preference-Applied: - - return-no-content - X-Ms-Request-Id: - - 06beab79-39a9-4993-a968-06d3f136a344 - status: 204 No Content - code: 204 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Tue, 03 Aug 2021 15:25:00 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/Tables('gotable8jdoawmoqnmjx') - method: DELETE - response: - body: "" - headers: - Date: - - Tue, 03 Aug 2021 15:24:59 GMT - X-Ms-Request-Id: - - 6e7e902c-1981-4d2c-ac90-954bd3cc5371 - status: 204 No Content - code: 204 - duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchAdd-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchAdd-variables.yaml deleted file mode 100644 index 1a7cc99f6134..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchAdd-variables.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com -TABLES_COSMOS_ACCOUNT_NAME: seankaneprim -TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== -randomSeed: "1627334287" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchAdd.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchAdd.yaml deleted file mode 100644 index 613b1c504e26..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchAdd.yaml +++ /dev/null @@ -1,216 +0,0 @@ ---- -version: 1 -interactions: -- request: - body: '{"TableName":"gotable4g723xn3ey2gy"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "36" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 21:18:07 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/Tables - method: POST - response: - body: '{"TableName":"gotable4g723xn3ey2gy","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' - headers: - Content-Type: - - application/json;odata=minimalmetadata - Date: - - Mon, 26 Jul 2021 21:18:07 GMT - Etag: - - W/"datetime'2021-07-26T21%3A18%3A08.0795656Z'" - Location: - - https://seankaneprim.table.cosmos.azure.com/Tables('gotable4g723xn3ey2gy') - X-Ms-Request-Id: - - 35d3cb11-3341-44fe-83e1-58c92bdecc81 - status: 201 Created - code: 201 - duration: "" -- request: - body: "--batch_59a4fa67-ab39-4adc-56fa-c1d2d6a236c0\r\nContent-Type: multipart/mixed; - boundary=changeset_73bcc77e-0bf4-45a2-7aa6-abd694bfa6e7\r\n\r\n--changeset_73bcc77e-0bf4-45a2-7aa6-abd694bfa6e7\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotable4g723xn3ey2gy?%24format=application%2Fjson%3Bodata%3Dminimalmetadata - HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 194\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Integer\":1,\"PartitionKey\":\"partition\",\"RowKey\":\"1\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_73bcc77e-0bf4-45a2-7aa6-abd694bfa6e7\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotable4g723xn3ey2gy?%24format=application%2Fjson%3Bodata%3Dminimalmetadata - HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 194\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Integer\":2,\"PartitionKey\":\"partition\",\"RowKey\":\"2\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_73bcc77e-0bf4-45a2-7aa6-abd694bfa6e7\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotable4g723xn3ey2gy?%24format=application%2Fjson%3Bodata%3Dminimalmetadata - HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 194\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Integer\":3,\"PartitionKey\":\"partition\",\"RowKey\":\"3\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_73bcc77e-0bf4-45a2-7aa6-abd694bfa6e7\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotable4g723xn3ey2gy?%24format=application%2Fjson%3Bodata%3Dminimalmetadata - HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 194\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Integer\":4,\"PartitionKey\":\"partition\",\"RowKey\":\"4\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_73bcc77e-0bf4-45a2-7aa6-abd694bfa6e7\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotable4g723xn3ey2gy?%24format=application%2Fjson%3Bodata%3Dminimalmetadata - HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 194\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Integer\":5,\"PartitionKey\":\"partition\",\"RowKey\":\"5\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_73bcc77e-0bf4-45a2-7aa6-abd694bfa6e7\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotable4g723xn3ey2gy?%24format=application%2Fjson%3Bodata%3Dminimalmetadata - HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 194\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Integer\":6,\"PartitionKey\":\"partition\",\"RowKey\":\"6\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_73bcc77e-0bf4-45a2-7aa6-abd694bfa6e7\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotable4g723xn3ey2gy?%24format=application%2Fjson%3Bodata%3Dminimalmetadata - HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 194\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Integer\":7,\"PartitionKey\":\"partition\",\"RowKey\":\"7\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_73bcc77e-0bf4-45a2-7aa6-abd694bfa6e7\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotable4g723xn3ey2gy?%24format=application%2Fjson%3Bodata%3Dminimalmetadata - HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 194\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Integer\":8,\"PartitionKey\":\"partition\",\"RowKey\":\"8\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_73bcc77e-0bf4-45a2-7aa6-abd694bfa6e7\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotable4g723xn3ey2gy?%24format=application%2Fjson%3Bodata%3Dminimalmetadata - HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 194\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Integer\":9,\"PartitionKey\":\"partition\",\"RowKey\":\"9\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_73bcc77e-0bf4-45a2-7aa6-abd694bfa6e7\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotable4g723xn3ey2gy?%24format=application%2Fjson%3Bodata%3Dminimalmetadata - HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 196\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Integer\":10,\"PartitionKey\":\"partition\",\"RowKey\":\"10\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_73bcc77e-0bf4-45a2-7aa6-abd694bfa6e7--\r\n\r\n--batch_59a4fa67-ab39-4adc-56fa-c1d2d6a236c0--\r\n" - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "6550" - Content-Type: - - multipart/mixed; boundary=batch_59a4fa67-ab39-4adc-56fa-c1d2d6a236c0 - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 21:18:08 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/$batch - method: POST - response: - body: "--batchresponse_1ea07688-954d-4b6b-8e4f-511b17442a87\r\nContent-Type: multipart/mixed; - boundary=changesetresponse_98797719-e86b-4e00-b09e-3d74041d2fb5\r\n\r\n--changesetresponse_98797719-e86b-4e00-b09e-3d74041d2fb5\nContent-Type: - application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: - W/\"datetime'2021-07-26T21%3A18%3A08.7137288Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: - https://seankaneprim.table.cosmos.azure.com/gotable4g723xn3ey2gy(PartitionKey='partition',RowKey='1')\r\nContent-ID: - 1\r\n\r\n\r\n--changesetresponse_98797719-e86b-4e00-b09e-3d74041d2fb5\nContent-Type: - application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: - W/\"datetime'2021-07-26T21%3A18%3A08.7143432Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: - https://seankaneprim.table.cosmos.azure.com/gotable4g723xn3ey2gy(PartitionKey='partition',RowKey='2')\r\nContent-ID: - 2\r\n\r\n\r\n--changesetresponse_98797719-e86b-4e00-b09e-3d74041d2fb5\nContent-Type: - application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: - W/\"datetime'2021-07-26T21%3A18%3A08.7147528Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: - https://seankaneprim.table.cosmos.azure.com/gotable4g723xn3ey2gy(PartitionKey='partition',RowKey='3')\r\nContent-ID: - 3\r\n\r\n\r\n--changesetresponse_98797719-e86b-4e00-b09e-3d74041d2fb5\nContent-Type: - application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: - W/\"datetime'2021-07-26T21%3A18%3A08.7152648Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: - https://seankaneprim.table.cosmos.azure.com/gotable4g723xn3ey2gy(PartitionKey='partition',RowKey='4')\r\nContent-ID: - 4\r\n\r\n\r\n--changesetresponse_98797719-e86b-4e00-b09e-3d74041d2fb5\nContent-Type: - application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: - W/\"datetime'2021-07-26T21%3A18%3A08.7155720Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: - https://seankaneprim.table.cosmos.azure.com/gotable4g723xn3ey2gy(PartitionKey='partition',RowKey='5')\r\nContent-ID: - 5\r\n\r\n\r\n--changesetresponse_98797719-e86b-4e00-b09e-3d74041d2fb5\nContent-Type: - application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: - W/\"datetime'2021-07-26T21%3A18%3A08.7159816Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: - https://seankaneprim.table.cosmos.azure.com/gotable4g723xn3ey2gy(PartitionKey='partition',RowKey='6')\r\nContent-ID: - 6\r\n\r\n\r\n--changesetresponse_98797719-e86b-4e00-b09e-3d74041d2fb5\nContent-Type: - application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: - W/\"datetime'2021-07-26T21%3A18%3A08.7163912Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: - https://seankaneprim.table.cosmos.azure.com/gotable4g723xn3ey2gy(PartitionKey='partition',RowKey='7')\r\nContent-ID: - 7\r\n\r\n\r\n--changesetresponse_98797719-e86b-4e00-b09e-3d74041d2fb5\nContent-Type: - application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: - W/\"datetime'2021-07-26T21%3A18%3A08.7166984Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: - https://seankaneprim.table.cosmos.azure.com/gotable4g723xn3ey2gy(PartitionKey='partition',RowKey='8')\r\nContent-ID: - 8\r\n\r\n\r\n--changesetresponse_98797719-e86b-4e00-b09e-3d74041d2fb5\nContent-Type: - application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: - W/\"datetime'2021-07-26T21%3A18%3A08.7171080Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: - https://seankaneprim.table.cosmos.azure.com/gotable4g723xn3ey2gy(PartitionKey='partition',RowKey='9')\r\nContent-ID: - 9\r\n\r\n\r\n--changesetresponse_98797719-e86b-4e00-b09e-3d74041d2fb5\nContent-Type: - application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: - W/\"datetime'2021-07-26T21%3A18%3A08.7175176Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: - https://seankaneprim.table.cosmos.azure.com/gotable4g723xn3ey2gy(PartitionKey='partition',RowKey='10')\r\nContent-ID: - 10\r\n\r\n\r\n--changesetresponse_98797719-e86b-4e00-b09e-3d74041d2fb5--\n--batchresponse_1ea07688-954d-4b6b-8e4f-511b17442a87--\r\n" - headers: - Content-Type: - - multipart/mixed; boundary=batchresponse_1ea07688-954d-4b6b-8e4f-511b17442a87 - Date: - - Mon, 26 Jul 2021 21:18:08 GMT - X-Ms-Request-Id: - - 24636618-d5dc-4aa1-bbaf-a705715b2a59 - status: 202 Accepted - code: 202 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 21:18:08 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotable4g723xn3ey2gy() - method: GET - response: - body: '{"value":[{"odata.etag":"W/\"datetime''2021-07-26T21%3A18%3A08.7137288Z''\"","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":1,"PartitionKey":"partition","RowKey":"1","String":"someString","Timestamp":"2021-07-26T21:18:08.7137288Z"},{"odata.etag":"W/\"datetime''2021-07-26T21%3A18%3A08.7143432Z''\"","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":2,"PartitionKey":"partition","RowKey":"2","String":"someString","Timestamp":"2021-07-26T21:18:08.7143432Z"},{"odata.etag":"W/\"datetime''2021-07-26T21%3A18%3A08.7147528Z''\"","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":3,"PartitionKey":"partition","RowKey":"3","String":"someString","Timestamp":"2021-07-26T21:18:08.7147528Z"},{"odata.etag":"W/\"datetime''2021-07-26T21%3A18%3A08.7152648Z''\"","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":4,"PartitionKey":"partition","RowKey":"4","String":"someString","Timestamp":"2021-07-26T21:18:08.7152648Z"},{"odata.etag":"W/\"datetime''2021-07-26T21%3A18%3A08.7155720Z''\"","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":5,"PartitionKey":"partition","RowKey":"5","String":"someString","Timestamp":"2021-07-26T21:18:08.7155720Z"},{"odata.etag":"W/\"datetime''2021-07-26T21%3A18%3A08.7159816Z''\"","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":6,"PartitionKey":"partition","RowKey":"6","String":"someString","Timestamp":"2021-07-26T21:18:08.7159816Z"},{"odata.etag":"W/\"datetime''2021-07-26T21%3A18%3A08.7163912Z''\"","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":7,"PartitionKey":"partition","RowKey":"7","String":"someString","Timestamp":"2021-07-26T21:18:08.7163912Z"},{"odata.etag":"W/\"datetime''2021-07-26T21%3A18%3A08.7166984Z''\"","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":8,"PartitionKey":"partition","RowKey":"8","String":"someString","Timestamp":"2021-07-26T21:18:08.7166984Z"},{"odata.etag":"W/\"datetime''2021-07-26T21%3A18%3A08.7171080Z''\"","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":9,"PartitionKey":"partition","RowKey":"9","String":"someString","Timestamp":"2021-07-26T21:18:08.7171080Z"},{"odata.etag":"W/\"datetime''2021-07-26T21%3A18%3A08.7175176Z''\"","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":10,"PartitionKey":"partition","RowKey":"10","String":"someString","Timestamp":"2021-07-26T21:18:08.7175176Z"}],"odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#gotable4g723xn3ey2gy"}' - headers: - Content-Type: - - application/json;odata=minimalmetadata - Date: - - Mon, 26 Jul 2021 21:18:08 GMT - X-Ms-Request-Id: - - 2a813172-d9b0-4b29-86a2-556912036230 - status: 200 OK - code: 200 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 21:18:08 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/Tables('gotable4g723xn3ey2gy') - method: DELETE - response: - body: "" - headers: - Date: - - Mon, 26 Jul 2021 21:18:08 GMT - X-Ms-Request-Id: - - d3d285a9-9e52-46b7-a325-5c30a7deee27 - status: 204 No Content - code: 204 - duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchComplex-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchComplex-variables.yaml deleted file mode 100644 index f3ae17da2742..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchComplex-variables.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com -TABLES_COSMOS_ACCOUNT_NAME: seankaneprim -TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== -randomSeed: "1627334289" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchComplex.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchComplex.yaml deleted file mode 100644 index 378936b932f6..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchComplex.yaml +++ /dev/null @@ -1,296 +0,0 @@ ---- -version: 1 -interactions: -- request: - body: '{"TableName":"gotablegig6ivswqh66t"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "36" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 21:18:09 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/Tables - method: POST - response: - body: '{"TableName":"gotablegig6ivswqh66t","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' - headers: - Content-Type: - - application/json;odata=minimalmetadata - Date: - - Mon, 26 Jul 2021 21:18:09 GMT - Etag: - - W/"datetime'2021-07-26T21%3A18%3A09.4510088Z'" - Location: - - https://seankaneprim.table.cosmos.azure.com/Tables('gotablegig6ivswqh66t') - X-Ms-Request-Id: - - 340b05a8-1546-4258-8e22-eef0cd6e1998 - status: 201 Created - code: 201 - duration: "" -- request: - body: "--batch_410cec07-ea0d-4b4f-60d1-b4b49f9e3c02\r\nContent-Type: multipart/mixed; - boundary=changeset_e9dc23e1-6e18-4abe-6595-151021cfe2d8\r\n\r\n--changeset_e9dc23e1-6e18-4abe-6595-151021cfe2d8\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotablegig6ivswqh66t?%24format=application%2Fjson%3Bodata%3Dminimalmetadata - HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 367\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Binary\":\"U29tZUJpbmFyeQ==\",\"Binary@odata.type\":\"Edm.Binary\",\"Bool\":false,\"DateTime\":\"2013-08-02T17:37:43.0090043Z\",\"DateTime@odata.type\":\"Edm.DateTime\",\"Double\":1234.1234,\"Guid\":\"4185404a-5818-48c3-b9be-f217df0dba6f\",\"Guid@odata.type\":\"Edm.Guid\",\"Int32\":1234,\"Int64\":\"123456789012\",\"Int64@odata.type\":\"Edm.Int64\",\"PartitionKey\":\"pk001\",\"RowKey\":\"1\",\"String\":\"test\"}\r\n--changeset_e9dc23e1-6e18-4abe-6595-151021cfe2d8\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotablegig6ivswqh66t?%24format=application%2Fjson%3Bodata%3Dminimalmetadata - HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 367\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Binary\":\"U29tZUJpbmFyeQ==\",\"Binary@odata.type\":\"Edm.Binary\",\"Bool\":false,\"DateTime\":\"2013-08-02T17:37:43.0090043Z\",\"DateTime@odata.type\":\"Edm.DateTime\",\"Double\":1234.1234,\"Guid\":\"4185404a-5818-48c3-b9be-f217df0dba6f\",\"Guid@odata.type\":\"Edm.Guid\",\"Int32\":1234,\"Int64\":\"123456789012\",\"Int64@odata.type\":\"Edm.Int64\",\"PartitionKey\":\"pk001\",\"RowKey\":\"2\",\"String\":\"test\"}\r\n--changeset_e9dc23e1-6e18-4abe-6595-151021cfe2d8\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotablegig6ivswqh66t?%24format=application%2Fjson%3Bodata%3Dminimalmetadata - HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 367\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Binary\":\"U29tZUJpbmFyeQ==\",\"Binary@odata.type\":\"Edm.Binary\",\"Bool\":false,\"DateTime\":\"2013-08-02T17:37:43.0090043Z\",\"DateTime@odata.type\":\"Edm.DateTime\",\"Double\":1234.1234,\"Guid\":\"4185404a-5818-48c3-b9be-f217df0dba6f\",\"Guid@odata.type\":\"Edm.Guid\",\"Int32\":1234,\"Int64\":\"123456789012\",\"Int64@odata.type\":\"Edm.Int64\",\"PartitionKey\":\"pk001\",\"RowKey\":\"3\",\"String\":\"test\"}\r\n--changeset_e9dc23e1-6e18-4abe-6595-151021cfe2d8\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotablegig6ivswqh66t?%24format=application%2Fjson%3Bodata%3Dminimalmetadata - HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 367\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Binary\":\"U29tZUJpbmFyeQ==\",\"Binary@odata.type\":\"Edm.Binary\",\"Bool\":false,\"DateTime\":\"2013-08-02T17:37:43.0090043Z\",\"DateTime@odata.type\":\"Edm.DateTime\",\"Double\":1234.1234,\"Guid\":\"4185404a-5818-48c3-b9be-f217df0dba6f\",\"Guid@odata.type\":\"Edm.Guid\",\"Int32\":1234,\"Int64\":\"123456789012\",\"Int64@odata.type\":\"Edm.Int64\",\"PartitionKey\":\"pk001\",\"RowKey\":\"4\",\"String\":\"test\"}\r\n--changeset_e9dc23e1-6e18-4abe-6595-151021cfe2d8\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotablegig6ivswqh66t?%24format=application%2Fjson%3Bodata%3Dminimalmetadata - HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 367\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Binary\":\"U29tZUJpbmFyeQ==\",\"Binary@odata.type\":\"Edm.Binary\",\"Bool\":false,\"DateTime\":\"2013-08-02T17:37:43.0090043Z\",\"DateTime@odata.type\":\"Edm.DateTime\",\"Double\":1234.1234,\"Guid\":\"4185404a-5818-48c3-b9be-f217df0dba6f\",\"Guid@odata.type\":\"Edm.Guid\",\"Int32\":1234,\"Int64\":\"123456789012\",\"Int64@odata.type\":\"Edm.Int64\",\"PartitionKey\":\"pk001\",\"RowKey\":\"5\",\"String\":\"test\"}\r\n--changeset_e9dc23e1-6e18-4abe-6595-151021cfe2d8--\r\n\r\n--batch_410cec07-ea0d-4b4f-60d1-b4b49f9e3c02--\r\n" - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "4258" - Content-Type: - - multipart/mixed; boundary=batch_410cec07-ea0d-4b4f-60d1-b4b49f9e3c02 - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 21:18:09 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/$batch - method: POST - response: - body: "--batchresponse_e1d5df2b-74f2-4cfe-ba82-2f5bb2ecb1ab\r\nContent-Type: multipart/mixed; - boundary=changesetresponse_b7a96679-4766-48f1-9f61-ef86f9b5d5e3\r\n\r\n--changesetresponse_b7a96679-4766-48f1-9f61-ef86f9b5d5e3\nContent-Type: - application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: - W/\"datetime'2021-07-26T21%3A18%3A10.1077000Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: - https://seankaneprim.table.cosmos.azure.com/gotablegig6ivswqh66t(PartitionKey='pk001',RowKey='1')\r\nContent-ID: - 1\r\n\r\n\r\n--changesetresponse_b7a96679-4766-48f1-9f61-ef86f9b5d5e3\nContent-Type: - application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: - W/\"datetime'2021-07-26T21%3A18%3A10.1083144Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: - https://seankaneprim.table.cosmos.azure.com/gotablegig6ivswqh66t(PartitionKey='pk001',RowKey='2')\r\nContent-ID: - 2\r\n\r\n\r\n--changesetresponse_b7a96679-4766-48f1-9f61-ef86f9b5d5e3\nContent-Type: - application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: - W/\"datetime'2021-07-26T21%3A18%3A10.1087240Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: - https://seankaneprim.table.cosmos.azure.com/gotablegig6ivswqh66t(PartitionKey='pk001',RowKey='3')\r\nContent-ID: - 3\r\n\r\n\r\n--changesetresponse_b7a96679-4766-48f1-9f61-ef86f9b5d5e3\nContent-Type: - application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: - W/\"datetime'2021-07-26T21%3A18%3A10.1091336Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: - https://seankaneprim.table.cosmos.azure.com/gotablegig6ivswqh66t(PartitionKey='pk001',RowKey='4')\r\nContent-ID: - 4\r\n\r\n\r\n--changesetresponse_b7a96679-4766-48f1-9f61-ef86f9b5d5e3\nContent-Type: - application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: - W/\"datetime'2021-07-26T21%3A18%3A10.1095432Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: - https://seankaneprim.table.cosmos.azure.com/gotablegig6ivswqh66t(PartitionKey='pk001',RowKey='5')\r\nContent-ID: - 5\r\n\r\n\r\n--changesetresponse_b7a96679-4766-48f1-9f61-ef86f9b5d5e3--\n--batchresponse_e1d5df2b-74f2-4cfe-ba82-2f5bb2ecb1ab--\r\n" - headers: - Content-Type: - - multipart/mixed; boundary=batchresponse_e1d5df2b-74f2-4cfe-ba82-2f5bb2ecb1ab - Date: - - Mon, 26 Jul 2021 21:18:09 GMT - X-Ms-Request-Id: - - 8ceec751-085c-43de-b186-351b13691579 - status: 202 Accepted - code: 202 - duration: "" -- request: - body: "--batch_d28d91ad-5fd4-4114-752a-0754abf44d95\r\nContent-Type: multipart/mixed; - boundary=changeset_b34d0adf-f9c1-48a8-4a94-254cbc1b58c9\r\n\r\n--changeset_b34d0adf-f9c1-48a8-4a94-254cbc1b58c9\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotablegig6ivswqh66t(PartitionKey='pk001',RowKey='1')?%24format=application%2Fjson%3Bodata%3Dminimalmetadata - HTTP/1.1\r\nAccept: application/json\r\nContent-Length: 367\r\nContent-Type: - application/json\r\nDataserviceversion: 3.0\r\nIf-Match: *\r\nX-Http-Method: - MERGE\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Binary\":\"U29tZUJpbmFyeQ==\",\"Binary@odata.type\":\"Edm.Binary\",\"Bool\":false,\"DateTime\":\"2013-08-02T17:37:43.0090043Z\",\"DateTime@odata.type\":\"Edm.DateTime\",\"Double\":1234.1234,\"Guid\":\"4185404a-5818-48c3-b9be-f217df0dba6f\",\"Guid@odata.type\":\"Edm.Guid\",\"Int32\":1234,\"Int64\":\"123456789012\",\"Int64@odata.type\":\"Edm.Int64\",\"PartitionKey\":\"pk001\",\"RowKey\":\"1\",\"String\":\"test\"}\r\n--changeset_b34d0adf-f9c1-48a8-4a94-254cbc1b58c9\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPUT https://seankaneprim.table.cosmos.azure.com/gotablegig6ivswqh66t(PartitionKey='pk001',RowKey='2')?%24format=application%2Fjson%3Bodata%3Dminimalmetadata - HTTP/1.1\r\nAccept: application/json\r\nContent-Length: 365\r\nContent-Type: - application/json\r\nDataserviceversion: 3.0\r\nIf-Match: *\r\nX-Ms-Version: - 2019-02-02\r\n\r\n{\"Binary\":\"U29tZUJpbmFyeQ==\",\"Binary@odata.type\":\"Edm.Binary\",\"Bool\":false,\"DateTime\":\"2013-08-02T17:37:43.0090043Z\",\"DateTime@odata.type\":\"Edm.DateTime\",\"Double\":1234.1234,\"Guid\":\"4185404a-5818-48c3-b9be-f217df0dba6f\",\"Guid@odata.type\":\"Edm.Guid\",\"Int32\":10,\"Int64\":\"123456789012\",\"Int64@odata.type\":\"Edm.Int64\",\"PartitionKey\":\"pk001\",\"RowKey\":\"2\",\"String\":\"test\"}\r\n--changeset_b34d0adf-f9c1-48a8-4a94-254cbc1b58c9\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nDELETE https://seankaneprim.table.cosmos.azure.com/gotablegig6ivswqh66t(PartitionKey='pk001',RowKey='3')?%24format=application%2Fjson%3Bodata%3Dminimalmetadata - HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nDataserviceversion: - 3.0\r\nIf-Match: *\r\nX-Ms-Version: 2019-02-02\r\n\r\n\r\n--changeset_b34d0adf-f9c1-48a8-4a94-254cbc1b58c9--\r\n\r\n--batch_d28d91ad-5fd4-4114-752a-0754abf44d95--\r\n" - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "2264" - Content-Type: - - multipart/mixed; boundary=batch_d28d91ad-5fd4-4114-752a-0754abf44d95 - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 21:18:10 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/$batch - method: POST - response: - body: "--batchresponse_3c627e50-6ebf-44d6-944f-d8dc51a53790\r\nContent-Type: multipart/mixed; - boundary=changesetresponse_9c777fa2-ab7a-499e-9f16-690c729c0f99\r\n\r\n--changesetresponse_9c777fa2-ab7a-499e-9f16-690c729c0f99\nContent-Type: - application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: - W/\"datetime'2021-07-26T21%3A18%3A10.2574088Z'\"\r\nContent-ID: 1\r\n\r\n\r\n--changesetresponse_9c777fa2-ab7a-499e-9f16-690c729c0f99\nContent-Type: - application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: - W/\"datetime'2021-07-26T21%3A18%3A10.2580232Z'\"\r\nContent-ID: 2\r\n\r\n\r\n--changesetresponse_9c777fa2-ab7a-499e-9f16-690c729c0f99\nContent-Type: - application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nContent-ID: - 3\r\n\r\n\r\n--changesetresponse_9c777fa2-ab7a-499e-9f16-690c729c0f99--\n--batchresponse_3c627e50-6ebf-44d6-944f-d8dc51a53790--\r\n" - headers: - Content-Type: - - multipart/mixed; boundary=batchresponse_3c627e50-6ebf-44d6-944f-d8dc51a53790 - Date: - - Mon, 26 Jul 2021 21:18:09 GMT - X-Ms-Request-Id: - - 36378fc6-7cd4-4b0b-9fcc-8b1034f68281 - status: 202 Accepted - code: 202 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 21:18:10 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotablegig6ivswqh66t(PartitionKey='pk001',RowKey='1') - method: GET - response: - body: '{"odata.metadata":"https://seankaneprim.table.cosmos.azure.com/gotablegig6ivswqh66t/$metadata#gotablegig6ivswqh66t/@Element","odata.etag":"W/\"datetime''2021-07-26T21%3A18%3A10.2574088Z''\"","Binary@odata.type":"Edm.Binary","Binary":"U29tZUJpbmFyeQ==","Bool":false,"DateTime@odata.type":"Edm.DateTime","DateTime":"2013-08-02T17:37:43.0090043Z","Double":1234.1234,"Guid@odata.type":"Edm.Guid","Guid":"4185404a-5818-48c3-b9be-f217df0dba6f","Int32":1234,"Int64@odata.type":"Edm.Int64","Int64":"123456789012","PartitionKey":"pk001","RowKey":"1","String":"test","Timestamp":"2021-07-26T21:18:10.2574088Z"}' - headers: - Content-Type: - - application/json;odata=minimalmetadata - Date: - - Mon, 26 Jul 2021 21:18:09 GMT - Etag: - - W/"datetime'2021-07-26T21%3A18%3A10.2574088Z'" - X-Ms-Request-Id: - - bb62ccb4-199d-44de-aceb-0f93d12f4687 - status: 200 OK - code: 200 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 21:18:10 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotablegig6ivswqh66t(PartitionKey='pk001',RowKey='2') - method: GET - response: - body: '{"odata.metadata":"https://seankaneprim.table.cosmos.azure.com/gotablegig6ivswqh66t/$metadata#gotablegig6ivswqh66t/@Element","odata.etag":"W/\"datetime''2021-07-26T21%3A18%3A10.2580232Z''\"","PartitionKey":"pk001","RowKey":"2","Binary@odata.type":"Edm.Binary","Binary":"U29tZUJpbmFyeQ==","Bool":false,"DateTime@odata.type":"Edm.DateTime","DateTime":"2013-08-02T17:37:43.0090043Z","Double":1234.1234,"Guid@odata.type":"Edm.Guid","Guid":"4185404a-5818-48c3-b9be-f217df0dba6f","Int32":10,"Int64@odata.type":"Edm.Int64","Int64":"123456789012","String":"test","Timestamp":"2021-07-26T21:18:10.2580232Z"}' - headers: - Content-Type: - - application/json;odata=minimalmetadata - Date: - - Mon, 26 Jul 2021 21:18:09 GMT - Etag: - - W/"datetime'2021-07-26T21%3A18%3A10.2580232Z'" - X-Ms-Request-Id: - - 46c3620f-ade8-4c00-80e8-dd8722c6bf3b - status: 200 OK - code: 200 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 21:18:10 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotablegig6ivswqh66t(PartitionKey='pk001',RowKey='3') - method: GET - response: - body: "{\"odata.error\":{\"code\":\"ResourceNotFound\",\"message\":{\"lang\":\"en-us\",\"value\":\"The - specified resource does not exist.\\nRequestID:becebde2-6484-4466-bd40-28cfb6a42849\\n\"}}}\r\n" - headers: - Content-Type: - - application/json;odata=minimalmetadata - Date: - - Mon, 26 Jul 2021 21:18:10 GMT - X-Ms-Request-Id: - - becebde2-6484-4466-bd40-28cfb6a42849 - status: 404 Not Found - code: 404 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 21:18:10 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/Tables('gotablegig6ivswqh66t') - method: DELETE - response: - body: "" - headers: - Date: - - Mon, 26 Jul 2021 21:18:10 GMT - X-Ms-Request-Id: - - d1a632f7-5146-4e75-acca-1dfa743e23e1 - status: 204 No Content - code: 204 - duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchError-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchError-variables.yaml deleted file mode 100644 index 805769abb6b8..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchError-variables.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com -TABLES_COSMOS_ACCOUNT_NAME: seankaneprim -TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== -randomSeed: "1627334290" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchError.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchError.yaml deleted file mode 100644 index 00777d8aca3d..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchError.yaml +++ /dev/null @@ -1,161 +0,0 @@ ---- -version: 1 -interactions: -- request: - body: '{"TableName":"gotablegmhacxwhglxek"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "36" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 21:18:10 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/Tables - method: POST - response: - body: '{"TableName":"gotablegmhacxwhglxek","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' - headers: - Content-Type: - - application/json;odata=minimalmetadata - Date: - - Mon, 26 Jul 2021 21:18:11 GMT - Etag: - - W/"datetime'2021-07-26T21%3A18%3A11.2246792Z'" - Location: - - https://seankaneprim.table.cosmos.azure.com/Tables('gotablegmhacxwhglxek') - X-Ms-Request-Id: - - bcb37b01-ec8d-42c8-82a3-3dccfde9cb2b - status: 201 Created - code: 201 - duration: "" -- request: - body: '{"Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":3,"PartitionKey":"partition","RowKey":"3","String":"someString","Timestamp":"0001-01-01T00:00:00Z"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "194" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - Prefer: - - return-no-content - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 21:18:11 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotablegmhacxwhglxek - method: POST - response: - body: "" - headers: - Date: - - Mon, 26 Jul 2021 21:18:11 GMT - Etag: - - W/"datetime'2021-07-26T21%3A18%3A11.9135240Z'" - Location: - - https://seankaneprim.table.cosmos.azure.com/gotablegmhacxwhglxek(PartitionKey='partition',RowKey='3') - Preference-Applied: - - return-no-content - X-Ms-Request-Id: - - abea6f49-b2d8-44d1-b721-c94003976b78 - status: 204 No Content - code: 204 - duration: "" -- request: - body: "--batch_e90364ad-b45b-47fb-7f21-b63c621c95d4\r\nContent-Type: multipart/mixed; - boundary=changeset_d392ffd3-771e-4816-45af-0a93650a0f86\r\n\r\n--changeset_d392ffd3-771e-4816-45af-0a93650a0f86\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotablegmhacxwhglxek?%24format=application%2Fjson%3Bodata%3Dminimalmetadata - HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 194\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Integer\":1,\"PartitionKey\":\"partition\",\"RowKey\":\"1\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_d392ffd3-771e-4816-45af-0a93650a0f86\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotablegmhacxwhglxek?%24format=application%2Fjson%3Bodata%3Dminimalmetadata - HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 194\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Integer\":2,\"PartitionKey\":\"partition\",\"RowKey\":\"2\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_d392ffd3-771e-4816-45af-0a93650a0f86\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotablegmhacxwhglxek?%24format=application%2Fjson%3Bodata%3Dminimalmetadata - HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 194\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Integer\":3,\"PartitionKey\":\"partition\",\"RowKey\":\"3\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_d392ffd3-771e-4816-45af-0a93650a0f86--\r\n\r\n--batch_e90364ad-b45b-47fb-7f21-b63c621c95d4--\r\n" - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "2131" - Content-Type: - - multipart/mixed; boundary=batch_e90364ad-b45b-47fb-7f21-b63c621c95d4 - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 21:18:11 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/$batch - method: POST - response: - body: "--batchresponse_95d8004e-24a8-4df8-b5d0-ac8ca60f9b7c\r\nContent-Type: multipart/mixed; - boundary=changesetresponse_09adfb9d-794c-421f-8990-73e89d210019\r\n\r\n--changesetresponse_09adfb9d-794c-421f-8990-73e89d210019\nContent-Type: - application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 409 Conflict\r\nContent-Type: - application/json;odata=fullmetadata\r\n\r\n{\"odata.error\":{\"code\":\"EntityAlreadyExists\",\"message\":{\"lang\":\"en-us\",\"value\":\"2:The - specified entity already exists.\\n\\nRequestID:24294b65-59a5-47cf-894a-9f57bf6646e1\\n\"}}}\r\n--changesetresponse_09adfb9d-794c-421f-8990-73e89d210019--\n--batchresponse_95d8004e-24a8-4df8-b5d0-ac8ca60f9b7c--\r\n" - headers: - Content-Type: - - multipart/mixed; boundary=batchresponse_95d8004e-24a8-4df8-b5d0-ac8ca60f9b7c - Date: - - Mon, 26 Jul 2021 21:18:11 GMT - X-Ms-Request-Id: - - 24294b65-59a5-47cf-894a-9f57bf6646e1 - status: 202 Accepted - code: 202 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 21:18:11 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/Tables('gotablegmhacxwhglxek') - method: DELETE - response: - body: "" - headers: - Date: - - Mon, 26 Jul 2021 21:18:11 GMT - X-Ms-Request-Id: - - 9ac73d6e-52d2-4f69-9f62-612f788388bb - status: 204 No Content - code: 204 - duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchMixed-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchMixed-variables.yaml deleted file mode 100644 index 9d5773b994de..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchMixed-variables.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com -TABLES_COSMOS_ACCOUNT_NAME: seankaneprim -TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== -randomSeed: "1627334292" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchMixed.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchMixed.yaml deleted file mode 100644 index de64bcc8da88..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestBatchMixed.yaml +++ /dev/null @@ -1,260 +0,0 @@ ---- -version: 1 -interactions: -- request: - body: '{"TableName":"gotableeuwmto5ervf8z"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "36" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 21:18:12 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/Tables - method: POST - response: - body: '{"TableName":"gotableeuwmto5ervf8z","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' - headers: - Content-Type: - - application/json;odata=minimalmetadata - Date: - - Mon, 26 Jul 2021 21:18:12 GMT - Etag: - - W/"datetime'2021-07-26T21%3A18%3A12.6280712Z'" - Location: - - https://seankaneprim.table.cosmos.azure.com/Tables('gotableeuwmto5ervf8z') - X-Ms-Request-Id: - - c0c2baa6-d171-4e83-a1fd-15c996f723c1 - status: 201 Created - code: 201 - duration: "" -- request: - body: "--batch_58e7becc-8de4-43ac-7dcf-38edb15ceb0d\r\nContent-Type: multipart/mixed; - boundary=changeset_70ffb7e8-ba88-4024-6554-b1c0743282dc\r\n\r\n--changeset_70ffb7e8-ba88-4024-6554-b1c0743282dc\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotableeuwmto5ervf8z?%24format=application%2Fjson%3Bodata%3Dminimalmetadata - HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 194\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Integer\":1,\"PartitionKey\":\"partition\",\"RowKey\":\"1\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_70ffb7e8-ba88-4024-6554-b1c0743282dc\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotableeuwmto5ervf8z?%24format=application%2Fjson%3Bodata%3Dminimalmetadata - HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 194\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Integer\":2,\"PartitionKey\":\"partition\",\"RowKey\":\"2\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_70ffb7e8-ba88-4024-6554-b1c0743282dc\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotableeuwmto5ervf8z?%24format=application%2Fjson%3Bodata%3Dminimalmetadata - HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 194\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Integer\":3,\"PartitionKey\":\"partition\",\"RowKey\":\"3\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_70ffb7e8-ba88-4024-6554-b1c0743282dc--\r\n\r\n--batch_58e7becc-8de4-43ac-7dcf-38edb15ceb0d--\r\n" - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "2131" - Content-Type: - - multipart/mixed; boundary=batch_58e7becc-8de4-43ac-7dcf-38edb15ceb0d - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 21:18:13 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/$batch - method: POST - response: - body: "--batchresponse_b311cbaa-4b2e-44ce-8648-5bd4134e18cc\r\nContent-Type: multipart/mixed; - boundary=changesetresponse_0095dd6d-2d4a-4fd9-b222-ce703fd0c0d2\r\n\r\n--changesetresponse_0095dd6d-2d4a-4fd9-b222-ce703fd0c0d2\nContent-Type: - application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: - W/\"datetime'2021-07-26T21%3A18%3A13.3186568Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: - https://seankaneprim.table.cosmos.azure.com/gotableeuwmto5ervf8z(PartitionKey='partition',RowKey='1')\r\nContent-ID: - 1\r\n\r\n\r\n--changesetresponse_0095dd6d-2d4a-4fd9-b222-ce703fd0c0d2\nContent-Type: - application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: - W/\"datetime'2021-07-26T21%3A18%3A13.3193736Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: - https://seankaneprim.table.cosmos.azure.com/gotableeuwmto5ervf8z(PartitionKey='partition',RowKey='2')\r\nContent-ID: - 2\r\n\r\n\r\n--changesetresponse_0095dd6d-2d4a-4fd9-b222-ce703fd0c0d2\nContent-Type: - application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: - W/\"datetime'2021-07-26T21%3A18%3A13.3197832Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: - https://seankaneprim.table.cosmos.azure.com/gotableeuwmto5ervf8z(PartitionKey='partition',RowKey='3')\r\nContent-ID: - 3\r\n\r\n\r\n--changesetresponse_0095dd6d-2d4a-4fd9-b222-ce703fd0c0d2--\n--batchresponse_b311cbaa-4b2e-44ce-8648-5bd4134e18cc--\r\n" - headers: - Content-Type: - - multipart/mixed; boundary=batchresponse_b311cbaa-4b2e-44ce-8648-5bd4134e18cc - Date: - - Mon, 26 Jul 2021 21:18:12 GMT - X-Ms-Request-Id: - - c28613bd-b096-48f5-8a12-bf32c315a355 - status: 202 Accepted - code: 202 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 21:18:13 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotableeuwmto5ervf8z()?%24filter=RowKey+eq+%271%27 - method: GET - response: - body: '{"value":[{"odata.etag":"W/\"datetime''2021-07-26T21%3A18%3A13.3186568Z''\"","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":1,"PartitionKey":"partition","RowKey":"1","String":"someString","Timestamp":"2021-07-26T21:18:13.3186568Z"}],"odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#gotableeuwmto5ervf8z"}' - headers: - Content-Type: - - application/json;odata=minimalmetadata - Date: - - Mon, 26 Jul 2021 21:18:12 GMT - X-Ms-Request-Id: - - 974b2605-2eec-4f7e-a097-e09acb4c0a97 - status: 200 OK - code: 200 - duration: "" -- request: - body: "--batch_947da777-7a95-4b8a-7969-a898523ced93\r\nContent-Type: multipart/mixed; - boundary=changeset_27f1947a-ca1d-4227-784c-40c8a004988b\r\n\r\n--changeset_27f1947a-ca1d-4227-784c-40c8a004988b\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotableeuwmto5ervf8z(PartitionKey='partition',RowKey='1')?%24format=application%2Fjson%3Bodata%3Dminimalmetadata - HTTP/1.1\r\nAccept: application/json\r\nContent-Length: 63\r\nContent-Type: - application/json\r\nDataserviceversion: 3.0\r\nIf-Match: W/\"datetime'2021-07-26T21%3A18%3A13.3186568Z'\"\r\nX-Http-Method: - MERGE\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"MergeProperty\":\"foo\",\"PartitionKey\":\"partition\",\"RowKey\":\"1\"}\r\n--changeset_27f1947a-ca1d-4227-784c-40c8a004988b\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nDELETE https://seankaneprim.table.cosmos.azure.com/gotableeuwmto5ervf8z(PartitionKey='partition',RowKey='2')?%24format=application%2Fjson%3Bodata%3Dminimalmetadata - HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nDataserviceversion: - 3.0\r\nIf-Match: *\r\nX-Ms-Version: 2019-02-02\r\n\r\n\r\n--changeset_27f1947a-ca1d-4227-784c-40c8a004988b\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPUT https://seankaneprim.table.cosmos.azure.com/gotableeuwmto5ervf8z(PartitionKey='partition',RowKey='3')?%24format=application%2Fjson%3Bodata%3Dminimalmetadata - HTTP/1.1\r\nAccept: application/json\r\nContent-Length: 65\r\nContent-Type: - application/json\r\nDataserviceversion: 3.0\r\nIf-Match: *\r\nX-Ms-Version: - 2019-02-02\r\n\r\n{\"PartitionKey\":\"partition\",\"ReplaceProperty\":\"foo\",\"RowKey\":\"3\"}\r\n--changeset_27f1947a-ca1d-4227-784c-40c8a004988b\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotableeuwmto5ervf8z?%24format=application%2Fjson%3Bodata%3Dminimalmetadata - HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 194\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Integer\":4,\"PartitionKey\":\"partition\",\"RowKey\":\"4\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_27f1947a-ca1d-4227-784c-40c8a004988b\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.cosmos.azure.com/gotableeuwmto5ervf8z?%24format=application%2Fjson%3Bodata%3Dminimalmetadata - HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 194\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Integer\":5,\"PartitionKey\":\"partition\",\"RowKey\":\"5\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_27f1947a-ca1d-4227-784c-40c8a004988b--\r\n\r\n--batch_947da777-7a95-4b8a-7969-a898523ced93--\r\n" - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "2977" - Content-Type: - - multipart/mixed; boundary=batch_947da777-7a95-4b8a-7969-a898523ced93 - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 21:18:13 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/$batch - method: POST - response: - body: "--batchresponse_5a918c49-f5d2-4756-bf4e-85f201717162\r\nContent-Type: multipart/mixed; - boundary=changesetresponse_3bd0146a-e3a8-4ebb-b05e-097b61eef1ac\r\n\r\n--changesetresponse_3bd0146a-e3a8-4ebb-b05e-097b61eef1ac\nContent-Type: - application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: - W/\"datetime'2021-07-26T21%3A18%3A13.5878664Z'\"\r\nContent-ID: 1\r\n\r\n\r\n--changesetresponse_3bd0146a-e3a8-4ebb-b05e-097b61eef1ac\nContent-Type: - application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nContent-ID: - 2\r\n\r\n\r\n--changesetresponse_3bd0146a-e3a8-4ebb-b05e-097b61eef1ac\nContent-Type: - application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: - W/\"datetime'2021-07-26T21%3A18%3A13.5966728Z'\"\r\nContent-ID: 3\r\n\r\n\r\n--changesetresponse_3bd0146a-e3a8-4ebb-b05e-097b61eef1ac\nContent-Type: - application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: - W/\"datetime'2021-07-26T21%3A18%3A13.5972872Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: - https://seankaneprim.table.cosmos.azure.com/gotableeuwmto5ervf8z(PartitionKey='partition',RowKey='4')\r\nContent-ID: - 4\r\n\r\n\r\n--changesetresponse_3bd0146a-e3a8-4ebb-b05e-097b61eef1ac\nContent-Type: - application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: - W/\"datetime'2021-07-26T21%3A18%3A13.5977992Z'\"\r\nPreference-Applied: return-no-content\r\nLocation: - https://seankaneprim.table.cosmos.azure.com/gotableeuwmto5ervf8z(PartitionKey='partition',RowKey='5')\r\nContent-ID: - 5\r\n\r\n\r\n--changesetresponse_3bd0146a-e3a8-4ebb-b05e-097b61eef1ac--\n--batchresponse_5a918c49-f5d2-4756-bf4e-85f201717162--\r\n" - headers: - Content-Type: - - multipart/mixed; boundary=batchresponse_5a918c49-f5d2-4756-bf4e-85f201717162 - Date: - - Mon, 26 Jul 2021 21:18:12 GMT - X-Ms-Request-Id: - - 39f56c29-52ab-4169-85bc-7394822dfd44 - status: 202 Accepted - code: 202 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 21:18:13 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotableeuwmto5ervf8z()?%24filter=RowKey+eq+%271%27 - method: GET - response: - body: '{"value":[{"odata.etag":"W/\"datetime''2021-07-26T21%3A18%3A13.5878664Z''\"","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":1,"PartitionKey":"partition","RowKey":"1","String":"someString","MergeProperty":"foo","Timestamp":"2021-07-26T21:18:13.5878664Z"}],"odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#gotableeuwmto5ervf8z"}' - headers: - Content-Type: - - application/json;odata=minimalmetadata - Date: - - Mon, 26 Jul 2021 21:18:13 GMT - X-Ms-Request-Id: - - b9f7670a-2a76-456b-806c-44dadf67a03d - status: 200 OK - code: 200 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 21:18:13 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/Tables('gotableeuwmto5ervf8z') - method: DELETE - response: - body: "" - headers: - Date: - - Mon, 26 Jul 2021 21:18:13 GMT - X-Ms-Request-Id: - - 7838ed19-c030-47ca-aed4-c522197818bb - status: 204 No Content - code: 204 - duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestCreateTable-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestCreateTable-variables.yaml deleted file mode 100644 index 0d7f34e57c01..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestCreateTable-variables.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com -TABLES_COSMOS_ACCOUNT_NAME: seankaneprim -TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== -randomSeed: "1627334293" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestCreateTable.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestCreateTable.yaml deleted file mode 100644 index 25875698346c..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestCreateTable.yaml +++ /dev/null @@ -1,69 +0,0 @@ ---- -version: 1 -interactions: -- request: - body: '{"TableName":"gotablewywiqnkdwtkji"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "36" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 21:18:13 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/Tables - method: POST - response: - body: '{"TableName":"gotablewywiqnkdwtkji","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' - headers: - Content-Type: - - application/json;odata=minimalmetadata - Date: - - Mon, 26 Jul 2021 21:18:14 GMT - Etag: - - W/"datetime'2021-07-26T21%3A18%3A14.2387208Z'" - Location: - - https://seankaneprim.table.cosmos.azure.com/Tables('gotablewywiqnkdwtkji') - X-Ms-Request-Id: - - f7bf64c6-55ee-400b-813d-e12db7a0dd94 - status: 201 Created - code: 201 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 21:18:14 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/Tables('gotablewywiqnkdwtkji') - method: DELETE - response: - body: "" - headers: - Date: - - Mon, 26 Jul 2021 21:18:14 GMT - X-Ms-Request-Id: - - ce5945de-3de0-4bcc-a1f8-936d55ef8b25 - status: 204 No Content - code: 204 - duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestDeleteEntity-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestDeleteEntity-variables.yaml deleted file mode 100644 index 75f4ca6c698e..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestDeleteEntity-variables.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com -TABLES_COSMOS_ACCOUNT_NAME: seankaneprim -TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== -randomSeed: "1627334295" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestDeleteEntity.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestDeleteEntity.yaml deleted file mode 100644 index 63cae4040b9e..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestDeleteEntity.yaml +++ /dev/null @@ -1,142 +0,0 @@ ---- -version: 1 -interactions: -- request: - body: '{"TableName":"gotableiddhwkza2vslf"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "36" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 21:18:15 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/Tables - method: POST - response: - body: '{"TableName":"gotableiddhwkza2vslf","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' - headers: - Content-Type: - - application/json;odata=minimalmetadata - Date: - - Mon, 26 Jul 2021 21:18:15 GMT - Etag: - - W/"datetime'2021-07-26T21%3A18%3A15.3752584Z'" - Location: - - https://seankaneprim.table.cosmos.azure.com/Tables('gotableiddhwkza2vslf') - X-Ms-Request-Id: - - 3869038a-1afc-4dab-a0f1-2bd12d58e8c4 - status: 201 Created - code: 201 - duration: "" -- request: - body: '{"Bool":true,"Integer":1,"PartitionKey":"partition","RowKey":"1","String":"some - string 1","Timestamp":"0001-01-01T00:00:00Z"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "125" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - Prefer: - - return-no-content - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 21:18:15 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotableiddhwkza2vslf - method: POST - response: - body: "" - headers: - Date: - - Mon, 26 Jul 2021 21:18:15 GMT - Etag: - - W/"datetime'2021-07-26T21%3A18%3A16.0509960Z'" - Location: - - https://seankaneprim.table.cosmos.azure.com/gotableiddhwkza2vslf(PartitionKey='partition',RowKey='1') - Preference-Applied: - - return-no-content - X-Ms-Request-Id: - - 6db82780-e646-45b3-b91d-1ee0814e84da - status: 204 No Content - code: 204 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Dataserviceversion: - - "3.0" - If-Match: - - '*' - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 21:18:15 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotableiddhwkza2vslf(PartitionKey='partition',RowKey='1') - method: DELETE - response: - body: "" - headers: - Date: - - Mon, 26 Jul 2021 21:18:15 GMT - X-Ms-Request-Id: - - f81c6fe7-089d-44c7-859a-f80aa984b7bc - status: 204 No Content - code: 204 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 21:18:16 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/Tables('gotableiddhwkza2vslf') - method: DELETE - response: - body: "" - headers: - Date: - - Mon, 26 Jul 2021 21:18:15 GMT - X-Ms-Request-Id: - - 636f3ce6-e5e8-4a9a-8d2e-68a979584c07 - status: 204 No Content - code: 204 - duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestEdmMarshalling-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestEdmMarshalling-variables.yaml deleted file mode 100644 index ba8304fdcf96..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestEdmMarshalling-variables.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com -TABLES_COSMOS_ACCOUNT_NAME: seankaneprim -TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== -randomSeed: "1627334296" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestEdmMarshalling.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestEdmMarshalling.yaml deleted file mode 100644 index d192a55b91cd..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestEdmMarshalling.yaml +++ /dev/null @@ -1,143 +0,0 @@ ---- -version: 1 -interactions: -- request: - body: '{"TableName":"gotablew27b8eh28lfl4"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "36" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 21:18:16 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/Tables - method: POST - response: - body: '{"TableName":"gotablew27b8eh28lfl4","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' - headers: - Content-Type: - - application/json;odata=minimalmetadata - Date: - - Mon, 26 Jul 2021 21:18:16 GMT - Etag: - - W/"datetime'2021-07-26T21%3A18%3A16.6872072Z'" - Location: - - https://seankaneprim.table.cosmos.azure.com/Tables('gotablew27b8eh28lfl4') - X-Ms-Request-Id: - - 43b6a721-7a95-4b55-bc65-124fce41241b - status: 201 Created - code: 201 - duration: "" -- request: - body: '{"Binary":"U29tZUJpbmFyeQ==","Binary@odata.type":"Edm.Binary","Bool":false,"DateTime":"2013-08-02T17:37:43.0090043Z","DateTime@odata.type":"Edm.DateTime","Double":1234.1234,"Guid":"4185404a-5818-48c3-b9be-f217df0dba6f","Guid@odata.type":"Edm.Guid","Int32":1234,"Int64":"123456789012","Int64@odata.type":"Edm.Int64","PartitionKey":"partition","RowKey":"1","String":"test"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "371" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - Prefer: - - return-no-content - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 21:18:17 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotablew27b8eh28lfl4 - method: POST - response: - body: "" - headers: - Date: - - Mon, 26 Jul 2021 21:18:16 GMT - Etag: - - W/"datetime'2021-07-26T21%3A18%3A17.3071368Z'" - Location: - - https://seankaneprim.table.cosmos.azure.com/gotablew27b8eh28lfl4(PartitionKey='partition',RowKey='1') - Preference-Applied: - - return-no-content - X-Ms-Request-Id: - - a80cbda9-24f5-43ed-b712-fb4a17f4e760 - status: 204 No Content - code: 204 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 21:18:17 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotablew27b8eh28lfl4(PartitionKey='partition',RowKey='1')?%24format=application%2Fjson%3Bodata%3Dfullmetadata - method: GET - response: - body: '{"odata.metadata":"https://seankaneprim.table.cosmos.azure.com/gotablew27b8eh28lfl4/$metadata#gotablew27b8eh28lfl4/@Element","odata.etag":"W/\"datetime''2021-07-26T21%3A18%3A17.3071368Z''\"","Binary@odata.type":"Edm.Binary","Binary":"U29tZUJpbmFyeQ==","Bool":false,"DateTime@odata.type":"Edm.DateTime","DateTime":"2013-08-02T17:37:43.0090043Z","Double":1234.1234,"Guid@odata.type":"Edm.Guid","Guid":"4185404a-5818-48c3-b9be-f217df0dba6f","Int32":1234,"Int64@odata.type":"Edm.Int64","Int64":"123456789012","PartitionKey":"partition","RowKey":"1","String":"test","Timestamp":"2021-07-26T21:18:17.3071368Z"}' - headers: - Content-Type: - - application/json;odata=minimalmetadata - Date: - - Mon, 26 Jul 2021 21:18:16 GMT - Etag: - - W/"datetime'2021-07-26T21%3A18%3A17.3071368Z'" - X-Ms-Request-Id: - - 8d6e8514-e5c5-4dee-86be-690f3205d3b5 - status: 200 OK - code: 200 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 21:18:17 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/Tables('gotablew27b8eh28lfl4') - method: DELETE - response: - body: "" - headers: - Date: - - Mon, 26 Jul 2021 21:18:17 GMT - X-Ms-Request-Id: - - 07eaa283-f9b8-42bb-9073-1ec4870bf45b - status: 204 No Content - code: 204 - duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestInsertEntity-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestInsertEntity-variables.yaml deleted file mode 100644 index 67f6975bb6d5..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestInsertEntity-variables.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com -TABLES_COSMOS_ACCOUNT_NAME: seankaneprim -TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== -randomSeed: "1627676807" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestInsertEntity.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestInsertEntity.yaml deleted file mode 100644 index e75a1780a3ad..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestInsertEntity.yaml +++ /dev/null @@ -1,211 +0,0 @@ ---- -version: 1 -interactions: -- request: - body: '{"TableName":"gotablex11b3nqe5r4hg"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "36" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Fri, 30 Jul 2021 20:26:47 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/Tables - method: POST - response: - body: '{"TableName":"gotablex11b3nqe5r4hg","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' - headers: - Content-Type: - - application/json;odata=minimalmetadata - Date: - - Fri, 30 Jul 2021 20:26:49 GMT - Etag: - - W/"datetime'2021-07-30T20%3A26%3A49.6224264Z'" - Location: - - https://seankaneprim.table.cosmos.azure.com/Tables('gotablex11b3nqe5r4hg') - X-Ms-Request-Id: - - 8c5d0025-6b93-4bef-8821-77e025cea69e - status: 201 Created - code: 201 - duration: "" -- request: - body: '{"Bool":true,"Integer":1,"PartitionKey":"partition","RowKey":"1","String":"some - string 1","Timestamp":"0001-01-01T00:00:00Z"}' - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - Content-Length: - - "125" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Fri, 30 Jul 2021 20:26:49 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotablex11b3nqe5r4hg(PartitionKey='partition',RowKey='1') - method: PUT - response: - body: "" - headers: - Content-Type: - - application/json - Date: - - Fri, 30 Jul 2021 20:26:50 GMT - Etag: - - W/"datetime'2021-07-30T20%3A26%3A50.3232520Z'" - X-Ms-Request-Id: - - 01020bfe-503c-40aa-bd90-9eb243ec8faf - status: 204 No Content - code: 204 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Fri, 30 Jul 2021 20:26:49 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotablex11b3nqe5r4hg(PartitionKey='partition',RowKey='1') - method: GET - response: - body: '{"odata.metadata":"https://seankaneprim.table.cosmos.azure.com/gotablex11b3nqe5r4hg/$metadata#gotablex11b3nqe5r4hg/@Element","odata.etag":"W/\"datetime''2021-07-30T20%3A26%3A50.3232520Z''\"","PartitionKey":"partition","RowKey":"1","Bool":true,"Integer":1,"String":"some - string 1","Timestamp":"2021-07-30T20:26:50.3232520Z"}' - headers: - Content-Type: - - application/json;odata=minimalmetadata - Date: - - Fri, 30 Jul 2021 20:26:50 GMT - Etag: - - W/"datetime'2021-07-30T20%3A26%3A50.3232520Z'" - X-Ms-Request-Id: - - d2129f32-414f-491a-a2ab-f6c4ca87dfcc - status: 200 OK - code: 200 - duration: "" -- request: - body: '{"Integer":1,"MergeProperty":"foo","PartitionKey":"partition","RowKey":"1","String":"some - string 1"}' - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - Content-Length: - - "100" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Fri, 30 Jul 2021 20:26:49 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotablex11b3nqe5r4hg(PartitionKey='partition',RowKey='1') - method: PUT - response: - body: "" - headers: - Content-Type: - - application/json - Date: - - Fri, 30 Jul 2021 20:26:50 GMT - Etag: - - W/"datetime'2021-07-30T20%3A26%3A50.6126344Z'" - X-Ms-Request-Id: - - 748608bf-0011-4f92-b37d-bac60664069d - status: 204 No Content - code: 204 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Fri, 30 Jul 2021 20:26:49 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotablex11b3nqe5r4hg()?%24filter=RowKey+eq+%271%27 - method: GET - response: - body: '{"value":[{"odata.etag":"W/\"datetime''2021-07-30T20%3A26%3A50.6126344Z''\"","PartitionKey":"partition","RowKey":"1","Integer":1,"MergeProperty":"foo","String":"some - string 1","Timestamp":"2021-07-30T20:26:50.6126344Z"}],"odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#gotablex11b3nqe5r4hg"}' - headers: - Content-Type: - - application/json;odata=minimalmetadata - Date: - - Fri, 30 Jul 2021 20:26:50 GMT - X-Ms-Request-Id: - - e306607f-7f86-42ea-a447-920b722189c2 - status: 200 OK - code: 200 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Fri, 30 Jul 2021 20:26:49 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/Tables('gotablex11b3nqe5r4hg') - method: DELETE - response: - body: "" - headers: - Date: - - Fri, 30 Jul 2021 20:26:50 GMT - X-Ms-Request-Id: - - be2036f9-dec7-4bdd-8af2-6024832c067f - status: 204 No Content - code: 204 - duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestInvalidEntity-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestInvalidEntity-variables.yaml deleted file mode 100644 index 7633cbef4ba1..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestInvalidEntity-variables.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com -TABLES_COSMOS_ACCOUNT_NAME: seankaneprim -TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== -randomSeed: "1627334297" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestInvalidEntity.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestInvalidEntity.yaml deleted file mode 100644 index 9c038925af06..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestInvalidEntity.yaml +++ /dev/null @@ -1,108 +0,0 @@ ---- -version: 1 -interactions: -- request: - body: '{"TableName":"gotabled5f9jcewxl5vu"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "36" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 21:18:17 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/Tables - method: POST - response: - body: '{"TableName":"gotabled5f9jcewxl5vu","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' - headers: - Content-Type: - - application/json;odata=minimalmetadata - Date: - - Mon, 26 Jul 2021 21:18:17 GMT - Etag: - - W/"datetime'2021-07-26T21%3A18%3A17.9556360Z'" - Location: - - https://seankaneprim.table.cosmos.azure.com/Tables('gotabled5f9jcewxl5vu') - X-Ms-Request-Id: - - f46f8eb2-3dfc-400a-9b93-410b4b7d1de1 - status: 201 Created - code: 201 - duration: "" -- request: - body: '{"String":"stringystring","Value":10}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "37" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - Prefer: - - return-no-content - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 21:18:18 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotabled5f9jcewxl5vu - method: POST - response: - body: "{\"odata.error\":{\"code\":\"PropertiesNeedValue\",\"message\":{\"lang\":\"en-us\",\"value\":\"PartitionKey/RowKey - cannot be empty\\r\\nActivityId: 7b96353a-fdb5-4339-b593-be51dffa66e7, documentdb-dotnet-sdk/2.14.0 - Host/64-bit MicrosoftWindowsNT/6.2.9200.0\\nRequestID:7b96353a-fdb5-4339-b593-be51dffa66e7\\n\"}}}\r\n" - headers: - Content-Type: - - application/json;odata=fullmetadata - Date: - - Mon, 26 Jul 2021 21:18:17 GMT - X-Ms-Request-Id: - - 7b96353a-fdb5-4339-b593-be51dffa66e7 - status: 400 Bad Request - code: 400 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 21:18:18 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/Tables('gotabled5f9jcewxl5vu') - method: DELETE - response: - body: "" - headers: - Date: - - Mon, 26 Jul 2021 21:18:18 GMT - X-Ms-Request-Id: - - 44352d53-c853-41cd-a0d6-5dbe1590f30a - status: 204 No Content - code: 204 - duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestMergeEntity-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestMergeEntity-variables.yaml deleted file mode 100644 index 1c4bbfb55793..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestMergeEntity-variables.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com -TABLES_COSMOS_ACCOUNT_NAME: seankaneprim -TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== -randomSeed: "1627334298" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestMergeEntity.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestMergeEntity.yaml deleted file mode 100644 index 5cadabeb0d9d..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestMergeEntity.yaml +++ /dev/null @@ -1,217 +0,0 @@ ---- -version: 1 -interactions: -- request: - body: '{"TableName":"gotablezr188z9hv9uc3"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "36" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 21:18:18 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/Tables - method: POST - response: - body: '{"TableName":"gotablezr188z9hv9uc3","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' - headers: - Content-Type: - - application/json;odata=minimalmetadata - Date: - - Mon, 26 Jul 2021 21:18:18 GMT - Etag: - - W/"datetime'2021-07-26T21%3A18%3A19.0668808Z'" - Location: - - https://seankaneprim.table.cosmos.azure.com/Tables('gotablezr188z9hv9uc3') - X-Ms-Request-Id: - - f0329b0a-6fe1-40c0-b3cb-896ade7902d3 - status: 201 Created - code: 201 - duration: "" -- request: - body: '{"Bool":true,"Integer":1,"PartitionKey":"partition","RowKey":"1","String":"some - string 1","Timestamp":"0001-01-01T00:00:00Z"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "125" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - Prefer: - - return-no-content - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 21:18:19 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotablezr188z9hv9uc3 - method: POST - response: - body: "" - headers: - Date: - - Mon, 26 Jul 2021 21:18:19 GMT - Etag: - - W/"datetime'2021-07-26T21%3A18%3A19.7497864Z'" - Location: - - https://seankaneprim.table.cosmos.azure.com/gotablezr188z9hv9uc3(PartitionKey='partition',RowKey='1') - Preference-Applied: - - return-no-content - X-Ms-Request-Id: - - 23b24dce-a8c8-4e1c-bdbd-d62a8e321bdb - status: 204 No Content - code: 204 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 21:18:19 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotablezr188z9hv9uc3(PartitionKey='partition',RowKey='1') - method: GET - response: - body: '{"odata.metadata":"https://seankaneprim.table.cosmos.azure.com/gotablezr188z9hv9uc3/$metadata#gotablezr188z9hv9uc3/@Element","odata.etag":"W/\"datetime''2021-07-26T21%3A18%3A19.7497864Z''\"","Bool":true,"Integer":1,"PartitionKey":"partition","RowKey":"1","String":"some - string 1","Timestamp":"2021-07-26T21:18:19.7497864Z"}' - headers: - Content-Type: - - application/json;odata=minimalmetadata - Date: - - Mon, 26 Jul 2021 21:18:19 GMT - Etag: - - W/"datetime'2021-07-26T21%3A18%3A19.7497864Z'" - X-Ms-Request-Id: - - b0f7b5ba-c2bc-4a56-ba6c-76e5b41a8211 - status: 200 OK - code: 200 - duration: "" -- request: - body: '{"Bool":true,"Integer":1,"MergeProperty":"foo","PartitionKey":"partition","RowKey":"1","String":"some - string 1","Timestamp":"0001-01-01T00:00:00Z"}' - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - Content-Length: - - "147" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - If-Match: - - '*' - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Http-Method: - - MERGE - X-Ms-Date: - - Mon, 26 Jul 2021 21:18:19 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotablezr188z9hv9uc3(PartitionKey='partition',RowKey='1') - method: POST - response: - body: "" - headers: - Date: - - Mon, 26 Jul 2021 21:18:19 GMT - Etag: - - W/"datetime'2021-07-26T21%3A18%3A19.9927816Z'" - X-Ms-Request-Id: - - 95429ed4-67e7-4270-a5b5-1b0b245e2d80 - status: 204 No Content - code: 204 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 21:18:20 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotablezr188z9hv9uc3()?%24filter=RowKey+eq+%271%27 - method: GET - response: - body: '{"value":[{"odata.etag":"W/\"datetime''2021-07-26T21%3A18%3A19.9927816Z''\"","Bool":true,"Integer":1,"PartitionKey":"partition","RowKey":"1","String":"some - string 1","MergeProperty":"foo","Timestamp":"2021-07-26T21:18:19.9927816Z"}],"odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#gotablezr188z9hv9uc3"}' - headers: - Content-Type: - - application/json;odata=minimalmetadata - Date: - - Mon, 26 Jul 2021 21:18:19 GMT - X-Ms-Request-Id: - - 055b6162-21a8-48e2-a157-6192f4556921 - status: 200 OK - code: 200 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 21:18:20 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/Tables('gotablezr188z9hv9uc3') - method: DELETE - response: - body: "" - headers: - Date: - - Mon, 26 Jul 2021 21:18:20 GMT - X-Ms-Request-Id: - - 6c4d934e-a223-4d05-826e-d3e852129309 - status: 204 No Content - code: 204 - duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestQueryComplexEntity-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestQueryComplexEntity-variables.yaml deleted file mode 100644 index 8e977e00cefc..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestQueryComplexEntity-variables.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com -TABLES_COSMOS_ACCOUNT_NAME: seankaneprim -TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== -randomSeed: "1627334300" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestQueryComplexEntity.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestQueryComplexEntity.yaml deleted file mode 100644 index d05faba94344..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestQueryComplexEntity.yaml +++ /dev/null @@ -1,305 +0,0 @@ ---- -version: 1 -interactions: -- request: - body: '{"TableName":"gotablemkrsh3811z3ws"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "36" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 21:18:20 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/Tables - method: POST - response: - body: '{"TableName":"gotablemkrsh3811z3ws","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' - headers: - Content-Type: - - application/json;odata=minimalmetadata - Date: - - Mon, 26 Jul 2021 21:18:20 GMT - Etag: - - W/"datetime'2021-07-26T21%3A18%3A20.9903624Z'" - Location: - - https://seankaneprim.table.cosmos.azure.com/Tables('gotablemkrsh3811z3ws') - X-Ms-Request-Id: - - cbbfcced-1e35-482d-a0be-96b29d4deaa2 - status: 201 Created - code: 201 - duration: "" -- request: - body: '{"Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":1,"PartitionKey":"partition","RowKey":"1","String":"someString","Timestamp":"0001-01-01T00:00:00Z"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "194" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - Prefer: - - return-no-content - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 21:18:21 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotablemkrsh3811z3ws - method: POST - response: - body: "" - headers: - Date: - - Mon, 26 Jul 2021 21:18:20 GMT - Etag: - - W/"datetime'2021-07-26T21%3A18%3A21.6422408Z'" - Location: - - https://seankaneprim.table.cosmos.azure.com/gotablemkrsh3811z3ws(PartitionKey='partition',RowKey='1') - Preference-Applied: - - return-no-content - X-Ms-Request-Id: - - 3b17fed7-bb7a-43c4-8a36-fcdf200e9268 - status: 204 No Content - code: 204 - duration: "" -- request: - body: '{"Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":2,"PartitionKey":"partition","RowKey":"2","String":"someString","Timestamp":"0001-01-01T00:00:00Z"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "194" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - Prefer: - - return-no-content - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 21:18:21 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotablemkrsh3811z3ws - method: POST - response: - body: "" - headers: - Date: - - Mon, 26 Jul 2021 21:18:21 GMT - Etag: - - W/"datetime'2021-07-26T21%3A18%3A21.7636872Z'" - Location: - - https://seankaneprim.table.cosmos.azure.com/gotablemkrsh3811z3ws(PartitionKey='partition',RowKey='2') - Preference-Applied: - - return-no-content - X-Ms-Request-Id: - - 3ed41e41-d14b-49ed-a2ef-32467f57f687 - status: 204 No Content - code: 204 - duration: "" -- request: - body: '{"Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":3,"PartitionKey":"partition","RowKey":"3","String":"someString","Timestamp":"0001-01-01T00:00:00Z"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "194" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - Prefer: - - return-no-content - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 21:18:21 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotablemkrsh3811z3ws - method: POST - response: - body: "" - headers: - Date: - - Mon, 26 Jul 2021 21:18:21 GMT - Etag: - - W/"datetime'2021-07-26T21%3A18%3A21.9247624Z'" - Location: - - https://seankaneprim.table.cosmos.azure.com/gotablemkrsh3811z3ws(PartitionKey='partition',RowKey='3') - Preference-Applied: - - return-no-content - X-Ms-Request-Id: - - ec2cb865-39cd-49da-8b4b-e31dd5f5b32c - status: 204 No Content - code: 204 - duration: "" -- request: - body: '{"Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":4,"PartitionKey":"partition","RowKey":"4","String":"someString","Timestamp":"0001-01-01T00:00:00Z"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "194" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - Prefer: - - return-no-content - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 21:18:21 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotablemkrsh3811z3ws - method: POST - response: - body: "" - headers: - Date: - - Mon, 26 Jul 2021 21:18:21 GMT - Etag: - - W/"datetime'2021-07-26T21%3A18%3A22.0864520Z'" - Location: - - https://seankaneprim.table.cosmos.azure.com/gotablemkrsh3811z3ws(PartitionKey='partition',RowKey='4') - Preference-Applied: - - return-no-content - X-Ms-Request-Id: - - 2b173e44-05d9-4133-b580-4432e80572eb - status: 204 No Content - code: 204 - duration: "" -- request: - body: '{"Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":5,"PartitionKey":"partition","RowKey":"5","String":"someString","Timestamp":"0001-01-01T00:00:00Z"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "194" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - Prefer: - - return-no-content - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 21:18:21 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotablemkrsh3811z3ws - method: POST - response: - body: "" - headers: - Date: - - Mon, 26 Jul 2021 21:18:21 GMT - Etag: - - W/"datetime'2021-07-26T21%3A18%3A22.2039048Z'" - Location: - - https://seankaneprim.table.cosmos.azure.com/gotablemkrsh3811z3ws(PartitionKey='partition',RowKey='5') - Preference-Applied: - - return-no-content - X-Ms-Request-Id: - - 12047e96-ba32-4634-b0f9-cc842b0226d9 - status: 204 No Content - code: 204 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 21:18:22 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotablemkrsh3811z3ws()?%24filter=RowKey+lt+%275%27 - method: GET - response: - body: '{"value":[{"odata.etag":"W/\"datetime''2021-07-26T21%3A18%3A21.6422408Z''\"","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":1,"PartitionKey":"partition","RowKey":"1","String":"someString","Timestamp":"2021-07-26T21:18:21.6422408Z"},{"odata.etag":"W/\"datetime''2021-07-26T21%3A18%3A21.7636872Z''\"","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":2,"PartitionKey":"partition","RowKey":"2","String":"someString","Timestamp":"2021-07-26T21:18:21.7636872Z"},{"odata.etag":"W/\"datetime''2021-07-26T21%3A18%3A21.9247624Z''\"","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":3,"PartitionKey":"partition","RowKey":"3","String":"someString","Timestamp":"2021-07-26T21:18:21.9247624Z"},{"odata.etag":"W/\"datetime''2021-07-26T21%3A18%3A22.0864520Z''\"","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":4,"PartitionKey":"partition","RowKey":"4","String":"someString","Timestamp":"2021-07-26T21:18:22.0864520Z"}],"odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#gotablemkrsh3811z3ws"}' - headers: - Content-Type: - - application/json;odata=minimalmetadata - Date: - - Mon, 26 Jul 2021 21:18:21 GMT - X-Ms-Request-Id: - - 80e7147e-6476-446e-bd73-fe2014956211 - status: 200 OK - code: 200 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 21:18:22 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/Tables('gotablemkrsh3811z3ws') - method: DELETE - response: - body: "" - headers: - Date: - - Mon, 26 Jul 2021 21:18:22 GMT - X-Ms-Request-Id: - - 0343cb5c-bc12-4406-b4d5-27682bbd0c0e - status: 204 No Content - code: 204 - duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestQuerySimpleEntity-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestQuerySimpleEntity-variables.yaml deleted file mode 100644 index 95753821ed2f..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestQuerySimpleEntity-variables.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com -TABLES_COSMOS_ACCOUNT_NAME: seankaneprim -TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== -randomSeed: "1627334302" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestQuerySimpleEntity.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestQuerySimpleEntity.yaml deleted file mode 100644 index 83424f717ebc..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestQuerySimpleEntity.yaml +++ /dev/null @@ -1,314 +0,0 @@ ---- -version: 1 -interactions: -- request: - body: '{"TableName":"gotableh1ewd0kw2klwi"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "36" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 21:18:22 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/Tables - method: POST - response: - body: '{"TableName":"gotableh1ewd0kw2klwi","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' - headers: - Content-Type: - - application/json;odata=minimalmetadata - Date: - - Mon, 26 Jul 2021 21:18:22 GMT - Etag: - - W/"datetime'2021-07-26T21%3A18%3A22.8660232Z'" - Location: - - https://seankaneprim.table.cosmos.azure.com/Tables('gotableh1ewd0kw2klwi') - X-Ms-Request-Id: - - d78ad102-43c7-4aec-9f72-c16a4ad05e20 - status: 201 Created - code: 201 - duration: "" -- request: - body: '{"Bool":true,"Integer":1,"PartitionKey":"partition","RowKey":"1","String":"some - string 1","Timestamp":"0001-01-01T00:00:00Z"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "125" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - Prefer: - - return-no-content - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 21:18:23 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotableh1ewd0kw2klwi - method: POST - response: - body: "" - headers: - Date: - - Mon, 26 Jul 2021 21:18:22 GMT - Etag: - - W/"datetime'2021-07-26T21%3A18%3A23.5078664Z'" - Location: - - https://seankaneprim.table.cosmos.azure.com/gotableh1ewd0kw2klwi(PartitionKey='partition',RowKey='1') - Preference-Applied: - - return-no-content - X-Ms-Request-Id: - - ef9cbbaa-8031-4895-ac46-da9fb206d398 - status: 204 No Content - code: 204 - duration: "" -- request: - body: '{"Bool":true,"Integer":2,"PartitionKey":"partition","RowKey":"2","String":"some - string 2","Timestamp":"0001-01-01T00:00:00Z"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "125" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - Prefer: - - return-no-content - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 21:18:23 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotableh1ewd0kw2klwi - method: POST - response: - body: "" - headers: - Date: - - Mon, 26 Jul 2021 21:18:22 GMT - Etag: - - W/"datetime'2021-07-26T21%3A18%3A23.6566536Z'" - Location: - - https://seankaneprim.table.cosmos.azure.com/gotableh1ewd0kw2klwi(PartitionKey='partition',RowKey='2') - Preference-Applied: - - return-no-content - X-Ms-Request-Id: - - 8f17d4fa-b98a-4f10-ac11-f012a99077c3 - status: 204 No Content - code: 204 - duration: "" -- request: - body: '{"Bool":true,"Integer":3,"PartitionKey":"partition","RowKey":"3","String":"some - string 3","Timestamp":"0001-01-01T00:00:00Z"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "125" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - Prefer: - - return-no-content - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 21:18:23 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotableh1ewd0kw2klwi - method: POST - response: - body: "" - headers: - Date: - - Mon, 26 Jul 2021 21:18:23 GMT - Etag: - - W/"datetime'2021-07-26T21%3A18%3A23.7676552Z'" - Location: - - https://seankaneprim.table.cosmos.azure.com/gotableh1ewd0kw2klwi(PartitionKey='partition',RowKey='3') - Preference-Applied: - - return-no-content - X-Ms-Request-Id: - - aa32ff1c-6367-4f89-81bb-56bfa6c35798 - status: 204 No Content - code: 204 - duration: "" -- request: - body: '{"Bool":true,"Integer":4,"PartitionKey":"partition","RowKey":"4","String":"some - string 4","Timestamp":"0001-01-01T00:00:00Z"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "125" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - Prefer: - - return-no-content - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 21:18:23 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotableh1ewd0kw2klwi - method: POST - response: - body: "" - headers: - Date: - - Mon, 26 Jul 2021 21:18:23 GMT - Etag: - - W/"datetime'2021-07-26T21%3A18%3A23.8920712Z'" - Location: - - https://seankaneprim.table.cosmos.azure.com/gotableh1ewd0kw2klwi(PartitionKey='partition',RowKey='4') - Preference-Applied: - - return-no-content - X-Ms-Request-Id: - - fbe73b67-08a4-4d29-a022-a2043435072d - status: 204 No Content - code: 204 - duration: "" -- request: - body: '{"Bool":true,"Integer":5,"PartitionKey":"partition","RowKey":"5","String":"some - string 5","Timestamp":"0001-01-01T00:00:00Z"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "125" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - Prefer: - - return-no-content - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 21:18:23 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotableh1ewd0kw2klwi - method: POST - response: - body: "" - headers: - Date: - - Mon, 26 Jul 2021 21:18:23 GMT - Etag: - - W/"datetime'2021-07-26T21%3A18%3A24.0051208Z'" - Location: - - https://seankaneprim.table.cosmos.azure.com/gotableh1ewd0kw2klwi(PartitionKey='partition',RowKey='5') - Preference-Applied: - - return-no-content - X-Ms-Request-Id: - - 40d88583-4420-42e2-ac2b-e992e43413b9 - status: 204 No Content - code: 204 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 21:18:23 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotableh1ewd0kw2klwi()?%24filter=RowKey+lt+%275%27 - method: GET - response: - body: '{"value":[{"odata.etag":"W/\"datetime''2021-07-26T21%3A18%3A23.5078664Z''\"","Bool":true,"Integer":1,"PartitionKey":"partition","RowKey":"1","String":"some - string 1","Timestamp":"2021-07-26T21:18:23.5078664Z"},{"odata.etag":"W/\"datetime''2021-07-26T21%3A18%3A23.6566536Z''\"","Bool":true,"Integer":2,"PartitionKey":"partition","RowKey":"2","String":"some - string 2","Timestamp":"2021-07-26T21:18:23.6566536Z"},{"odata.etag":"W/\"datetime''2021-07-26T21%3A18%3A23.7676552Z''\"","Bool":true,"Integer":3,"PartitionKey":"partition","RowKey":"3","String":"some - string 3","Timestamp":"2021-07-26T21:18:23.7676552Z"},{"odata.etag":"W/\"datetime''2021-07-26T21%3A18%3A23.8920712Z''\"","Bool":true,"Integer":4,"PartitionKey":"partition","RowKey":"4","String":"some - string 4","Timestamp":"2021-07-26T21:18:23.8920712Z"}],"odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#gotableh1ewd0kw2klwi"}' - headers: - Content-Type: - - application/json;odata=minimalmetadata - Date: - - Mon, 26 Jul 2021 21:18:23 GMT - X-Ms-Request-Id: - - f6504c08-cc19-4aa1-aa2b-1b290b877e8b - status: 200 OK - code: 200 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 21:18:24 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/Tables('gotableh1ewd0kw2klwi') - method: DELETE - response: - body: "" - headers: - Date: - - Mon, 26 Jul 2021 21:18:23 GMT - X-Ms-Request-Id: - - 2d5423c5-bd49-49f1-89c3-ac2dacd6f244 - status: 204 No Content - code: 204 - duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestServiceErrors-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestServiceErrors-variables.yaml deleted file mode 100644 index 37a09a3b278d..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestServiceErrors-variables.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com -TABLES_COSMOS_ACCOUNT_NAME: seankaneprim -TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== -randomSeed: "1627334304" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestServiceErrors.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestServiceErrors.yaml deleted file mode 100644 index d14758a4b2ce..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestServiceErrors.yaml +++ /dev/null @@ -1,105 +0,0 @@ ---- -version: 1 -interactions: -- request: - body: '{"TableName":"gotablehbb6pzx61ag1m"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "36" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 21:18:24 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/Tables - method: POST - response: - body: '{"TableName":"gotablehbb6pzx61ag1m","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' - headers: - Content-Type: - - application/json;odata=minimalmetadata - Date: - - Mon, 26 Jul 2021 21:18:24 GMT - Etag: - - W/"datetime'2021-07-26T21%3A18%3A24.7500808Z'" - Location: - - https://seankaneprim.table.cosmos.azure.com/Tables('gotablehbb6pzx61ag1m') - X-Ms-Request-Id: - - 1f820d6d-07dc-4a45-b547-0ac1e2d9ffbc - status: 201 Created - code: 201 - duration: "" -- request: - body: '{"TableName":"gotablehbb6pzx61ag1m"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "36" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 21:18:25 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/Tables - method: POST - response: - body: "{\"odata.error\":{\"code\":\"TableAlreadyExists\",\"message\":{\"lang\":\"en-us\",\"value\":\"The - specified table already exists.\\nRequestID:d6bf8608-bce6-47de-abf4-d16ffc554997\\n\"}}}\r\n" - headers: - Content-Type: - - application/json;odata=minimalmetadata - Date: - - Mon, 26 Jul 2021 21:18:24 GMT - X-Ms-Request-Id: - - d6bf8608-bce6-47de-abf4-d16ffc554997 - status: 409 Conflict - code: 409 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 21:18:25 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/Tables('gotablehbb6pzx61ag1m') - method: DELETE - response: - body: "" - headers: - Date: - - Mon, 26 Jul 2021 21:18:25 GMT - X-Ms-Request-Id: - - 8432df94-cd39-4748-b441-ced3b3ffd118 - status: 204 No Content - code: 204 - duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestSetAccessPolicy-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestSetAccessPolicy-variables.yaml deleted file mode 100644 index 4944bc270a8f..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestSetAccessPolicy-variables.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com -TABLES_COSMOS_ACCOUNT_NAME: seankaneprim -TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestSetEmptyAccessPolicy-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestSetEmptyAccessPolicy-variables.yaml deleted file mode 100644 index 4944bc270a8f..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestSetEmptyAccessPolicy-variables.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com -TABLES_COSMOS_ACCOUNT_NAME: seankaneprim -TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestSetMultipleAccessPolicies-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestSetMultipleAccessPolicies-variables.yaml deleted file mode 100644 index 4944bc270a8f..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestSetMultipleAccessPolicies-variables.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com -TABLES_COSMOS_ACCOUNT_NAME: seankaneprim -TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestSetNullAccessPolicy-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestSetNullAccessPolicy-variables.yaml deleted file mode 100644 index 4944bc270a8f..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestSetNullAccessPolicy-variables.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com -TABLES_COSMOS_ACCOUNT_NAME: seankaneprim -TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestSetTooManyAccessPolicies-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestSetTooManyAccessPolicies-variables.yaml deleted file mode 100644 index 4944bc270a8f..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestSetTooManyAccessPolicies-variables.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com -TABLES_COSMOS_ACCOUNT_NAME: seankaneprim -TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestUpsertEntity-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestUpsertEntity-variables.yaml deleted file mode 100644 index 045228a36f3b..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestUpsertEntity-variables.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -COSMOS_TABLES_ENDPOINT_SUFFIX: cosmos.azure.com -TABLES_COSMOS_ACCOUNT_NAME: seankaneprim -TABLES_PRIMARY_COSMOS_ACCOUNT_KEY: Kg== -randomSeed: "1627334305" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestUpsertEntity.yaml b/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestUpsertEntity.yaml deleted file mode 100644 index 9ff066158682..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Cosmos/TestUpsertEntity.yaml +++ /dev/null @@ -1,211 +0,0 @@ ---- -version: 1 -interactions: -- request: - body: '{"TableName":"gotablex9uvqs8kjp1tm"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "36" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 21:18:25 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/Tables - method: POST - response: - body: '{"TableName":"gotablex9uvqs8kjp1tm","odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element"}' - headers: - Content-Type: - - application/json;odata=minimalmetadata - Date: - - Mon, 26 Jul 2021 21:18:25 GMT - Etag: - - W/"datetime'2021-07-26T21%3A18%3A25.9556360Z'" - Location: - - https://seankaneprim.table.cosmos.azure.com/Tables('gotablex9uvqs8kjp1tm') - X-Ms-Request-Id: - - c9a4b9e2-c230-4825-892d-0b594fce3a31 - status: 201 Created - code: 201 - duration: "" -- request: - body: '{"Bool":true,"Integer":1,"PartitionKey":"partition","RowKey":"1","String":"some - string 1","Timestamp":"0001-01-01T00:00:00Z"}' - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - Content-Length: - - "125" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 21:18:26 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotablex9uvqs8kjp1tm(PartitionKey='partition',RowKey='1') - method: PUT - response: - body: "" - headers: - Content-Type: - - application/json - Date: - - Mon, 26 Jul 2021 21:18:25 GMT - Etag: - - W/"datetime'2021-07-26T21%3A18%3A26.6441736Z'" - X-Ms-Request-Id: - - 95ecc26c-d6d8-44f9-99e9-a5de86c511e3 - status: 204 No Content - code: 204 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 21:18:26 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotablex9uvqs8kjp1tm(PartitionKey='partition',RowKey='1') - method: GET - response: - body: '{"odata.metadata":"https://seankaneprim.table.cosmos.azure.com/gotablex9uvqs8kjp1tm/$metadata#gotablex9uvqs8kjp1tm/@Element","odata.etag":"W/\"datetime''2021-07-26T21%3A18%3A26.6441736Z''\"","PartitionKey":"partition","RowKey":"1","Bool":true,"Integer":1,"String":"some - string 1","Timestamp":"2021-07-26T21:18:26.6441736Z"}' - headers: - Content-Type: - - application/json;odata=minimalmetadata - Date: - - Mon, 26 Jul 2021 21:18:26 GMT - Etag: - - W/"datetime'2021-07-26T21%3A18%3A26.6441736Z'" - X-Ms-Request-Id: - - 8c493a67-91d3-47d9-8624-2e396490b381 - status: 200 OK - code: 200 - duration: "" -- request: - body: '{"Integer":1,"MergeProperty":"foo","PartitionKey":"partition","RowKey":"1","String":"some - string 1"}' - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - Content-Length: - - "100" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 21:18:26 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotablex9uvqs8kjp1tm(PartitionKey='partition',RowKey='1') - method: PUT - response: - body: "" - headers: - Content-Type: - - application/json - Date: - - Mon, 26 Jul 2021 21:18:26 GMT - Etag: - - W/"datetime'2021-07-26T21%3A18%3A26.9022216Z'" - X-Ms-Request-Id: - - 32523b57-7b56-426c-8b7a-2903ceb4e111 - status: 204 No Content - code: 204 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 21:18:26 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/gotablex9uvqs8kjp1tm()?%24filter=RowKey+eq+%271%27 - method: GET - response: - body: '{"value":[{"odata.etag":"W/\"datetime''2021-07-26T21%3A18%3A26.9022216Z''\"","PartitionKey":"partition","RowKey":"1","Integer":1,"MergeProperty":"foo","String":"some - string 1","Timestamp":"2021-07-26T21:18:26.9022216Z"}],"odata.metadata":"https://seankaneprim.table.cosmos.azure.com/$metadata#gotablex9uvqs8kjp1tm"}' - headers: - Content-Type: - - application/json;odata=minimalmetadata - Date: - - Mon, 26 Jul 2021 21:18:26 GMT - X-Ms-Request-Id: - - 0feeaf9a-c018-4386-9047-277afd1adc25 - status: 200 OK - code: 200 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 21:18:26 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.cosmos.azure.com/Tables('gotablex9uvqs8kjp1tm') - method: DELETE - response: - body: "" - headers: - Date: - - Mon, 26 Jul 2021 21:18:26 GMT - X-Ms-Request-Id: - - 50b4ac8f-d2d9-4fb5-9485-eb8b8eff2ce4 - status: 204 No Content - code: 204 - duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestAddAnnotatedEntity-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestAddAnnotatedEntity-variables.yaml deleted file mode 100644 index 331538565832..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestAddAnnotatedEntity-variables.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -STORAGE_ENDPOINT_SUFFIX: core.windows.net -TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== -TABLES_STORAGE_ACCOUNT_NAME: seankaneprim -randomSeed: "1626389965" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestAddAnnotatedEntity.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestAddAnnotatedEntity.yaml deleted file mode 100644 index 0339bf6ce2f7..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestAddAnnotatedEntity.yaml +++ /dev/null @@ -1,218 +0,0 @@ ---- -version: 1 -interactions: -- request: - body: '{"TableName":"gotablenlmsiw089e5um"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "36" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Thu, 15 Jul 2021 22:59:25 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/Tables - method: POST - response: - body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotablenlmsiw089e5um"}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - Date: - - Thu, 15 Jul 2021 22:59:25 GMT - Location: - - https://seankaneprim.table.core.windows.net/Tables('gotablenlmsiw089e5um') - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 3a32c11b-f002-006e-57cd-79bd5a000000 - X-Ms-Version: - - "2019-02-02" - status: 201 Created - code: 201 - duration: "" -- request: - body: '{"Binary":"YmluYXJ5","Binary@odata.type":"Edm.Binary","Bool":true,"Bool@odata.type":"Edm.Boolean","DateType":"2021-04-01T01:01:01.000000001Z","DateType@odata.type":"Edm.DateTime","FloatType":8589934592,"FloatType@odata.type":"Edm.Double","PartitionKey":"partition","RowKey":"1","Small":10,"Small@odata.type":"Edm.Int32","Stringy":"somestring","Stringy@odata.type":"Edm.String","Timestamp":"0001-01-01T00:00:00Z","large":"1125899906842624","large@odata.type":"Edm.Int64"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "470" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - Prefer: - - return-no-content - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Thu, 15 Jul 2021 22:59:26 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/gotablenlmsiw089e5um - method: POST - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Dataserviceid: - - https://seankaneprim.table.core.windows.net/gotablenlmsiw089e5um(PartitionKey='partition',RowKey='1') - Date: - - Thu, 15 Jul 2021 22:59:25 GMT - Etag: - - W/"datetime'2021-07-15T22%3A59%3A26.079513Z'" - Location: - - https://seankaneprim.table.core.windows.net/gotablenlmsiw089e5um(PartitionKey='partition',RowKey='1') - Preference-Applied: - - return-no-content - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 3a32c150-f002-006e-05cd-79bd5a000000 - X-Ms-Version: - - "2019-02-02" - status: 204 No Content - code: 204 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Thu, 15 Jul 2021 22:59:26 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/gotablenlmsiw089e5um(PartitionKey='partition',RowKey='1')?%24format=application%2Fjson%3Bodata%3Dfullmetadata - method: GET - response: - body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#gotablenlmsiw089e5um/@Element","odata.type":"seankaneprim.gotablenlmsiw089e5um","odata.id":"https://seankaneprim.table.core.windows.net/gotablenlmsiw089e5um(PartitionKey=''partition'',RowKey=''1'')","odata.etag":"W/\"datetime''2021-07-15T22%3A59%3A26.079513Z''\"","odata.editLink":"gotablenlmsiw089e5um(PartitionKey=''partition'',RowKey=''1'')","PartitionKey":"partition","RowKey":"1","Timestamp@odata.type":"Edm.DateTime","Timestamp":"2021-07-15T22:59:26.079513Z","Binary@odata.type":"Edm.Binary","Binary":"YmluYXJ5","Bool":true,"DateType@odata.type":"Edm.DateTime","DateType":"2021-04-01T01:01:01Z","FloatType":8589934592.0,"Small":10,"Stringy":"somestring","large@odata.type":"Edm.Int64","large":"1125899906842624"}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json;odata=fullmetadata;streaming=true;charset=utf-8 - Date: - - Thu, 15 Jul 2021 22:59:26 GMT - Etag: - - W/"datetime'2021-07-15T22%3A59%3A26.079513Z'" - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 3a32c181-f002-006e-2ecd-79bd5a000000 - X-Ms-Version: - - "2019-02-02" - status: 200 OK - code: 200 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Thu, 15 Jul 2021 22:59:26 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/gotablenlmsiw089e5um()?%24filter=PartitionKey+eq+%27partition%27 - method: GET - response: - body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#gotablenlmsiw089e5um","value":[{"odata.etag":"W/\"datetime''2021-07-15T22%3A59%3A26.079513Z''\"","PartitionKey":"partition","RowKey":"1","Timestamp":"2021-07-15T22:59:26.079513Z","Binary@odata.type":"Edm.Binary","Binary":"YmluYXJ5","Bool":true,"DateType@odata.type":"Edm.DateTime","DateType":"2021-04-01T01:01:01Z","FloatType":8589934592.0,"Small":10,"Stringy":"somestring","large@odata.type":"Edm.Int64","large":"1125899906842624"}]}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - Date: - - Thu, 15 Jul 2021 22:59:26 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 3a32c1a5-f002-006e-4ecd-79bd5a000000 - X-Ms-Version: - - "2019-02-02" - status: 200 OK - code: 200 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Thu, 15 Jul 2021 22:59:26 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/Tables('gotablenlmsiw089e5um') - method: DELETE - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Date: - - Thu, 15 Jul 2021 22:59:26 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 3a32c1c6-f002-006e-6dcd-79bd5a000000 - X-Ms-Version: - - "2019-02-02" - status: 204 No Content - code: 204 - duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestAddBasicEntity-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestAddBasicEntity-variables.yaml deleted file mode 100644 index 5b56622a377b..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestAddBasicEntity-variables.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -STORAGE_ENDPOINT_SUFFIX: core.windows.net -TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== -TABLES_STORAGE_ACCOUNT_NAME: seankaneprim -randomSeed: "1626385900" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestAddBasicEntity.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestAddBasicEntity.yaml deleted file mode 100644 index f78f1906ec1b..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestAddBasicEntity.yaml +++ /dev/null @@ -1,218 +0,0 @@ ---- -version: 1 -interactions: -- request: - body: '{"TableName":"gotablezp1d18k5xiawn"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "36" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Thu, 15 Jul 2021 21:51:40 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/Tables - method: POST - response: - body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotablezp1d18k5xiawn"}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - Date: - - Thu, 15 Jul 2021 21:51:39 GMT - Location: - - https://seankaneprim.table.core.windows.net/Tables('gotablezp1d18k5xiawn') - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 2eb5e556-0002-008e-52c3-793ec3000000 - X-Ms-Version: - - "2019-02-02" - status: 201 Created - code: 201 - duration: "" -- request: - body: '{"Bool":true,"Integer":10,"PartitionKey":"pk001","RowKey":"rk001","String":"abcdef","Timestamp":"0001-01-01T00:00:00Z"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "119" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - Prefer: - - return-no-content - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Thu, 15 Jul 2021 21:51:40 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/gotablezp1d18k5xiawn - method: POST - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Dataserviceid: - - https://seankaneprim.table.core.windows.net/gotablezp1d18k5xiawn(PartitionKey='pk001',RowKey='rk001') - Date: - - Thu, 15 Jul 2021 21:51:39 GMT - Etag: - - W/"datetime'2021-07-15T21%3A51%3A39.9360235Z'" - Location: - - https://seankaneprim.table.core.windows.net/gotablezp1d18k5xiawn(PartitionKey='pk001',RowKey='rk001') - Preference-Applied: - - return-no-content - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 2eb5e589-0002-008e-02c3-793ec3000000 - X-Ms-Version: - - "2019-02-02" - status: 204 No Content - code: 204 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Thu, 15 Jul 2021 21:51:41 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/gotablezp1d18k5xiawn(PartitionKey='pk001',RowKey='rk001') - method: GET - response: - body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#gotablezp1d18k5xiawn/@Element","odata.etag":"W/\"datetime''2021-07-15T21%3A51%3A39.9360235Z''\"","PartitionKey":"pk001","RowKey":"rk001","Timestamp":"2021-07-15T21:51:39.9360235Z","Bool":true,"Integer":10,"String":"abcdef"}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - Date: - - Thu, 15 Jul 2021 21:51:39 GMT - Etag: - - W/"datetime'2021-07-15T21%3A51%3A39.9360235Z'" - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 2eb5e5b9-0002-008e-32c3-793ec3000000 - X-Ms-Version: - - "2019-02-02" - status: 200 OK - code: 200 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Thu, 15 Jul 2021 21:51:41 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/gotablezp1d18k5xiawn()?%24filter=PartitionKey+eq+%27pk001%27 - method: GET - response: - body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#gotablezp1d18k5xiawn","value":[{"odata.etag":"W/\"datetime''2021-07-15T21%3A51%3A39.9360235Z''\"","PartitionKey":"pk001","RowKey":"rk001","Timestamp":"2021-07-15T21:51:39.9360235Z","Bool":true,"Integer":10,"String":"abcdef"}]}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - Date: - - Thu, 15 Jul 2021 21:51:39 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 2eb5e5f5-0002-008e-6ac3-793ec3000000 - X-Ms-Version: - - "2019-02-02" - status: 200 OK - code: 200 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Thu, 15 Jul 2021 21:51:41 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/Tables('gotablezp1d18k5xiawn') - method: DELETE - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Date: - - Thu, 15 Jul 2021 21:51:39 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 2eb5e617-0002-008e-0cc3-793ec3000000 - X-Ms-Version: - - "2019-02-02" - status: 204 No Content - code: 204 - duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestAddComplexEntity-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestAddComplexEntity-variables.yaml deleted file mode 100644 index 6ffdde6abbca..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestAddComplexEntity-variables.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -STORAGE_ENDPOINT_SUFFIX: core.windows.net -TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== -TABLES_STORAGE_ACCOUNT_NAME: seankaneprim -randomSeed: "1626385877" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestAddComplexEntity.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestAddComplexEntity.yaml deleted file mode 100644 index 7139552a3594..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestAddComplexEntity.yaml +++ /dev/null @@ -1,138 +0,0 @@ ---- -version: 1 -interactions: -- request: - body: '{"TableName":"gotablep6e6qfifgukvi"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "36" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Thu, 15 Jul 2021 21:51:17 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/Tables - method: POST - response: - body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotablep6e6qfifgukvi"}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - Date: - - Thu, 15 Jul 2021 21:51:17 GMT - Location: - - https://seankaneprim.table.core.windows.net/Tables('gotablep6e6qfifgukvi') - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - e67a0c95-2002-006d-35c3-795c3e000000 - X-Ms-Version: - - "2019-02-02" - status: 201 Created - code: 201 - duration: "" -- request: - body: '{"Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":1,"PartitionKey":"partition","RowKey":"1","String":"someString","Timestamp":"0001-01-01T00:00:00Z"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "194" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - Prefer: - - return-no-content - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Thu, 15 Jul 2021 21:51:18 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/gotablep6e6qfifgukvi - method: POST - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Dataserviceid: - - https://seankaneprim.table.core.windows.net/gotablep6e6qfifgukvi(PartitionKey='partition',RowKey='1') - Date: - - Thu, 15 Jul 2021 21:51:17 GMT - Etag: - - W/"datetime'2021-07-15T21%3A51%3A17.2884107Z'" - Location: - - https://seankaneprim.table.core.windows.net/gotablep6e6qfifgukvi(PartitionKey='partition',RowKey='1') - Preference-Applied: - - return-no-content - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - e67a0cf7-2002-006d-12c3-795c3e000000 - X-Ms-Version: - - "2019-02-02" - status: 204 No Content - code: 204 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Thu, 15 Jul 2021 21:51:18 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/Tables('gotablep6e6qfifgukvi') - method: DELETE - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Date: - - Thu, 15 Jul 2021 21:51:17 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - e67a0d21-2002-006d-3bc3-795c3e000000 - X-Ms-Version: - - "2019-02-02" - status: 204 No Content - code: 204 - duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestAddEntity-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestAddEntity-variables.yaml deleted file mode 100644 index 4e5a52d72a54..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestAddEntity-variables.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -STORAGE_ENDPOINT_SUFFIX: core.windows.net -TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== -TABLES_STORAGE_ACCOUNT_NAME: seankaneprim -randomSeed: "1628004297" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestAddEntity.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestAddEntity.yaml deleted file mode 100644 index b146352f7072..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestAddEntity.yaml +++ /dev/null @@ -1,139 +0,0 @@ ---- -version: 1 -interactions: -- request: - body: '{"TableName":"gotabled7jd6vj608h1o"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "36" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Tue, 03 Aug 2021 15:24:57 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/Tables - method: POST - response: - body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotabled7jd6vj608h1o"}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - Date: - - Tue, 03 Aug 2021 15:24:56 GMT - Location: - - https://seankaneprim.table.core.windows.net/Tables('gotabled7jd6vj608h1o') - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 4fc78663-9002-0068-277b-888ee5000000 - X-Ms-Version: - - "2019-02-02" - status: 201 Created - code: 201 - duration: "" -- request: - body: '{"Bool":true,"Integer":1,"PartitionKey":"partition","RowKey":"1","String":"some - string 1","Timestamp":"0001-01-01T00:00:00Z"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "125" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - Prefer: - - return-no-content - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Tue, 03 Aug 2021 15:24:57 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/gotabled7jd6vj608h1o - method: POST - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Dataserviceid: - - https://seankaneprim.table.core.windows.net/gotabled7jd6vj608h1o(PartitionKey='partition',RowKey='1') - Date: - - Tue, 03 Aug 2021 15:24:56 GMT - Etag: - - W/"datetime'2021-08-03T15%3A24%3A57.081626Z'" - Location: - - https://seankaneprim.table.core.windows.net/gotabled7jd6vj608h1o(PartitionKey='partition',RowKey='1') - Preference-Applied: - - return-no-content - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 4fc7868c-9002-0068-4c7b-888ee5000000 - X-Ms-Version: - - "2019-02-02" - status: 204 No Content - code: 204 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Tue, 03 Aug 2021 15:24:57 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/Tables('gotabled7jd6vj608h1o') - method: DELETE - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Date: - - Tue, 03 Aug 2021 15:24:56 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 4fc786bb-9002-0068-767b-888ee5000000 - X-Ms-Version: - - "2019-02-02" - status: 204 No Content - code: 204 - duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchAdd-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchAdd-variables.yaml deleted file mode 100644 index 2c01bda34195..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchAdd-variables.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -STORAGE_ENDPOINT_SUFFIX: core.windows.net -TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== -TABLES_STORAGE_ACCOUNT_NAME: seankaneprim -randomSeed: "1627331015" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchAdd.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchAdd.yaml deleted file mode 100644 index 3252fcf5dea0..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchAdd.yaml +++ /dev/null @@ -1,260 +0,0 @@ ---- -version: 1 -interactions: -- request: - body: '{"TableName":"gotableqyr2uxfpxphl9"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "36" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 20:23:35 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/Tables - method: POST - response: - body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotableqyr2uxfpxphl9"}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - Date: - - Mon, 26 Jul 2021 20:23:35 GMT - Location: - - https://seankaneprim.table.core.windows.net/Tables('gotableqyr2uxfpxphl9') - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 4bf66b53-5002-0077-1f5c-823de1000000 - X-Ms-Version: - - "2019-02-02" - status: 201 Created - code: 201 - duration: "" -- request: - body: "--batch_cc9aaa4d-bc76-46d4-6095-a1699a3c09ed\r\nContent-Type: multipart/mixed; - boundary=changeset_84fe6f6c-3438-40b7-6065-78ab685d467a\r\n\r\n--changeset_84fe6f6c-3438-40b7-6065-78ab685d467a\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotableqyr2uxfpxphl9?%24format=application%2Fjson%3Bodata%3Dminimalmetadata - HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 194\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Integer\":1,\"PartitionKey\":\"partition\",\"RowKey\":\"1\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_84fe6f6c-3438-40b7-6065-78ab685d467a\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotableqyr2uxfpxphl9?%24format=application%2Fjson%3Bodata%3Dminimalmetadata - HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 194\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Integer\":2,\"PartitionKey\":\"partition\",\"RowKey\":\"2\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_84fe6f6c-3438-40b7-6065-78ab685d467a\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotableqyr2uxfpxphl9?%24format=application%2Fjson%3Bodata%3Dminimalmetadata - HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 194\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Integer\":3,\"PartitionKey\":\"partition\",\"RowKey\":\"3\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_84fe6f6c-3438-40b7-6065-78ab685d467a\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotableqyr2uxfpxphl9?%24format=application%2Fjson%3Bodata%3Dminimalmetadata - HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 194\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Integer\":4,\"PartitionKey\":\"partition\",\"RowKey\":\"4\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_84fe6f6c-3438-40b7-6065-78ab685d467a\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotableqyr2uxfpxphl9?%24format=application%2Fjson%3Bodata%3Dminimalmetadata - HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 194\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Integer\":5,\"PartitionKey\":\"partition\",\"RowKey\":\"5\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_84fe6f6c-3438-40b7-6065-78ab685d467a\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotableqyr2uxfpxphl9?%24format=application%2Fjson%3Bodata%3Dminimalmetadata - HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 194\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Integer\":6,\"PartitionKey\":\"partition\",\"RowKey\":\"6\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_84fe6f6c-3438-40b7-6065-78ab685d467a\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotableqyr2uxfpxphl9?%24format=application%2Fjson%3Bodata%3Dminimalmetadata - HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 194\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Integer\":7,\"PartitionKey\":\"partition\",\"RowKey\":\"7\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_84fe6f6c-3438-40b7-6065-78ab685d467a\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotableqyr2uxfpxphl9?%24format=application%2Fjson%3Bodata%3Dminimalmetadata - HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 194\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Integer\":8,\"PartitionKey\":\"partition\",\"RowKey\":\"8\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_84fe6f6c-3438-40b7-6065-78ab685d467a\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotableqyr2uxfpxphl9?%24format=application%2Fjson%3Bodata%3Dminimalmetadata - HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 194\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Integer\":9,\"PartitionKey\":\"partition\",\"RowKey\":\"9\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_84fe6f6c-3438-40b7-6065-78ab685d467a\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotableqyr2uxfpxphl9?%24format=application%2Fjson%3Bodata%3Dminimalmetadata - HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 196\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Integer\":10,\"PartitionKey\":\"partition\",\"RowKey\":\"10\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_84fe6f6c-3438-40b7-6065-78ab685d467a--\r\n\r\n--batch_cc9aaa4d-bc76-46d4-6095-a1699a3c09ed--\r\n" - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "6550" - Content-Type: - - multipart/mixed; boundary=batch_cc9aaa4d-bc76-46d4-6095-a1699a3c09ed - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 20:23:35 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/$batch - method: POST - response: - body: "--batchresponse_72a61e9f-59a7-47a1-89cf-b43a2f98c46f\r\nContent-Type: multipart/mixed; - boundary=changesetresponse_ba7a7faf-0f36-4683-af12-776271ecc8e5\r\n\r\n--changesetresponse_ba7a7faf-0f36-4683-af12-776271ecc8e5\r\nContent-Type: - application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No - Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nPreference-Applied: - return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://seankaneprim.table.core.windows.net/gotableqyr2uxfpxphl9(PartitionKey='partition',RowKey='1')\r\nDataServiceId: - https://seankaneprim.table.core.windows.net/gotableqyr2uxfpxphl9(PartitionKey='partition',RowKey='1')\r\nETag: - W/\"datetime'2021-07-26T20%3A23%3A35.943476Z'\"\r\n\r\n\r\n--changesetresponse_ba7a7faf-0f36-4683-af12-776271ecc8e5\r\nContent-Type: - application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No - Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nPreference-Applied: - return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://seankaneprim.table.core.windows.net/gotableqyr2uxfpxphl9(PartitionKey='partition',RowKey='2')\r\nDataServiceId: - https://seankaneprim.table.core.windows.net/gotableqyr2uxfpxphl9(PartitionKey='partition',RowKey='2')\r\nETag: - W/\"datetime'2021-07-26T20%3A23%3A35.943476Z'\"\r\n\r\n\r\n--changesetresponse_ba7a7faf-0f36-4683-af12-776271ecc8e5\r\nContent-Type: - application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No - Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nPreference-Applied: - return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://seankaneprim.table.core.windows.net/gotableqyr2uxfpxphl9(PartitionKey='partition',RowKey='3')\r\nDataServiceId: - https://seankaneprim.table.core.windows.net/gotableqyr2uxfpxphl9(PartitionKey='partition',RowKey='3')\r\nETag: - W/\"datetime'2021-07-26T20%3A23%3A35.943476Z'\"\r\n\r\n\r\n--changesetresponse_ba7a7faf-0f36-4683-af12-776271ecc8e5\r\nContent-Type: - application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No - Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nPreference-Applied: - return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://seankaneprim.table.core.windows.net/gotableqyr2uxfpxphl9(PartitionKey='partition',RowKey='4')\r\nDataServiceId: - https://seankaneprim.table.core.windows.net/gotableqyr2uxfpxphl9(PartitionKey='partition',RowKey='4')\r\nETag: - W/\"datetime'2021-07-26T20%3A23%3A35.943476Z'\"\r\n\r\n\r\n--changesetresponse_ba7a7faf-0f36-4683-af12-776271ecc8e5\r\nContent-Type: - application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No - Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nPreference-Applied: - return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://seankaneprim.table.core.windows.net/gotableqyr2uxfpxphl9(PartitionKey='partition',RowKey='5')\r\nDataServiceId: - https://seankaneprim.table.core.windows.net/gotableqyr2uxfpxphl9(PartitionKey='partition',RowKey='5')\r\nETag: - W/\"datetime'2021-07-26T20%3A23%3A35.943476Z'\"\r\n\r\n\r\n--changesetresponse_ba7a7faf-0f36-4683-af12-776271ecc8e5\r\nContent-Type: - application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No - Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nPreference-Applied: - return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://seankaneprim.table.core.windows.net/gotableqyr2uxfpxphl9(PartitionKey='partition',RowKey='6')\r\nDataServiceId: - https://seankaneprim.table.core.windows.net/gotableqyr2uxfpxphl9(PartitionKey='partition',RowKey='6')\r\nETag: - W/\"datetime'2021-07-26T20%3A23%3A35.943476Z'\"\r\n\r\n\r\n--changesetresponse_ba7a7faf-0f36-4683-af12-776271ecc8e5\r\nContent-Type: - application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No - Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nPreference-Applied: - return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://seankaneprim.table.core.windows.net/gotableqyr2uxfpxphl9(PartitionKey='partition',RowKey='7')\r\nDataServiceId: - https://seankaneprim.table.core.windows.net/gotableqyr2uxfpxphl9(PartitionKey='partition',RowKey='7')\r\nETag: - W/\"datetime'2021-07-26T20%3A23%3A35.943476Z'\"\r\n\r\n\r\n--changesetresponse_ba7a7faf-0f36-4683-af12-776271ecc8e5\r\nContent-Type: - application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No - Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nPreference-Applied: - return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://seankaneprim.table.core.windows.net/gotableqyr2uxfpxphl9(PartitionKey='partition',RowKey='8')\r\nDataServiceId: - https://seankaneprim.table.core.windows.net/gotableqyr2uxfpxphl9(PartitionKey='partition',RowKey='8')\r\nETag: - W/\"datetime'2021-07-26T20%3A23%3A35.943476Z'\"\r\n\r\n\r\n--changesetresponse_ba7a7faf-0f36-4683-af12-776271ecc8e5\r\nContent-Type: - application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No - Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nPreference-Applied: - return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://seankaneprim.table.core.windows.net/gotableqyr2uxfpxphl9(PartitionKey='partition',RowKey='9')\r\nDataServiceId: - https://seankaneprim.table.core.windows.net/gotableqyr2uxfpxphl9(PartitionKey='partition',RowKey='9')\r\nETag: - W/\"datetime'2021-07-26T20%3A23%3A35.943476Z'\"\r\n\r\n\r\n--changesetresponse_ba7a7faf-0f36-4683-af12-776271ecc8e5\r\nContent-Type: - application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No - Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nPreference-Applied: - return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://seankaneprim.table.core.windows.net/gotableqyr2uxfpxphl9(PartitionKey='partition',RowKey='10')\r\nDataServiceId: - https://seankaneprim.table.core.windows.net/gotableqyr2uxfpxphl9(PartitionKey='partition',RowKey='10')\r\nETag: - W/\"datetime'2021-07-26T20%3A23%3A35.943476Z'\"\r\n\r\n\r\n--changesetresponse_ba7a7faf-0f36-4683-af12-776271ecc8e5--\r\n--batchresponse_72a61e9f-59a7-47a1-89cf-b43a2f98c46f--\r\n" - headers: - Cache-Control: - - no-cache - Content-Type: - - multipart/mixed; boundary=batchresponse_72a61e9f-59a7-47a1-89cf-b43a2f98c46f - Date: - - Mon, 26 Jul 2021 20:23:35 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 4bf66b94-5002-0077-5d5c-823de1000000 - X-Ms-Version: - - "2019-02-02" - status: 202 Accepted - code: 202 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 20:23:36 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/gotableqyr2uxfpxphl9() - method: GET - response: - body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#gotableqyr2uxfpxphl9","value":[{"odata.etag":"W/\"datetime''2021-07-26T20%3A23%3A35.943476Z''\"","PartitionKey":"partition","RowKey":"1","Timestamp":"2021-07-26T20:23:35.943476Z","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":1,"String":"someString"},{"odata.etag":"W/\"datetime''2021-07-26T20%3A23%3A35.943476Z''\"","PartitionKey":"partition","RowKey":"10","Timestamp":"2021-07-26T20:23:35.943476Z","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":10,"String":"someString"},{"odata.etag":"W/\"datetime''2021-07-26T20%3A23%3A35.943476Z''\"","PartitionKey":"partition","RowKey":"2","Timestamp":"2021-07-26T20:23:35.943476Z","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":2,"String":"someString"},{"odata.etag":"W/\"datetime''2021-07-26T20%3A23%3A35.943476Z''\"","PartitionKey":"partition","RowKey":"3","Timestamp":"2021-07-26T20:23:35.943476Z","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":3,"String":"someString"},{"odata.etag":"W/\"datetime''2021-07-26T20%3A23%3A35.943476Z''\"","PartitionKey":"partition","RowKey":"4","Timestamp":"2021-07-26T20:23:35.943476Z","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":4,"String":"someString"},{"odata.etag":"W/\"datetime''2021-07-26T20%3A23%3A35.943476Z''\"","PartitionKey":"partition","RowKey":"5","Timestamp":"2021-07-26T20:23:35.943476Z","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":5,"String":"someString"},{"odata.etag":"W/\"datetime''2021-07-26T20%3A23%3A35.943476Z''\"","PartitionKey":"partition","RowKey":"6","Timestamp":"2021-07-26T20:23:35.943476Z","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":6,"String":"someString"},{"odata.etag":"W/\"datetime''2021-07-26T20%3A23%3A35.943476Z''\"","PartitionKey":"partition","RowKey":"7","Timestamp":"2021-07-26T20:23:35.943476Z","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":7,"String":"someString"},{"odata.etag":"W/\"datetime''2021-07-26T20%3A23%3A35.943476Z''\"","PartitionKey":"partition","RowKey":"8","Timestamp":"2021-07-26T20:23:35.943476Z","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":8,"String":"someString"},{"odata.etag":"W/\"datetime''2021-07-26T20%3A23%3A35.943476Z''\"","PartitionKey":"partition","RowKey":"9","Timestamp":"2021-07-26T20:23:35.943476Z","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":9,"String":"someString"}]}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - Date: - - Mon, 26 Jul 2021 20:23:35 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - Vary: - - Origin - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 4bf66c14-5002-0077-575c-823de1000000 - X-Ms-Version: - - "2019-02-02" - status: 200 OK - code: 200 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 20:23:36 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/Tables('gotableqyr2uxfpxphl9') - method: DELETE - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Date: - - Mon, 26 Jul 2021 20:23:35 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 4bf66c82-5002-0077-435c-823de1000000 - X-Ms-Version: - - "2019-02-02" - status: 204 No Content - code: 204 - duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchComplex-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchComplex-variables.yaml deleted file mode 100644 index 884fb38e6fb6..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchComplex-variables.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -STORAGE_ENDPOINT_SUFFIX: core.windows.net -TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== -TABLES_STORAGE_ACCOUNT_NAME: seankaneprim -randomSeed: "1626989875" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchComplex.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchComplex.yaml deleted file mode 100644 index 254fdb28600f..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchComplex.yaml +++ /dev/null @@ -1,366 +0,0 @@ ---- -version: 1 -interactions: -- request: - body: '{"TableName":"gotableoin2xu6mdwdjy"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "36" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Thu, 22 Jul 2021 21:37:55 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/Tables - method: POST - response: - body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotableoin2xu6mdwdjy"}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - Date: - - Thu, 22 Jul 2021 21:37:55 GMT - Location: - - https://seankaneprim.table.core.windows.net/Tables('gotableoin2xu6mdwdjy') - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 2252d2b6-d002-00a2-1a41-7fd26c000000 - X-Ms-Version: - - "2019-02-02" - status: 201 Created - code: 201 - duration: "" -- request: - body: "--batch_069a1b99-cb66-457e-714c-82d78c90cc68\r\nContent-Type: multipart/mixed; - boundary=changeset_06968720-03cf-4bc7-79e7-460b7bbb0ad0\r\n\r\n--changeset_06968720-03cf-4bc7-79e7-460b7bbb0ad0\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotableoin2xu6mdwdjy?%24format=application%2Fjson%3Bodata%3Dminimalmetadata - HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 367\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Binary\":\"U29tZUJpbmFyeQ==\",\"Binary@odata.type\":\"Edm.Binary\",\"Bool\":false,\"DateTime\":\"2013-08-02T17:37:43.0090043Z\",\"DateTime@odata.type\":\"Edm.DateTime\",\"Double\":1234.1234,\"Guid\":\"4185404a-5818-48c3-b9be-f217df0dba6f\",\"Guid@odata.type\":\"Edm.Guid\",\"Int32\":1234,\"Int64\":\"123456789012\",\"Int64@odata.type\":\"Edm.Int64\",\"PartitionKey\":\"pk001\",\"RowKey\":\"1\",\"String\":\"test\"}\r\n--changeset_06968720-03cf-4bc7-79e7-460b7bbb0ad0\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotableoin2xu6mdwdjy?%24format=application%2Fjson%3Bodata%3Dminimalmetadata - HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 367\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Binary\":\"U29tZUJpbmFyeQ==\",\"Binary@odata.type\":\"Edm.Binary\",\"Bool\":false,\"DateTime\":\"2013-08-02T17:37:43.0090043Z\",\"DateTime@odata.type\":\"Edm.DateTime\",\"Double\":1234.1234,\"Guid\":\"4185404a-5818-48c3-b9be-f217df0dba6f\",\"Guid@odata.type\":\"Edm.Guid\",\"Int32\":1234,\"Int64\":\"123456789012\",\"Int64@odata.type\":\"Edm.Int64\",\"PartitionKey\":\"pk001\",\"RowKey\":\"2\",\"String\":\"test\"}\r\n--changeset_06968720-03cf-4bc7-79e7-460b7bbb0ad0\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotableoin2xu6mdwdjy?%24format=application%2Fjson%3Bodata%3Dminimalmetadata - HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 367\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Binary\":\"U29tZUJpbmFyeQ==\",\"Binary@odata.type\":\"Edm.Binary\",\"Bool\":false,\"DateTime\":\"2013-08-02T17:37:43.0090043Z\",\"DateTime@odata.type\":\"Edm.DateTime\",\"Double\":1234.1234,\"Guid\":\"4185404a-5818-48c3-b9be-f217df0dba6f\",\"Guid@odata.type\":\"Edm.Guid\",\"Int32\":1234,\"Int64\":\"123456789012\",\"Int64@odata.type\":\"Edm.Int64\",\"PartitionKey\":\"pk001\",\"RowKey\":\"3\",\"String\":\"test\"}\r\n--changeset_06968720-03cf-4bc7-79e7-460b7bbb0ad0\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotableoin2xu6mdwdjy?%24format=application%2Fjson%3Bodata%3Dminimalmetadata - HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 367\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Binary\":\"U29tZUJpbmFyeQ==\",\"Binary@odata.type\":\"Edm.Binary\",\"Bool\":false,\"DateTime\":\"2013-08-02T17:37:43.0090043Z\",\"DateTime@odata.type\":\"Edm.DateTime\",\"Double\":1234.1234,\"Guid\":\"4185404a-5818-48c3-b9be-f217df0dba6f\",\"Guid@odata.type\":\"Edm.Guid\",\"Int32\":1234,\"Int64\":\"123456789012\",\"Int64@odata.type\":\"Edm.Int64\",\"PartitionKey\":\"pk001\",\"RowKey\":\"4\",\"String\":\"test\"}\r\n--changeset_06968720-03cf-4bc7-79e7-460b7bbb0ad0\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotableoin2xu6mdwdjy?%24format=application%2Fjson%3Bodata%3Dminimalmetadata - HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 367\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Binary\":\"U29tZUJpbmFyeQ==\",\"Binary@odata.type\":\"Edm.Binary\",\"Bool\":false,\"DateTime\":\"2013-08-02T17:37:43.0090043Z\",\"DateTime@odata.type\":\"Edm.DateTime\",\"Double\":1234.1234,\"Guid\":\"4185404a-5818-48c3-b9be-f217df0dba6f\",\"Guid@odata.type\":\"Edm.Guid\",\"Int32\":1234,\"Int64\":\"123456789012\",\"Int64@odata.type\":\"Edm.Int64\",\"PartitionKey\":\"pk001\",\"RowKey\":\"5\",\"String\":\"test\"}\r\n--changeset_06968720-03cf-4bc7-79e7-460b7bbb0ad0--\r\n\r\n--batch_069a1b99-cb66-457e-714c-82d78c90cc68--\r\n" - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "4258" - Content-Type: - - multipart/mixed; boundary=batch_069a1b99-cb66-457e-714c-82d78c90cc68 - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) - X-Ms-Date: - - Thu, 22 Jul 2021 21:37:55 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/$batch - method: POST - response: - body: "--batchresponse_ec2ad4a0-6283-40a7-9e52-9a75d3c76893\r\nContent-Type: multipart/mixed; - boundary=changesetresponse_9ecf4cc4-a384-4287-95e5-3550e895d90f\r\n\r\n--changesetresponse_9ecf4cc4-a384-4287-95e5-3550e895d90f\r\nContent-Type: - application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No - Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nPreference-Applied: - return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://seankaneprim.table.core.windows.net/gotableoin2xu6mdwdjy(PartitionKey='pk001',RowKey='1')\r\nDataServiceId: - https://seankaneprim.table.core.windows.net/gotableoin2xu6mdwdjy(PartitionKey='pk001',RowKey='1')\r\nETag: - W/\"datetime'2021-07-22T21%3A37%3A56.7024695Z'\"\r\n\r\n\r\n--changesetresponse_9ecf4cc4-a384-4287-95e5-3550e895d90f\r\nContent-Type: - application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No - Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nPreference-Applied: - return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://seankaneprim.table.core.windows.net/gotableoin2xu6mdwdjy(PartitionKey='pk001',RowKey='2')\r\nDataServiceId: - https://seankaneprim.table.core.windows.net/gotableoin2xu6mdwdjy(PartitionKey='pk001',RowKey='2')\r\nETag: - W/\"datetime'2021-07-22T21%3A37%3A56.7024695Z'\"\r\n\r\n\r\n--changesetresponse_9ecf4cc4-a384-4287-95e5-3550e895d90f\r\nContent-Type: - application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No - Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nPreference-Applied: - return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://seankaneprim.table.core.windows.net/gotableoin2xu6mdwdjy(PartitionKey='pk001',RowKey='3')\r\nDataServiceId: - https://seankaneprim.table.core.windows.net/gotableoin2xu6mdwdjy(PartitionKey='pk001',RowKey='3')\r\nETag: - W/\"datetime'2021-07-22T21%3A37%3A56.7024695Z'\"\r\n\r\n\r\n--changesetresponse_9ecf4cc4-a384-4287-95e5-3550e895d90f\r\nContent-Type: - application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No - Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nPreference-Applied: - return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://seankaneprim.table.core.windows.net/gotableoin2xu6mdwdjy(PartitionKey='pk001',RowKey='4')\r\nDataServiceId: - https://seankaneprim.table.core.windows.net/gotableoin2xu6mdwdjy(PartitionKey='pk001',RowKey='4')\r\nETag: - W/\"datetime'2021-07-22T21%3A37%3A56.7024695Z'\"\r\n\r\n\r\n--changesetresponse_9ecf4cc4-a384-4287-95e5-3550e895d90f\r\nContent-Type: - application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No - Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nPreference-Applied: - return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://seankaneprim.table.core.windows.net/gotableoin2xu6mdwdjy(PartitionKey='pk001',RowKey='5')\r\nDataServiceId: - https://seankaneprim.table.core.windows.net/gotableoin2xu6mdwdjy(PartitionKey='pk001',RowKey='5')\r\nETag: - W/\"datetime'2021-07-22T21%3A37%3A56.7024695Z'\"\r\n\r\n\r\n--changesetresponse_9ecf4cc4-a384-4287-95e5-3550e895d90f--\r\n--batchresponse_ec2ad4a0-6283-40a7-9e52-9a75d3c76893--\r\n" - headers: - Cache-Control: - - no-cache - Content-Type: - - multipart/mixed; boundary=batchresponse_ec2ad4a0-6283-40a7-9e52-9a75d3c76893 - Date: - - Thu, 22 Jul 2021 21:37:56 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 2252d2d1-d002-00a2-3341-7fd26c000000 - X-Ms-Version: - - "2019-02-02" - status: 202 Accepted - code: 202 - duration: "" -- request: - body: "--batch_bab0ef5e-8d08-40ef-61d3-fffc7044df1e\r\nContent-Type: multipart/mixed; - boundary=changeset_fc953668-dfb8-4898-4f6f-2a2e854098cb\r\n\r\n--changeset_fc953668-dfb8-4898-4f6f-2a2e854098cb\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPATCH https://seankaneprim.table.core.windows.net/gotableoin2xu6mdwdjy(PartitionKey='pk001',RowKey='1')?%24format=application%2Fjson%3Bodata%3Dminimalmetadata - HTTP/1.1\r\nAccept: application/json\r\nContent-Length: 367\r\nContent-Type: - application/json\r\nDataserviceversion: 3.0\r\nIf-Match: *\r\nX-Ms-Version: - 2019-02-02\r\n\r\n{\"Binary\":\"U29tZUJpbmFyeQ==\",\"Binary@odata.type\":\"Edm.Binary\",\"Bool\":false,\"DateTime\":\"2013-08-02T17:37:43.0090043Z\",\"DateTime@odata.type\":\"Edm.DateTime\",\"Double\":1234.1234,\"Guid\":\"4185404a-5818-48c3-b9be-f217df0dba6f\",\"Guid@odata.type\":\"Edm.Guid\",\"Int32\":1234,\"Int64\":\"123456789012\",\"Int64@odata.type\":\"Edm.Int64\",\"PartitionKey\":\"pk001\",\"RowKey\":\"1\",\"String\":\"test\"}\r\n--changeset_fc953668-dfb8-4898-4f6f-2a2e854098cb\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPUT https://seankaneprim.table.core.windows.net/gotableoin2xu6mdwdjy(PartitionKey='pk001',RowKey='2')?%24format=application%2Fjson%3Bodata%3Dminimalmetadata - HTTP/1.1\r\nAccept: application/json\r\nContent-Length: 365\r\nContent-Type: - application/json\r\nDataserviceversion: 3.0\r\nIf-Match: *\r\nX-Ms-Version: - 2019-02-02\r\n\r\n{\"Binary\":\"U29tZUJpbmFyeQ==\",\"Binary@odata.type\":\"Edm.Binary\",\"Bool\":false,\"DateTime\":\"2013-08-02T17:37:43.0090043Z\",\"DateTime@odata.type\":\"Edm.DateTime\",\"Double\":1234.1234,\"Guid\":\"4185404a-5818-48c3-b9be-f217df0dba6f\",\"Guid@odata.type\":\"Edm.Guid\",\"Int32\":10,\"Int64\":\"123456789012\",\"Int64@odata.type\":\"Edm.Int64\",\"PartitionKey\":\"pk001\",\"RowKey\":\"2\",\"String\":\"test\"}\r\n--changeset_fc953668-dfb8-4898-4f6f-2a2e854098cb\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nDELETE https://seankaneprim.table.core.windows.net/gotableoin2xu6mdwdjy(PartitionKey='pk001',RowKey='3')?%24format=application%2Fjson%3Bodata%3Dminimalmetadata - HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nDataserviceversion: - 3.0\r\nIf-Match: *\r\nX-Ms-Version: 2019-02-02\r\n\r\n\r\n--changeset_fc953668-dfb8-4898-4f6f-2a2e854098cb--\r\n\r\n--batch_bab0ef5e-8d08-40ef-61d3-fffc7044df1e--\r\n" - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "2243" - Content-Type: - - multipart/mixed; boundary=batch_bab0ef5e-8d08-40ef-61d3-fffc7044df1e - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) - X-Ms-Date: - - Thu, 22 Jul 2021 21:37:56 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/$batch - method: POST - response: - body: "--batchresponse_9b2bed71-7312-4931-9e04-a54c010928b3\r\nContent-Type: multipart/mixed; - boundary=changesetresponse_b8a73f54-2118-446d-9dba-ce6549518aa4\r\n\r\n--changesetresponse_b8a73f54-2118-446d-9dba-ce6549518aa4\r\nContent-Type: - application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No - Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nDataServiceVersion: - 1.0;\r\nETag: W/\"datetime'2021-07-22T21%3A37%3A56.9285492Z'\"\r\n\r\n\r\n--changesetresponse_b8a73f54-2118-446d-9dba-ce6549518aa4\r\nContent-Type: - application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No - Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nDataServiceVersion: - 1.0;\r\nETag: W/\"datetime'2021-07-22T21%3A37%3A56.9285492Z'\"\r\n\r\n\r\n--changesetresponse_b8a73f54-2118-446d-9dba-ce6549518aa4\r\nContent-Type: - application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No - Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nDataServiceVersion: - 1.0;\r\n\r\n\r\n--changesetresponse_b8a73f54-2118-446d-9dba-ce6549518aa4--\r\n--batchresponse_9b2bed71-7312-4931-9e04-a54c010928b3--\r\n" - headers: - Cache-Control: - - no-cache - Content-Type: - - multipart/mixed; boundary=batchresponse_9b2bed71-7312-4931-9e04-a54c010928b3 - Date: - - Thu, 22 Jul 2021 21:37:56 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 2252d314-d002-00a2-7541-7fd26c000000 - X-Ms-Version: - - "2019-02-02" - status: 202 Accepted - code: 202 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Thu, 22 Jul 2021 21:37:56 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/gotableoin2xu6mdwdjy(PartitionKey='pk001',RowKey='1') - method: GET - response: - body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#gotableoin2xu6mdwdjy/@Element","odata.etag":"W/\"datetime''2021-07-22T21%3A37%3A56.9285492Z''\"","PartitionKey":"pk001","RowKey":"1","Timestamp":"2021-07-22T21:37:56.9285492Z","Binary@odata.type":"Edm.Binary","Binary":"U29tZUJpbmFyeQ==","Bool":false,"DateTime@odata.type":"Edm.DateTime","DateTime":"2013-08-02T17:37:43.0090043Z","Double":1234.1234,"Guid@odata.type":"Edm.Guid","Guid":"4185404a-5818-48c3-b9be-f217df0dba6f","Int32":1234,"Int64@odata.type":"Edm.Int64","Int64":"123456789012","String":"test"}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - Date: - - Thu, 22 Jul 2021 21:37:56 GMT - Etag: - - W/"datetime'2021-07-22T21%3A37%3A56.9285492Z'" - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - Vary: - - Origin - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 2252d33a-d002-00a2-1a41-7fd26c000000 - X-Ms-Version: - - "2019-02-02" - status: 200 OK - code: 200 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Thu, 22 Jul 2021 21:37:56 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/gotableoin2xu6mdwdjy(PartitionKey='pk001',RowKey='2') - method: GET - response: - body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#gotableoin2xu6mdwdjy/@Element","odata.etag":"W/\"datetime''2021-07-22T21%3A37%3A56.9285492Z''\"","PartitionKey":"pk001","RowKey":"2","Timestamp":"2021-07-22T21:37:56.9285492Z","Binary@odata.type":"Edm.Binary","Binary":"U29tZUJpbmFyeQ==","Bool":false,"DateTime@odata.type":"Edm.DateTime","DateTime":"2013-08-02T17:37:43.0090043Z","Double":1234.1234,"Guid@odata.type":"Edm.Guid","Guid":"4185404a-5818-48c3-b9be-f217df0dba6f","Int32":10,"Int64@odata.type":"Edm.Int64","Int64":"123456789012","String":"test"}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - Date: - - Thu, 22 Jul 2021 21:37:56 GMT - Etag: - - W/"datetime'2021-07-22T21%3A37%3A56.9285492Z'" - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - Vary: - - Origin - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 2252d351-d002-00a2-2f41-7fd26c000000 - X-Ms-Version: - - "2019-02-02" - status: 200 OK - code: 200 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Thu, 22 Jul 2021 21:37:56 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/gotableoin2xu6mdwdjy(PartitionKey='pk001',RowKey='3') - method: GET - response: - body: '{"odata.error":{"code":"ResourceNotFound","message":{"lang":"en-US","value":"The - specified resource does not exist.\nRequestId:2252d36a-d002-00a2-4841-7fd26c000000\nTime:2021-07-22T21:37:57.2138127Z"}}}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - Date: - - Thu, 22 Jul 2021 21:37:56 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - Vary: - - Origin - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 2252d36a-d002-00a2-4841-7fd26c000000 - X-Ms-Version: - - "2019-02-02" - status: 404 Not Found - code: 404 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Thu, 22 Jul 2021 21:37:56 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/Tables('gotableoin2xu6mdwdjy') - method: DELETE - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Date: - - Thu, 22 Jul 2021 21:37:56 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 2252d381-d002-00a2-5d41-7fd26c000000 - X-Ms-Version: - - "2019-02-02" - status: 204 No Content - code: 204 - duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchError-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchError-variables.yaml deleted file mode 100644 index 4f98946b7f6b..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchError-variables.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -STORAGE_ENDPOINT_SUFFIX: core.windows.net -TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== -TABLES_STORAGE_ACCOUNT_NAME: seankaneprim -randomSeed: "1627331016" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchError.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchError.yaml deleted file mode 100644 index d72f511d6324..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchError.yaml +++ /dev/null @@ -1,198 +0,0 @@ ---- -version: 1 -interactions: -- request: - body: '{"TableName":"gotable2eir7r5h8wjrb"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "36" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 20:23:36 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/Tables - method: POST - response: - body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotable2eir7r5h8wjrb"}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - Date: - - Mon, 26 Jul 2021 20:23:36 GMT - Location: - - https://seankaneprim.table.core.windows.net/Tables('gotable2eir7r5h8wjrb') - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 4bf66cbe-5002-0077-7e5c-823de1000000 - X-Ms-Version: - - "2019-02-02" - status: 201 Created - code: 201 - duration: "" -- request: - body: '{"Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":3,"PartitionKey":"partition","RowKey":"3","String":"someString","Timestamp":"0001-01-01T00:00:00Z"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "194" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - Prefer: - - return-no-content - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 20:23:36 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/gotable2eir7r5h8wjrb - method: POST - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Dataserviceid: - - https://seankaneprim.table.core.windows.net/gotable2eir7r5h8wjrb(PartitionKey='partition',RowKey='3') - Date: - - Mon, 26 Jul 2021 20:23:36 GMT - Etag: - - W/"datetime'2021-07-26T20%3A23%3A36.684998Z'" - Location: - - https://seankaneprim.table.core.windows.net/gotable2eir7r5h8wjrb(PartitionKey='partition',RowKey='3') - Preference-Applied: - - return-no-content - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 4bf66cf7-5002-0077-335c-823de1000000 - X-Ms-Version: - - "2019-02-02" - status: 204 No Content - code: 204 - duration: "" -- request: - body: "--batch_b0a717c4-6ddf-4371-4459-f054bf64540f\r\nContent-Type: multipart/mixed; - boundary=changeset_4d8752a2-1b64-4299-5ef5-e2fbdb2a4836\r\n\r\n--changeset_4d8752a2-1b64-4299-5ef5-e2fbdb2a4836\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotable2eir7r5h8wjrb?%24format=application%2Fjson%3Bodata%3Dminimalmetadata - HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 194\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Integer\":1,\"PartitionKey\":\"partition\",\"RowKey\":\"1\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_4d8752a2-1b64-4299-5ef5-e2fbdb2a4836\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotable2eir7r5h8wjrb?%24format=application%2Fjson%3Bodata%3Dminimalmetadata - HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 194\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Integer\":2,\"PartitionKey\":\"partition\",\"RowKey\":\"2\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_4d8752a2-1b64-4299-5ef5-e2fbdb2a4836\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotable2eir7r5h8wjrb?%24format=application%2Fjson%3Bodata%3Dminimalmetadata - HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 194\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Integer\":3,\"PartitionKey\":\"partition\",\"RowKey\":\"3\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_4d8752a2-1b64-4299-5ef5-e2fbdb2a4836--\r\n\r\n--batch_b0a717c4-6ddf-4371-4459-f054bf64540f--\r\n" - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "2131" - Content-Type: - - multipart/mixed; boundary=batch_b0a717c4-6ddf-4371-4459-f054bf64540f - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 20:23:36 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/$batch - method: POST - response: - body: "--batchresponse_941af3de-ec08-4244-8a1c-c49829645b2b\r\nContent-Type: multipart/mixed; - boundary=changesetresponse_cdd2e93a-08b4-4e8b-91eb-69c3ce810e05\r\n\r\n--changesetresponse_cdd2e93a-08b4-4e8b-91eb-69c3ce810e05\r\nContent-Type: - application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 409 Conflict\r\nX-Content-Type-Options: - nosniff\r\nCache-Control: no-cache\r\nPreference-Applied: return-no-content\r\nDataServiceVersion: - 3.0;\r\nContent-Type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8\r\n\r\n{\"odata.error\":{\"code\":\"EntityAlreadyExists\",\"message\":{\"lang\":\"en-US\",\"value\":\"2:The - specified entity already exists.\\nRequestId:4bf66d30-5002-0077-6c5c-823de1000000\\nTime:2021-07-26T20:23:36.8090858Z\"}}}\r\n--changesetresponse_cdd2e93a-08b4-4e8b-91eb-69c3ce810e05--\r\n--batchresponse_941af3de-ec08-4244-8a1c-c49829645b2b--\r\n" - headers: - Cache-Control: - - no-cache - Content-Type: - - multipart/mixed; boundary=batchresponse_941af3de-ec08-4244-8a1c-c49829645b2b - Date: - - Mon, 26 Jul 2021 20:23:36 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 4bf66d30-5002-0077-6c5c-823de1000000 - X-Ms-Version: - - "2019-02-02" - status: 202 Accepted - code: 202 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 20:23:36 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/Tables('gotable2eir7r5h8wjrb') - method: DELETE - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Date: - - Mon, 26 Jul 2021 20:23:36 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 4bf66d56-5002-0077-125c-823de1000000 - X-Ms-Version: - - "2019-02-02" - status: 204 No Content - code: 204 - duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchMixed-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchMixed-variables.yaml deleted file mode 100644 index f33ec43b2cd5..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchMixed-variables.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -STORAGE_ENDPOINT_SUFFIX: core.windows.net -TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== -TABLES_STORAGE_ACCOUNT_NAME: seankaneprim -randomSeed: "1627331247" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchMixed.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchMixed.yaml deleted file mode 100644 index e43b1453bc87..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestBatchMixed.yaml +++ /dev/null @@ -1,320 +0,0 @@ ---- -version: 1 -interactions: -- request: - body: '{"TableName":"gotablee6cbgs4km2zxa"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "36" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 20:27:27 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/Tables - method: POST - response: - body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotablee6cbgs4km2zxa"}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - Date: - - Mon, 26 Jul 2021 20:27:27 GMT - Location: - - https://seankaneprim.table.core.windows.net/Tables('gotablee6cbgs4km2zxa') - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 4143579e-f002-0023-2f5c-8272b6000000 - X-Ms-Version: - - "2019-02-02" - status: 201 Created - code: 201 - duration: "" -- request: - body: "--batch_5e28f6af-376a-4fc1-5f6b-fd90e3a202a5\r\nContent-Type: multipart/mixed; - boundary=changeset_4880589e-a070-49d6-72fd-12c1e86e2d3e\r\n\r\n--changeset_4880589e-a070-49d6-72fd-12c1e86e2d3e\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotablee6cbgs4km2zxa?%24format=application%2Fjson%3Bodata%3Dminimalmetadata - HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 194\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Integer\":1,\"PartitionKey\":\"partition\",\"RowKey\":\"1\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_4880589e-a070-49d6-72fd-12c1e86e2d3e\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotablee6cbgs4km2zxa?%24format=application%2Fjson%3Bodata%3Dminimalmetadata - HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 194\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Integer\":2,\"PartitionKey\":\"partition\",\"RowKey\":\"2\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_4880589e-a070-49d6-72fd-12c1e86e2d3e\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotablee6cbgs4km2zxa?%24format=application%2Fjson%3Bodata%3Dminimalmetadata - HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 194\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Integer\":3,\"PartitionKey\":\"partition\",\"RowKey\":\"3\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_4880589e-a070-49d6-72fd-12c1e86e2d3e--\r\n\r\n--batch_5e28f6af-376a-4fc1-5f6b-fd90e3a202a5--\r\n" - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "2131" - Content-Type: - - multipart/mixed; boundary=batch_5e28f6af-376a-4fc1-5f6b-fd90e3a202a5 - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 20:27:27 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/$batch - method: POST - response: - body: "--batchresponse_2e303c12-8762-41a5-8bf6-ad01794cfae0\r\nContent-Type: multipart/mixed; - boundary=changesetresponse_363c7c7b-6f3a-4009-b6fa-b211e50b238f\r\n\r\n--changesetresponse_363c7c7b-6f3a-4009-b6fa-b211e50b238f\r\nContent-Type: - application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No - Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nPreference-Applied: - return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://seankaneprim.table.core.windows.net/gotablee6cbgs4km2zxa(PartitionKey='partition',RowKey='1')\r\nDataServiceId: - https://seankaneprim.table.core.windows.net/gotablee6cbgs4km2zxa(PartitionKey='partition',RowKey='1')\r\nETag: - W/\"datetime'2021-07-26T20%3A27%3A28.1434688Z'\"\r\n\r\n\r\n--changesetresponse_363c7c7b-6f3a-4009-b6fa-b211e50b238f\r\nContent-Type: - application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No - Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nPreference-Applied: - return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://seankaneprim.table.core.windows.net/gotablee6cbgs4km2zxa(PartitionKey='partition',RowKey='2')\r\nDataServiceId: - https://seankaneprim.table.core.windows.net/gotablee6cbgs4km2zxa(PartitionKey='partition',RowKey='2')\r\nETag: - W/\"datetime'2021-07-26T20%3A27%3A28.1434688Z'\"\r\n\r\n\r\n--changesetresponse_363c7c7b-6f3a-4009-b6fa-b211e50b238f\r\nContent-Type: - application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No - Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nPreference-Applied: - return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://seankaneprim.table.core.windows.net/gotablee6cbgs4km2zxa(PartitionKey='partition',RowKey='3')\r\nDataServiceId: - https://seankaneprim.table.core.windows.net/gotablee6cbgs4km2zxa(PartitionKey='partition',RowKey='3')\r\nETag: - W/\"datetime'2021-07-26T20%3A27%3A28.1434688Z'\"\r\n\r\n\r\n--changesetresponse_363c7c7b-6f3a-4009-b6fa-b211e50b238f--\r\n--batchresponse_2e303c12-8762-41a5-8bf6-ad01794cfae0--\r\n" - headers: - Cache-Control: - - no-cache - Content-Type: - - multipart/mixed; boundary=batchresponse_2e303c12-8762-41a5-8bf6-ad01794cfae0 - Date: - - Mon, 26 Jul 2021 20:27:27 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 414357ec-f002-0023-795c-8272b6000000 - X-Ms-Version: - - "2019-02-02" - status: 202 Accepted - code: 202 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 20:27:28 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/gotablee6cbgs4km2zxa()?%24filter=RowKey+eq+%271%27 - method: GET - response: - body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#gotablee6cbgs4km2zxa","value":[{"odata.etag":"W/\"datetime''2021-07-26T20%3A27%3A28.1434688Z''\"","PartitionKey":"partition","RowKey":"1","Timestamp":"2021-07-26T20:27:28.1434688Z","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":1,"String":"someString"}]}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - Date: - - Mon, 26 Jul 2021 20:27:28 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - Vary: - - Origin - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 4143583f-f002-0023-4b5c-8272b6000000 - X-Ms-Version: - - "2019-02-02" - status: 200 OK - code: 200 - duration: "" -- request: - body: "--batch_7c6acb2a-0fca-4af8-6cce-c8d678857480\r\nContent-Type: multipart/mixed; - boundary=changeset_f39dc532-ad40-4a4a-7d85-2fe5eb1b927c\r\n\r\n--changeset_f39dc532-ad40-4a4a-7d85-2fe5eb1b927c\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPATCH https://seankaneprim.table.core.windows.net/gotablee6cbgs4km2zxa(PartitionKey='partition',RowKey='1')?%24format=application%2Fjson%3Bodata%3Dminimalmetadata - HTTP/1.1\r\nAccept: application/json\r\nContent-Length: 63\r\nContent-Type: - application/json\r\nDataserviceversion: 3.0\r\nIf-Match: W/\"datetime'2021-07-26T20%3A27%3A28.1434688Z'\"\r\nX-Ms-Version: - 2019-02-02\r\n\r\n{\"MergeProperty\":\"foo\",\"PartitionKey\":\"partition\",\"RowKey\":\"1\"}\r\n--changeset_f39dc532-ad40-4a4a-7d85-2fe5eb1b927c\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nDELETE https://seankaneprim.table.core.windows.net/gotablee6cbgs4km2zxa(PartitionKey='partition',RowKey='2')?%24format=application%2Fjson%3Bodata%3Dminimalmetadata - HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nDataserviceversion: - 3.0\r\nIf-Match: *\r\nX-Ms-Version: 2019-02-02\r\n\r\n\r\n--changeset_f39dc532-ad40-4a4a-7d85-2fe5eb1b927c\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPUT https://seankaneprim.table.core.windows.net/gotablee6cbgs4km2zxa(PartitionKey='partition',RowKey='3')?%24format=application%2Fjson%3Bodata%3Dminimalmetadata - HTTP/1.1\r\nAccept: application/json\r\nContent-Length: 65\r\nContent-Type: - application/json\r\nDataserviceversion: 3.0\r\nIf-Match: *\r\nX-Ms-Version: - 2019-02-02\r\n\r\n{\"PartitionKey\":\"partition\",\"ReplaceProperty\":\"foo\",\"RowKey\":\"3\"}\r\n--changeset_f39dc532-ad40-4a4a-7d85-2fe5eb1b927c\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotablee6cbgs4km2zxa?%24format=application%2Fjson%3Bodata%3Dminimalmetadata - HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 194\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Integer\":4,\"PartitionKey\":\"partition\",\"RowKey\":\"4\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_f39dc532-ad40-4a4a-7d85-2fe5eb1b927c\r\nContent-Transfer-Encoding: - binary\r\nContent-Type: application/http\r\n\r\nPOST https://seankaneprim.table.core.windows.net/gotablee6cbgs4km2zxa?%24format=application%2Fjson%3Bodata%3Dminimalmetadata - HTTP/1.1\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Length: - 194\r\nContent-Type: application/json\r\nDataserviceversion: 3.0\r\nPrefer: - return-no-content\r\nX-Ms-Version: 2019-02-02\r\n\r\n{\"Bool\":true,\"Byte\":\"c29tZWJ5dGVz\",\"DateTime\":\"2021-07-13T00:00:00Z\",\"Float\":3.14159,\"Integer\":5,\"PartitionKey\":\"partition\",\"RowKey\":\"5\",\"String\":\"someString\",\"Timestamp\":\"0001-01-01T00:00:00Z\"}\r\n--changeset_f39dc532-ad40-4a4a-7d85-2fe5eb1b927c--\r\n\r\n--batch_7c6acb2a-0fca-4af8-6cce-c8d678857480--\r\n" - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "2956" - Content-Type: - - multipart/mixed; boundary=batch_7c6acb2a-0fca-4af8-6cce-c8d678857480 - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 20:27:28 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/$batch - method: POST - response: - body: "--batchresponse_738f303f-dc4b-4524-8c1d-5d051e2d0a4e\r\nContent-Type: multipart/mixed; - boundary=changesetresponse_645d4142-b964-48da-9ddb-97431e235c5c\r\n\r\n--changesetresponse_645d4142-b964-48da-9ddb-97431e235c5c\r\nContent-Type: - application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No - Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nDataServiceVersion: - 1.0;\r\nETag: W/\"datetime'2021-07-26T20%3A27%3A28.3983826Z'\"\r\n\r\n\r\n--changesetresponse_645d4142-b964-48da-9ddb-97431e235c5c\r\nContent-Type: - application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No - Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nDataServiceVersion: - 1.0;\r\n\r\n\r\n--changesetresponse_645d4142-b964-48da-9ddb-97431e235c5c\r\nContent-Type: - application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No - Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nDataServiceVersion: - 1.0;\r\nETag: W/\"datetime'2021-07-26T20%3A27%3A28.3983826Z'\"\r\n\r\n\r\n--changesetresponse_645d4142-b964-48da-9ddb-97431e235c5c\r\nContent-Type: - application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No - Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nPreference-Applied: - return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://seankaneprim.table.core.windows.net/gotablee6cbgs4km2zxa(PartitionKey='partition',RowKey='4')\r\nDataServiceId: - https://seankaneprim.table.core.windows.net/gotablee6cbgs4km2zxa(PartitionKey='partition',RowKey='4')\r\nETag: - W/\"datetime'2021-07-26T20%3A27%3A28.3976494Z'\"\r\n\r\n\r\n--changesetresponse_645d4142-b964-48da-9ddb-97431e235c5c\r\nContent-Type: - application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No - Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nPreference-Applied: - return-no-content\r\nDataServiceVersion: 3.0;\r\nLocation: https://seankaneprim.table.core.windows.net/gotablee6cbgs4km2zxa(PartitionKey='partition',RowKey='5')\r\nDataServiceId: - https://seankaneprim.table.core.windows.net/gotablee6cbgs4km2zxa(PartitionKey='partition',RowKey='5')\r\nETag: - W/\"datetime'2021-07-26T20%3A27%3A28.3976494Z'\"\r\n\r\n\r\n--changesetresponse_645d4142-b964-48da-9ddb-97431e235c5c--\r\n--batchresponse_738f303f-dc4b-4524-8c1d-5d051e2d0a4e--\r\n" - headers: - Cache-Control: - - no-cache - Content-Type: - - multipart/mixed; boundary=batchresponse_738f303f-dc4b-4524-8c1d-5d051e2d0a4e - Date: - - Mon, 26 Jul 2021 20:27:28 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 4143586f-f002-0023-7a5c-8272b6000000 - X-Ms-Version: - - "2019-02-02" - status: 202 Accepted - code: 202 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 20:27:28 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/gotablee6cbgs4km2zxa()?%24filter=RowKey+eq+%271%27 - method: GET - response: - body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#gotablee6cbgs4km2zxa","value":[{"odata.etag":"W/\"datetime''2021-07-26T20%3A27%3A28.3983826Z''\"","PartitionKey":"partition","RowKey":"1","Timestamp":"2021-07-26T20:27:28.3983826Z","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":1,"MergeProperty":"foo","String":"someString"}]}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - Date: - - Mon, 26 Jul 2021 20:27:28 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - Vary: - - Origin - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 41435917-f002-0023-1e5c-8272b6000000 - X-Ms-Version: - - "2019-02-02" - status: 200 OK - code: 200 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Mon, 26 Jul 2021 20:27:28 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/Tables('gotablee6cbgs4km2zxa') - method: DELETE - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Date: - - Mon, 26 Jul 2021 20:27:28 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 41435952-f002-0023-565c-8272b6000000 - X-Ms-Version: - - "2019-02-02" - status: 204 No Content - code: 204 - duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestCreateTable-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestCreateTable-variables.yaml deleted file mode 100644 index db82b723a5c5..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestCreateTable-variables.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -STORAGE_ENDPOINT_SUFFIX: core.windows.net -TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== -TABLES_STORAGE_ACCOUNT_NAME: chrisstablesprim -randomSeed: "1617573288" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestCreateTable.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestCreateTable.yaml deleted file mode 100644 index 6ef28bf11ac7..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestCreateTable.yaml +++ /dev/null @@ -1,85 +0,0 @@ ---- -version: 1 -interactions: -- request: - body: '{"TableName":"gotable9uourkrfkri2m"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "36" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; - Windows_NT) - X-Ms-Date: - - Sun, 04 Apr 2021 21:54:48 GMT - X-Ms-Version: - - "2019-02-02" - url: https://chrisstablesprim.table.core.windows.net/Tables - method: POST - response: - body: '{"odata.metadata":"https://chrisstablesprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotable9uourkrfkri2m"}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - Date: - - Sun, 04 Apr 2021 21:54:48 GMT - Location: - - https://chrisstablesprim.table.core.windows.net/Tables('gotable9uourkrfkri2m') - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - aa171ae1-c002-0053-399d-291720000000 - X-Ms-Version: - - "2019-02-02" - status: 201 Created - code: 201 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; - Windows_NT) - X-Ms-Date: - - Sun, 04 Apr 2021 21:54:48 GMT - X-Ms-Version: - - "2019-02-02" - url: https://chrisstablesprim.table.core.windows.net/Tables('gotable9uourkrfkri2m') - method: DELETE - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Date: - - Sun, 04 Apr 2021 21:54:48 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - aa171aec-c002-0053-419d-291720000000 - X-Ms-Version: - - "2019-02-02" - status: 204 No Content - code: 204 - duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestCustomEntity-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestCustomEntity-variables.yaml deleted file mode 100644 index 13cee040bfbe..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestCustomEntity-variables.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -STORAGE_ENDPOINT_SUFFIX: core.windows.net -TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== -TABLES_STORAGE_ACCOUNT_NAME: seankaneprim -randomSeed: "1625159396" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestCustomEntity.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestCustomEntity.yaml deleted file mode 100644 index c91a2df7c845..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestCustomEntity.yaml +++ /dev/null @@ -1,125 +0,0 @@ ---- -version: 1 -interactions: -- request: - body: '{"TableName":"gotableaif30nqn97uy2"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "36" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Thu, 01 Jul 2021 17:09:56 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/Tables - method: POST - response: - body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotableaif30nqn97uy2"}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - Date: - - Thu, 01 Jul 2021 17:09:56 GMT - Location: - - https://seankaneprim.table.core.windows.net/Tables('gotableaif30nqn97uy2') - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 8fa8ab11-a002-003e-789b-6e7f0a000000 - X-Ms-Version: - - "2019-02-02" - status: 201 Created - code: 201 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Thu, 01 Jul 2021 17:09:56 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/gotableaif30nqn97uy2(PartitionKey='pk001',RowKey='rk001') - method: GET - response: - body: '{"odata.error":{"code":"ResourceNotFound","message":{"lang":"en-US","value":"The - specified resource does not exist.\nRequestId:8fa8ab41-a002-003e-249b-6e7f0a000000\nTime:2021-07-01T17:09:57.9505922Z"}}}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - Date: - - Thu, 01 Jul 2021 17:09:56 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 8fa8ab41-a002-003e-249b-6e7f0a000000 - X-Ms-Version: - - "2019-02-02" - status: 404 Not Found - code: 404 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Thu, 01 Jul 2021 17:09:56 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/Tables('gotableaif30nqn97uy2') - method: DELETE - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Date: - - Thu, 01 Jul 2021 17:09:57 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 8fa8ab6f-a002-003e-4e9b-6e7f0a000000 - X-Ms-Version: - - "2019-02-02" - status: 204 No Content - code: 204 - duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestDeleteEntity-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestDeleteEntity-variables.yaml deleted file mode 100644 index b5659ad2a20c..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestDeleteEntity-variables.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -STORAGE_ENDPOINT_SUFFIX: core.windows.net -TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== -TABLES_STORAGE_ACCOUNT_NAME: seankaneprim -randomSeed: "1626385766" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestDeleteEntity.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestDeleteEntity.yaml deleted file mode 100644 index b755c674cc31..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestDeleteEntity.yaml +++ /dev/null @@ -1,180 +0,0 @@ ---- -version: 1 -interactions: -- request: - body: '{"TableName":"gotablevevyc3u4ogcyx"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "36" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Thu, 15 Jul 2021 21:49:26 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/Tables - method: POST - response: - body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotablevevyc3u4ogcyx"}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - Date: - - Thu, 15 Jul 2021 21:49:25 GMT - Location: - - https://seankaneprim.table.core.windows.net/Tables('gotablevevyc3u4ogcyx') - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - c4984373-9002-00a3-42c3-798db0000000 - X-Ms-Version: - - "2019-02-02" - status: 201 Created - code: 201 - duration: "" -- request: - body: '{"Bool":true,"Integer":1,"PartitionKey":"partition","RowKey":"1","String":"some - string 1","Timestamp":"0001-01-01T00:00:00Z"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "125" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - Prefer: - - return-no-content - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Thu, 15 Jul 2021 21:49:27 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/gotablevevyc3u4ogcyx - method: POST - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Dataserviceid: - - https://seankaneprim.table.core.windows.net/gotablevevyc3u4ogcyx(PartitionKey='partition',RowKey='1') - Date: - - Thu, 15 Jul 2021 21:49:25 GMT - Etag: - - W/"datetime'2021-07-15T21%3A49%3A26.4583762Z'" - Location: - - https://seankaneprim.table.core.windows.net/gotablevevyc3u4ogcyx(PartitionKey='partition',RowKey='1') - Preference-Applied: - - return-no-content - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - c49843a2-9002-00a3-6cc3-798db0000000 - X-Ms-Version: - - "2019-02-02" - status: 204 No Content - code: 204 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Dataserviceversion: - - "3.0" - If-Match: - - '*' - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Thu, 15 Jul 2021 21:49:27 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/gotablevevyc3u4ogcyx(PartitionKey='partition',RowKey='1') - method: DELETE - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Date: - - Thu, 15 Jul 2021 21:49:25 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - c49843e6-9002-00a3-2ec3-798db0000000 - X-Ms-Version: - - "2019-02-02" - status: 204 No Content - code: 204 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Thu, 15 Jul 2021 21:49:27 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/Tables('gotablevevyc3u4ogcyx') - method: DELETE - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Date: - - Thu, 15 Jul 2021 21:49:25 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - c4984417-9002-00a3-5ec3-798db0000000 - X-Ms-Version: - - "2019-02-02" - status: 204 No Content - code: 204 - duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestEdmMarshalling-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestEdmMarshalling-variables.yaml deleted file mode 100644 index 8ca29579fe46..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestEdmMarshalling-variables.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -STORAGE_ENDPOINT_SUFFIX: core.windows.net -TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== -TABLES_STORAGE_ACCOUNT_NAME: seankaneprim -randomSeed: "1626705439" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestEdmMarshalling.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestEdmMarshalling.yaml deleted file mode 100644 index c1d98be2c985..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestEdmMarshalling.yaml +++ /dev/null @@ -1,179 +0,0 @@ ---- -version: 1 -interactions: -- request: - body: '{"TableName":"gotablecnakxw3sl0jdk"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "36" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Mon, 19 Jul 2021 14:37:19 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/Tables - method: POST - response: - body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotablecnakxw3sl0jdk"}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - Date: - - Mon, 19 Jul 2021 14:37:11 GMT - Location: - - https://seankaneprim.table.core.windows.net/Tables('gotablecnakxw3sl0jdk') - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 2ed0682b-c002-0075-17ab-7c8359000000 - X-Ms-Version: - - "2019-02-02" - status: 201 Created - code: 201 - duration: "" -- request: - body: '{"Binary":"U29tZUJpbmFyeQ==","Binary@odata.type":"Edm.Binary","Bool":false,"DateTime":"2013-08-02T17:37:43.0090043Z","DateTime@odata.type":"Edm.DateTime","Double":1234.1234,"Guid":"4185404a-5818-48c3-b9be-f217df0dba6f","Guid@odata.type":"Edm.Guid","Int32":1234,"Int64":"123456789012","Int64@odata.type":"Edm.Int64","PartitionKey":"partition","RowKey":"1","String":"test"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "371" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - Prefer: - - return-no-content - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Mon, 19 Jul 2021 14:37:19 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/gotablecnakxw3sl0jdk - method: POST - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Dataserviceid: - - https://seankaneprim.table.core.windows.net/gotablecnakxw3sl0jdk(PartitionKey='partition',RowKey='1') - Date: - - Mon, 19 Jul 2021 14:37:11 GMT - Etag: - - W/"datetime'2021-07-19T14%3A37%3A12.6489662Z'" - Location: - - https://seankaneprim.table.core.windows.net/gotablecnakxw3sl0jdk(PartitionKey='partition',RowKey='1') - Preference-Applied: - - return-no-content - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 2ed06863-c002-0075-4dab-7c8359000000 - X-Ms-Version: - - "2019-02-02" - status: 204 No Content - code: 204 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Mon, 19 Jul 2021 14:37:19 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/gotablecnakxw3sl0jdk(PartitionKey='partition',RowKey='1')?%24format=application%2Fjson%3Bodata%3Dfullmetadata - method: GET - response: - body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#gotablecnakxw3sl0jdk/@Element","odata.type":"seankaneprim.gotablecnakxw3sl0jdk","odata.id":"https://seankaneprim.table.core.windows.net/gotablecnakxw3sl0jdk(PartitionKey=''partition'',RowKey=''1'')","odata.etag":"W/\"datetime''2021-07-19T14%3A37%3A12.6489662Z''\"","odata.editLink":"gotablecnakxw3sl0jdk(PartitionKey=''partition'',RowKey=''1'')","PartitionKey":"partition","RowKey":"1","Timestamp@odata.type":"Edm.DateTime","Timestamp":"2021-07-19T14:37:12.6489662Z","Binary@odata.type":"Edm.Binary","Binary":"U29tZUJpbmFyeQ==","Bool":false,"DateTime@odata.type":"Edm.DateTime","DateTime":"2013-08-02T17:37:43.0090043Z","Double":1234.1234,"Guid@odata.type":"Edm.Guid","Guid":"4185404a-5818-48c3-b9be-f217df0dba6f","Int32":1234,"Int64@odata.type":"Edm.Int64","Int64":"123456789012","String":"test"}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json;odata=fullmetadata;streaming=true;charset=utf-8 - Date: - - Mon, 19 Jul 2021 14:37:11 GMT - Etag: - - W/"datetime'2021-07-19T14%3A37%3A12.6489662Z'" - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 2ed068cd-c002-0075-33ab-7c8359000000 - X-Ms-Version: - - "2019-02-02" - status: 200 OK - code: 200 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Mon, 19 Jul 2021 14:37:19 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/Tables('gotablecnakxw3sl0jdk') - method: DELETE - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Date: - - Mon, 19 Jul 2021 14:37:12 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 2ed0690d-c002-0075-6fab-7c8359000000 - X-Ms-Version: - - "2019-02-02" - status: 204 No Content - code: 204 - duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestGetAccessPolicy-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestGetAccessPolicy-variables.yaml deleted file mode 100644 index 257db4d9b46a..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestGetAccessPolicy-variables.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -STORAGE_ENDPOINT_SUFFIX: core.windows.net -TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== -TABLES_STORAGE_ACCOUNT_NAME: seankaneprim -randomSeed: "1625177697" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestGetAccessPolicy.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestGetAccessPolicy.yaml deleted file mode 100644 index ba2fcbbf84ce..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestGetAccessPolicy.yaml +++ /dev/null @@ -1,118 +0,0 @@ ---- -version: 1 -interactions: -- request: - body: '{"TableName":"gotableu56pkvz86todh"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "36" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Thu, 01 Jul 2021 22:14:57 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/Tables - method: POST - response: - body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotableu56pkvz86todh"}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - Date: - - Thu, 01 Jul 2021 22:14:58 GMT - Location: - - https://seankaneprim.table.core.windows.net/Tables('gotableu56pkvz86todh') - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - ea702b44-f002-0041-75c6-6eb091000000 - X-Ms-Version: - - "2019-02-02" - status: 201 Created - code: 201 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/xml - Authorization: - - sanitized - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Thu, 01 Jul 2021 22:14:57 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/gotableu56pkvz86todh?comp=acl - method: GET - response: - body: "\uFEFF\x3C\x3F\x78\x6D\x6C\x20\x76\x65\x72\x73\x69\x6F\x6E\x3D\"\x31\x2E\x30\"\x20\x65\x6E\x63\x6F\x64\x69\x6E\x67\x3D\"\x75\x74\x66\x2D\x38\"\x3F\x3E\x3C\x53\x69\x67\x6E\x65\x64\x49\x64\x65\x6E\x74\x69\x66\x69\x65\x72\x73\x20\x2F\x3E" - headers: - Content-Type: - - application/xml - Date: - - Thu, 01 Jul 2021 22:14:58 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Ms-Request-Id: - - ea702b6e-f002-0041-17c6-6eb091000000 - X-Ms-Version: - - "2019-02-02" - status: 200 OK - code: 200 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Thu, 01 Jul 2021 22:14:57 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/Tables('gotableu56pkvz86todh') - method: DELETE - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Date: - - Thu, 01 Jul 2021 22:14:58 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - ea702b94-f002-0041-3dc6-6eb091000000 - X-Ms-Version: - - "2019-02-02" - status: 204 No Content - code: 204 - duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestGetEntity-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestGetEntity-variables.yaml deleted file mode 100644 index cf961f9b1cd5..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestGetEntity-variables.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -STORAGE_ENDPOINT_SUFFIX: core.windows.net -TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== -TABLES_STORAGE_ACCOUNT_NAME: chrisstablesprim -randomSeed: "1621634376" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestGetEntity.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestGetEntity.yaml deleted file mode 100644 index 908730a04650..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestGetEntity.yaml +++ /dev/null @@ -1,181 +0,0 @@ ---- -version: 1 -interactions: -- request: - body: '{"TableName":"gotabler50ulgi64r43f"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "36" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; - Windows_NT) - X-Ms-Date: - - Fri, 21 May 2021 21:59:36 GMT - X-Ms-Version: - - "2019-02-02" - url: https://chrisstablesprim.table.core.windows.net/Tables - method: POST - response: - body: '{"odata.metadata":"https://chrisstablesprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotabler50ulgi64r43f"}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - Date: - - Fri, 21 May 2021 21:59:38 GMT - Location: - - https://chrisstablesprim.table.core.windows.net/Tables('gotabler50ulgi64r43f') - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 32966ff3-c002-006c-348c-4edf83000000 - X-Ms-Version: - - "2019-02-02" - status: 201 Created - code: 201 - duration: "" -- request: - body: '{"BoolProp":true,"IntProp":1,"PartitionKey":"partition","RowKey":"1","StringProp":"some - string 1"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "98" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - Prefer: - - return-no-content - User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; - Windows_NT) - X-Ms-Date: - - Fri, 21 May 2021 21:59:38 GMT - X-Ms-Version: - - "2019-02-02" - url: https://chrisstablesprim.table.core.windows.net/gotabler50ulgi64r43f - method: POST - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Dataserviceid: - - https://chrisstablesprim.table.core.windows.net/gotabler50ulgi64r43f(PartitionKey='partition',RowKey='1') - Date: - - Fri, 21 May 2021 21:59:38 GMT - Etag: - - W/"datetime'2021-05-21T21%3A59%3A39.1154205Z'" - Location: - - https://chrisstablesprim.table.core.windows.net/gotabler50ulgi64r43f(PartitionKey='partition',RowKey='1') - Preference-Applied: - - return-no-content - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 32967012-c002-006c-4f8c-4edf83000000 - X-Ms-Version: - - "2019-02-02" - status: 204 No Content - code: 204 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; - Windows_NT) - X-Ms-Date: - - Fri, 21 May 2021 21:59:38 GMT - X-Ms-Version: - - "2019-02-02" - url: https://chrisstablesprim.table.core.windows.net/gotabler50ulgi64r43f(PartitionKey='partition',RowKey='1') - method: GET - response: - body: '{"odata.metadata":"https://chrisstablesprim.table.core.windows.net/$metadata#gotabler50ulgi64r43f/@Element","odata.etag":"W/\"datetime''2021-05-21T21%3A59%3A39.1154205Z''\"","PartitionKey":"partition","RowKey":"1","Timestamp":"2021-05-21T21:59:39.1154205Z","BoolProp":true,"IntProp":1,"StringProp":"some - string 1"}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - Date: - - Fri, 21 May 2021 21:59:39 GMT - Etag: - - W/"datetime'2021-05-21T21%3A59%3A39.1154205Z'" - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 3296702c-c002-006c-648c-4edf83000000 - X-Ms-Version: - - "2019-02-02" - status: 200 OK - code: 200 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.16.1 (go1.16.2; - Windows_NT) - X-Ms-Date: - - Fri, 21 May 2021 21:59:39 GMT - X-Ms-Version: - - "2019-02-02" - url: https://chrisstablesprim.table.core.windows.net/Tables('gotabler50ulgi64r43f') - method: DELETE - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Date: - - Fri, 21 May 2021 21:59:39 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 32967036-c002-006c-6d8c-4edf83000000 - X-Ms-Version: - - "2019-02-02" - status: 204 No Content - code: 204 - duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestInsertEntity-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestInsertEntity-variables.yaml deleted file mode 100644 index 4454e3872726..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestInsertEntity-variables.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -STORAGE_ENDPOINT_SUFFIX: core.windows.net -TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== -TABLES_STORAGE_ACCOUNT_NAME: seankaneprim -randomSeed: "1627676806" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestInsertEntity.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestInsertEntity.yaml deleted file mode 100644 index 3fb4e62a7d2c..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestInsertEntity.yaml +++ /dev/null @@ -1,263 +0,0 @@ ---- -version: 1 -interactions: -- request: - body: '{"TableName":"gotableluvvxisl8eckq"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "36" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Fri, 30 Jul 2021 20:26:46 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/Tables - method: POST - response: - body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotableluvvxisl8eckq"}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - Date: - - Fri, 30 Jul 2021 20:26:46 GMT - Location: - - https://seankaneprim.table.core.windows.net/Tables('gotableluvvxisl8eckq') - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 32a4a100-c002-0038-2581-854cb5000000 - X-Ms-Version: - - "2019-02-02" - status: 201 Created - code: 201 - duration: "" -- request: - body: '{"Bool":true,"Integer":1,"PartitionKey":"partition","RowKey":"1","String":"some - string 1","Timestamp":"0001-01-01T00:00:00Z"}' - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - Content-Length: - - "125" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Fri, 30 Jul 2021 20:26:46 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/gotableluvvxisl8eckq(PartitionKey='partition',RowKey='1') - method: PUT - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Date: - - Fri, 30 Jul 2021 20:26:46 GMT - Etag: - - W/"datetime'2021-07-30T20%3A26%3A47.7916491Z'" - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 32a4a12c-c002-0038-4b81-854cb5000000 - X-Ms-Version: - - "2019-02-02" - status: 204 No Content - code: 204 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Fri, 30 Jul 2021 20:26:46 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/gotableluvvxisl8eckq(PartitionKey='partition',RowKey='1') - method: GET - response: - body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#gotableluvvxisl8eckq/@Element","odata.etag":"W/\"datetime''2021-07-30T20%3A26%3A47.7916491Z''\"","PartitionKey":"partition","RowKey":"1","Timestamp":"2021-07-30T20:26:47.7916491Z","Bool":true,"Integer":1,"String":"some - string 1"}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - Date: - - Fri, 30 Jul 2021 20:26:46 GMT - Etag: - - W/"datetime'2021-07-30T20%3A26%3A47.7916491Z'" - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - Vary: - - Origin - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 32a4a15c-c002-0038-7981-854cb5000000 - X-Ms-Version: - - "2019-02-02" - status: 200 OK - code: 200 - duration: "" -- request: - body: '{"Integer":1,"MergeProperty":"foo","PartitionKey":"partition","RowKey":"1","String":"some - string 1"}' - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - Content-Length: - - "100" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Fri, 30 Jul 2021 20:26:46 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/gotableluvvxisl8eckq(PartitionKey='partition',RowKey='1') - method: PUT - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Date: - - Fri, 30 Jul 2021 20:26:47 GMT - Etag: - - W/"datetime'2021-07-30T20%3A26%3A48.0058009Z'" - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 32a4a18b-c002-0038-2581-854cb5000000 - X-Ms-Version: - - "2019-02-02" - status: 204 No Content - code: 204 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Fri, 30 Jul 2021 20:26:47 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/gotableluvvxisl8eckq()?%24filter=RowKey+eq+%271%27 - method: GET - response: - body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#gotableluvvxisl8eckq","value":[{"odata.etag":"W/\"datetime''2021-07-30T20%3A26%3A48.0058009Z''\"","PartitionKey":"partition","RowKey":"1","Timestamp":"2021-07-30T20:26:48.0058009Z","Integer":1,"MergeProperty":"foo","String":"some - string 1"}]}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - Date: - - Fri, 30 Jul 2021 20:26:47 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - Vary: - - Origin - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 32a4a1c7-c002-0038-5d81-854cb5000000 - X-Ms-Version: - - "2019-02-02" - status: 200 OK - code: 200 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Fri, 30 Jul 2021 20:26:47 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/Tables('gotableluvvxisl8eckq') - method: DELETE - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Date: - - Fri, 30 Jul 2021 20:26:47 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 32a4a1f0-c002-0038-0581-854cb5000000 - X-Ms-Version: - - "2019-02-02" - status: 204 No Content - code: 204 - duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestInvalidEntity-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestInvalidEntity-variables.yaml deleted file mode 100644 index 48013f45c805..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestInvalidEntity-variables.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -STORAGE_ENDPOINT_SUFFIX: core.windows.net -TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== -TABLES_STORAGE_ACCOUNT_NAME: seankaneprim -randomSeed: "1625174623" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestInvalidEntity.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestInvalidEntity.yaml deleted file mode 100644 index a309d8dd3067..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestInvalidEntity.yaml +++ /dev/null @@ -1,133 +0,0 @@ ---- -version: 1 -interactions: -- request: - body: '{"TableName":"gotablen0ipkkd8ohqoy"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "36" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Thu, 01 Jul 2021 21:23:43 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/Tables - method: POST - response: - body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotablen0ipkkd8ohqoy"}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - Date: - - Thu, 01 Jul 2021 21:23:44 GMT - Location: - - https://seankaneprim.table.core.windows.net/Tables('gotablen0ipkkd8ohqoy') - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 767eaafb-2002-0052-0bbf-6e949d000000 - X-Ms-Version: - - "2019-02-02" - status: 201 Created - code: 201 - duration: "" -- request: - body: '{"String":"stringystring","Value":10}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "37" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - Prefer: - - return-no-content - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Thu, 01 Jul 2021 21:23:44 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/gotablen0ipkkd8ohqoy - method: POST - response: - body: '{"odata.error":{"code":"PropertiesNeedValue","message":{"lang":"en-US","value":"The - values are not specified for all properties in the entity.\nRequestId:767eab30-2002-0052-3dbf-6e949d000000\nTime:2021-07-01T21:23:45.3479288Z"}}}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - Date: - - Thu, 01 Jul 2021 21:23:44 GMT - Preference-Applied: - - return-no-content - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 767eab30-2002-0052-3dbf-6e949d000000 - X-Ms-Version: - - "2019-02-02" - status: 400 Bad Request - code: 400 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Thu, 01 Jul 2021 21:23:44 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/Tables('gotablen0ipkkd8ohqoy') - method: DELETE - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Date: - - Thu, 01 Jul 2021 21:23:44 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 767eab70-2002-0052-7bbf-6e949d000000 - X-Ms-Version: - - "2019-02-02" - status: 204 No Content - code: 204 - duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestListEntities-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestListEntities-variables.yaml deleted file mode 100644 index d5b7be133444..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestListEntities-variables.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -STORAGE_ENDPOINT_SUFFIX: core.windows.net -TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== -TABLES_STORAGE_ACCOUNT_NAME: seankaneprim -randomSeed: "1626796654" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestListEntities.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestListEntities.yaml deleted file mode 100644 index 6a1ca63a2c47..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestListEntities.yaml +++ /dev/null @@ -1,389 +0,0 @@ ---- -version: 1 -interactions: -- request: - body: '{"TableName":"gotablemwc9x1cbe9eur"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "36" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Tue, 20 Jul 2021 15:57:34 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/Tables - method: POST - response: - body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotablemwc9x1cbe9eur"}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - Date: - - Tue, 20 Jul 2021 15:57:34 GMT - Location: - - https://seankaneprim.table.core.windows.net/Tables('gotablemwc9x1cbe9eur') - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - fa96f097-3002-0071-097f-7d0e5e000000 - X-Ms-Version: - - "2019-02-02" - status: 201 Created - code: 201 - duration: "" -- request: - body: '{"PartitionKey":"partition","RowKey":"0","Value":1}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "51" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - Prefer: - - return-no-content - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Tue, 20 Jul 2021 15:57:35 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/gotablemwc9x1cbe9eur - method: POST - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Dataserviceid: - - https://seankaneprim.table.core.windows.net/gotablemwc9x1cbe9eur(PartitionKey='partition',RowKey='0') - Date: - - Tue, 20 Jul 2021 15:57:34 GMT - Etag: - - W/"datetime'2021-07-20T15%3A57%3A35.6389627Z'" - Location: - - https://seankaneprim.table.core.windows.net/gotablemwc9x1cbe9eur(PartitionKey='partition',RowKey='0') - Preference-Applied: - - return-no-content - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - fa96f0da-3002-0071-427f-7d0e5e000000 - X-Ms-Version: - - "2019-02-02" - status: 204 No Content - code: 204 - duration: "" -- request: - body: '{"PartitionKey":"partition","RowKey":"1","Value":2}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "51" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - Prefer: - - return-no-content - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Tue, 20 Jul 2021 15:57:35 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/gotablemwc9x1cbe9eur - method: POST - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Dataserviceid: - - https://seankaneprim.table.core.windows.net/gotablemwc9x1cbe9eur(PartitionKey='partition',RowKey='1') - Date: - - Tue, 20 Jul 2021 15:57:35 GMT - Etag: - - W/"datetime'2021-07-20T15%3A57%3A35.7230224Z'" - Location: - - https://seankaneprim.table.core.windows.net/gotablemwc9x1cbe9eur(PartitionKey='partition',RowKey='1') - Preference-Applied: - - return-no-content - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - fa96f0fd-3002-0071-647f-7d0e5e000000 - X-Ms-Version: - - "2019-02-02" - status: 204 No Content - code: 204 - duration: "" -- request: - body: '{"PartitionKey":"partition","RowKey":"2","Value":3}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "51" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - Prefer: - - return-no-content - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Tue, 20 Jul 2021 15:57:35 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/gotablemwc9x1cbe9eur - method: POST - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Dataserviceid: - - https://seankaneprim.table.core.windows.net/gotablemwc9x1cbe9eur(PartitionKey='partition',RowKey='2') - Date: - - Tue, 20 Jul 2021 15:57:35 GMT - Etag: - - W/"datetime'2021-07-20T15%3A57%3A35.811085Z'" - Location: - - https://seankaneprim.table.core.windows.net/gotablemwc9x1cbe9eur(PartitionKey='partition',RowKey='2') - Preference-Applied: - - return-no-content - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - fa96f160-3002-0071-447f-7d0e5e000000 - X-Ms-Version: - - "2019-02-02" - status: 204 No Content - code: 204 - duration: "" -- request: - body: '{"PartitionKey":"partition","RowKey":"3","Value":4}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "51" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - Prefer: - - return-no-content - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Tue, 20 Jul 2021 15:57:35 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/gotablemwc9x1cbe9eur - method: POST - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Dataserviceid: - - https://seankaneprim.table.core.windows.net/gotablemwc9x1cbe9eur(PartitionKey='partition',RowKey='3') - Date: - - Tue, 20 Jul 2021 15:57:35 GMT - Etag: - - W/"datetime'2021-07-20T15%3A57%3A35.898147Z'" - Location: - - https://seankaneprim.table.core.windows.net/gotablemwc9x1cbe9eur(PartitionKey='partition',RowKey='3') - Preference-Applied: - - return-no-content - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - fa96f189-3002-0071-6b7f-7d0e5e000000 - X-Ms-Version: - - "2019-02-02" - status: 204 No Content - code: 204 - duration: "" -- request: - body: '{"PartitionKey":"partition","RowKey":"4","Value":5}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "51" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - Prefer: - - return-no-content - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Tue, 20 Jul 2021 15:57:35 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/gotablemwc9x1cbe9eur - method: POST - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Dataserviceid: - - https://seankaneprim.table.core.windows.net/gotablemwc9x1cbe9eur(PartitionKey='partition',RowKey='4') - Date: - - Tue, 20 Jul 2021 15:57:35 GMT - Etag: - - W/"datetime'2021-07-20T15%3A57%3A35.9842082Z'" - Location: - - https://seankaneprim.table.core.windows.net/gotablemwc9x1cbe9eur(PartitionKey='partition',RowKey='4') - Preference-Applied: - - return-no-content - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - fa96f1b7-3002-0071-197f-7d0e5e000000 - X-Ms-Version: - - "2019-02-02" - status: 204 No Content - code: 204 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Tue, 20 Jul 2021 15:57:35 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/gotablemwc9x1cbe9eur() - method: GET - response: - body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#gotablemwc9x1cbe9eur","value":[{"odata.etag":"W/\"datetime''2021-07-20T15%3A57%3A35.6389627Z''\"","PartitionKey":"partition","RowKey":"0","Timestamp":"2021-07-20T15:57:35.6389627Z","Value":1},{"odata.etag":"W/\"datetime''2021-07-20T15%3A57%3A35.7230224Z''\"","PartitionKey":"partition","RowKey":"1","Timestamp":"2021-07-20T15:57:35.7230224Z","Value":2},{"odata.etag":"W/\"datetime''2021-07-20T15%3A57%3A35.811085Z''\"","PartitionKey":"partition","RowKey":"2","Timestamp":"2021-07-20T15:57:35.811085Z","Value":3},{"odata.etag":"W/\"datetime''2021-07-20T15%3A57%3A35.898147Z''\"","PartitionKey":"partition","RowKey":"3","Timestamp":"2021-07-20T15:57:35.898147Z","Value":4},{"odata.etag":"W/\"datetime''2021-07-20T15%3A57%3A35.9842082Z''\"","PartitionKey":"partition","RowKey":"4","Timestamp":"2021-07-20T15:57:35.9842082Z","Value":5}]}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - Date: - - Tue, 20 Jul 2021 15:57:35 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - fa96f1e0-3002-0071-417f-7d0e5e000000 - X-Ms-Version: - - "2019-02-02" - status: 200 OK - code: 200 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Tue, 20 Jul 2021 15:57:35 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/Tables('gotablemwc9x1cbe9eur') - method: DELETE - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Date: - - Tue, 20 Jul 2021 15:57:35 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - fa96f214-3002-0071-737f-7d0e5e000000 - X-Ms-Version: - - "2019-02-02" - status: 204 No Content - code: 204 - duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestMergeEntity-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestMergeEntity-variables.yaml deleted file mode 100644 index 0305223b8086..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestMergeEntity-variables.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -STORAGE_ENDPOINT_SUFFIX: core.windows.net -TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== -TABLES_STORAGE_ACCOUNT_NAME: seankaneprim -randomSeed: "1626385706" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestMergeEntity.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestMergeEntity.yaml deleted file mode 100644 index 1eac2bf01976..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestMergeEntity.yaml +++ /dev/null @@ -1,269 +0,0 @@ ---- -version: 1 -interactions: -- request: - body: '{"TableName":"gotable2blgm80ksz795"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "36" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Thu, 15 Jul 2021 21:48:26 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/Tables - method: POST - response: - body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotable2blgm80ksz795"}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - Date: - - Thu, 15 Jul 2021 21:48:25 GMT - Location: - - https://seankaneprim.table.core.windows.net/Tables('gotable2blgm80ksz795') - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 4eedf402-2002-001f-53c3-795b71000000 - X-Ms-Version: - - "2019-02-02" - status: 201 Created - code: 201 - duration: "" -- request: - body: '{"Bool":true,"Integer":1,"PartitionKey":"partition","RowKey":"1","String":"some - string 1","Timestamp":"0001-01-01T00:00:00Z"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "125" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - Prefer: - - return-no-content - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Thu, 15 Jul 2021 21:48:27 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/gotable2blgm80ksz795 - method: POST - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Dataserviceid: - - https://seankaneprim.table.core.windows.net/gotable2blgm80ksz795(PartitionKey='partition',RowKey='1') - Date: - - Thu, 15 Jul 2021 21:48:25 GMT - Etag: - - W/"datetime'2021-07-15T21%3A48%3A26.5515699Z'" - Location: - - https://seankaneprim.table.core.windows.net/gotable2blgm80ksz795(PartitionKey='partition',RowKey='1') - Preference-Applied: - - return-no-content - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 4eedf422-2002-001f-6dc3-795b71000000 - X-Ms-Version: - - "2019-02-02" - status: 204 No Content - code: 204 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Thu, 15 Jul 2021 21:48:27 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/gotable2blgm80ksz795(PartitionKey='partition',RowKey='1') - method: GET - response: - body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#gotable2blgm80ksz795/@Element","odata.etag":"W/\"datetime''2021-07-15T21%3A48%3A26.5515699Z''\"","PartitionKey":"partition","RowKey":"1","Timestamp":"2021-07-15T21:48:26.5515699Z","Bool":true,"Integer":1,"String":"some - string 1"}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - Date: - - Thu, 15 Jul 2021 21:48:25 GMT - Etag: - - W/"datetime'2021-07-15T21%3A48%3A26.5515699Z'" - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 4eedf439-2002-001f-02c3-795b71000000 - X-Ms-Version: - - "2019-02-02" - status: 200 OK - code: 200 - duration: "" -- request: - body: '{"Bool":true,"Integer":1,"MergeProperty":"foo","PartitionKey":"partition","RowKey":"1","String":"some - string 1","Timestamp":"0001-01-01T00:00:00Z"}' - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - Content-Length: - - "147" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - If-Match: - - '*' - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Thu, 15 Jul 2021 21:48:27 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/gotable2blgm80ksz795(PartitionKey='partition',RowKey='1') - method: PATCH - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Date: - - Thu, 15 Jul 2021 21:48:25 GMT - Etag: - - W/"datetime'2021-07-15T21%3A48%3A26.7711098Z'" - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 4eedf459-2002-001f-20c3-795b71000000 - X-Ms-Version: - - "2019-02-02" - status: 204 No Content - code: 204 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Thu, 15 Jul 2021 21:48:27 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/gotable2blgm80ksz795()?%24filter=RowKey+eq+%271%27 - method: GET - response: - body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#gotable2blgm80ksz795","value":[{"odata.etag":"W/\"datetime''2021-07-15T21%3A48%3A26.7711098Z''\"","PartitionKey":"partition","RowKey":"1","Timestamp":"2021-07-15T21:48:26.7711098Z","Bool":true,"Integer":1,"MergeProperty":"foo","String":"some - string 1"}]}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - Date: - - Thu, 15 Jul 2021 21:48:25 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 4eedf48f-2002-001f-54c3-795b71000000 - X-Ms-Version: - - "2019-02-02" - status: 200 OK - code: 200 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Thu, 15 Jul 2021 21:48:28 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/Tables('gotable2blgm80ksz795') - method: DELETE - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Date: - - Thu, 15 Jul 2021 21:48:26 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 4eedf4ab-2002-001f-6cc3-795b71000000 - X-Ms-Version: - - "2019-02-02" - status: 204 No Content - code: 204 - duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestQueryComplexEntity-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestQueryComplexEntity-variables.yaml deleted file mode 100644 index 16c814672b81..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestQueryComplexEntity-variables.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -STORAGE_ENDPOINT_SUFFIX: core.windows.net -TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== -TABLES_STORAGE_ACCOUNT_NAME: seankaneprim -randomSeed: "1626385681" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestQueryComplexEntity.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestQueryComplexEntity.yaml deleted file mode 100644 index 928812457fb8..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestQueryComplexEntity.yaml +++ /dev/null @@ -1,389 +0,0 @@ ---- -version: 1 -interactions: -- request: - body: '{"TableName":"gotablejzpyj5z4607mt"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "36" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Thu, 15 Jul 2021 21:48:01 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/Tables - method: POST - response: - body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotablejzpyj5z4607mt"}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - Date: - - Thu, 15 Jul 2021 21:48:00 GMT - Location: - - https://seankaneprim.table.core.windows.net/Tables('gotablejzpyj5z4607mt') - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 48af401d-8002-0090-1bc3-79d21b000000 - X-Ms-Version: - - "2019-02-02" - status: 201 Created - code: 201 - duration: "" -- request: - body: '{"Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":1,"PartitionKey":"partition","RowKey":"1","String":"someString","Timestamp":"0001-01-01T00:00:00Z"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "194" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - Prefer: - - return-no-content - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Thu, 15 Jul 2021 21:48:01 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/gotablejzpyj5z4607mt - method: POST - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Dataserviceid: - - https://seankaneprim.table.core.windows.net/gotablejzpyj5z4607mt(PartitionKey='partition',RowKey='1') - Date: - - Thu, 15 Jul 2021 21:48:00 GMT - Etag: - - W/"datetime'2021-07-15T21%3A48%3A00.9167262Z'" - Location: - - https://seankaneprim.table.core.windows.net/gotablejzpyj5z4607mt(PartitionKey='partition',RowKey='1') - Preference-Applied: - - return-no-content - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 48af4040-8002-0090-3bc3-79d21b000000 - X-Ms-Version: - - "2019-02-02" - status: 204 No Content - code: 204 - duration: "" -- request: - body: '{"Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":2,"PartitionKey":"partition","RowKey":"2","String":"someString","Timestamp":"0001-01-01T00:00:00Z"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "194" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - Prefer: - - return-no-content - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Thu, 15 Jul 2021 21:48:02 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/gotablejzpyj5z4607mt - method: POST - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Dataserviceid: - - https://seankaneprim.table.core.windows.net/gotablejzpyj5z4607mt(PartitionKey='partition',RowKey='2') - Date: - - Thu, 15 Jul 2021 21:48:00 GMT - Etag: - - W/"datetime'2021-07-15T21%3A48%3A01.0298082Z'" - Location: - - https://seankaneprim.table.core.windows.net/gotablejzpyj5z4607mt(PartitionKey='partition',RowKey='2') - Preference-Applied: - - return-no-content - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 48af4075-8002-0090-6fc3-79d21b000000 - X-Ms-Version: - - "2019-02-02" - status: 204 No Content - code: 204 - duration: "" -- request: - body: '{"Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":3,"PartitionKey":"partition","RowKey":"3","String":"someString","Timestamp":"0001-01-01T00:00:00Z"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "194" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - Prefer: - - return-no-content - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Thu, 15 Jul 2021 21:48:02 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/gotablejzpyj5z4607mt - method: POST - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Dataserviceid: - - https://seankaneprim.table.core.windows.net/gotablejzpyj5z4607mt(PartitionKey='partition',RowKey='3') - Date: - - Thu, 15 Jul 2021 21:48:01 GMT - Etag: - - W/"datetime'2021-07-15T21%3A48%3A01.140887Z'" - Location: - - https://seankaneprim.table.core.windows.net/gotablejzpyj5z4607mt(PartitionKey='partition',RowKey='3') - Preference-Applied: - - return-no-content - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 48af40b5-8002-0090-2dc3-79d21b000000 - X-Ms-Version: - - "2019-02-02" - status: 204 No Content - code: 204 - duration: "" -- request: - body: '{"Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":4,"PartitionKey":"partition","RowKey":"4","String":"someString","Timestamp":"0001-01-01T00:00:00Z"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "194" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - Prefer: - - return-no-content - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Thu, 15 Jul 2021 21:48:02 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/gotablejzpyj5z4607mt - method: POST - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Dataserviceid: - - https://seankaneprim.table.core.windows.net/gotablejzpyj5z4607mt(PartitionKey='partition',RowKey='4') - Date: - - Thu, 15 Jul 2021 21:48:01 GMT - Etag: - - W/"datetime'2021-07-15T21%3A48%3A01.2559673Z'" - Location: - - https://seankaneprim.table.core.windows.net/gotablejzpyj5z4607mt(PartitionKey='partition',RowKey='4') - Preference-Applied: - - return-no-content - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 48af40dd-8002-0090-54c3-79d21b000000 - X-Ms-Version: - - "2019-02-02" - status: 204 No Content - code: 204 - duration: "" -- request: - body: '{"Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":5,"PartitionKey":"partition","RowKey":"5","String":"someString","Timestamp":"0001-01-01T00:00:00Z"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "194" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - Prefer: - - return-no-content - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Thu, 15 Jul 2021 21:48:02 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/gotablejzpyj5z4607mt - method: POST - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Dataserviceid: - - https://seankaneprim.table.core.windows.net/gotablejzpyj5z4607mt(PartitionKey='partition',RowKey='5') - Date: - - Thu, 15 Jul 2021 21:48:01 GMT - Etag: - - W/"datetime'2021-07-15T21%3A48%3A01.3690484Z'" - Location: - - https://seankaneprim.table.core.windows.net/gotablejzpyj5z4607mt(PartitionKey='partition',RowKey='5') - Preference-Applied: - - return-no-content - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 48af410d-8002-0090-03c3-79d21b000000 - X-Ms-Version: - - "2019-02-02" - status: 204 No Content - code: 204 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Thu, 15 Jul 2021 21:48:02 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/gotablejzpyj5z4607mt()?%24filter=RowKey+lt+%275%27 - method: GET - response: - body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#gotablejzpyj5z4607mt","value":[{"odata.etag":"W/\"datetime''2021-07-15T21%3A48%3A00.9167262Z''\"","PartitionKey":"partition","RowKey":"1","Timestamp":"2021-07-15T21:48:00.9167262Z","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":1,"String":"someString"},{"odata.etag":"W/\"datetime''2021-07-15T21%3A48%3A01.0298082Z''\"","PartitionKey":"partition","RowKey":"2","Timestamp":"2021-07-15T21:48:01.0298082Z","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":2,"String":"someString"},{"odata.etag":"W/\"datetime''2021-07-15T21%3A48%3A01.140887Z''\"","PartitionKey":"partition","RowKey":"3","Timestamp":"2021-07-15T21:48:01.140887Z","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":3,"String":"someString"},{"odata.etag":"W/\"datetime''2021-07-15T21%3A48%3A01.2559673Z''\"","PartitionKey":"partition","RowKey":"4","Timestamp":"2021-07-15T21:48:01.2559673Z","Bool":true,"Byte":"c29tZWJ5dGVz","DateTime":"2021-07-13T00:00:00Z","Float":3.14159,"Integer":4,"String":"someString"}]}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - Date: - - Thu, 15 Jul 2021 21:48:01 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 48af412f-8002-0090-25c3-79d21b000000 - X-Ms-Version: - - "2019-02-02" - status: 200 OK - code: 200 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Thu, 15 Jul 2021 21:48:02 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/Tables('gotablejzpyj5z4607mt') - method: DELETE - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Date: - - Thu, 15 Jul 2021 21:48:01 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 48af4159-8002-0090-4ec3-79d21b000000 - X-Ms-Version: - - "2019-02-02" - status: 204 No Content - code: 204 - duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestQuerySimpleEntity-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestQuerySimpleEntity-variables.yaml deleted file mode 100644 index 7796ee2dc14e..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestQuerySimpleEntity-variables.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -STORAGE_ENDPOINT_SUFFIX: core.windows.net -TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== -TABLES_STORAGE_ACCOUNT_NAME: seankaneprim -randomSeed: "1626385663" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestQuerySimpleEntity.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestQuerySimpleEntity.yaml deleted file mode 100644 index f51244a319b3..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestQuerySimpleEntity.yaml +++ /dev/null @@ -1,398 +0,0 @@ ---- -version: 1 -interactions: -- request: - body: '{"TableName":"gotablek9778z5927xtv"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "36" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Thu, 15 Jul 2021 21:47:43 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/Tables - method: POST - response: - body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotablek9778z5927xtv"}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - Date: - - Thu, 15 Jul 2021 21:47:42 GMT - Location: - - https://seankaneprim.table.core.windows.net/Tables('gotablek9778z5927xtv') - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 32f1ec8a-7002-005f-0dc3-795c49000000 - X-Ms-Version: - - "2019-02-02" - status: 201 Created - code: 201 - duration: "" -- request: - body: '{"Bool":true,"Integer":1,"PartitionKey":"partition","RowKey":"1","String":"some - string 1","Timestamp":"0001-01-01T00:00:00Z"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "125" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - Prefer: - - return-no-content - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Thu, 15 Jul 2021 21:47:44 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/gotablek9778z5927xtv - method: POST - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Dataserviceid: - - https://seankaneprim.table.core.windows.net/gotablek9778z5927xtv(PartitionKey='partition',RowKey='1') - Date: - - Thu, 15 Jul 2021 21:47:42 GMT - Etag: - - W/"datetime'2021-07-15T21%3A47%3A43.1505573Z'" - Location: - - https://seankaneprim.table.core.windows.net/gotablek9778z5927xtv(PartitionKey='partition',RowKey='1') - Preference-Applied: - - return-no-content - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 32f1ecb5-7002-005f-34c3-795c49000000 - X-Ms-Version: - - "2019-02-02" - status: 204 No Content - code: 204 - duration: "" -- request: - body: '{"Bool":true,"Integer":2,"PartitionKey":"partition","RowKey":"2","String":"some - string 2","Timestamp":"0001-01-01T00:00:00Z"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "125" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - Prefer: - - return-no-content - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Thu, 15 Jul 2021 21:47:44 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/gotablek9778z5927xtv - method: POST - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Dataserviceid: - - https://seankaneprim.table.core.windows.net/gotablek9778z5927xtv(PartitionKey='partition',RowKey='2') - Date: - - Thu, 15 Jul 2021 21:47:42 GMT - Etag: - - W/"datetime'2021-07-15T21%3A47%3A43.2566321Z'" - Location: - - https://seankaneprim.table.core.windows.net/gotablek9778z5927xtv(PartitionKey='partition',RowKey='2') - Preference-Applied: - - return-no-content - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 32f1ecd8-7002-005f-52c3-795c49000000 - X-Ms-Version: - - "2019-02-02" - status: 204 No Content - code: 204 - duration: "" -- request: - body: '{"Bool":true,"Integer":3,"PartitionKey":"partition","RowKey":"3","String":"some - string 3","Timestamp":"0001-01-01T00:00:00Z"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "125" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - Prefer: - - return-no-content - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Thu, 15 Jul 2021 21:47:44 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/gotablek9778z5927xtv - method: POST - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Dataserviceid: - - https://seankaneprim.table.core.windows.net/gotablek9778z5927xtv(PartitionKey='partition',RowKey='3') - Date: - - Thu, 15 Jul 2021 21:47:42 GMT - Etag: - - W/"datetime'2021-07-15T21%3A47%3A43.3667092Z'" - Location: - - https://seankaneprim.table.core.windows.net/gotablek9778z5927xtv(PartitionKey='partition',RowKey='3') - Preference-Applied: - - return-no-content - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 32f1ed05-7002-005f-7cc3-795c49000000 - X-Ms-Version: - - "2019-02-02" - status: 204 No Content - code: 204 - duration: "" -- request: - body: '{"Bool":true,"Integer":4,"PartitionKey":"partition","RowKey":"4","String":"some - string 4","Timestamp":"0001-01-01T00:00:00Z"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "125" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - Prefer: - - return-no-content - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Thu, 15 Jul 2021 21:47:44 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/gotablek9778z5927xtv - method: POST - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Dataserviceid: - - https://seankaneprim.table.core.windows.net/gotablek9778z5927xtv(PartitionKey='partition',RowKey='4') - Date: - - Thu, 15 Jul 2021 21:47:42 GMT - Etag: - - W/"datetime'2021-07-15T21%3A47%3A43.48079Z'" - Location: - - https://seankaneprim.table.core.windows.net/gotablek9778z5927xtv(PartitionKey='partition',RowKey='4') - Preference-Applied: - - return-no-content - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 32f1ed2e-7002-005f-23c3-795c49000000 - X-Ms-Version: - - "2019-02-02" - status: 204 No Content - code: 204 - duration: "" -- request: - body: '{"Bool":true,"Integer":5,"PartitionKey":"partition","RowKey":"5","String":"some - string 5","Timestamp":"0001-01-01T00:00:00Z"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "125" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - Prefer: - - return-no-content - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Thu, 15 Jul 2021 21:47:44 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/gotablek9778z5927xtv - method: POST - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Dataserviceid: - - https://seankaneprim.table.core.windows.net/gotablek9778z5927xtv(PartitionKey='partition',RowKey='5') - Date: - - Thu, 15 Jul 2021 21:47:42 GMT - Etag: - - W/"datetime'2021-07-15T21%3A47%3A43.5858643Z'" - Location: - - https://seankaneprim.table.core.windows.net/gotablek9778z5927xtv(PartitionKey='partition',RowKey='5') - Preference-Applied: - - return-no-content - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 32f1ed50-7002-005f-45c3-795c49000000 - X-Ms-Version: - - "2019-02-02" - status: 204 No Content - code: 204 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Thu, 15 Jul 2021 21:47:44 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/gotablek9778z5927xtv()?%24filter=RowKey+lt+%275%27 - method: GET - response: - body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#gotablek9778z5927xtv","value":[{"odata.etag":"W/\"datetime''2021-07-15T21%3A47%3A43.1505573Z''\"","PartitionKey":"partition","RowKey":"1","Timestamp":"2021-07-15T21:47:43.1505573Z","Bool":true,"Integer":1,"String":"some - string 1"},{"odata.etag":"W/\"datetime''2021-07-15T21%3A47%3A43.2566321Z''\"","PartitionKey":"partition","RowKey":"2","Timestamp":"2021-07-15T21:47:43.2566321Z","Bool":true,"Integer":2,"String":"some - string 2"},{"odata.etag":"W/\"datetime''2021-07-15T21%3A47%3A43.3667092Z''\"","PartitionKey":"partition","RowKey":"3","Timestamp":"2021-07-15T21:47:43.3667092Z","Bool":true,"Integer":3,"String":"some - string 3"},{"odata.etag":"W/\"datetime''2021-07-15T21%3A47%3A43.48079Z''\"","PartitionKey":"partition","RowKey":"4","Timestamp":"2021-07-15T21:47:43.48079Z","Bool":true,"Integer":4,"String":"some - string 4"}]}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - Date: - - Thu, 15 Jul 2021 21:47:43 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 32f1ed69-7002-005f-5ec3-795c49000000 - X-Ms-Version: - - "2019-02-02" - status: 200 OK - code: 200 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Thu, 15 Jul 2021 21:47:44 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/Tables('gotablek9778z5927xtv') - method: DELETE - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Date: - - Thu, 15 Jul 2021 21:47:43 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 32f1ed9c-7002-005f-11c3-795c49000000 - X-Ms-Version: - - "2019-02-02" - status: 204 No Content - code: 204 - duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestServiceErrors-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestServiceErrors-variables.yaml deleted file mode 100644 index db3e9cbbe8a7..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestServiceErrors-variables.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -STORAGE_ENDPOINT_SUFFIX: core.windows.net -TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== -TABLES_STORAGE_ACCOUNT_NAME: chrisstablesprim -randomSeed: "1617580013" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestServiceErrors.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestServiceErrors.yaml deleted file mode 100644 index 65a3e042f9f4..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestServiceErrors.yaml +++ /dev/null @@ -1,129 +0,0 @@ ---- -version: 1 -interactions: -- request: - body: '{"TableName":"gotable4gghmbc0umbca"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "36" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; - Windows_NT) - X-Ms-Date: - - Sun, 04 Apr 2021 23:46:53 GMT - X-Ms-Version: - - "2019-02-02" - url: https://chrisstablesprim.table.core.windows.net/Tables - method: POST - response: - body: '{"odata.metadata":"https://chrisstablesprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotable4gghmbc0umbca"}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - Date: - - Sun, 04 Apr 2021 23:46:53 GMT - Location: - - https://chrisstablesprim.table.core.windows.net/Tables('gotable4gghmbc0umbca') - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 89afb2ba-b002-0066-1aac-297b34000000 - X-Ms-Version: - - "2019-02-02" - status: 201 Created - code: 201 - duration: "" -- request: - body: '{"TableName":"gotable4gghmbc0umbca"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "36" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; - Windows_NT) - X-Ms-Date: - - Sun, 04 Apr 2021 23:46:54 GMT - X-Ms-Version: - - "2019-02-02" - url: https://chrisstablesprim.table.core.windows.net/Tables - method: POST - response: - body: '{"odata.error":{"code":"TableAlreadyExists","message":{"lang":"en-US","value":"The - table specified already exists.\nRequestId:89afb2c5-b002-0066-23ac-297b34000000\nTime:2021-04-04T23:46:53.9829008Z"}}}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - Date: - - Sun, 04 Apr 2021 23:46:53 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 89afb2c5-b002-0066-23ac-297b34000000 - X-Ms-Version: - - "2019-02-02" - status: 409 Conflict - code: 409 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-tables/ azsdk-go-tables/ azcore/v0.13.4 (go1.16.2; - Windows_NT) - X-Ms-Date: - - Sun, 04 Apr 2021 23:46:54 GMT - X-Ms-Version: - - "2019-02-02" - url: https://chrisstablesprim.table.core.windows.net/Tables('gotable4gghmbc0umbca') - method: DELETE - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Date: - - Sun, 04 Apr 2021 23:46:53 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 89afb2cd-b002-0066-2aac-297b34000000 - X-Ms-Version: - - "2019-02-02" - status: 204 No Content - code: 204 - duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestSetAccessPolicy-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestSetAccessPolicy-variables.yaml deleted file mode 100644 index f41dcb551e19..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestSetAccessPolicy-variables.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -STORAGE_ENDPOINT_SUFFIX: core.windows.net -TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== -TABLES_STORAGE_ACCOUNT_NAME: seankaneprim -randomSeed: "1625849358" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestSetAccessPolicy.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestSetAccessPolicy.yaml deleted file mode 100644 index 370066baf737..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestSetAccessPolicy.yaml +++ /dev/null @@ -1,122 +0,0 @@ ---- -version: 1 -interactions: -- request: - body: '{"TableName":"gotable0qolgueqbqo8m"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "36" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Fri, 09 Jul 2021 16:49:18 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/Tables - method: POST - response: - body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotable0qolgueqbqo8m"}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - Date: - - Fri, 09 Jul 2021 16:49:18 GMT - Location: - - https://seankaneprim.table.core.windows.net/Tables('gotable0qolgueqbqo8m') - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 77af8ed1-c002-0081-0ce2-7448af000000 - X-Ms-Version: - - "2019-02-02" - status: 201 Created - code: 201 - duration: "" -- request: - body: r2024-01-01T00:00:00Z2020-01-01T00:00:00Z1 - form: {} - headers: - Accept: - - application/xml - Authorization: - - sanitized - Content-Length: - - "213" - Content-Type: - - application/xml - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Fri, 09 Jul 2021 16:49:19 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/gotable0qolgueqbqo8m?comp=acl - method: PUT - response: - body: "" - headers: - Content-Length: - - "0" - Date: - - Fri, 09 Jul 2021 16:49:18 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Ms-Request-Id: - - 77af8f20-c002-0081-58e2-7448af000000 - X-Ms-Version: - - "2019-02-02" - status: 204 No Content - code: 204 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Fri, 09 Jul 2021 16:49:19 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/Tables('gotable0qolgueqbqo8m') - method: DELETE - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Date: - - Fri, 09 Jul 2021 16:49:18 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 77af8f95-c002-0081-4ae2-7448af000000 - X-Ms-Version: - - "2019-02-02" - status: 204 No Content - code: 204 - duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestSetEmptyAccessPolicy-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestSetEmptyAccessPolicy-variables.yaml deleted file mode 100644 index 75da5d52f9a0..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestSetEmptyAccessPolicy-variables.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -STORAGE_ENDPOINT_SUFFIX: core.windows.net -TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== -TABLES_STORAGE_ACCOUNT_NAME: seankaneprim -randomSeed: "1625242264" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestSetEmptyAccessPolicy.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestSetEmptyAccessPolicy.yaml deleted file mode 100644 index 78cfefca3141..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestSetEmptyAccessPolicy.yaml +++ /dev/null @@ -1,118 +0,0 @@ ---- -version: 1 -interactions: -- request: - body: '{"TableName":"gotablemp92a68btv51b"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "36" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Fri, 02 Jul 2021 16:11:04 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/Tables - method: POST - response: - body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotablemp92a68btv51b"}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - Date: - - Fri, 02 Jul 2021 16:11:04 GMT - Location: - - https://seankaneprim.table.core.windows.net/Tables('gotablemp92a68btv51b') - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 6acd05cd-4002-006b-295c-6f6f81000000 - X-Ms-Version: - - "2019-02-02" - status: 201 Created - code: 201 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/xml - Authorization: - - sanitized - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Fri, 02 Jul 2021 16:11:04 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/gotablemp92a68btv51b?comp=acl - method: PUT - response: - body: "" - headers: - Content-Length: - - "0" - Date: - - Fri, 02 Jul 2021 16:11:04 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Ms-Request-Id: - - 6acd0623-4002-006b-7c5c-6f6f81000000 - X-Ms-Version: - - "2019-02-02" - status: 204 No Content - code: 204 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Fri, 02 Jul 2021 16:11:05 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/Tables('gotablemp92a68btv51b') - method: DELETE - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Date: - - Fri, 02 Jul 2021 16:11:04 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 6acd066d-4002-006b-405c-6f6f81000000 - X-Ms-Version: - - "2019-02-02" - status: 204 No Content - code: 204 - duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestSetMultipleAccessPolicies-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestSetMultipleAccessPolicies-variables.yaml deleted file mode 100644 index 546d40d8997e..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestSetMultipleAccessPolicies-variables.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -STORAGE_ENDPOINT_SUFFIX: core.windows.net -TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== -TABLES_STORAGE_ACCOUNT_NAME: seankaneprim -randomSeed: "1625849315" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestSetMultipleAccessPolicies.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestSetMultipleAccessPolicies.yaml deleted file mode 100644 index 84feff7b92a6..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestSetMultipleAccessPolicies.yaml +++ /dev/null @@ -1,155 +0,0 @@ ---- -version: 1 -interactions: -- request: - body: '{"TableName":"gotable4rpn1oqouhbus"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "36" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Fri, 09 Jul 2021 16:48:35 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/Tables - method: POST - response: - body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotable4rpn1oqouhbus"}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - Date: - - Fri, 09 Jul 2021 16:48:34 GMT - Location: - - https://seankaneprim.table.core.windows.net/Tables('gotable4rpn1oqouhbus') - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - eeaea336-1002-0014-1be2-74a01a000000 - X-Ms-Version: - - "2019-02-02" - status: 201 Created - code: 201 - duration: "" -- request: - body: emptyrpartialr2021-06-08T02:10:09Z2021-06-08T02:10:09Zfull - form: {} - headers: - Accept: - - application/xml - Authorization: - - sanitized - Content-Length: - - "375" - Content-Type: - - application/xml - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Fri, 09 Jul 2021 16:48:35 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/gotable4rpn1oqouhbus?comp=acl - method: PUT - response: - body: "" - headers: - Content-Length: - - "0" - Date: - - Fri, 09 Jul 2021 16:48:34 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Ms-Request-Id: - - eeaea364-1002-0014-47e2-74a01a000000 - X-Ms-Version: - - "2019-02-02" - status: 204 No Content - code: 204 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/xml - Authorization: - - sanitized - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Fri, 09 Jul 2021 16:48:36 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/gotable4rpn1oqouhbus?comp=acl - method: GET - response: - body: "\uFEFF\x3C\x3F\x78\x6D\x6C\x20\x76\x65\x72\x73\x69\x6F\x6E\x3D\"\x31\x2E\x30\"\x20\x65\x6E\x63\x6F\x64\x69\x6E\x67\x3D\"\x75\x74\x66\x2D\x38\"\x3F\x3E\x3C\x53\x69\x67\x6E\x65\x64\x49\x64\x65\x6E\x74\x69\x66\x69\x65\x72\x73\x3E\x3C\x53\x69\x67\x6E\x65\x64\x49\x64\x65\x6E\x74\x69\x66\x69\x65\x72\x3E\x3C\x49\x64\x3E\x65\x6D\x70\x74\x79\x3C\x2F\x49\x64\x3E\x3C\x2F\x53\x69\x67\x6E\x65\x64\x49\x64\x65\x6E\x74\x69\x66\x69\x65\x72\x3E\x3C\x53\x69\x67\x6E\x65\x64\x49\x64\x65\x6E\x74\x69\x66\x69\x65\x72\x3E\x3C\x49\x64\x3E\x70\x61\x72\x74\x69\x61\x6C\x3C\x2F\x49\x64\x3E\x3C\x41\x63\x63\x65\x73\x73\x50\x6F\x6C\x69\x63\x79\x3E\x3C\x50\x65\x72\x6D\x69\x73\x73\x69\x6F\x6E\x3E\x72\x3C\x2F\x50\x65\x72\x6D\x69\x73\x73\x69\x6F\x6E\x3E\x3C\x2F\x41\x63\x63\x65\x73\x73\x50\x6F\x6C\x69\x63\x79\x3E\x3C\x2F\x53\x69\x67\x6E\x65\x64\x49\x64\x65\x6E\x74\x69\x66\x69\x65\x72\x3E\x3C\x53\x69\x67\x6E\x65\x64\x49\x64\x65\x6E\x74\x69\x66\x69\x65\x72\x3E\x3C\x49\x64\x3E\x66\x75\x6C\x6C\x3C\x2F\x49\x64\x3E\x3C\x41\x63\x63\x65\x73\x73\x50\x6F\x6C\x69\x63\x79\x3E\x3C\x53\x74\x61\x72\x74\x3E\x32\x30\x32\x31\x2D\x30\x36\x2D\x30\x38\x54\x30\x32\x3A\x31\x30\x3A\x30\x39\x2E\x30\x30\x30\x30\x30\x30\x30\x5A\x3C\x2F\x53\x74\x61\x72\x74\x3E\x3C\x45\x78\x70\x69\x72\x79\x3E\x32\x30\x32\x31\x2D\x30\x36\x2D\x30\x38\x54\x30\x32\x3A\x31\x30\x3A\x30\x39\x2E\x30\x30\x30\x30\x30\x30\x30\x5A\x3C\x2F\x45\x78\x70\x69\x72\x79\x3E\x3C\x50\x65\x72\x6D\x69\x73\x73\x69\x6F\x6E\x3E\x72\x3C\x2F\x50\x65\x72\x6D\x69\x73\x73\x69\x6F\x6E\x3E\x3C\x2F\x41\x63\x63\x65\x73\x73\x50\x6F\x6C\x69\x63\x79\x3E\x3C\x2F\x53\x69\x67\x6E\x65\x64\x49\x64\x65\x6E\x74\x69\x66\x69\x65\x72\x3E\x3C\x2F\x53\x69\x67\x6E\x65\x64\x49\x64\x65\x6E\x74\x69\x66\x69\x65\x72\x73\x3E" - headers: - Content-Type: - - application/xml - Date: - - Fri, 09 Jul 2021 16:48:35 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Ms-Request-Id: - - eeaea3c2-1002-0014-24e2-74a01a000000 - X-Ms-Version: - - "2019-02-02" - status: 200 OK - code: 200 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Fri, 09 Jul 2021 16:48:36 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/Tables('gotable4rpn1oqouhbus') - method: DELETE - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Date: - - Fri, 09 Jul 2021 16:48:35 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - eeaea417-1002-0014-77e2-74a01a000000 - X-Ms-Version: - - "2019-02-02" - status: 204 No Content - code: 204 - duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestSetNullAccessPolicy-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestSetNullAccessPolicy-variables.yaml deleted file mode 100644 index 1182b61d3747..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestSetNullAccessPolicy-variables.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -STORAGE_ENDPOINT_SUFFIX: core.windows.net -TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== -TABLES_STORAGE_ACCOUNT_NAME: seankaneprim -randomSeed: "1625849998" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestSetNullAccessPolicy.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestSetNullAccessPolicy.yaml deleted file mode 100644 index e3ae9a2c669f..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestSetNullAccessPolicy.yaml +++ /dev/null @@ -1,155 +0,0 @@ ---- -version: 1 -interactions: -- request: - body: '{"TableName":"gotableuz6wghsqjmdrx"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "36" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Fri, 09 Jul 2021 16:59:58 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/Tables - method: POST - response: - body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotableuz6wghsqjmdrx"}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - Date: - - Fri, 09 Jul 2021 16:59:57 GMT - Location: - - https://seankaneprim.table.core.windows.net/Tables('gotableuz6wghsqjmdrx') - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - b41c3fb8-5002-0015-22e3-74ffc6000000 - X-Ms-Version: - - "2019-02-02" - status: 201 Created - code: 201 - duration: "" -- request: - body: null - form: {} - headers: - Accept: - - application/xml - Authorization: - - sanitized - Content-Length: - - "89" - Content-Type: - - application/xml - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Fri, 09 Jul 2021 16:59:59 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/gotableuz6wghsqjmdrx?comp=acl - method: PUT - response: - body: "" - headers: - Content-Length: - - "0" - Date: - - Fri, 09 Jul 2021 16:59:58 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Ms-Request-Id: - - b41c3ff7-5002-0015-5de3-74ffc6000000 - X-Ms-Version: - - "2019-02-02" - status: 204 No Content - code: 204 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/xml - Authorization: - - sanitized - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Fri, 09 Jul 2021 16:59:59 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/gotableuz6wghsqjmdrx?comp=acl - method: GET - response: - body: "\uFEFF\x3C\x3F\x78\x6D\x6C\x20\x76\x65\x72\x73\x69\x6F\x6E\x3D\"\x31\x2E\x30\"\x20\x65\x6E\x63\x6F\x64\x69\x6E\x67\x3D\"\x75\x74\x66\x2D\x38\"\x3F\x3E\x3C\x53\x69\x67\x6E\x65\x64\x49\x64\x65\x6E\x74\x69\x66\x69\x65\x72\x73\x3E\x3C\x53\x69\x67\x6E\x65\x64\x49\x64\x65\x6E\x74\x69\x66\x69\x65\x72\x3E\x3C\x49\x64\x3E\x6E\x75\x6C\x6C\x3C\x2F\x49\x64\x3E\x3C\x2F\x53\x69\x67\x6E\x65\x64\x49\x64\x65\x6E\x74\x69\x66\x69\x65\x72\x3E\x3C\x2F\x53\x69\x67\x6E\x65\x64\x49\x64\x65\x6E\x74\x69\x66\x69\x65\x72\x73\x3E" - headers: - Content-Type: - - application/xml - Date: - - Fri, 09 Jul 2021 16:59:58 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Ms-Request-Id: - - b41c401f-5002-0015-05e3-74ffc6000000 - X-Ms-Version: - - "2019-02-02" - status: 200 OK - code: 200 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Fri, 09 Jul 2021 16:59:59 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/Tables('gotableuz6wghsqjmdrx') - method: DELETE - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Date: - - Fri, 09 Jul 2021 16:59:58 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - b41c4068-5002-0015-4ce3-74ffc6000000 - X-Ms-Version: - - "2019-02-02" - status: 204 No Content - code: 204 - duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestSetTooManyAccessPolicies-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestSetTooManyAccessPolicies-variables.yaml deleted file mode 100644 index f429532bb617..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestSetTooManyAccessPolicies-variables.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -STORAGE_ENDPOINT_SUFFIX: core.windows.net -TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== -TABLES_STORAGE_ACCOUNT_NAME: seankaneprim -randomSeed: "1625849388" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestSetTooManyAccessPolicies.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestSetTooManyAccessPolicies.yaml deleted file mode 100644 index 22521cfec224..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestSetTooManyAccessPolicies.yaml +++ /dev/null @@ -1,129 +0,0 @@ ---- -version: 1 -interactions: -- request: - body: '{"TableName":"gotableal7ltzl6kugfg"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "36" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Fri, 09 Jul 2021 16:49:48 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/Tables - method: POST - response: - body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotableal7ltzl6kugfg"}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - Date: - - Fri, 09 Jul 2021 16:49:48 GMT - Location: - - https://seankaneprim.table.core.windows.net/Tables('gotableal7ltzl6kugfg') - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 86dd59fb-e002-0086-56e2-7424cc000000 - X-Ms-Version: - - "2019-02-02" - status: 201 Created - code: 201 - duration: "" -- request: - body: r2029-01-01T00:00:00Z2020-01-01T00:00:00Z5r2029-01-01T00:00:00Z2020-01-01T00:00:00Z5r2029-01-01T00:00:00Z2020-01-01T00:00:00Z5r2029-01-01T00:00:00Z2020-01-01T00:00:00Z5r2029-01-01T00:00:00Z2020-01-01T00:00:00Z5r2029-01-01T00:00:00Z2020-01-01T00:00:00Z5 - form: {} - headers: - Accept: - - application/xml - Authorization: - - sanitized - Content-Length: - - "1083" - Content-Type: - - application/xml - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Fri, 09 Jul 2021 16:49:49 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/gotableal7ltzl6kugfg?comp=acl - method: PUT - response: - body: |- - InvalidXmlDocumentXML specified is not syntactically valid. - RequestId:86dd5a4e-e002-0086-23e2-7424cc000000 - Time:2021-07-09T16:49:48.6605382Z - headers: - Content-Length: - - "327" - Content-Type: - - application/xml - Date: - - Fri, 09 Jul 2021 16:49:48 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Ms-Error-Code: - - InvalidXmlDocument - X-Ms-Request-Id: - - 86dd5a4e-e002-0086-23e2-7424cc000000 - X-Ms-Version: - - "2019-02-02" - status: 400 XML specified is not syntactically valid. - code: 400 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Fri, 09 Jul 2021 16:49:49 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/Tables('gotableal7ltzl6kugfg') - method: DELETE - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Date: - - Fri, 09 Jul 2021 16:49:48 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - 86dd5a85-e002-0086-57e2-7424cc000000 - X-Ms-Version: - - "2019-02-02" - status: 204 No Content - code: 204 - duration: "" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestUpsertEntity-variables.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestUpsertEntity-variables.yaml deleted file mode 100644 index 75cbc4a81627..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestUpsertEntity-variables.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -STORAGE_ENDPOINT_SUFFIX: core.windows.net -TABLES_PRIMARY_STORAGE_ACCOUNT_KEY: Kg== -TABLES_STORAGE_ACCOUNT_NAME: seankaneprim -randomSeed: "1626385645" diff --git a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestUpsertEntity.yaml b/sdk/tables/aztable/recordings/TestTableClient_Storage/TestUpsertEntity.yaml deleted file mode 100644 index d7844c3c6b2b..000000000000 --- a/sdk/tables/aztable/recordings/TestTableClient_Storage/TestUpsertEntity.yaml +++ /dev/null @@ -1,259 +0,0 @@ ---- -version: 1 -interactions: -- request: - body: '{"TableName":"gotablemhr5jkk1y0d72"}' - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Content-Length: - - "36" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Thu, 15 Jul 2021 21:47:25 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/Tables - method: POST - response: - body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element","TableName":"gotablemhr5jkk1y0d72"}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - Date: - - Thu, 15 Jul 2021 21:47:24 GMT - Location: - - https://seankaneprim.table.core.windows.net/Tables('gotablemhr5jkk1y0d72') - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - d5213e2a-d002-008d-49c2-79dfa7000000 - X-Ms-Version: - - "2019-02-02" - status: 201 Created - code: 201 - duration: "" -- request: - body: '{"Bool":true,"Integer":1,"PartitionKey":"partition","RowKey":"1","String":"some - string 1","Timestamp":"0001-01-01T00:00:00Z"}' - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - Content-Length: - - "125" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Thu, 15 Jul 2021 21:47:26 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/gotablemhr5jkk1y0d72(PartitionKey='partition',RowKey='1') - method: PUT - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Date: - - Thu, 15 Jul 2021 21:47:24 GMT - Etag: - - W/"datetime'2021-07-15T21%3A47%3A25.2690439Z'" - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - d5213e45-d002-008d-57c2-79dfa7000000 - X-Ms-Version: - - "2019-02-02" - status: 204 No Content - code: 204 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Thu, 15 Jul 2021 21:47:26 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/gotablemhr5jkk1y0d72(PartitionKey='partition',RowKey='1') - method: GET - response: - body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#gotablemhr5jkk1y0d72/@Element","odata.etag":"W/\"datetime''2021-07-15T21%3A47%3A25.2690439Z''\"","PartitionKey":"partition","RowKey":"1","Timestamp":"2021-07-15T21:47:25.2690439Z","Bool":true,"Integer":1,"String":"some - string 1"}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - Date: - - Thu, 15 Jul 2021 21:47:24 GMT - Etag: - - W/"datetime'2021-07-15T21%3A47%3A25.2690439Z'" - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - d5213e5a-d002-008d-64c2-79dfa7000000 - X-Ms-Version: - - "2019-02-02" - status: 200 OK - code: 200 - duration: "" -- request: - body: '{"Integer":1,"MergeProperty":"foo","PartitionKey":"partition","RowKey":"1","String":"some - string 1"}' - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - Content-Length: - - "100" - Content-Type: - - application/json - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Thu, 15 Jul 2021 21:47:26 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/gotablemhr5jkk1y0d72(PartitionKey='partition',RowKey='1') - method: PUT - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Date: - - Thu, 15 Jul 2021 21:47:24 GMT - Etag: - - W/"datetime'2021-07-15T21%3A47%3A25.4922034Z'" - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - d5213e80-d002-008d-7fc2-79dfa7000000 - X-Ms-Version: - - "2019-02-02" - status: 204 No Content - code: 204 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json;odata=minimalmetadata - Authorization: - - sanitized - Dataserviceversion: - - "3.0" - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Thu, 15 Jul 2021 21:47:26 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/gotablemhr5jkk1y0d72()?%24filter=RowKey+eq+%271%27 - method: GET - response: - body: '{"odata.metadata":"https://seankaneprim.table.core.windows.net/$metadata#gotablemhr5jkk1y0d72","value":[{"odata.etag":"W/\"datetime''2021-07-15T21%3A47%3A25.4922034Z''\"","PartitionKey":"partition","RowKey":"1","Timestamp":"2021-07-15T21:47:25.4922034Z","Integer":1,"MergeProperty":"foo","String":"some - string 1"}]}' - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - Date: - - Thu, 15 Jul 2021 21:47:24 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - d5213e9a-d002-008d-17c2-79dfa7000000 - X-Ms-Version: - - "2019-02-02" - status: 200 OK - code: 200 - duration: "" -- request: - body: "" - form: {} - headers: - Accept: - - application/json - Authorization: - - sanitized - User-Agent: - - azsdk-go-aztable/ azsdk-go-aztable/ azcore/v0.16.2 (go1.16.5; - Windows_NT) - X-Ms-Date: - - Thu, 15 Jul 2021 21:47:26 GMT - X-Ms-Version: - - "2019-02-02" - url: https://seankaneprim.table.core.windows.net/Tables('gotablemhr5jkk1y0d72') - method: DELETE - response: - body: "" - headers: - Cache-Control: - - no-cache - Content-Length: - - "0" - Date: - - Thu, 15 Jul 2021 21:47:24 GMT - Server: - - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 - X-Content-Type-Options: - - nosniff - X-Ms-Request-Id: - - d5213eab-d002-008d-27c3-79dfa7000000 - X-Ms-Version: - - "2019-02-02" - status: 204 No Content - code: 204 - duration: "" diff --git a/sdk/tables/aztable/recordings/TestUpsertEntity/TestUpsertEntity_cosmos.json b/sdk/tables/aztable/recordings/TestUpsertEntity/TestUpsertEntity_cosmos.json new file mode 100644 index 000000000000..3c5d71b33d10 --- /dev/null +++ b/sdk/tables/aztable/recordings/TestUpsertEntity/TestUpsertEntity_cosmos.json @@ -0,0 +1,207 @@ +{ + "Entries": [ + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/Tables", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "35", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:59 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "TableName": "tableName2941442851" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "Date": "Mon, 02 Aug 2021 18:01:58 GMT", + "ETag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A58.7090440Z\u0027\u0022", + "Location": "https://seankaneprim.table.cosmos.azure.com/Tables(\u0027tableName2941442851\u0027)", + "Transfer-Encoding": "chunked", + "x-ms-request-id": "482077b6-f28f-4226-b3f7-e577806e4b28" + }, + "ResponseBody": { + "TableName": "tableName2941442851", + "odata.metadata": "https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/tableName2941442851(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", + "RequestMethod": "PUT", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "PUT", + ":path": "/tableName2941442851(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", + ":scheme": "https", + "Accept": "application/json", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "125", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:59 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "Bool": true, + "Integer": 1, + "PartitionKey": "partition", + "RowKey": "1", + "String": "some string 1", + "Timestamp": "0001-01-01T00:00:00Z" + }, + "StatusCode": 204, + "ResponseHeaders": { + "Content-Type": "application/json", + "Date": "Mon, 02 Aug 2021 18:01:59 GMT", + "ETag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A59.3616392Z\u0027\u0022", + "x-ms-request-id": "89d03d66-f5a9-48bd-9b79-630bce7a3c57" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/tableName2941442851(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", + "RequestMethod": "GET", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "GET", + ":path": "/tableName2941442851(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:00 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "Date": "Mon, 02 Aug 2021 18:01:59 GMT", + "ETag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A59.3616392Z\u0027\u0022", + "Transfer-Encoding": "chunked", + "x-ms-request-id": "a1f6a398-213c-4098-ba60-2ea73fae92f6" + }, + "ResponseBody": { + "odata.metadata": "https://seankaneprim.table.cosmos.azure.com/tableName2941442851/$metadata#tableName2941442851/@Element", + "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A59.3616392Z\u0027\u0022", + "PartitionKey": "partition", + "RowKey": "1", + "Bool": true, + "Integer": 1, + "String": "some string 1", + "Timestamp": "2021-08-02T18:01:59.3616392Z" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/tableName2941442851(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", + "RequestMethod": "PUT", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "PUT", + ":path": "/tableName2941442851(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", + ":scheme": "https", + "Accept": "application/json", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "100", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:00 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "Integer": 1, + "MergeProperty": "foo", + "PartitionKey": "partition", + "RowKey": "1", + "String": "some string 1" + }, + "StatusCode": 204, + "ResponseHeaders": { + "Content-Type": "application/json", + "Date": "Mon, 02 Aug 2021 18:01:59 GMT", + "ETag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A59.6248072Z\u0027\u0022", + "x-ms-request-id": "fb03fef2-48fd-4282-9ccd-26143ecc074d" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/tableName2941442851()?%24filter=RowKey\u002Beq\u002B%271%27", + "RequestMethod": "GET", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "GET", + ":path": "/tableName2941442851()?%24filter=RowKey\u002Beq\u002B%271%27", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:00 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "Date": "Mon, 02 Aug 2021 18:01:59 GMT", + "Transfer-Encoding": "chunked", + "x-ms-request-id": "78b06880-c426-4787-a6b6-8282f9b46e98" + }, + "ResponseBody": { + "value": [ + { + "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A59.6248072Z\u0027\u0022", + "PartitionKey": "partition", + "RowKey": "1", + "Integer": 1, + "MergeProperty": "foo", + "String": "some string 1", + "Timestamp": "2021-08-02T18:01:59.6248072Z" + } + ], + "odata.metadata": "https://seankaneprim.table.cosmos.azure.com/$metadata#tableName2941442851" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables(\u0027tableName2941442851\u0027)", + "RequestMethod": "DELETE", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "DELETE", + ":path": "/Tables(\u0027tableName2941442851\u0027)", + ":scheme": "https", + "Accept": "application/json", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:02:00 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "Date": "Mon, 02 Aug 2021 18:01:59 GMT", + "x-ms-request-id": "9156c902-9c0b-4ef7-aebf-f44adef9cda5" + }, + "ResponseBody": null + } + ], + "Variables": {} +} \ No newline at end of file diff --git a/sdk/tables/aztable/recordings/TestUpsertEntity/TestUpsertEntity_storage.json b/sdk/tables/aztable/recordings/TestUpsertEntity/TestUpsertEntity_storage.json new file mode 100644 index 000000000000..e70a1edd4256 --- /dev/null +++ b/sdk/tables/aztable/recordings/TestUpsertEntity/TestUpsertEntity_storage.json @@ -0,0 +1,251 @@ +{ + "Entries": [ + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables", + "RequestMethod": "POST", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "POST", + ":path": "/Tables", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "35", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:58 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "TableName": "tableName4103702124" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", + "Date": "Mon, 02 Aug 2021 18:01:56 GMT", + "Location": "https://seankaneprim.table.core.windows.net/Tables(\u0027tableName4103702124\u0027)", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b646c-9002-0057-0dc8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": { + "odata.metadata": "https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element", + "TableName": "tableName4103702124" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/tableName4103702124(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", + "RequestMethod": "PUT", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "PUT", + ":path": "/tableName4103702124(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", + ":scheme": "https", + "Accept": "application/json", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "125", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:58 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "Bool": true, + "Integer": 1, + "PartitionKey": "partition", + "RowKey": "1", + "String": "some string 1", + "Timestamp": "0001-01-01T00:00:00Z" + }, + "StatusCode": 204, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "0", + "Date": "Mon, 02 Aug 2021 18:01:56 GMT", + "ETag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A57.8187862Z\u0027\u0022", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b6487-9002-0057-27c8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/tableName4103702124(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", + "RequestMethod": "GET", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "GET", + ":path": "/tableName4103702124(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:58 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", + "Date": "Mon, 02 Aug 2021 18:01:57 GMT", + "ETag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A57.8187862Z\u0027\u0022", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "Vary": "Origin", + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b64aa-9002-0057-4ac8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": { + "odata.metadata": "https://seankaneprim.table.core.windows.net/$metadata#tableName4103702124/@Element", + "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A57.8187862Z\u0027\u0022", + "PartitionKey": "partition", + "RowKey": "1", + "Timestamp": "2021-08-02T18:01:57.8187862Z", + "Bool": true, + "Integer": 1, + "String": "some string 1" + } + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/tableName4103702124(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", + "RequestMethod": "PUT", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "PUT", + ":path": "/tableName4103702124(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", + ":scheme": "https", + "Accept": "application/json", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "Content-Length": "100", + "Content-Type": "application/json", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:58 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": { + "Integer": 1, + "MergeProperty": "foo", + "PartitionKey": "partition", + "RowKey": "1", + "String": "some string 1" + }, + "StatusCode": 204, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "0", + "Date": "Mon, 02 Aug 2021 18:01:57 GMT", + "ETag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A58.0749701Z\u0027\u0022", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b64c4-9002-0057-62c8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/tableName4103702124()?%24filter=RowKey\u002Beq\u002B%271%27", + "RequestMethod": "GET", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "GET", + ":path": "/tableName4103702124()?%24filter=RowKey\u002Beq\u002B%271%27", + ":scheme": "https", + "Accept": "application/json;odata=minimalmetadata", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "dataserviceversion": "3.0", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:58 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", + "Date": "Mon, 02 Aug 2021 18:01:57 GMT", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "Vary": "Origin", + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b64ea-9002-0057-05c8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": { + "odata.metadata": "https://seankaneprim.table.core.windows.net/$metadata#tableName4103702124", + "value": [ + { + "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A58.0749701Z\u0027\u0022", + "PartitionKey": "partition", + "RowKey": "1", + "Timestamp": "2021-08-02T18:01:58.0749701Z", + "Integer": 1, + "MergeProperty": "foo", + "String": "some string 1" + } + ] + } + }, + { + "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables(\u0027tableName4103702124\u0027)", + "RequestMethod": "DELETE", + "RequestHeaders": { + ":authority": "localhost:5001", + ":method": "DELETE", + ":path": "/Tables(\u0027tableName4103702124\u0027)", + ":scheme": "https", + "Accept": "application/json", + "Accept-Encoding": "gzip", + "Authorization": "Sanitized", + "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "x-ms-date": "Mon, 02 Aug 2021 18:01:58 GMT", + "x-ms-version": "2019-02-02" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "0", + "Date": "Mon, 02 Aug 2021 18:01:57 GMT", + "Server": [ + "Windows-Azure-Table/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "X-Content-Type-Options": "nosniff", + "x-ms-request-id": "a05b650c-9002-0057-26c8-874646000000", + "x-ms-version": "2019-02-02" + }, + "ResponseBody": null + } + ], + "Variables": {} +} \ No newline at end of file diff --git a/sdk/tables/aztable/table_access_policy_test.go b/sdk/tables/aztable/table_access_policy_test.go index f57f7a3e688d..60015bdf6aaa 100644 --- a/sdk/tables/aztable/table_access_policy_test.go +++ b/sdk/tables/aztable/table_access_policy_test.go @@ -5,32 +5,22 @@ package aztable import ( "strconv" + "testing" "time" "github.com/stretchr/testify/require" ) -func (s *tableClientLiveTests) TestSetEmptyAccessPolicy() { - if _, ok := cosmosTestsMap[s.T().Name()]; ok { - s.T().Skip("TableAccessPolicies are not available on Cosmos Accounts") - } - - require := require.New(s.T()) - client, delete := s.init(true) +func TestSetEmptyAccessPolicy(t *testing.T) { + client, delete := initClientTest(t, "storage", true) defer delete() _, err := client.SetAccessPolicy(ctx, &TableSetAccessPolicyOptions{}) - require.NoError(err) + require.NoError(t, err) } -func (s *tableClientLiveTests) TestSetAccessPolicy() { - if _, ok := cosmosTestsMap[s.T().Name()]; ok { - s.T().Skip("TableAccessPolicies are not available on Cosmos Accounts") - } - - require := require.New(s.T()) - // context := getTestContext(s.T().Name()) - client, delete := s.init(true) +func TestSetAccessPolicy(t *testing.T) { + client, delete := initClientTest(t, "storage", true) defer delete() start := time.Date(2020, 1, 1, 0, 0, 0, 0, time.UTC) @@ -54,16 +44,11 @@ func (s *tableClientLiveTests) TestSetAccessPolicy() { } _, err := client.SetAccessPolicy(ctx, ¶m) - require.NoError(err) + require.NoError(t, err) } -func (s *tableClientLiveTests) TestSetMultipleAccessPolicies() { - if _, ok := cosmosTestsMap[s.T().Name()]; ok { - s.T().Skip("TableAccessPolicies are not available on Cosmos Accounts") - } - - require := require.New(s.T()) - client, delete := s.init(true) +func TestSetMultipleAccessPolicies(t *testing.T) { + client, delete := initClientTest(t, "storage", true) defer delete() id := "empty" @@ -102,22 +87,16 @@ func (s *tableClientLiveTests) TestSetMultipleAccessPolicies() { } _, err := client.SetAccessPolicy(ctx, ¶m) - require.NoError(err) + require.NoError(t, err) // Make a Get to assert two access policies resp, err := client.GetAccessPolicy(ctx) - require.NoError(err) - require.Equal(len(resp.SignedIdentifiers), 3) + require.NoError(t, err) + require.Equal(t, len(resp.SignedIdentifiers), 3) } -func (s *tableClientLiveTests) TestSetTooManyAccessPolicies() { - if _, ok := cosmosTestsMap[s.T().Name()]; ok { - s.T().Skip("TableAccessPolicies are not available on Cosmos Accounts") - } - - require := require.New(s.T()) - // context := getTestContext(s.T().Name()) - client, delete := s.init(true) +func TestSetTooManyAccessPolicies(t *testing.T) { + client, delete := initClientTest(t, "storage", true) defer delete() start := time.Date(2020, 1, 1, 0, 0, 0, 0, time.UTC) @@ -144,17 +123,12 @@ func (s *tableClientLiveTests) TestSetTooManyAccessPolicies() { param := TableSetAccessPolicyOptions{TableACL: signedIdentifiers} _, err := client.SetAccessPolicy(ctx, ¶m) - require.NotNil(err, "Set access policy succeeded but should have failed") - require.Contains(err.Error(), tooManyAccessPoliciesError.Error()) + require.NotNil(t, err, "Set access policy succeeded but should have failed") + require.Contains(t, err.Error(), tooManyAccessPoliciesError.Error()) } -func (s *tableClientLiveTests) TestSetNullAccessPolicy() { - if _, ok := cosmosTestsMap[s.T().Name()]; ok { - s.T().Skip("TableAccessPolicies are not available on Cosmos Accounts") - } - - require := require.New(s.T()) - client, delete := s.init(true) +func TestSetNullAccessPolicy(t *testing.T) { + client, delete := initClientTest(t, "storage", true) defer delete() id := "null" @@ -169,9 +143,9 @@ func (s *tableClientLiveTests) TestSetNullAccessPolicy() { } _, err := client.SetAccessPolicy(ctx, ¶m) - require.NoError(err) + require.NoError(t, err) resp, err := client.GetAccessPolicy(ctx) - require.NoError(err) - require.Equal(len(resp.SignedIdentifiers), 1) + require.NoError(t, err) + require.Equal(t, len(resp.SignedIdentifiers), 1) } diff --git a/sdk/tables/aztable/table_batch_test.go b/sdk/tables/aztable/table_batch_test.go index b2733a0aef4a..6336ee4bfebc 100644 --- a/sdk/tables/aztable/table_batch_test.go +++ b/sdk/tables/aztable/table_batch_test.go @@ -5,279 +5,299 @@ package aztable import ( "encoding/json" + "fmt" "net/http" + "testing" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" + "github.com/Azure/azure-sdk-for-go/sdk/internal/uuid" "github.com/stretchr/testify/require" ) -func (s *tableClientLiveTests) TestBatchAdd() { - require := require.New(s.T()) - context := getTestContext(s.T().Name()) - client, delete := s.init(true) - defer delete() - - entitiesToCreate := createComplexEntities(10, "partition") - batch := make([]TableTransactionAction, 10) - - for i, e := range *entitiesToCreate { - marshalled, err := json.Marshal(e) - require.NoError(err) - batch[i] = TableTransactionAction{ActionType: Add, Entity: marshalled} - } - - resp, err := client.submitTransactionInternal(ctx, &batch, context.recording.UUID(), context.recording.UUID(), nil) - require.NoError(err) - for i := 0; i < len(*resp.TransactionResponses); i++ { - r := (*resp.TransactionResponses)[i] - require.Equal(r.StatusCode, http.StatusNoContent) +func TestBatchAdd(t *testing.T) { + recording.LiveOnly(t) + for _, service := range services { + t.Run(fmt.Sprintf("%v_%v", t.Name(), service), func(t *testing.T) { + client, delete := initClientTest(t, service, true) + defer delete() + + entitiesToCreate := createComplexEntities(10, "partition") + batch := make([]TableTransactionAction, 10) + + for i, e := range *entitiesToCreate { + marshalled, err := json.Marshal(e) + require.NoError(t, err) + batch[i] = TableTransactionAction{ActionType: Add, Entity: marshalled} + } + + resp, err := client.submitTransactionInternal(ctx, &batch, uuid.New(), uuid.New(), nil) + require.NoError(t, err) + for i := 0; i < len(*resp.TransactionResponses); i++ { + r := (*resp.TransactionResponses)[i] + require.Equal(t, r.StatusCode, http.StatusNoContent) + } + + pager := client.List(nil) + count := 0 + for pager.NextPage(ctx) { + response := pager.PageResponse() + count += len(response.TableEntityQueryResponse.Value) + } + + require.Equal(t, count, 10) + + }) } - - pager := client.List(nil) - count := 0 - for pager.NextPage(ctx) { - response := pager.PageResponse() - count += len(response.TableEntityQueryResponse.Value) - } - - require.Equal(count, 10) } -func (s *tableClientLiveTests) TestBatchMixed() { - require := require.New(s.T()) - context := getTestContext(s.T().Name()) - client, delete := s.init(true) - defer delete() - - entitiesToCreate := createComplexEntities(5, "partition") - batch := make([]TableTransactionAction, 3) - - for i := range batch { - marshalled, err := json.Marshal((*entitiesToCreate)[i]) - require.NoError(err) - batch[i] = TableTransactionAction{ - ActionType: Add, - Entity: marshalled, - } - } - - resp, err := client.submitTransactionInternal(ctx, &batch, context.recording.UUID(), context.recording.UUID(), nil) - require.NoError(err) - for i := 0; i < len(*resp.TransactionResponses); i++ { - r := (*resp.TransactionResponses)[i] - require.Equal(http.StatusNoContent, r.StatusCode) - } - - var qResp TableEntityQueryByteResponseResponse - filter := "RowKey eq '1'" - list := &ListOptions{Filter: &filter} - pager := client.List(list) - for pager.NextPage(ctx) { - qResp = pager.PageResponse() - } - preMerge := qResp.TableEntityQueryResponse.Value[0] - var unMarshalledPreMerge map[string]interface{} - err = json.Unmarshal(preMerge, &unMarshalledPreMerge) - require.NoError(err) - - // create a new batch slice. - batch = make([]TableTransactionAction, 5) - - // create a merge action for the first added entity - mergeProp := "MergeProperty" - val := "foo" - var mergeEntity = map[string]interface{}{ - partitionKey: (*entitiesToCreate)[0].PartitionKey, - rowKey: (*entitiesToCreate)[0].RowKey, - mergeProp: val, - } - marshalledMergeEntity, err := json.Marshal(mergeEntity) - require.NoError(err) - batch[0] = TableTransactionAction{ActionType: UpdateMerge, Entity: marshalledMergeEntity, ETag: (*resp.TransactionResponses)[0].Header.Get(etag)} - - // create a delete action for the second added entity - marshalledSecondEntity, err := json.Marshal((*entitiesToCreate)[1]) - require.NoError(err) - batch[1] = TableTransactionAction{ActionType: Delete, Entity: marshalledSecondEntity} - - // create an upsert action to replace the third added entity with a new value - replaceProp := "ReplaceProperty" - var replaceProperties = map[string]interface{}{ - partitionKey: (*entitiesToCreate)[2].PartitionKey, - rowKey: (*entitiesToCreate)[2].RowKey, - replaceProp: val, +func TestBatchMixed(t *testing.T) { + recording.LiveOnly(t) + for _, service := range services { + t.Run(fmt.Sprintf("%v_%v", t.Name(), service), func(t *testing.T) { + client, delete := initClientTest(t, service, true) + defer delete() + + entitiesToCreate := createComplexEntities(5, "partition") + batch := make([]TableTransactionAction, 3) + + for i := range batch { + marshalled, err := json.Marshal((*entitiesToCreate)[i]) + require.NoError(t, err) + batch[i] = TableTransactionAction{ + ActionType: Add, + Entity: marshalled, + } + } + + resp, err := client.submitTransactionInternal(ctx, &batch, uuid.New(), uuid.New(), nil) + require.NoError(t, err) + for i := 0; i < len(*resp.TransactionResponses); i++ { + r := (*resp.TransactionResponses)[i] + require.Equal(t, http.StatusNoContent, r.StatusCode) + } + + var qResp TableEntityQueryByteResponseResponse + filter := "RowKey eq '1'" + list := &ListOptions{Filter: &filter} + pager := client.List(list) + for pager.NextPage(ctx) { + qResp = pager.PageResponse() + } + preMerge := qResp.TableEntityQueryResponse.Value[0] + var unMarshalledPreMerge map[string]interface{} + err = json.Unmarshal(preMerge, &unMarshalledPreMerge) + require.NoError(t, err) + + // create a new batch slice. + batch = make([]TableTransactionAction, 5) + + // create a merge action for the first added entity + mergeProp := "MergeProperty" + val := "foo" + var mergeEntity = map[string]interface{}{ + partitionKey: (*entitiesToCreate)[0].PartitionKey, + rowKey: (*entitiesToCreate)[0].RowKey, + mergeProp: val, + } + marshalledMergeEntity, err := json.Marshal(mergeEntity) + require.NoError(t, err) + batch[0] = TableTransactionAction{ActionType: UpdateMerge, Entity: marshalledMergeEntity, ETag: (*resp.TransactionResponses)[0].Header.Get(etag)} + + // create a delete action for the second added entity + marshalledSecondEntity, err := json.Marshal((*entitiesToCreate)[1]) + require.NoError(t, err) + batch[1] = TableTransactionAction{ActionType: Delete, Entity: marshalledSecondEntity} + + // create an upsert action to replace the third added entity with a new value + replaceProp := "ReplaceProperty" + var replaceProperties = map[string]interface{}{ + partitionKey: (*entitiesToCreate)[2].PartitionKey, + rowKey: (*entitiesToCreate)[2].RowKey, + replaceProp: val, + } + marshalledThirdEntity, err := json.Marshal(replaceProperties) + require.NoError(t, err) + batch[2] = TableTransactionAction{ActionType: UpsertReplace, Entity: marshalledThirdEntity} + + // Add the remaining 2 entities. + marshalled4thEntity, err := json.Marshal((*entitiesToCreate)[3]) + require.NoError(t, err) + marshalled5thEntity, err := json.Marshal((*entitiesToCreate)[4]) + require.NoError(t, err) + batch[3] = TableTransactionAction{ActionType: Add, Entity: marshalled4thEntity} + batch[4] = TableTransactionAction{ActionType: Add, Entity: marshalled5thEntity} + + resp, err = client.submitTransactionInternal(ctx, &batch, uuid.New(), uuid.New(), nil) + require.NoError(t, err) + + for i := 0; i < len(*resp.TransactionResponses); i++ { + r := (*resp.TransactionResponses)[i] + require.Equal(t, http.StatusNoContent, r.StatusCode) + + } + + pager = client.List(list) + for pager.NextPage(ctx) { + qResp = pager.PageResponse() + } + postMerge := qResp.TableEntityQueryResponse.Value[0] + var unMarshaledPostMerge map[string]interface{} + err = json.Unmarshal(postMerge, &unMarshaledPostMerge) + require.NoError(t, err) + + // The merged entity has all its properties + the merged property + require.Equalf(t, len(unMarshalledPreMerge)+1, len(unMarshaledPostMerge), "postMerge should have one more property than preMerge") + require.Equalf(t, unMarshaledPostMerge[mergeProp], val, "%s property should equal %s", mergeProp, val) + }) } - marshalledThirdEntity, err := json.Marshal(replaceProperties) - require.NoError(err) - batch[2] = TableTransactionAction{ActionType: UpsertReplace, Entity: marshalledThirdEntity} - - // Add the remaining 2 entities. - marshalled4thEntity, err := json.Marshal((*entitiesToCreate)[3]) - marshalled5thEntity, err := json.Marshal((*entitiesToCreate)[4]) - batch[3] = TableTransactionAction{ActionType: Add, Entity: marshalled4thEntity} - batch[4] = TableTransactionAction{ActionType: Add, Entity: marshalled5thEntity} - - resp, err = client.submitTransactionInternal(ctx, &batch, context.recording.UUID(), context.recording.UUID(), nil) - require.NoError(err) - - for i := 0; i < len(*resp.TransactionResponses); i++ { - r := (*resp.TransactionResponses)[i] - require.Equal(http.StatusNoContent, r.StatusCode) - - } - - pager = client.List(list) - for pager.NextPage(ctx) { - qResp = pager.PageResponse() - } - postMerge := qResp.TableEntityQueryResponse.Value[0] - var unMarshaledPostMerge map[string]interface{} - err = json.Unmarshal(postMerge, &unMarshaledPostMerge) - require.NoError(err) - - // The merged entity has all its properties + the merged property - require.Equalf(len(unMarshalledPreMerge)+1, len(unMarshaledPostMerge), "postMerge should have one more property than preMerge") - require.Equalf(unMarshaledPostMerge[mergeProp], val, "%s property should equal %s", mergeProp, val) } -func (s *tableClientLiveTests) TestBatchError() { - require := require.New(s.T()) - context := getTestContext(s.T().Name()) - client, delete := s.init(true) - defer delete() - - entitiesToCreate := createComplexEntities(3, "partition") - - // Create the batch. - batch := make([]TableTransactionAction, 0, 3) - - // Sending an empty batch throws. - _, err := client.submitTransactionInternal(ctx, &batch, context.recording.UUID(), context.recording.UUID(), nil) - require.NotNil(err) - require.Equal(error_empty_transaction, err.Error()) - - // Add the last entity to the table prior to adding it as part of the batch to cause a batch failure. - marshalledFinalEntity, err := json.Marshal((*entitiesToCreate)[2]) - client.AddEntity(ctx, marshalledFinalEntity) - - // Add the entities to the batch - for i := 0; i < cap(batch); i++ { - marshalledEntity, err := json.Marshal((*entitiesToCreate)[i]) - require.NoError(err) - batch = append(batch, TableTransactionAction{ActionType: Add, Entity: marshalledEntity}) +func TestBatchError(t *testing.T) { + recording.LiveOnly(t) + for _, service := range services { + t.Run(fmt.Sprintf("%v_%v", t.Name(), service), func(t *testing.T) { + client, delete := initClientTest(t, service, true) + defer delete() + + entitiesToCreate := createComplexEntities(3, "partition") + + // Create the batch. + batch := make([]TableTransactionAction, 0, 3) + + // Sending an empty batch throws. + _, err := client.submitTransactionInternal(ctx, &batch, uuid.New(), uuid.New(), nil) + require.NotNil(t, err) + require.Equal(t, error_empty_transaction, err.Error()) + + // Add the last entity to the table prior to adding it as part of the batch to cause a batch failure. + marshalledFinalEntity, err := json.Marshal((*entitiesToCreate)[2]) + require.NoError(t, err) + client.AddEntity(ctx, marshalledFinalEntity) + + // Add the entities to the batch + for i := 0; i < cap(batch); i++ { + marshalledEntity, err := json.Marshal((*entitiesToCreate)[i]) + require.NoError(t, err) + batch = append(batch, TableTransactionAction{ActionType: Add, Entity: marshalledEntity}) + } + + resp, err := client.submitTransactionInternal(ctx, &batch, uuid.New(), uuid.New(), nil) + require.NotNil(t, err) + transactionError, ok := err.(*TableTransactionError) + require.Truef(t, ok, "err should be of type TableTransactionError") + require.Equal(t, "EntityAlreadyExists", transactionError.OdataError.Code) + require.Equal(t, 2, transactionError.FailedEntityIndex) + require.Equal(t, http.StatusConflict, (*resp.TransactionResponses)[0].StatusCode) + }) } - - resp, err := client.submitTransactionInternal(ctx, &batch, context.recording.UUID(), context.recording.UUID(), nil) - require.NotNil(err) - transactionError, ok := err.(*TableTransactionError) - require.Truef(ok, "err should be of type TableTransactionError") - require.Equal("EntityAlreadyExists", transactionError.OdataError.Code) - require.Equal(2, transactionError.FailedEntityIndex) - require.Equal(http.StatusConflict, (*resp.TransactionResponses)[0].StatusCode) } -func (s *tableClientLiveTests) TestBatchComplex() { - require := require.New(s.T()) - context := getTestContext(s.T().Name()) - client, delete := s.init(true) - defer delete() - - edmEntity := createEdmEntity(1, "pk001") - edmEntity2 := createEdmEntity(2, "pk001") - edmEntity3 := createEdmEntity(3, "pk001") - edmEntity4 := createEdmEntity(4, "pk001") - edmEntity5 := createEdmEntity(5, "pk001") - batch := make([]TableTransactionAction, 5) - - marshalled1, err := json.Marshal(edmEntity) - require.NoError(err) - batch[0] = TableTransactionAction{ - ActionType: Add, - Entity: marshalled1, - } - - marshalled2, err := json.Marshal(edmEntity2) - require.NoError(err) - batch[1] = TableTransactionAction{ - ActionType: Add, - Entity: marshalled2, - } - - marshalled3, err := json.Marshal(edmEntity3) - require.NoError(err) - batch[2] = TableTransactionAction{ - ActionType: Add, - Entity: marshalled3, - } - - marshalled4, err := json.Marshal(edmEntity4) - require.NoError(err) - batch[3] = TableTransactionAction{ - ActionType: Add, - Entity: marshalled4, +func TestBatchComplex(t *testing.T) { + recording.LiveOnly(t) + for _, service := range services { + t.Run(fmt.Sprintf("%v_%v", t.Name(), service), func(t *testing.T) { + client, delete := initClientTest(t, service, true) + defer delete() + + edmEntity := createEdmEntity(1, "pk001") + edmEntity2 := createEdmEntity(2, "pk001") + edmEntity3 := createEdmEntity(3, "pk001") + edmEntity4 := createEdmEntity(4, "pk001") + edmEntity5 := createEdmEntity(5, "pk001") + batch := make([]TableTransactionAction, 5) + + marshalled1, err := json.Marshal(edmEntity) + require.NoError(t, err) + batch[0] = TableTransactionAction{ + ActionType: Add, + Entity: marshalled1, + } + + marshalled2, err := json.Marshal(edmEntity2) + require.NoError(t, err) + batch[1] = TableTransactionAction{ + ActionType: Add, + Entity: marshalled2, + } + + marshalled3, err := json.Marshal(edmEntity3) + require.NoError(t, err) + batch[2] = TableTransactionAction{ + ActionType: Add, + Entity: marshalled3, + } + + marshalled4, err := json.Marshal(edmEntity4) + require.NoError(t, err) + batch[3] = TableTransactionAction{ + ActionType: Add, + Entity: marshalled4, + } + + marshalled5, err := json.Marshal(edmEntity5) + require.NoError(t, err) + batch[4] = TableTransactionAction{ + ActionType: Add, + Entity: marshalled5, + } + + resp, err := client.submitTransactionInternal(ctx, &batch, uuid.New(), uuid.New(), nil) + require.NoError(t, err) + for i := 0; i < len(*resp.TransactionResponses); i++ { + r := (*resp.TransactionResponses)[i] + require.Equal(t, http.StatusNoContent, r.StatusCode) + } + + batch2 := make([]TableTransactionAction, 3) + edmEntity.Properties["Bool"] = false + edmEntity2.Properties["Int32"] = int32(10) + + marshalled1, err = json.Marshal(edmEntity) + require.NoError(t, err) + batch2[0] = TableTransactionAction{ + ActionType: UpsertMerge, + Entity: marshalled1, + } + + marshalled2, err = json.Marshal(edmEntity2) + require.NoError(t, err) + batch2[1] = TableTransactionAction{ + ActionType: UpsertReplace, + Entity: marshalled2, + } + + marshalled3, err = json.Marshal(edmEntity3) + require.NoError(t, err) + batch2[2] = TableTransactionAction{ + ActionType: Delete, + Entity: marshalled3, + } + + resp, err = client.submitTransactionInternal(ctx, &batch2, uuid.New(), uuid.New(), nil) + require.NoError(t, err) + for i := 0; i < len(*resp.TransactionResponses); i++ { + r := (*resp.TransactionResponses)[i] + require.Equal(t, http.StatusNoContent, r.StatusCode) + } + + received, err := client.GetEntity(ctx, edmEntity.PartitionKey, edmEntity.RowKey, nil) + require.NoError(t, err) + + var receivedEdm EdmEntity + err = json.Unmarshal(received.Value, &receivedEdm) + require.NoError(t, err) + require.Equal(t, edmEntity.Properties["Bool"], receivedEdm.Properties["Bool"]) + + received2, err := client.GetEntity(ctx, edmEntity2.PartitionKey, edmEntity2.RowKey, nil) + require.NoError(t, err) + + var receivedEdm2 EdmEntity + err = json.Unmarshal(received2.Value, &receivedEdm2) + require.NoError(t, err) + require.Equal(t, edmEntity2.Properties["Int32"], receivedEdm2.Properties["Int32"]) + + _, err = client.GetEntity(ctx, edmEntity3.PartitionKey, edmEntity3.RowKey, nil) + require.Error(t, err) + }) } - - marshalled5, err := json.Marshal(edmEntity5) - require.NoError(err) - batch[4] = TableTransactionAction{ - ActionType: Add, - Entity: marshalled5, - } - - resp, err := client.submitTransactionInternal(ctx, &batch, context.recording.UUID(), context.recording.UUID(), nil) - require.NoError(err) - for i := 0; i < len(*resp.TransactionResponses); i++ { - r := (*resp.TransactionResponses)[i] - require.Equal(http.StatusNoContent, r.StatusCode) - } - - batch2 := make([]TableTransactionAction, 3) - edmEntity.Properties["Bool"] = false - edmEntity2.Properties["Int32"] = int32(10) - - marshalled1, err = json.Marshal(edmEntity) - require.NoError(err) - batch2[0] = TableTransactionAction{ - ActionType: UpsertMerge, - Entity: marshalled1, - } - - marshalled2, err = json.Marshal(edmEntity2) - require.NoError(err) - batch2[1] = TableTransactionAction{ - ActionType: UpsertReplace, - Entity: marshalled2, - } - - marshalled3, err = json.Marshal(edmEntity3) - require.NoError(err) - batch2[2] = TableTransactionAction{ - ActionType: Delete, - Entity: marshalled3, - } - - resp, err = client.submitTransactionInternal(ctx, &batch2, context.recording.UUID(), context.recording.UUID(), nil) - require.NoError(err) - for i := 0; i < len(*resp.TransactionResponses); i++ { - r := (*resp.TransactionResponses)[i] - require.Equal(http.StatusNoContent, r.StatusCode) - } - - received, err := client.GetEntity(ctx, edmEntity.PartitionKey, edmEntity.RowKey, nil) - require.NoError(err) - - var receivedEdm EdmEntity - err = json.Unmarshal(received.Value, &receivedEdm) - require.NoError(err) - require.Equal(edmEntity.Properties["Bool"], receivedEdm.Properties["Bool"]) - - received2, err := client.GetEntity(ctx, edmEntity2.PartitionKey, edmEntity2.RowKey, nil) - require.NoError(err) - - var receivedEdm2 EdmEntity - err = json.Unmarshal(received2.Value, &receivedEdm2) - require.NoError(err) - require.Equal(edmEntity2.Properties["Int32"], receivedEdm2.Properties["Int32"]) - - _, err = client.GetEntity(ctx, edmEntity3.PartitionKey, edmEntity3.RowKey, nil) - require.Error(err) } diff --git a/sdk/tables/aztable/table_client.go b/sdk/tables/aztable/table_client.go index ec4c6ab7af10..4c40b7df4f91 100644 --- a/sdk/tables/aztable/table_client.go +++ b/sdk/tables/aztable/table_client.go @@ -15,7 +15,7 @@ import ( type TableClient struct { client *tableClient service *TableServiceClient - cred SharedKeyCredential + cred azcore.Credential Name string } diff --git a/sdk/tables/aztable/table_client_test.go b/sdk/tables/aztable/table_client_test.go index 0605eb42eec2..7ddf6715149a 100644 --- a/sdk/tables/aztable/table_client_test.go +++ b/sdk/tables/aztable/table_client_test.go @@ -5,6 +5,7 @@ package aztable import ( "bytes" + "context" "encoding/json" "errors" "fmt" @@ -12,334 +13,323 @@ import ( "net/http" "testing" - "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/internal/runtime" "github.com/stretchr/testify/require" - "github.com/stretchr/testify/suite" ) -type tableClientLiveTests struct { - suite.Suite - endpointType EndpointType - mode recording.RecordMode -} - -// Hookup to the testing framework -func TestTableClient_Storage(t *testing.T) { - storage := tableClientLiveTests{endpointType: StorageEndpoint, mode: recording.Playback /* change to Record to re-record tests */} - suite.Run(t, &storage) -} +var services = []string{"storage", "cosmos"} -// Hookup to the testing framework -func TestTableClient_Cosmos(t *testing.T) { - cosmos := tableClientLiveTests{endpointType: CosmosEndpoint, mode: recording.Playback /* change to Record to re-record tests */} - suite.Run(t, &cosmos) -} +func TestServiceErrors(t *testing.T) { + for _, service := range services { + t.Run(fmt.Sprintf("%v_%v", t.Name(), service), func(t *testing.T) { + client, delete := initClientTest(t, service, true) + defer delete() -func (s *tableClientLiveTests) TestServiceErrors() { - client, delete := s.init(true) - defer delete() + // Create a duplicate table to produce an error + _, err := client.Create(ctx) + require.Error(t, err) - // Create a duplicate table to produce an error - _, err := client.Create(ctx) - var svcErr *runtime.ResponseError - errors.As(err, &svcErr) - require.Equal(s.T(), svcErr.RawResponse().StatusCode, http.StatusConflict) + var svcErr *runtime.ResponseError + errors.As(err, &svcErr) + require.Equal(t, svcErr.RawResponse().StatusCode, http.StatusConflict) + }) + } } -func (s *tableClientLiveTests) TestCreateTable() { - require := require.New(s.T()) - client, delete := s.init(false) - defer delete() +func TestCreateTable(t *testing.T) { + for _, service := range services { + t.Run(fmt.Sprintf("%v_%v", t.Name(), service), func(t *testing.T) { + client, delete := initClientTest(t, service, false) + defer delete() - resp, err := client.Create(ctx) + resp, err := client.Create(context.Background()) - require.NoError(err) - require.Equal(*resp.TableResponse.TableName, client.Name) + require.NoError(t, err) + require.Equal(t, *resp.TableResponse.TableName, client.Name) + }) + } } -func (s *tableClientLiveTests) TestAddEntity() { - require := require.New(s.T()) - client, delete := s.init(true) - defer delete() +func TestAddEntity(t *testing.T) { + for _, service := range services { + t.Run(fmt.Sprintf("%v_%v", t.Name(), service), func(t *testing.T) { + client, delete := initClientTest(t, service, true) + defer delete() - entitiesToCreate := createSimpleEntities(1, "partition") + simpleEntity := createSimpleEntity(1, "partition") - marshalledEntity, err := json.Marshal((*entitiesToCreate)[0]) - require.NoError(err) - resp, err := client.AddEntity(ctx, marshalledEntity) - require.NoError(err) - require.NotNil(resp) -} - -func (s *tableClientLiveTests) TestAddComplexEntity() { - require := require.New(s.T()) - // context := getTestContext(s.T().Name()) - client, delete := s.init(true) - defer delete() - - entitiesToCreate := createComplexEntities(1, "partition") - - for _, e := range *entitiesToCreate { - marshalledEntity, err := json.Marshal(e) - require.NoError(err) - _, err = client.AddEntity(ctx, marshalledEntity) - var svcErr *runtime.ResponseError - errors.As(err, &svcErr) - require.Nilf(err, getStringFromBody(svcErr)) + marshalledEntity, err := json.Marshal(simpleEntity) + require.NoError(t, err) + _, err = client.AddEntity(ctx, marshalledEntity) + require.NoError(t, err) + }) } } -func (s *tableClientLiveTests) TestDeleteEntity() { - require := require.New(s.T()) - client, delete := s.init(true) - defer delete() +func TestAddComplexEntity(t *testing.T) { + for _, service := range services { + t.Run(fmt.Sprintf("%v_%v", t.Name(), service), func(t *testing.T) { + client, delete := initClientTest(t, service, true) + defer delete() - simpleEntity := createSimpleEntity(1, "partition") + entity := createComplexEntity(1, "partition") - marshalledEntity, err := json.Marshal(simpleEntity) - require.NoError(err) - _, err = client.AddEntity(ctx, marshalledEntity) - require.NoError(err) - _, delErr := client.DeleteEntity(ctx, simpleEntity.PartitionKey, simpleEntity.RowKey, nil) - require.Nil(delErr) + marshalledEntity, err := json.Marshal(entity) + require.NoError(t, err) + _, err = client.AddEntity(ctx, marshalledEntity) + var svcErr *runtime.ResponseError + errors.As(err, &svcErr) + require.Nilf(t, err, getStringFromBody(svcErr)) + }) + } } -func (s *tableClientLiveTests) TestMergeEntity() { - require := require.New(s.T()) - client, delete := s.init(true) - defer delete() - - entityToCreate := createSimpleEntity(1, "partition") - marshalled := marshalBasicEntity(entityToCreate, require) - - _, err := client.AddEntity(ctx, *marshalled) - require.NoError(err) - - filter := "RowKey eq '1'" - listOptions := &ListOptions{Filter: &filter} - - preMerge, err := client.GetEntity(ctx, entityToCreate.PartitionKey, entityToCreate.RowKey, nil) - require.NoError(err) - - var unMarshalledPreMerge map[string]interface{} - err = json.Unmarshal(preMerge.Value, &unMarshalledPreMerge) - require.NoError(err) - - var mapEntity map[string]interface{} - err = json.Unmarshal(*marshalled, &mapEntity) - require.NoError(err) - mapEntity["MergeProperty"] = "foo" - - reMarshalled, err := json.Marshal(mapEntity) - require.NoError(err) - - _, updateErr := client.UpdateEntity(ctx, reMarshalled, nil, MergeEntity) - require.Nil(updateErr) - - var qResp TableEntityQueryByteResponseResponse - pager := client.List(listOptions) - for pager.NextPage(ctx) { - qResp = pager.PageResponse() +func TestDeleteEntity(t *testing.T) { + for _, service := range services { + t.Run(fmt.Sprintf("%v_%v", t.Name(), service), func(t *testing.T) { + client, delete := initClientTest(t, service, true) + defer delete() + + simpleEntity := createSimpleEntity(1, "partition") + + marshalledEntity, err := json.Marshal(simpleEntity) + require.NoError(t, err) + _, err = client.AddEntity(ctx, marshalledEntity) + require.NoError(t, err) + _, delErr := client.DeleteEntity(ctx, simpleEntity.PartitionKey, simpleEntity.RowKey, nil) + require.Nil(t, delErr) + }) } - postMerge := qResp.TableEntityQueryResponse.Value[0] - var unmarshalledPostMerge map[string]interface{} - err = json.Unmarshal(postMerge, &unmarshalledPostMerge) - require.NoError(err) - - require.Equal(unmarshalledPostMerge["PartitionKey"], unMarshalledPreMerge["PartitionKey"]) - require.Equal(unmarshalledPostMerge["MergeProperty"], "foo") - - _, ok := unMarshalledPreMerge["MergeProperty"] - require.False(ok) } -func (s *tableClientLiveTests) TestInsertEntity() { - require := require.New(s.T()) - client, delete := s.init(true) - defer delete() +func TestMergeEntity(t *testing.T) { + for _, service := range services { + t.Run(fmt.Sprintf("%v_%v", t.Name(), service), func(t *testing.T) { + client, delete := initClientTest(t, service, true) + defer delete() - // 1. Create Basic Entity - entityToCreate := createSimpleEntity(1, "partition") - marshalled := marshalBasicEntity(entityToCreate, require) + require := require.New(t) // Remove this later - _, err := client.InsertEntity(ctx, *marshalled, ReplaceEntity) - require.NoError(err) + entityToCreate := createSimpleEntity(1, "partition") + marshalled := marshalBasicEntity(entityToCreate, require) - filter := "RowKey eq '1'" - list := &ListOptions{Filter: &filter} + _, err := client.AddEntity(ctx, *marshalled) + require.NoError(err) - // 2. Query for basic Entity - preMerge, err := client.GetEntity(ctx, entityToCreate.PartitionKey, entityToCreate.RowKey, nil) - require.NoError(err) + filter := "RowKey eq '1'" + listOptions := &ListOptions{Filter: &filter} - var unMarshalledPreMerge map[string]interface{} - err = json.Unmarshal(preMerge.Value, &unMarshalledPreMerge) - require.NoError(err) + preMerge, err := client.GetEntity(ctx, entityToCreate.PartitionKey, entityToCreate.RowKey, nil) + require.NoError(err) - // 3. Create same entity without Bool property, add "MergeProperty" prop - mapEntity := createSimpleEntityNoBool(1, "partition") - mapEntity["MergeProperty"] = "foo" + var unMarshalledPreMerge map[string]interface{} + err = json.Unmarshal(preMerge.Value, &unMarshalledPreMerge) + require.NoError(err) - reMarshalled, err := json.Marshal(mapEntity) + var mapEntity map[string]interface{} + err = json.Unmarshal(*marshalled, &mapEntity) + require.NoError(err) + mapEntity["MergeProperty"] = "foo" - // 4. Replace Entity with "bool"-less entity - _, err = client.InsertEntity(ctx, reMarshalled, ReplaceEntity) - require.Nil(err) + reMarshalled, err := json.Marshal(mapEntity) + require.NoError(err) - // 5. Query for new entity - var qResp TableEntityQueryByteResponseResponse - pager := client.List(list) - for pager.NextPage(ctx) { - qResp = pager.PageResponse() - } - postMerge := qResp.TableEntityQueryResponse.Value[0] - var unmarshalledPostMerge map[string]interface{} - err = json.Unmarshal(postMerge, &unmarshalledPostMerge) + _, updateErr := client.UpdateEntity(ctx, reMarshalled, nil, MergeEntity) + require.Nil(updateErr) + + var qResp TableEntityQueryByteResponseResponse + pager := client.List(listOptions) + for pager.NextPage(ctx) { + qResp = pager.PageResponse() + } + postMerge := qResp.TableEntityQueryResponse.Value[0] + var unmarshalledPostMerge map[string]interface{} + err = json.Unmarshal(postMerge, &unmarshalledPostMerge) + require.NoError(err) - // 6. Make assertions - require.Less(len(unmarshalledPostMerge), len(unMarshalledPreMerge)) - require.Equal(unmarshalledPostMerge["MergeProperty"], "foo") + require.Equal(unmarshalledPostMerge["PartitionKey"], unMarshalledPreMerge["PartitionKey"]) + require.Equal(unmarshalledPostMerge["MergeProperty"], "foo") - _, ok := unmarshalledPostMerge["Bool"] - require.Falsef(ok, "Bool property should not be available in the merged entity") + _, ok := unMarshalledPreMerge["MergeProperty"] + require.False(ok) + }) + } } -func (s *tableClientLiveTests) TestQuerySimpleEntity() { - require := require.New(s.T()) - client, delete := s.init(true) - defer delete() - - // Add 5 entities - entitiesToCreate := createSimpleEntities(5, "partition") - for _, e := range *entitiesToCreate { - marshalledEntity, err := json.Marshal(e) - require.NoError(err) - _, err = client.AddEntity(ctx, marshalledEntity) - require.NoError(err) - } +func TestUpsertEntity(t *testing.T) { + for _, service := range services { + t.Run(fmt.Sprintf("%v_%v", t.Name(), service), func(t *testing.T) { + client, delete := initClientTest(t, service, true) + defer delete() - filter := "RowKey lt '5'" - list := &ListOptions{Filter: &filter} - expectedCount := 4 + require := require.New(t) - var resp TableEntityQueryByteResponseResponse - pager := client.List(list) - for pager.NextPage(ctx) { - resp = pager.PageResponse() - require.Equal(len(resp.TableEntityQueryResponse.Value), expectedCount) - } + // 1. Create Basic Entity + entityToCreate := createSimpleEntity(1, "partition") + marshalled := marshalBasicEntity(entityToCreate, require) - for i, e := range resp.TableEntityQueryResponse.Value { - var mapModel map[string]interface{} - err := json.Unmarshal(e, &mapModel) - require.NoError(err) + _, err := client.InsertEntity(ctx, *marshalled, ReplaceEntity) + require.NoError(err) - _, ok := mapModel[timestamp] - require.True(ok) + filter := "RowKey eq '1'" + list := &ListOptions{Filter: &filter} - _, ok = mapModel[etagOdata] - require.True(ok) + // 2. Query for basic Entity + preMerge, err := client.GetEntity(ctx, entityToCreate.PartitionKey, entityToCreate.RowKey, nil) + require.NoError(err) - var b basicTestEntity - err = json.Unmarshal(e, &b) - require.NoError(err) + var unMarshalledPreMerge map[string]interface{} + err = json.Unmarshal(preMerge.Value, &unMarshalledPreMerge) + require.NoError(err) - require.Equal(b.PartitionKey, "partition") - require.Equal(b.RowKey, fmt.Sprint(i+1)) - require.Equal(b.String, (*entitiesToCreate)[i].String) - require.Equal(b.Integer, (*entitiesToCreate)[i].Integer) - require.Equal(b.Bool, (*entitiesToCreate)[i].Bool) + // 3. Create same entity without Bool property, add "MergeProperty" prop + mapEntity := createSimpleEntityNoBool(1, "partition") + mapEntity["MergeProperty"] = "foo" + + reMarshalled, err := json.Marshal(mapEntity) + + // 4. Replace Entity with "bool"-less entity + _, err = client.InsertEntity(ctx, reMarshalled, (ReplaceEntity)) + require.Nil(err) + + // 5. Query for new entity + var qResp TableEntityQueryByteResponseResponse + pager := client.List(list) + for pager.NextPage(ctx) { + qResp = pager.PageResponse() + } + postMerge := qResp.TableEntityQueryResponse.Value[0] + var unmarshalledPostMerge map[string]interface{} + err = json.Unmarshal(postMerge, &unmarshalledPostMerge) + + // 6. Make assertions + require.Less(len(unmarshalledPostMerge), len(unMarshalledPreMerge)) + require.Equal(unmarshalledPostMerge["MergeProperty"], "foo") + + _, ok := unmarshalledPostMerge["Bool"] + require.Falsef(ok, "Bool property should not be available in the merged entity") + }) } } -func (s *tableClientLiveTests) TestQueryComplexEntity() { - require := require.New(s.T()) - client, delete := s.init(true) - defer delete() - - // Add 5 entities - entitiesToCreate := createComplexEntities(5, "partition") - for _, e := range *entitiesToCreate { - marshalledEntity, err := json.Marshal(e) - require.NoError(err) - _, err = client.AddEntity(ctx, marshalledEntity) - require.NoError(err) - } - - filter := "RowKey lt '5'" - expectedCount := 4 - options := &ListOptions{Filter: &filter} - - var resp TableEntityQueryByteResponseResponse - pager := client.List(options) - for pager.NextPage(ctx) { - resp = pager.PageResponse() - require.Equal(expectedCount, len(resp.TableEntityQueryResponse.Value)) - - for idx, entity := range resp.TableEntityQueryResponse.Value { - model := complexTestEntity{} - err := json.Unmarshal(entity, &model) - require.NoError(err) - - require.Equal(model.PartitionKey, "partition") - require.Equal(model.RowKey, (*entitiesToCreate)[idx].RowKey) - require.Equal(model.Integer, (*entitiesToCreate)[idx].Integer) - require.Equal(model.String, (*entitiesToCreate)[idx].String) - require.Equal(model.Bool, (*entitiesToCreate)[idx].Bool) - require.Equal(model.Float, (*entitiesToCreate)[idx].Float) - require.Equal(model.DateTime, (*entitiesToCreate)[idx].DateTime) - require.Equal(model.Byte, (*entitiesToCreate)[idx].Byte) - } +func TestQuerySimpleEntity(t *testing.T) { + for _, service := range services { + t.Run(fmt.Sprintf("%v_%v", t.Name(), service), func(t *testing.T) { + client, delete := initClientTest(t, service, true) + defer delete() + require := require.New(t) + + // Add 5 entities + entitiesToCreate := createSimpleEntities(5, "partition") + for _, e := range *entitiesToCreate { + marshalledEntity, err := json.Marshal(e) + require.NoError(err) + _, err = client.AddEntity(ctx, marshalledEntity) + require.NoError(err) + } + + filter := "RowKey lt '5'" + list := &ListOptions{Filter: &filter} + expectedCount := 4 + + var resp TableEntityQueryByteResponseResponse + pager := client.List(list) + for pager.NextPage(ctx) { + resp = pager.PageResponse() + require.Equal(len(resp.TableEntityQueryResponse.Value), expectedCount) + } + + for i, e := range resp.TableEntityQueryResponse.Value { + var mapModel map[string]interface{} + err := json.Unmarshal(e, &mapModel) + require.NoError(err) + + _, ok := mapModel[timestamp] + require.True(ok) + + _, ok = mapModel[etagOdata] + require.True(ok) + + var b basicTestEntity + err = json.Unmarshal(e, &b) + require.NoError(err) + + require.Equal(b.PartitionKey, "partition") + require.Equal(b.RowKey, fmt.Sprint(i+1)) + require.Equal(b.String, (*entitiesToCreate)[i].String) + require.Equal(b.Integer, (*entitiesToCreate)[i].Integer) + require.Equal(b.Bool, (*entitiesToCreate)[i].Bool) + } + }) } } -func (s *tableClientLiveTests) TestInvalidEntity() { - require := require.New(s.T()) - client, delete := s.init(true) - defer delete() - - badEntity := map[string]interface{}{ - "Value": 10, - "String": "stringystring", +func TestQueryComplexEntity(t *testing.T) { + for _, service := range services { + t.Run(fmt.Sprintf("%v_%v", t.Name(), service), func(t *testing.T) { + client, delete := initClientTest(t, service, true) + defer delete() + + require := require.New(t) + + // Add 5 entities + entitiesToCreate := createComplexEntities(5, "partition") + for _, e := range *entitiesToCreate { + marshalledEntity, err := json.Marshal(e) + require.NoError(err) + _, err = client.AddEntity(ctx, marshalledEntity) + require.NoError(err) + } + + filter := "RowKey lt '5'" + expectedCount := 4 + options := &ListOptions{Filter: &filter} + + var resp TableEntityQueryByteResponseResponse + pager := client.List(options) + for pager.NextPage(ctx) { + resp = pager.PageResponse() + require.Equal(expectedCount, len(resp.TableEntityQueryResponse.Value)) + + for idx, entity := range resp.TableEntityQueryResponse.Value { + model := complexTestEntity{} + err := json.Unmarshal(entity, &model) + require.NoError(err) + + require.Equal(model.PartitionKey, "partition") + require.Equal(model.RowKey, (*entitiesToCreate)[idx].RowKey) + require.Equal(model.Integer, (*entitiesToCreate)[idx].Integer) + require.Equal(model.String, (*entitiesToCreate)[idx].String) + require.Equal(model.Bool, (*entitiesToCreate)[idx].Bool) + require.Equal(model.Float, (*entitiesToCreate)[idx].Float) + require.Equal(model.DateTime, (*entitiesToCreate)[idx].DateTime) + require.Equal(model.Byte, (*entitiesToCreate)[idx].Byte) + } + } + }) } +} - badEntityMarshalled, err := json.Marshal(badEntity) - _, err = client.AddEntity(ctx, badEntityMarshalled) +func TestInvalidEntity(t *testing.T) { + for _, service := range services { + t.Run(fmt.Sprintf("%v_%v", t.Name(), service), func(t *testing.T) { + client, delete := initClientTest(t, service, true) + defer delete() - require.NotNil(err) - require.Contains(err.Error(), partitionKeyRowKeyError.Error()) -} + require := require.New(t) -// setup the test environment -func (s *tableClientLiveTests) BeforeTest(suite string, test string) { - recordedTestSetup(s.T(), s.T().Name(), s.endpointType, s.mode) -} + badEntity := map[string]interface{}{ + "Value": 10, + "String": "stringystring", + } -// teardown the test context -func (s *tableClientLiveTests) AfterTest(suite string, test string) { - recordedTestTeardown(s.T().Name()) -} + badEntityMarshalled, err := json.Marshal(badEntity) + require.NoError(err) + _, err = client.AddEntity(ctx, badEntityMarshalled) -func (s *tableClientLiveTests) init(createTable bool) (*TableClient, func()) { - require := require.New(s.T()) - context := getTestContext(s.T().Name()) - tableName, _ := getTableName(context) - client := context.client.NewTableClient(tableName) - if createTable { - _, err := client.Create(ctx) - // fmt.Println("CREATE ERROR: ", err.Error()) - if err != nil { - var svcErr *runtime.ResponseError - errors.As(err, &svcErr) - require.FailNow(getStringFromBody(svcErr)) - } - } - return client, func() { - _, err := client.Delete(ctx, nil) - if err != nil { - fmt.Printf("Error deleting table. %v\n", err.Error()) - } + require.NotNil(err) + require.Contains(err.Error(), partitionKeyRowKeyError.Error()) + }) } } diff --git a/sdk/tables/aztable/table_service_client.go b/sdk/tables/aztable/table_service_client.go index 78d2f4453c96..1f67b9f5c1fa 100644 --- a/sdk/tables/aztable/table_service_client.go +++ b/sdk/tables/aztable/table_service_client.go @@ -19,19 +19,24 @@ const ( type TableServiceClient struct { client *tableClient service *serviceClient - cred SharedKeyCredential + cred azcore.Credential } // NewTableServiceClient creates a TableServiceClient struct using the specified serviceURL, credential, and options. func NewTableServiceClient(serviceURL string, cred azcore.Credential, options *TableClientOptions) (*TableServiceClient, error) { + if options == nil { + options = &TableClientOptions{} + } conOptions := options.getConnectionOptions() if isCosmosEndpoint(serviceURL) { conOptions.PerCallPolicies = []azcore.Policy{CosmosPatchTransformPolicy{}} } - conOptions.PerCallPolicies = append(conOptions.PerCallPolicies, cred.AuthenticationPolicy(azcore.AuthenticationPolicyOptions{Options: azcore.TokenRequestOptions{Scopes: []string{"none"}}})) + conOptions.PerCallPolicies = append(conOptions.PerCallPolicies, cred.AuthenticationPolicy(azcore.AuthenticationPolicyOptions{Options: azcore.TokenRequestOptions{Scopes: options.Scopes}})) + for _, p := range options.PerCallOptions { + conOptions.PerCallPolicies = append(conOptions.PerCallPolicies, p) + } con := newConnection(serviceURL, conOptions) - c, _ := cred.(*SharedKeyCredential) - return &TableServiceClient{client: &tableClient{con}, service: &serviceClient{con}, cred: *c}, nil + return &TableServiceClient{client: &tableClient{con}, service: &serviceClient{con}, cred: cred}, nil } // NewTableClient returns a pointer to a TableClient affinitzed to the specified table name and initialized with the same serviceURL and credentials as this TableServiceClient diff --git a/sdk/tables/aztable/table_service_client_test.go b/sdk/tables/aztable/table_service_client_test.go index 14aa855b3c0e..8fc0e16a587c 100644 --- a/sdk/tables/aztable/table_service_client_test.go +++ b/sdk/tables/aztable/table_service_client_test.go @@ -4,200 +4,193 @@ package aztable import ( + "context" "errors" "fmt" "net/http" "testing" + "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/internal/runtime" "github.com/Azure/azure-sdk-for-go/sdk/to" "github.com/stretchr/testify/require" - "github.com/stretchr/testify/suite" ) -type tableServiceClientLiveTests struct { - suite.Suite - endpointType EndpointType - mode recording.RecordMode -} - -// Hookup to the testing framework -func TestServiceClient_Storage(t *testing.T) { - storage := tableServiceClientLiveTests{endpointType: StorageEndpoint, mode: recording.Playback /* change to Record to re-record tests */} - suite.Run(t, &storage) +func TestServiceErrorsServiceClient(t *testing.T) { + for _, service := range services { + t.Run(fmt.Sprintf("%v_%v", t.Name(), service), func(t *testing.T) { + service, delete := initServiceTest(t, service) + defer delete() + _, err := service.CreateTable(context.Background(), "tableName") + require.NoError(t, err) + + // Create a duplicate table to produce an error + _, err = service.CreateTable(context.Background(), "tableName") + require.Error(t, err) + + var svcErr *runtime.ResponseError + errors.As(err, &svcErr) + require.Equal(t, svcErr.RawResponse().StatusCode, http.StatusConflict) + + _, err = service.DeleteTable(context.Background(), "tableName", nil) + require.NoError(t, err) + }) + } } -// Hookup to the testing framework -func TestServiceClient_Cosmos(t *testing.T) { - cosmos := tableServiceClientLiveTests{endpointType: CosmosEndpoint, mode: recording.Playback /* change to Record to re-record tests */} - suite.Run(t, &cosmos) -} +func TestCreateTableFromService(t *testing.T) { + for _, service := range services { + t.Run(fmt.Sprintf("%v_%v", t.Name(), service), func(t *testing.T) { + service, delete := initServiceTest(t, service) + defer delete() + tableName, err := createRandomName(t, "tableName") + require.NoError(t, err) + + resp, err := service.CreateTable(ctx, tableName) + deleteTable := func() { + _, err := service.DeleteTable(ctx, tableName, nil) + if err != nil { + fmt.Printf("Error cleaning up test. %v\n", err.Error()) + } + } + defer deleteTable() -func (s *tableServiceClientLiveTests) TestServiceErrors() { - require := require.New(s.T()) - context := getTestContext(s.T().Name()) - tableName, err := getTableName(context) - require.NoError(err) - - _, err = context.client.CreateTable(ctx, tableName) - delete := func() { - _, err := context.client.DeleteTable(ctx, tableName, nil) - if err != nil { - fmt.Printf("Error cleaning up test. %v\n", err.Error()) - } + require.NoError(t, err) + require.Equal(t, *resp.TableResponse.TableName, tableName) + }) } - defer delete() - require.NoError(err) - - // Create a duplicate table to produce an error - _, err = context.client.CreateTable(ctx, tableName) - var svcErr *runtime.ResponseError - errors.As(err, &svcErr) - require.Equal(svcErr.RawResponse().StatusCode, http.StatusConflict) } -func (s *tableServiceClientLiveTests) TestCreateTable() { - require := require.New(s.T()) - context := getTestContext(s.T().Name()) - tableName, err := getTableName(context) - require.NoError(err) - - resp, err := context.client.CreateTable(ctx, tableName) - delete := func() { - _, err := context.client.DeleteTable(ctx, tableName, nil) - if err != nil { - fmt.Printf("Error cleaning up test. %v\n", err.Error()) - } - } - defer delete() +func TestQueryTable(t *testing.T) { + for _, service := range services { + t.Run(fmt.Sprintf("%v_%v", t.Name(), service), func(t *testing.T) { + service, delete := initServiceTest(t, service) + defer delete() + + tableCount := 5 + tableNames := make([]string, tableCount) + prefix1 := "zzza" + prefix2 := "zzzb" + + defer clearAllTables(service) + //create 10 tables with our exected prefix and 1 with a different prefix + for i := 0; i < tableCount; i++ { + if i < (tableCount - 1) { + name := fmt.Sprintf("%v%v", prefix1, i) + tableNames[i] = name + } else { + name := fmt.Sprintf("%v%v", prefix2, i) + tableNames[i] = name + } + _, err := service.CreateTable(ctx, tableNames[i]) + require.NoError(t, err) + } - require.NoError(err) - require.Equal(*resp.TableResponse.TableName, tableName) -} + // Query for tables with no pagination. The filter should exclude one table from the results + filter := fmt.Sprintf("TableName ge '%s' and TableName lt '%s'", prefix1, prefix2) + pager := service.ListTables(&ListOptions{Filter: &filter}) -func (s *tableServiceClientLiveTests) TestQueryTable() { - require := require.New(s.T()) - context := getTestContext(s.T().Name()) - tableCount := 5 - tableNames := make([]string, tableCount) - prefix1 := "zzza" - prefix2 := "zzzb" - - defer cleanupTables(context, &tableNames) - //create 10 tables with our exected prefix and 1 with a different prefix - for i := 0; i < tableCount; i++ { - if i < (tableCount - 1) { - name, _ := getTableName(context, prefix1) - tableNames[i] = name - } else { - name, _ := getTableName(context, prefix2) - tableNames[i] = name - } - _, err := context.client.CreateTable(ctx, tableNames[i]) - require.NoError(err) - } + resultCount := 0 + for pager.NextPage(ctx) { + resp := pager.PageResponse() + resultCount += len(resp.TableQueryResponse.Value) + } - // Query for tables with no pagination. The filter should exclude one table from the results - filter := fmt.Sprintf("TableName ge '%s' and TableName lt '%s'", prefix1, prefix2) - pager := context.client.ListTables(&ListOptions{Filter: &filter}) + require.NoError(t, pager.Err()) + require.Equal(t, resultCount, tableCount-1) - resultCount := 0 - for pager.NextPage(ctx) { - resp := pager.PageResponse() - resultCount += len(resp.TableQueryResponse.Value) - } + // Query for tables with pagination + top := int32(2) + pager = service.ListTables(&ListOptions{Filter: &filter, Top: &top}) - require.NoError(pager.Err()) - require.Equal(resultCount, tableCount-1) + resultCount = 0 + pageCount := 0 + for pager.NextPage(ctx) { + resp := pager.PageResponse() + resultCount += len(resp.TableQueryResponse.Value) + pageCount++ + } - // Query for tables with pagination - top := int32(2) - pager = context.client.ListTables(&ListOptions{Filter: &filter, Top: &top}) + require.NoError(t, pager.Err()) + require.Equal(t, resultCount, tableCount-1) + require.Equal(t, pageCount, int(top)) - resultCount = 0 - pageCount := 0 - for pager.NextPage(ctx) { - resp := pager.PageResponse() - resultCount += len(resp.TableQueryResponse.Value) - pageCount++ + }) } - - require.NoError(pager.Err()) - require.Equal(resultCount, tableCount-1) - require.Equal(pageCount, int(top)) } -func clearAllTables(context *testContext) error { - pager := context.client.ListTables(nil) - for pager.NextPage(ctx) { - resp := pager.PageResponse() - for _, v := range resp.TableQueryResponse.Value { - _, err := context.client.DeleteTable(ctx, *v.TableName, nil) - if err != nil { - return err - } - } - } - return pager.Err() -} +func TestListTables(t *testing.T) { + for _, service := range services { + t.Run(fmt.Sprintf("%v_%v", t.Name(), service), func(t *testing.T) { + service, delete := initServiceTest(t, service) + defer delete() + tableName, err := createRandomName(t, "tableName") + require.NoError(t, err) -func (s *tableServiceClientLiveTests) TestListTables() { - require := require.New(s.T()) - context := getTestContext(s.T().Name()) - tableName, err := getTableName(context) - require.NoError(err) + err = clearAllTables(service) + require.NoError(t, err) - err = clearAllTables(context) - require.NoError(err) + for i := 0; i < 5; i++ { + _, err := service.CreateTable(ctx, fmt.Sprintf("%v%v", tableName, i)) + require.NoError(t, err) + } - for i := 0; i < 5; i++ { - _, err := context.client.CreateTable(ctx, fmt.Sprintf("%v%v", tableName, i)) - require.NoError(err) - } + count := 0 + pager := service.ListTables(nil) + for pager.NextPage(ctx) { + resp := pager.PageResponse() + count += len(resp.TableQueryResponse.Value) + } - count := 0 - pager := context.client.ListTables(nil) - for pager.NextPage(ctx) { - resp := pager.PageResponse() - count += len(resp.TableQueryResponse.Value) - } + require.NoError(t, pager.Err()) + require.Equal(t, 5, count) - require.NoError(pager.Err()) - require.Equal(5, count) -} + deleteTable := func() { + for i := 0; i < 5; i++ { + _, err := service.DeleteTable(ctx, fmt.Sprintf("%v%v", tableName, i), nil) + if err != nil { + fmt.Printf("Error cleaning up test. %v\n", err.Error()) + } + } + } + defer deleteTable() -func (s *tableServiceClientLiveTests) TestGetStatistics() { - require := require.New(s.T()) - context := getTestContext(s.T().Name()) - if _, ok := cosmosTestsMap[s.T().Name()]; ok { - s.T().Skip() + }) } +} - s.T().Skip() // TODO: need to change URL to -secondary https://docs.microsoft.com/en-us/rest/api/storageservices/get-table-service-stats - resp, err := context.client.GetStatistics(ctx, nil) - require.NoError(err) - require.NotNil(resp) +// This functionality is only available on storage accounts +func TestGetStatistics(t *testing.T) { + t.Skip() + cred, err := azidentity.NewDefaultAzureCredential(nil) + require.NoError(t, err) + accountName := recording.GetEnvVariable(t, "TABLES_STORAGE_ACCOUNT_NAME", "fakestorageaccount") + serviceURL := storageURI(accountName+"-secondary", "core.windows.net") + fmt.Println(serviceURL) + service, err := createTableServiceClientForRecording(t, serviceURL, cred) + require.NoError(t, err) + + // s.T().Skip() // TODO: need to change URL to -secondary https://docs.microsoft.com/en-us/rest/api/storageservices/get-table-service-stats + resp, err := service.GetStatistics(ctx, nil) + require.NoError(t, err) + require.NotNil(t, resp) } -func (s *tableServiceClientLiveTests) TestGetProperties() { - require := require.New(s.T()) - context := getTestContext(s.T().Name()) - if _, ok := cosmosTestsMap[s.T().Name()]; ok { - s.T().Skip() - } +// Functionality is only available on storage accounts +func TestGetProperties(t *testing.T) { + service, delete := initServiceTest(t, "storage") + defer delete() - resp, err := context.client.GetProperties(ctx, nil) - require.NoError(err) - require.NotNil(resp) + resp, err := service.GetProperties(ctx, nil) + require.NoError(t, err) + require.NotNil(t, resp) } -func (s *tableServiceClientLiveTests) TestSetLogging() { - require := require.New(s.T()) - context := getTestContext(s.T().Name()) - if _, ok := cosmosTestsMap[s.T().Name()]; ok { - s.T().Skip() - } +// Logging is only available on storage accounts +func TestSetLogging(t *testing.T) { + service, delete := initServiceTest(t, "storage") + defer delete() logging := Logging{ Read: to.BoolPtr(true), @@ -211,28 +204,25 @@ func (s *tableServiceClientLiveTests) TestSetLogging() { } props := TableServiceProperties{Logging: &logging} - resp, err := context.client.SetProperties(ctx, props, nil) - require.NoError(err) - require.NotNil(resp) + resp, err := service.SetProperties(ctx, props, nil) + require.NoError(t, err) + require.NotNil(t, resp) - // time.Sleep(45 * time.Second) + recording.Sleep(45) - received, err := context.client.GetProperties(ctx, nil) - require.NoError(err) + received, err := service.GetProperties(ctx, nil) + require.NoError(t, err) - require.Equal(*props.Logging.Read, *received.StorageServiceProperties.Logging.Read) - require.Equal(*props.Logging.Write, *received.StorageServiceProperties.Logging.Write) - require.Equal(*props.Logging.Delete, *received.StorageServiceProperties.Logging.Delete) - require.Equal(*props.Logging.RetentionPolicy.Enabled, *received.StorageServiceProperties.Logging.RetentionPolicy.Enabled) - require.Equal(*props.Logging.RetentionPolicy.Days, *received.StorageServiceProperties.Logging.RetentionPolicy.Days) + require.Equal(t, *props.Logging.Read, *received.StorageServiceProperties.Logging.Read) + require.Equal(t, *props.Logging.Write, *received.StorageServiceProperties.Logging.Write) + require.Equal(t, *props.Logging.Delete, *received.StorageServiceProperties.Logging.Delete) + require.Equal(t, *props.Logging.RetentionPolicy.Enabled, *received.StorageServiceProperties.Logging.RetentionPolicy.Enabled) + require.Equal(t, *props.Logging.RetentionPolicy.Days, *received.StorageServiceProperties.Logging.RetentionPolicy.Days) } -func (s *tableServiceClientLiveTests) TestSetHoursMetrics() { - require := require.New(s.T()) - context := getTestContext(s.T().Name()) - if _, ok := cosmosTestsMap[s.T().Name()]; ok { - s.T().Skip() - } +func TestSetHoursMetrics(t *testing.T) { + service, delete := initServiceTest(t, "storage") + defer delete() metrics := Metrics{ Enabled: to.BoolPtr(true), @@ -245,27 +235,24 @@ func (s *tableServiceClientLiveTests) TestSetHoursMetrics() { } props := TableServiceProperties{HourMetrics: &metrics} - resp, err := context.client.SetProperties(ctx, props, nil) - require.NoError(err) - require.NotNil(resp) + resp, err := service.SetProperties(ctx, props, nil) + require.NoError(t, err) + require.NotNil(t, resp) - // time.Sleep(45 * time.Second) + recording.Sleep(45) - received, err := context.client.GetProperties(ctx, nil) - require.NoError(err) + received, err := service.GetProperties(ctx, nil) + require.NoError(t, err) - require.Equal(*props.HourMetrics.Enabled, *received.StorageServiceProperties.HourMetrics.Enabled) - require.Equal(*props.HourMetrics.IncludeAPIs, *received.StorageServiceProperties.HourMetrics.IncludeAPIs) - require.Equal(*props.HourMetrics.RetentionPolicy.Days, *received.StorageServiceProperties.HourMetrics.RetentionPolicy.Days) - require.Equal(*props.HourMetrics.RetentionPolicy.Enabled, *received.StorageServiceProperties.HourMetrics.RetentionPolicy.Enabled) + require.Equal(t, *props.HourMetrics.Enabled, *received.StorageServiceProperties.HourMetrics.Enabled) + require.Equal(t, *props.HourMetrics.IncludeAPIs, *received.StorageServiceProperties.HourMetrics.IncludeAPIs) + require.Equal(t, *props.HourMetrics.RetentionPolicy.Days, *received.StorageServiceProperties.HourMetrics.RetentionPolicy.Days) + require.Equal(t, *props.HourMetrics.RetentionPolicy.Enabled, *received.StorageServiceProperties.HourMetrics.RetentionPolicy.Enabled) } -func (s *tableServiceClientLiveTests) TestSetMinuteMetrics() { - require := require.New(s.T()) - context := getTestContext(s.T().Name()) - if _, ok := cosmosTestsMap[s.T().Name()]; ok { - s.T().Skip() - } +func TestSetMinuteMetrics(t *testing.T) { + service, delete := initServiceTest(t, "storage") + defer delete() metrics := Metrics{ Enabled: to.BoolPtr(true), @@ -278,27 +265,24 @@ func (s *tableServiceClientLiveTests) TestSetMinuteMetrics() { } props := TableServiceProperties{MinuteMetrics: &metrics} - resp, err := context.client.SetProperties(ctx, props, nil) - require.NoError(err) - require.NotNil(resp) + resp, err := service.SetProperties(ctx, props, nil) + require.NoError(t, err) + require.NotNil(t, resp) - // time.Sleep(45 * time.Second) + recording.Sleep(45) - received, err := context.client.GetProperties(ctx, nil) - require.NoError(err) + received, err := service.GetProperties(ctx, nil) + require.NoError(t, err) - require.Equal(*props.MinuteMetrics.Enabled, *received.StorageServiceProperties.MinuteMetrics.Enabled) - require.Equal(*props.MinuteMetrics.IncludeAPIs, *received.StorageServiceProperties.MinuteMetrics.IncludeAPIs) - require.Equal(*props.MinuteMetrics.RetentionPolicy.Days, *received.StorageServiceProperties.MinuteMetrics.RetentionPolicy.Days) - require.Equal(*props.MinuteMetrics.RetentionPolicy.Enabled, *received.StorageServiceProperties.MinuteMetrics.RetentionPolicy.Enabled) + require.Equal(t, *props.MinuteMetrics.Enabled, *received.StorageServiceProperties.MinuteMetrics.Enabled) + require.Equal(t, *props.MinuteMetrics.IncludeAPIs, *received.StorageServiceProperties.MinuteMetrics.IncludeAPIs) + require.Equal(t, *props.MinuteMetrics.RetentionPolicy.Days, *received.StorageServiceProperties.MinuteMetrics.RetentionPolicy.Days) + require.Equal(t, *props.MinuteMetrics.RetentionPolicy.Enabled, *received.StorageServiceProperties.MinuteMetrics.RetentionPolicy.Enabled) } -func (s *tableServiceClientLiveTests) TestSetCors() { - require := require.New(s.T()) - context := getTestContext(s.T().Name()) - if _, ok := cosmosTestsMap[s.T().Name()]; ok { - s.T().Skip() - } +func TestSetCors(t *testing.T) { + service, delete := initServiceTest(t, "storage") + defer delete() corsRules1 := CorsRule{ AllowedHeaders: to.StringPtr("x-ms-meta-data*"), @@ -309,28 +293,25 @@ func (s *tableServiceClientLiveTests) TestSetCors() { } props := TableServiceProperties{Cors: []*CorsRule{&corsRules1}} - resp, err := context.client.SetProperties(ctx, props, nil) - require.NoError(err) - require.NotNil(resp) + resp, err := service.SetProperties(ctx, props, nil) + require.NoError(t, err) + require.NotNil(t, resp) - // time.Sleep(45 * time.Second) + recording.Sleep(45) - received, err := context.client.GetProperties(ctx, nil) - require.NoError(err) + received, err := service.GetProperties(ctx, nil) + require.NoError(t, err) - require.Equal(*props.Cors[0].AllowedHeaders, *received.StorageServiceProperties.Cors[0].AllowedHeaders) - require.Equal(*props.Cors[0].AllowedMethods, *received.StorageServiceProperties.Cors[0].AllowedMethods) - require.Equal(*props.Cors[0].AllowedOrigins, *received.StorageServiceProperties.Cors[0].AllowedOrigins) - require.Equal(*props.Cors[0].ExposedHeaders, *received.StorageServiceProperties.Cors[0].ExposedHeaders) - require.Equal(*props.Cors[0].MaxAgeInSeconds, *received.StorageServiceProperties.Cors[0].MaxAgeInSeconds) + require.Equal(t, *props.Cors[0].AllowedHeaders, *received.StorageServiceProperties.Cors[0].AllowedHeaders) + require.Equal(t, *props.Cors[0].AllowedMethods, *received.StorageServiceProperties.Cors[0].AllowedMethods) + require.Equal(t, *props.Cors[0].AllowedOrigins, *received.StorageServiceProperties.Cors[0].AllowedOrigins) + require.Equal(t, *props.Cors[0].ExposedHeaders, *received.StorageServiceProperties.Cors[0].ExposedHeaders) + require.Equal(t, *props.Cors[0].MaxAgeInSeconds, *received.StorageServiceProperties.Cors[0].MaxAgeInSeconds) } -func (s *tableServiceClientLiveTests) TestSetTooManyCors() { - require := require.New(s.T()) - context := getTestContext(s.T().Name()) - if _, ok := cosmosTestsMap[s.T().Name()]; ok { - s.T().Skip() - } +func TestSetTooManyCors(t *testing.T) { + service, delete := initServiceTest(t, "storage") + defer delete() corsRules1 := CorsRule{ AllowedHeaders: to.StringPtr("x-ms-meta-data*"), @@ -344,16 +325,13 @@ func (s *tableServiceClientLiveTests) TestSetTooManyCors() { props.Cors = append(props.Cors, &corsRules1) } - _, err := context.client.SetProperties(ctx, props, nil) - require.Error(err) + _, err := service.SetProperties(ctx, props, nil) + require.Error(t, err) } -func (s *tableServiceClientLiveTests) TestRetentionTooLong() { - require := require.New(s.T()) - context := getTestContext(s.T().Name()) - if _, ok := cosmosTestsMap[s.T().Name()]; ok { - s.T().Skip() - } +func TestRetentionTooLong(t *testing.T) { + service, delete := initServiceTest(t, "storage") + defer delete() metrics := Metrics{ Enabled: to.BoolPtr(true), @@ -366,16 +344,6 @@ func (s *tableServiceClientLiveTests) TestRetentionTooLong() { } props := TableServiceProperties{MinuteMetrics: &metrics} - _, err := context.client.SetProperties(ctx, props, nil) - require.Error(err) -} - -func (s *tableServiceClientLiveTests) BeforeTest(suite string, test string) { - // setup the test environment - recordedTestSetup(s.T(), s.T().Name(), s.endpointType, s.mode) -} - -func (s *tableServiceClientLiveTests) AfterTest(suite string, test string) { - // teardown the test context - recordedTestTeardown(s.T().Name()) + _, err := service.SetProperties(ctx, props, nil) + require.Error(t, err) } diff --git a/sdk/tables/aztable/zc_client_options.go b/sdk/tables/aztable/zc_client_options.go index e06d97d51dc8..ef2678419057 100644 --- a/sdk/tables/aztable/zc_client_options.go +++ b/sdk/tables/aztable/zc_client_options.go @@ -14,6 +14,10 @@ type TableClientOptions struct { Retry azcore.RetryOptions // Telemetry configures the built-in telemetry policy behavior. Telemetry azcore.TelemetryOptions + // PerCallOptions are options to run on every request + PerCallOptions []azcore.Policy + // Scopes are the authentication scopes for AAD Authentication + Scopes []string } func (o *TableClientOptions) getConnectionOptions() *connectionOptions { diff --git a/sdk/tables/aztable/zt_table_recorded_tests.go b/sdk/tables/aztable/zt_table_recorded_tests.go index 9f3824aa90d9..259cdea96307 100644 --- a/sdk/tables/aztable/zt_table_recorded_tests.go +++ b/sdk/tables/aztable/zt_table_recorded_tests.go @@ -10,7 +10,6 @@ import ( "testing" "time" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/stretchr/testify/require" ) @@ -41,8 +40,6 @@ const ( ) var ctx = context.Background() -var clientsMap map[string]*testContext = make(map[string]*testContext) -var cosmosTestsMap map[string]bool = make(map[string]bool) func storageURI(accountName string, endpointSuffix string) string { return fmt.Sprintf("https://%v.table.%v/", accountName, endpointSuffix) @@ -52,57 +49,6 @@ func cosmosURI(accountName string, endpointSuffix string) string { return fmt.Sprintf("https://%v.table.%v/", accountName, endpointSuffix) } -// create the test specific TableClient and wire it up to recordings -func recordedTestSetup(t *testing.T, testName string, endpointType EndpointType, mode recording.RecordMode) { - var accountName string - var suffix string - var cred *SharedKeyCredential - var secret string - var uri string - require := require.New(t) - - // init the test framework - context := recording.NewTestContext(func(msg string) { require.FailNow(msg) }, func(msg string) { t.Log(msg) }, func() string { return testName }) - r, err := recording.NewRecording(context, mode) - require.NoError(err) - - if endpointType == StorageEndpoint { - accountName, err = r.GetRecordedVariable(storageAccountNameEnvVar, recording.Default) - require.NoError(err) - suffix = r.GetOptionalRecordedVariable(storageEndpointSuffixEnvVar, DefaultStorageSuffix, recording.Default) - secret, err = r.GetRecordedVariable(storageAccountKeyEnvVar, recording.Secret_Base64String) - require.NoError(err) - cred, err = NewSharedKeyCredential(accountName, secret) - require.NoError(err) - uri = storageURI(accountName, suffix) - } else { - accountName, err = r.GetRecordedVariable(cosmosAccountNameEnnVar, recording.Default) - require.NoError(err) - suffix = r.GetOptionalRecordedVariable(cosmosEndpointSuffixEnvVar, DefaultCosmosSuffix, recording.Default) - secret, err = r.GetRecordedVariable(cosmosAccountKeyEnvVar, recording.Secret_Base64String) - require.NoError(err) - cred, err = NewSharedKeyCredential(accountName, secret) - require.NoError(err) - uri = cosmosURI(accountName, suffix) - cosmosTestsMap[testName] = true - } - - client, err := NewTableServiceClient(uri, cred, &TableClientOptions{HTTPClient: r, Retry: azcore.RetryOptions{MaxRetries: -1}}) - require.NoError(err) - - clientsMap[testName] = &testContext{client: client, recording: r, context: &context} -} - -func recordedTestTeardown(key string) { - context, ok := clientsMap[key] - if ok && !(*context.context).IsFailed() { - err := context.recording.Stop() - if err != nil { - fmt.Printf("Error tearing down tests. %v\n", err.Error()) - } - } -} - func insertNEntities(pk string, n int, client *TableClient) error { for i := 0; i < n; i++ { e := &map[string]interface{}{ @@ -145,10 +91,6 @@ func cleanupTables(context *testContext, tables *[]string) { } } -func getTestContext(key string) *testContext { - return clientsMap[key] -} - func getTableName(context *testContext, prefix ...string) (string, error) { if len(prefix) == 0 { return context.recording.GenerateAlphaNumericID(tableNamePrefix, 20, true) @@ -253,16 +195,16 @@ func createEdmEntity(count int, pk string) EdmEntity { } } -func requireSameDateTime(r *require.Assertions, time1, time2 interface{}) { +func requireSameDateTime(t *testing.T, time1, time2 interface{}) { t1 := time.Time(time1.(EdmDateTime)) t2 := time.Time(time2.(EdmDateTime)) - r.Equal(t1.Year(), t2.Year()) - r.Equal(t1.Month(), t2.Month()) - r.Equal(t1.Day(), t2.Day()) - r.Equal(t1.Hour(), t2.Hour()) - r.Equal(t1.Minute(), t2.Minute()) - r.Equal(t1.Second(), t2.Second()) + require.Equal(t, t1.Year(), t2.Year()) + require.Equal(t, t1.Month(), t2.Month()) + require.Equal(t, t1.Day(), t2.Day()) + require.Equal(t, t1.Hour(), t2.Hour()) + require.Equal(t, t1.Minute(), t2.Minute()) + require.Equal(t, t1.Second(), t2.Second()) z1, _ := t1.Zone() z2, _ := t2.Zone() - r.Equal(z1, z2) + require.Equal(t, z1, z2) } From a8c839f9e33d60ec5a284f70964dcefeb7e0d8cf Mon Sep 17 00:00:00 2001 From: Sean Kane <68240067+seankane-msft@users.noreply.github.com> Date: Mon, 16 Aug 2021 12:22:49 -0400 Subject: [PATCH 34/42] [Tables] Add authentication via SAS credential (#15256) * changing recording to use test-proxy * updating client and test proxy * updated Transport Do to send actual request * whitespace * working implementation * updating internal recording * now I have a blank recording... * cleaning up * more clean up * transport Do is repeating, proxy is not parsing URL correctly * small changes * adding a policy to do the same thing * adding a second test for proxy and transport * further progress with Jeff, switching to only using a policy right now * cleaning up file * cleaning up * added more debugging, added two required headers that I was missing * proxy working on a single test, need to convert all tests to test proxy * cleaning up * moved over successfully :) * more helper functions * working for a subtest functionality * fixed up a service client test * converting more service tests * converted all service client tests * converted table client tests * fixed last two client tests * entity test * entity tests * converting access policy tests * all passing in record mode * batch tests * liveonly for batch tests * adding a sanitizer and more methods for recording * adding main method to start and stop the proxy automatically * adding test proxy step to pipeline * double dash on version arg * need a better way to get userful error reporting * explicitly running test-proxy in the background * adjust the proxy start and install to be compatible with specific process * dont run test proxy in background * didnt remove an import * header to proxy_test.go * fixes for pipeline * added loggin on accident * use nohup on linux machines * further simplify nohup usage * there are no exes on windows * fixing errors, passing in default env variable * force background for linux task. may need another iteration to place it within the quotes * fake aad credential * clean up after test-proxy * add print for record mode * another different attempt at starting the proxy * jobs apparently is an unrecognized command on our linux boxes * correct dumb typo in run tests * replace nuget install with docker * working fake credentials for client delete entity test * fixing fake credentials portion, passing locally * trying an insecureskipverify transport * debugging statements to find the cwd * removing blank recording * working implementation of sas * working sas credential for account signature * table sas is failing * leverage proxy tool, not docker * remove apostrophes * moving recordings one directory up * transitioning to using the sas written by storage team * using storage methods * copied storage code, sas needs to be appended in a different way * changing directory for test-proxy to start from * removing parenthesis * adding steps for validating ssl * switching to docker * adding start server script * working implementation if we can fix the prepending of 'recording' to the docker request finder * big refactor, moving stuff into recording file, cleaning up proxy_test.go file * last fixings * convert back to docker. windows and linux images now present * double condition * moving configuration to a separate file. preparing for eng/common move * tier 0 of trust. I don't expect this to work, but it's still worth a shot. maybe the devops agents do something differently * update condition to use variable syntax * guess I'm not using variables. removing * call start-server.ps1 * adjust build-test and configure-proxy to run the docker container in context * wrap in quotes for the container create. it's apparently a bad * adjust the initialize call * disable vet temporarily * looking for cert file in env variable PROXY_CERT * set proxy_cert environment variable to find that certificate * changing to crt file * use crt cert * want to see errors * powershell errors * correcting how the volume binds to the windows container * small modification for windows container * finally got the magic sauce * cleaning up to remove azcore from internal * removing recordings that use vcr * issue with the url creation * persist query params correctly in azcore.JoinPaths * removing print statements * return root * changing location of script * forgot the stop command * working table level sas implementation * adding start/end rk/pk functionality * removing print statements * removing more non-tables code * docstrings and removing storage only code * making sas tests live only * Fixing sas table name to be lowercase always, adding test to verify read only * Fixing sas table name to be lowercase always, adding test to verify read only * adding cosmos sas test * fix for params * apiview fixes * fixing test * undoing change * updates * error naming * fixed service client, was adding percallpolicies twice * simplification * aligning with main * converting from query pager to list pager for naming consistency * updating objects for consistency * jeffs feedback * small fixes * autorest.md changes * fixing tablename Co-authored-by: scbedd <45376673+scbedd@users.noreply.github.com> --- eng/pipelines/templates/steps/build-test.yml | 4 +- .../{start-server.ps1 => proxy-server.ps1} | 0 sdk/azcore/request.go | 36 ++- sdk/azcore/request_test.go | 2 +- sdk/tables/autorest.md | 11 +- sdk/tables/aztable/byte_array_response.go | 64 +++- .../aztable/cosmos_patch_transform_policy.go | 6 +- sdk/tables/aztable/entity.go | 39 +++ sdk/tables/aztable/errors.go | 4 + sdk/tables/aztable/go.mod | 1 + sdk/tables/aztable/models.go | 2 +- sdk/tables/aztable/proxy_test.go | 10 +- .../TestInsertEntity_cosmos.json} | 30 +- .../TestInsertEntity_storage.json} | 30 +- sdk/tables/aztable/sas_account.go | 189 +++++++++++ sdk/tables/aztable/sas_query_params.go | 299 ++++++++++++++++++ sdk/tables/aztable/sas_service.go | 156 +++++++++ .../aztable/shared_access_signature_test.go | 265 ++++++++++++++++ sdk/tables/aztable/table_batch_test.go | 10 +- sdk/tables/aztable/table_client.go | 29 +- sdk/tables/aztable/table_client_test.go | 10 +- sdk/tables/aztable/table_pagers.go | 22 +- sdk/tables/aztable/table_service_client.go | 51 ++- .../aztable/table_service_client_test.go | 7 +- .../aztable/table_transactional_batch.go | 8 +- sdk/tables/aztable/zc_table_constants.go | 1 - sdk/tables/aztable/zt_table_recorded_tests.go | 6 +- 27 files changed, 1174 insertions(+), 118 deletions(-) rename eng/scripts/{start-server.ps1 => proxy-server.ps1} (100%) rename sdk/tables/aztable/recordings/{TestUpsertEntity/TestUpsertEntity_cosmos.json => TestInsertEntity/TestInsertEntity_cosmos.json} (89%) rename sdk/tables/aztable/recordings/{TestUpsertEntity/TestUpsertEntity_storage.json => TestInsertEntity/TestInsertEntity_storage.json} (91%) create mode 100644 sdk/tables/aztable/sas_account.go create mode 100644 sdk/tables/aztable/sas_query_params.go create mode 100644 sdk/tables/aztable/sas_service.go create mode 100644 sdk/tables/aztable/shared_access_signature_test.go diff --git a/eng/pipelines/templates/steps/build-test.yml b/eng/pipelines/templates/steps/build-test.yml index 8adf13b2a8f3..669faba92a1b 100644 --- a/eng/pipelines/templates/steps/build-test.yml +++ b/eng/pipelines/templates/steps/build-test.yml @@ -37,7 +37,7 @@ steps: foreach ($td in $testDirs) { pushd $td - $(Build.SourcesDirectory)/eng/scripts/start-server.ps1 start + $(Build.SourcesDirectory)/eng/scripts/proxy-server.ps1 start Write-Host "##[command]Executing go test -run "^Test" -v -coverprofile coverage.txt $td | go-junit-report -set-exit-code > report.xml" go test -run "^Test" -v -coverprofile coverage.txt . > temp.txt @@ -49,7 +49,7 @@ steps: rm coverage.txt } - $(Build.SourcesDirectory)/eng/scripts/start-server.ps1 stop + $(Build.SourcesDirectory)/eng/scripts/proxy-server.ps1 stop } displayName: 'Run Tests' workingDirectory: '${{parameters.GoWorkspace}}' diff --git a/eng/scripts/start-server.ps1 b/eng/scripts/proxy-server.ps1 similarity index 100% rename from eng/scripts/start-server.ps1 rename to eng/scripts/proxy-server.ps1 diff --git a/sdk/azcore/request.go b/sdk/azcore/request.go index f7e1bb5af143..f74eed9e203c 100644 --- a/sdk/azcore/request.go +++ b/sdk/azcore/request.go @@ -67,23 +67,29 @@ func (ov opValues) get(value interface{}) bool { } // JoinPaths concatenates multiple URL path segments into one path, -// inserting path separation characters as required. -func JoinPaths(paths ...string) string { +// inserting path separation characters as required. JoinPaths will preserve +// query parameters in the root path +func JoinPaths(root string, paths ...string) string { if len(paths) == 0 { - return "" - } - path := paths[0] - for i := 1; i < len(paths); i++ { - if path[len(path)-1] == '/' && paths[i][0] == '/' { - // strip off trailing '/' to avoid doubling up - path = path[:len(path)-1] - } else if path[len(path)-1] != '/' && paths[i][0] != '/' { - // add a trailing '/' - path = path + "/" - } - path += paths[i] + return root + } + + qps := "" + if strings.Contains(root, "?") { + splitPath := strings.Split(root, "?") + root, qps = splitPath[0], splitPath[1] + } + + for i := 0; i < len(paths); i++ { + root = strings.TrimRight(root, "/") + paths[i] = strings.TrimLeft(paths[i], "/") + root += "/" + paths[i] + } + + if qps != "" { + return root + "?" + qps } - return path + return root } // NewRequest creates a new Request with the specified input. diff --git a/sdk/azcore/request_test.go b/sdk/azcore/request_test.go index 09ac6748f035..dfc0be2e095d 100644 --- a/sdk/azcore/request_test.go +++ b/sdk/azcore/request_test.go @@ -507,7 +507,7 @@ func TestNewRequestFail(t *testing.T) { } func TestJoinPaths(t *testing.T) { - if path := JoinPaths(); path != "" { + if path := JoinPaths(""); path != "" { t.Fatalf("unexpected path %s", path) } const expected = "http://test.contoso.com/path/one/path/two/path/three/path/four/" diff --git a/sdk/tables/autorest.md b/sdk/tables/autorest.md index ca2060b6b671..ed440312cd12 100644 --- a/sdk/tables/autorest.md +++ b/sdk/tables/autorest.md @@ -11,12 +11,15 @@ version: "^3.0.0" input-file: https://github.com/Azure/azure-rest-api-specs/blob/d744b6bcb95ab4034832ded556dbbe58f4287c5b/specification/cosmos-db/data-plane/Microsoft.Tables/preview/2019-02-02/table.json license-header: MICROSOFT_MIT_NO_VERSION clear-output-folder: false -output-folder: aztable -file-prefix: "zz_generated_" +output-folder: aztable/internal +# file-prefix: "zz_generated_" tag: package-2019-02 credential-scope: none -use: "@autorest/go@4.0.0-preview.23" -openapi-type: data-plane +use: "@autorest/go@4.0.0-preview.26" +# openapi-type: data-plane +module-version: 0.1.0 +modelerfour: + group-parameters: false ``` ### Go multi-api diff --git a/sdk/tables/aztable/byte_array_response.go b/sdk/tables/aztable/byte_array_response.go index cc0ee76a8916..eeb1eece86ae 100644 --- a/sdk/tables/aztable/byte_array_response.go +++ b/sdk/tables/aztable/byte_array_response.go @@ -9,7 +9,7 @@ import ( "time" ) -// ByteArrayResponse converts the MapOfInterfaceResponse.Value from a map[string]interface{} to a []byte +// ByteArrayResponse is the return type for a GetEntity operation. The entities properties are stored in the Value property type ByteArrayResponse struct { // ClientRequestID contains the information returned from the x-ms-client-request-id header response. ClientRequestID *string @@ -45,6 +45,7 @@ type ByteArrayResponse struct { XMSContinuationNextRowKey *string } +// newByteArrayResponse converts a MapofInterfaceResponse from a map[string]interface{} to a []byte. func newByteArrayResponse(m MapOfInterfaceResponse) (ByteArrayResponse, error) { marshalledValue, err := json.Marshal(m.Value) if err != nil { @@ -65,8 +66,8 @@ func newByteArrayResponse(m MapOfInterfaceResponse) (ByteArrayResponse, error) { }, nil } -// TableEntityQueryByteResponseResponse is the response envelope for operations that return a TableEntityQueryResponse type. -type TableEntityQueryByteResponseResponse struct { +// TableEntityListByteResponseResponse is the response envelope for operations that return a TableEntityQueryResponse type. +type TableEntityListByteResponseResponse struct { // ClientRequestID contains the information returned from the x-ms-client-request-id header response. ClientRequestID *string @@ -101,12 +102,12 @@ type TableEntityQueryByteResponse struct { Value [][]byte } -func castToByteResponse(resp *TableEntityQueryResponseResponse) (TableEntityQueryByteResponseResponse, error) { +func castToByteResponse(resp *TableEntityQueryResponseResponse) (TableEntityListByteResponseResponse, error) { marshalledValue := make([][]byte, 0) for _, e := range resp.TableEntityQueryResponse.Value { m, err := json.Marshal(e) if err != nil { - return TableEntityQueryByteResponseResponse{}, err + return TableEntityListByteResponseResponse{}, err } marshalledValue = append(marshalledValue, m) } @@ -116,7 +117,7 @@ func castToByteResponse(resp *TableEntityQueryResponseResponse) (TableEntityQuer Value: marshalledValue, } - return TableEntityQueryByteResponseResponse{ + return TableEntityListByteResponseResponse{ ClientRequestID: resp.ClientRequestID, Date: resp.Date, RawResponse: resp.RawResponse, @@ -127,3 +128,54 @@ func castToByteResponse(resp *TableEntityQueryResponseResponse) (TableEntityQuer XMSContinuationNextRowKey: resp.XMSContinuationNextRowKey, }, nil } + +type TableListResponse struct { + // The metadata response of the table. + OdataMetadata *string `json:"odata.metadata,omitempty"` + + // List of tables. + Value []*TableResponseProperties `json:"value,omitempty"` +} + +func tableListResponseFromQueryResponse(q *TableQueryResponse) *TableListResponse { + return &TableListResponse{ + OdataMetadata: q.OdataMetadata, + Value: q.Value, + } +} + +// TableListResponseResponse stores the results of a ListTables operation +type TableListResponseResponse struct { + // ClientRequestID contains the information returned from the x-ms-client-request-id header response. + ClientRequestID *string + + // Date contains the information returned from the Date header response. + Date *time.Time + + // RawResponse contains the underlying HTTP response. + RawResponse *http.Response + + // RequestID contains the information returned from the x-ms-request-id header response. + RequestID *string + + // The properties for the table query response. + TableListResponse *TableListResponse + + // Version contains the information returned from the x-ms-version header response. + Version *string + + // XMSContinuationNextTableName contains the information returned from the x-ms-continuation-NextTableName header response. + XMSContinuationNextTableName *string +} + +func listResponseFromQueryResponse(q TableQueryResponseResponse) *TableListResponseResponse { + return &TableListResponseResponse{ + ClientRequestID: q.ClientRequestID, + Date: q.Date, + RawResponse: q.RawResponse, + RequestID: q.RequestID, + TableListResponse: tableListResponseFromQueryResponse(q.TableQueryResponse), + Version: q.Version, + XMSContinuationNextTableName: q.XMSContinuationNextTableName, + } +} diff --git a/sdk/tables/aztable/cosmos_patch_transform_policy.go b/sdk/tables/aztable/cosmos_patch_transform_policy.go index b7b339221717..8403a0893e67 100644 --- a/sdk/tables/aztable/cosmos_patch_transform_policy.go +++ b/sdk/tables/aztable/cosmos_patch_transform_policy.go @@ -11,10 +11,10 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" ) -// CosmosPatchTransformPolicy transforms PATCH requests into POST requests with the "X-HTTP-Method":"MERGE" header set. -type CosmosPatchTransformPolicy struct{} +// cosmosPatchTransformPolicy transforms PATCH requests into POST requests with the "X-HTTP-Method":"MERGE" header set. +type cosmosPatchTransformPolicy struct{} -func (p CosmosPatchTransformPolicy) Do(req *azcore.Request) (*azcore.Response, error) { +func (p cosmosPatchTransformPolicy) Do(req *azcore.Request) (*azcore.Response, error) { transformPatchToCosmosPost(req) return req.Next() } diff --git a/sdk/tables/aztable/entity.go b/sdk/tables/aztable/entity.go index 509cb7fd5945..0836c87d08db 100644 --- a/sdk/tables/aztable/entity.go +++ b/sdk/tables/aztable/entity.go @@ -13,12 +13,43 @@ import ( // https://docs.microsoft.com/en-us/rest/api/storageservices/payload-format-for-table-service-operations +// The Entity type is the bare minimum properties for a valid Entity. These should be embedded in a custom struct +// type MyEntity struct { +// Entity +// Value int +// StringValue string +// BoolValue bool +// } +// myEntity := MyEntity{ +// Entity: Entity{ +// PartitionKey: "pk001", +// RowKey: "rk001", +// }, +// Value: 10, +// StringValue: "somestring", +// BoolValue: false, +// } type Entity struct { PartitionKey string RowKey string Timestamp EdmDateTime } +// EdmEntity is an entity that embeds the azcore.Entity type and has a Properties map for an unlimited +// number of custom properties. The EdmEntity will serialize EdmGuid/EdmInt64/EdmDateTime/EdmBinary according to Odata annotations +// myEntity := EdmEntity{ +// Entity: Entity{ +// PartitionKey: "pk001", +// RowKey: "rk001", +// } +// Properties: map[string]interface{}{ +// "Value": 10, +// "Binary": EdmBinary([]byte{"bytevalue"}), +// "DateTime": EdmDateTime(time.Now()), +// "Int64": EdmInt64(123456789012345), + +// } +// } type EdmEntity struct { Metadata string `json:"odata.metadata"` Id string `json:"odata.id"` @@ -127,6 +158,8 @@ func (e *EdmEntity) UnmarshalJSON(data []byte) (err error) { return } +// EdmBinary represents an Entity Property that is a byte slice. A byte slice wrapped in +// EdmBinary will also receive the correct odata annotation for round-trip accuracy. type EdmBinary []byte func (e EdmBinary) MarshalText() ([]byte, error) { @@ -142,6 +175,8 @@ func (e *EdmBinary) UnmarshalText(data []byte) error { return nil } +// EdmInt64 represents an entity property that is a 64-bit integer. Using EdmInt64 guarantees +// proper odata type annotations. type EdmInt64 int64 func (e EdmInt64) MarshalText() ([]byte, error) { @@ -157,6 +192,8 @@ func (e *EdmInt64) UnmarshalText(data []byte) error { return nil } +// EdmInt64 represents an entity property that is a GUID wrapped in a string. Using EdmGuid guarantees +// proper odata type annotations. type EdmGuid string func (e EdmGuid) MarshalText() ([]byte, error) { @@ -168,6 +205,8 @@ func (e *EdmGuid) UnmarshalText(data []byte) error { return nil } +// EdmDateTime represents an entity property that is a time.Time object. Using EdmDateTime guarantees +// proper odata type annotations. type EdmDateTime time.Time const rfc3339 = "2006-01-02T15:04:05.9999999Z" diff --git a/sdk/tables/aztable/errors.go b/sdk/tables/aztable/errors.go index 17aeabca6d8f..1152898a309e 100644 --- a/sdk/tables/aztable/errors.go +++ b/sdk/tables/aztable/errors.go @@ -3,6 +3,10 @@ package aztable +import "errors" + +var errInvalidUpdateMode = errors.New("invalid EntityUpdateMode") + func checkEntityForPkRk(entity *map[string]interface{}, err error) error { if _, ok := (*entity)[partitionKey]; !ok { return partitionKeyRowKeyError diff --git a/sdk/tables/aztable/go.mod b/sdk/tables/aztable/go.mod index 6c22932e4a4a..d221fb14275b 100644 --- a/sdk/tables/aztable/go.mod +++ b/sdk/tables/aztable/go.mod @@ -4,6 +4,7 @@ go 1.13 replace github.com/Azure/azure-sdk-for-go/sdk/internal => ../../internal replace github.com/Azure/azure-sdk-for-go/sdk/azidentity => ../../azidentity +replace github.com/Azure/azure-sdk-for-go/sdk/azcore => ../../azcore require ( github.com/Azure/azure-sdk-for-go/sdk/azcore v0.16.2 diff --git a/sdk/tables/aztable/models.go b/sdk/tables/aztable/models.go index c6ec5fc9371c..476d07c102ca 100644 --- a/sdk/tables/aztable/models.go +++ b/sdk/tables/aztable/models.go @@ -3,7 +3,7 @@ package aztable -// QueryOptions contains a group of parameters for the Table.Query method. +// ListOptions contains a group of parameters for the Table.Query method. type ListOptions struct { // OData filter expression. Filter *string diff --git a/sdk/tables/aztable/proxy_test.go b/sdk/tables/aztable/proxy_test.go index 4a7f072d91c1..d79f395a4e11 100644 --- a/sdk/tables/aztable/proxy_test.go +++ b/sdk/tables/aztable/proxy_test.go @@ -91,10 +91,10 @@ func createTableServiceClientForRecording(t *testing.T, serviceURL string, cred func initClientTest(t *testing.T, service string, createTable bool) (*TableClient, func()) { var client *TableClient var err error - if service == string(StorageEndpoint) { + if service == string(storageEndpoint) { client, err = createStorageTableClient(t) require.NoError(t, err) - } else if service == string(CosmosEndpoint) { + } else if service == string(cosmosEndpoint) { client, err = createCosmosTableClient(t) require.NoError(t, err) } @@ -118,10 +118,10 @@ func initClientTest(t *testing.T, service string, createTable bool) (*TableClien func initServiceTest(t *testing.T, service string) (*TableServiceClient, func()) { var client *TableServiceClient var err error - if service == string(StorageEndpoint) { + if service == string(storageEndpoint) { client, err = createStorageServiceClient(t) require.NoError(t, err) - } else if service == string(CosmosEndpoint) { + } else if service == string(cosmosEndpoint) { client, err = createCosmosServiceClient(t) require.NoError(t, err) } @@ -226,7 +226,7 @@ func clearAllTables(service *TableServiceClient) error { pager := service.ListTables(nil) for pager.NextPage(ctx) { resp := pager.PageResponse() - for _, v := range resp.TableQueryResponse.Value { + for _, v := range resp.TableListResponse.Value { _, err := service.DeleteTable(ctx, *v.TableName, nil) if err != nil { return err diff --git a/sdk/tables/aztable/recordings/TestUpsertEntity/TestUpsertEntity_cosmos.json b/sdk/tables/aztable/recordings/TestInsertEntity/TestInsertEntity_cosmos.json similarity index 89% rename from sdk/tables/aztable/recordings/TestUpsertEntity/TestUpsertEntity_cosmos.json rename to sdk/tables/aztable/recordings/TestInsertEntity/TestInsertEntity_cosmos.json index 3c5d71b33d10..bdf17f03f44c 100644 --- a/sdk/tables/aztable/recordings/TestUpsertEntity/TestUpsertEntity_cosmos.json +++ b/sdk/tables/aztable/recordings/TestInsertEntity/TestInsertEntity_cosmos.json @@ -19,29 +19,29 @@ "x-ms-version": "2019-02-02" }, "RequestBody": { - "TableName": "tableName2941442851" + "TableName": "tableName3858182091" }, "StatusCode": 201, "ResponseHeaders": { "Content-Type": "application/json; odata=minimalmetadata", "Date": "Mon, 02 Aug 2021 18:01:58 GMT", "ETag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A58.7090440Z\u0027\u0022", - "Location": "https://seankaneprim.table.cosmos.azure.com/Tables(\u0027tableName2941442851\u0027)", + "Location": "https://seankaneprim.table.cosmos.azure.com/Tables(\u0027tableName3858182091\u0027)", "Transfer-Encoding": "chunked", "x-ms-request-id": "482077b6-f28f-4226-b3f7-e577806e4b28" }, "ResponseBody": { - "TableName": "tableName2941442851", + "TableName": "tableName3858182091", "odata.metadata": "https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element" } }, { - "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/tableName2941442851(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/tableName3858182091(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", "RequestMethod": "PUT", "RequestHeaders": { ":authority": "localhost:5001", ":method": "PUT", - ":path": "/tableName2941442851(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", + ":path": "/tableName3858182091(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", ":scheme": "https", "Accept": "application/json", "Accept-Encoding": "gzip", @@ -71,12 +71,12 @@ "ResponseBody": null }, { - "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/tableName2941442851(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/tableName3858182091(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", "RequestMethod": "GET", "RequestHeaders": { ":authority": "localhost:5001", ":method": "GET", - ":path": "/tableName2941442851(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", + ":path": "/tableName3858182091(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", ":scheme": "https", "Accept": "application/json;odata=minimalmetadata", "Accept-Encoding": "gzip", @@ -96,7 +96,7 @@ "x-ms-request-id": "a1f6a398-213c-4098-ba60-2ea73fae92f6" }, "ResponseBody": { - "odata.metadata": "https://seankaneprim.table.cosmos.azure.com/tableName2941442851/$metadata#tableName2941442851/@Element", + "odata.metadata": "https://seankaneprim.table.cosmos.azure.com/tableName3858182091/$metadata#tableName3858182091/@Element", "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A59.3616392Z\u0027\u0022", "PartitionKey": "partition", "RowKey": "1", @@ -107,12 +107,12 @@ } }, { - "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/tableName2941442851(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/tableName3858182091(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", "RequestMethod": "PUT", "RequestHeaders": { ":authority": "localhost:5001", ":method": "PUT", - ":path": "/tableName2941442851(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", + ":path": "/tableName3858182091(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", ":scheme": "https", "Accept": "application/json", "Accept-Encoding": "gzip", @@ -141,12 +141,12 @@ "ResponseBody": null }, { - "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/tableName2941442851()?%24filter=RowKey\u002Beq\u002B%271%27", + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/tableName3858182091()?%24filter=RowKey\u002Beq\u002B%271%27", "RequestMethod": "GET", "RequestHeaders": { ":authority": "localhost:5001", ":method": "GET", - ":path": "/tableName2941442851()?%24filter=RowKey\u002Beq\u002B%271%27", + ":path": "/tableName3858182091()?%24filter=RowKey\u002Beq\u002B%271%27", ":scheme": "https", "Accept": "application/json;odata=minimalmetadata", "Accept-Encoding": "gzip", @@ -176,16 +176,16 @@ "Timestamp": "2021-08-02T18:01:59.6248072Z" } ], - "odata.metadata": "https://seankaneprim.table.cosmos.azure.com/$metadata#tableName2941442851" + "odata.metadata": "https://seankaneprim.table.cosmos.azure.com/$metadata#tableName3858182091" } }, { - "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables(\u0027tableName2941442851\u0027)", + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables(\u0027tableName3858182091\u0027)", "RequestMethod": "DELETE", "RequestHeaders": { ":authority": "localhost:5001", ":method": "DELETE", - ":path": "/Tables(\u0027tableName2941442851\u0027)", + ":path": "/Tables(\u0027tableName3858182091\u0027)", ":scheme": "https", "Accept": "application/json", "Accept-Encoding": "gzip", diff --git a/sdk/tables/aztable/recordings/TestUpsertEntity/TestUpsertEntity_storage.json b/sdk/tables/aztable/recordings/TestInsertEntity/TestInsertEntity_storage.json similarity index 91% rename from sdk/tables/aztable/recordings/TestUpsertEntity/TestUpsertEntity_storage.json rename to sdk/tables/aztable/recordings/TestInsertEntity/TestInsertEntity_storage.json index e70a1edd4256..830e3e68491c 100644 --- a/sdk/tables/aztable/recordings/TestUpsertEntity/TestUpsertEntity_storage.json +++ b/sdk/tables/aztable/recordings/TestInsertEntity/TestInsertEntity_storage.json @@ -19,14 +19,14 @@ "x-ms-version": "2019-02-02" }, "RequestBody": { - "TableName": "tableName4103702124" + "TableName": "tableName2262274532" }, "StatusCode": 201, "ResponseHeaders": { "Cache-Control": "no-cache", "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", "Date": "Mon, 02 Aug 2021 18:01:56 GMT", - "Location": "https://seankaneprim.table.core.windows.net/Tables(\u0027tableName4103702124\u0027)", + "Location": "https://seankaneprim.table.core.windows.net/Tables(\u0027tableName2262274532\u0027)", "Server": [ "Windows-Azure-Table/1.0", "Microsoft-HTTPAPI/2.0" @@ -38,16 +38,16 @@ }, "ResponseBody": { "odata.metadata": "https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element", - "TableName": "tableName4103702124" + "TableName": "tableName2262274532" } }, { - "RequestUri": "https://fakestorageaccount.table.core.windows.net/tableName4103702124(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", + "RequestUri": "https://fakestorageaccount.table.core.windows.net/tableName2262274532(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", "RequestMethod": "PUT", "RequestHeaders": { ":authority": "localhost:5001", ":method": "PUT", - ":path": "/tableName4103702124(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", + ":path": "/tableName2262274532(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", ":scheme": "https", "Accept": "application/json", "Accept-Encoding": "gzip", @@ -84,12 +84,12 @@ "ResponseBody": null }, { - "RequestUri": "https://fakestorageaccount.table.core.windows.net/tableName4103702124(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", + "RequestUri": "https://fakestorageaccount.table.core.windows.net/tableName2262274532(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", "RequestMethod": "GET", "RequestHeaders": { ":authority": "localhost:5001", ":method": "GET", - ":path": "/tableName4103702124(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", + ":path": "/tableName2262274532(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", ":scheme": "https", "Accept": "application/json;odata=minimalmetadata", "Accept-Encoding": "gzip", @@ -117,7 +117,7 @@ "x-ms-version": "2019-02-02" }, "ResponseBody": { - "odata.metadata": "https://seankaneprim.table.core.windows.net/$metadata#tableName4103702124/@Element", + "odata.metadata": "https://seankaneprim.table.core.windows.net/$metadata#tableName2262274532/@Element", "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A57.8187862Z\u0027\u0022", "PartitionKey": "partition", "RowKey": "1", @@ -128,12 +128,12 @@ } }, { - "RequestUri": "https://fakestorageaccount.table.core.windows.net/tableName4103702124(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", + "RequestUri": "https://fakestorageaccount.table.core.windows.net/tableName2262274532(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", "RequestMethod": "PUT", "RequestHeaders": { ":authority": "localhost:5001", ":method": "PUT", - ":path": "/tableName4103702124(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", + ":path": "/tableName2262274532(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", ":scheme": "https", "Accept": "application/json", "Accept-Encoding": "gzip", @@ -169,12 +169,12 @@ "ResponseBody": null }, { - "RequestUri": "https://fakestorageaccount.table.core.windows.net/tableName4103702124()?%24filter=RowKey\u002Beq\u002B%271%27", + "RequestUri": "https://fakestorageaccount.table.core.windows.net/tableName2262274532()?%24filter=RowKey\u002Beq\u002B%271%27", "RequestMethod": "GET", "RequestHeaders": { ":authority": "localhost:5001", ":method": "GET", - ":path": "/tableName4103702124()?%24filter=RowKey\u002Beq\u002B%271%27", + ":path": "/tableName2262274532()?%24filter=RowKey\u002Beq\u002B%271%27", ":scheme": "https", "Accept": "application/json;odata=minimalmetadata", "Accept-Encoding": "gzip", @@ -201,7 +201,7 @@ "x-ms-version": "2019-02-02" }, "ResponseBody": { - "odata.metadata": "https://seankaneprim.table.core.windows.net/$metadata#tableName4103702124", + "odata.metadata": "https://seankaneprim.table.core.windows.net/$metadata#tableName2262274532", "value": [ { "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A58.0749701Z\u0027\u0022", @@ -216,12 +216,12 @@ } }, { - "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables(\u0027tableName4103702124\u0027)", + "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables(\u0027tableName2262274532\u0027)", "RequestMethod": "DELETE", "RequestHeaders": { ":authority": "localhost:5001", ":method": "DELETE", - ":path": "/Tables(\u0027tableName4103702124\u0027)", + ":path": "/Tables(\u0027tableName2262274532\u0027)", ":scheme": "https", "Accept": "application/json", "Accept-Encoding": "gzip", diff --git a/sdk/tables/aztable/sas_account.go b/sdk/tables/aztable/sas_account.go new file mode 100644 index 000000000000..664b40481c12 --- /dev/null +++ b/sdk/tables/aztable/sas_account.go @@ -0,0 +1,189 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package aztable + +import ( + "bytes" + "errors" + "fmt" + "strings" + "time" +) + +var SASVersion = "2019-02-02" + +// AccountSASSignatureValues is used to generate a Shared Access Signature (SAS) for an Azure Storage account. +// For more information, see https://docs.microsoft.com/rest/api/storageservices/constructing-an-account-sas +type AccountSASSignatureValues struct { + Version string `param:"sv"` // If not specified, this defaults to SASVersion + Protocol SASProtocol `param:"spr"` // See the SASProtocol* constants + StartTime time.Time `param:"st"` // Not specified if IsZero + ExpiryTime time.Time `param:"se"` // Not specified if IsZero + Permissions string `param:"sp"` // Create by initializing a AccountSASPermissions and then call String() + IPRange IPRange `param:"sip"` + Services string `param:"ss"` // Create by initializing AccountSASServices and then call String() + ResourceTypes string `param:"srt"` // Create by initializing AccountSASResourceTypes and then call String() +} + +// NewSASQueryParameters uses an account's SharedKeyCredential to sign this signature values to produce +// the proper SAS query parameters. +func (v AccountSASSignatureValues) NewSASQueryParameters(sharedKeyCredential *SharedKeyCredential) (SASQueryParameters, error) { + // https://docs.microsoft.com/en-us/rest/api/storageservices/Constructing-an-Account-SAS + if v.ExpiryTime.IsZero() || v.Permissions == "" || v.ResourceTypes == "" || v.Services == "" { + return SASQueryParameters{}, errors.New("account SAS is missing at least one of these: ExpiryTime, Permissions, Service, or ResourceType") + } + if v.Version == "" { + v.Version = SASVersion + } + perms := &AccountSASPermissions{} + if err := perms.Parse(v.Permissions); err != nil { + return SASQueryParameters{}, err + } + v.Permissions = perms.String() + + startTime, expiryTime := FormatTimesForSASSigning(v.StartTime, v.ExpiryTime) + + stringToSign := strings.Join([]string{ + sharedKeyCredential.AccountName(), + v.Permissions, + v.Services, + v.ResourceTypes, + startTime, + expiryTime, + v.IPRange.String(), + string(v.Protocol), + v.Version, + ""}, // That right, the account SAS requires a terminating extra newline + "\n") + + signature, err := sharedKeyCredential.ComputeHMACSHA256(stringToSign) + if err != nil { + return SASQueryParameters{}, err + } + p := SASQueryParameters{ + // Common SAS parameters + version: v.Version, + protocol: v.Protocol, + startTime: v.StartTime, + expiryTime: v.ExpiryTime, + permissions: v.Permissions, + ipRange: v.IPRange, + + // Account-specific SAS parameters + services: v.Services, + resourceTypes: v.ResourceTypes, + + // Calculated SAS signature + signature: signature, + } + + return p, nil +} + +// The AccountSASPermissions type simplifies creating the permissions string for an Azure Storage Account SAS. +// Initialize an instance of this type and then call its String method to set AccountSASSignatureValues's Permissions field. +type AccountSASPermissions struct { + Read, Write, Delete, List, Add, Create, Update, Process bool +} + +// String produces the SAS permissions string for an Azure Storage account. +// Call this method to set AccountSASSignatureValues's Permissions field. +func (p AccountSASPermissions) String() string { + var buffer bytes.Buffer + if p.Read { + buffer.WriteRune('r') + } + if p.Write { + buffer.WriteRune('w') + } + if p.Delete { + buffer.WriteRune('d') + } + if p.List { + buffer.WriteRune('l') + } + if p.Add { + buffer.WriteRune('a') + } + if p.Create { + buffer.WriteRune('c') + } + if p.Update { + buffer.WriteRune('u') + } + if p.Process { + buffer.WriteRune('p') + } + return buffer.String() +} + +// Parse initializes the AccountSASPermissions's fields from a string. +func (p *AccountSASPermissions) Parse(s string) error { + *p = AccountSASPermissions{} // Clear out the flags + for _, r := range s { + switch r { + case 'r': + p.Read = true + case 'w': + p.Write = true + case 'd': + p.Delete = true + case 'l': + p.List = true + case 'a': + p.Add = true + case 'c': + p.Create = true + case 'u': + p.Update = true + case 'p': + p.Process = true + case 'x': + p.Process = true + default: + return fmt.Errorf("invalid permission character: '%v'", r) + } + } + return nil +} + +// The AccountSASResourceTypes type simplifies creating the resource types string for an Azure Storage Account SAS. +// Initialize an instance of this type and then call its String method to set AccountSASSignatureValues's ResourceTypes field. +type AccountSASResourceTypes struct { + Service, Container, Object bool +} + +// String produces the SAS resource types string for an Azure Storage account. +// Call this method to set AccountSASSignatureValues's ResourceTypes field. +func (rt AccountSASResourceTypes) String() string { + var buffer bytes.Buffer + if rt.Service { + buffer.WriteRune('s') + } + if rt.Container { + buffer.WriteRune('c') + } + if rt.Object { + buffer.WriteRune('o') + } + return buffer.String() +} + +// Parse initializes the AccountSASResourceType's fields from a string. +func (rt *AccountSASResourceTypes) Parse(s string) error { + *rt = AccountSASResourceTypes{} // Clear out the flags + for _, r := range s { + switch r { + case 's': + rt.Service = true + case 'c': + rt.Container = true + case 'o': + rt.Object = true + default: + return fmt.Errorf("invalid resource type: '%v'", r) + } + } + return nil +} diff --git a/sdk/tables/aztable/sas_query_params.go b/sdk/tables/aztable/sas_query_params.go new file mode 100644 index 000000000000..f313f74adfb7 --- /dev/null +++ b/sdk/tables/aztable/sas_query_params.go @@ -0,0 +1,299 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package aztable + +import ( + "errors" + "net" + "net/url" + "strings" + "time" +) + +// SASVersion indicates the SAS version. +type SASProtocol string + +const ( + // SASProtocolHTTPS can be specified for a SAS protocol + SASProtocolHTTPS SASProtocol = "https" + + // SASProtocolHTTPSandHTTP can be specified for a SAS protocol + SASProtocolHTTPSandHTTP SASProtocol = "https,http" +) + +const SnapshotTimeFormat = "2006-01-02T15:04:05.0000000Z07:00" + +// FormatTimesForSASSigning converts a time.Time to a snapshotTimeFormat string suitable for a +// SASField's StartTime or ExpiryTime fields. Returns "" if value.IsZero(). +func FormatTimesForSASSigning(startTime, expiryTime time.Time) (string, string) { + ss := "" + if !startTime.IsZero() { + ss = formatSASTimeWithDefaultFormat(&startTime) + } + se := "" + if !expiryTime.IsZero() { + se = formatSASTimeWithDefaultFormat(&expiryTime) + } + return ss, se +} + +// SASTimeFormat represents the format of a SAS start or expiry time. Use it when formatting/parsing a time.Time. +const SASTimeFormat = "2006-01-02T15:04:05Z" //"2017-07-27T00:00:00Z" // ISO 8601 +var SASTimeFormats = []string{"2006-01-02T15:04:05.0000000Z", SASTimeFormat, "2006-01-02T15:04Z", "2006-01-02"} // ISO 8601 formats, please refer to https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas for more details. + +// formatSASTimeWithDefaultFormat format time with ISO 8601 in "yyyy-MM-ddTHH:mm:ssZ". +func formatSASTimeWithDefaultFormat(t *time.Time) string { + return formatSASTime(t, SASTimeFormat) // By default, "yyyy-MM-ddTHH:mm:ssZ" is used +} + +// formatSASTime format time with given format, use ISO 8601 in "yyyy-MM-ddTHH:mm:ssZ" by default. +func formatSASTime(t *time.Time, format string) string { + if format != "" { + return t.Format(format) + } + return t.Format(SASTimeFormat) // By default, "yyyy-MM-ddTHH:mm:ssZ" is used +} + +// parseSASTimeString try to parse sas time string. +func parseSASTimeString(val string) (t time.Time, timeFormat string, err error) { + for _, sasTimeFormat := range SASTimeFormats { + t, err = time.Parse(sasTimeFormat, val) + if err == nil { + timeFormat = sasTimeFormat + break + } + } + + if err != nil { + err = errors.New("fail to parse time with IOS 8601 formats, please refer to https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas for more details") + } + + return +} + +// https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas + +// A SASQueryParameters object represents the components that make up an Azure Storage SAS' query parameters. +// You parse a map of query parameters into its fields by calling NewSASQueryParameters(). You add the components +// to a query parameter map by calling AddToValues(). +// NOTE: Changing any field requires computing a new SAS signature using a XxxSASSignatureValues type. +type SASQueryParameters struct { + // All members are immutable or values so copies of this struct are goroutine-safe. + version string `param:"sv"` + services string `param:"ss"` + resourceTypes string `param:"srt"` + protocol SASProtocol `param:"spr"` + startTime time.Time `param:"st"` + expiryTime time.Time `param:"se"` + ipRange IPRange `param:"sip"` + identifier string `param:"si"` + resource string `param:"sr"` + permissions string `param:"sp"` + signature string `param:"sig"` + signedVersion string `param:"skv"` + tableName string `param:"tn"` + startPk string `param:"spk"` + startRk string `param:"srk"` + endPk string `param:"epk"` + endRk string `param:"erk"` + + // private member used for startTime and expiryTime formatting. + stTimeFormat string + seTimeFormat string +} + +func (p *SASQueryParameters) SignedVersion() string { + return p.signedVersion +} + +func (p *SASQueryParameters) Version() string { + return p.version +} + +func (p *SASQueryParameters) Services() string { + return p.services +} +func (p *SASQueryParameters) ResourceTypes() string { + return p.resourceTypes +} +func (p *SASQueryParameters) Protocol() SASProtocol { + return p.protocol +} +func (p *SASQueryParameters) StartTime() time.Time { + return p.startTime +} +func (p *SASQueryParameters) ExpiryTime() time.Time { + return p.expiryTime +} + +func (p *SASQueryParameters) IPRange() IPRange { + return p.ipRange +} + +func (p *SASQueryParameters) Identifier() string { + return p.identifier +} + +func (p *SASQueryParameters) Resource() string { + return p.resource +} +func (p *SASQueryParameters) Permissions() string { + return p.permissions +} + +func (p *SASQueryParameters) Signature() string { + return p.signature +} + +func (p *SASQueryParameters) StartPartitionKey() string { + return p.startPk +} + +func (p *SASQueryParameters) StartRowKey() string { + return p.startRk +} + +func (p *SASQueryParameters) EndPartitionKey() string { + return p.endPk +} + +func (p *SASQueryParameters) EndRowKey() string { + return p.endRk +} + +// IPRange represents a SAS IP range's start IP and (optionally) end IP. +type IPRange struct { + Start net.IP // Not specified if length = 0 + End net.IP // Not specified if length = 0 +} + +// String returns a string representation of an IPRange. +func (ipr *IPRange) String() string { + if len(ipr.Start) == 0 { + return "" + } + start := ipr.Start.String() + if len(ipr.End) == 0 { + return start + } + return start + "-" + ipr.End.String() +} + +// NewSASQueryParameters creates and initializes a SASQueryParameters object based on the +// query parameter map's passed-in values. If deleteSASParametersFromValues is true, +// all SAS-related query parameters are removed from the passed-in map. If +// deleteSASParametersFromValues is false, the map passed-in map is unaltered. +func newSASQueryParameters(values url.Values, deleteSASParametersFromValues bool) SASQueryParameters { + p := SASQueryParameters{} + for k, v := range values { + val := v[0] + isSASKey := true + switch strings.ToLower(k) { + case "sv": + p.version = val + case "ss": + p.services = val + case "srt": + p.resourceTypes = val + case "spr": + p.protocol = SASProtocol(val) + case "st": + p.startTime, p.stTimeFormat, _ = parseSASTimeString(val) + case "se": + p.expiryTime, p.seTimeFormat, _ = parseSASTimeString(val) + case "sip": + dashIndex := strings.Index(val, "-") + if dashIndex == -1 { + p.ipRange.Start = net.ParseIP(val) + } else { + p.ipRange.Start = net.ParseIP(val[:dashIndex]) + p.ipRange.End = net.ParseIP(val[dashIndex+1:]) + } + case "si": + p.identifier = val + case "sr": + p.resource = val + case "sp": + p.permissions = val + case "sig": + p.signature = val + case "skv": + p.signedVersion = val + case "spk": + p.startPk = val + case "epk": + p.endPk = val + case "srk": + p.startRk = val + case "erk": + p.endRk = val + default: + isSASKey = false // We didn't recognize the query parameter + } + if isSASKey && deleteSASParametersFromValues { + delete(values, k) + } + } + return p +} + +// addToValues adds the SAS components to the specified query parameters map. +func (p *SASQueryParameters) addToValues(v url.Values) url.Values { + if p.version != "" { + v.Add("sv", p.version) + } + if p.services != "" { + v.Add("ss", p.services) + } + if p.resourceTypes != "" { + v.Add("srt", p.resourceTypes) + } + if p.protocol != "" { + v.Add("spr", string(p.protocol)) + } + if !p.startTime.IsZero() { + v.Add("st", formatSASTime(&(p.startTime), p.stTimeFormat)) + } + if !p.expiryTime.IsZero() { + v.Add("se", formatSASTime(&(p.expiryTime), p.seTimeFormat)) + } + if len(p.ipRange.Start) > 0 { + v.Add("sip", p.ipRange.String()) + } + if p.identifier != "" { + v.Add("si", p.identifier) + } + if p.resource != "" { + v.Add("sr", p.resource) + } + if p.permissions != "" { + v.Add("sp", p.permissions) + } + if p.signature != "" { + v.Add("sig", p.signature) + } + if p.tableName != "" { + v.Add("tn", p.tableName) + } + if p.startPk != "" { + v.Add("spk", p.startPk) + } + if p.endPk != "" { + v.Add("epk", p.endPk) + } + if p.startRk != "" { + v.Add("srk", p.startRk) + } + if p.endRk != "" { + v.Add("erk", p.endRk) + } + return v +} + +// Encode encodes the SAS query parameters into URL encoded form sorted by key. +func (p *SASQueryParameters) Encode() string { + v := url.Values{} + p.addToValues(v) + return v.Encode() +} diff --git a/sdk/tables/aztable/sas_service.go b/sdk/tables/aztable/sas_service.go new file mode 100644 index 000000000000..4d89de18a927 --- /dev/null +++ b/sdk/tables/aztable/sas_service.go @@ -0,0 +1,156 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package aztable + +import ( + "bytes" + "fmt" + "strings" + "time" +) + +// TableSASSignatureValues is used to generate a Shared Access Signature (SAS) for an Azure Table instance. +// For more information, see https://docs.microsoft.com/rest/api/storageservices/constructing-a-service-sas +type TableSASSignatureValues struct { + Version string // If not specified, this defaults to SASVersion + Protocol SASProtocol // See the SASProtocol* constants + StartTime time.Time // Not specified if IsZero + ExpiryTime time.Time // Not specified if IsZero + Permissions string // Create by initializing a ContainerSASPermissions or TableSASPermissions and then call String() + IPRange IPRange + Identifier string + TableName string + StartPartitionKey string + StartRowKey string + EndPartitionKey string + EndRowKey string +} + +// NewSASQueryParameters uses an account's SharedKeyCredential to sign this signature values to produce +// the proper SAS query parameters. +func (v TableSASSignatureValues) NewSASQueryParameters(credential *SharedKeyCredential) (SASQueryParameters, error) { + resource := "" + + if v.Version != "" { + //Make sure the permission characters are in the correct order + perms := &TableSASPermissions{} + if err := perms.Parse(v.Permissions); err != nil { + return SASQueryParameters{}, err + } + v.Permissions = perms.String() + } else if v.TableName == "" { + // Make sure the permission characters are in the correct order + perms := &TableSASPermissions{} + if err := perms.Parse(v.Permissions); err != nil { + return SASQueryParameters{}, err + } + v.Permissions = perms.String() + } else { + // Make sure the permission characters are in the correct order + perms := &TableSASPermissions{} + if err := perms.Parse(v.Permissions); err != nil { + return SASQueryParameters{}, err + } + v.Permissions = perms.String() + } + if v.Version == "" { + v.Version = SASVersion + } + startTime, expiryTime := FormatTimesForSASSigning(v.StartTime, v.ExpiryTime) + + signedIdentifier := v.Identifier + + lowerCaseTableName := strings.ToLower(v.TableName) + + p := SASQueryParameters{ + // Common SAS parameters + version: v.Version, + protocol: v.Protocol, + startTime: v.StartTime, + expiryTime: v.ExpiryTime, + permissions: v.Permissions, + ipRange: v.IPRange, + tableName: lowerCaseTableName, + + // Table SAS parameters + resource: resource, + identifier: v.Identifier, + } + + canonicalName := "/" + "table" + "/" + credential.AccountName() + "/" + lowerCaseTableName + + // String to sign: http://msdn.microsoft.com/en-us/library/azure/dn140255.aspx + stringToSign := strings.Join([]string{ + v.Permissions, + startTime, + expiryTime, + canonicalName, + signedIdentifier, + v.IPRange.String(), + string(v.Protocol), + v.Version, + v.StartPartitionKey, + v.StartRowKey, + v.EndPartitionKey, + v.EndRowKey, + }, + "\n", + ) + + signature, err := credential.ComputeHMACSHA256(stringToSign) + p.signature = signature + return p, err +} + +// The TableSASPermissions type simplifies creating the permissions string for an Azure Table. +// Initialize an instance of this type and then call its String method to set TableSASSignatureValues's Permissions field. +type TableSASPermissions struct { + Read bool + Add bool + Update bool + Delete bool + StartPartitionKey string + StartRowKey string + EndPartitionKey string + EndRowKey string +} + +// String produces the SAS permissions string for an Azure Storage blob. +// Call this method to set TableSASSignatureValues's Permissions field. +func (p TableSASPermissions) String() string { + var b bytes.Buffer + if p.Read { + b.WriteRune('r') + } + if p.Add { + b.WriteRune('a') + } + if p.Update { + b.WriteRune('u') + } + if p.Delete { + b.WriteRune('d') + } + return b.String() +} + +// Parse initializes the TableSASPermissions's fields from a string. +func (p *TableSASPermissions) Parse(s string) error { + *p = TableSASPermissions{} // Clear the flags + for _, r := range s { + switch r { + case 'r': + p.Read = true + case 'a': + p.Add = true + case 'u': + p.Update = true + case 'd': + p.Delete = true + default: + return fmt.Errorf("invalid permission: '%v'", r) + } + } + return nil +} diff --git a/sdk/tables/aztable/shared_access_signature_test.go b/sdk/tables/aztable/shared_access_signature_test.go new file mode 100644 index 000000000000..124af26e2aa3 --- /dev/null +++ b/sdk/tables/aztable/shared_access_signature_test.go @@ -0,0 +1,265 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package aztable + +import ( + "context" + "encoding/json" + "fmt" + "os" + "testing" + "time" + + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" + "github.com/stretchr/testify/require" +) + +func TestSASServiceClient(t *testing.T) { + recording.LiveOnly(t) + accountName := os.Getenv("TABLES_PRIMARY_ACCOUNT_NAME") + accountKey := os.Getenv("TABLES_PRIMARY_STORAGE_ACCOUNT_KEY") + cred, err := NewSharedKeyCredential(accountName, accountKey) + require.NoError(t, err) + + serviceClient, err := NewTableServiceClient(fmt.Sprintf("https://%s.table.core.windows.net/", accountName), cred, nil) + require.NoError(t, err) + + tableName, err := createRandomName(t, "tableName") + require.NoError(t, err) + + delete := func() { + _, err := serviceClient.DeleteTable(context.Background(), tableName, nil) + require.NoError(t, err) + } + defer delete() + + _, err = serviceClient.CreateTable(context.Background(), tableName) + require.NoError(t, err) + + resources := AccountSASResourceTypes{ + Object: true, + Service: true, + Container: true, + } + permissions := AccountSASPermissions{ + Read: true, + Add: true, + Write: true, + } + start := time.Date(2021, time.August, 4, 1, 1, 0, 0, time.UTC) + expiry := time.Date(2022, time.August, 4, 1, 1, 0, 0, time.UTC) + + accountSAS, err := serviceClient.GetAccountSASToken(resources, permissions, start, expiry) + require.NoError(t, err) + + queryParams := accountSAS.Encode() + + sasUrl := fmt.Sprintf("https://%s.table.core.windows.net/?%s", accountName, queryParams) + + err = recording.StartRecording(t, nil) + require.NoError(t, err) + client, err := createTableClientForRecording(t, tableName, sasUrl, azcore.AnonymousCredential()) + require.NoError(t, err) + defer recording.StopRecording(t, nil) + + entity := map[string]string{ + "PartitionKey": "pk001", + "RowKey": "rk001", + "Value": "5", + } + marshalled, err := json.Marshal(entity) + require.NoError(t, err) + + _, err = client.AddEntity(context.Background(), marshalled) + require.NoError(t, err) +} + +func TestSASTableClient(t *testing.T) { + recording.LiveOnly(t) + accountName := os.Getenv("TABLES_PRIMARY_ACCOUNT_NAME") + accountKey := os.Getenv("TABLES_PRIMARY_STORAGE_ACCOUNT_KEY") + cred, err := NewSharedKeyCredential(accountName, accountKey) + require.NoError(t, err) + + serviceClient, err := NewTableServiceClient(fmt.Sprintf("https://%s.table.core.windows.net/", accountName), cred, nil) + require.NoError(t, err) + + tableName, err := createRandomName(t, "tableName") + require.NoError(t, err) + tableName = "tablename" + + delete := func() { + _, err := serviceClient.DeleteTable(context.Background(), tableName, nil) + require.NoError(t, err) + } + defer delete() + + _, err = serviceClient.CreateTable(context.Background(), tableName) + require.NoError(t, err) + + permissions := TableSASPermissions{ + Read: true, + Add: true, + } + start := time.Date(2021, time.August, 4, 1, 1, 0, 0, time.UTC) + expiry := time.Date(2022, time.August, 4, 1, 1, 0, 0, time.UTC) + + accountSAS, err := serviceClient.GetTableSASToken(tableName, permissions, start, expiry) + require.NoError(t, err) + + queryParams := accountSAS.Encode() + + sasUrl := fmt.Sprintf("https://%s.table.core.windows.net/?%s", accountName, queryParams) + + err = recording.StartRecording(t, nil) + require.NoError(t, err) + client, err := createTableClientForRecording(t, tableName, sasUrl, azcore.AnonymousCredential()) + require.NoError(t, err) + defer recording.StopRecording(t, nil) + + entity := map[string]string{ + "PartitionKey": "pk001", + "RowKey": "rk001", + "Value": "5", + } + marshalled, err := json.Marshal(entity) + require.NoError(t, err) + + _, err = client.AddEntity(context.Background(), marshalled) + require.NoError(t, err) +} + +func TestSASTableClientReadOnly(t *testing.T) { + recording.LiveOnly(t) + accountName := os.Getenv("TABLES_PRIMARY_ACCOUNT_NAME") + accountKey := os.Getenv("TABLES_PRIMARY_STORAGE_ACCOUNT_KEY") + cred, err := NewSharedKeyCredential(accountName, accountKey) + require.NoError(t, err) + + serviceClient, err := NewTableServiceClient(fmt.Sprintf("https://%s.table.core.windows.net/", accountName), cred, nil) + require.NoError(t, err) + + tableName, err := createRandomName(t, "tableName") + require.NoError(t, err) + + delete := func() { + _, err := serviceClient.DeleteTable(context.Background(), tableName, nil) + require.NoError(t, err) + } + defer delete() + + _, err = serviceClient.CreateTable(context.Background(), tableName) + require.NoError(t, err) + + client := serviceClient.NewTableClient(tableName) + err = insertNEntities("pk001", 4, client) + require.NoError(t, err) + + permissions := TableSASPermissions{ + Read: true, + } + start := time.Date(2021, time.August, 4, 1, 1, 0, 0, time.UTC) + expiry := time.Date(2022, time.August, 4, 1, 1, 0, 0, time.UTC) + + accountSAS, err := serviceClient.GetTableSASToken(tableName, permissions, start, expiry) + require.NoError(t, err) + + queryParams := accountSAS.Encode() + + sasUrl := fmt.Sprintf("https://%s.table.core.windows.net/?%s", accountName, queryParams) + + err = recording.StartRecording(t, nil) + require.NoError(t, err) + client, err = createTableClientForRecording(t, tableName, sasUrl, azcore.AnonymousCredential()) + require.NoError(t, err) + defer recording.StopRecording(t, nil) + + entity := map[string]string{ + "PartitionKey": "pk001", + "RowKey": "rk001", + "Value": "5", + } + marshalled, err := json.Marshal(entity) + require.NoError(t, err) + + // Failure on a read + _, err = client.AddEntity(context.Background(), marshalled) + require.Error(t, err) + + // Success on a list + pager := client.List(nil) + count := 0 + for pager.NextPage(context.Background()) { + count += len(pager.PageResponse().TableEntityQueryResponse.Value) + } + + require.Equal(t, 4, count) +} + +func TestSASCosmosTableClientReadOnly(t *testing.T) { + recording.LiveOnly(t) + accountName := os.Getenv("TABLES_COSMOS_ACCOUNT_NAME") + accountKey := os.Getenv("TABLES_PRIMARY_COSMOS_ACCOUNT_KEY") + cred, err := NewSharedKeyCredential(accountName, accountKey) + require.NoError(t, err) + + serviceClient, err := NewTableServiceClient(fmt.Sprintf("https://%s.table.cosmos.azure.com/", accountName), cred, nil) + require.NoError(t, err) + + tableName, err := createRandomName(t, "tableName") + require.NoError(t, err) + + delete := func() { + _, err := serviceClient.DeleteTable(context.Background(), tableName, nil) + require.NoError(t, err) + } + defer delete() + + _, err = serviceClient.CreateTable(context.Background(), tableName) + require.NoError(t, err) + + client := serviceClient.NewTableClient(tableName) + err = insertNEntities("pk001", 4, client) + require.NoError(t, err) + + permissions := TableSASPermissions{ + Read: true, + } + start := time.Date(2021, time.August, 4, 1, 1, 0, 0, time.UTC) + expiry := time.Date(2022, time.August, 4, 1, 1, 0, 0, time.UTC) + accountSAS, err := serviceClient.GetTableSASToken(tableName, permissions, start, expiry) + require.NoError(t, err) + + queryParams := accountSAS.Encode() + + sasUrl := fmt.Sprintf("https://%s.table.cosmos.azure.com/?%s", accountName, queryParams) + + err = recording.StartRecording(t, nil) + require.NoError(t, err) + client, err = createTableClientForRecording(t, tableName, sasUrl, azcore.AnonymousCredential()) + require.NoError(t, err) + defer recording.StopRecording(t, nil) + + entity := map[string]string{ + "PartitionKey": "pk001", + "RowKey": "rk001", + "Value": "5", + } + marshalled, err := json.Marshal(entity) + require.NoError(t, err) + + // Failure on a read + _, err = client.AddEntity(context.Background(), marshalled) + require.Error(t, err) + + // Success on a list + pager := client.List(nil) + count := 0 + for pager.NextPage(context.Background()) { + count += len(pager.PageResponse().TableEntityQueryResponse.Value) + } + + require.Equal(t, 4, count) +} diff --git a/sdk/tables/aztable/table_batch_test.go b/sdk/tables/aztable/table_batch_test.go index 6336ee4bfebc..7a7fbde8a65e 100644 --- a/sdk/tables/aztable/table_batch_test.go +++ b/sdk/tables/aztable/table_batch_test.go @@ -76,7 +76,7 @@ func TestBatchMixed(t *testing.T) { require.Equal(t, http.StatusNoContent, r.StatusCode) } - var qResp TableEntityQueryByteResponseResponse + var qResp TableEntityListByteResponseResponse filter := "RowKey eq '1'" list := &ListOptions{Filter: &filter} pager := client.List(list) @@ -108,7 +108,7 @@ func TestBatchMixed(t *testing.T) { require.NoError(t, err) batch[1] = TableTransactionAction{ActionType: Delete, Entity: marshalledSecondEntity} - // create an upsert action to replace the third added entity with a new value + // create an insert action to replace the third added entity with a new value replaceProp := "ReplaceProperty" var replaceProperties = map[string]interface{}{ partitionKey: (*entitiesToCreate)[2].PartitionKey, @@ -117,7 +117,7 @@ func TestBatchMixed(t *testing.T) { } marshalledThirdEntity, err := json.Marshal(replaceProperties) require.NoError(t, err) - batch[2] = TableTransactionAction{ActionType: UpsertReplace, Entity: marshalledThirdEntity} + batch[2] = TableTransactionAction{ActionType: InsertReplace, Entity: marshalledThirdEntity} // Add the remaining 2 entities. marshalled4thEntity, err := json.Marshal((*entitiesToCreate)[3]) @@ -255,14 +255,14 @@ func TestBatchComplex(t *testing.T) { marshalled1, err = json.Marshal(edmEntity) require.NoError(t, err) batch2[0] = TableTransactionAction{ - ActionType: UpsertMerge, + ActionType: InsertMerge, Entity: marshalled1, } marshalled2, err = json.Marshal(edmEntity2) require.NoError(t, err) batch2[1] = TableTransactionAction{ - ActionType: UpsertReplace, + ActionType: InsertReplace, Entity: marshalled2, } diff --git a/sdk/tables/aztable/table_client.go b/sdk/tables/aztable/table_client.go index 4c40b7df4f91..144e4ab1ea5e 100644 --- a/sdk/tables/aztable/table_client.go +++ b/sdk/tables/aztable/table_client.go @@ -6,7 +6,6 @@ package aztable import ( "context" "encoding/json" - "errors" "github.com/Azure/azure-sdk-for-go/sdk/azcore" ) @@ -19,6 +18,8 @@ type TableClient struct { Name string } +// EntityUpdateMode specifies what type of update to do on InsertEntity or UpdateEntity. ReplaceEntity +// will replace an existing entity, MergeEntity will merge properties of the entities. type EntityUpdateMode string const ( @@ -56,17 +57,19 @@ func (t *TableClient) Delete(ctx context.Context, options *TableDeleteOptions) ( // // List returns a Pager, which allows iteration through each page of results. Example: // -// options := &ListOptions{Filter: to.StringPtr("PartitionKey eq 'pk001'"), Top: to.Int32Ptr(25), Select: to.StringPtr("PartitionKey,RowKey,Value,Price")} -// pager := client.List(options) // Pass in 'nil' if you want to return all Entities for an account. -// for pager.NextPage(ctx) { -// resp = pager.PageResponse() -// fmt.Printf("The page contains %i results.\n", len(resp.TableEntityQueryResponse.Value)) -// } -// err := pager.Err() -func (t *TableClient) List(queryOptions *ListOptions) TableEntityQueryResponsePager { +// +// options := &ListOptions{Filter: to.StringPtr("PartitionKey eq 'pk001'"), Top: to.Int32Ptr(25), Select: to.StringPtr("PartitionKey,RowKey,Value,Price")} +// pager := client.List(options) // Pass in 'nil' if you want to return all Entities for an account. +// for pager.NextPage(ctx) { +// resp = pager.PageResponse() +// fmt.Printf("The page contains %i results.\n", len(resp.TableEntityQueryResponse.Value)) +// } +// err := pager.Err() +// handle(err) +func (t *TableClient) List(listOptions *ListOptions) TableEntityListResponsePager { return &tableEntityQueryResponsePager{ tableClient: t, - queryOptions: queryOptions, + queryOptions: listOptions, tableQueryOptions: &TableQueryEntitiesOptions{}} } @@ -138,7 +141,7 @@ func (t *TableClient) UpdateEntity(ctx context.Context, entity []byte, etag *str case ReplaceEntity: return t.client.UpdateEntity(ctx, t.Name, partKey, rowkey, &TableUpdateEntityOptions{IfMatch: &ifMatch, TableEntityProperties: mapEntity}, &QueryOptions{}) } - return nil, errors.New("Invalid EntityUpdateMode") + return nil, errInvalidUpdateMode } // InsertEntity inserts an entity if it does not already exist in the table. If the entity does exist, the entity is @@ -164,7 +167,7 @@ func (t *TableClient) InsertEntity(ctx context.Context, entity []byte, updateMod case ReplaceEntity: return t.client.UpdateEntity(ctx, t.Name, partKey, rowkey, &TableUpdateEntityOptions{TableEntityProperties: mapEntity}, &QueryOptions{}) } - return nil, errors.New("Invalid EntityUpdateMode") + return nil, errInvalidUpdateMode } // GetAccessPolicy retrieves details about any stored access policies specified on the table that may be used with the Shared Access Signature @@ -175,7 +178,7 @@ func (t *TableClient) GetAccessPolicy(ctx context.Context) (SignedIdentifierArra // SetAccessPolicy sets stored access policies for the table that may be used with SharedAccessSignature func (t *TableClient) SetAccessPolicy(ctx context.Context, options *TableSetAccessPolicyOptions) (TableSetAccessPolicyResponse, error) { response, err := t.client.SetAccessPolicy(ctx, t.Name, options) - if len(*&options.TableACL) > 5 { + if len(options.TableACL) > 5 { err = tooManyAccessPoliciesError } return response, err diff --git a/sdk/tables/aztable/table_client_test.go b/sdk/tables/aztable/table_client_test.go index 7ddf6715149a..1de071b483a3 100644 --- a/sdk/tables/aztable/table_client_test.go +++ b/sdk/tables/aztable/table_client_test.go @@ -137,7 +137,7 @@ func TestMergeEntity(t *testing.T) { _, updateErr := client.UpdateEntity(ctx, reMarshalled, nil, MergeEntity) require.Nil(updateErr) - var qResp TableEntityQueryByteResponseResponse + var qResp TableEntityListByteResponseResponse pager := client.List(listOptions) for pager.NextPage(ctx) { qResp = pager.PageResponse() @@ -156,7 +156,7 @@ func TestMergeEntity(t *testing.T) { } } -func TestUpsertEntity(t *testing.T) { +func TestInsertEntity(t *testing.T) { for _, service := range services { t.Run(fmt.Sprintf("%v_%v", t.Name(), service), func(t *testing.T) { client, delete := initClientTest(t, service, true) @@ -193,7 +193,7 @@ func TestUpsertEntity(t *testing.T) { require.Nil(err) // 5. Query for new entity - var qResp TableEntityQueryByteResponseResponse + var qResp TableEntityListByteResponseResponse pager := client.List(list) for pager.NextPage(ctx) { qResp = pager.PageResponse() @@ -232,7 +232,7 @@ func TestQuerySimpleEntity(t *testing.T) { list := &ListOptions{Filter: &filter} expectedCount := 4 - var resp TableEntityQueryByteResponseResponse + var resp TableEntityListByteResponseResponse pager := client.List(list) for pager.NextPage(ctx) { resp = pager.PageResponse() @@ -285,7 +285,7 @@ func TestQueryComplexEntity(t *testing.T) { expectedCount := 4 options := &ListOptions{Filter: &filter} - var resp TableEntityQueryByteResponseResponse + var resp TableEntityListByteResponseResponse pager := client.List(options) for pager.NextPage(ctx) { resp = pager.PageResponse() diff --git a/sdk/tables/aztable/table_pagers.go b/sdk/tables/aztable/table_pagers.go index 4b8b61613265..fb1aa9dffdbc 100644 --- a/sdk/tables/aztable/table_pagers.go +++ b/sdk/tables/aztable/table_pagers.go @@ -9,7 +9,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" ) -// TableEntityQueryResponsePager is a Pager for Table entity query results. +// TableEntityListResponsePager is a Pager for Table entity query results. // // NextPage should be called first. It fetches the next available page of results from the service. // If the fetched page contains results, the return value is true, else false. @@ -24,16 +24,16 @@ import ( // fmt.Printf("The page contains %i results.\n", len(resp.TableEntityQueryResponse.Value)) // } // err := pager.Err() -type TableEntityQueryResponsePager interface { +type TableEntityListResponsePager interface { azcore.Pager // PageResponse returns the current TableQueryResponseResponse. - PageResponse() TableEntityQueryByteResponseResponse + PageResponse() TableEntityListByteResponseResponse } type tableEntityQueryResponsePager struct { tableClient *TableClient - current *TableEntityQueryByteResponseResponse + current *TableEntityListByteResponseResponse tableQueryOptions *TableQueryEntitiesOptions queryOptions *ListOptions err error @@ -68,7 +68,7 @@ func (p *tableEntityQueryResponsePager) NextPage(ctx context.Context) bool { // fmt.Printf("The page contains %i results.\n", len(resp.TableEntityQueryResponse.Value)) // } // err := pager.Err() -func (p *tableEntityQueryResponsePager) PageResponse() TableEntityQueryByteResponseResponse { +func (p *tableEntityQueryResponsePager) PageResponse() TableEntityListByteResponseResponse { return *p.current } @@ -77,7 +77,7 @@ func (p *tableEntityQueryResponsePager) Err() error { return p.err } -// TableQueryResponsePager is a Pager for Table Queries +// TableListResponsePager is a Pager for Table Queries // // NextPage should be called first. It fetches the next available page of results from the service. // If the fetched page contains results, the return value is true, else false. @@ -92,16 +92,16 @@ func (p *tableEntityQueryResponsePager) Err() error { // fmt.Printf("The page contains %i results.\n", len(resp.TableEntityQueryResponse.Value)) // } // err := pager.Err() -type TableQueryResponsePager interface { +type TableListResponsePager interface { azcore.Pager // PageResponse returns the current TableQueryResponseResponse. - PageResponse() TableQueryResponseResponse + PageResponse() TableListResponseResponse } type tableQueryResponsePager struct { client *tableClient - current *TableQueryResponseResponse + current *TableListResponseResponse tableQueryOptions *TableQueryOptions queryOptions *ListOptions err error @@ -116,7 +116,7 @@ func (p *tableQueryResponsePager) NextPage(ctx context.Context) bool { } var resp TableQueryResponseResponse resp, p.err = p.client.Query(ctx, p.tableQueryOptions, p.queryOptions.toQueryOptions()) - p.current = &resp + p.current = listResponseFromQueryResponse(resp) p.tableQueryOptions.NextTableName = resp.XMSContinuationNextTableName return p.err == nil && resp.TableQueryResponse.Value != nil && len(resp.TableQueryResponse.Value) > 0 } @@ -128,7 +128,7 @@ func (p *tableQueryResponsePager) NextPage(ctx context.Context) bool { // resp = pager.PageResponse() // fmt.Printf("The page contains %i results.\n", len(resp.TableEntityQueryResponse.Value)) // } -func (p *tableQueryResponsePager) PageResponse() TableQueryResponseResponse { +func (p *tableQueryResponsePager) PageResponse() TableListResponseResponse { return *p.current } diff --git a/sdk/tables/aztable/table_service_client.go b/sdk/tables/aztable/table_service_client.go index 1f67b9f5c1fa..7f25d84229cb 100644 --- a/sdk/tables/aztable/table_service_client.go +++ b/sdk/tables/aztable/table_service_client.go @@ -6,6 +6,7 @@ package aztable import ( "context" "strings" + "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore" ) @@ -29,12 +30,10 @@ func NewTableServiceClient(serviceURL string, cred azcore.Credential, options *T } conOptions := options.getConnectionOptions() if isCosmosEndpoint(serviceURL) { - conOptions.PerCallPolicies = []azcore.Policy{CosmosPatchTransformPolicy{}} + conOptions.PerCallPolicies = []azcore.Policy{cosmosPatchTransformPolicy{}} } conOptions.PerCallPolicies = append(conOptions.PerCallPolicies, cred.AuthenticationPolicy(azcore.AuthenticationPolicyOptions{Options: azcore.TokenRequestOptions{Scopes: options.Scopes}})) - for _, p := range options.PerCallOptions { - conOptions.PerCallPolicies = append(conOptions.PerCallPolicies, p) - } + conOptions.PerCallPolicies = append(conOptions.PerCallPolicies, options.PerCallOptions...) con := newConnection(serviceURL, conOptions) return &TableServiceClient{client: &tableClient{con}, service: &serviceClient{con}, cred: cred}, nil } @@ -80,7 +79,7 @@ func (t *TableServiceClient) DeleteTable(ctx context.Context, name string, optio // fmt.Printf("The page contains %i results.\n", len(resp.TableQueryResponse.Value)) // } // err := pager.Err() -func (t *TableServiceClient) ListTables(listOptions *ListOptions) TableQueryResponsePager { +func (t *TableServiceClient) ListTables(listOptions *ListOptions) TableListResponsePager { return &tableQueryResponsePager{ client: t.client, queryOptions: listOptions, @@ -147,6 +146,48 @@ func (t *TableServiceClient) SetProperties(ctx context.Context, properties Table return t.service.SetProperties(ctx, properties, options) } +func (s TableServiceClient) CanGetAccountSASToken() bool { + return s.cred != nil +} + +// GetAccountSASToken is a convenience method for generating a SAS token for the currently pointed at account. +// It can only be used if the supplied azcore.Credential during creation was a SharedKeyCredential. +// This validity can be checked with CanGetAccountSASToken(). +func (t TableServiceClient) GetAccountSASToken(resources AccountSASResourceTypes, permissions AccountSASPermissions, start time.Time, expiry time.Time) (SASQueryParameters, error) { + return AccountSASSignatureValues{ + Version: SASVersion, + Protocol: SASProtocolHTTPS, + Permissions: permissions.String(), + Services: "t", + ResourceTypes: resources.String(), + StartTime: start.UTC(), + ExpiryTime: expiry.UTC(), + }.NewSASQueryParameters(t.cred.(*SharedKeyCredential)) +} + +// GetTableSASToken is a convenience method for generating a SAS token for a specific table. +// It can only be used if the supplied azcore.Credential during creation was a SharedKeyCredential. +// This validity can be checked with CanGetAccountSASToken(). +func (t TableServiceClient) GetTableSASToken(tableName string, permissions TableSASPermissions, start time.Time, expiry time.Time) (SASQueryParameters, error) { + return TableSASSignatureValues{ + TableName: tableName, + Permissions: permissions.String(), + StartTime: start, + ExpiryTime: expiry, + StartPartitionKey: permissions.StartPartitionKey, + StartRowKey: permissions.StartRowKey, + EndPartitionKey: permissions.EndPartitionKey, + EndRowKey: permissions.EndRowKey, + }.NewSASQueryParameters(t.cred.(*SharedKeyCredential)) +} + +// CanGetSASToken returns true if the TableServiceClient was created with a SharedKeyCredential. +// This method can be used to determine if a TableServiceClient is capable of creating a Table SAS or Account SAS +func (t TableServiceClient) CanGetSASToken() bool { + _, ok := t.cred.(*SharedKeyCredential) + return ok +} + func isCosmosEndpoint(url string) bool { isCosmosEmulator := strings.Contains(url, "localhost") && strings.Contains(url, "8902") return isCosmosEmulator || strings.Contains(url, CosmosTableDomain) || strings.Contains(url, LegacyCosmosTableDomain) diff --git a/sdk/tables/aztable/table_service_client_test.go b/sdk/tables/aztable/table_service_client_test.go index 8fc0e16a587c..b6d0c2d435ce 100644 --- a/sdk/tables/aztable/table_service_client_test.go +++ b/sdk/tables/aztable/table_service_client_test.go @@ -94,7 +94,7 @@ func TestQueryTable(t *testing.T) { resultCount := 0 for pager.NextPage(ctx) { resp := pager.PageResponse() - resultCount += len(resp.TableQueryResponse.Value) + resultCount += len(resp.TableListResponse.Value) } require.NoError(t, pager.Err()) @@ -108,7 +108,7 @@ func TestQueryTable(t *testing.T) { pageCount := 0 for pager.NextPage(ctx) { resp := pager.PageResponse() - resultCount += len(resp.TableQueryResponse.Value) + resultCount += len(resp.TableListResponse.Value) pageCount++ } @@ -140,7 +140,7 @@ func TestListTables(t *testing.T) { pager := service.ListTables(nil) for pager.NextPage(ctx) { resp := pager.PageResponse() - count += len(resp.TableQueryResponse.Value) + count += len(resp.TableListResponse.Value) } require.NoError(t, pager.Err()) @@ -167,7 +167,6 @@ func TestGetStatistics(t *testing.T) { require.NoError(t, err) accountName := recording.GetEnvVariable(t, "TABLES_STORAGE_ACCOUNT_NAME", "fakestorageaccount") serviceURL := storageURI(accountName+"-secondary", "core.windows.net") - fmt.Println(serviceURL) service, err := createTableServiceClientForRecording(t, serviceURL, cred) require.NoError(t, err) diff --git a/sdk/tables/aztable/table_transactional_batch.go b/sdk/tables/aztable/table_transactional_batch.go index 6289483df207..d4e7b6ff5d11 100644 --- a/sdk/tables/aztable/table_transactional_batch.go +++ b/sdk/tables/aztable/table_transactional_batch.go @@ -31,8 +31,8 @@ const ( UpdateMerge TableTransactionActionType = "updatemerge" UpdateReplace TableTransactionActionType = "updatereplace" Delete TableTransactionActionType = "delete" - UpsertMerge TableTransactionActionType = "upsertmerge" - UpsertReplace TableTransactionActionType = "upsertreplace" + InsertMerge TableTransactionActionType = "insertmerge" + InsertReplace TableTransactionActionType = "insertreplace" ) const ( @@ -324,7 +324,7 @@ func (t *TableClient) generateEntitySubset(transactionAction *TableTransactionAc } case UpdateMerge: fallthrough - case UpsertMerge: + case InsertMerge: opts := &TableMergeEntityOptions{TableEntityProperties: entity} if len(transactionAction.ETag) > 0 { opts.IfMatch = &transactionAction.ETag @@ -338,7 +338,7 @@ func (t *TableClient) generateEntitySubset(transactionAction *TableTransactionAc } case UpdateReplace: fallthrough - case UpsertReplace: + case InsertReplace: req, err = t.client.updateEntityCreateRequest(ctx, t.Name, entity[partitionKey].(string), entity[rowKey].(string), &TableUpdateEntityOptions{TableEntityProperties: entity, IfMatch: &transactionAction.ETag}, qo) if err != nil { return err diff --git a/sdk/tables/aztable/zc_table_constants.go b/sdk/tables/aztable/zc_table_constants.go index d7d04897ecde..476cd2ba81e0 100644 --- a/sdk/tables/aztable/zc_table_constants.go +++ b/sdk/tables/aztable/zc_table_constants.go @@ -5,7 +5,6 @@ package aztable import "errors" -//nolint const ( timestamp = "Timestamp" partitionKey = "PartitionKey" diff --git a/sdk/tables/aztable/zt_table_recorded_tests.go b/sdk/tables/aztable/zt_table_recorded_tests.go index 259cdea96307..c6ea9f6a4c10 100644 --- a/sdk/tables/aztable/zt_table_recorded_tests.go +++ b/sdk/tables/aztable/zt_table_recorded_tests.go @@ -35,8 +35,8 @@ const ( type EndpointType string const ( - StorageEndpoint EndpointType = "storage" - CosmosEndpoint EndpointType = "cosmos" + storageEndpoint EndpointType = "storage" + cosmosEndpoint EndpointType = "cosmos" ) var ctx = context.Background() @@ -74,7 +74,7 @@ func cleanupTables(context *testContext, tables *[]string) { if tables == nil { pager := c.ListTables(nil) for pager.NextPage(ctx) { - for _, t := range pager.PageResponse().TableQueryResponse.Value { + for _, t := range pager.PageResponse().TableListResponse.Value { _, err := c.DeleteTable(ctx, *t.TableName, nil) if err != nil { fmt.Printf("Error cleaning up tables. %v\n", err.Error()) From ecb0e727e4cf4ee408ffe262639a122964405986 Mon Sep 17 00:00:00 2001 From: Sean Kane <68240067+seankane-msft@users.noreply.github.com> Date: Wed, 18 Aug 2021 13:45:08 -0400 Subject: [PATCH 35/42] fixing internal (#15315) --- sdk/internal/recording/recording.go | 306 ++---------------- sdk/internal/recording/recording_test.go | 7 +- sdk/internal/recording/request_matcher.go | 66 ++-- .../recording/request_matcher_test.go | 30 +- sdk/internal/recording/sanitizer.go | 14 +- sdk/internal/recording/sanitizer_test.go | 6 +- 6 files changed, 89 insertions(+), 340 deletions(-) diff --git a/sdk/internal/recording/recording.go b/sdk/internal/recording/recording.go index b947f37ec040..26d34cd57a07 100644 --- a/sdk/internal/recording/recording.go +++ b/sdk/internal/recording/recording.go @@ -7,10 +7,6 @@ package recording import ( - "bytes" - "crypto/tls" - "crypto/x509" - "encoding/json" "errors" "fmt" "io/ioutil" @@ -20,7 +16,6 @@ import ( "path/filepath" "strconv" "strings" - "testing" "time" "github.com/Azure/azure-sdk-for-go/sdk/internal/uuid" @@ -40,6 +35,7 @@ type Recording struct { src rand.Source now *time.Time Sanitizer *Sanitizer + Matcher *RequestMatcher c TestContext } @@ -69,8 +65,11 @@ const ( type VariableType string const ( - Default VariableType = "default" - Secret_String VariableType = "secret_string" + // NoSanitization indicates that the recorded value should not be sanitized. + NoSanitization VariableType = "default" + // Secret_String indicates that the recorded value should be replaced with a sanitized value. + Secret_String VariableType = "secret_string" + // Secret_Base64String indicates that the recorded value should be replaced with a sanitized valid base-64 string value. Secret_Base64String VariableType = "secret_base64String" ) @@ -107,17 +106,18 @@ func NewRecording(c TestContext, mode RecordMode) (*Recording, error) { } // set the recorder Matcher + recording.Matcher = defaultMatcher(c) rec.SetMatcher(recording.matchRequest) // wire up the sanitizer - recording.Sanitizer = DefaultSanitizer(rec) + recording.Sanitizer = defaultSanitizer(rec) return recording, err } -// GetRecordedVariable returns a recorded variable. If the variable is not found we return an error -// variableType determines how the recorded variable will be saved. Default indicates that the value should be saved without any sanitation. -func (r *Recording) GetRecordedVariable(name string, variableType VariableType) (string, error) { +// GetEnvVar returns a recorded environment variable. If the variable is not found we return an error. +// variableType determines how the recorded variable will be saved. +func (r *Recording) GetEnvVar(name string, variableType VariableType) (string, error) { var err error result, ok := r.previousSessionVariables[name] if !ok || r.Mode == Live { @@ -132,9 +132,10 @@ func (r *Recording) GetRecordedVariable(name string, variableType VariableType) return *result, err } -// GetOptionalRecordedVariable returns a recorded variable with a fallback default value -// variableType determines how the recorded variable will be saved. Default indicates that the value should be saved without any sanitation. -func (r *Recording) GetOptionalRecordedVariable(name string, defaultValue string, variableType VariableType) string { +// GetOptionalEnvVar returns a recorded environment variable with a fallback default value. +// default Value configures the fallback value to be returned if the environment variable is not set. +// variableType determines how the recorded variable will be saved. +func (r *Recording) GetOptionalEnvVar(name string, defaultValue string, variableType VariableType) string { result, ok := r.previousSessionVariables[name] if !ok || r.Mode == Live { result = getOptionalEnv(name, defaultValue) @@ -280,10 +281,10 @@ func getOptionalEnv(name string, defaultValue string) *string { } func (r *Recording) matchRequest(req *http.Request, rec cassette.Request) bool { - isMatch := compareMethods(req, rec, r.c) && - compareURLs(req, rec, r.c) && - compareHeaders(req, rec, r.c) && - compareBodies(req, rec, r.c) + isMatch := r.Matcher.compareMethods(req, rec.Method) && + r.Matcher.compareURLs(req, rec.URL) && + r.Matcher.compareHeaders(req, rec) && + r.Matcher.compareBodies(req, rec.Body) return isMatch } @@ -432,272 +433,3 @@ var modeMap = map[RecordMode]recorder.Mode{ Live: recorder.ModeDisabled, Playback: recorder.ModeReplaying, } - -var recordMode, _ = os.LookupEnv("AZURE_RECORD_MODE") -var ModeRecording = "record" -var ModePlayback = "playback" - -var baseProxyURLSecure = "localhost:5001" -var baseProxyURL = "localhost:5000" -var startURL = baseProxyURLSecure + "/record/start" -var stopURL = baseProxyURLSecure + "/record/stop" - -var recordingId string -var IdHeader = "x-recording-id" -var ModeHeader = "x-recording-mode" -var UpstreamUriHeader = "x-recording-upstream-base-uri" - -var tr = &http.Transport{ - TLSClientConfig: &tls.Config{InsecureSkipVerify: true}, -} -var client = http.Client{ - Transport: tr, -} - -type RecordingOptions struct { - MaxRetries int32 - UseHTTPS bool - Host string - Scheme string -} - -func defaultOptions() *RecordingOptions { - return &RecordingOptions{ - MaxRetries: 0, - UseHTTPS: true, - Host: "localhost:5001", - Scheme: "https", - } -} - -func (r RecordingOptions) HostScheme() string { - if r.UseHTTPS { - return "https://localhost:5001" - } - return "http://localhost:5000" -} - -func getTestId(t *testing.T) string { - cwd, err := os.Getwd() - if err != nil { - t.Errorf("Could not find current working directory") - } - cwd = "./recordings/" + t.Name() + ".json" - return cwd -} - -func StartRecording(t *testing.T, options *RecordingOptions) error { - if options == nil { - options = defaultOptions() - } - if recordMode == "" { - t.Log("AZURE_RECORD_MODE was not set, options are \"record\" or \"playback\". \nDefaulting to playback") - recordMode = "playback" - } else { - t.Log("AZURE_RECORD_MODE: ", recordMode) - } - testId := getTestId(t) - - url := fmt.Sprintf("%v/%v/start", options.HostScheme(), recordMode) - - req, err := http.NewRequest("POST", url, nil) - if err != nil { - return err - } - - req.Header.Set("x-recording-file", testId) - - resp, err := client.Do(req) - if err != nil { - return err - } - recordingId = resp.Header.Get(IdHeader) - return nil -} - -func StopRecording(t *testing.T, options *RecordingOptions) error { - if options == nil { - options = defaultOptions() - } - - url := fmt.Sprintf("%v/%v/stop", options.HostScheme(), recordMode) - req, err := http.NewRequest("POST", url, nil) - if err != nil { - return err - } - if recordingId == "" { - return errors.New("Recording ID was never set. Did you call StartRecording?") - } - req.Header.Set("x-recording-id", recordingId) - _, err = client.Do(req) - if err != nil { - t.Errorf(err.Error()) - } - return nil -} - -func AddUriSanitizer(replacement, regex string, options *RecordingOptions) error { - if options == nil { - options = defaultOptions() - } - url := fmt.Sprintf("%v/Admin/AddSanitizer", options.HostScheme()) - req, err := http.NewRequest("POST", url, nil) - if err != nil { - return err - } - req.Header.Set("x-abstraction-identifier", "UriRegexSanitizer") - bodyContent := map[string]string{ - "value": replacement, - "regex": regex, - } - marshalled, err := json.Marshal(bodyContent) - if err != nil { - return err - } - req.Body = ioutil.NopCloser(bytes.NewReader(marshalled)) - req.ContentLength = int64(len(marshalled)) - _, err = client.Do(req) - return err -} - -func (o *RecordingOptions) Init() { - if o.MaxRetries != 0 { - o.MaxRetries = 0 - } - if o.UseHTTPS { - o.Host = baseProxyURLSecure - o.Scheme = "https" - } else { - o.Host = baseProxyURL - o.Scheme = "http" - } -} - -// type recordingPolicy struct { -// options RecordingOptions -// } - -// func NewRecordingPolicy(o *RecordingOptions) azcore.Policy { -// if o == nil { -// o = &RecordingOptions{} -// } -// p := &recordingPolicy{options: *o} -// p.options.init() -// return p -// } - -// func (p *recordingPolicy) Do(req *azcore.Request) (resp *azcore.Response, err error) { -// originalURLHost := req.URL.Host -// req.URL.Scheme = "https" -// req.URL.Host = p.options.host -// req.Host = p.options.host - -// req.Header.Set(UpstreamUriHeader, fmt.Sprintf("%v://%v", p.options.scheme, originalURLHost)) -// req.Header.Set(ModeHeader, recordMode) -// req.Header.Set(recordingIdHeader, recordingId) - -// return req.Next() -// } - -// This looks up an environment variable and if it is not found, returns the recordedValue -func GetEnvVariable(t *testing.T, varName string, recordedValue string) string { - val, ok := os.LookupEnv(varName) - if !ok { - t.Logf("Could not find environment variable: %v", varName) - return recordedValue - } - return val -} - -func LiveOnly(t *testing.T) { - if GetRecordMode() != ModeRecording { - t.Skip("Live Test Only") - } -} - -// Function for sleeping during a test for `duration` seconds. This method will only execute when -// AZURE_RECORD_MODE = "record", if a test is running in playback this will be a noop. -func Sleep(duration int) { - if GetRecordMode() == ModeRecording { - time.Sleep(time.Duration(duration) * time.Second) - } -} - -func GetRecordingId() string { - return recordingId -} - -func GetRecordMode() string { - return recordMode -} - -func InPlayback() bool { - return GetRecordMode() == ModePlayback -} - -func InRecord() bool { - return GetRecordMode() == ModeRecording -} - -// type FakeCredential struct { -// accountName string -// accountKey string -// } - -// func NewFakeCredential(accountName, accountKey string) *FakeCredential { -// return &FakeCredential{ -// accountName: accountName, -// accountKey: accountKey, -// } -// } - -// func (f *FakeCredential) AuthenticationPolicy(azcore.AuthenticationPolicyOptions) azcore.Policy { -// return azcore.PolicyFunc(func(req *azcore.Request) (*azcore.Response, error) { -// authHeader := strings.Join([]string{"Authorization ", f.accountName, ":", f.accountKey}, "") -// req.Request.Header.Set(azcore.HeaderAuthorization, authHeader) -// return req.Next() -// }) -// } - -func getRootCas() (*x509.CertPool, error) { - localFile, ok := os.LookupEnv("PROXY_CERT") - - rootCAs, err := x509.SystemCertPool() - if err != nil { - rootCAs = x509.NewCertPool() - } - - if !ok { - fmt.Println("Could not find path to proxy certificate, set the environment variable 'PROXY_CERT' to the location of your certificate") - return rootCAs, nil - } - - cert, err := ioutil.ReadFile(*&localFile) - if err != nil { - fmt.Println("error opening cert file") - return nil, err - } - - if ok := rootCAs.AppendCertsFromPEM(cert); !ok { - fmt.Println("No certs appended, using system certs only") - } - - return rootCAs, nil -} - -func GetHTTPClient() (*http.Client, error) { - transport := http.DefaultTransport.(*http.Transport).Clone() - - rootCAs, err := getRootCas() - if err != nil { - return nil, err - } - - transport.TLSClientConfig.RootCAs = rootCAs - transport.TLSClientConfig.MinVersion = tls.VersionTLS12 - - defaultHttpClient := &http.Client{ - Transport: transport, - } - return defaultHttpClient, nil -} diff --git a/sdk/internal/recording/recording_test.go b/sdk/internal/recording/recording_test.go index 7d823939b891..b7d39956bb18 100644 --- a/sdk/internal/recording/recording_test.go +++ b/sdk/internal/recording/recording_test.go @@ -75,14 +75,12 @@ func (s *recordingTests) TestRecordedVariables() { // non existent variables return an error _, err = target.GetEnvVar(nonExistingEnvVar, NoSanitization) - // mark test as succeeded require.Equal(envNotExistsError(nonExistingEnvVar), err.Error()) // now create the env variable and check that it can be fetched os.Setenv(nonExistingEnvVar, expectedVariableValue) defer os.Unsetenv(nonExistingEnvVar) - val, err := target.GetEnvVar(nonExistingEnvVar, NoSanitization) require.NoError(err) require.Equal(expectedVariableValue, val) @@ -112,7 +110,6 @@ func (s *recordingTests) TestRecordedVariablesSanitized() { require.NoError(err) // call GetOptionalRecordedVariable with the Secret_String VariableType arg - require.Equal(secret, target.GetOptionalEnvVar(SanitizedStringVar, secret, Secret_String)) // call GetOptionalRecordedVariable with the Secret_Base64String VariableType arg @@ -151,7 +148,7 @@ func (s *recordingTests) TestStopSavesVariablesIfExistAndReadsPreviousVariables( target, err := NewRecording(context, Playback) require.NoError(err) - target.GetOptionalRecordedVariable(expectedVariableName, expectedVariableValue, Default) + target.GetOptionalEnvVar(expectedVariableName, expectedVariableValue, NoSanitization) err = target.Stop() require.NoError(err) @@ -168,7 +165,7 @@ func (s *recordingTests) TestStopSavesVariablesIfExistAndReadsPreviousVariables( require.NoError(err) // add a new variable to the existing batch - target2.GetOptionalRecordedVariable(addedVariableName, addedVariableValue, Default) + target2.GetOptionalEnvVar(addedVariableName, addedVariableValue, NoSanitization) err = target2.Stop() require.NoError(err) diff --git a/sdk/internal/recording/request_matcher.go b/sdk/internal/recording/request_matcher.go index 09301b86f68d..3ff392b955f0 100644 --- a/sdk/internal/recording/request_matcher.go +++ b/sdk/internal/recording/request_matcher.go @@ -17,7 +17,13 @@ import ( ) type RequestMatcher struct { - ignoredHeaders map[string]*string + context TestContext + // IgnoredHeaders is a map acting as a hash set of the header names that will be ignored for matching. + // Modifying the keys in the map will affect how headers are matched for recordings. + IgnoredHeaders map[string]struct{} + bodyMatcher StringMatcher + urlMatcher StringMatcher + methodMatcher StringMatcher } type StringMatcher func(reqVal string, recVal string) bool @@ -95,46 +101,46 @@ func (m *RequestMatcher) SetMethodMatcher(matcher StringMatcher) { } } -var recordingHeaderMissing = "Test recording headers do not match. Header '%s' is present in request but not in recording." -var requestHeaderMissing = "Test recording headers do not match. Header '%s' is present in recording but not in request." -var headerValuesMismatch = "Test recording header '%s' does not match. request: %s, recording: %s" -var methodMismatch = "Test recording methods do not match. request: %s, recording: %s" -var urlMismatch = "Test recording URLs do not match. request: %s, recording: %s" -var bodiesMismatch = "Test recording bodies do not match.\nrequest: %s\nrecording: %s" +func defaultStringMatcher(s1 string, s2 string) bool { + return s1 == s2 +} -func compareBodies(r *http.Request, i cassette.Request, c TestContext) bool { +func getBody(r *http.Request) string { body := bytes.Buffer{} if r.Body != nil { _, err := body.ReadFrom(r.Body) if err != nil { - return false + return "could not parse body: " + err.Error() } r.Body = ioutil.NopCloser(&body) } - bodiesMatch := body.String() == i.Body - if !bodiesMatch { - c.Log(fmt.Sprintf(bodiesMismatch, body.String(), i.Body)) - } - return bodiesMatch + return body.String() } -func compareURLs(r *http.Request, i cassette.Request, c TestContext) bool { - if r.URL.String() != i.URL { - c.Log(fmt.Sprintf(urlMismatch, r.URL.String(), i.URL)) - return false - } - return true +func getUrl(r *http.Request) string { + return r.URL.String() } -func compareMethods(r *http.Request, i cassette.Request, c TestContext) bool { - if r.Method != i.Method { - c.Log(fmt.Sprintf(methodMismatch, r.Method, i.Method)) - return false - } - return true +func getMethod(r *http.Request) string { + return r.Method +} + +func (m *RequestMatcher) compareBodies(r *http.Request, recordedBody string) bool { + body := getBody(r) + return m.bodyMatcher(body, recordedBody) +} + +func (m *RequestMatcher) compareURLs(r *http.Request, recordedUrl string) bool { + url := getUrl(r) + return m.urlMatcher(url, recordedUrl) +} + +func (m *RequestMatcher) compareMethods(r *http.Request, recordedMethod string) bool { + method := getMethod(r) + return m.methodMatcher(method, recordedMethod) } -func compareHeaders(r *http.Request, i cassette.Request, c TestContext) bool { +func (m *RequestMatcher) compareHeaders(r *http.Request, i cassette.Request) bool { unVisitedCassetteKeys := make(map[string]*string, len(i.Headers)) // clone the cassette keys to track which we have seen for k := range i.Headers { @@ -155,20 +161,20 @@ func compareHeaders(r *http.Request, i cassette.Request, c TestContext) bool { headersMatch := reflect.DeepEqual(requestHeader, recordedHeader) if !headersMatch { // headers don't match - c.Log(fmt.Sprintf(headerValuesMismatch, key, requestHeader, recordedHeader)) + m.context.Log(fmt.Sprintf(headerValuesMismatch, key, requestHeader, recordedHeader)) return false } } else { // header not found - c.Log(fmt.Sprintf(recordingHeaderMissing, key)) + m.context.Log(fmt.Sprintf(recordingHeaderMissing, key)) return false } } if len(unVisitedCassetteKeys) > 0 { // headers exist in the recording that do not exist in the request for headerName := range unVisitedCassetteKeys { - c.Log(fmt.Sprintf(requestHeaderMissing, headerName)) + m.context.Log(fmt.Sprintf(requestHeaderMissing, headerName)) } return false } diff --git a/sdk/internal/recording/request_matcher_test.go b/sdk/internal/recording/request_matcher_test.go index 4eb985fe57d8..c65eac65a3e0 100644 --- a/sdk/internal/recording/request_matcher_test.go +++ b/sdk/internal/recording/request_matcher_test.go @@ -34,18 +34,19 @@ const unMatchedBody string = "This body does not match." func (s *requestMatcherTests) TestCompareBodies() { assert := assert.New(s.T()) context := NewTestContext(func(msg string) { assert.FailNow(msg) }, func(msg string) { s.T().Log(msg) }, func() string { return s.T().Name() }) + matcher := defaultMatcher(context) req := http.Request{Body: closerFromString(matchedBody)} recReq := cassette.Request{Body: matchedBody} - isMatch := compareBodies(&req, recReq, context) + isMatch := matcher.compareBodies(&req, recReq.Body) assert.Equal(true, isMatch) // make the requests mis-match req.Body = closerFromString((unMatchedBody)) - isMatch = compareBodies(&req, recReq, context) + isMatch = matcher.compareBodies(&req, recReq.Body) assert.False(isMatch) } @@ -61,6 +62,7 @@ func newUUID(t *testing.T) string { func (s *requestMatcherTests) TestCompareHeadersIgnoresIgnoredHeaders() { assert := assert.New(s.T()) context := NewTestContext(func(msg string) { assert.FailNow(msg) }, func(msg string) { s.T().Log(msg) }, func() string { return s.T().Name() }) + matcher := defaultMatcher(context) // populate only ignored headers that do not match reqHeaders := make(http.Header) @@ -74,12 +76,13 @@ func (s *requestMatcherTests) TestCompareHeadersIgnoresIgnoredHeaders() { recReq := cassette.Request{Headers: recordedHeaders} // All headers match - assert.True(compareHeaders(&req, recReq, context)) + assert.True(matcher.compareHeaders(&req, recReq)) } func (s *requestMatcherTests) TestCompareHeadersMatchesHeaders() { assert := assert.New(s.T()) context := NewTestContext(func(msg string) { assert.FailNow(msg) }, func(msg string) { s.T().Log(msg) }, func() string { return s.T().Name() }) + matcher := defaultMatcher(context) // populate only ignored headers that do not match reqHeaders := make(http.Header) @@ -93,12 +96,13 @@ func (s *requestMatcherTests) TestCompareHeadersMatchesHeaders() { req := http.Request{Header: reqHeaders} recReq := cassette.Request{Headers: recordedHeaders} - assert.True(compareHeaders(&req, recReq, context)) + assert.True(matcher.compareHeaders(&req, recReq)) } func (s *requestMatcherTests) TestCompareHeadersFailsMissingRecHeader() { assert := assert.New(s.T()) context := NewTestContext(func(msg string) { assert.FailNow(msg) }, func(msg string) { s.T().Log(msg) }, func() string { return s.T().Name() }) + matcher := defaultMatcher(context) // populate only ignored headers that do not match reqHeaders := make(http.Header) @@ -116,12 +120,13 @@ func (s *requestMatcherTests) TestCompareHeadersFailsMissingRecHeader() { // add a new header to the just req reqHeaders[header2] = headerValue - assert.False(compareHeaders(&req, recReq, context)) + assert.False(matcher.compareHeaders(&req, recReq)) } func (s *requestMatcherTests) TestCompareHeadersFailsMissingReqHeader() { assert := assert.New(s.T()) context := NewTestContext(func(msg string) { assert.FailNow(msg) }, func(msg string) { s.T().Log(msg) }, func() string { return s.T().Name() }) + matcher := defaultMatcher(context) // populate only ignored headers that do not match reqHeaders := make(http.Header) @@ -139,12 +144,13 @@ func (s *requestMatcherTests) TestCompareHeadersFailsMissingReqHeader() { // add a new header to just the recording recordedHeaders[header2] = headerValue - assert.False(compareHeaders(&req, recReq, context)) + assert.False(matcher.compareHeaders(&req, recReq)) } func (s *requestMatcherTests) TestCompareHeadersFailsMismatchedValues() { assert := assert.New(s.T()) context := NewTestContext(func(msg string) { assert.FailNow(msg) }, func(msg string) { s.T().Log(msg) }, func() string { return s.T().Name() }) + matcher := defaultMatcher(context) // populate only ignored headers that do not match reqHeaders := make(http.Header) @@ -164,7 +170,7 @@ func (s *requestMatcherTests) TestCompareHeadersFailsMismatchedValues() { recordedHeaders[header2] = headerValue reqHeaders[header2] = mismatch - assert.False(compareHeaders(&req, recReq, context)) + assert.False(matcher.compareHeaders(&req, recReq)) } func (s *requestMatcherTests) TestCompareURLs() { @@ -174,12 +180,13 @@ func (s *requestMatcherTests) TestCompareURLs() { host := "foo.bar" req := http.Request{URL: &url.URL{Scheme: scheme, Host: host}} recReq := cassette.Request{URL: scheme + "://" + host} + matcher := defaultMatcher(context) - assert.True(compareURLs(&req, recReq, context)) + assert.True(matcher.compareURLs(&req, recReq.URL)) req.URL.Path = "noMatch" - assert.False(compareURLs(&req, recReq, context)) + assert.False(matcher.compareURLs(&req, recReq.URL)) } func (s *requestMatcherTests) TestCompareMethods() { @@ -189,12 +196,13 @@ func (s *requestMatcherTests) TestCompareMethods() { methodPatch := "PATCH" req := http.Request{Method: methodPost} recReq := cassette.Request{Method: methodPost} + matcher := defaultMatcher(context) - assert.True(compareMethods(&req, recReq, context)) + assert.True(matcher.compareMethods(&req, recReq.Method)) req.Method = methodPatch - assert.False(compareMethods(&req, recReq, context)) + assert.False(matcher.compareMethods(&req, recReq.Method)) } func closerFromString(content string) io.ReadCloser { diff --git a/sdk/internal/recording/sanitizer.go b/sdk/internal/recording/sanitizer.go index abaf182ce789..2d86d0021e77 100644 --- a/sdk/internal/recording/sanitizer.go +++ b/sdk/internal/recording/sanitizer.go @@ -15,21 +15,27 @@ import ( type Sanitizer struct { recorder *recorder.Recorder - headersToSanitize map[string]*string + headersToSanitize []string urlSanitizer StringSanitizer bodySanitizer StringSanitizer } +// StringSanitizer is a func that will modify the string pointed to by the parameter into a sanitized value. type StringSanitizer func(*string) +// SanitizedValue is the default placeholder value to be used for sanitized strings. const SanitizedValue string = "sanitized" + +// SanitizedBase64Value is the default placeholder value to be used for sanitized base-64 encoded strings. const SanitizedBase64Value string = "Kg==" var sanitizedValueSlice = []string{SanitizedValue} -func DefaultSanitizer(recorder *recorder.Recorder) *Sanitizer { +// defaultSanitizer returns a new RecordingSanitizer with the default sanitizing behavior. +// To customize sanitization, call AddSanitizedHeaders, AddBodySanitizer, or AddUrlSanitizer. +func defaultSanitizer(recorder *recorder.Recorder) *Sanitizer { // The default sanitizer sanitizes the Authorization header - s := &Sanitizer{headersToSanitize: map[string]*string{"Authorization": nil}, recorder: recorder, urlSanitizer: DefaultStringSanitizer, bodySanitizer: DefaultStringSanitizer} + s := &Sanitizer{headersToSanitize: []string{"Authorization"}, recorder: recorder, urlSanitizer: DefaultStringSanitizer, bodySanitizer: DefaultStringSanitizer} recorder.AddSaveFilter(s.applySaveFilter) return s @@ -51,7 +57,7 @@ func (s *Sanitizer) AddUrlSanitizer(sanitizer StringSanitizer) { } func (s *Sanitizer) sanitizeHeaders(header http.Header) { - for headerName := range s.headersToSanitize { + for _, headerName := range s.headersToSanitize { if _, ok := header[headerName]; ok { header[headerName] = sanitizedValueSlice } diff --git a/sdk/internal/recording/sanitizer_test.go b/sdk/internal/recording/sanitizer_test.go index ee70f602d2a3..f4e6c5d7ff72 100644 --- a/sdk/internal/recording/sanitizer_test.go +++ b/sdk/internal/recording/sanitizer_test.go @@ -40,7 +40,7 @@ func (s *sanitizerTests) TestDefaultSanitizerSanitizesAuthHeader() { rt := NewMockRoundTripper(server) r, _ := recorder.NewAsMode(getTestFileName(s.T(), false), recorder.ModeRecording, rt) - DefaultSanitizer(r) + defaultSanitizer(r) req, _ := http.NewRequest(http.MethodPost, server.URL(), nil) req.Header.Add(authHeader, "superSecret") @@ -68,7 +68,7 @@ func (s *sanitizerTests) TestAddSanitizedHeadersSanitizes() { rt := NewMockRoundTripper(server) r, _ := recorder.NewAsMode(getTestFileName(s.T(), false), recorder.ModeRecording, rt) - target := DefaultSanitizer(r) + target := defaultSanitizer(r) target.AddSanitizedHeaders(customHeader1, customHeader2) req, _ := http.NewRequest(http.MethodPost, server.URL(), nil) @@ -108,7 +108,7 @@ func (s *sanitizerTests) TestAddUrlSanitizerSanitizes() { baseUrl := server.URL() + "/" - target := DefaultSanitizer(r) + target := defaultSanitizer(r) target.AddUrlSanitizer(func(url *string) { *url = strings.Replace(*url, secret, SanitizedValue, -1) }) From b1fe68c69d2e4b661571c237e50697dba760fb97 Mon Sep 17 00:00:00 2001 From: Sean Kane <68240067+seankane-msft@users.noreply.github.com> Date: Wed, 18 Aug 2021 13:51:17 -0400 Subject: [PATCH 36/42] Fixes2 (#15316) Makes a fix to azcore in track2-tables branch --- sdk/azcore/request.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/azcore/request.go b/sdk/azcore/request.go index 17a9cbf7150f..a3074596a2f8 100644 --- a/sdk/azcore/request.go +++ b/sdk/azcore/request.go @@ -90,7 +90,7 @@ func JoinPaths(root string, paths ...string) string { if qps != "" { if !strings.HasSuffix(root, "/") { root += "/" - } + } return root + "?" + qps } return root From 088d5b01dc390d17c755513f8c87e13c34cc9995 Mon Sep 17 00:00:00 2001 From: Sean Kane <68240067+seankane-msft@users.noreply.github.com> Date: Fri, 20 Aug 2021 16:11:18 -0400 Subject: [PATCH 37/42] [Tables] bump deps (#15350) * Sync eng/common directory with azure-sdk-tools for PR 1912 (#15314) * Attempt to purge all vaults, managed HSMs Reverts #1910. Vaults and managed HSMs are automatically purged on their purge date. The point was to purge them daily to preserve capacity. The default purge date is +90 days. * Add timeout and more logging * Pass required -Resource * Fix log message * Ensure the $Resource is correctly captured Added comment to new code explaining why, since ScriptBlock.GetNewClosure() is not working as expected. * Add -ErrorAction to Receive-Job Worked without terminating when run locally, but failed on the first error in the AzDO agent. * Use $using:r instead of creating ScriptBlock More idiomatic for passing ScriptBlocks to jobs. * Resolve PR feedback * Change default DeleteAfterHours to 120 Resolves #1917 * Use the Az cmdlets built-in -AsJob Co-authored-by: Heath Stewart * Fix query batch processing (#15319) Co-authored-by: Wes Haggard * fix: three dots path not work in linux in build script (#15297) * Release v56.3.0 1629350585 (#15323) * Generated from specification/apimanagement/resource-manager/readme.md tag package-preview-2021-01 (commit hash: 30d1537f0c9aa49e6e04401b1d16f612b31231e7) * Generated from specification/purview/resource-manager/readme.md tag package-2021-07-01 (commit hash: 30d1537f0c9aa49e6e04401b1d16f612b31231e7) * v56.3.0 * fix * Remove old unused update changelog script (#15326) Co-authored-by: Wes Haggard * add clear output flag to build.ps1 (#15255) * add clear output flag * remove the path parameter and make sure the process-sdk function only runs in current directory * change flag name * [tools/generator] add automation and release command for track2 (#15271) * [tools/generator] add automation and release command for track2 * add copyright and do gofmt * Use semver to pump version, move git operation to repo package and fix some typo * Add specfic version to release cmd, seperate package for automation and remove test config file * add automation script and config for track2 * fix: three dots path not work in linux in build script * fix: ln pwsh.exe to pwsh to run in linux * fix: ignore dep check for go-git * chore: label name change for track2 * fix: wrong package path result in empty git commit * fix: repo addr replacement in autorest.md * chore: move script to eng folder and change name * fix: onboard generation need to replace NewClientMethod * chore: change all naming from track2 to v2 * fix: add new build constraint * fix: template compat with go 1.17 and change commit msg for release * chore: add v2 to readme begin regex to support future change of `track2` naming * chore: remove track2 naming * fix: duplicated and wrong expression * fix: add package title param to release cmd * fix: ci * Prevent ManagedIdentityCredential mutating GetToken arguments (#15331) * [Azcore] bumps version of internal (#15347) * bump internal to latest * upgrading internal * not the correct one * changelog update * [azidentity] bump azcore and internal dependencies (#15348) * updating to latest core and identity * trying to fix merge * undoing changes to identity that should not be there * more changes * more changes * removing a bunch more * one last file * formatting * linting checks * linting * formatting Co-authored-by: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Co-authored-by: Heath Stewart Co-authored-by: Wes Haggard Co-authored-by: tadelesh Co-authored-by: JiahuiPeng <46921893+804873052@users.noreply.github.com> Co-authored-by: Arcturus Co-authored-by: Charles Lowell --- sdk/internal/recording/recording.go | 268 ++++++++++++++++++ sdk/tables/aztable/consts.go | 9 + .../aztable/cosmos_patch_transform_policy.go | 3 +- sdk/tables/aztable/errors.go | 4 +- sdk/tables/aztable/go.mod | 11 +- sdk/tables/aztable/go.sum | 19 +- sdk/tables/aztable/proxy_test.go | 43 ++- sdk/tables/aztable/sas_query_params.go | 4 +- .../aztable/shared_access_signature_test.go | 24 +- .../shared_policy_shared_key_credential.go | 64 +++-- .../aztable/table_access_policy_test.go | 2 +- sdk/tables/aztable/table_batch_test.go | 45 ++- sdk/tables/aztable/table_client.go | 10 +- sdk/tables/aztable/table_client_test.go | 35 +-- sdk/tables/aztable/table_pagers.go | 14 +- sdk/tables/aztable/table_pagers_test.go | 42 --- sdk/tables/aztable/table_service_client.go | 2 +- .../aztable/table_service_client_test.go | 9 +- .../aztable/table_transactional_batch.go | 62 ++-- sdk/tables/aztable/zc_client_options.go | 2 +- sdk/tables/aztable/zc_table_constants.go | 27 +- sdk/tables/aztable/zt_table_recorded_tests.go | 49 +--- sdk/tables/aztable/zz_generated_connection.go | 3 +- sdk/tables/aztable/zz_generated_constants.go | 1 + sdk/tables/aztable/zz_generated_models.go | 1 + .../aztable/zz_generated_response_types.go | 1 + .../aztable/zz_generated_service_client.go | 62 ++-- .../aztable/zz_generated_table_client.go | 216 +++++++------- .../aztable/zz_generated_time_rfc1123.go | 1 + .../aztable/zz_generated_time_rfc3339.go | 1 + 30 files changed, 632 insertions(+), 402 deletions(-) create mode 100644 sdk/tables/aztable/consts.go delete mode 100644 sdk/tables/aztable/table_pagers_test.go diff --git a/sdk/internal/recording/recording.go b/sdk/internal/recording/recording.go index 26d34cd57a07..92f8785ebdb7 100644 --- a/sdk/internal/recording/recording.go +++ b/sdk/internal/recording/recording.go @@ -7,6 +7,10 @@ package recording import ( + "bytes" + "crypto/tls" + "crypto/x509" + "encoding/json" "errors" "fmt" "io/ioutil" @@ -16,6 +20,7 @@ import ( "path/filepath" "strconv" "strings" + "testing" "time" "github.com/Azure/azure-sdk-for-go/sdk/internal/uuid" @@ -433,3 +438,266 @@ var modeMap = map[RecordMode]recorder.Mode{ Live: recorder.ModeDisabled, Playback: recorder.ModeReplaying, } + +var recordMode, _ = os.LookupEnv("AZURE_RECORD_MODE") +var ModeRecording = "record" +var ModePlayback = "playback" + +var baseProxyURLSecure = "localhost:5001" +var baseProxyURL = "localhost:5000" + +var recordingId string +var IdHeader = "x-recording-id" +var ModeHeader = "x-recording-mode" +var UpstreamUriHeader = "x-recording-upstream-base-uri" + +var tr = &http.Transport{ + TLSClientConfig: &tls.Config{InsecureSkipVerify: true}, +} +var client = http.Client{ + Transport: tr, +} + +type RecordingOptions struct { + MaxRetries int32 + UseHTTPS bool + Host string + Scheme string +} + +func defaultOptions() *RecordingOptions { + return &RecordingOptions{ + MaxRetries: 0, + UseHTTPS: true, + Host: "localhost:5001", + Scheme: "https", + } +} + +func (r RecordingOptions) HostScheme() string { + if r.UseHTTPS { + return "https://localhost:5001" + } + return "http://localhost:5000" +} + +func getTestId(pathToRecordings string, t *testing.T) string { + return pathToRecordings + "/recordings/" + t.Name() + ".json" +} + +func StartRecording(t *testing.T, pathToRecordings string, options *RecordingOptions) error { + if options == nil { + options = defaultOptions() + } + if recordMode == "" { + t.Log("AZURE_RECORD_MODE was not set, options are \"record\" or \"playback\". \nDefaulting to playback") + recordMode = "playback" + } else { + t.Log("AZURE_RECORD_MODE: ", recordMode) + } + testId := getTestId(pathToRecordings, t) + + url := fmt.Sprintf("%v/%v/start", options.HostScheme(), recordMode) + + req, err := http.NewRequest("POST", url, nil) + if err != nil { + return err + } + + req.Header.Set("x-recording-file", testId) + + resp, err := client.Do(req) + if err != nil { + return err + } + recordingId = resp.Header.Get(IdHeader) + return nil +} + +func StopRecording(t *testing.T, options *RecordingOptions) error { + if options == nil { + options = defaultOptions() + } + + url := fmt.Sprintf("%v/%v/stop", options.HostScheme(), recordMode) + req, err := http.NewRequest("POST", url, nil) + if err != nil { + return err + } + if recordingId == "" { + return errors.New("Recording ID was never set. Did you call StartRecording?") + } + req.Header.Set("x-recording-id", recordingId) + _, err = client.Do(req) + if err != nil { + t.Errorf(err.Error()) + } + return nil +} + +func AddUriSanitizer(replacement, regex string, options *RecordingOptions) error { + if options == nil { + options = defaultOptions() + } + url := fmt.Sprintf("%v/Admin/AddSanitizer", options.HostScheme()) + req, err := http.NewRequest("POST", url, nil) + if err != nil { + return err + } + req.Header.Set("x-abstraction-identifier", "UriRegexSanitizer") + bodyContent := map[string]string{ + "value": replacement, + "regex": regex, + } + marshalled, err := json.Marshal(bodyContent) + if err != nil { + return err + } + req.Body = ioutil.NopCloser(bytes.NewReader(marshalled)) + req.ContentLength = int64(len(marshalled)) + _, err = client.Do(req) + return err +} + +func (o *RecordingOptions) Init() { + if o.MaxRetries != 0 { + o.MaxRetries = 0 + } + if o.UseHTTPS { + o.Host = baseProxyURLSecure + o.Scheme = "https" + } else { + o.Host = baseProxyURL + o.Scheme = "http" + } +} + +// type recordingPolicy struct { +// options RecordingOptions +// } + +// func NewRecordingPolicy(o *RecordingOptions) azcore.Policy { +// if o == nil { +// o = &RecordingOptions{} +// } +// p := &recordingPolicy{options: *o} +// p.options.init() +// return p +// } + +// func (p *recordingPolicy) Do(req *azcore.Request) (resp *azcore.Response, err error) { +// originalURLHost := req.URL.Host +// req.URL.Scheme = "https" +// req.URL.Host = p.options.host +// req.Host = p.options.host + +// req.Header.Set(UpstreamUriHeader, fmt.Sprintf("%v://%v", p.options.scheme, originalURLHost)) +// req.Header.Set(ModeHeader, recordMode) +// req.Header.Set(IdHeader, recordingId) + +// return req.Next() +// } + +// This looks up an environment variable and if it is not found, returns the recordedValue +func GetEnvVariable(t *testing.T, varName string, recordedValue string) string { + val, ok := os.LookupEnv(varName) + if !ok { + t.Logf("Could not find environment variable: %v", varName) + return recordedValue + } + return val +} + +func LiveOnly(t *testing.T) { + if GetRecordMode() != ModeRecording { + t.Skip("Live Test Only") + } +} + +// Function for sleeping during a test for `duration` seconds. This method will only execute when +// AZURE_RECORD_MODE = "record", if a test is running in playback this will be a noop. +func Sleep(duration int) { + if GetRecordMode() == ModeRecording { + time.Sleep(time.Duration(duration) * time.Second) + } +} + +func GetRecordingId() string { + return recordingId +} + +func GetRecordMode() string { + return recordMode +} + +func InPlayback() bool { + return GetRecordMode() == ModePlayback +} + +func InRecord() bool { + return GetRecordMode() == ModeRecording +} + +// type FakeCredential struct { +// accountName string +// accountKey string +// } + +// func NewFakeCredential(accountName, accountKey string) *FakeCredential { +// return &FakeCredential{ +// accountName: accountName, +// accountKey: accountKey, +// } +// } + +// func (f *FakeCredential) AuthenticationPolicy(azcore.AuthenticationPolicyOptions) azcore.Policy { +// return azcore.PolicyFunc(func(req *azcore.Request) (*azcore.Response, error) { +// authHeader := strings.Join([]string{"Authorization ", f.accountName, ":", f.accountKey}, "") +// req.Request.Header.Set(azcore.HeaderAuthorization, authHeader) +// return req.Next() +// }) +// } + +func getRootCas() (*x509.CertPool, error) { + localFile, ok := os.LookupEnv("PROXY_CERT") + + rootCAs, err := x509.SystemCertPool() + if err != nil { + rootCAs = x509.NewCertPool() + } + + if !ok { + fmt.Println("Could not find path to proxy certificate, set the environment variable 'PROXY_CERT' to the location of your certificate") + return rootCAs, nil + } + + cert, err := ioutil.ReadFile(localFile) + if err != nil { + fmt.Println("error opening cert file") + return nil, err + } + + if ok := rootCAs.AppendCertsFromPEM(cert); !ok { + fmt.Println("No certs appended, using system certs only") + } + + return rootCAs, nil +} + +func GetHTTPClient() (*http.Client, error) { + transport := http.DefaultTransport.(*http.Transport).Clone() + + rootCAs, err := getRootCas() + if err != nil { + return nil, err + } + + transport.TLSClientConfig.RootCAs = rootCAs + transport.TLSClientConfig.MinVersion = tls.VersionTLS12 + transport.TLSClientConfig.InsecureSkipVerify = true + + defaultHttpClient := &http.Client{ + Transport: transport, + } + return defaultHttpClient, nil +} diff --git a/sdk/tables/aztable/consts.go b/sdk/tables/aztable/consts.go new file mode 100644 index 000000000000..f97dfa2121c3 --- /dev/null +++ b/sdk/tables/aztable/consts.go @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package aztable + +const ( + headerXmsDate = "x-ms-date" + headerAuthorization = "Authorization" +) diff --git a/sdk/tables/aztable/cosmos_patch_transform_policy.go b/sdk/tables/aztable/cosmos_patch_transform_policy.go index 8403a0893e67..8c7447a304e8 100644 --- a/sdk/tables/aztable/cosmos_patch_transform_policy.go +++ b/sdk/tables/aztable/cosmos_patch_transform_policy.go @@ -1,3 +1,4 @@ +//go:build go1.13 // +build go1.13 // Copyright (c) Microsoft Corporation. All rights reserved. @@ -14,7 +15,7 @@ import ( // cosmosPatchTransformPolicy transforms PATCH requests into POST requests with the "X-HTTP-Method":"MERGE" header set. type cosmosPatchTransformPolicy struct{} -func (p cosmosPatchTransformPolicy) Do(req *azcore.Request) (*azcore.Response, error) { +func (p cosmosPatchTransformPolicy) Do(req *azcore.Request) (*http.Response, error) { transformPatchToCosmosPost(req) return req.Next() } diff --git a/sdk/tables/aztable/errors.go b/sdk/tables/aztable/errors.go index 1152898a309e..b2b883f50136 100644 --- a/sdk/tables/aztable/errors.go +++ b/sdk/tables/aztable/errors.go @@ -9,11 +9,11 @@ var errInvalidUpdateMode = errors.New("invalid EntityUpdateMode") func checkEntityForPkRk(entity *map[string]interface{}, err error) error { if _, ok := (*entity)[partitionKey]; !ok { - return partitionKeyRowKeyError + return errPartitionKeyRowKeyError } if _, ok := (*entity)[rowKey]; !ok { - return partitionKeyRowKeyError + return errPartitionKeyRowKeyError } return err diff --git a/sdk/tables/aztable/go.mod b/sdk/tables/aztable/go.mod index d221fb14275b..4c10fa962220 100644 --- a/sdk/tables/aztable/go.mod +++ b/sdk/tables/aztable/go.mod @@ -3,15 +3,12 @@ module github.com/Azure/azure-sdk-for-go/sdk/tables/aztable go 1.13 replace github.com/Azure/azure-sdk-for-go/sdk/internal => ../../internal -replace github.com/Azure/azure-sdk-for-go/sdk/azidentity => ../../azidentity -replace github.com/Azure/azure-sdk-for-go/sdk/azcore => ../../azcore require ( - github.com/Azure/azure-sdk-for-go/sdk/azcore v0.16.2 - github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.9.2 // indirect - github.com/Azure/azure-sdk-for-go/sdk/internal v0.5.1 - github.com/Azure/azure-sdk-for-go/sdk/to v0.1.4 // indirect + github.com/Azure/azure-sdk-for-go/sdk/azcore v0.18.1 + github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.9.3 + github.com/Azure/azure-sdk-for-go/sdk/internal v0.7.0 + github.com/Azure/azure-sdk-for-go/sdk/to v0.1.4 github.com/stretchr/testify v1.7.0 - golang.org/x/net v0.0.0-20210525063256-abc453219eb5 // indirect gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect ) diff --git a/sdk/tables/aztable/go.sum b/sdk/tables/aztable/go.sum index 011ec80c81be..8aa9657f874b 100644 --- a/sdk/tables/aztable/go.sum +++ b/sdk/tables/aztable/go.sum @@ -1,10 +1,7 @@ -github.com/Azure/azure-sdk-for-go/sdk/azcore v0.14.0/go.mod h1:pElNP+u99BvCZD+0jOlhI9OC/NB2IDTOTGZOZH0Qhq8= -github.com/Azure/azure-sdk-for-go/sdk/azcore v0.16.1 h1:yQw8Ah26gBP4dv66ZNjZpRBRV+gaHH/0TLn1taU4FZ4= -github.com/Azure/azure-sdk-for-go/sdk/azcore v0.16.1/go.mod h1:MVdrcUC4Hup35qHym3VdzoW+NBgBxrta9Vei97jRtM8= -github.com/Azure/azure-sdk-for-go/sdk/azcore v0.16.2 h1:UC4vfOhW2l0f2QOCQpOxJS4/K6oKFy2tQZE+uWU1MEo= -github.com/Azure/azure-sdk-for-go/sdk/azcore v0.16.2/go.mod h1:MVdrcUC4Hup35qHym3VdzoW+NBgBxrta9Vei97jRtM8= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.9.2 h1:3W8umQHRg0DXV5KvmbqU43uFi8MKvqLHQCE8L8v6Xds= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.9.2/go.mod h1:acANgl9stsT5xflESXKjZx4rhZJSr0TGgTDYY0xJPIE= +github.com/Azure/azure-sdk-for-go/sdk/azcore v0.18.1 h1:BxW0zeNz9VbxtaeyuwAsgZ2WgCG7wwjb17H3f5czlp4= +github.com/Azure/azure-sdk-for-go/sdk/azcore v0.18.1/go.mod h1:h6H6c8enJmmocHUbLiiGY6sx7f9i+X3m1CHdd5c6Rdw= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.9.3 h1:xxhrKdJQHnbzyquwt4GJuK0xGYIchlxtrbOCy1RcXyg= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.9.3/go.mod h1:uuSIs9Jj5y1WfsKhk9xGaEzyu/5SEmdKwY3Oi0UK59M= github.com/Azure/azure-sdk-for-go/sdk/to v0.1.4 h1:3w4gk+uYOwplGhID1fDP305/8bI5Aug3URoC1V493KU= github.com/Azure/azure-sdk-for-go/sdk/to v0.1.4/go.mod h1:UL/d4lvWAzSJUuX+19uKdN0ktyjoOyQhgY+HWNgtIYI= github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= @@ -16,7 +13,6 @@ github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4 h1:49lOXmGaUpV9Fz3gd7T github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4/go.mod h1:4OwLy04Bl9Ef3GJJCoec+30X3LQs/0/m4HFRt/2LUSA= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/stretchr/objx v0.1.0 h1:4G4v2dO3VZwixGIRoQ5Lfboy6nUhCyYzaqnIAPPhYs4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= @@ -26,11 +22,8 @@ golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897 h1:pLI5jrR7OSLijeIDcmRxNm golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20201010224723-4f7140c49acb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20210510120150-4163338589ed h1:p9UgmWI9wKpfYmgaV/IZKGdXc5qEK45tDwwwDyjS26I= -golang.org/x/net v0.0.0-20210510120150-4163338589ed/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210525063256-abc453219eb5 h1:wjuX4b5yYQnEQHzd+CBcrcC6OVR2J1CN6mUy0oSxIPo= -golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210610132358-84b48f89b13b h1:k+E048sYJHyVnsr1GDrRZWQ32D2C7lWs9JRc0bel53A= +golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= diff --git a/sdk/tables/aztable/proxy_test.go b/sdk/tables/aztable/proxy_test.go index d79f395a4e11..da3f785bf0ad 100644 --- a/sdk/tables/aztable/proxy_test.go +++ b/sdk/tables/aztable/proxy_test.go @@ -7,6 +7,7 @@ import ( "context" "fmt" "hash/fnv" + "net/http" "strings" "testing" @@ -18,6 +19,8 @@ import ( var AADAuthenticationScope = "https://storage.azure.com/.default" +var pathToPackage = "sdk/tables/aztable" + type recordingPolicy struct { options recording.RecordingOptions } @@ -31,7 +34,7 @@ func NewRecordingPolicy(o *recording.RecordingOptions) azcore.Policy { return p } -func (p *recordingPolicy) Do(req *azcore.Request) (resp *azcore.Response, err error) { +func (p *recordingPolicy) Do(req *azcore.Request) (resp *http.Response, err error) { originalURLHost := req.URL.Host req.URL.Scheme = "https" req.URL.Host = p.options.Host @@ -56,12 +59,22 @@ func NewFakeCredential(accountName, accountKey string) *FakeCredential { } } -func (f *FakeCredential) AuthenticationPolicy(azcore.AuthenticationPolicyOptions) azcore.Policy { - return azcore.PolicyFunc(func(req *azcore.Request) (*azcore.Response, error) { - authHeader := strings.Join([]string{"Authorization ", f.accountName, ":", f.accountKey}, "") - req.Request.Header.Set(azcore.HeaderAuthorization, authHeader) - return req.Next() - }) +type fakeCredPolicy struct { + cred *FakeCredential +} + +func newFakeCredPolicy(cred *FakeCredential, opts azcore.AuthenticationOptions) *fakeCredPolicy { + return &fakeCredPolicy{cred: cred} +} + +func (f *fakeCredPolicy) Do(req *azcore.Request) (*http.Response, error) { + authHeader := strings.Join([]string{"Authorization ", f.cred.accountName, ":", f.cred.accountKey}, "") + req.Request.Header.Set(headerAuthorization, authHeader) + return req.Next() +} + +func (f *FakeCredential) NewAuthenticationPolicy(options azcore.AuthenticationOptions) azcore.Policy { + return newFakeCredPolicy(f, options) } func createTableClientForRecording(t *testing.T, tableName string, serviceURL string, cred azcore.Credential) (*TableClient, error) { @@ -99,7 +112,7 @@ func initClientTest(t *testing.T, service string, createTable bool) (*TableClien require.NoError(t, err) } - err = recording.StartRecording(t, nil) + err = recording.StartRecording(t, pathToPackage, nil) require.NoError(t, err) if createTable { @@ -126,7 +139,7 @@ func initServiceTest(t *testing.T, service string) (*TableServiceClient, func()) require.NoError(t, err) } - err = recording.StartRecording(t, nil) + err = recording.StartRecording(t, pathToPackage, nil) require.NoError(t, err) return client, func() { @@ -165,6 +178,9 @@ func getSharedKeyCredential(t *testing.T) (azcore.Credential, error) { func createStorageTableClient(t *testing.T) (*TableClient, error) { var cred azcore.Credential accountName := recording.GetEnvVariable(t, "TABLES_STORAGE_ACCOUNT_NAME", "fakestorageaccount") + if recording.InPlayback() { + accountName = "fakestorageaccount" + } cred, err := getAADCredential(t) require.NoError(t, err) @@ -180,6 +196,9 @@ func createStorageTableClient(t *testing.T) (*TableClient, error) { func createCosmosTableClient(t *testing.T) (*TableClient, error) { var cred azcore.Credential accountName := recording.GetEnvVariable(t, "TABLES_COSMOS_ACCOUNT_NAME", "fakestorageaccount") + if recording.InPlayback() { + accountName = "fakestorageaccount" + } cred, err := getSharedKeyCredential(t) require.NoError(t, err) @@ -195,6 +214,9 @@ func createCosmosTableClient(t *testing.T) (*TableClient, error) { func createStorageServiceClient(t *testing.T) (*TableServiceClient, error) { var cred azcore.Credential accountName := recording.GetEnvVariable(t, "TABLES_STORAGE_ACCOUNT_NAME", "fakestorageaccount") + if recording.InPlayback() { + accountName = "fakestorageaccount" + } cred, err := getAADCredential(t) require.NoError(t, err) @@ -207,6 +229,9 @@ func createStorageServiceClient(t *testing.T) (*TableServiceClient, error) { func createCosmosServiceClient(t *testing.T) (*TableServiceClient, error) { var cred azcore.Credential accountName := recording.GetEnvVariable(t, "TABLES_COSMOS_ACCOUNT_NAME", "fakestorageaccount") + if recording.InPlayback() { + accountName = "fakestorageaccount" + } cred, err := getSharedKeyCredential(t) require.NoError(t, err) diff --git a/sdk/tables/aztable/sas_query_params.go b/sdk/tables/aztable/sas_query_params.go index f313f74adfb7..1827d1f6967c 100644 --- a/sdk/tables/aztable/sas_query_params.go +++ b/sdk/tables/aztable/sas_query_params.go @@ -56,7 +56,7 @@ func formatSASTime(t *time.Time, format string) string { } // parseSASTimeString try to parse sas time string. -func parseSASTimeString(val string) (t time.Time, timeFormat string, err error) { +func parseSASTimeString(val string) (t time.Time, timeFormat string, err error) { //nolint for _, sasTimeFormat := range SASTimeFormats { t, err = time.Parse(sasTimeFormat, val) if err == nil { @@ -184,7 +184,7 @@ func (ipr *IPRange) String() string { // query parameter map's passed-in values. If deleteSASParametersFromValues is true, // all SAS-related query parameters are removed from the passed-in map. If // deleteSASParametersFromValues is false, the map passed-in map is unaltered. -func newSASQueryParameters(values url.Values, deleteSASParametersFromValues bool) SASQueryParameters { +func newSASQueryParameters(values url.Values, deleteSASParametersFromValues bool) SASQueryParameters { //nolint p := SASQueryParameters{} for k, v := range values { val := v[0] diff --git a/sdk/tables/aztable/shared_access_signature_test.go b/sdk/tables/aztable/shared_access_signature_test.go index 124af26e2aa3..2ce8451bab57 100644 --- a/sdk/tables/aztable/shared_access_signature_test.go +++ b/sdk/tables/aztable/shared_access_signature_test.go @@ -58,11 +58,11 @@ func TestSASServiceClient(t *testing.T) { sasUrl := fmt.Sprintf("https://%s.table.core.windows.net/?%s", accountName, queryParams) - err = recording.StartRecording(t, nil) + err = recording.StartRecording(t, pathToPackage, nil) require.NoError(t, err) - client, err := createTableClientForRecording(t, tableName, sasUrl, azcore.AnonymousCredential()) + client, err := createTableClientForRecording(t, tableName, sasUrl, azcore.NewAnonymousCredential()) require.NoError(t, err) - defer recording.StopRecording(t, nil) + defer recording.StopRecording(t, nil) //nolint entity := map[string]string{ "PartitionKey": "pk001", @@ -113,11 +113,11 @@ func TestSASTableClient(t *testing.T) { sasUrl := fmt.Sprintf("https://%s.table.core.windows.net/?%s", accountName, queryParams) - err = recording.StartRecording(t, nil) + err = recording.StartRecording(t, pathToPackage, nil) require.NoError(t, err) - client, err := createTableClientForRecording(t, tableName, sasUrl, azcore.AnonymousCredential()) + client, err := createTableClientForRecording(t, tableName, sasUrl, azcore.NewAnonymousCredential()) require.NoError(t, err) - defer recording.StopRecording(t, nil) + defer recording.StopRecording(t, nil) //nolint entity := map[string]string{ "PartitionKey": "pk001", @@ -170,11 +170,11 @@ func TestSASTableClientReadOnly(t *testing.T) { sasUrl := fmt.Sprintf("https://%s.table.core.windows.net/?%s", accountName, queryParams) - err = recording.StartRecording(t, nil) + err = recording.StartRecording(t, pathToPackage, nil) require.NoError(t, err) - client, err = createTableClientForRecording(t, tableName, sasUrl, azcore.AnonymousCredential()) + client, err = createTableClientForRecording(t, tableName, sasUrl, azcore.NewAnonymousCredential()) require.NoError(t, err) - defer recording.StopRecording(t, nil) + defer recording.StopRecording(t, nil) //nolint entity := map[string]string{ "PartitionKey": "pk001", @@ -236,11 +236,11 @@ func TestSASCosmosTableClientReadOnly(t *testing.T) { sasUrl := fmt.Sprintf("https://%s.table.cosmos.azure.com/?%s", accountName, queryParams) - err = recording.StartRecording(t, nil) + err = recording.StartRecording(t, pathToPackage, nil) require.NoError(t, err) - client, err = createTableClientForRecording(t, tableName, sasUrl, azcore.AnonymousCredential()) + client, err = createTableClientForRecording(t, tableName, sasUrl, azcore.NewAnonymousCredential()) require.NoError(t, err) - defer recording.StopRecording(t, nil) + defer recording.StopRecording(t, nil) //nolint entity := map[string]string{ "PartitionKey": "pk001", diff --git a/sdk/tables/aztable/shared_policy_shared_key_credential.go b/sdk/tables/aztable/shared_policy_shared_key_credential.go index ca011f0b5240..06c29da9bf8b 100644 --- a/sdk/tables/aztable/shared_policy_shared_key_credential.go +++ b/sdk/tables/aztable/shared_policy_shared_key_credential.go @@ -17,6 +17,7 @@ import ( "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/internal/log" ) // NewSharedKeyCredential creates an immutable SharedKeyCredential containing the @@ -69,7 +70,7 @@ func (c *SharedKeyCredential) buildStringToSign(req *http.Request) (string, erro } stringToSign := strings.Join([]string{ - headers.Get(azcore.HeaderXmsDate), + headers.Get(headerXmsDate), canonicalizedResource, }, "\n") return stringToSign, nil @@ -133,29 +134,42 @@ func (c *SharedKeyCredential) buildCanonicalizedResource(u *url.URL) (string, er return cr.String(), nil } -// AuthenticationPolicy implements the Credential interface on SharedKeyCredential. -func (c *SharedKeyCredential) AuthenticationPolicy(azcore.AuthenticationPolicyOptions) azcore.Policy { - return azcore.PolicyFunc(func(req *azcore.Request) (*azcore.Response, error) { - // Add a x-ms-date header if it doesn't already exist - if d := req.Request.Header.Get(azcore.HeaderXmsDate); d == "" { - req.Request.Header.Set(azcore.HeaderXmsDate, time.Now().UTC().Format(http.TimeFormat)) - } - stringToSign, err := c.buildStringToSign(req.Request) - if err != nil { - return nil, err - } - signature, err := c.ComputeHMACSHA256(stringToSign) - if err != nil { - return nil, err - } - authHeader := strings.Join([]string{"SharedKeyLite ", c.AccountName(), ":", signature}, "") - req.Request.Header.Set(azcore.HeaderAuthorization, authHeader) +type sharedKeyCredPolicy struct { + cred *SharedKeyCredential +} - response, err := req.Next() - if err != nil && response != nil && response.StatusCode == http.StatusForbidden { - // Service failed to authenticate request, log it - azcore.Log().Write(azcore.LogResponse, "===== HTTP Forbidden status, String-to-Sign:\n"+stringToSign+"\n===============================\n") - } - return response, err - }) +func newSharedKeyCredPolicy(cred *SharedKeyCredential, opts azcore.AuthenticationOptions) *sharedKeyCredPolicy { + s := &sharedKeyCredPolicy{ + cred: cred, + } + + return s +} + +func (s *sharedKeyCredPolicy) Do(req *azcore.Request) (*http.Response, error) { + if d := req.Request.Header.Get(headerXmsDate); d == "" { + req.Request.Header.Set(headerXmsDate, time.Now().UTC().Format(http.TimeFormat)) + } + stringToSign, err := s.cred.buildStringToSign(req.Request) + if err != nil { + return nil, err + } + signature, err := s.cred.ComputeHMACSHA256(stringToSign) + if err != nil { + return nil, err + } + authHeader := strings.Join([]string{"SharedKeyLite ", s.cred.AccountName(), ":", signature}, "") + req.Request.Header.Set(headerAuthorization, authHeader) + + response, err := req.Next() + if err != nil && response != nil && response.StatusCode == http.StatusForbidden { + // Service failed to authenticate request, log it + log.Write(log.Response, "===== HTTP Forbidden status, String-to-Sign:\n"+stringToSign+"\n===============================\n") + } + return response, err +} + +// NewAuthenticationPolicy implements the Credential interface on SharedKeyCredential. +func (c *SharedKeyCredential) NewAuthenticationPolicy(options azcore.AuthenticationOptions) azcore.Policy { + return newSharedKeyCredPolicy(c, options) } diff --git a/sdk/tables/aztable/table_access_policy_test.go b/sdk/tables/aztable/table_access_policy_test.go index 60015bdf6aaa..68e099a43659 100644 --- a/sdk/tables/aztable/table_access_policy_test.go +++ b/sdk/tables/aztable/table_access_policy_test.go @@ -124,7 +124,7 @@ func TestSetTooManyAccessPolicies(t *testing.T) { _, err := client.SetAccessPolicy(ctx, ¶m) require.NotNil(t, err, "Set access policy succeeded but should have failed") - require.Contains(t, err.Error(), tooManyAccessPoliciesError.Error()) + require.Contains(t, err.Error(), errTooManyAccessPoliciesError.Error()) } func TestSetNullAccessPolicy(t *testing.T) { diff --git a/sdk/tables/aztable/table_batch_test.go b/sdk/tables/aztable/table_batch_test.go index 7a7fbde8a65e..526543bb052e 100644 --- a/sdk/tables/aztable/table_batch_test.go +++ b/sdk/tables/aztable/table_batch_test.go @@ -30,7 +30,11 @@ func TestBatchAdd(t *testing.T) { batch[i] = TableTransactionAction{ActionType: Add, Entity: marshalled} } - resp, err := client.submitTransactionInternal(ctx, &batch, uuid.New(), uuid.New(), nil) + u1, err := uuid.New() + require.NoError(t, err) + u2, err := uuid.New() + require.NoError(t, err) + resp, err := client.submitTransactionInternal(ctx, &batch, u1, u2, nil) require.NoError(t, err) for i := 0; i < len(*resp.TransactionResponses); i++ { r := (*resp.TransactionResponses)[i] @@ -69,7 +73,11 @@ func TestBatchMixed(t *testing.T) { } } - resp, err := client.submitTransactionInternal(ctx, &batch, uuid.New(), uuid.New(), nil) + u1, err := uuid.New() + require.NoError(t, err) + u2, err := uuid.New() + require.NoError(t, err) + resp, err := client.submitTransactionInternal(ctx, &batch, u1, u2, nil) require.NoError(t, err) for i := 0; i < len(*resp.TransactionResponses); i++ { r := (*resp.TransactionResponses)[i] @@ -127,7 +135,11 @@ func TestBatchMixed(t *testing.T) { batch[3] = TableTransactionAction{ActionType: Add, Entity: marshalled4thEntity} batch[4] = TableTransactionAction{ActionType: Add, Entity: marshalled5thEntity} - resp, err = client.submitTransactionInternal(ctx, &batch, uuid.New(), uuid.New(), nil) + u1, err = uuid.New() + require.NoError(t, err) + u2, err = uuid.New() + require.NoError(t, err) + resp, err = client.submitTransactionInternal(ctx, &batch, u1, u2, nil) require.NoError(t, err) for i := 0; i < len(*resp.TransactionResponses); i++ { @@ -164,15 +176,20 @@ func TestBatchError(t *testing.T) { // Create the batch. batch := make([]TableTransactionAction, 0, 3) + u1, err := uuid.New() + require.NoError(t, err) + u2, err := uuid.New() + require.NoError(t, err) // Sending an empty batch throws. - _, err := client.submitTransactionInternal(ctx, &batch, uuid.New(), uuid.New(), nil) + _, err = client.submitTransactionInternal(ctx, &batch, u1, u2, nil) require.NotNil(t, err) require.Equal(t, error_empty_transaction, err.Error()) // Add the last entity to the table prior to adding it as part of the batch to cause a batch failure. marshalledFinalEntity, err := json.Marshal((*entitiesToCreate)[2]) require.NoError(t, err) - client.AddEntity(ctx, marshalledFinalEntity) + _, err = client.AddEntity(ctx, marshalledFinalEntity) + require.NoError(t, err) // Add the entities to the batch for i := 0; i < cap(batch); i++ { @@ -181,7 +198,11 @@ func TestBatchError(t *testing.T) { batch = append(batch, TableTransactionAction{ActionType: Add, Entity: marshalledEntity}) } - resp, err := client.submitTransactionInternal(ctx, &batch, uuid.New(), uuid.New(), nil) + u1, err = uuid.New() + require.NoError(t, err) + u2, err = uuid.New() + require.NoError(t, err) + resp, err := client.submitTransactionInternal(ctx, &batch, u1, u2, nil) require.NotNil(t, err) transactionError, ok := err.(*TableTransactionError) require.Truef(t, ok, "err should be of type TableTransactionError") @@ -241,7 +262,11 @@ func TestBatchComplex(t *testing.T) { Entity: marshalled5, } - resp, err := client.submitTransactionInternal(ctx, &batch, uuid.New(), uuid.New(), nil) + u1, err := uuid.New() + require.NoError(t, err) + u2, err := uuid.New() + require.NoError(t, err) + resp, err := client.submitTransactionInternal(ctx, &batch, u1, u2, nil) require.NoError(t, err) for i := 0; i < len(*resp.TransactionResponses); i++ { r := (*resp.TransactionResponses)[i] @@ -273,7 +298,11 @@ func TestBatchComplex(t *testing.T) { Entity: marshalled3, } - resp, err = client.submitTransactionInternal(ctx, &batch2, uuid.New(), uuid.New(), nil) + u1, err = uuid.New() + require.NoError(t, err) + u2, err = uuid.New() + require.NoError(t, err) + resp, err = client.submitTransactionInternal(ctx, &batch2, u1, u2, nil) require.NoError(t, err) for i := 0; i < len(*resp.TransactionResponses); i++ { r := (*resp.TransactionResponses)[i] diff --git a/sdk/tables/aztable/table_client.go b/sdk/tables/aztable/table_client.go index 144e4ab1ea5e..4d7e86c94e14 100644 --- a/sdk/tables/aztable/table_client.go +++ b/sdk/tables/aztable/table_client.go @@ -129,10 +129,10 @@ func (t *TableClient) UpdateEntity(ctx context.Context, entity []byte, etag *str return entity, err } - pk, _ := mapEntity[partitionKey] + pk := mapEntity[partitionKey] partKey := pk.(string) - rk, _ := mapEntity[rowKey] + rk := mapEntity[rowKey] rowkey := rk.(string) switch updateMode { @@ -155,10 +155,10 @@ func (t *TableClient) InsertEntity(ctx context.Context, entity []byte, updateMod return entity, err } - pk, _ := mapEntity[partitionKey] + pk := mapEntity[partitionKey] partKey := pk.(string) - rk, _ := mapEntity[rowKey] + rk := mapEntity[rowKey] rowkey := rk.(string) switch updateMode { @@ -179,7 +179,7 @@ func (t *TableClient) GetAccessPolicy(ctx context.Context) (SignedIdentifierArra func (t *TableClient) SetAccessPolicy(ctx context.Context, options *TableSetAccessPolicyOptions) (TableSetAccessPolicyResponse, error) { response, err := t.client.SetAccessPolicy(ctx, t.Name, options) if len(options.TableACL) > 5 { - err = tooManyAccessPoliciesError + err = errTooManyAccessPoliciesError } return response, err } diff --git a/sdk/tables/aztable/table_client_test.go b/sdk/tables/aztable/table_client_test.go index 1de071b483a3..62fcd7183cb4 100644 --- a/sdk/tables/aztable/table_client_test.go +++ b/sdk/tables/aztable/table_client_test.go @@ -4,16 +4,11 @@ package aztable import ( - "bytes" "context" "encoding/json" - "errors" "fmt" - "io/ioutil" - "net/http" "testing" - "github.com/Azure/azure-sdk-for-go/sdk/internal/runtime" "github.com/stretchr/testify/require" ) @@ -28,10 +23,6 @@ func TestServiceErrors(t *testing.T) { // Create a duplicate table to produce an error _, err := client.Create(ctx) require.Error(t, err) - - var svcErr *runtime.ResponseError - errors.As(err, &svcErr) - require.Equal(t, svcErr.RawResponse().StatusCode, http.StatusConflict) }) } } @@ -77,9 +68,7 @@ func TestAddComplexEntity(t *testing.T) { marshalledEntity, err := json.Marshal(entity) require.NoError(t, err) _, err = client.AddEntity(ctx, marshalledEntity) - var svcErr *runtime.ResponseError - errors.As(err, &svcErr) - require.Nilf(t, err, getStringFromBody(svcErr)) + require.NoError(t, err) }) } } @@ -187,6 +176,7 @@ func TestInsertEntity(t *testing.T) { mapEntity["MergeProperty"] = "foo" reMarshalled, err := json.Marshal(mapEntity) + require.NoError(err) // 4. Replace Entity with "bool"-less entity _, err = client.InsertEntity(ctx, reMarshalled, (ReplaceEntity)) @@ -201,6 +191,7 @@ func TestInsertEntity(t *testing.T) { postMerge := qResp.TableEntityQueryResponse.Value[0] var unmarshalledPostMerge map[string]interface{} err = json.Unmarshal(postMerge, &unmarshalledPostMerge) + require.NoError(err) // 6. Make assertions require.Less(len(unmarshalledPostMerge), len(unMarshalledPreMerge)) @@ -328,25 +319,7 @@ func TestInvalidEntity(t *testing.T) { _, err = client.AddEntity(ctx, badEntityMarshalled) require.NotNil(err) - require.Contains(err.Error(), partitionKeyRowKeyError.Error()) + require.Contains(err.Error(), errPartitionKeyRowKeyError.Error()) }) } } - -func getStringFromBody(e *runtime.ResponseError) string { - if e == nil { - return "Error is nil" - } - r := e.RawResponse() - body := bytes.Buffer{} - b := r.Body - b.Close() - if b != nil { - _, err := body.ReadFrom(b) - if err != nil { - return "" - } - _ = ioutil.NopCloser(&body) - } - return body.String() -} diff --git a/sdk/tables/aztable/table_pagers.go b/sdk/tables/aztable/table_pagers.go index fb1aa9dffdbc..2aa6875205db 100644 --- a/sdk/tables/aztable/table_pagers.go +++ b/sdk/tables/aztable/table_pagers.go @@ -5,8 +5,6 @@ package aztable import ( "context" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore" ) // TableEntityListResponsePager is a Pager for Table entity query results. @@ -25,10 +23,14 @@ import ( // } // err := pager.Err() type TableEntityListResponsePager interface { - azcore.Pager + // azcore.Pager // PageResponse returns the current TableQueryResponseResponse. PageResponse() TableEntityListByteResponseResponse + // NextPage returns true if there is another page of data available, false if not + NextPage(context.Context) bool + // Err returns an error if there was an error on the last request + Err() error } type tableEntityQueryResponsePager struct { @@ -93,10 +95,14 @@ func (p *tableEntityQueryResponsePager) Err() error { // } // err := pager.Err() type TableListResponsePager interface { - azcore.Pager + // azcore.Pager // PageResponse returns the current TableQueryResponseResponse. PageResponse() TableListResponseResponse + // NextPage returns true if there is another page of data available, false if not + NextPage(context.Context) bool + // Err returns an error if there was an error on the last request + Err() error } type tableQueryResponsePager struct { diff --git a/sdk/tables/aztable/table_pagers_test.go b/sdk/tables/aztable/table_pagers_test.go deleted file mode 100644 index ef4f540e031b..000000000000 --- a/sdk/tables/aztable/table_pagers_test.go +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package aztable - -import ( - "io" - "io/ioutil" - "math" - "strconv" - "strings" -) - -func closerFromString(content string) io.ReadCloser { - return ioutil.NopCloser(strings.NewReader(content)) -} - -var odataHintProps = map[string]string{ - "SomeBinaryProperty": edmBinary, - "SomeDateProperty": edmDateTime, - "SomeDoubleProperty0": edmDouble, - "SomeDoubleProperty1": edmDouble, - "SomeGuidProperty": edmGuid, - "SomeInt64Property": edmInt64} - -var complexPayload = "{\"odata.etag\": \"W/\\\"datetime'2021-04-05T05%3A02%3A40.7371784Z'\\\"\"," + - "\"PartitionKey\": \"somePartition\"," + - "\"RowKey\": \"01\"," + - "\"Timestamp\": \"2021-03-23T18:29:15.9686039Z\"," + - "\"SomeBinaryProperty@odata.type\": \"Edm.Binary\"," + - "\"SomeBinaryProperty\": \"AQIDBAU=\"," + - "\"SomeDateProperty@odata.type\": \"Edm.DateTime\"," + - "\"SomeDateProperty\": \"2020-01-01T01:02:00Z\"," + - "\"SomeDoubleProperty0\": 1.0," + - "\"SomeDoubleProperty1\": 1.5," + - "\"SomeGuidProperty@odata.type\": \"Edm.Guid\"," + - "\"SomeGuidProperty\": \"0d391d16-97f1-4b9a-be68-4cc871f90001\"," + - "\"SomeInt64Property@odata.type\": \"Edm.Int64\"," + - "\"SomeInt64Property\": \"" + strconv.FormatInt(math.MaxInt64, 10) + "\"," + - "\"SomeIntProperty\": 42," + - "\"SomeStringProperty\": \"This is table entity number 01\"," + - "\"SomePtrStringProperty\": \"some pointer to string\" }" diff --git a/sdk/tables/aztable/table_service_client.go b/sdk/tables/aztable/table_service_client.go index 7f25d84229cb..878b3fc142e0 100644 --- a/sdk/tables/aztable/table_service_client.go +++ b/sdk/tables/aztable/table_service_client.go @@ -32,7 +32,7 @@ func NewTableServiceClient(serviceURL string, cred azcore.Credential, options *T if isCosmosEndpoint(serviceURL) { conOptions.PerCallPolicies = []azcore.Policy{cosmosPatchTransformPolicy{}} } - conOptions.PerCallPolicies = append(conOptions.PerCallPolicies, cred.AuthenticationPolicy(azcore.AuthenticationPolicyOptions{Options: azcore.TokenRequestOptions{Scopes: options.Scopes}})) + conOptions.PerCallPolicies = append(conOptions.PerCallPolicies, cred.NewAuthenticationPolicy(azcore.AuthenticationOptions{TokenRequest: azcore.TokenRequestOptions{Scopes: options.Scopes}})) conOptions.PerCallPolicies = append(conOptions.PerCallPolicies, options.PerCallOptions...) con := newConnection(serviceURL, conOptions) return &TableServiceClient{client: &tableClient{con}, service: &serviceClient{con}, cred: cred}, nil diff --git a/sdk/tables/aztable/table_service_client_test.go b/sdk/tables/aztable/table_service_client_test.go index b6d0c2d435ce..444de6935415 100644 --- a/sdk/tables/aztable/table_service_client_test.go +++ b/sdk/tables/aztable/table_service_client_test.go @@ -5,14 +5,11 @@ package aztable import ( "context" - "errors" "fmt" - "net/http" "testing" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" - "github.com/Azure/azure-sdk-for-go/sdk/internal/runtime" "github.com/Azure/azure-sdk-for-go/sdk/to" "github.com/stretchr/testify/require" ) @@ -29,10 +26,6 @@ func TestServiceErrorsServiceClient(t *testing.T) { _, err = service.CreateTable(context.Background(), "tableName") require.Error(t, err) - var svcErr *runtime.ResponseError - errors.As(err, &svcErr) - require.Equal(t, svcErr.RawResponse().StatusCode, http.StatusConflict) - _, err = service.DeleteTable(context.Background(), "tableName", nil) require.NoError(t, err) }) @@ -73,7 +66,7 @@ func TestQueryTable(t *testing.T) { prefix1 := "zzza" prefix2 := "zzzb" - defer clearAllTables(service) + defer clearAllTables(service) //nolint //create 10 tables with our exected prefix and 1 with a different prefix for i := 0; i < tableCount; i++ { if i < (tableCount - 1) { diff --git a/sdk/tables/aztable/table_transactional_batch.go b/sdk/tables/aztable/table_transactional_batch.go index d4e7b6ff5d11..cb2227e2fd9d 100644 --- a/sdk/tables/aztable/table_transactional_batch.go +++ b/sdk/tables/aztable/table_transactional_batch.go @@ -83,7 +83,7 @@ type TableTransactionResponse struct { RequestID *string // The response for a single table. - TransactionResponses *[]azcore.Response + TransactionResponses *[]http.Response // Version contains the information returned from the x-ms-version header response. Version *string @@ -97,23 +97,31 @@ type TableSubmitTransactionOptions struct { } // SubmitTransaction submits the table transactional batch according to the slice of TableTransactionActions provided. -func (t *TableClient) SubmitTransaction(ctx context.Context, transactionActions []TableTransactionAction, tableSubmitTransactionOptions *TableSubmitTransactionOptions) (TableTransactionResponse, error) { - return t.submitTransactionInternal(ctx, &transactionActions, uuid.New(), uuid.New(), tableSubmitTransactionOptions) +func (t *TableClient) SubmitTransaction(ctx context.Context, transactionActions []TableTransactionAction, tableSubmitTransactionOptions *TableSubmitTransactionOptions) (*TableTransactionResponse, error) { + u1, err := uuid.New() + if err != nil { + return nil, err + } + u2, err := uuid.New() + if err != nil { + return nil, err + } + return t.submitTransactionInternal(ctx, &transactionActions, u1, u2, tableSubmitTransactionOptions) } // submitTransactionInternal is the internal implementation for SubmitTransaction. It allows for explicit configuration of the batch and changeset UUID values for testing. -func (t *TableClient) submitTransactionInternal(ctx context.Context, transactionActions *[]TableTransactionAction, batchUuid uuid.UUID, changesetUuid uuid.UUID, tableSubmitTransactionOptions *TableSubmitTransactionOptions) (TableTransactionResponse, error) { +func (t *TableClient) submitTransactionInternal(ctx context.Context, transactionActions *[]TableTransactionAction, batchUuid uuid.UUID, changesetUuid uuid.UUID, tableSubmitTransactionOptions *TableSubmitTransactionOptions) (*TableTransactionResponse, error) { if len(*transactionActions) == 0 { - return TableTransactionResponse{}, errors.New(error_empty_transaction) + return &TableTransactionResponse{}, errors.New(error_empty_transaction) } changesetBoundary := fmt.Sprintf("changeset_%s", changesetUuid.String()) changeSetBody, err := t.generateChangesetBody(changesetBoundary, transactionActions) if err != nil { - return TableTransactionResponse{}, err + return &TableTransactionResponse{}, err } req, err := azcore.NewRequest(ctx, http.MethodPost, azcore.JoinPaths(t.client.con.Endpoint(), "$batch")) if err != nil { - return TableTransactionResponse{}, err + return &TableTransactionResponse{}, err } req.Header.Set("x-ms-version", "2019-02-02") if tableSubmitTransactionOptions != nil && tableSubmitTransactionOptions.RequestID != nil { @@ -127,28 +135,28 @@ func (t *TableClient) submitTransactionInternal(ctx context.Context, transaction writer := multipart.NewWriter(body) err = writer.SetBoundary(boundary) if err != nil { - return TableTransactionResponse{}, err + return &TableTransactionResponse{}, err } h := make(textproto.MIMEHeader) h.Set(headerContentType, fmt.Sprintf("multipart/mixed; boundary=%s", changesetBoundary)) batchWriter, err := writer.CreatePart(h) if err != nil { - return TableTransactionResponse{}, err + return &TableTransactionResponse{}, err } _, err = batchWriter.Write(changeSetBody.Bytes()) if err != nil { - return TableTransactionResponse{}, err + return &TableTransactionResponse{}, err } writer.Close() err = req.SetBody(azcore.NopCloser(bytes.NewReader(body.Bytes())), fmt.Sprintf("multipart/mixed; boundary=%s", boundary)) if err != nil { - return TableTransactionResponse{}, err + return &TableTransactionResponse{}, err } resp, err := t.client.con.Pipeline().Do(req) if err != nil { - return TableTransactionResponse{}, err + return &TableTransactionResponse{}, err } transactionResponse, err := buildTransactionResponse(req, resp, len(*transactionActions)) @@ -156,15 +164,15 @@ func (t *TableClient) submitTransactionInternal(ctx context.Context, transaction return transactionResponse, err } - if !resp.HasStatusCode(http.StatusAccepted, http.StatusNoContent) { - return TableTransactionResponse{}, azcore.NewResponseError(err, resp.Response) + if !azcore.HasStatusCode(resp, http.StatusAccepted, http.StatusNoContent) { + return &TableTransactionResponse{}, azcore.NewResponseError(err, resp) } return transactionResponse, nil } -func buildTransactionResponse(req *azcore.Request, resp *azcore.Response, itemCount int) (TableTransactionResponse, error) { - innerResponses := make([]azcore.Response, itemCount) - result := TableTransactionResponse{RawResponse: resp.Response, TransactionResponses: &innerResponses} +func buildTransactionResponse(req *azcore.Request, resp *http.Response, itemCount int) (*TableTransactionResponse, error) { + innerResponses := make([]http.Response, itemCount) + result := TableTransactionResponse{RawResponse: resp, TransactionResponses: &innerResponses} if val := resp.Header.Get("x-ms-client-request-id"); val != "" { result.ClientRequestID = &val @@ -178,7 +186,7 @@ func buildTransactionResponse(req *azcore.Request, resp *azcore.Response, itemCo if val := resp.Header.Get("Date"); val != "" { date, err := time.Parse(time.RFC1123, val) if err != nil { - return TableTransactionResponse{}, err + return &TableTransactionResponse{}, err } result.Date = &date } @@ -192,19 +200,19 @@ func buildTransactionResponse(req *azcore.Request, resp *azcore.Response, itemCo bytesBody, err := ioutil.ReadAll(resp.Body) if err != nil { - return TableTransactionResponse{}, err + return &TableTransactionResponse{}, err } reader := bytes.NewReader(bytesBody) if bytes.IndexByte(bytesBody, '{') == 0 { // This is a failure and the body is json - return TableTransactionResponse{}, newTableTransactionError(bytesBody) + return &TableTransactionResponse{}, newTableTransactionError(bytesBody) } outerBoundary := getBoundaryName(bytesBody) mpReader := multipart.NewReader(reader, outerBoundary) outerPart, err := mpReader.NextPart() if err != nil { - return TableTransactionResponse{}, err + return &TableTransactionResponse{}, err } innerBytes, err := ioutil.ReadAll(outerPart) //nolint @@ -220,22 +228,22 @@ func buildTransactionResponse(req *azcore.Request, resp *azcore.Response, itemCo } r, err := http.ReadResponse(bufio.NewReader(bytes.NewBuffer(part)), req.Request) if err != nil { - return TableTransactionResponse{}, err + return &TableTransactionResponse{}, err } if r.StatusCode >= 400 { errorBody, err := ioutil.ReadAll(r.Body) if err != nil { - return TableTransactionResponse{}, err + return &TableTransactionResponse{}, err } else { - innerResponses = []azcore.Response{{Response: r}} - return result, newTableTransactionError(errorBody) + innerResponses = []http.Response{*r} + return &result, newTableTransactionError(errorBody) } } - innerResponses[i] = azcore.Response{Response: r} + innerResponses[i] = *r i++ } - return result, nil + return &result, nil } func getBoundaryName(bytesBody []byte) string { diff --git a/sdk/tables/aztable/zc_client_options.go b/sdk/tables/aztable/zc_client_options.go index ef2678419057..7109060d7ac1 100644 --- a/sdk/tables/aztable/zc_client_options.go +++ b/sdk/tables/aztable/zc_client_options.go @@ -9,7 +9,7 @@ import ( type TableClientOptions struct { // HTTPClient sets the transport for making HTTP requests. - HTTPClient azcore.Transport + HTTPClient azcore.Transporter // Retry configures the built-in retry policy behavior. Retry azcore.RetryOptions // Telemetry configures the built-in telemetry policy behavior. diff --git a/sdk/tables/aztable/zc_table_constants.go b/sdk/tables/aztable/zc_table_constants.go index 476cd2ba81e0..34c70e703d9c 100644 --- a/sdk/tables/aztable/zc_table_constants.go +++ b/sdk/tables/aztable/zc_table_constants.go @@ -6,23 +6,14 @@ package aztable import "errors" const ( - timestamp = "Timestamp" - partitionKey = "PartitionKey" - rowKey = "RowKey" - etagOdata = "odata.etag" - etag = "ETag" - odataMetadata = "odata.metadata" - OdataType = "@odata.type" - edmBinary = "Edm.Binary" - edmBoolean = "Emd.Boolean" - edmDateTime = "Edm.DateTime" - edmDouble = "Edm.Double" - edmGuid = "Edm.Guid" - edmInt32 = "Edm.Int32" - edmInt64 = "Edm.Int64" - edmString = "Edm.String" - ISO8601 = "2006-01-02T15:04:05.9999999Z" + timestamp = "Timestamp" + partitionKey = "PartitionKey" + rowKey = "RowKey" + etagOdata = "odata.etag" + etag = "ETag" + OdataType = "@odata.type" + ISO8601 = "2006-01-02T15:04:05.9999999Z" ) -var partitionKeyRowKeyError = errors.New("Entity must have a PartitionKey and RowKey") -var tooManyAccessPoliciesError = errors.New("You cannot set more than five (5) access policies at a time.") +var errPartitionKeyRowKeyError = errors.New("entity must have a PartitionKey and RowKey") +var errTooManyAccessPoliciesError = errors.New("you cannot set more than five (5) access policies at a time.") diff --git a/sdk/tables/aztable/zt_table_recorded_tests.go b/sdk/tables/aztable/zt_table_recorded_tests.go index c6ea9f6a4c10..da90be062fda 100644 --- a/sdk/tables/aztable/zt_table_recorded_tests.go +++ b/sdk/tables/aztable/zt_table_recorded_tests.go @@ -10,26 +10,12 @@ import ( "testing" "time" - "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/stretchr/testify/require" ) -type testContext struct { - recording *recording.Recording - client *TableServiceClient - context *recording.TestContext -} - const ( - storageAccountNameEnvVar = "TABLES_STORAGE_ACCOUNT_NAME" - cosmosAccountNameEnnVar = "TABLES_COSMOS_ACCOUNT_NAME" - storageEndpointSuffixEnvVar = "STORAGE_ENDPOINT_SUFFIX" - cosmosEndpointSuffixEnvVar = "COSMOS_TABLES_ENDPOINT_SUFFIX" - storageAccountKeyEnvVar = "TABLES_PRIMARY_STORAGE_ACCOUNT_KEY" - cosmosAccountKeyEnvVar = "TABLES_PRIMARY_COSMOS_ACCOUNT_KEY" - tableNamePrefix = "gotable" - DefaultStorageSuffix = "core.windows.net" - DefaultCosmosSuffix = "cosmos.azure.com" + DefaultStorageSuffix = "core.windows.net" + DefaultCosmosSuffix = "cosmos.azure.com" ) type EndpointType string @@ -68,37 +54,6 @@ func insertNEntities(pk string, n int, client *TableClient) error { return nil } -// cleans up the specified tables. If tables is nil, all tables will be deleted -func cleanupTables(context *testContext, tables *[]string) { - c := context.client - if tables == nil { - pager := c.ListTables(nil) - for pager.NextPage(ctx) { - for _, t := range pager.PageResponse().TableListResponse.Value { - _, err := c.DeleteTable(ctx, *t.TableName, nil) - if err != nil { - fmt.Printf("Error cleaning up tables. %v\n", err.Error()) - } - } - } - } else { - for _, t := range *tables { - _, err := c.DeleteTable(ctx, t, nil) - if err != nil { - fmt.Printf("There was an error cleaning up tests. %v\n", err.Error()) - } - } - } -} - -func getTableName(context *testContext, prefix ...string) (string, error) { - if len(prefix) == 0 { - return context.recording.GenerateAlphaNumericID(tableNamePrefix, 20, true) - } else { - return context.recording.GenerateAlphaNumericID(prefix[0], 20, true) - } -} - type basicTestEntity struct { Entity Integer int32 diff --git a/sdk/tables/aztable/zz_generated_connection.go b/sdk/tables/aztable/zz_generated_connection.go index 6aa8ad00d8b3..ca47a829f076 100644 --- a/sdk/tables/aztable/zz_generated_connection.go +++ b/sdk/tables/aztable/zz_generated_connection.go @@ -1,3 +1,4 @@ +//go:build go1.13 // +build go1.13 // Copyright (c) Microsoft Corporation. All rights reserved. @@ -17,7 +18,7 @@ import ( // All zero-value fields will be initialized with their default values. type connectionOptions struct { // HTTPClient sets the transport for making HTTP requests. - HTTPClient azcore.Transport + HTTPClient azcore.Transporter // Retry configures the built-in retry policy behavior. Retry azcore.RetryOptions // Telemetry configures the built-in telemetry policy behavior. diff --git a/sdk/tables/aztable/zz_generated_constants.go b/sdk/tables/aztable/zz_generated_constants.go index 3e7b261c70c7..a1ff9041bd71 100644 --- a/sdk/tables/aztable/zz_generated_constants.go +++ b/sdk/tables/aztable/zz_generated_constants.go @@ -1,3 +1,4 @@ +//go:build go1.13 // +build go1.13 // Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/tables/aztable/zz_generated_models.go b/sdk/tables/aztable/zz_generated_models.go index 7094e996e262..2a31433b5e0c 100644 --- a/sdk/tables/aztable/zz_generated_models.go +++ b/sdk/tables/aztable/zz_generated_models.go @@ -1,3 +1,4 @@ +//go:build go1.13 // +build go1.13 // Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/tables/aztable/zz_generated_response_types.go b/sdk/tables/aztable/zz_generated_response_types.go index e962b27b4774..70aa81764405 100644 --- a/sdk/tables/aztable/zz_generated_response_types.go +++ b/sdk/tables/aztable/zz_generated_response_types.go @@ -1,3 +1,4 @@ +//go:build go1.13 // +build go1.13 // Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/tables/aztable/zz_generated_service_client.go b/sdk/tables/aztable/zz_generated_service_client.go index afa44c086aee..cfa06d54479e 100644 --- a/sdk/tables/aztable/zz_generated_service_client.go +++ b/sdk/tables/aztable/zz_generated_service_client.go @@ -1,3 +1,4 @@ +//go:build go1.13 // +build go1.13 // Copyright (c) Microsoft Corporation. All rights reserved. @@ -10,10 +11,11 @@ package aztable import ( "context" "fmt" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" "net/http" "strconv" "time" + + "github.com/Azure/azure-sdk-for-go/sdk/azcore" ) type serviceClient struct { @@ -31,7 +33,7 @@ func (client *serviceClient) GetProperties(ctx context.Context, options *Service if err != nil { return TableServicePropertiesResponse{}, err } - if !resp.HasStatusCode(http.StatusOK) { + if !azcore.HasStatusCode(resp, http.StatusOK) { return TableServicePropertiesResponse{}, client.getPropertiesHandleError(resp) } return client.getPropertiesHandleResponse(resp) @@ -60,12 +62,12 @@ func (client *serviceClient) getPropertiesCreateRequest(ctx context.Context, opt } // getPropertiesHandleResponse handles the GetProperties response. -func (client *serviceClient) getPropertiesHandleResponse(resp *azcore.Response) (TableServicePropertiesResponse, error) { +func (client *serviceClient) getPropertiesHandleResponse(resp *http.Response) (TableServicePropertiesResponse, error) { var val *TableServiceProperties - if err := resp.UnmarshalAsXML(&val); err != nil { + if err := azcore.UnmarshalAsXML(resp, &val); err != nil { return TableServicePropertiesResponse{}, err } - result := TableServicePropertiesResponse{RawResponse: resp.Response, StorageServiceProperties: val} + result := TableServicePropertiesResponse{RawResponse: resp, StorageServiceProperties: val} if val := resp.Header.Get("x-ms-client-request-id"); val != "" { result.ClientRequestID = &val } @@ -79,16 +81,16 @@ func (client *serviceClient) getPropertiesHandleResponse(resp *azcore.Response) } // getPropertiesHandleError handles the GetProperties error response. -func (client *serviceClient) getPropertiesHandleError(resp *azcore.Response) error { - body, err := resp.Payload() +func (client *serviceClient) getPropertiesHandleError(resp *http.Response) error { + body, err := azcore.Payload(resp) if err != nil { - return azcore.NewResponseError(err, resp.Response) + return azcore.NewResponseError(err, resp) } errType := TableServiceError{raw: string(body)} - if err := resp.UnmarshalAsJSON(&errType); err != nil { - return azcore.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp.Response) + if err := azcore.UnmarshalAsJSON(resp, &errType); err != nil { + return azcore.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) } - return azcore.NewResponseError(&errType, resp.Response) + return azcore.NewResponseError(&errType, resp) } // GetStatistics - Retrieves statistics related to replication for the Table service. It is only available on the secondary location endpoint when read-access @@ -103,7 +105,7 @@ func (client *serviceClient) GetStatistics(ctx context.Context, options *Service if err != nil { return TableServiceStatsResponse{}, err } - if !resp.HasStatusCode(http.StatusOK) { + if !azcore.HasStatusCode(resp, http.StatusOK) { return TableServiceStatsResponse{}, client.getStatisticsHandleError(resp) } return client.getStatisticsHandleResponse(resp) @@ -132,12 +134,12 @@ func (client *serviceClient) getStatisticsCreateRequest(ctx context.Context, opt } // getStatisticsHandleResponse handles the GetStatistics response. -func (client *serviceClient) getStatisticsHandleResponse(resp *azcore.Response) (TableServiceStatsResponse, error) { +func (client *serviceClient) getStatisticsHandleResponse(resp *http.Response) (TableServiceStatsResponse, error) { var val *TableServiceStats - if err := resp.UnmarshalAsXML(&val); err != nil { + if err := azcore.UnmarshalAsXML(resp, &val); err != nil { return TableServiceStatsResponse{}, err } - result := TableServiceStatsResponse{RawResponse: resp.Response, StorageServiceStats: val} + result := TableServiceStatsResponse{RawResponse: resp, StorageServiceStats: val} if val := resp.Header.Get("x-ms-client-request-id"); val != "" { result.ClientRequestID = &val } @@ -158,16 +160,16 @@ func (client *serviceClient) getStatisticsHandleResponse(resp *azcore.Response) } // getStatisticsHandleError handles the GetStatistics error response. -func (client *serviceClient) getStatisticsHandleError(resp *azcore.Response) error { - body, err := resp.Payload() +func (client *serviceClient) getStatisticsHandleError(resp *http.Response) error { + body, err := azcore.Payload(resp) if err != nil { - return azcore.NewResponseError(err, resp.Response) + return azcore.NewResponseError(err, resp) } errType := TableServiceError{raw: string(body)} - if err := resp.UnmarshalAsJSON(&errType); err != nil { - return azcore.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp.Response) + if err := azcore.UnmarshalAsJSON(resp, &errType); err != nil { + return azcore.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) } - return azcore.NewResponseError(&errType, resp.Response) + return azcore.NewResponseError(&errType, resp) } // SetProperties - Sets properties for an account's Table service endpoint, including properties for Analytics and CORS (Cross-Origin Resource Sharing) @@ -182,7 +184,7 @@ func (client *serviceClient) SetProperties(ctx context.Context, tableServiceProp if err != nil { return ServiceSetPropertiesResponse{}, err } - if !resp.HasStatusCode(http.StatusAccepted) { + if !azcore.HasStatusCode(resp, http.StatusAccepted) { return ServiceSetPropertiesResponse{}, client.setPropertiesHandleError(resp) } return client.setPropertiesHandleResponse(resp) @@ -211,8 +213,8 @@ func (client *serviceClient) setPropertiesCreateRequest(ctx context.Context, tab } // setPropertiesHandleResponse handles the SetProperties response. -func (client *serviceClient) setPropertiesHandleResponse(resp *azcore.Response) (ServiceSetPropertiesResponse, error) { - result := ServiceSetPropertiesResponse{RawResponse: resp.Response} +func (client *serviceClient) setPropertiesHandleResponse(resp *http.Response) (ServiceSetPropertiesResponse, error) { + result := ServiceSetPropertiesResponse{RawResponse: resp} if val := resp.Header.Get("x-ms-client-request-id"); val != "" { result.ClientRequestID = &val } @@ -226,14 +228,14 @@ func (client *serviceClient) setPropertiesHandleResponse(resp *azcore.Response) } // setPropertiesHandleError handles the SetProperties error response. -func (client *serviceClient) setPropertiesHandleError(resp *azcore.Response) error { - body, err := resp.Payload() +func (client *serviceClient) setPropertiesHandleError(resp *http.Response) error { + body, err := azcore.Payload(resp) if err != nil { - return azcore.NewResponseError(err, resp.Response) + return azcore.NewResponseError(err, resp) } errType := TableServiceError{raw: string(body)} - if err := resp.UnmarshalAsJSON(&errType); err != nil { - return azcore.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp.Response) + if err := azcore.UnmarshalAsJSON(resp, &errType); err != nil { + return azcore.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) } - return azcore.NewResponseError(&errType, resp.Response) + return azcore.NewResponseError(&errType, resp) } diff --git a/sdk/tables/aztable/zz_generated_table_client.go b/sdk/tables/aztable/zz_generated_table_client.go index 13645c322257..e942cb6f2c04 100644 --- a/sdk/tables/aztable/zz_generated_table_client.go +++ b/sdk/tables/aztable/zz_generated_table_client.go @@ -1,3 +1,4 @@ +//go:build go1.13 // +build go1.13 // Copyright (c) Microsoft Corporation. All rights reserved. @@ -12,12 +13,13 @@ import ( "encoding/xml" "errors" "fmt" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" "net/http" "net/url" "strconv" "strings" "time" + + "github.com/Azure/azure-sdk-for-go/sdk/azcore" ) type tableClient struct { @@ -36,7 +38,7 @@ func (client *tableClient) Create(ctx context.Context, tableProperties TableProp if err != nil { return nil, err } - if !resp.HasStatusCode(http.StatusCreated, http.StatusNoContent) { + if !azcore.HasStatusCode(resp, http.StatusCreated, http.StatusNoContent) { return nil, client.createHandleError(resp) } return client.createHandleResponse(resp) @@ -68,14 +70,14 @@ func (client *tableClient) createCreateRequest(ctx context.Context, tablePropert } // createHandleResponse handles the Create response. -func (client *tableClient) createHandleResponse(resp *azcore.Response) (interface{}, error) { +func (client *tableClient) createHandleResponse(resp *http.Response) (interface{}, error) { switch resp.StatusCode { case http.StatusCreated: var val *TableResponse - if err := resp.UnmarshalAsJSON(&val); err != nil { + if err := azcore.UnmarshalAsJSON(resp, &val); err != nil { return nil, err } - result := TableResponseResponse{RawResponse: resp.Response, TableResponse: val} + result := TableResponseResponse{RawResponse: resp, TableResponse: val} if val := resp.Header.Get("x-ms-client-request-id"); val != "" { result.ClientRequestID = &val } @@ -97,7 +99,7 @@ func (client *tableClient) createHandleResponse(resp *azcore.Response) (interfac } return result, nil case http.StatusNoContent: - result := TableCreateResponse{RawResponse: resp.Response} + result := TableCreateResponse{RawResponse: resp} if val := resp.Header.Get("x-ms-client-request-id"); val != "" { result.ClientRequestID = &val } @@ -124,16 +126,16 @@ func (client *tableClient) createHandleResponse(resp *azcore.Response) (interfac } // createHandleError handles the Create error response. -func (client *tableClient) createHandleError(resp *azcore.Response) error { - body, err := resp.Payload() +func (client *tableClient) createHandleError(resp *http.Response) error { + body, err := azcore.Payload(resp) if err != nil { - return azcore.NewResponseError(err, resp.Response) + return azcore.NewResponseError(err, resp) } errType := TableServiceError{raw: string(body)} - if err := resp.UnmarshalAsJSON(&errType); err != nil { - return azcore.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp.Response) + if err := azcore.UnmarshalAsJSON(resp, &errType); err != nil { + return azcore.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) } - return azcore.NewResponseError(&errType, resp.Response) + return azcore.NewResponseError(&errType, resp) } // Delete - Operation permanently deletes the specified table. @@ -147,7 +149,7 @@ func (client *tableClient) Delete(ctx context.Context, table string, options *Ta if err != nil { return TableDeleteResponse{}, err } - if !resp.HasStatusCode(http.StatusNoContent) { + if !azcore.HasStatusCode(resp, http.StatusNoContent) { return TableDeleteResponse{}, client.deleteHandleError(resp) } return client.deleteHandleResponse(resp) @@ -174,8 +176,8 @@ func (client *tableClient) deleteCreateRequest(ctx context.Context, table string } // deleteHandleResponse handles the Delete response. -func (client *tableClient) deleteHandleResponse(resp *azcore.Response) (TableDeleteResponse, error) { - result := TableDeleteResponse{RawResponse: resp.Response} +func (client *tableClient) deleteHandleResponse(resp *http.Response) (TableDeleteResponse, error) { + result := TableDeleteResponse{RawResponse: resp} if val := resp.Header.Get("x-ms-client-request-id"); val != "" { result.ClientRequestID = &val } @@ -196,16 +198,16 @@ func (client *tableClient) deleteHandleResponse(resp *azcore.Response) (TableDel } // deleteHandleError handles the Delete error response. -func (client *tableClient) deleteHandleError(resp *azcore.Response) error { - body, err := resp.Payload() +func (client *tableClient) deleteHandleError(resp *http.Response) error { + body, err := azcore.Payload(resp) if err != nil { - return azcore.NewResponseError(err, resp.Response) + return azcore.NewResponseError(err, resp) } errType := TableServiceError{raw: string(body)} - if err := resp.UnmarshalAsJSON(&errType); err != nil { - return azcore.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp.Response) + if err := azcore.UnmarshalAsJSON(resp, &errType); err != nil { + return azcore.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) } - return azcore.NewResponseError(&errType, resp.Response) + return azcore.NewResponseError(&errType, resp) } // DeleteEntity - Deletes the specified entity in a table. @@ -219,7 +221,7 @@ func (client *tableClient) DeleteEntity(ctx context.Context, table string, parti if err != nil { return TableDeleteEntityResponse{}, err } - if !resp.HasStatusCode(http.StatusNoContent) { + if !azcore.HasStatusCode(resp, http.StatusNoContent) { return TableDeleteEntityResponse{}, client.deleteEntityHandleError(resp) } return client.deleteEntityHandleResponse(resp) @@ -264,8 +266,8 @@ func (client *tableClient) deleteEntityCreateRequest(ctx context.Context, table } // deleteEntityHandleResponse handles the DeleteEntity response. -func (client *tableClient) deleteEntityHandleResponse(resp *azcore.Response) (TableDeleteEntityResponse, error) { - result := TableDeleteEntityResponse{RawResponse: resp.Response} +func (client *tableClient) deleteEntityHandleResponse(resp *http.Response) (TableDeleteEntityResponse, error) { + result := TableDeleteEntityResponse{RawResponse: resp} if val := resp.Header.Get("x-ms-client-request-id"); val != "" { result.ClientRequestID = &val } @@ -286,16 +288,16 @@ func (client *tableClient) deleteEntityHandleResponse(resp *azcore.Response) (Ta } // deleteEntityHandleError handles the DeleteEntity error response. -func (client *tableClient) deleteEntityHandleError(resp *azcore.Response) error { - body, err := resp.Payload() +func (client *tableClient) deleteEntityHandleError(resp *http.Response) error { + body, err := azcore.Payload(resp) if err != nil { - return azcore.NewResponseError(err, resp.Response) + return azcore.NewResponseError(err, resp) } errType := TableServiceError{raw: string(body)} - if err := resp.UnmarshalAsJSON(&errType); err != nil { - return azcore.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp.Response) + if err := azcore.UnmarshalAsJSON(resp, &errType); err != nil { + return azcore.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) } - return azcore.NewResponseError(&errType, resp.Response) + return azcore.NewResponseError(&errType, resp) } // GetAccessPolicy - Retrieves details about any stored access policies specified on the table that may be used with Shared Access Signatures. @@ -309,7 +311,7 @@ func (client *tableClient) GetAccessPolicy(ctx context.Context, table string, op if err != nil { return SignedIdentifierArrayResponse{}, err } - if !resp.HasStatusCode(http.StatusOK) { + if !azcore.HasStatusCode(resp, http.StatusOK) { return SignedIdentifierArrayResponse{}, client.getAccessPolicyHandleError(resp) } return client.getAccessPolicyHandleResponse(resp) @@ -342,9 +344,9 @@ func (client *tableClient) getAccessPolicyCreateRequest(ctx context.Context, tab } // getAccessPolicyHandleResponse handles the GetAccessPolicy response. -func (client *tableClient) getAccessPolicyHandleResponse(resp *azcore.Response) (SignedIdentifierArrayResponse, error) { - result := SignedIdentifierArrayResponse{RawResponse: resp.Response} - if err := resp.UnmarshalAsXML(&result); err != nil { +func (client *tableClient) getAccessPolicyHandleResponse(resp *http.Response) (SignedIdentifierArrayResponse, error) { + result := SignedIdentifierArrayResponse{RawResponse: resp} + if err := azcore.UnmarshalAsXML(resp, &result); err != nil { return SignedIdentifierArrayResponse{}, err } if val := resp.Header.Get("x-ms-client-request-id"); val != "" { @@ -367,16 +369,16 @@ func (client *tableClient) getAccessPolicyHandleResponse(resp *azcore.Response) } // getAccessPolicyHandleError handles the GetAccessPolicy error response. -func (client *tableClient) getAccessPolicyHandleError(resp *azcore.Response) error { - body, err := resp.Payload() +func (client *tableClient) getAccessPolicyHandleError(resp *http.Response) error { + body, err := azcore.Payload(resp) if err != nil { - return azcore.NewResponseError(err, resp.Response) + return azcore.NewResponseError(err, resp) } errType := TableServiceError{raw: string(body)} - if err := resp.UnmarshalAsJSON(&errType); err != nil { - return azcore.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp.Response) + if err := azcore.UnmarshalAsJSON(resp, &errType); err != nil { + return azcore.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) } - return azcore.NewResponseError(&errType, resp.Response) + return azcore.NewResponseError(&errType, resp) } // InsertEntity - Insert entity in a table. @@ -391,7 +393,7 @@ func (client *tableClient) InsertEntity(ctx context.Context, table string, table if err != nil { return nil, err } - if !resp.HasStatusCode(http.StatusCreated, http.StatusNoContent) { + if !azcore.HasStatusCode(resp, http.StatusCreated, http.StatusNoContent) { return nil, client.insertEntityHandleError(resp) } return client.insertEntityHandleResponse(resp) @@ -433,14 +435,14 @@ func (client *tableClient) insertEntityCreateRequest(ctx context.Context, table } // insertEntityHandleResponse handles the InsertEntity response. -func (client *tableClient) insertEntityHandleResponse(resp *azcore.Response) (interface{}, error) { +func (client *tableClient) insertEntityHandleResponse(resp *http.Response) (interface{}, error) { switch resp.StatusCode { case http.StatusCreated: var val map[string]interface{} - if err := resp.UnmarshalAsJSON(&val); err != nil { + if err := azcore.UnmarshalAsJSON(resp, &val); err != nil { return nil, err } - result := MapOfInterfaceResponse{RawResponse: resp.Response, Value: val} + result := MapOfInterfaceResponse{RawResponse: resp, Value: val} if val := resp.Header.Get("x-ms-client-request-id"); val != "" { result.ClientRequestID = &val } @@ -474,7 +476,7 @@ func (client *tableClient) insertEntityHandleResponse(resp *azcore.Response) (in } return result, nil case http.StatusNoContent: - result := TableInsertEntityResponse{RawResponse: resp.Response} + result := TableInsertEntityResponse{RawResponse: resp} if val := resp.Header.Get("x-ms-client-request-id"); val != "" { result.ClientRequestID = &val } @@ -507,16 +509,16 @@ func (client *tableClient) insertEntityHandleResponse(resp *azcore.Response) (in } // insertEntityHandleError handles the InsertEntity error response. -func (client *tableClient) insertEntityHandleError(resp *azcore.Response) error { - body, err := resp.Payload() +func (client *tableClient) insertEntityHandleError(resp *http.Response) error { + body, err := azcore.Payload(resp) if err != nil { - return azcore.NewResponseError(err, resp.Response) + return azcore.NewResponseError(err, resp) } errType := TableServiceError{raw: string(body)} - if err := resp.UnmarshalAsJSON(&errType); err != nil { - return azcore.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp.Response) + if err := azcore.UnmarshalAsJSON(resp, &errType); err != nil { + return azcore.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) } - return azcore.NewResponseError(&errType, resp.Response) + return azcore.NewResponseError(&errType, resp) } // MergeEntity - Merge entity in a table. @@ -530,7 +532,7 @@ func (client *tableClient) MergeEntity(ctx context.Context, table string, partit if err != nil { return TableMergeEntityResponse{}, err } - if !resp.HasStatusCode(http.StatusNoContent) { + if !azcore.HasStatusCode(resp, http.StatusNoContent) { return TableMergeEntityResponse{}, client.mergeEntityHandleError(resp) } return client.mergeEntityHandleResponse(resp) @@ -580,8 +582,8 @@ func (client *tableClient) mergeEntityCreateRequest(ctx context.Context, table s } // mergeEntityHandleResponse handles the MergeEntity response. -func (client *tableClient) mergeEntityHandleResponse(resp *azcore.Response) (TableMergeEntityResponse, error) { - result := TableMergeEntityResponse{RawResponse: resp.Response} +func (client *tableClient) mergeEntityHandleResponse(resp *http.Response) (TableMergeEntityResponse, error) { + result := TableMergeEntityResponse{RawResponse: resp} if val := resp.Header.Get("x-ms-client-request-id"); val != "" { result.ClientRequestID = &val } @@ -605,16 +607,16 @@ func (client *tableClient) mergeEntityHandleResponse(resp *azcore.Response) (Tab } // mergeEntityHandleError handles the MergeEntity error response. -func (client *tableClient) mergeEntityHandleError(resp *azcore.Response) error { - body, err := resp.Payload() +func (client *tableClient) mergeEntityHandleError(resp *http.Response) error { + body, err := azcore.Payload(resp) if err != nil { - return azcore.NewResponseError(err, resp.Response) + return azcore.NewResponseError(err, resp) } errType := TableServiceError{raw: string(body)} - if err := resp.UnmarshalAsJSON(&errType); err != nil { - return azcore.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp.Response) + if err := azcore.UnmarshalAsJSON(resp, &errType); err != nil { + return azcore.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) } - return azcore.NewResponseError(&errType, resp.Response) + return azcore.NewResponseError(&errType, resp) } // Query - Queries tables under the given account. @@ -628,7 +630,7 @@ func (client *tableClient) Query(ctx context.Context, tableQueryOptions *TableQu if err != nil { return TableQueryResponseResponse{}, err } - if !resp.HasStatusCode(http.StatusOK) { + if !azcore.HasStatusCode(resp, http.StatusOK) { return TableQueryResponseResponse{}, client.queryHandleError(resp) } return client.queryHandleResponse(resp) @@ -669,12 +671,12 @@ func (client *tableClient) queryCreateRequest(ctx context.Context, tableQueryOpt } // queryHandleResponse handles the Query response. -func (client *tableClient) queryHandleResponse(resp *azcore.Response) (TableQueryResponseResponse, error) { +func (client *tableClient) queryHandleResponse(resp *http.Response) (TableQueryResponseResponse, error) { var val *TableQueryResponse - if err := resp.UnmarshalAsJSON(&val); err != nil { + if err := azcore.UnmarshalAsJSON(resp, &val); err != nil { return TableQueryResponseResponse{}, err } - result := TableQueryResponseResponse{RawResponse: resp.Response, TableQueryResponse: val} + result := TableQueryResponseResponse{RawResponse: resp, TableQueryResponse: val} if val := resp.Header.Get("x-ms-client-request-id"); val != "" { result.ClientRequestID = &val } @@ -698,15 +700,15 @@ func (client *tableClient) queryHandleResponse(resp *azcore.Response) (TableQuer } // queryHandleError handles the Query error response. -func (client *tableClient) queryHandleError(resp *azcore.Response) error { - body, err := resp.Payload() +func (client *tableClient) queryHandleError(resp *http.Response) error { + body, err := azcore.Payload(resp) if err != nil { - return azcore.NewResponseError(err, resp.Response) + return azcore.NewResponseError(err, resp) } if len(body) == 0 { - return azcore.NewResponseError(errors.New(resp.Status), resp.Response) + return azcore.NewResponseError(errors.New(resp.Status), resp) } - return azcore.NewResponseError(errors.New(string(body)), resp.Response) + return azcore.NewResponseError(errors.New(string(body)), resp) } // QueryEntities - Queries entities in a table. @@ -720,7 +722,7 @@ func (client *tableClient) QueryEntities(ctx context.Context, table string, tabl if err != nil { return TableEntityQueryResponseResponse{}, err } - if !resp.HasStatusCode(http.StatusOK) { + if !azcore.HasStatusCode(resp, http.StatusOK) { return TableEntityQueryResponseResponse{}, client.queryEntitiesHandleError(resp) } return client.queryEntitiesHandleResponse(resp) @@ -771,12 +773,12 @@ func (client *tableClient) queryEntitiesCreateRequest(ctx context.Context, table } // queryEntitiesHandleResponse handles the QueryEntities response. -func (client *tableClient) queryEntitiesHandleResponse(resp *azcore.Response) (TableEntityQueryResponseResponse, error) { +func (client *tableClient) queryEntitiesHandleResponse(resp *http.Response) (TableEntityQueryResponseResponse, error) { var val *TableEntityQueryResponse - if err := resp.UnmarshalAsJSON(&val); err != nil { + if err := azcore.UnmarshalAsJSON(resp, &val); err != nil { return TableEntityQueryResponseResponse{}, err } - result := TableEntityQueryResponseResponse{RawResponse: resp.Response, TableEntityQueryResponse: val} + result := TableEntityQueryResponseResponse{RawResponse: resp, TableEntityQueryResponse: val} if val := resp.Header.Get("x-ms-client-request-id"); val != "" { result.ClientRequestID = &val } @@ -803,16 +805,16 @@ func (client *tableClient) queryEntitiesHandleResponse(resp *azcore.Response) (T } // queryEntitiesHandleError handles the QueryEntities error response. -func (client *tableClient) queryEntitiesHandleError(resp *azcore.Response) error { - body, err := resp.Payload() +func (client *tableClient) queryEntitiesHandleError(resp *http.Response) error { + body, err := azcore.Payload(resp) if err != nil { - return azcore.NewResponseError(err, resp.Response) + return azcore.NewResponseError(err, resp) } errType := TableServiceError{raw: string(body)} - if err := resp.UnmarshalAsJSON(&errType); err != nil { - return azcore.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp.Response) + if err := azcore.UnmarshalAsJSON(resp, &errType); err != nil { + return azcore.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) } - return azcore.NewResponseError(&errType, resp.Response) + return azcore.NewResponseError(&errType, resp) } // QueryEntityWithPartitionAndRowKey - Queries a single entity in a table. @@ -826,7 +828,7 @@ func (client *tableClient) QueryEntityWithPartitionAndRowKey(ctx context.Context if err != nil { return MapOfInterfaceResponse{}, err } - if !resp.HasStatusCode(http.StatusOK) { + if !azcore.HasStatusCode(resp, http.StatusOK) { return MapOfInterfaceResponse{}, client.queryEntityWithPartitionAndRowKeyHandleError(resp) } return client.queryEntityWithPartitionAndRowKeyHandleResponse(resp) @@ -876,12 +878,12 @@ func (client *tableClient) queryEntityWithPartitionAndRowKeyCreateRequest(ctx co } // queryEntityWithPartitionAndRowKeyHandleResponse handles the QueryEntityWithPartitionAndRowKey response. -func (client *tableClient) queryEntityWithPartitionAndRowKeyHandleResponse(resp *azcore.Response) (MapOfInterfaceResponse, error) { +func (client *tableClient) queryEntityWithPartitionAndRowKeyHandleResponse(resp *http.Response) (MapOfInterfaceResponse, error) { var val map[string]interface{} - if err := resp.UnmarshalAsJSON(&val); err != nil { + if err := azcore.UnmarshalAsJSON(resp, &val); err != nil { return MapOfInterfaceResponse{}, err } - result := MapOfInterfaceResponse{RawResponse: resp.Response, Value: val} + result := MapOfInterfaceResponse{RawResponse: resp, Value: val} if val := resp.Header.Get("x-ms-client-request-id"); val != "" { result.ClientRequestID = &val } @@ -917,16 +919,16 @@ func (client *tableClient) queryEntityWithPartitionAndRowKeyHandleResponse(resp } // queryEntityWithPartitionAndRowKeyHandleError handles the QueryEntityWithPartitionAndRowKey error response. -func (client *tableClient) queryEntityWithPartitionAndRowKeyHandleError(resp *azcore.Response) error { - body, err := resp.Payload() +func (client *tableClient) queryEntityWithPartitionAndRowKeyHandleError(resp *http.Response) error { + body, err := azcore.Payload(resp) if err != nil { - return azcore.NewResponseError(err, resp.Response) + return azcore.NewResponseError(err, resp) } errType := TableServiceError{raw: string(body)} - if err := resp.UnmarshalAsJSON(&errType); err != nil { - return azcore.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp.Response) + if err := azcore.UnmarshalAsJSON(resp, &errType); err != nil { + return azcore.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) } - return azcore.NewResponseError(&errType, resp.Response) + return azcore.NewResponseError(&errType, resp) } // SetAccessPolicy - Sets stored access policies for the table that may be used with Shared Access Signatures. @@ -940,7 +942,7 @@ func (client *tableClient) SetAccessPolicy(ctx context.Context, table string, op if err != nil { return TableSetAccessPolicyResponse{}, err } - if !resp.HasStatusCode(http.StatusNoContent) { + if !azcore.HasStatusCode(resp, http.StatusNoContent) { return TableSetAccessPolicyResponse{}, client.setAccessPolicyHandleError(resp) } return client.setAccessPolicyHandleResponse(resp) @@ -980,8 +982,8 @@ func (client *tableClient) setAccessPolicyCreateRequest(ctx context.Context, tab } // setAccessPolicyHandleResponse handles the SetAccessPolicy response. -func (client *tableClient) setAccessPolicyHandleResponse(resp *azcore.Response) (TableSetAccessPolicyResponse, error) { - result := TableSetAccessPolicyResponse{RawResponse: resp.Response} +func (client *tableClient) setAccessPolicyHandleResponse(resp *http.Response) (TableSetAccessPolicyResponse, error) { + result := TableSetAccessPolicyResponse{RawResponse: resp} if val := resp.Header.Get("x-ms-client-request-id"); val != "" { result.ClientRequestID = &val } @@ -1002,16 +1004,16 @@ func (client *tableClient) setAccessPolicyHandleResponse(resp *azcore.Response) } // setAccessPolicyHandleError handles the SetAccessPolicy error response. -func (client *tableClient) setAccessPolicyHandleError(resp *azcore.Response) error { - body, err := resp.Payload() +func (client *tableClient) setAccessPolicyHandleError(resp *http.Response) error { + body, err := azcore.Payload(resp) if err != nil { - return azcore.NewResponseError(err, resp.Response) + return azcore.NewResponseError(err, resp) } errType := TableServiceError{raw: string(body)} - if err := resp.UnmarshalAsJSON(&errType); err != nil { - return azcore.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp.Response) + if err := azcore.UnmarshalAsJSON(resp, &errType); err != nil { + return azcore.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) } - return azcore.NewResponseError(&errType, resp.Response) + return azcore.NewResponseError(&errType, resp) } // UpdateEntity - Update entity in a table. @@ -1025,7 +1027,7 @@ func (client *tableClient) UpdateEntity(ctx context.Context, table string, parti if err != nil { return TableUpdateEntityResponse{}, err } - if !resp.HasStatusCode(http.StatusNoContent) { + if !azcore.HasStatusCode(resp, http.StatusNoContent) { return TableUpdateEntityResponse{}, client.updateEntityHandleError(resp) } return client.updateEntityHandleResponse(resp) @@ -1075,8 +1077,8 @@ func (client *tableClient) updateEntityCreateRequest(ctx context.Context, table } // updateEntityHandleResponse handles the UpdateEntity response. -func (client *tableClient) updateEntityHandleResponse(resp *azcore.Response) (TableUpdateEntityResponse, error) { - result := TableUpdateEntityResponse{RawResponse: resp.Response} +func (client *tableClient) updateEntityHandleResponse(resp *http.Response) (TableUpdateEntityResponse, error) { + result := TableUpdateEntityResponse{RawResponse: resp} if val := resp.Header.Get("x-ms-client-request-id"); val != "" { result.ClientRequestID = &val } @@ -1100,14 +1102,14 @@ func (client *tableClient) updateEntityHandleResponse(resp *azcore.Response) (Ta } // updateEntityHandleError handles the UpdateEntity error response. -func (client *tableClient) updateEntityHandleError(resp *azcore.Response) error { - body, err := resp.Payload() +func (client *tableClient) updateEntityHandleError(resp *http.Response) error { + body, err := azcore.Payload(resp) if err != nil { - return azcore.NewResponseError(err, resp.Response) + return azcore.NewResponseError(err, resp) } errType := TableServiceError{raw: string(body)} - if err := resp.UnmarshalAsJSON(&errType); err != nil { - return azcore.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp.Response) + if err := azcore.UnmarshalAsJSON(resp, &errType); err != nil { + return azcore.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) } - return azcore.NewResponseError(&errType, resp.Response) + return azcore.NewResponseError(&errType, resp) } diff --git a/sdk/tables/aztable/zz_generated_time_rfc1123.go b/sdk/tables/aztable/zz_generated_time_rfc1123.go index e8cd4d9053de..f1ea29aa7efe 100644 --- a/sdk/tables/aztable/zz_generated_time_rfc1123.go +++ b/sdk/tables/aztable/zz_generated_time_rfc1123.go @@ -1,3 +1,4 @@ +//go:build go1.13 // +build go1.13 // Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/tables/aztable/zz_generated_time_rfc3339.go b/sdk/tables/aztable/zz_generated_time_rfc3339.go index dadfddb3cbd3..1388ade6d691 100644 --- a/sdk/tables/aztable/zz_generated_time_rfc3339.go +++ b/sdk/tables/aztable/zz_generated_time_rfc3339.go @@ -1,3 +1,4 @@ +//go:build go1.13 // +build go1.13 // Copyright (c) Microsoft Corporation. All rights reserved. From 7e6523f5e744cda0357bbc0feb4a5847841d0636 Mon Sep 17 00:00:00 2001 From: Sean Kane <68240067+seankane-msft@users.noreply.github.com> Date: Tue, 24 Aug 2021 13:12:17 -0400 Subject: [PATCH 38/42] [Tables] connection string parser (#15187) * adding conn str parser * Basic conn str parser * adding support for custom domains * invalid tests * adding self note * Update sdk/tables/aztable/connection_string.go Co-authored-by: Richard Park <51494936+richardpark-msft@users.noreply.github.com> * Update sdk/tables/aztable/connection_string.go Co-authored-by: Richard Park <51494936+richardpark-msft@users.noreply.github.com> * improving testing * finishing connection string portion * formatting and improved error handling * docstring addition for private method * connection string error * splitn instead of split * sas comment * updating proxy-server script * configure proxy with hash of file, correct file location * using certs in main * trying download with no password * trying without the pfx file altogether * adding pfx portion back * manual copy of testproxy to common * using common * fixing path * adding trust ps1 script * adding step to run proxy * formatting and go mod x/net * fixing for latest azcore * fixing rqeuire * removing eng stuff * conn str * running tests * run tests = true * adding build sourcesDir * relative path * fixing up path * build-test * moving byte array response inside table pager * env var playing to fix ci lint * changing package name Co-authored-by: Richard Park <51494936+richardpark-msft@users.noreply.github.com> --- eng/config.json | 6 +- eng/pipelines/templates/steps/build-test.yml | 6 + .../templates/steps/configure-proxy.yml | 22 -- eng/scripts/proxy-server.ps1 | 66 ------ sdk/tables/aztable/byte_array_response.go | 181 ---------------- sdk/tables/aztable/connection_string.go | 105 ++++++++++ sdk/tables/aztable/connection_string_test.go | 198 ++++++++++++++++++ sdk/tables/aztable/errors.go | 2 + sdk/tables/aztable/table_client.go | 3 + sdk/tables/aztable/table_pagers.go | 174 +++++++++++++++ sdk/tables/ci.yml | 1 + 11 files changed, 494 insertions(+), 270 deletions(-) delete mode 100644 eng/pipelines/templates/steps/configure-proxy.yml delete mode 100644 eng/scripts/proxy-server.ps1 delete mode 100644 sdk/tables/aztable/byte_array_response.go create mode 100644 sdk/tables/aztable/connection_string.go create mode 100644 sdk/tables/aztable/connection_string_test.go diff --git a/eng/config.json b/eng/config.json index 711b2f4c3575..c06a0ba0ca4d 100644 --- a/eng/config.json +++ b/eng/config.json @@ -10,7 +10,11 @@ }, { "Name": "internal", - "CoverageGoal": 0.90 + "CoverageGoal": 0.70 + }, + { + "Name": "tables", + "CoverageGoal": 0.01 } ] } diff --git a/eng/pipelines/templates/steps/build-test.yml b/eng/pipelines/templates/steps/build-test.yml index 3fb124547094..46ba835be976 100644 --- a/eng/pipelines/templates/steps/build-test.yml +++ b/eng/pipelines/templates/steps/build-test.yml @@ -30,6 +30,8 @@ steps: displayName: "Install Coverage and Junit Dependencies" workingDirectory: '${{parameters.GoWorkspace}}' + - template: /eng/common/testproxy/test-proxy-docker.yml + - pwsh: | $testDirs = (./eng/scripts/get_test_dirs.ps1 -serviceDir $(SCOPE)) foreach ($td in $testDirs) { @@ -48,10 +50,14 @@ steps: workingDirectory: '${{parameters.GoWorkspace}}' env: GO111MODULE: 'on' + AZURE_RECORD_MODE: 'playback' + PROXY_CERT: $(Build.SourcesDirectory)/eng/common/testproxy/dotnet-devcert.crt - pwsh: ../eng/scripts/create_coverage.ps1 ${{parameters.ServiceDirectory}} displayName: 'Generate Coverage XML' workingDirectory: '${{parameters.GoWorkspace}}sdk' + env: + GO111MODULE: 'off' - task: PublishTestResults@2 condition: succeededOrFailed() diff --git a/eng/pipelines/templates/steps/configure-proxy.yml b/eng/pipelines/templates/steps/configure-proxy.yml deleted file mode 100644 index c7308e930c69..000000000000 --- a/eng/pipelines/templates/steps/configure-proxy.yml +++ /dev/null @@ -1,22 +0,0 @@ -parameters: - ServiceDirectory: '' - -steps: - - pwsh: | - $certUriPfx = "https://github.com/Azure/azure-sdk-tools/raw/main/tools/test-proxy/docker/dev_certificate/dotnet-devcert.pfx" - $certUriCrt = "https://github.com/Azure/azure-sdk-tools/raw/main/tools/test-proxy/docker/dev_certificate/dotnet-devcert.crt" - $certLocationPfx = "$(Build.SourcesDirectory)/dotnet-devcert.pfx" - $certLocationCrt = "$(Build.SourcesDirectory)/dotnet-devcert.crt" - - Invoke-WebRequest ` - -Uri $certUriPfx ` - -OutFile $certLocationPfx -UseBasicParsing - - Invoke-WebRequest ` - -Uri $certUriCrt ` - -OutFile $certLocationCrt -UseBasicParsing - - dotnet dev-certs https --clean --import $certLocationPfx -p "password" - - Write-Host "##vso[task.setvariable variable=PROXY_CERT]$certLocationCrt" - displayName: 'Download and Trust Certificate' diff --git a/eng/scripts/proxy-server.ps1 b/eng/scripts/proxy-server.ps1 deleted file mode 100644 index 75f0b376712f..000000000000 --- a/eng/scripts/proxy-server.ps1 +++ /dev/null @@ -1,66 +0,0 @@ -param( - [ValidateSet("start", "stop")] - [String] - $mode, - [String] - $targetFolder = "." -) - -try { - docker --version | Out-Null -} -catch { - Write-Error "A invocation of docker --version failed. This indicates that docker is not properly installed or running." - Write-Error "Please check your docker invocation and try running the script again." -} - -$repoRoot = (Resolve-Path $targetFolder).Path.Replace("`\", "/") -Write-Host $repoRoot - -$CONTAINER_NAME = "ambitious_azsdk_test_proxy" -$IMAGE_SOURCE = "azsdkengsys.azurecr.io/engsys/testproxy-lin:1037115" -$Initial = "" - -if ($IsWindows -and $env:TF_BUILD){ - $IMAGE_SOURCE = "azsdkengsys.azurecr.io/engsys/testproxy-win:1037115" - $Initial = "C:" -} - -function Get-Proxy-Container(){ - return (docker container ls -a --format "{{ json . }}" --filter "name=$CONTAINER_NAME" ` - | ConvertFrom-Json ` - | Select-Object -First 1) -} - -if ($mode -eq "start"){ - $proxyContainer = Get-Proxy-Container - - # if we already have one, we just need to check the state - if($proxyContainer){ - if ($proxyContainer.State -eq "running") - { - Write-Host "Discovered an already running instance of the test-proxy!. Exiting" - exit(0) - } - } - # else we need to create it - else { - Write-Host "Attempting creation of Docker host $CONTAINER_NAME" - Write-Host "docker container create -v `"${repoRoot}:${Initial}/etc/testproxy`" -p 5001:5001 -p 5000:5000 --name $CONTAINER_NAME $IMAGE_SOURCE" - docker container create -v "${repoRoot}:${Initial}/etc/testproxy" -p 5001:5001 -p 5000:5000 --name $CONTAINER_NAME $IMAGE_SOURCE - } - - Write-Host "Attempting start of Docker host $CONTAINER_NAME" - docker container start $CONTAINER_NAME -} - -if ($mode -eq "stop"){ - $proxyContainer = Get-Proxy-Container - - if($proxyContainer){ - if($proxyContainer.State -eq "running"){ - Write-Host "Found a running instance of $CONTAINER_NAME, shutting it down." - docker container stop $CONTAINER_NAME - } - } -} diff --git a/sdk/tables/aztable/byte_array_response.go b/sdk/tables/aztable/byte_array_response.go deleted file mode 100644 index eeb1eece86ae..000000000000 --- a/sdk/tables/aztable/byte_array_response.go +++ /dev/null @@ -1,181 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package aztable - -import ( - "encoding/json" - "net/http" - "time" -) - -// ByteArrayResponse is the return type for a GetEntity operation. The entities properties are stored in the Value property -type ByteArrayResponse struct { - // ClientRequestID contains the information returned from the x-ms-client-request-id header response. - ClientRequestID *string - - // ContentType contains the information returned from the Content-Type header response. - ContentType *string - - // Date contains the information returned from the Date header response. - Date *time.Time - - // ETag contains the information returned from the ETag header response. - ETag *string - - // PreferenceApplied contains the information returned from the Preference-Applied header response. - PreferenceApplied *string - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response - - // RequestID contains the information returned from the x-ms-request-id header response. - RequestID *string - - // The other properties of the table entity. - Value []byte - - // Version contains the information returned from the x-ms-version header response. - Version *string - - // XMSContinuationNextPartitionKey contains the information returned from the x-ms-continuation-NextPartitionKey header response. - XMSContinuationNextPartitionKey *string - - // XMSContinuationNextRowKey contains the information returned from the x-ms-continuation-NextRowKey header response. - XMSContinuationNextRowKey *string -} - -// newByteArrayResponse converts a MapofInterfaceResponse from a map[string]interface{} to a []byte. -func newByteArrayResponse(m MapOfInterfaceResponse) (ByteArrayResponse, error) { - marshalledValue, err := json.Marshal(m.Value) - if err != nil { - return ByteArrayResponse{}, err - } - return ByteArrayResponse{ - ClientRequestID: m.ClientRequestID, - ContentType: m.ContentType, - Date: m.Date, - ETag: m.ETag, - PreferenceApplied: m.PreferenceApplied, - RawResponse: m.RawResponse, - RequestID: m.RequestID, - Value: marshalledValue, - Version: m.Version, - XMSContinuationNextPartitionKey: m.XMSContinuationNextPartitionKey, - XMSContinuationNextRowKey: m.XMSContinuationNextRowKey, - }, nil -} - -// TableEntityListByteResponseResponse is the response envelope for operations that return a TableEntityQueryResponse type. -type TableEntityListByteResponseResponse struct { - // ClientRequestID contains the information returned from the x-ms-client-request-id header response. - ClientRequestID *string - - // Date contains the information returned from the Date header response. - Date *time.Time - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response - - // RequestID contains the information returned from the x-ms-request-id header response. - RequestID *string - - // The properties for the table entity query response. - TableEntityQueryResponse *TableEntityQueryByteResponse - - // Version contains the information returned from the x-ms-version header response. - Version *string - - // XMSContinuationNextPartitionKey contains the information returned from the x-ms-continuation-NextPartitionKey header response. - XMSContinuationNextPartitionKey *string - - // XMSContinuationNextRowKey contains the information returned from the x-ms-continuation-NextRowKey header response. - XMSContinuationNextRowKey *string -} - -// TableEntityQueryByteResponse - The properties for the table entity query response. -type TableEntityQueryByteResponse struct { - // The metadata response of the table. - OdataMetadata *string - - // List of table entities. - Value [][]byte -} - -func castToByteResponse(resp *TableEntityQueryResponseResponse) (TableEntityListByteResponseResponse, error) { - marshalledValue := make([][]byte, 0) - for _, e := range resp.TableEntityQueryResponse.Value { - m, err := json.Marshal(e) - if err != nil { - return TableEntityListByteResponseResponse{}, err - } - marshalledValue = append(marshalledValue, m) - } - - t := TableEntityQueryByteResponse{ - OdataMetadata: resp.TableEntityQueryResponse.OdataMetadata, - Value: marshalledValue, - } - - return TableEntityListByteResponseResponse{ - ClientRequestID: resp.ClientRequestID, - Date: resp.Date, - RawResponse: resp.RawResponse, - RequestID: resp.RequestID, - TableEntityQueryResponse: &t, - Version: resp.Version, - XMSContinuationNextPartitionKey: resp.XMSContinuationNextPartitionKey, - XMSContinuationNextRowKey: resp.XMSContinuationNextRowKey, - }, nil -} - -type TableListResponse struct { - // The metadata response of the table. - OdataMetadata *string `json:"odata.metadata,omitempty"` - - // List of tables. - Value []*TableResponseProperties `json:"value,omitempty"` -} - -func tableListResponseFromQueryResponse(q *TableQueryResponse) *TableListResponse { - return &TableListResponse{ - OdataMetadata: q.OdataMetadata, - Value: q.Value, - } -} - -// TableListResponseResponse stores the results of a ListTables operation -type TableListResponseResponse struct { - // ClientRequestID contains the information returned from the x-ms-client-request-id header response. - ClientRequestID *string - - // Date contains the information returned from the Date header response. - Date *time.Time - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response - - // RequestID contains the information returned from the x-ms-request-id header response. - RequestID *string - - // The properties for the table query response. - TableListResponse *TableListResponse - - // Version contains the information returned from the x-ms-version header response. - Version *string - - // XMSContinuationNextTableName contains the information returned from the x-ms-continuation-NextTableName header response. - XMSContinuationNextTableName *string -} - -func listResponseFromQueryResponse(q TableQueryResponseResponse) *TableListResponseResponse { - return &TableListResponseResponse{ - ClientRequestID: q.ClientRequestID, - Date: q.Date, - RawResponse: q.RawResponse, - RequestID: q.RequestID, - TableListResponse: tableListResponseFromQueryResponse(q.TableQueryResponse), - Version: q.Version, - XMSContinuationNextTableName: q.XMSContinuationNextTableName, - } -} diff --git a/sdk/tables/aztable/connection_string.go b/sdk/tables/aztable/connection_string.go new file mode 100644 index 000000000000..d8bbb31f4a6c --- /dev/null +++ b/sdk/tables/aztable/connection_string.go @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package aztable + +import ( + "fmt" + "strings" + + "github.com/Azure/azure-sdk-for-go/sdk/azcore" +) + +// NewTableClientFromConnectionString creates a new TableClient struct from a connection string. The connection +// string must contain either an account name and account key or an account name and a shared access signature. +func NewTableClientFromConnectionString(tableName string, connectionString string, options *TableClientOptions) (*TableClient, error) { + if options == nil { + options = &TableClientOptions{} + } + endpoint, credential, err := parseConnectionString(connectionString) + if err != nil { + return nil, err + } + return NewTableClient(tableName, endpoint, credential, options) +} + +// NewTableServiceClientFromConnectionString creates a new TableServiceClient struct from a connection string. The connection +// string must contain either an account name and account key or an account name and a shared access signature. +func NewTableServiceClientFromConnectionString(connectionString string, options *TableClientOptions) (*TableServiceClient, error) { + endpoint, credential, err := parseConnectionString(connectionString) + if err != nil { + return nil, err + } + return NewTableServiceClient(endpoint, credential, options) +} + +// convertConnStrToMap converts a connection string (in format key1=value1;key2=value2;key3=value3;) into a map of key-value pairs +func convertConnStrToMap(connStr string) (map[string]string, error) { + ret := make(map[string]string) + connStr = strings.TrimRight(connStr, ";") + + splitString := strings.Split(connStr, ";") + if len(splitString) == 0 { + return ret, errConnectionString + } + for _, stringPart := range splitString { + parts := strings.SplitN(stringPart, "=", 2) + if len(parts) != 2 { + return ret, errConnectionString + } + ret[parts[0]] = parts[1] + } + return ret, nil +} + +// parseConnectionString parses a connection string into a service URL and a SharedKeyCredential or a service url with the +// SharedAccessSignature combined. +func parseConnectionString(connStr string) (string, azcore.Credential, error) { + var serviceURL string + var cred azcore.Credential + + defaultScheme := "https" + defaultSuffix := "core.windows.net" + + connStrMap, err := convertConnStrToMap(connStr) + if err != nil { + return "", nil, err + } + + accountName, ok := connStrMap["AccountName"] + if !ok { + return "", nil, errConnectionString + } + accountKey, ok := connStrMap["AccountKey"] + if !ok { + sharedAccessSignature, ok := connStrMap["SharedAccessSignature"] + if !ok { + return "", nil, errConnectionString + } + return fmt.Sprintf("%v://%v.table.%v/?%v", defaultScheme, accountName, defaultSuffix, sharedAccessSignature), azcore.NewAnonymousCredential(), nil + } + + protocol, ok := connStrMap["DefaultEndpointsProtocol"] + if !ok { + protocol = defaultScheme + } + + suffix, ok := connStrMap["EndpointSuffix"] + if !ok { + suffix = defaultSuffix + } + + tableEndpoint, ok := connStrMap["TableEndpoint"] + if ok { + cred, err = NewSharedKeyCredential(accountName, accountKey) + return tableEndpoint, cred, err + } + serviceURL = fmt.Sprintf("%v://%v.table.%v", protocol, accountName, suffix) + + cred, err = NewSharedKeyCredential(accountName, accountKey) + if err != nil { + return "", nil, err + } + + return serviceURL, cred, nil +} diff --git a/sdk/tables/aztable/connection_string_test.go b/sdk/tables/aztable/connection_string_test.go new file mode 100644 index 000000000000..49138372fc01 --- /dev/null +++ b/sdk/tables/aztable/connection_string_test.go @@ -0,0 +1,198 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package aztable + +import ( + "encoding/base64" + "strings" + "testing" + + "github.com/stretchr/testify/require" +) + +func getAccountKey(cred *SharedKeyCredential) string { + return base64.StdEncoding.EncodeToString(cred.accountKey.Load().([]byte)) +} + +func TestConnectionStringParser(t *testing.T) { + connStr := "DefaultEndpointsProtocol=https;AccountName=dummyaccount;AccountKey=secretkeykey;EndpointSuffix=core.windows.net" + serviceURL, cred, err := parseConnectionString(connStr) + require.NoError(t, err) + require.Equal(t, serviceURL, "https://dummyaccount.table.core.windows.net") + require.NotNil(t, cred) + + sharedKeyCred, ok := cred.(*SharedKeyCredential) + require.True(t, ok) + require.Equal(t, sharedKeyCred.accountName, "dummyaccount") + require.Equal(t, getAccountKey(sharedKeyCred), "secretkeykey") + + client, err := NewTableClientFromConnectionString("tableName", connStr, nil) + require.NoError(t, err) + require.NotNil(t, client) + sharedKeyCred, ok = client.cred.(*SharedKeyCredential) + require.True(t, ok) + require.Equal(t, sharedKeyCred.accountName, "dummyaccount") + require.Equal(t, getAccountKey(sharedKeyCred), "secretkeykey") + require.True(t, strings.HasPrefix(client.client.con.u, "https://")) + require.True(t, strings.Contains(client.client.con.u, "core.windows.net")) +} + +func TestConnectionStringParserHTTP(t *testing.T) { + connStr := "DefaultEndpointsProtocol=http;AccountName=dummyaccount;AccountKey=secretkeykey;EndpointSuffix=core.windows.net" + serviceURL, cred, err := parseConnectionString(connStr) + require.NoError(t, err) + require.Equal(t, serviceURL, "http://dummyaccount.table.core.windows.net") + require.NotNil(t, cred) + + sharedKeyCred, ok := cred.(*SharedKeyCredential) + require.True(t, ok) + require.Equal(t, sharedKeyCred.accountName, "dummyaccount") + require.Equal(t, getAccountKey(sharedKeyCred), "secretkeykey") + + client, err := NewTableClientFromConnectionString("tableName", connStr, nil) + require.NoError(t, err) + require.NotNil(t, client) + sharedKeyCred, ok = client.cred.(*SharedKeyCredential) + require.True(t, ok) + require.Equal(t, sharedKeyCred.accountName, "dummyaccount") + require.Equal(t, getAccountKey(sharedKeyCred), "secretkeykey") + require.True(t, strings.HasPrefix(client.client.con.u, "http://")) + require.True(t, strings.Contains(client.client.con.u, "core.windows.net")) +} + +func TestConnectionStringParserBasic(t *testing.T) { + connStr := "AccountName=dummyaccount;AccountKey=secretkeykey" + serviceURL, cred, err := parseConnectionString(connStr) + require.NoError(t, err) + require.Equal(t, serviceURL, "https://dummyaccount.table.core.windows.net") + require.NotNil(t, cred) + + sharedKeyCred, ok := cred.(*SharedKeyCredential) + require.True(t, ok) + require.Equal(t, sharedKeyCred.accountName, "dummyaccount") + require.Equal(t, getAccountKey(sharedKeyCred), "secretkeykey") + + client, err := NewTableClientFromConnectionString("tableName", connStr, nil) + require.NoError(t, err) + require.NotNil(t, client) + sharedKeyCred, ok = client.cred.(*SharedKeyCredential) + require.True(t, ok) + require.Equal(t, sharedKeyCred.accountName, "dummyaccount") + require.Equal(t, getAccountKey(sharedKeyCred), "secretkeykey") + require.True(t, strings.HasPrefix(client.client.con.u, "https://")) + require.True(t, strings.Contains(client.client.con.u, "core.windows.net")) +} + +func TestConnectionStringParserCustomDomain(t *testing.T) { + connStr := "AccountName=dummyaccount;AccountKey=secretkeykey;TableEndpoint=www.mydomain.com;" + serviceURL, cred, err := parseConnectionString(connStr) + require.NoError(t, err) + require.Equal(t, serviceURL, "www.mydomain.com") + require.NotNil(t, cred) + + sharedKeyCred, ok := cred.(*SharedKeyCredential) + require.True(t, ok) + require.Equal(t, sharedKeyCred.accountName, "dummyaccount") + require.Equal(t, getAccountKey(sharedKeyCred), "secretkeykey") + + client, err := NewTableClientFromConnectionString("tableName", connStr, nil) + require.NoError(t, err) + require.NotNil(t, client) + sharedKeyCred, ok = client.cred.(*SharedKeyCredential) + require.True(t, ok) + require.Equal(t, sharedKeyCred.accountName, "dummyaccount") + require.Equal(t, getAccountKey(sharedKeyCred), "secretkeykey") + require.True(t, strings.HasPrefix(client.client.con.u, "www.")) + require.True(t, strings.Contains(client.client.con.u, "mydomain.com")) +} + +func TestConnectionStringParserInvalid(t *testing.T) { + badConnectionStrings := []string{ + "", + "foobar", + "foo;bar;baz", + "foo=;bar=;", + "=", + ";", + "=;==", + "foobar=baz=foo", + } + + for _, badConnStr := range badConnectionStrings { + _, _, err := parseConnectionString(badConnStr) + require.Error(t, err) + require.Contains(t, err.Error(), errConnectionString.Error()) + } +} + +func TestConnectionStringSAS(t *testing.T) { + connStr := "AccountName=dummyaccount;SharedAccessSignature=fakesharedaccesssignature;" + serviceURL, cred, err := parseConnectionString(connStr) + require.NoError(t, err) + require.Equal(t, serviceURL, "https://dummyaccount.table.core.windows.net/?fakesharedaccesssignature") + require.NotNil(t, cred) + + client, err := NewTableClientFromConnectionString("tableName", connStr, nil) + require.NoError(t, err) + require.NotNil(t, client) + require.True(t, strings.HasPrefix(client.client.con.u, "https://")) + require.True(t, strings.Contains(client.client.con.u, "core.windows.net")) +} + +func TestConnectionStringCosmos(t *testing.T) { + connStr := "DefaultEndpointsProtocol=https;AccountName=dummyaccountname;AccountKey=secretkeykey;TableEndpoint=https://dummyaccountname.table.cosmos.azure.com:443/;" + serviceURL, cred, err := parseConnectionString(connStr) + require.NoError(t, err) + require.Equal(t, serviceURL, "https://dummyaccountname.table.cosmos.azure.com:443/") + require.NotNil(t, cred) + + client, err := NewTableClientFromConnectionString("tableName", connStr, nil) + require.NoError(t, err) + require.NotNil(t, client) + require.True(t, strings.HasPrefix(client.client.con.u, "https://")) + require.True(t, strings.Contains(client.client.con.u, "cosmos.azure.com:443")) + + sharedKey, ok := client.cred.(*SharedKeyCredential) + require.True(t, ok) + require.Equal(t, sharedKey.accountName, "dummyaccountname") + require.Equal(t, getAccountKey(sharedKey), "secretkeykey") +} + +func TestConnectionStringChinaCloud(t *testing.T) { + connStr := "AccountName=dummyaccountname;AccountKey=secretkeykey;DefaultEndpointsProtocol=http;EndpointSuffix=core.chinacloudapi.cn;" + serviceURL, cred, err := parseConnectionString(connStr) + require.NoError(t, err) + require.Equal(t, serviceURL, "http://dummyaccountname.table.core.chinacloudapi.cn") + require.NotNil(t, cred) + + client, err := NewTableClientFromConnectionString("tableName", connStr, nil) + require.NoError(t, err) + require.NotNil(t, client) + require.True(t, strings.HasPrefix(client.client.con.u, "http://")) + require.True(t, strings.Contains(client.client.con.u, "core.chinacloudapi.cn")) + + sharedKey, ok := client.cred.(*SharedKeyCredential) + require.True(t, ok) + require.Equal(t, sharedKey.accountName, "dummyaccountname") + require.Equal(t, getAccountKey(sharedKey), "secretkeykey") +} + +func TestConnectionStringAzurite(t *testing.T) { + connStr := "DefaultEndpointsProtocol=http;AccountName=dummyaccountname;AccountKey=secretkeykey;TableEndpoint=http://local-machine:11002/custom/account/path/faketokensignature;" + serviceURL, cred, err := parseConnectionString(connStr) + require.NoError(t, err) + require.Equal(t, serviceURL, "http://local-machine:11002/custom/account/path/faketokensignature") + require.NotNil(t, cred) + + client, err := NewTableClientFromConnectionString("tableName", connStr, nil) + require.NoError(t, err) + require.NotNil(t, client) + require.True(t, strings.HasPrefix(client.client.con.u, "http://")) + require.True(t, strings.Contains(client.client.con.u, "http://local-machine:11002/custom/account/path/faketokensignature")) + + sharedKey, ok := client.cred.(*SharedKeyCredential) + require.True(t, ok) + require.Equal(t, sharedKey.accountName, "dummyaccountname") + require.Equal(t, getAccountKey(sharedKey), "secretkeykey") +} diff --git a/sdk/tables/aztable/errors.go b/sdk/tables/aztable/errors.go index b2b883f50136..adcc22d4c0d4 100644 --- a/sdk/tables/aztable/errors.go +++ b/sdk/tables/aztable/errors.go @@ -5,6 +5,8 @@ package aztable import "errors" +var errConnectionString = errors.New("connection string is either blank or malformed. The expected connection string should contain key value pairs separated by semicolons. For example 'DefaultEndpointsProtocol=https;AccountName=;AccountKey=;EndpointSuffix=core.windows.net'") + var errInvalidUpdateMode = errors.New("invalid EntityUpdateMode") func checkEntityForPkRk(entity *map[string]interface{}, err error) error { diff --git a/sdk/tables/aztable/table_client.go b/sdk/tables/aztable/table_client.go index 4d7e86c94e14..67f0c9cf2d54 100644 --- a/sdk/tables/aztable/table_client.go +++ b/sdk/tables/aztable/table_client.go @@ -29,6 +29,9 @@ const ( // NewTableClient creates a TableClient struct in the context of the table specified in tableName, using the specified serviceURL, credential, and options. func NewTableClient(tableName string, serviceURL string, cred azcore.Credential, options *TableClientOptions) (*TableClient, error) { + if options == nil { + options = &TableClientOptions{} + } s, err := NewTableServiceClient(serviceURL, cred, options) return s.NewTableClient(tableName), err } diff --git a/sdk/tables/aztable/table_pagers.go b/sdk/tables/aztable/table_pagers.go index 2aa6875205db..5d2b98bf64f7 100644 --- a/sdk/tables/aztable/table_pagers.go +++ b/sdk/tables/aztable/table_pagers.go @@ -5,6 +5,9 @@ package aztable import ( "context" + "encoding/json" + "net/http" + "time" ) // TableEntityListResponsePager is a Pager for Table entity query results. @@ -142,3 +145,174 @@ func (p *tableQueryResponsePager) PageResponse() TableListResponseResponse { func (p *tableQueryResponsePager) Err() error { return p.err } + +// ByteArrayResponse is the return type for a GetEntity operation. The entities properties are stored in the Value property +type ByteArrayResponse struct { + // ClientRequestID contains the information returned from the x-ms-client-request-id header response. + ClientRequestID *string + + // ContentType contains the information returned from the Content-Type header response. + ContentType *string + + // Date contains the information returned from the Date header response. + Date *time.Time + + // ETag contains the information returned from the ETag header response. + ETag *string + + // PreferenceApplied contains the information returned from the Preference-Applied header response. + PreferenceApplied *string + + // RawResponse contains the underlying HTTP response. + RawResponse *http.Response + + // RequestID contains the information returned from the x-ms-request-id header response. + RequestID *string + + // The other properties of the table entity. + Value []byte + + // Version contains the information returned from the x-ms-version header response. + Version *string + + // XMSContinuationNextPartitionKey contains the information returned from the x-ms-continuation-NextPartitionKey header response. + XMSContinuationNextPartitionKey *string + + // XMSContinuationNextRowKey contains the information returned from the x-ms-continuation-NextRowKey header response. + XMSContinuationNextRowKey *string +} + +// newByteArrayResponse converts a MapofInterfaceResponse from a map[string]interface{} to a []byte. +func newByteArrayResponse(m MapOfInterfaceResponse) (ByteArrayResponse, error) { + marshalledValue, err := json.Marshal(m.Value) + if err != nil { + return ByteArrayResponse{}, err + } + return ByteArrayResponse{ + ClientRequestID: m.ClientRequestID, + ContentType: m.ContentType, + Date: m.Date, + ETag: m.ETag, + PreferenceApplied: m.PreferenceApplied, + RawResponse: m.RawResponse, + RequestID: m.RequestID, + Value: marshalledValue, + Version: m.Version, + XMSContinuationNextPartitionKey: m.XMSContinuationNextPartitionKey, + XMSContinuationNextRowKey: m.XMSContinuationNextRowKey, + }, nil +} + +// TableEntityListByteResponseResponse is the response envelope for operations that return a TableEntityQueryResponse type. +type TableEntityListByteResponseResponse struct { + // ClientRequestID contains the information returned from the x-ms-client-request-id header response. + ClientRequestID *string + + // Date contains the information returned from the Date header response. + Date *time.Time + + // RawResponse contains the underlying HTTP response. + RawResponse *http.Response + + // RequestID contains the information returned from the x-ms-request-id header response. + RequestID *string + + // The properties for the table entity query response. + TableEntityQueryResponse *TableEntityQueryByteResponse + + // Version contains the information returned from the x-ms-version header response. + Version *string + + // XMSContinuationNextPartitionKey contains the information returned from the x-ms-continuation-NextPartitionKey header response. + XMSContinuationNextPartitionKey *string + + // XMSContinuationNextRowKey contains the information returned from the x-ms-continuation-NextRowKey header response. + XMSContinuationNextRowKey *string +} + +// TableEntityQueryByteResponse - The properties for the table entity query response. +type TableEntityQueryByteResponse struct { + // The metadata response of the table. + OdataMetadata *string + + // List of table entities. + Value [][]byte +} + +func castToByteResponse(resp *TableEntityQueryResponseResponse) (TableEntityListByteResponseResponse, error) { + marshalledValue := make([][]byte, 0) + for _, e := range resp.TableEntityQueryResponse.Value { + m, err := json.Marshal(e) + if err != nil { + return TableEntityListByteResponseResponse{}, err + } + marshalledValue = append(marshalledValue, m) + } + + t := TableEntityQueryByteResponse{ + OdataMetadata: resp.TableEntityQueryResponse.OdataMetadata, + Value: marshalledValue, + } + + return TableEntityListByteResponseResponse{ + ClientRequestID: resp.ClientRequestID, + Date: resp.Date, + RawResponse: resp.RawResponse, + RequestID: resp.RequestID, + TableEntityQueryResponse: &t, + Version: resp.Version, + XMSContinuationNextPartitionKey: resp.XMSContinuationNextPartitionKey, + XMSContinuationNextRowKey: resp.XMSContinuationNextRowKey, + }, nil +} + +type TableListResponse struct { + // The metadata response of the table. + OdataMetadata *string `json:"odata.metadata,omitempty"` + + // List of tables. + Value []*TableResponseProperties `json:"value,omitempty"` +} + +func tableListResponseFromQueryResponse(q *TableQueryResponse) *TableListResponse { + return &TableListResponse{ + OdataMetadata: q.OdataMetadata, + Value: q.Value, + } +} + +// TableListResponseResponse stores the results of a ListTables operation +type TableListResponseResponse struct { + // ClientRequestID contains the information returned from the x-ms-client-request-id header response. + ClientRequestID *string + + // Date contains the information returned from the Date header response. + Date *time.Time + + // RawResponse contains the underlying HTTP response. + RawResponse *http.Response + + // RequestID contains the information returned from the x-ms-request-id header response. + RequestID *string + + // The properties for the table query response. + TableListResponse *TableListResponse + + // Version contains the information returned from the x-ms-version header response. + Version *string + + // XMSContinuationNextTableName contains the information returned from the x-ms-continuation-NextTableName header response. + XMSContinuationNextTableName *string +} + +func listResponseFromQueryResponse(q TableQueryResponseResponse) *TableListResponseResponse { + return &TableListResponseResponse{ + ClientRequestID: q.ClientRequestID, + Date: q.Date, + RawResponse: q.RawResponse, + RequestID: q.RequestID, + TableListResponse: tableListResponseFromQueryResponse(q.TableQueryResponse), + Version: q.Version, + XMSContinuationNextTableName: q.XMSContinuationNextTableName, + } +} diff --git a/sdk/tables/ci.yml b/sdk/tables/ci.yml index 3e9703ae327e..107eb650032f 100644 --- a/sdk/tables/ci.yml +++ b/sdk/tables/ci.yml @@ -13,3 +13,4 @@ stages: - template: /eng/pipelines/templates/jobs/archetype-sdk-client.yml parameters: ServiceDirectory: 'tables' + RunTests: true From c9c467b702967242e7f855f5e936d9fd03c3dc29 Mon Sep 17 00:00:00 2001 From: Sean Kane <68240067+seankane-msft@users.noreply.github.com> Date: Wed, 1 Sep 2021 16:30:39 -0400 Subject: [PATCH 39/42] [Tables] simplify code space by moving generated to `internal` module (#15299) * changing to internal package, everything except batching works * back to working * converting more things to private * renamings * still working, checkpoint * most of tableclient done * finished table client options/responses * finished with service client * cors rule done * retentionpolicy * retentionpolicy and cors * last piece * final comments * updating with newest autorest * formatting * fixing go mod in internal package * update versions * flipping param order * convert internal to a subpackage * fixing telemetry and bumping go version * updating proxy, adding test-resources.json file * cert issues * formatting and x/net * fixing build-test * correcting file path * lint and formatting * go fmt * dropping coverage for internal * updates from pre-arch board * checking error * doing scopes work in generated code * linting * removing old file * consistent namings * removing types and simplifying pageresponse for list entities * formatting * renames, removing Table prefix, removing TableTRansactionError * fixed error type, placeholder while azcore is in PR * running tests live, fixing one test, converting to always using shared key * formatting * linter * fixing playback for storage * fixing playback credential * fixing serviceURL to expect tableName in service url * moving update mode into options for update/insert entity * return *Client from CreateTable method * cleaning up structs * flipping order of strings in conn str constructor * renaming param of transactionAction from ETag -> IfMatch * remove XMS prefix, change Value to Entities/Tables * moving GetTableSASToken to Client struct * making MinimalOdata the default, removing option to set it, new recordings * renaming ETag -> IfMatch for Options * formatting * renaming file, adding version to constants.go file * adding version * updating to latest azcore * updating autorest * formatting * updates for SAS * fixing tests, fixing conn str parser * formatting * missing error check --- eng/pipelines/templates/steps/build-test.yml | 2 +- sdk/tables/autorest.md | 6 +- sdk/tables/aztable/byte_array_response.go | 122 +++ sdk/tables/aztable/connection_string.go | 18 +- sdk/tables/aztable/connection_string_test.go | 48 +- .../aztable/{consts.go => constants.go} | 1 + .../aztable/cosmos_patch_transform_policy.go | 12 +- sdk/tables/aztable/entity.go | 68 +- sdk/tables/aztable/entity_test.go | 17 +- sdk/tables/aztable/go.mod | 6 +- sdk/tables/aztable/go.sum | 8 +- .../connection.go} | 60 +- .../constants.go} | 35 +- .../models.go} | 27 +- .../response_types.go} | 286 +++---- .../service_client.go} | 159 ++-- .../table_client.go} | 704 ++++++++---------- .../time_rfc1123.go} | 6 +- .../time_rfc3339.go} | 6 +- sdk/tables/aztable/models.go | 284 ++++++- sdk/tables/aztable/options.go | 185 +++++ sdk/tables/aztable/proxy_test.go | 113 +-- .../TestAddBasicEntity_cosmos.json | 62 +- .../TestAddBasicEntity_storage.json | 62 +- .../TestAddComplexEntity_cosmos.json | 28 +- .../TestAddComplexEntity_storage.json | 26 +- .../TestEdmMarshalling_cosmos.json | 46 +- .../TestEdmMarshalling_storage.json | 51 +- .../TestInsertEntity_cosmos.json | 72 +- .../TestInsertEntity_storage.json | 72 +- .../TestMergeEntity_cosmos.json | 72 +- .../TestMergeEntity_storage.json | 72 +- .../TestQueryComplexEntity_cosmos.json | 96 +-- .../TestQueryComplexEntity_storage.json | 95 ++- .../TestQuerySimpleEntity_cosmos.json | 96 +-- .../TestQuerySimpleEntity_storage.json | 95 ++- .../TestQueryTable/TestQueryTable_cosmos.json | 196 ++--- .../TestQueryTable_storage.json | 130 ++-- ...TestServiceErrorsServiceClient_cosmos.json | 44 +- ...estServiceErrorsServiceClient_storage.json | 42 +- sdk/tables/aztable/responses.go | 202 +++++ sdk/tables/aztable/sas_account.go | 17 +- sdk/tables/aztable/sas_query_params.go | 88 +-- sdk/tables/aztable/sas_service.go | 22 +- .../aztable/shared_access_signature_test.go | 112 ++- .../shared_policy_shared_key_credential.go | 50 +- .../aztable/table_access_policy_test.go | 14 +- sdk/tables/aztable/table_batch_test.go | 71 +- sdk/tables/aztable/table_client.go | 232 ++++-- sdk/tables/aztable/table_client_responses.go | 18 - sdk/tables/aztable/table_client_test.go | 58 +- sdk/tables/aztable/table_pagers.go | 267 ++----- sdk/tables/aztable/table_service_client.go | 146 ++-- .../aztable/table_service_client_test.go | 85 ++- .../aztable/table_transactional_batch.go | 248 +++--- sdk/tables/aztable/zc_client_options.go | 28 +- sdk/tables/aztable/zc_table_constants.go | 5 +- sdk/tables/aztable/zt_table_recorded_tests.go | 25 +- sdk/tables/test-resources.json | 127 ++++ 59 files changed, 3001 insertions(+), 2344 deletions(-) create mode 100644 sdk/tables/aztable/byte_array_response.go rename sdk/tables/aztable/{consts.go => constants.go} (84%) rename sdk/tables/aztable/{zz_generated_connection.go => internal/connection.go} (52%) rename sdk/tables/aztable/{zz_generated_constants.go => internal/constants.go} (69%) rename sdk/tables/aztable/{zz_generated_models.go => internal/models.go} (96%) rename sdk/tables/aztable/{zz_generated_response_types.go => internal/response_types.go} (76%) rename sdk/tables/aztable/{zz_generated_service_client.go => internal/service_client.go} (51%) rename sdk/tables/aztable/{zz_generated_table_client.go => internal/table_client.go} (55%) rename sdk/tables/aztable/{zz_generated_time_rfc1123.go => internal/time_rfc1123.go} (94%) rename sdk/tables/aztable/{zz_generated_time_rfc3339.go => internal/time_rfc3339.go} (96%) create mode 100644 sdk/tables/aztable/options.go create mode 100644 sdk/tables/aztable/responses.go delete mode 100644 sdk/tables/aztable/table_client_responses.go create mode 100644 sdk/tables/test-resources.json diff --git a/eng/pipelines/templates/steps/build-test.yml b/eng/pipelines/templates/steps/build-test.yml index 46ba835be976..afaff641dbe9 100644 --- a/eng/pipelines/templates/steps/build-test.yml +++ b/eng/pipelines/templates/steps/build-test.yml @@ -73,4 +73,4 @@ steps: codeCoverageTool: Cobertura summaryFileLocation: '${{parameters.GoWorkspace}}sdk/${{parameters.ServiceDirectory}}/coverage.xml' additionalCodeCoverageFiles: '${{parameters.GoWorkspace}}sdk/${{parameters.ServiceDirectory}}/coverage.html' - failIfCoverageEmpty: true + failIfCoverageEmpty: true \ No newline at end of file diff --git a/sdk/tables/autorest.md b/sdk/tables/autorest.md index ed440312cd12..fac56c9df21c 100644 --- a/sdk/tables/autorest.md +++ b/sdk/tables/autorest.md @@ -12,12 +12,12 @@ input-file: https://github.com/Azure/azure-rest-api-specs/blob/d744b6bcb95ab4034 license-header: MICROSOFT_MIT_NO_VERSION clear-output-folder: false output-folder: aztable/internal -# file-prefix: "zz_generated_" tag: package-2019-02 credential-scope: none -use: "@autorest/go@4.0.0-preview.26" -# openapi-type: data-plane +use: "@autorest/go@4.0.0-preview.27" module-version: 0.1.0 +security: "AADToken" +security-scopes: "https://storage.azure.com/.default" modelerfour: group-parameters: false ``` diff --git a/sdk/tables/aztable/byte_array_response.go b/sdk/tables/aztable/byte_array_response.go new file mode 100644 index 000000000000..c9b1773ed4c5 --- /dev/null +++ b/sdk/tables/aztable/byte_array_response.go @@ -0,0 +1,122 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package aztable + +import ( + "encoding/json" + "net/http" + + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + generated "github.com/Azure/azure-sdk-for-go/sdk/tables/aztable/internal" +) + +// GetEntityResponse is the return type for a GetEntity operation. The individual entities are stored in the Value property +type GetEntityResponse struct { + // ETag contains the information returned from the ETag header response. + ETag azcore.ETag + + // RawResponse contains the underlying HTTP response. + RawResponse *http.Response + + // The properties of the table entity. + Value []byte +} + +// newGetEntityResponse transforms a generated response to the GetEntityResponse type +func newGetEntityResponse(m generated.TableQueryEntityWithPartitionAndRowKeyResponse) (GetEntityResponse, error) { + marshalledValue, err := json.Marshal(m.Value) + if err != nil { + return GetEntityResponse{}, err + } + return GetEntityResponse{ + ETag: azcore.ETag(*m.ETag), + RawResponse: m.RawResponse, + Value: marshalledValue, + }, nil +} + +// ListEntitiesPage is the response envelope for operations that return a list of entities. +type ListEntitiesPage struct { + // RawResponse contains the underlying HTTP response. + RawResponse *http.Response + // ContinuationNextPartitionKey contains the information returned from the x-ms-continuation-NextPartitionKey header response. + ContinuationNextPartitionKey *string + // ContinuationNextRowKey contains the information returned from the x-ms-continuation-NextRowKey header response. + ContinuationNextRowKey *string + // The metadata response of the table. + ODataMetadata *string + // List of table entities. + Entities [][]byte +} + +// ListEntitiesResponse - The properties for the table entity query response. +type ListEntitiesResponse struct { + // The metadata response of the table. + ODataMetadata *string + // List of table entities stored as byte slices. + Entities [][]byte +} + +// transforms a generated query response into the ListEntitiesPaged +func newListEntitiesPage(resp *generated.TableQueryEntitiesResponse) (ListEntitiesPage, error) { + marshalledValue := make([][]byte, 0) + for _, e := range resp.TableEntityQueryResponse.Value { + m, err := json.Marshal(e) + if err != nil { + return ListEntitiesPage{}, err + } + marshalledValue = append(marshalledValue, m) + } + + t := ListEntitiesResponse{ + ODataMetadata: resp.TableEntityQueryResponse.ODataMetadata, + Entities: marshalledValue, + } + + return ListEntitiesPage{ + RawResponse: resp.RawResponse, + ContinuationNextPartitionKey: resp.XMSContinuationNextPartitionKey, + ContinuationNextRowKey: resp.XMSContinuationNextRowKey, + ODataMetadata: t.ODataMetadata, + Entities: t.Entities, + }, nil +} + +// ListTablesResponse contains the properties for a list of tables. +type ListTablesResponse struct { + // The metadata response of the table. + OdataMetadata *string `json:"odata.metadata,omitempty"` + + // List of tables. + Tables []*ResponseProperties `json:"value,omitempty"` +} + +// ResponseProperties contains the properties for a single Table +type ResponseProperties struct { + // The edit link of the table. + ODataEditLink *string `json:"odata.editLink,omitempty"` + + // The id of the table. + ODataID *string `json:"odata.id,omitempty"` + + // The odata type of the table. + ODataType *string `json:"odata.type,omitempty"` + + // The name of the table. + TableName *string `json:"TableName,omitempty"` +} + +// Convets a generated TableResponseProperties to a ResponseProperties +func fromGeneratedTableResponseProperties(g *generated.TableResponseProperties) *ResponseProperties { + if g == nil { + return nil + } + + return &ResponseProperties{ + TableName: g.TableName, + ODataEditLink: g.ODataEditLink, + ODataID: g.ODataID, + ODataType: g.ODataType, + } +} diff --git a/sdk/tables/aztable/connection_string.go b/sdk/tables/aztable/connection_string.go index d8bbb31f4a6c..451ca6b7a501 100644 --- a/sdk/tables/aztable/connection_string.go +++ b/sdk/tables/aztable/connection_string.go @@ -10,27 +10,31 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" ) -// NewTableClientFromConnectionString creates a new TableClient struct from a connection string. The connection +// NewClientFromConnectionString creates a new Client struct from a connection string. The connection // string must contain either an account name and account key or an account name and a shared access signature. -func NewTableClientFromConnectionString(tableName string, connectionString string, options *TableClientOptions) (*TableClient, error) { +func NewClientFromConnectionString(connectionString string, tableName string, options *ClientOptions) (*Client, error) { if options == nil { - options = &TableClientOptions{} + options = &ClientOptions{} } endpoint, credential, err := parseConnectionString(connectionString) if err != nil { return nil, err } - return NewTableClient(tableName, endpoint, credential, options) + if !strings.HasSuffix(endpoint, "/") { + endpoint = endpoint + "/" + } + endpoint = endpoint + tableName + return NewClient(endpoint, credential, options) } -// NewTableServiceClientFromConnectionString creates a new TableServiceClient struct from a connection string. The connection +// NewServiceClientFromConnectionString creates a new ServiceClient struct from a connection string. The connection // string must contain either an account name and account key or an account name and a shared access signature. -func NewTableServiceClientFromConnectionString(connectionString string, options *TableClientOptions) (*TableServiceClient, error) { +func NewServiceClientFromConnectionString(connectionString string, options *ClientOptions) (*ServiceClient, error) { endpoint, credential, err := parseConnectionString(connectionString) if err != nil { return nil, err } - return NewTableServiceClient(endpoint, credential, options) + return NewServiceClient(endpoint, credential, options) } // convertConnStrToMap converts a connection string (in format key1=value1;key2=value2;key3=value3;) into a map of key-value pairs diff --git a/sdk/tables/aztable/connection_string_test.go b/sdk/tables/aztable/connection_string_test.go index 49138372fc01..4e7596f4a0cd 100644 --- a/sdk/tables/aztable/connection_string_test.go +++ b/sdk/tables/aztable/connection_string_test.go @@ -27,15 +27,15 @@ func TestConnectionStringParser(t *testing.T) { require.Equal(t, sharedKeyCred.accountName, "dummyaccount") require.Equal(t, getAccountKey(sharedKeyCred), "secretkeykey") - client, err := NewTableClientFromConnectionString("tableName", connStr, nil) + client, err := NewClientFromConnectionString(connStr, "tableName", nil) require.NoError(t, err) require.NotNil(t, client) sharedKeyCred, ok = client.cred.(*SharedKeyCredential) require.True(t, ok) require.Equal(t, sharedKeyCred.accountName, "dummyaccount") require.Equal(t, getAccountKey(sharedKeyCred), "secretkeykey") - require.True(t, strings.HasPrefix(client.client.con.u, "https://")) - require.True(t, strings.Contains(client.client.con.u, "core.windows.net")) + require.True(t, strings.HasPrefix(client.client.Con.Endpoint(), "https://")) + require.True(t, strings.Contains(client.client.Con.Endpoint(), "core.windows.net")) } func TestConnectionStringParserHTTP(t *testing.T) { @@ -50,15 +50,15 @@ func TestConnectionStringParserHTTP(t *testing.T) { require.Equal(t, sharedKeyCred.accountName, "dummyaccount") require.Equal(t, getAccountKey(sharedKeyCred), "secretkeykey") - client, err := NewTableClientFromConnectionString("tableName", connStr, nil) + client, err := NewClientFromConnectionString(connStr, "tableName", nil) require.NoError(t, err) require.NotNil(t, client) sharedKeyCred, ok = client.cred.(*SharedKeyCredential) require.True(t, ok) require.Equal(t, sharedKeyCred.accountName, "dummyaccount") require.Equal(t, getAccountKey(sharedKeyCred), "secretkeykey") - require.True(t, strings.HasPrefix(client.client.con.u, "http://")) - require.True(t, strings.Contains(client.client.con.u, "core.windows.net")) + require.True(t, strings.HasPrefix(client.client.Con.Endpoint(), "http://")) + require.True(t, strings.Contains(client.client.Con.Endpoint(), "core.windows.net")) } func TestConnectionStringParserBasic(t *testing.T) { @@ -73,15 +73,15 @@ func TestConnectionStringParserBasic(t *testing.T) { require.Equal(t, sharedKeyCred.accountName, "dummyaccount") require.Equal(t, getAccountKey(sharedKeyCred), "secretkeykey") - client, err := NewTableClientFromConnectionString("tableName", connStr, nil) + client, err := NewClientFromConnectionString(connStr, "tableName", nil) require.NoError(t, err) require.NotNil(t, client) sharedKeyCred, ok = client.cred.(*SharedKeyCredential) require.True(t, ok) require.Equal(t, sharedKeyCred.accountName, "dummyaccount") require.Equal(t, getAccountKey(sharedKeyCred), "secretkeykey") - require.True(t, strings.HasPrefix(client.client.con.u, "https://")) - require.True(t, strings.Contains(client.client.con.u, "core.windows.net")) + require.True(t, strings.HasPrefix(client.client.Con.Endpoint(), "https://")) + require.True(t, strings.Contains(client.client.Con.Endpoint(), "core.windows.net")) } func TestConnectionStringParserCustomDomain(t *testing.T) { @@ -96,15 +96,15 @@ func TestConnectionStringParserCustomDomain(t *testing.T) { require.Equal(t, sharedKeyCred.accountName, "dummyaccount") require.Equal(t, getAccountKey(sharedKeyCred), "secretkeykey") - client, err := NewTableClientFromConnectionString("tableName", connStr, nil) + client, err := NewClientFromConnectionString(connStr, "tableName", nil) require.NoError(t, err) require.NotNil(t, client) sharedKeyCred, ok = client.cred.(*SharedKeyCredential) require.True(t, ok) require.Equal(t, sharedKeyCred.accountName, "dummyaccount") require.Equal(t, getAccountKey(sharedKeyCred), "secretkeykey") - require.True(t, strings.HasPrefix(client.client.con.u, "www.")) - require.True(t, strings.Contains(client.client.con.u, "mydomain.com")) + require.True(t, strings.HasPrefix(client.client.Con.Endpoint(), "www.")) + require.True(t, strings.Contains(client.client.Con.Endpoint(), "mydomain.com")) } func TestConnectionStringParserInvalid(t *testing.T) { @@ -133,11 +133,11 @@ func TestConnectionStringSAS(t *testing.T) { require.Equal(t, serviceURL, "https://dummyaccount.table.core.windows.net/?fakesharedaccesssignature") require.NotNil(t, cred) - client, err := NewTableClientFromConnectionString("tableName", connStr, nil) + client, err := NewClientFromConnectionString(connStr, "tableName", nil) require.NoError(t, err) require.NotNil(t, client) - require.True(t, strings.HasPrefix(client.client.con.u, "https://")) - require.True(t, strings.Contains(client.client.con.u, "core.windows.net")) + require.True(t, strings.HasPrefix(client.client.Con.Endpoint(), "https://")) + require.True(t, strings.Contains(client.client.Con.Endpoint(), "core.windows.net")) } func TestConnectionStringCosmos(t *testing.T) { @@ -147,11 +147,11 @@ func TestConnectionStringCosmos(t *testing.T) { require.Equal(t, serviceURL, "https://dummyaccountname.table.cosmos.azure.com:443/") require.NotNil(t, cred) - client, err := NewTableClientFromConnectionString("tableName", connStr, nil) + client, err := NewClientFromConnectionString(connStr, "tableName", nil) require.NoError(t, err) require.NotNil(t, client) - require.True(t, strings.HasPrefix(client.client.con.u, "https://")) - require.True(t, strings.Contains(client.client.con.u, "cosmos.azure.com:443")) + require.True(t, strings.HasPrefix(client.client.Con.Endpoint(), "https://")) + require.True(t, strings.Contains(client.client.Con.Endpoint(), "cosmos.azure.com:443")) sharedKey, ok := client.cred.(*SharedKeyCredential) require.True(t, ok) @@ -166,11 +166,11 @@ func TestConnectionStringChinaCloud(t *testing.T) { require.Equal(t, serviceURL, "http://dummyaccountname.table.core.chinacloudapi.cn") require.NotNil(t, cred) - client, err := NewTableClientFromConnectionString("tableName", connStr, nil) + client, err := NewClientFromConnectionString(connStr, "tableName", nil) require.NoError(t, err) require.NotNil(t, client) - require.True(t, strings.HasPrefix(client.client.con.u, "http://")) - require.True(t, strings.Contains(client.client.con.u, "core.chinacloudapi.cn")) + require.True(t, strings.HasPrefix(client.client.Con.Endpoint(), "http://")) + require.True(t, strings.Contains(client.client.Con.Endpoint(), "core.chinacloudapi.cn")) sharedKey, ok := client.cred.(*SharedKeyCredential) require.True(t, ok) @@ -185,11 +185,11 @@ func TestConnectionStringAzurite(t *testing.T) { require.Equal(t, serviceURL, "http://local-machine:11002/custom/account/path/faketokensignature") require.NotNil(t, cred) - client, err := NewTableClientFromConnectionString("tableName", connStr, nil) + client, err := NewClientFromConnectionString(connStr, "tableName", nil) require.NoError(t, err) require.NotNil(t, client) - require.True(t, strings.HasPrefix(client.client.con.u, "http://")) - require.True(t, strings.Contains(client.client.con.u, "http://local-machine:11002/custom/account/path/faketokensignature")) + require.True(t, strings.HasPrefix(client.client.Con.Endpoint(), "http://")) + require.True(t, strings.Contains(client.client.Con.Endpoint(), "http://local-machine:11002/custom/account/path/faketokensignature")) sharedKey, ok := client.cred.(*SharedKeyCredential) require.True(t, ok) diff --git a/sdk/tables/aztable/consts.go b/sdk/tables/aztable/constants.go similarity index 84% rename from sdk/tables/aztable/consts.go rename to sdk/tables/aztable/constants.go index f97dfa2121c3..9c3137b41f48 100644 --- a/sdk/tables/aztable/consts.go +++ b/sdk/tables/aztable/constants.go @@ -6,4 +6,5 @@ package aztable const ( headerXmsDate = "x-ms-date" headerAuthorization = "Authorization" + etagOData = "odata.etag" ) diff --git a/sdk/tables/aztable/cosmos_patch_transform_policy.go b/sdk/tables/aztable/cosmos_patch_transform_policy.go index 8c7447a304e8..13279e86107b 100644 --- a/sdk/tables/aztable/cosmos_patch_transform_policy.go +++ b/sdk/tables/aztable/cosmos_patch_transform_policy.go @@ -9,20 +9,20 @@ package aztable import ( "net/http" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" ) // cosmosPatchTransformPolicy transforms PATCH requests into POST requests with the "X-HTTP-Method":"MERGE" header set. type cosmosPatchTransformPolicy struct{} -func (p cosmosPatchTransformPolicy) Do(req *azcore.Request) (*http.Response, error) { +func (p cosmosPatchTransformPolicy) Do(req *policy.Request) (*http.Response, error) { transformPatchToCosmosPost(req) return req.Next() } -func transformPatchToCosmosPost(req *azcore.Request) { - if req.Method == http.MethodPatch { - req.Method = http.MethodPost - req.Header.Set("X-HTTP-Method", "MERGE") +func transformPatchToCosmosPost(req *policy.Request) { + if req.Raw().Method == http.MethodPatch { + req.Raw().Method = http.MethodPost + req.Raw().Header.Set("X-HTTP-Method", "MERGE") } } diff --git a/sdk/tables/aztable/entity.go b/sdk/tables/aztable/entity.go index 0836c87d08db..ed71817087c8 100644 --- a/sdk/tables/aztable/entity.go +++ b/sdk/tables/aztable/entity.go @@ -32,11 +32,11 @@ import ( type Entity struct { PartitionKey string RowKey string - Timestamp EdmDateTime + Timestamp EDMDateTime } // EdmEntity is an entity that embeds the azcore.Entity type and has a Properties map for an unlimited -// number of custom properties. The EdmEntity will serialize EdmGuid/EdmInt64/EdmDateTime/EdmBinary according to Odata annotations +// number of custom properties. The EdmEntity will serialize EDMGUID/EdmInt64/EDMDateTime/EdmBinary according to Odata annotations // myEntity := EdmEntity{ // Entity: Entity{ // PartitionKey: "pk001", @@ -45,22 +45,22 @@ type Entity struct { // Properties: map[string]interface{}{ // "Value": 10, // "Binary": EdmBinary([]byte{"bytevalue"}), -// "DateTime": EdmDateTime(time.Now()), +// "DateTime": EDMDateTime(time.Now()), // "Int64": EdmInt64(123456789012345), // } // } -type EdmEntity struct { +type EDMEntity struct { Metadata string `json:"odata.metadata"` Id string `json:"odata.id"` EditLink string `json:"odata.editLink"` Type string `json:"odata.type"` Etag string `json:"odata.etag"` Entity - Properties map[string]interface{} // Type assert the value to 1 of these: bool, int32, float64, string, EdmDateTime, EdmBinary, EdmGuid, EdmInt64 + Properties map[string]interface{} // Type assert the value to 1 of these: bool, int32, float64, string, EDMDateTime, EDMBinary, EDMGUID, EDMInt64 } -func (e EdmEntity) MarshalJSON() ([]byte, error) { +func (e EDMEntity) MarshalJSON() ([]byte, error) { entity := map[string]interface{}{} entity["PartitionKey"], entity["RowKey"] = e.PartitionKey, e.RowKey @@ -68,13 +68,13 @@ func (e EdmEntity) MarshalJSON() ([]byte, error) { entity[propName] = propValue edmType := "" switch propValue.(type) { - case EdmDateTime: + case EDMDateTime: edmType = "Edm.DateTime" - case EdmBinary: + case EDMBinary: edmType = "Edm.Binary" - case EdmGuid: + case EDMGUID: edmType = "Edm.Guid" - case EdmInt64: + case EDMInt64: edmType = "Edm.Int64" } if edmType != "" { @@ -84,7 +84,7 @@ func (e EdmEntity) MarshalJSON() ([]byte, error) { return json.Marshal(entity) } -func (e *EdmEntity) UnmarshalJSON(data []byte) (err error) { +func (e *EDMEntity) UnmarshalJSON(data []byte) (err error) { var entity map[string]json.RawMessage err = json.Unmarshal(data, &entity) if err != nil { @@ -96,7 +96,7 @@ func (e *EdmEntity) UnmarshalJSON(data []byte) (err error) { continue // Skip the @odata.type properties; we look them up explicitly later } switch propName { - // Look for EdmEntity's specific fields first + // Look for EDMEntity's specific fields first case "odata.metadata": err = json.Unmarshal(propRawValue, &e.Metadata) case "odata.id": @@ -133,19 +133,19 @@ func (e *EdmEntity) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(propRawValue, &propValue) } case "Edm.DateTime": - var v EdmDateTime + var v EDMDateTime err = json.Unmarshal(propRawValue, &v) propValue = v case "Edm.Binary": - var v EdmBinary + var v EDMBinary err = json.Unmarshal(propRawValue, &v) propValue = v case "Edm.Guid": - var v EdmGuid + var v EDMGUID err = json.Unmarshal(propRawValue, &v) propValue = v case "Edm.Int64": - var v EdmInt64 + var v EDMInt64 err = json.Unmarshal(propRawValue, &v) propValue = v } @@ -160,66 +160,66 @@ func (e *EdmEntity) UnmarshalJSON(data []byte) (err error) { // EdmBinary represents an Entity Property that is a byte slice. A byte slice wrapped in // EdmBinary will also receive the correct odata annotation for round-trip accuracy. -type EdmBinary []byte +type EDMBinary []byte -func (e EdmBinary) MarshalText() ([]byte, error) { +func (e EDMBinary) MarshalText() ([]byte, error) { return ([]byte)(base64.StdEncoding.EncodeToString(([]byte)(e))), nil } -func (e *EdmBinary) UnmarshalText(data []byte) error { +func (e *EDMBinary) UnmarshalText(data []byte) error { decoded, err := base64.StdEncoding.DecodeString(string(data)) if err != nil { return err } - *e = EdmBinary(decoded) + *e = EDMBinary(decoded) return nil } // EdmInt64 represents an entity property that is a 64-bit integer. Using EdmInt64 guarantees // proper odata type annotations. -type EdmInt64 int64 +type EDMInt64 int64 -func (e EdmInt64) MarshalText() ([]byte, error) { +func (e EDMInt64) MarshalText() ([]byte, error) { return []byte(strconv.FormatInt(int64(e), 10)), nil } -func (e *EdmInt64) UnmarshalText(data []byte) error { +func (e *EDMInt64) UnmarshalText(data []byte) error { i, err := strconv.ParseInt(string(data), 10, 64) if err != nil { return err } - *e = EdmInt64(i) + *e = EDMInt64(i) return nil } -// EdmInt64 represents an entity property that is a GUID wrapped in a string. Using EdmGuid guarantees +// EDMGUID represents an entity property that is a GUID wrapped in a string. Using EDMGUID guarantees // proper odata type annotations. -type EdmGuid string +type EDMGUID string -func (e EdmGuid) MarshalText() ([]byte, error) { +func (e EDMGUID) MarshalText() ([]byte, error) { return ([]byte)(e), nil } -func (e *EdmGuid) UnmarshalText(data []byte) error { - *e = EdmGuid(string(data)) +func (e *EDMGUID) UnmarshalText(data []byte) error { + *e = EDMGUID(string(data)) return nil } -// EdmDateTime represents an entity property that is a time.Time object. Using EdmDateTime guarantees +// EDMDateTime represents an entity property that is a time.Time object. Using EDMDateTime guarantees // proper odata type annotations. -type EdmDateTime time.Time +type EDMDateTime time.Time const rfc3339 = "2006-01-02T15:04:05.9999999Z" -func (e EdmDateTime) MarshalText() ([]byte, error) { +func (e EDMDateTime) MarshalText() ([]byte, error) { return ([]byte)(time.Time(e).Format(rfc3339)), nil } -func (e *EdmDateTime) UnmarshalText(data []byte) error { +func (e *EDMDateTime) UnmarshalText(data []byte) error { t, err := time.Parse(rfc3339, string(data)) if err != nil { return err } - *e = EdmDateTime(t) + *e = EDMDateTime(t) return nil } diff --git a/sdk/tables/aztable/entity_test.go b/sdk/tables/aztable/entity_test.go index bc7669ae7e8c..1f8880d4640c 100644 --- a/sdk/tables/aztable/entity_test.go +++ b/sdk/tables/aztable/entity_test.go @@ -29,7 +29,7 @@ func TestAddBasicEntity(t *testing.T) { marshalled, err := json.Marshal(basicEntity) require.Nil(t, err) - _, err = client.AddEntity(ctx, marshalled) + _, err = client.AddEntity(ctx, marshalled, nil) require.Nil(t, err) resp, err := client.GetEntity(ctx, "pk001", "rk001", nil) @@ -42,12 +42,12 @@ func TestAddBasicEntity(t *testing.T) { require.Equal(t, receivedEntity.RowKey, "rk001") queryString := "PartitionKey eq 'pk001'" - listOptions := ListOptions{Filter: &queryString} + listOptions := ListEntitiesOptions{Filter: &queryString} pager := client.List(&listOptions) count := 0 for pager.NextPage(ctx) { resp := pager.PageResponse() - for _, e := range resp.TableEntityQueryResponse.Value { + for _, e := range resp.Entities { err = json.Unmarshal(e, &receivedEntity) require.NoError(t, err) require.Equal(t, receivedEntity.PartitionKey, "pk001") @@ -55,7 +55,6 @@ func TestAddBasicEntity(t *testing.T) { count += 1 } } - require.Equal(t, count, 1) }) } @@ -71,16 +70,12 @@ func TestEdmMarshalling(t *testing.T) { marshalled, err := json.Marshal(edmEntity) require.Nil(t, err) - _, err = client.AddEntity(ctx, marshalled) + _, err = client.AddEntity(ctx, marshalled, nil) require.Nil(t, err) - fullMetadata := &QueryOptions{ - Format: OdataMetadataFormatApplicationJSONOdataFullmetadata.ToPtr(), - } - - resp, err := client.GetEntity(ctx, "partition", fmt.Sprint(1), fullMetadata) + resp, err := client.GetEntity(ctx, "partition", fmt.Sprint(1), nil) require.Nil(t, err) - var receivedEntity EdmEntity + var receivedEntity EDMEntity err = json.Unmarshal(resp.Value, &receivedEntity) require.Nil(t, err) diff --git a/sdk/tables/aztable/go.mod b/sdk/tables/aztable/go.mod index 4c10fa962220..060b52fa9545 100644 --- a/sdk/tables/aztable/go.mod +++ b/sdk/tables/aztable/go.mod @@ -1,12 +1,12 @@ module github.com/Azure/azure-sdk-for-go/sdk/tables/aztable -go 1.13 +go 1.16 replace github.com/Azure/azure-sdk-for-go/sdk/internal => ../../internal require ( - github.com/Azure/azure-sdk-for-go/sdk/azcore v0.18.1 - github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.9.3 + github.com/Azure/azure-sdk-for-go/sdk/azcore v0.19.0 + github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.10.0 github.com/Azure/azure-sdk-for-go/sdk/internal v0.7.0 github.com/Azure/azure-sdk-for-go/sdk/to v0.1.4 github.com/stretchr/testify v1.7.0 diff --git a/sdk/tables/aztable/go.sum b/sdk/tables/aztable/go.sum index 8aa9657f874b..d14df7728c0a 100644 --- a/sdk/tables/aztable/go.sum +++ b/sdk/tables/aztable/go.sum @@ -1,7 +1,7 @@ -github.com/Azure/azure-sdk-for-go/sdk/azcore v0.18.1 h1:BxW0zeNz9VbxtaeyuwAsgZ2WgCG7wwjb17H3f5czlp4= -github.com/Azure/azure-sdk-for-go/sdk/azcore v0.18.1/go.mod h1:h6H6c8enJmmocHUbLiiGY6sx7f9i+X3m1CHdd5c6Rdw= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.9.3 h1:xxhrKdJQHnbzyquwt4GJuK0xGYIchlxtrbOCy1RcXyg= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.9.3/go.mod h1:uuSIs9Jj5y1WfsKhk9xGaEzyu/5SEmdKwY3Oi0UK59M= +github.com/Azure/azure-sdk-for-go/sdk/azcore v0.19.0 h1:lhSJz9RMbJcTgxifR1hUNJnn6CNYtbgEDtQV22/9RBA= +github.com/Azure/azure-sdk-for-go/sdk/azcore v0.19.0/go.mod h1:h6H6c8enJmmocHUbLiiGY6sx7f9i+X3m1CHdd5c6Rdw= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.10.0 h1:jq5Urf8QJK6h0wr8CMiwggo4OSMkXwpArQlkSjSpaBk= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.10.0/go.mod h1:HcM1YX14R7CJcghJGOYCgdezslRSVzqwLf/q+4Y2r/0= github.com/Azure/azure-sdk-for-go/sdk/to v0.1.4 h1:3w4gk+uYOwplGhID1fDP305/8bI5Aug3URoC1V493KU= github.com/Azure/azure-sdk-for-go/sdk/to v0.1.4/go.mod h1:UL/d4lvWAzSJUuX+19uKdN0ktyjoOyQhgY+HWNgtIYI= github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= diff --git a/sdk/tables/aztable/zz_generated_connection.go b/sdk/tables/aztable/internal/connection.go similarity index 52% rename from sdk/tables/aztable/zz_generated_connection.go rename to sdk/tables/aztable/internal/connection.go index ca47a829f076..e7acbc622a3a 100644 --- a/sdk/tables/aztable/zz_generated_connection.go +++ b/sdk/tables/aztable/internal/connection.go @@ -1,67 +1,61 @@ -//go:build go1.13 -// +build go1.13 +//go:build go1.16 +// +build go1.16 // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -package aztable +package internal import ( - "fmt" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" ) -// connectionOptions contains configuration settings for the connection's pipeline. +var scopes = []string{"https://storage.azure.com/.default"} + +// ConnectionOptions contains configuration settings for the connection's pipeline. // All zero-value fields will be initialized with their default values. -type connectionOptions struct { +type ConnectionOptions struct { // HTTPClient sets the transport for making HTTP requests. - HTTPClient azcore.Transporter + HTTPClient policy.Transporter // Retry configures the built-in retry policy behavior. - Retry azcore.RetryOptions + Retry policy.RetryOptions // Telemetry configures the built-in telemetry policy behavior. - Telemetry azcore.TelemetryOptions + Telemetry policy.TelemetryOptions // Logging configures the built-in logging policy behavior. - Logging azcore.LogOptions + Logging policy.LogOptions // PerCallPolicies contains custom policies to inject into the pipeline. // Each policy is executed once per request. - PerCallPolicies []azcore.Policy + PerCallPolicies []policy.Policy // PerRetryPolicies contains custom policies to inject into the pipeline. // Each policy is executed once per request, and for each retry request. - PerRetryPolicies []azcore.Policy -} - -func (c *connectionOptions) telemetryOptions() *azcore.TelemetryOptions { - to := c.Telemetry - if to.Value == "" { - to.Value = telemetryInfo - } else { - to.Value = fmt.Sprintf("%s %s", telemetryInfo, to.Value) - } - return &to + PerRetryPolicies []policy.Policy } type connection struct { u string - p azcore.Pipeline + p runtime.Pipeline } -// newConnection creates an instance of the connection type with the specified endpoint. +// NewConnection creates an instance of the connection type with the specified endpoint. // Pass nil to accept the default options; this is the same as passing a zero-value options. -func newConnection(endpoint string, options *connectionOptions) *connection { +func NewConnection(endpoint string, cred azcore.Credential, options *ConnectionOptions) *connection { if options == nil { - options = &connectionOptions{} + options = &ConnectionOptions{} } - policies := []azcore.Policy{ - azcore.NewTelemetryPolicy(options.telemetryOptions()), + policies := []policy.Policy{} + if !options.Telemetry.Disabled { + policies = append(policies, runtime.NewTelemetryPolicy(module, version, &options.Telemetry)) } policies = append(policies, options.PerCallPolicies...) - policies = append(policies, azcore.NewRetryPolicy(&options.Retry)) + policies = append(policies, runtime.NewRetryPolicy(&options.Retry)) policies = append(policies, options.PerRetryPolicies...) - policies = append(policies, azcore.NewLogPolicy(&options.Logging)) - return &connection{u: endpoint, p: azcore.NewPipeline(options.HTTPClient, policies...)} + policies = append(policies, cred.NewAuthenticationPolicy(runtime.AuthenticationOptions{TokenRequest: policy.TokenRequestOptions{Scopes: scopes}})) + policies = append(policies, runtime.NewLogPolicy(&options.Logging)) + return &connection{u: endpoint, p: runtime.NewPipeline(options.HTTPClient, policies...)} } // Endpoint returns the connection's endpoint. @@ -70,6 +64,6 @@ func (c *connection) Endpoint() string { } // Pipeline returns the connection's pipeline. -func (c *connection) Pipeline() azcore.Pipeline { +func (c *connection) Pipeline() runtime.Pipeline { return c.p } diff --git a/sdk/tables/aztable/zz_generated_constants.go b/sdk/tables/aztable/internal/constants.go similarity index 69% rename from sdk/tables/aztable/zz_generated_constants.go rename to sdk/tables/aztable/internal/constants.go index a1ff9041bd71..505a4a5bca68 100644 --- a/sdk/tables/aztable/zz_generated_constants.go +++ b/sdk/tables/aztable/internal/constants.go @@ -1,14 +1,17 @@ -//go:build go1.13 -// +build go1.13 +//go:build go1.16 +// +build go1.16 // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -package aztable +package internal -const telemetryInfo = "azsdk-go-aztable/" +const ( + module = "aztable" + version = "v0.1.0" +) // GeoReplicationStatusType - The status of the secondary location. type GeoReplicationStatusType string @@ -33,25 +36,25 @@ func (c GeoReplicationStatusType) ToPtr() *GeoReplicationStatusType { return &c } -type OdataMetadataFormat string +type ODataMetadataFormat string const ( - OdataMetadataFormatApplicationJSONOdataFullmetadata OdataMetadataFormat = "application/json;odata=fullmetadata" - OdataMetadataFormatApplicationJSONOdataMinimalmetadata OdataMetadataFormat = "application/json;odata=minimalmetadata" - OdataMetadataFormatApplicationJSONOdataNometadata OdataMetadataFormat = "application/json;odata=nometadata" + ODataMetadataFormatApplicationJSONODataFullmetadata ODataMetadataFormat = "application/json;odata=fullmetadata" + ODataMetadataFormatApplicationJSONODataMinimalmetadata ODataMetadataFormat = "application/json;odata=minimalmetadata" + ODataMetadataFormatApplicationJSONODataNometadata ODataMetadataFormat = "application/json;odata=nometadata" ) -// PossibleOdataMetadataFormatValues returns the possible values for the OdataMetadataFormat const type. -func PossibleOdataMetadataFormatValues() []OdataMetadataFormat { - return []OdataMetadataFormat{ - OdataMetadataFormatApplicationJSONOdataFullmetadata, - OdataMetadataFormatApplicationJSONOdataMinimalmetadata, - OdataMetadataFormatApplicationJSONOdataNometadata, +// PossibleODataMetadataFormatValues returns the possible values for the ODataMetadataFormat const type. +func PossibleODataMetadataFormatValues() []ODataMetadataFormat { + return []ODataMetadataFormat{ + ODataMetadataFormatApplicationJSONODataFullmetadata, + ODataMetadataFormatApplicationJSONODataMinimalmetadata, + ODataMetadataFormatApplicationJSONODataNometadata, } } -// ToPtr returns a *OdataMetadataFormat pointing to the current value. -func (c OdataMetadataFormat) ToPtr() *OdataMetadataFormat { +// ToPtr returns a *ODataMetadataFormat pointing to the current value. +func (c ODataMetadataFormat) ToPtr() *ODataMetadataFormat { return &c } diff --git a/sdk/tables/aztable/zz_generated_models.go b/sdk/tables/aztable/internal/models.go similarity index 96% rename from sdk/tables/aztable/zz_generated_models.go rename to sdk/tables/aztable/internal/models.go index 2a31433b5e0c..b14b5a2119be 100644 --- a/sdk/tables/aztable/zz_generated_models.go +++ b/sdk/tables/aztable/internal/models.go @@ -1,19 +1,20 @@ -//go:build go1.13 -// +build go1.13 +//go:build go1.16 +// +build go1.16 // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -package aztable +package internal import ( "encoding/json" "encoding/xml" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" "reflect" "time" + + "github.com/Azure/azure-sdk-for-go/sdk/azcore" ) // AccessPolicy - An Access policy. @@ -161,7 +162,7 @@ type QueryOptions struct { // OData filter expression. Filter *string // Specifies the media type for the response. - Format *OdataMetadataFormat + Format *ODataMetadataFormat // Select expression using OData notation. Limits the columns on each record to just those requested, e.g. "$select=PolicyAssignmentId, ResourceId". Select *string // Maximum number of records to return. @@ -235,7 +236,7 @@ type TableDeleteOptions struct { // TableEntityQueryResponse - The properties for the table entity query response. type TableEntityQueryResponse struct { // The metadata response of the table. - OdataMetadata *string `json:"odata.metadata,omitempty"` + ODataMetadata *string `json:"odata.metadata,omitempty"` // List of table entities. Value []map[string]interface{} `json:"value,omitempty"` @@ -244,7 +245,7 @@ type TableEntityQueryResponse struct { // MarshalJSON implements the json.Marshaller interface for type TableEntityQueryResponse. func (t TableEntityQueryResponse) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - populate(objectMap, "odata.metadata", t.OdataMetadata) + populate(objectMap, "odata.metadata", t.ODataMetadata) populate(objectMap, "value", t.Value) return json.Marshal(objectMap) } @@ -320,7 +321,7 @@ type TableQueryOptions struct { // TableQueryResponse - The properties for the table query response. type TableQueryResponse struct { // The metadata response of the table. - OdataMetadata *string `json:"odata.metadata,omitempty"` + ODataMetadata *string `json:"odata.metadata,omitempty"` // List of tables. Value []*TableResponseProperties `json:"value,omitempty"` @@ -329,7 +330,7 @@ type TableQueryResponse struct { // MarshalJSON implements the json.Marshaller interface for type TableQueryResponse. func (t TableQueryResponse) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - populate(objectMap, "odata.metadata", t.OdataMetadata) + populate(objectMap, "odata.metadata", t.ODataMetadata) populate(objectMap, "value", t.Value) return json.Marshal(objectMap) } @@ -338,19 +339,19 @@ func (t TableQueryResponse) MarshalJSON() ([]byte, error) { type TableResponse struct { TableResponseProperties // The metadata response of the table. - OdataMetadata *string `json:"odata.metadata,omitempty"` + ODataMetadata *string `json:"odata.metadata,omitempty"` } // TableResponseProperties - The properties for the table response. type TableResponseProperties struct { // The edit link of the table. - OdataEditLink *string `json:"odata.editLink,omitempty"` + ODataEditLink *string `json:"odata.editLink,omitempty"` // The id of the table. - OdataID *string `json:"odata.id,omitempty"` + ODataID *string `json:"odata.id,omitempty"` // The odata type of the table. - OdataType *string `json:"odata.type,omitempty"` + ODataType *string `json:"odata.type,omitempty"` // The name of the table. TableName *string `json:"TableName,omitempty"` diff --git a/sdk/tables/aztable/zz_generated_response_types.go b/sdk/tables/aztable/internal/response_types.go similarity index 76% rename from sdk/tables/aztable/zz_generated_response_types.go rename to sdk/tables/aztable/internal/response_types.go index 70aa81764405..5b7a0c119bbf 100644 --- a/sdk/tables/aztable/zz_generated_response_types.go +++ b/sdk/tables/aztable/internal/response_types.go @@ -1,92 +1,90 @@ -//go:build go1.13 -// +build go1.13 +//go:build go1.16 +// +build go1.16 // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -package aztable +package internal import ( "net/http" "time" ) -// MapOfInterfaceResponse is the response envelope for operations that return a map[string]interface{} type. -type MapOfInterfaceResponse struct { - // ClientRequestID contains the information returned from the x-ms-client-request-id header response. - ClientRequestID *string - - // ContentType contains the information returned from the Content-Type header response. - ContentType *string - - // Date contains the information returned from the Date header response. - Date *time.Time - - // ETag contains the information returned from the ETag header response. - ETag *string - - // PreferenceApplied contains the information returned from the Preference-Applied header response. - PreferenceApplied *string - +// ServiceGetPropertiesResponse contains the response from method Service.GetProperties. +type ServiceGetPropertiesResponse struct { + ServiceGetPropertiesResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response +} - // RequestID contains the information returned from the x-ms-request-id header response. - RequestID *string +// ServiceGetPropertiesResult contains the result from method Service.GetProperties. +type ServiceGetPropertiesResult struct { + TableServiceProperties + // ClientRequestID contains the information returned from the x-ms-client-request-id header response. + ClientRequestID *string `xml:"ClientRequestID"` - // The other properties of the table entity. - Value map[string]interface{} + // RequestID contains the information returned from the x-ms-request-id header response. + RequestID *string `xml:"RequestID"` // Version contains the information returned from the x-ms-version header response. - Version *string - - // XMSContinuationNextPartitionKey contains the information returned from the x-ms-continuation-NextPartitionKey header response. - XMSContinuationNextPartitionKey *string - - // XMSContinuationNextRowKey contains the information returned from the x-ms-continuation-NextRowKey header response. - XMSContinuationNextRowKey *string + Version *string `xml:"Version"` } -// ServiceSetPropertiesResponse contains the response from method Service.SetProperties. -type ServiceSetPropertiesResponse struct { - // ClientRequestID contains the information returned from the x-ms-client-request-id header response. - ClientRequestID *string - +// ServiceGetStatisticsResponse contains the response from method Service.GetStatistics. +type ServiceGetStatisticsResponse struct { + ServiceGetStatisticsResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response - - // RequestID contains the information returned from the x-ms-request-id header response. - RequestID *string - - // Version contains the information returned from the x-ms-version header response. - Version *string } -// SignedIdentifierArrayResponse is the response envelope for operations that return a []*SignedIdentifier type. -type SignedIdentifierArrayResponse struct { +// ServiceGetStatisticsResult contains the result from method Service.GetStatistics. +type ServiceGetStatisticsResult struct { + TableServiceStats // ClientRequestID contains the information returned from the x-ms-client-request-id header response. ClientRequestID *string `xml:"ClientRequestID"` // Date contains the information returned from the Date header response. Date *time.Time `xml:"Date"` + // RequestID contains the information returned from the x-ms-request-id header response. + RequestID *string `xml:"RequestID"` + + // Version contains the information returned from the x-ms-version header response. + Version *string `xml:"Version"` +} + +// ServiceSetPropertiesResponse contains the response from method Service.SetProperties. +type ServiceSetPropertiesResponse struct { + ServiceSetPropertiesResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response +} - // RequestID contains the information returned from the x-ms-request-id header response. - RequestID *string `xml:"RequestID"` +// ServiceSetPropertiesResult contains the result from method Service.SetProperties. +type ServiceSetPropertiesResult struct { + // ClientRequestID contains the information returned from the x-ms-client-request-id header response. + ClientRequestID *string - // A collection of signed identifiers. - SignedIdentifiers []*SignedIdentifier `xml:"SignedIdentifier"` + // RequestID contains the information returned from the x-ms-request-id header response. + RequestID *string // Version contains the information returned from the x-ms-version header response. - Version *string `xml:"Version"` + Version *string } // TableCreateResponse contains the response from method Table.Create. type TableCreateResponse struct { + TableCreateResult + // RawResponse contains the underlying HTTP response. + RawResponse *http.Response +} + +// TableCreateResult contains the result from method Table.Create. +type TableCreateResult struct { + TableResponse // ClientRequestID contains the information returned from the x-ms-client-request-id header response. ClientRequestID *string @@ -96,9 +94,6 @@ type TableCreateResponse struct { // PreferenceApplied contains the information returned from the Preference-Applied header response. PreferenceApplied *string - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response - // RequestID contains the information returned from the x-ms-request-id header response. RequestID *string @@ -108,15 +103,19 @@ type TableCreateResponse struct { // TableDeleteEntityResponse contains the response from method Table.DeleteEntity. type TableDeleteEntityResponse struct { + TableDeleteEntityResult + // RawResponse contains the underlying HTTP response. + RawResponse *http.Response +} + +// TableDeleteEntityResult contains the result from method Table.DeleteEntity. +type TableDeleteEntityResult struct { // ClientRequestID contains the information returned from the x-ms-client-request-id header response. ClientRequestID *string // Date contains the information returned from the Date header response. Date *time.Time - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response - // RequestID contains the information returned from the x-ms-request-id header response. RequestID *string @@ -126,15 +125,19 @@ type TableDeleteEntityResponse struct { // TableDeleteResponse contains the response from method Table.Delete. type TableDeleteResponse struct { + TableDeleteResult + // RawResponse contains the underlying HTTP response. + RawResponse *http.Response +} + +// TableDeleteResult contains the result from method Table.Delete. +type TableDeleteResult struct { // ClientRequestID contains the information returned from the x-ms-client-request-id header response. ClientRequestID *string // Date contains the information returned from the Date header response. Date *time.Time - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response - // RequestID contains the information returned from the x-ms-request-id header response. RequestID *string @@ -142,35 +145,40 @@ type TableDeleteResponse struct { Version *string } -// TableEntityQueryResponseResponse is the response envelope for operations that return a TableEntityQueryResponse type. -type TableEntityQueryResponseResponse struct { +// TableGetAccessPolicyResponse contains the response from method Table.GetAccessPolicy. +type TableGetAccessPolicyResponse struct { + TableGetAccessPolicyResult + // RawResponse contains the underlying HTTP response. + RawResponse *http.Response +} + +// TableGetAccessPolicyResult contains the result from method Table.GetAccessPolicy. +type TableGetAccessPolicyResult struct { // ClientRequestID contains the information returned from the x-ms-client-request-id header response. - ClientRequestID *string + ClientRequestID *string `xml:"ClientRequestID"` // Date contains the information returned from the Date header response. - Date *time.Time - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + Date *time.Time `xml:"Date"` // RequestID contains the information returned from the x-ms-request-id header response. - RequestID *string + RequestID *string `xml:"RequestID"` - // The properties for the table entity query response. - TableEntityQueryResponse *TableEntityQueryResponse + // A collection of signed identifiers. + SignedIdentifiers []*SignedIdentifier `xml:"SignedIdentifier"` // Version contains the information returned from the x-ms-version header response. - Version *string - - // XMSContinuationNextPartitionKey contains the information returned from the x-ms-continuation-NextPartitionKey header response. - XMSContinuationNextPartitionKey *string - - // XMSContinuationNextRowKey contains the information returned from the x-ms-continuation-NextRowKey header response. - XMSContinuationNextRowKey *string + Version *string `xml:"Version"` } // TableInsertEntityResponse contains the response from method Table.InsertEntity. type TableInsertEntityResponse struct { + TableInsertEntityResult + // RawResponse contains the underlying HTTP response. + RawResponse *http.Response +} + +// TableInsertEntityResult contains the result from method Table.InsertEntity. +type TableInsertEntityResult struct { // ClientRequestID contains the information returned from the x-ms-client-request-id header response. ClientRequestID *string @@ -186,18 +194,25 @@ type TableInsertEntityResponse struct { // PreferenceApplied contains the information returned from the Preference-Applied header response. PreferenceApplied *string - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response - // RequestID contains the information returned from the x-ms-request-id header response. RequestID *string + // The other properties of the table entity. + Value map[string]interface{} + // Version contains the information returned from the x-ms-version header response. Version *string } // TableMergeEntityResponse contains the response from method Table.MergeEntity. type TableMergeEntityResponse struct { + TableMergeEntityResult + // RawResponse contains the underlying HTTP response. + RawResponse *http.Response +} + +// TableMergeEntityResult contains the result from method Table.MergeEntity. +type TableMergeEntityResult struct { // ClientRequestID contains the information returned from the x-ms-client-request-id header response. ClientRequestID *string @@ -207,9 +222,6 @@ type TableMergeEntityResponse struct { // ETag contains the information returned from the ETag header response. ETag *string - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response - // RequestID contains the information returned from the x-ms-request-id header response. RequestID *string @@ -217,104 +229,110 @@ type TableMergeEntityResponse struct { Version *string } -// TableQueryResponseResponse is the response envelope for operations that return a TableQueryResponse type. -type TableQueryResponseResponse struct { +// TableQueryEntitiesResponse contains the response from method Table.QueryEntities. +type TableQueryEntitiesResponse struct { + TableQueryEntitiesResult + // RawResponse contains the underlying HTTP response. + RawResponse *http.Response +} + +// TableQueryEntitiesResult contains the result from method Table.QueryEntities. +type TableQueryEntitiesResult struct { + TableEntityQueryResponse // ClientRequestID contains the information returned from the x-ms-client-request-id header response. ClientRequestID *string // Date contains the information returned from the Date header response. Date *time.Time - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response - // RequestID contains the information returned from the x-ms-request-id header response. RequestID *string - // The properties for the table query response. - TableQueryResponse *TableQueryResponse - // Version contains the information returned from the x-ms-version header response. Version *string - // XMSContinuationNextTableName contains the information returned from the x-ms-continuation-NextTableName header response. - XMSContinuationNextTableName *string + // XMSContinuationNextPartitionKey contains the information returned from the x-ms-continuation-NextPartitionKey header response. + XMSContinuationNextPartitionKey *string + + // XMSContinuationNextRowKey contains the information returned from the x-ms-continuation-NextRowKey header response. + XMSContinuationNextRowKey *string +} + +// TableQueryEntityWithPartitionAndRowKeyResponse contains the response from method Table.QueryEntityWithPartitionAndRowKey. +type TableQueryEntityWithPartitionAndRowKeyResponse struct { + TableQueryEntityWithPartitionAndRowKeyResult + // RawResponse contains the underlying HTTP response. + RawResponse *http.Response } -// TableResponseResponse is the response envelope for operations that return a TableResponse type. -type TableResponseResponse struct { +// TableQueryEntityWithPartitionAndRowKeyResult contains the result from method Table.QueryEntityWithPartitionAndRowKey. +type TableQueryEntityWithPartitionAndRowKeyResult struct { // ClientRequestID contains the information returned from the x-ms-client-request-id header response. ClientRequestID *string // Date contains the information returned from the Date header response. Date *time.Time - // PreferenceApplied contains the information returned from the Preference-Applied header response. - PreferenceApplied *string - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + // ETag contains the information returned from the ETag header response. + ETag *string // RequestID contains the information returned from the x-ms-request-id header response. RequestID *string - // The response for a single table. - TableResponse *TableResponse + // The other properties of the table entity. + Value map[string]interface{} // Version contains the information returned from the x-ms-version header response. Version *string -} -// TableServicePropertiesResponse is the response envelope for operations that return a TableServiceProperties type. -type TableServicePropertiesResponse struct { - // ClientRequestID contains the information returned from the x-ms-client-request-id header response. - ClientRequestID *string `xml:"ClientRequestID"` + // XMSContinuationNextPartitionKey contains the information returned from the x-ms-continuation-NextPartitionKey header response. + XMSContinuationNextPartitionKey *string + + // XMSContinuationNextRowKey contains the information returned from the x-ms-continuation-NextRowKey header response. + XMSContinuationNextRowKey *string +} +// TableQueryResponseEnvelope contains the response from method Table.Query. +type TableQueryResponseEnvelope struct { + TableQueryResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response - - // RequestID contains the information returned from the x-ms-request-id header response. - RequestID *string `xml:"RequestID"` - - // Table Service Properties. - StorageServiceProperties *TableServiceProperties `xml:"StorageServiceProperties"` - - // Version contains the information returned from the x-ms-version header response. - Version *string `xml:"Version"` } -// TableServiceStatsResponse is the response envelope for operations that return a TableServiceStats type. -type TableServiceStatsResponse struct { +// TableQueryResult contains the result from method Table.Query. +type TableQueryResult struct { + TableQueryResponse // ClientRequestID contains the information returned from the x-ms-client-request-id header response. - ClientRequestID *string `xml:"ClientRequestID"` + ClientRequestID *string // Date contains the information returned from the Date header response. - Date *time.Time `xml:"Date"` - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + Date *time.Time // RequestID contains the information returned from the x-ms-request-id header response. - RequestID *string `xml:"RequestID"` - - // Stats for the service. - StorageServiceStats *TableServiceStats `xml:"StorageServiceStats"` + RequestID *string // Version contains the information returned from the x-ms-version header response. - Version *string `xml:"Version"` + Version *string + + // XMSContinuationNextTableName contains the information returned from the x-ms-continuation-NextTableName header response. + XMSContinuationNextTableName *string } // TableSetAccessPolicyResponse contains the response from method Table.SetAccessPolicy. type TableSetAccessPolicyResponse struct { + TableSetAccessPolicyResult + // RawResponse contains the underlying HTTP response. + RawResponse *http.Response +} + +// TableSetAccessPolicyResult contains the result from method Table.SetAccessPolicy. +type TableSetAccessPolicyResult struct { // ClientRequestID contains the information returned from the x-ms-client-request-id header response. ClientRequestID *string // Date contains the information returned from the Date header response. Date *time.Time - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response - // RequestID contains the information returned from the x-ms-request-id header response. RequestID *string @@ -324,6 +342,13 @@ type TableSetAccessPolicyResponse struct { // TableUpdateEntityResponse contains the response from method Table.UpdateEntity. type TableUpdateEntityResponse struct { + TableUpdateEntityResult + // RawResponse contains the underlying HTTP response. + RawResponse *http.Response +} + +// TableUpdateEntityResult contains the result from method Table.UpdateEntity. +type TableUpdateEntityResult struct { // ClientRequestID contains the information returned from the x-ms-client-request-id header response. ClientRequestID *string @@ -333,9 +358,6 @@ type TableUpdateEntityResponse struct { // ETag contains the information returned from the ETag header response. ETag *string - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response - // RequestID contains the information returned from the x-ms-request-id header response. RequestID *string diff --git a/sdk/tables/aztable/zz_generated_service_client.go b/sdk/tables/aztable/internal/service_client.go similarity index 51% rename from sdk/tables/aztable/zz_generated_service_client.go rename to sdk/tables/aztable/internal/service_client.go index cfa06d54479e..93e39fe2673f 100644 --- a/sdk/tables/aztable/zz_generated_service_client.go +++ b/sdk/tables/aztable/internal/service_client.go @@ -1,12 +1,12 @@ -//go:build go1.13 -// +build go1.13 +//go:build go1.16 +// +build go1.16 // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -package aztable +package internal import ( "context" @@ -15,59 +15,62 @@ import ( "strconv" "time" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" ) -type serviceClient struct { - con *connection +// ServiceClient contains the methods for the Service group. +// Don't use this type directly, use NewServiceClient() instead. +type ServiceClient struct { + Con *connection +} + +// NewServiceClient creates a new instance of ServiceClient with the specified values. +func NewServiceClient(con *connection) *ServiceClient { + return &ServiceClient{Con: con} } // GetProperties - Gets the properties of an account's Table service, including properties for Analytics and CORS (Cross-Origin Resource Sharing) rules. // If the operation fails it returns the *TableServiceError error type. -func (client *serviceClient) GetProperties(ctx context.Context, options *ServiceGetPropertiesOptions) (TableServicePropertiesResponse, error) { +func (client *ServiceClient) GetProperties(ctx context.Context, options *ServiceGetPropertiesOptions) (ServiceGetPropertiesResponse, error) { req, err := client.getPropertiesCreateRequest(ctx, options) if err != nil { - return TableServicePropertiesResponse{}, err + return ServiceGetPropertiesResponse{}, err } - resp, err := client.con.Pipeline().Do(req) + resp, err := client.Con.Pipeline().Do(req) if err != nil { - return TableServicePropertiesResponse{}, err + return ServiceGetPropertiesResponse{}, err } - if !azcore.HasStatusCode(resp, http.StatusOK) { - return TableServicePropertiesResponse{}, client.getPropertiesHandleError(resp) + if !runtime.HasStatusCode(resp, http.StatusOK) { + return ServiceGetPropertiesResponse{}, client.getPropertiesHandleError(resp) } return client.getPropertiesHandleResponse(resp) } // getPropertiesCreateRequest creates the GetProperties request. -func (client *serviceClient) getPropertiesCreateRequest(ctx context.Context, options *ServiceGetPropertiesOptions) (*azcore.Request, error) { - req, err := azcore.NewRequest(ctx, http.MethodGet, client.con.Endpoint()) +func (client *ServiceClient) getPropertiesCreateRequest(ctx context.Context, options *ServiceGetPropertiesOptions) (*policy.Request, error) { + req, err := runtime.NewRequest(ctx, http.MethodGet, client.Con.Endpoint()) if err != nil { return nil, err } - req.Telemetry(telemetryInfo) - reqQP := req.URL.Query() + reqQP := req.Raw().URL.Query() reqQP.Set("restype", "service") reqQP.Set("comp", "properties") if options != nil && options.Timeout != nil { reqQP.Set("timeout", strconv.FormatInt(int64(*options.Timeout), 10)) } - req.URL.RawQuery = reqQP.Encode() - req.Header.Set("x-ms-version", "2019-02-02") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header.Set("x-ms-version", "2019-02-02") if options != nil && options.RequestID != nil { - req.Header.Set("x-ms-client-request-id", *options.RequestID) + req.Raw().Header.Set("x-ms-client-request-id", *options.RequestID) } - req.Header.Set("Accept", "application/xml") + req.Raw().Header.Set("Accept", "application/xml") return req, nil } // getPropertiesHandleResponse handles the GetProperties response. -func (client *serviceClient) getPropertiesHandleResponse(resp *http.Response) (TableServicePropertiesResponse, error) { - var val *TableServiceProperties - if err := azcore.UnmarshalAsXML(resp, &val); err != nil { - return TableServicePropertiesResponse{}, err - } - result := TableServicePropertiesResponse{RawResponse: resp, StorageServiceProperties: val} +func (client *ServiceClient) getPropertiesHandleResponse(resp *http.Response) (ServiceGetPropertiesResponse, error) { + result := ServiceGetPropertiesResponse{RawResponse: resp} if val := resp.Header.Get("x-ms-client-request-id"); val != "" { result.ClientRequestID = &val } @@ -77,69 +80,67 @@ func (client *serviceClient) getPropertiesHandleResponse(resp *http.Response) (T if val := resp.Header.Get("x-ms-version"); val != "" { result.Version = &val } + if err := runtime.UnmarshalAsXML(resp, &result.TableServiceProperties); err != nil { + return ServiceGetPropertiesResponse{}, err + } return result, nil } // getPropertiesHandleError handles the GetProperties error response. -func (client *serviceClient) getPropertiesHandleError(resp *http.Response) error { - body, err := azcore.Payload(resp) +func (client *ServiceClient) getPropertiesHandleError(resp *http.Response) error { + body, err := runtime.Payload(resp) if err != nil { - return azcore.NewResponseError(err, resp) + return runtime.NewResponseError(err, resp) } errType := TableServiceError{raw: string(body)} - if err := azcore.UnmarshalAsJSON(resp, &errType); err != nil { - return azcore.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) + if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { + return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) } - return azcore.NewResponseError(&errType, resp) + return runtime.NewResponseError(&errType, resp) } // GetStatistics - Retrieves statistics related to replication for the Table service. It is only available on the secondary location endpoint when read-access // geo-redundant replication is enabled for the account. // If the operation fails it returns the *TableServiceError error type. -func (client *serviceClient) GetStatistics(ctx context.Context, options *ServiceGetStatisticsOptions) (TableServiceStatsResponse, error) { +func (client *ServiceClient) GetStatistics(ctx context.Context, options *ServiceGetStatisticsOptions) (ServiceGetStatisticsResponse, error) { req, err := client.getStatisticsCreateRequest(ctx, options) if err != nil { - return TableServiceStatsResponse{}, err + return ServiceGetStatisticsResponse{}, err } - resp, err := client.con.Pipeline().Do(req) + resp, err := client.Con.Pipeline().Do(req) if err != nil { - return TableServiceStatsResponse{}, err + return ServiceGetStatisticsResponse{}, err } - if !azcore.HasStatusCode(resp, http.StatusOK) { - return TableServiceStatsResponse{}, client.getStatisticsHandleError(resp) + if !runtime.HasStatusCode(resp, http.StatusOK) { + return ServiceGetStatisticsResponse{}, client.getStatisticsHandleError(resp) } return client.getStatisticsHandleResponse(resp) } // getStatisticsCreateRequest creates the GetStatistics request. -func (client *serviceClient) getStatisticsCreateRequest(ctx context.Context, options *ServiceGetStatisticsOptions) (*azcore.Request, error) { - req, err := azcore.NewRequest(ctx, http.MethodGet, client.con.Endpoint()) +func (client *ServiceClient) getStatisticsCreateRequest(ctx context.Context, options *ServiceGetStatisticsOptions) (*policy.Request, error) { + req, err := runtime.NewRequest(ctx, http.MethodGet, client.Con.Endpoint()) if err != nil { return nil, err } - req.Telemetry(telemetryInfo) - reqQP := req.URL.Query() + reqQP := req.Raw().URL.Query() reqQP.Set("restype", "service") reqQP.Set("comp", "stats") if options != nil && options.Timeout != nil { reqQP.Set("timeout", strconv.FormatInt(int64(*options.Timeout), 10)) } - req.URL.RawQuery = reqQP.Encode() - req.Header.Set("x-ms-version", "2019-02-02") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header.Set("x-ms-version", "2019-02-02") if options != nil && options.RequestID != nil { - req.Header.Set("x-ms-client-request-id", *options.RequestID) + req.Raw().Header.Set("x-ms-client-request-id", *options.RequestID) } - req.Header.Set("Accept", "application/xml") + req.Raw().Header.Set("Accept", "application/xml") return req, nil } // getStatisticsHandleResponse handles the GetStatistics response. -func (client *serviceClient) getStatisticsHandleResponse(resp *http.Response) (TableServiceStatsResponse, error) { - var val *TableServiceStats - if err := azcore.UnmarshalAsXML(resp, &val); err != nil { - return TableServiceStatsResponse{}, err - } - result := TableServiceStatsResponse{RawResponse: resp, StorageServiceStats: val} +func (client *ServiceClient) getStatisticsHandleResponse(resp *http.Response) (ServiceGetStatisticsResponse, error) { + result := ServiceGetStatisticsResponse{RawResponse: resp} if val := resp.Header.Get("x-ms-client-request-id"); val != "" { result.ClientRequestID = &val } @@ -152,68 +153,70 @@ func (client *serviceClient) getStatisticsHandleResponse(resp *http.Response) (T if val := resp.Header.Get("Date"); val != "" { date, err := time.Parse(time.RFC1123, val) if err != nil { - return TableServiceStatsResponse{}, err + return ServiceGetStatisticsResponse{}, err } result.Date = &date } + if err := runtime.UnmarshalAsXML(resp, &result.TableServiceStats); err != nil { + return ServiceGetStatisticsResponse{}, err + } return result, nil } // getStatisticsHandleError handles the GetStatistics error response. -func (client *serviceClient) getStatisticsHandleError(resp *http.Response) error { - body, err := azcore.Payload(resp) +func (client *ServiceClient) getStatisticsHandleError(resp *http.Response) error { + body, err := runtime.Payload(resp) if err != nil { - return azcore.NewResponseError(err, resp) + return runtime.NewResponseError(err, resp) } errType := TableServiceError{raw: string(body)} - if err := azcore.UnmarshalAsJSON(resp, &errType); err != nil { - return azcore.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) + if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { + return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) } - return azcore.NewResponseError(&errType, resp) + return runtime.NewResponseError(&errType, resp) } // SetProperties - Sets properties for an account's Table service endpoint, including properties for Analytics and CORS (Cross-Origin Resource Sharing) // rules. // If the operation fails it returns the *TableServiceError error type. -func (client *serviceClient) SetProperties(ctx context.Context, tableServiceProperties TableServiceProperties, options *ServiceSetPropertiesOptions) (ServiceSetPropertiesResponse, error) { +func (client *ServiceClient) SetProperties(ctx context.Context, tableServiceProperties TableServiceProperties, options *ServiceSetPropertiesOptions) (ServiceSetPropertiesResponse, error) { req, err := client.setPropertiesCreateRequest(ctx, tableServiceProperties, options) if err != nil { return ServiceSetPropertiesResponse{}, err } - resp, err := client.con.Pipeline().Do(req) + resp, err := client.Con.Pipeline().Do(req) if err != nil { return ServiceSetPropertiesResponse{}, err } - if !azcore.HasStatusCode(resp, http.StatusAccepted) { + if !runtime.HasStatusCode(resp, http.StatusAccepted) { return ServiceSetPropertiesResponse{}, client.setPropertiesHandleError(resp) } return client.setPropertiesHandleResponse(resp) } // setPropertiesCreateRequest creates the SetProperties request. -func (client *serviceClient) setPropertiesCreateRequest(ctx context.Context, tableServiceProperties TableServiceProperties, options *ServiceSetPropertiesOptions) (*azcore.Request, error) { - req, err := azcore.NewRequest(ctx, http.MethodPut, client.con.Endpoint()) +func (client *ServiceClient) setPropertiesCreateRequest(ctx context.Context, tableServiceProperties TableServiceProperties, options *ServiceSetPropertiesOptions) (*policy.Request, error) { + req, err := runtime.NewRequest(ctx, http.MethodPut, client.Con.Endpoint()) if err != nil { return nil, err } - req.Telemetry(telemetryInfo) - reqQP := req.URL.Query() + reqQP := req.Raw().URL.Query() reqQP.Set("restype", "service") reqQP.Set("comp", "properties") if options != nil && options.Timeout != nil { reqQP.Set("timeout", strconv.FormatInt(int64(*options.Timeout), 10)) } - req.URL.RawQuery = reqQP.Encode() - req.Header.Set("x-ms-version", "2019-02-02") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header.Set("x-ms-version", "2019-02-02") if options != nil && options.RequestID != nil { - req.Header.Set("x-ms-client-request-id", *options.RequestID) + req.Raw().Header.Set("x-ms-client-request-id", *options.RequestID) } - req.Header.Set("Accept", "application/xml") - return req, req.MarshalAsXML(tableServiceProperties) + req.Raw().Header.Set("Accept", "application/xml") + return req, runtime.MarshalAsXML(req, tableServiceProperties) } // setPropertiesHandleResponse handles the SetProperties response. -func (client *serviceClient) setPropertiesHandleResponse(resp *http.Response) (ServiceSetPropertiesResponse, error) { +func (client *ServiceClient) setPropertiesHandleResponse(resp *http.Response) (ServiceSetPropertiesResponse, error) { result := ServiceSetPropertiesResponse{RawResponse: resp} if val := resp.Header.Get("x-ms-client-request-id"); val != "" { result.ClientRequestID = &val @@ -228,14 +231,14 @@ func (client *serviceClient) setPropertiesHandleResponse(resp *http.Response) (S } // setPropertiesHandleError handles the SetProperties error response. -func (client *serviceClient) setPropertiesHandleError(resp *http.Response) error { - body, err := azcore.Payload(resp) +func (client *ServiceClient) setPropertiesHandleError(resp *http.Response) error { + body, err := runtime.Payload(resp) if err != nil { - return azcore.NewResponseError(err, resp) + return runtime.NewResponseError(err, resp) } errType := TableServiceError{raw: string(body)} - if err := azcore.UnmarshalAsJSON(resp, &errType); err != nil { - return azcore.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) + if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { + return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) } - return azcore.NewResponseError(&errType, resp) + return runtime.NewResponseError(&errType, resp) } diff --git a/sdk/tables/aztable/zz_generated_table_client.go b/sdk/tables/aztable/internal/table_client.go similarity index 55% rename from sdk/tables/aztable/zz_generated_table_client.go rename to sdk/tables/aztable/internal/table_client.go index e942cb6f2c04..c05679efe39f 100644 --- a/sdk/tables/aztable/zz_generated_table_client.go +++ b/sdk/tables/aztable/internal/table_client.go @@ -1,12 +1,12 @@ -//go:build go1.13 -// +build go1.13 +//go:build go1.16 +// +build go1.16 // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -package aztable +package internal import ( "context" @@ -19,164 +19,141 @@ import ( "strings" "time" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" ) -type tableClient struct { - con *connection +// TableClient contains the methods for the Table group. +// Don't use this type directly, use NewTableClient() instead. +type TableClient struct { + Con *connection +} + +// NewTableClient creates a new instance of TableClient with the specified values. +func NewTableClient(con *connection) *TableClient { + return &TableClient{Con: con} } // Create - Creates a new table under the given account. // If the operation fails it returns the *TableServiceError error type. -// Possible return types are *TableResponseResponse, *TableCreateResponse -func (client *tableClient) Create(ctx context.Context, tableProperties TableProperties, tableCreateOptions *TableCreateOptions, queryOptions *QueryOptions) (interface{}, error) { +func (client *TableClient) Create(ctx context.Context, tableProperties TableProperties, tableCreateOptions *TableCreateOptions, queryOptions *QueryOptions) (TableCreateResponse, error) { req, err := client.createCreateRequest(ctx, tableProperties, tableCreateOptions, queryOptions) if err != nil { - return nil, err + return TableCreateResponse{}, err } - resp, err := client.con.Pipeline().Do(req) + resp, err := client.Con.Pipeline().Do(req) if err != nil { - return nil, err + return TableCreateResponse{}, err } - if !azcore.HasStatusCode(resp, http.StatusCreated, http.StatusNoContent) { - return nil, client.createHandleError(resp) + if !runtime.HasStatusCode(resp, http.StatusCreated, http.StatusNoContent) { + return TableCreateResponse{}, client.createHandleError(resp) } return client.createHandleResponse(resp) } // createCreateRequest creates the Create request. -func (client *tableClient) createCreateRequest(ctx context.Context, tableProperties TableProperties, tableCreateOptions *TableCreateOptions, queryOptions *QueryOptions) (*azcore.Request, error) { +func (client *TableClient) createCreateRequest(ctx context.Context, tableProperties TableProperties, tableCreateOptions *TableCreateOptions, queryOptions *QueryOptions) (*policy.Request, error) { urlPath := "/Tables" - req, err := azcore.NewRequest(ctx, http.MethodPost, azcore.JoinPaths(client.con.Endpoint(), urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.Con.Endpoint(), urlPath)) if err != nil { return nil, err } - req.Telemetry(telemetryInfo) - reqQP := req.URL.Query() + reqQP := req.Raw().URL.Query() if queryOptions != nil && queryOptions.Format != nil { reqQP.Set("$format", string(*queryOptions.Format)) } - req.URL.RawQuery = reqQP.Encode() - req.Header.Set("x-ms-version", "2019-02-02") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header.Set("x-ms-version", "2019-02-02") if tableCreateOptions != nil && tableCreateOptions.RequestID != nil { - req.Header.Set("x-ms-client-request-id", *tableCreateOptions.RequestID) + req.Raw().Header.Set("x-ms-client-request-id", *tableCreateOptions.RequestID) } - req.Header.Set("DataServiceVersion", "3.0") + req.Raw().Header.Set("DataServiceVersion", "3.0") if tableCreateOptions != nil && tableCreateOptions.ResponsePreference != nil { - req.Header.Set("Prefer", string(*tableCreateOptions.ResponsePreference)) + req.Raw().Header.Set("Prefer", string(*tableCreateOptions.ResponsePreference)) } - req.Header.Set("Accept", "application/json;odata=minimalmetadata") - return req, req.MarshalAsJSON(tableProperties) + req.Raw().Header.Set("Accept", "application/json;odata=minimalmetadata") + return req, runtime.MarshalAsJSON(req, tableProperties) } // createHandleResponse handles the Create response. -func (client *tableClient) createHandleResponse(resp *http.Response) (interface{}, error) { - switch resp.StatusCode { - case http.StatusCreated: - var val *TableResponse - if err := azcore.UnmarshalAsJSON(resp, &val); err != nil { - return nil, err - } - result := TableResponseResponse{RawResponse: resp, TableResponse: val} - if val := resp.Header.Get("x-ms-client-request-id"); val != "" { - result.ClientRequestID = &val - } - if val := resp.Header.Get("x-ms-request-id"); val != "" { - result.RequestID = &val - } - if val := resp.Header.Get("x-ms-version"); val != "" { - result.Version = &val - } - if val := resp.Header.Get("Date"); val != "" { - date, err := time.Parse(time.RFC1123, val) - if err != nil { - return TableResponseResponse{}, err - } - result.Date = &date - } - if val := resp.Header.Get("Preference-Applied"); val != "" { - result.PreferenceApplied = &val - } - return result, nil - case http.StatusNoContent: - result := TableCreateResponse{RawResponse: resp} - if val := resp.Header.Get("x-ms-client-request-id"); val != "" { - result.ClientRequestID = &val - } - if val := resp.Header.Get("x-ms-request-id"); val != "" { - result.RequestID = &val - } - if val := resp.Header.Get("x-ms-version"); val != "" { - result.Version = &val - } - if val := resp.Header.Get("Date"); val != "" { - date, err := time.Parse(time.RFC1123, val) - if err != nil { - return TableCreateResponse{}, err - } - result.Date = &date - } - if val := resp.Header.Get("Preference-Applied"); val != "" { - result.PreferenceApplied = &val +func (client *TableClient) createHandleResponse(resp *http.Response) (TableCreateResponse, error) { + result := TableCreateResponse{RawResponse: resp} + if val := resp.Header.Get("x-ms-client-request-id"); val != "" { + result.ClientRequestID = &val + } + if val := resp.Header.Get("x-ms-request-id"); val != "" { + result.RequestID = &val + } + if val := resp.Header.Get("x-ms-version"); val != "" { + result.Version = &val + } + if val := resp.Header.Get("Date"); val != "" { + date, err := time.Parse(time.RFC1123, val) + if err != nil { + return TableCreateResponse{}, err } - return result, nil - default: - return nil, fmt.Errorf("unhandled HTTP status code %d", resp.StatusCode) + result.Date = &date } + if val := resp.Header.Get("Preference-Applied"); val != "" { + result.PreferenceApplied = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.TableResponse); err != nil { + return TableCreateResponse{}, err + } + return result, nil } // createHandleError handles the Create error response. -func (client *tableClient) createHandleError(resp *http.Response) error { - body, err := azcore.Payload(resp) +func (client *TableClient) createHandleError(resp *http.Response) error { + body, err := runtime.Payload(resp) if err != nil { - return azcore.NewResponseError(err, resp) + return runtime.NewResponseError(err, resp) } errType := TableServiceError{raw: string(body)} - if err := azcore.UnmarshalAsJSON(resp, &errType); err != nil { - return azcore.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) + if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { + return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) } - return azcore.NewResponseError(&errType, resp) + return runtime.NewResponseError(&errType, resp) } // Delete - Operation permanently deletes the specified table. // If the operation fails it returns the *TableServiceError error type. -func (client *tableClient) Delete(ctx context.Context, table string, options *TableDeleteOptions) (TableDeleteResponse, error) { +func (client *TableClient) Delete(ctx context.Context, table string, options *TableDeleteOptions) (TableDeleteResponse, error) { req, err := client.deleteCreateRequest(ctx, table, options) if err != nil { return TableDeleteResponse{}, err } - resp, err := client.con.Pipeline().Do(req) + resp, err := client.Con.Pipeline().Do(req) if err != nil { return TableDeleteResponse{}, err } - if !azcore.HasStatusCode(resp, http.StatusNoContent) { + if !runtime.HasStatusCode(resp, http.StatusNoContent) { return TableDeleteResponse{}, client.deleteHandleError(resp) } return client.deleteHandleResponse(resp) } // deleteCreateRequest creates the Delete request. -func (client *tableClient) deleteCreateRequest(ctx context.Context, table string, options *TableDeleteOptions) (*azcore.Request, error) { +func (client *TableClient) deleteCreateRequest(ctx context.Context, table string, options *TableDeleteOptions) (*policy.Request, error) { urlPath := "/Tables('{table}')" if table == "" { return nil, errors.New("parameter table cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{table}", url.PathEscape(table)) - req, err := azcore.NewRequest(ctx, http.MethodDelete, azcore.JoinPaths(client.con.Endpoint(), urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.Con.Endpoint(), urlPath)) if err != nil { return nil, err } - req.Telemetry(telemetryInfo) - req.Header.Set("x-ms-version", "2019-02-02") + req.Raw().Header.Set("x-ms-version", "2019-02-02") if options != nil && options.RequestID != nil { - req.Header.Set("x-ms-client-request-id", *options.RequestID) + req.Raw().Header.Set("x-ms-client-request-id", *options.RequestID) } - req.Header.Set("Accept", "application/json") + req.Raw().Header.Set("Accept", "application/json") return req, nil } // deleteHandleResponse handles the Delete response. -func (client *tableClient) deleteHandleResponse(resp *http.Response) (TableDeleteResponse, error) { +func (client *TableClient) deleteHandleResponse(resp *http.Response) (TableDeleteResponse, error) { result := TableDeleteResponse{RawResponse: resp} if val := resp.Header.Get("x-ms-client-request-id"); val != "" { result.ClientRequestID = &val @@ -198,37 +175,37 @@ func (client *tableClient) deleteHandleResponse(resp *http.Response) (TableDelet } // deleteHandleError handles the Delete error response. -func (client *tableClient) deleteHandleError(resp *http.Response) error { - body, err := azcore.Payload(resp) +func (client *TableClient) deleteHandleError(resp *http.Response) error { + body, err := runtime.Payload(resp) if err != nil { - return azcore.NewResponseError(err, resp) + return runtime.NewResponseError(err, resp) } errType := TableServiceError{raw: string(body)} - if err := azcore.UnmarshalAsJSON(resp, &errType); err != nil { - return azcore.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) + if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { + return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) } - return azcore.NewResponseError(&errType, resp) + return runtime.NewResponseError(&errType, resp) } // DeleteEntity - Deletes the specified entity in a table. // If the operation fails it returns the *TableServiceError error type. -func (client *tableClient) DeleteEntity(ctx context.Context, table string, partitionKey string, rowKey string, ifMatch string, tableDeleteEntityOptions *TableDeleteEntityOptions, queryOptions *QueryOptions) (TableDeleteEntityResponse, error) { - req, err := client.deleteEntityCreateRequest(ctx, table, partitionKey, rowKey, ifMatch, tableDeleteEntityOptions, queryOptions) +func (client *TableClient) DeleteEntity(ctx context.Context, table string, partitionKey string, rowKey string, ifMatch string, tableDeleteEntityOptions *TableDeleteEntityOptions, queryOptions *QueryOptions) (TableDeleteEntityResponse, error) { + req, err := client.DeleteEntityCreateRequest(ctx, table, partitionKey, rowKey, ifMatch, tableDeleteEntityOptions, queryOptions) if err != nil { return TableDeleteEntityResponse{}, err } - resp, err := client.con.Pipeline().Do(req) + resp, err := client.Con.Pipeline().Do(req) if err != nil { return TableDeleteEntityResponse{}, err } - if !azcore.HasStatusCode(resp, http.StatusNoContent) { + if !runtime.HasStatusCode(resp, http.StatusNoContent) { return TableDeleteEntityResponse{}, client.deleteEntityHandleError(resp) } return client.deleteEntityHandleResponse(resp) } -// deleteEntityCreateRequest creates the DeleteEntity request. -func (client *tableClient) deleteEntityCreateRequest(ctx context.Context, table string, partitionKey string, rowKey string, ifMatch string, tableDeleteEntityOptions *TableDeleteEntityOptions, queryOptions *QueryOptions) (*azcore.Request, error) { +// DeleteEntityCreateRequest creates the DeleteEntity request. +func (client *TableClient) DeleteEntityCreateRequest(ctx context.Context, table string, partitionKey string, rowKey string, ifMatch string, tableDeleteEntityOptions *TableDeleteEntityOptions, queryOptions *QueryOptions) (*policy.Request, error) { urlPath := "/{table}(PartitionKey='{partitionKey}',RowKey='{rowKey}')" if table == "" { return nil, errors.New("parameter table cannot be empty") @@ -242,31 +219,30 @@ func (client *tableClient) deleteEntityCreateRequest(ctx context.Context, table return nil, errors.New("parameter rowKey cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{rowKey}", url.PathEscape(rowKey)) - req, err := azcore.NewRequest(ctx, http.MethodDelete, azcore.JoinPaths(client.con.Endpoint(), urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.Con.Endpoint(), urlPath)) if err != nil { return nil, err } - req.Telemetry(telemetryInfo) - reqQP := req.URL.Query() + reqQP := req.Raw().URL.Query() if tableDeleteEntityOptions != nil && tableDeleteEntityOptions.Timeout != nil { reqQP.Set("timeout", strconv.FormatInt(int64(*tableDeleteEntityOptions.Timeout), 10)) } if queryOptions != nil && queryOptions.Format != nil { reqQP.Set("$format", string(*queryOptions.Format)) } - req.URL.RawQuery = reqQP.Encode() - req.Header.Set("x-ms-version", "2019-02-02") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header.Set("x-ms-version", "2019-02-02") if tableDeleteEntityOptions != nil && tableDeleteEntityOptions.RequestID != nil { - req.Header.Set("x-ms-client-request-id", *tableDeleteEntityOptions.RequestID) + req.Raw().Header.Set("x-ms-client-request-id", *tableDeleteEntityOptions.RequestID) } - req.Header.Set("DataServiceVersion", "3.0") - req.Header.Set("If-Match", ifMatch) - req.Header.Set("Accept", "application/json;odata=minimalmetadata") + req.Raw().Header.Set("DataServiceVersion", "3.0") + req.Raw().Header.Set("If-Match", ifMatch) + req.Raw().Header.Set("Accept", "application/json;odata=minimalmetadata") return req, nil } // deleteEntityHandleResponse handles the DeleteEntity response. -func (client *tableClient) deleteEntityHandleResponse(resp *http.Response) (TableDeleteEntityResponse, error) { +func (client *TableClient) deleteEntityHandleResponse(resp *http.Response) (TableDeleteEntityResponse, error) { result := TableDeleteEntityResponse{RawResponse: resp} if val := resp.Header.Get("x-ms-client-request-id"); val != "" { result.ClientRequestID = &val @@ -288,67 +264,63 @@ func (client *tableClient) deleteEntityHandleResponse(resp *http.Response) (Tabl } // deleteEntityHandleError handles the DeleteEntity error response. -func (client *tableClient) deleteEntityHandleError(resp *http.Response) error { - body, err := azcore.Payload(resp) +func (client *TableClient) deleteEntityHandleError(resp *http.Response) error { + body, err := runtime.Payload(resp) if err != nil { - return azcore.NewResponseError(err, resp) + return runtime.NewResponseError(err, resp) } errType := TableServiceError{raw: string(body)} - if err := azcore.UnmarshalAsJSON(resp, &errType); err != nil { - return azcore.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) + if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { + return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) } - return azcore.NewResponseError(&errType, resp) + return runtime.NewResponseError(&errType, resp) } // GetAccessPolicy - Retrieves details about any stored access policies specified on the table that may be used with Shared Access Signatures. // If the operation fails it returns the *TableServiceError error type. -func (client *tableClient) GetAccessPolicy(ctx context.Context, table string, options *TableGetAccessPolicyOptions) (SignedIdentifierArrayResponse, error) { +func (client *TableClient) GetAccessPolicy(ctx context.Context, table string, options *TableGetAccessPolicyOptions) (TableGetAccessPolicyResponse, error) { req, err := client.getAccessPolicyCreateRequest(ctx, table, options) if err != nil { - return SignedIdentifierArrayResponse{}, err + return TableGetAccessPolicyResponse{}, err } - resp, err := client.con.Pipeline().Do(req) + resp, err := client.Con.Pipeline().Do(req) if err != nil { - return SignedIdentifierArrayResponse{}, err + return TableGetAccessPolicyResponse{}, err } - if !azcore.HasStatusCode(resp, http.StatusOK) { - return SignedIdentifierArrayResponse{}, client.getAccessPolicyHandleError(resp) + if !runtime.HasStatusCode(resp, http.StatusOK) { + return TableGetAccessPolicyResponse{}, client.getAccessPolicyHandleError(resp) } return client.getAccessPolicyHandleResponse(resp) } // getAccessPolicyCreateRequest creates the GetAccessPolicy request. -func (client *tableClient) getAccessPolicyCreateRequest(ctx context.Context, table string, options *TableGetAccessPolicyOptions) (*azcore.Request, error) { +func (client *TableClient) getAccessPolicyCreateRequest(ctx context.Context, table string, options *TableGetAccessPolicyOptions) (*policy.Request, error) { urlPath := "/{table}" if table == "" { return nil, errors.New("parameter table cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{table}", url.PathEscape(table)) - req, err := azcore.NewRequest(ctx, http.MethodGet, azcore.JoinPaths(client.con.Endpoint(), urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.Con.Endpoint(), urlPath)) if err != nil { return nil, err } - req.Telemetry(telemetryInfo) - reqQP := req.URL.Query() + reqQP := req.Raw().URL.Query() if options != nil && options.Timeout != nil { reqQP.Set("timeout", strconv.FormatInt(int64(*options.Timeout), 10)) } reqQP.Set("comp", "acl") - req.URL.RawQuery = reqQP.Encode() - req.Header.Set("x-ms-version", "2019-02-02") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header.Set("x-ms-version", "2019-02-02") if options != nil && options.RequestID != nil { - req.Header.Set("x-ms-client-request-id", *options.RequestID) + req.Raw().Header.Set("x-ms-client-request-id", *options.RequestID) } - req.Header.Set("Accept", "application/xml") + req.Raw().Header.Set("Accept", "application/xml") return req, nil } // getAccessPolicyHandleResponse handles the GetAccessPolicy response. -func (client *tableClient) getAccessPolicyHandleResponse(resp *http.Response) (SignedIdentifierArrayResponse, error) { - result := SignedIdentifierArrayResponse{RawResponse: resp} - if err := azcore.UnmarshalAsXML(resp, &result); err != nil { - return SignedIdentifierArrayResponse{}, err - } +func (client *TableClient) getAccessPolicyHandleResponse(resp *http.Response) (TableGetAccessPolicyResponse, error) { + result := TableGetAccessPolicyResponse{RawResponse: resp} if val := resp.Header.Get("x-ms-client-request-id"); val != "" { result.ClientRequestID = &val } @@ -361,185 +333,146 @@ func (client *tableClient) getAccessPolicyHandleResponse(resp *http.Response) (S if val := resp.Header.Get("Date"); val != "" { date, err := time.Parse(time.RFC1123, val) if err != nil { - return SignedIdentifierArrayResponse{}, err + return TableGetAccessPolicyResponse{}, err } result.Date = &date } + if err := runtime.UnmarshalAsXML(resp, &result); err != nil { + return TableGetAccessPolicyResponse{}, err + } return result, nil } // getAccessPolicyHandleError handles the GetAccessPolicy error response. -func (client *tableClient) getAccessPolicyHandleError(resp *http.Response) error { - body, err := azcore.Payload(resp) +func (client *TableClient) getAccessPolicyHandleError(resp *http.Response) error { + body, err := runtime.Payload(resp) if err != nil { - return azcore.NewResponseError(err, resp) + return runtime.NewResponseError(err, resp) } errType := TableServiceError{raw: string(body)} - if err := azcore.UnmarshalAsJSON(resp, &errType); err != nil { - return azcore.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) + if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { + return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) } - return azcore.NewResponseError(&errType, resp) + return runtime.NewResponseError(&errType, resp) } // InsertEntity - Insert entity in a table. // If the operation fails it returns the *TableServiceError error type. -// Possible return types are *MapOfInterfaceResponse, *TableInsertEntityResponse -func (client *tableClient) InsertEntity(ctx context.Context, table string, tableInsertEntityOptions *TableInsertEntityOptions, queryOptions *QueryOptions) (interface{}, error) { - req, err := client.insertEntityCreateRequest(ctx, table, tableInsertEntityOptions, queryOptions) +func (client *TableClient) InsertEntity(ctx context.Context, table string, tableInsertEntityOptions *TableInsertEntityOptions, queryOptions *QueryOptions) (TableInsertEntityResponse, error) { + req, err := client.InsertEntityCreateRequest(ctx, table, tableInsertEntityOptions, queryOptions) if err != nil { - return nil, err + return TableInsertEntityResponse{}, err } - resp, err := client.con.Pipeline().Do(req) + resp, err := client.Con.Pipeline().Do(req) if err != nil { - return nil, err + return TableInsertEntityResponse{}, err } - if !azcore.HasStatusCode(resp, http.StatusCreated, http.StatusNoContent) { - return nil, client.insertEntityHandleError(resp) + if !runtime.HasStatusCode(resp, http.StatusCreated, http.StatusNoContent) { + return TableInsertEntityResponse{}, client.insertEntityHandleError(resp) } return client.insertEntityHandleResponse(resp) } -// insertEntityCreateRequest creates the InsertEntity request. -func (client *tableClient) insertEntityCreateRequest(ctx context.Context, table string, tableInsertEntityOptions *TableInsertEntityOptions, queryOptions *QueryOptions) (*azcore.Request, error) { +// InsertEntityCreateRequest creates the InsertEntity request. +func (client *TableClient) InsertEntityCreateRequest(ctx context.Context, table string, tableInsertEntityOptions *TableInsertEntityOptions, queryOptions *QueryOptions) (*policy.Request, error) { urlPath := "/{table}" if table == "" { return nil, errors.New("parameter table cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{table}", url.PathEscape(table)) - req, err := azcore.NewRequest(ctx, http.MethodPost, azcore.JoinPaths(client.con.Endpoint(), urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.Con.Endpoint(), urlPath)) if err != nil { return nil, err } - req.Telemetry(telemetryInfo) - reqQP := req.URL.Query() + reqQP := req.Raw().URL.Query() if tableInsertEntityOptions != nil && tableInsertEntityOptions.Timeout != nil { reqQP.Set("timeout", strconv.FormatInt(int64(*tableInsertEntityOptions.Timeout), 10)) } if queryOptions != nil && queryOptions.Format != nil { reqQP.Set("$format", string(*queryOptions.Format)) } - req.URL.RawQuery = reqQP.Encode() - req.Header.Set("x-ms-version", "2019-02-02") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header.Set("x-ms-version", "2019-02-02") if tableInsertEntityOptions != nil && tableInsertEntityOptions.RequestID != nil { - req.Header.Set("x-ms-client-request-id", *tableInsertEntityOptions.RequestID) + req.Raw().Header.Set("x-ms-client-request-id", *tableInsertEntityOptions.RequestID) } - req.Header.Set("DataServiceVersion", "3.0") + req.Raw().Header.Set("DataServiceVersion", "3.0") if tableInsertEntityOptions != nil && tableInsertEntityOptions.ResponsePreference != nil { - req.Header.Set("Prefer", string(*tableInsertEntityOptions.ResponsePreference)) + req.Raw().Header.Set("Prefer", string(*tableInsertEntityOptions.ResponsePreference)) } - req.Header.Set("Accept", "application/json;odata=minimalmetadata") + req.Raw().Header.Set("Accept", "application/json;odata=minimalmetadata") if tableInsertEntityOptions != nil && tableInsertEntityOptions.TableEntityProperties != nil { - return req, req.MarshalAsJSON(tableInsertEntityOptions.TableEntityProperties) + return req, runtime.MarshalAsJSON(req, tableInsertEntityOptions.TableEntityProperties) } return req, nil } // insertEntityHandleResponse handles the InsertEntity response. -func (client *tableClient) insertEntityHandleResponse(resp *http.Response) (interface{}, error) { - switch resp.StatusCode { - case http.StatusCreated: - var val map[string]interface{} - if err := azcore.UnmarshalAsJSON(resp, &val); err != nil { - return nil, err - } - result := MapOfInterfaceResponse{RawResponse: resp, Value: val} - if val := resp.Header.Get("x-ms-client-request-id"); val != "" { - result.ClientRequestID = &val - } - if val := resp.Header.Get("x-ms-request-id"); val != "" { - result.RequestID = &val - } - if val := resp.Header.Get("x-ms-version"); val != "" { - result.Version = &val - } - if val := resp.Header.Get("Date"); val != "" { - date, err := time.Parse(time.RFC1123, val) - if err != nil { - return MapOfInterfaceResponse{}, err - } - result.Date = &date - } - if val := resp.Header.Get("ETag"); val != "" { - result.ETag = &val - } - if val := resp.Header.Get("x-ms-continuation-NextPartitionKey"); val != "" { - result.XMSContinuationNextPartitionKey = &val - } - if val := resp.Header.Get("x-ms-continuation-NextRowKey"); val != "" { - result.XMSContinuationNextRowKey = &val - } - if val := resp.Header.Get("Preference-Applied"); val != "" { - result.PreferenceApplied = &val - } - if val := resp.Header.Get("Content-Type"); val != "" { - result.ContentType = &val - } - return result, nil - case http.StatusNoContent: - result := TableInsertEntityResponse{RawResponse: resp} - if val := resp.Header.Get("x-ms-client-request-id"); val != "" { - result.ClientRequestID = &val - } - if val := resp.Header.Get("x-ms-request-id"); val != "" { - result.RequestID = &val - } - if val := resp.Header.Get("x-ms-version"); val != "" { - result.Version = &val - } - if val := resp.Header.Get("Date"); val != "" { - date, err := time.Parse(time.RFC1123, val) - if err != nil { - return TableInsertEntityResponse{}, err - } - result.Date = &date - } - if val := resp.Header.Get("ETag"); val != "" { - result.ETag = &val - } - if val := resp.Header.Get("Preference-Applied"); val != "" { - result.PreferenceApplied = &val - } - if val := resp.Header.Get("Content-Type"); val != "" { - result.ContentType = &val +func (client *TableClient) insertEntityHandleResponse(resp *http.Response) (TableInsertEntityResponse, error) { + result := TableInsertEntityResponse{RawResponse: resp} + if val := resp.Header.Get("x-ms-client-request-id"); val != "" { + result.ClientRequestID = &val + } + if val := resp.Header.Get("x-ms-request-id"); val != "" { + result.RequestID = &val + } + if val := resp.Header.Get("x-ms-version"); val != "" { + result.Version = &val + } + if val := resp.Header.Get("Date"); val != "" { + date, err := time.Parse(time.RFC1123, val) + if err != nil { + return TableInsertEntityResponse{}, err } - return result, nil - default: - return nil, fmt.Errorf("unhandled HTTP status code %d", resp.StatusCode) + result.Date = &date } + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if val := resp.Header.Get("Preference-Applied"); val != "" { + result.PreferenceApplied = &val + } + if val := resp.Header.Get("Content-Type"); val != "" { + result.ContentType = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.Value); err != nil { + return TableInsertEntityResponse{}, err + } + return result, nil } // insertEntityHandleError handles the InsertEntity error response. -func (client *tableClient) insertEntityHandleError(resp *http.Response) error { - body, err := azcore.Payload(resp) +func (client *TableClient) insertEntityHandleError(resp *http.Response) error { + body, err := runtime.Payload(resp) if err != nil { - return azcore.NewResponseError(err, resp) + return runtime.NewResponseError(err, resp) } errType := TableServiceError{raw: string(body)} - if err := azcore.UnmarshalAsJSON(resp, &errType); err != nil { - return azcore.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) + if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { + return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) } - return azcore.NewResponseError(&errType, resp) + return runtime.NewResponseError(&errType, resp) } // MergeEntity - Merge entity in a table. // If the operation fails it returns the *TableServiceError error type. -func (client *tableClient) MergeEntity(ctx context.Context, table string, partitionKey string, rowKey string, tableMergeEntityOptions *TableMergeEntityOptions, queryOptions *QueryOptions) (TableMergeEntityResponse, error) { - req, err := client.mergeEntityCreateRequest(ctx, table, partitionKey, rowKey, tableMergeEntityOptions, queryOptions) +func (client *TableClient) MergeEntity(ctx context.Context, table string, partitionKey string, rowKey string, tableMergeEntityOptions *TableMergeEntityOptions, queryOptions *QueryOptions) (TableMergeEntityResponse, error) { + req, err := client.MergeEntityCreateRequest(ctx, table, partitionKey, rowKey, tableMergeEntityOptions, queryOptions) if err != nil { return TableMergeEntityResponse{}, err } - resp, err := client.con.Pipeline().Do(req) + resp, err := client.Con.Pipeline().Do(req) if err != nil { return TableMergeEntityResponse{}, err } - if !azcore.HasStatusCode(resp, http.StatusNoContent) { + if !runtime.HasStatusCode(resp, http.StatusNoContent) { return TableMergeEntityResponse{}, client.mergeEntityHandleError(resp) } return client.mergeEntityHandleResponse(resp) } -// mergeEntityCreateRequest creates the MergeEntity request. -func (client *tableClient) mergeEntityCreateRequest(ctx context.Context, table string, partitionKey string, rowKey string, tableMergeEntityOptions *TableMergeEntityOptions, queryOptions *QueryOptions) (*azcore.Request, error) { +// MergeEntityCreateRequest creates the MergeEntity request. +func (client *TableClient) MergeEntityCreateRequest(ctx context.Context, table string, partitionKey string, rowKey string, tableMergeEntityOptions *TableMergeEntityOptions, queryOptions *QueryOptions) (*policy.Request, error) { urlPath := "/{table}(PartitionKey='{partitionKey}',RowKey='{rowKey}')" if table == "" { return nil, errors.New("parameter table cannot be empty") @@ -553,36 +486,35 @@ func (client *tableClient) mergeEntityCreateRequest(ctx context.Context, table s return nil, errors.New("parameter rowKey cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{rowKey}", url.PathEscape(rowKey)) - req, err := azcore.NewRequest(ctx, http.MethodPatch, azcore.JoinPaths(client.con.Endpoint(), urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.Con.Endpoint(), urlPath)) if err != nil { return nil, err } - req.Telemetry(telemetryInfo) - reqQP := req.URL.Query() + reqQP := req.Raw().URL.Query() if tableMergeEntityOptions != nil && tableMergeEntityOptions.Timeout != nil { reqQP.Set("timeout", strconv.FormatInt(int64(*tableMergeEntityOptions.Timeout), 10)) } if queryOptions != nil && queryOptions.Format != nil { reqQP.Set("$format", string(*queryOptions.Format)) } - req.URL.RawQuery = reqQP.Encode() - req.Header.Set("x-ms-version", "2019-02-02") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header.Set("x-ms-version", "2019-02-02") if tableMergeEntityOptions != nil && tableMergeEntityOptions.RequestID != nil { - req.Header.Set("x-ms-client-request-id", *tableMergeEntityOptions.RequestID) + req.Raw().Header.Set("x-ms-client-request-id", *tableMergeEntityOptions.RequestID) } - req.Header.Set("DataServiceVersion", "3.0") + req.Raw().Header.Set("DataServiceVersion", "3.0") if tableMergeEntityOptions != nil && tableMergeEntityOptions.IfMatch != nil { - req.Header.Set("If-Match", *tableMergeEntityOptions.IfMatch) + req.Raw().Header.Set("If-Match", *tableMergeEntityOptions.IfMatch) } - req.Header.Set("Accept", "application/json") + req.Raw().Header.Set("Accept", "application/json") if tableMergeEntityOptions != nil && tableMergeEntityOptions.TableEntityProperties != nil { - return req, req.MarshalAsJSON(tableMergeEntityOptions.TableEntityProperties) + return req, runtime.MarshalAsJSON(req, tableMergeEntityOptions.TableEntityProperties) } return req, nil } // mergeEntityHandleResponse handles the MergeEntity response. -func (client *tableClient) mergeEntityHandleResponse(resp *http.Response) (TableMergeEntityResponse, error) { +func (client *TableClient) mergeEntityHandleResponse(resp *http.Response) (TableMergeEntityResponse, error) { result := TableMergeEntityResponse{RawResponse: resp} if val := resp.Header.Get("x-ms-client-request-id"); val != "" { result.ClientRequestID = &val @@ -607,44 +539,43 @@ func (client *tableClient) mergeEntityHandleResponse(resp *http.Response) (Table } // mergeEntityHandleError handles the MergeEntity error response. -func (client *tableClient) mergeEntityHandleError(resp *http.Response) error { - body, err := azcore.Payload(resp) +func (client *TableClient) mergeEntityHandleError(resp *http.Response) error { + body, err := runtime.Payload(resp) if err != nil { - return azcore.NewResponseError(err, resp) + return runtime.NewResponseError(err, resp) } errType := TableServiceError{raw: string(body)} - if err := azcore.UnmarshalAsJSON(resp, &errType); err != nil { - return azcore.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) + if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { + return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) } - return azcore.NewResponseError(&errType, resp) + return runtime.NewResponseError(&errType, resp) } // Query - Queries tables under the given account. // If the operation fails it returns a generic error. -func (client *tableClient) Query(ctx context.Context, tableQueryOptions *TableQueryOptions, queryOptions *QueryOptions) (TableQueryResponseResponse, error) { +func (client *TableClient) Query(ctx context.Context, tableQueryOptions *TableQueryOptions, queryOptions *QueryOptions) (TableQueryResponseEnvelope, error) { req, err := client.queryCreateRequest(ctx, tableQueryOptions, queryOptions) if err != nil { - return TableQueryResponseResponse{}, err + return TableQueryResponseEnvelope{}, err } - resp, err := client.con.Pipeline().Do(req) + resp, err := client.Con.Pipeline().Do(req) if err != nil { - return TableQueryResponseResponse{}, err + return TableQueryResponseEnvelope{}, err } - if !azcore.HasStatusCode(resp, http.StatusOK) { - return TableQueryResponseResponse{}, client.queryHandleError(resp) + if !runtime.HasStatusCode(resp, http.StatusOK) { + return TableQueryResponseEnvelope{}, client.queryHandleError(resp) } return client.queryHandleResponse(resp) } // queryCreateRequest creates the Query request. -func (client *tableClient) queryCreateRequest(ctx context.Context, tableQueryOptions *TableQueryOptions, queryOptions *QueryOptions) (*azcore.Request, error) { +func (client *TableClient) queryCreateRequest(ctx context.Context, tableQueryOptions *TableQueryOptions, queryOptions *QueryOptions) (*policy.Request, error) { urlPath := "/Tables" - req, err := azcore.NewRequest(ctx, http.MethodGet, azcore.JoinPaths(client.con.Endpoint(), urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.Con.Endpoint(), urlPath)) if err != nil { return nil, err } - req.Telemetry(telemetryInfo) - reqQP := req.URL.Query() + reqQP := req.Raw().URL.Query() if queryOptions != nil && queryOptions.Format != nil { reqQP.Set("$format", string(*queryOptions.Format)) } @@ -660,23 +591,19 @@ func (client *tableClient) queryCreateRequest(ctx context.Context, tableQueryOpt if tableQueryOptions != nil && tableQueryOptions.NextTableName != nil { reqQP.Set("NextTableName", *tableQueryOptions.NextTableName) } - req.URL.RawQuery = reqQP.Encode() - req.Header.Set("x-ms-version", "2019-02-02") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header.Set("x-ms-version", "2019-02-02") if tableQueryOptions != nil && tableQueryOptions.RequestID != nil { - req.Header.Set("x-ms-client-request-id", *tableQueryOptions.RequestID) + req.Raw().Header.Set("x-ms-client-request-id", *tableQueryOptions.RequestID) } - req.Header.Set("DataServiceVersion", "3.0") - req.Header.Set("Accept", "application/json;odata=minimalmetadata") + req.Raw().Header.Set("DataServiceVersion", "3.0") + req.Raw().Header.Set("Accept", "application/json;odata=minimalmetadata") return req, nil } // queryHandleResponse handles the Query response. -func (client *tableClient) queryHandleResponse(resp *http.Response) (TableQueryResponseResponse, error) { - var val *TableQueryResponse - if err := azcore.UnmarshalAsJSON(resp, &val); err != nil { - return TableQueryResponseResponse{}, err - } - result := TableQueryResponseResponse{RawResponse: resp, TableQueryResponse: val} +func (client *TableClient) queryHandleResponse(resp *http.Response) (TableQueryResponseEnvelope, error) { + result := TableQueryResponseEnvelope{RawResponse: resp} if val := resp.Header.Get("x-ms-client-request-id"); val != "" { result.ClientRequestID = &val } @@ -689,58 +616,60 @@ func (client *tableClient) queryHandleResponse(resp *http.Response) (TableQueryR if val := resp.Header.Get("Date"); val != "" { date, err := time.Parse(time.RFC1123, val) if err != nil { - return TableQueryResponseResponse{}, err + return TableQueryResponseEnvelope{}, err } result.Date = &date } if val := resp.Header.Get("x-ms-continuation-NextTableName"); val != "" { result.XMSContinuationNextTableName = &val } + if err := runtime.UnmarshalAsJSON(resp, &result.TableQueryResponse); err != nil { + return TableQueryResponseEnvelope{}, err + } return result, nil } // queryHandleError handles the Query error response. -func (client *tableClient) queryHandleError(resp *http.Response) error { - body, err := azcore.Payload(resp) +func (client *TableClient) queryHandleError(resp *http.Response) error { + body, err := runtime.Payload(resp) if err != nil { - return azcore.NewResponseError(err, resp) + return runtime.NewResponseError(err, resp) } if len(body) == 0 { - return azcore.NewResponseError(errors.New(resp.Status), resp) + return runtime.NewResponseError(errors.New(resp.Status), resp) } - return azcore.NewResponseError(errors.New(string(body)), resp) + return runtime.NewResponseError(errors.New(string(body)), resp) } // QueryEntities - Queries entities in a table. // If the operation fails it returns the *TableServiceError error type. -func (client *tableClient) QueryEntities(ctx context.Context, table string, tableQueryEntitiesOptions *TableQueryEntitiesOptions, queryOptions *QueryOptions) (TableEntityQueryResponseResponse, error) { +func (client *TableClient) QueryEntities(ctx context.Context, table string, tableQueryEntitiesOptions *TableQueryEntitiesOptions, queryOptions *QueryOptions) (TableQueryEntitiesResponse, error) { req, err := client.queryEntitiesCreateRequest(ctx, table, tableQueryEntitiesOptions, queryOptions) if err != nil { - return TableEntityQueryResponseResponse{}, err + return TableQueryEntitiesResponse{}, err } - resp, err := client.con.Pipeline().Do(req) + resp, err := client.Con.Pipeline().Do(req) if err != nil { - return TableEntityQueryResponseResponse{}, err + return TableQueryEntitiesResponse{}, err } - if !azcore.HasStatusCode(resp, http.StatusOK) { - return TableEntityQueryResponseResponse{}, client.queryEntitiesHandleError(resp) + if !runtime.HasStatusCode(resp, http.StatusOK) { + return TableQueryEntitiesResponse{}, client.queryEntitiesHandleError(resp) } return client.queryEntitiesHandleResponse(resp) } // queryEntitiesCreateRequest creates the QueryEntities request. -func (client *tableClient) queryEntitiesCreateRequest(ctx context.Context, table string, tableQueryEntitiesOptions *TableQueryEntitiesOptions, queryOptions *QueryOptions) (*azcore.Request, error) { +func (client *TableClient) queryEntitiesCreateRequest(ctx context.Context, table string, tableQueryEntitiesOptions *TableQueryEntitiesOptions, queryOptions *QueryOptions) (*policy.Request, error) { urlPath := "/{table}()" if table == "" { return nil, errors.New("parameter table cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{table}", url.PathEscape(table)) - req, err := azcore.NewRequest(ctx, http.MethodGet, azcore.JoinPaths(client.con.Endpoint(), urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.Con.Endpoint(), urlPath)) if err != nil { return nil, err } - req.Telemetry(telemetryInfo) - reqQP := req.URL.Query() + reqQP := req.Raw().URL.Query() if tableQueryEntitiesOptions != nil && tableQueryEntitiesOptions.Timeout != nil { reqQP.Set("timeout", strconv.FormatInt(int64(*tableQueryEntitiesOptions.Timeout), 10)) } @@ -762,23 +691,19 @@ func (client *tableClient) queryEntitiesCreateRequest(ctx context.Context, table if tableQueryEntitiesOptions != nil && tableQueryEntitiesOptions.NextRowKey != nil { reqQP.Set("NextRowKey", *tableQueryEntitiesOptions.NextRowKey) } - req.URL.RawQuery = reqQP.Encode() - req.Header.Set("x-ms-version", "2019-02-02") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header.Set("x-ms-version", "2019-02-02") if tableQueryEntitiesOptions != nil && tableQueryEntitiesOptions.RequestID != nil { - req.Header.Set("x-ms-client-request-id", *tableQueryEntitiesOptions.RequestID) + req.Raw().Header.Set("x-ms-client-request-id", *tableQueryEntitiesOptions.RequestID) } - req.Header.Set("DataServiceVersion", "3.0") - req.Header.Set("Accept", "application/json;odata=minimalmetadata") + req.Raw().Header.Set("DataServiceVersion", "3.0") + req.Raw().Header.Set("Accept", "application/json;odata=minimalmetadata") return req, nil } // queryEntitiesHandleResponse handles the QueryEntities response. -func (client *tableClient) queryEntitiesHandleResponse(resp *http.Response) (TableEntityQueryResponseResponse, error) { - var val *TableEntityQueryResponse - if err := azcore.UnmarshalAsJSON(resp, &val); err != nil { - return TableEntityQueryResponseResponse{}, err - } - result := TableEntityQueryResponseResponse{RawResponse: resp, TableEntityQueryResponse: val} +func (client *TableClient) queryEntitiesHandleResponse(resp *http.Response) (TableQueryEntitiesResponse, error) { + result := TableQueryEntitiesResponse{RawResponse: resp} if val := resp.Header.Get("x-ms-client-request-id"); val != "" { result.ClientRequestID = &val } @@ -791,7 +716,7 @@ func (client *tableClient) queryEntitiesHandleResponse(resp *http.Response) (Tab if val := resp.Header.Get("Date"); val != "" { date, err := time.Parse(time.RFC1123, val) if err != nil { - return TableEntityQueryResponseResponse{}, err + return TableQueryEntitiesResponse{}, err } result.Date = &date } @@ -801,41 +726,44 @@ func (client *tableClient) queryEntitiesHandleResponse(resp *http.Response) (Tab if val := resp.Header.Get("x-ms-continuation-NextRowKey"); val != "" { result.XMSContinuationNextRowKey = &val } + if err := runtime.UnmarshalAsJSON(resp, &result.TableEntityQueryResponse); err != nil { + return TableQueryEntitiesResponse{}, err + } return result, nil } // queryEntitiesHandleError handles the QueryEntities error response. -func (client *tableClient) queryEntitiesHandleError(resp *http.Response) error { - body, err := azcore.Payload(resp) +func (client *TableClient) queryEntitiesHandleError(resp *http.Response) error { + body, err := runtime.Payload(resp) if err != nil { - return azcore.NewResponseError(err, resp) + return runtime.NewResponseError(err, resp) } errType := TableServiceError{raw: string(body)} - if err := azcore.UnmarshalAsJSON(resp, &errType); err != nil { - return azcore.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) + if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { + return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) } - return azcore.NewResponseError(&errType, resp) + return runtime.NewResponseError(&errType, resp) } // QueryEntityWithPartitionAndRowKey - Queries a single entity in a table. // If the operation fails it returns the *TableServiceError error type. -func (client *tableClient) QueryEntityWithPartitionAndRowKey(ctx context.Context, table string, partitionKey string, rowKey string, tableQueryEntityWithPartitionAndRowKeyOptions *TableQueryEntityWithPartitionAndRowKeyOptions, queryOptions *QueryOptions) (MapOfInterfaceResponse, error) { +func (client *TableClient) QueryEntityWithPartitionAndRowKey(ctx context.Context, table string, partitionKey string, rowKey string, tableQueryEntityWithPartitionAndRowKeyOptions *TableQueryEntityWithPartitionAndRowKeyOptions, queryOptions *QueryOptions) (TableQueryEntityWithPartitionAndRowKeyResponse, error) { req, err := client.queryEntityWithPartitionAndRowKeyCreateRequest(ctx, table, partitionKey, rowKey, tableQueryEntityWithPartitionAndRowKeyOptions, queryOptions) if err != nil { - return MapOfInterfaceResponse{}, err + return TableQueryEntityWithPartitionAndRowKeyResponse{}, err } - resp, err := client.con.Pipeline().Do(req) + resp, err := client.Con.Pipeline().Do(req) if err != nil { - return MapOfInterfaceResponse{}, err + return TableQueryEntityWithPartitionAndRowKeyResponse{}, err } - if !azcore.HasStatusCode(resp, http.StatusOK) { - return MapOfInterfaceResponse{}, client.queryEntityWithPartitionAndRowKeyHandleError(resp) + if !runtime.HasStatusCode(resp, http.StatusOK) { + return TableQueryEntityWithPartitionAndRowKeyResponse{}, client.queryEntityWithPartitionAndRowKeyHandleError(resp) } return client.queryEntityWithPartitionAndRowKeyHandleResponse(resp) } // queryEntityWithPartitionAndRowKeyCreateRequest creates the QueryEntityWithPartitionAndRowKey request. -func (client *tableClient) queryEntityWithPartitionAndRowKeyCreateRequest(ctx context.Context, table string, partitionKey string, rowKey string, tableQueryEntityWithPartitionAndRowKeyOptions *TableQueryEntityWithPartitionAndRowKeyOptions, queryOptions *QueryOptions) (*azcore.Request, error) { +func (client *TableClient) queryEntityWithPartitionAndRowKeyCreateRequest(ctx context.Context, table string, partitionKey string, rowKey string, tableQueryEntityWithPartitionAndRowKeyOptions *TableQueryEntityWithPartitionAndRowKeyOptions, queryOptions *QueryOptions) (*policy.Request, error) { urlPath := "/{table}(PartitionKey='{partitionKey}',RowKey='{rowKey}')" if table == "" { return nil, errors.New("parameter table cannot be empty") @@ -849,12 +777,11 @@ func (client *tableClient) queryEntityWithPartitionAndRowKeyCreateRequest(ctx co return nil, errors.New("parameter rowKey cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{rowKey}", url.PathEscape(rowKey)) - req, err := azcore.NewRequest(ctx, http.MethodGet, azcore.JoinPaths(client.con.Endpoint(), urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.Con.Endpoint(), urlPath)) if err != nil { return nil, err } - req.Telemetry(telemetryInfo) - reqQP := req.URL.Query() + reqQP := req.Raw().URL.Query() if tableQueryEntityWithPartitionAndRowKeyOptions != nil && tableQueryEntityWithPartitionAndRowKeyOptions.Timeout != nil { reqQP.Set("timeout", strconv.FormatInt(int64(*tableQueryEntityWithPartitionAndRowKeyOptions.Timeout), 10)) } @@ -867,23 +794,19 @@ func (client *tableClient) queryEntityWithPartitionAndRowKeyCreateRequest(ctx co if queryOptions != nil && queryOptions.Filter != nil { reqQP.Set("$filter", *queryOptions.Filter) } - req.URL.RawQuery = reqQP.Encode() - req.Header.Set("x-ms-version", "2019-02-02") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header.Set("x-ms-version", "2019-02-02") if tableQueryEntityWithPartitionAndRowKeyOptions != nil && tableQueryEntityWithPartitionAndRowKeyOptions.RequestID != nil { - req.Header.Set("x-ms-client-request-id", *tableQueryEntityWithPartitionAndRowKeyOptions.RequestID) + req.Raw().Header.Set("x-ms-client-request-id", *tableQueryEntityWithPartitionAndRowKeyOptions.RequestID) } - req.Header.Set("DataServiceVersion", "3.0") - req.Header.Set("Accept", "application/json;odata=minimalmetadata") + req.Raw().Header.Set("DataServiceVersion", "3.0") + req.Raw().Header.Set("Accept", "application/json;odata=minimalmetadata") return req, nil } // queryEntityWithPartitionAndRowKeyHandleResponse handles the QueryEntityWithPartitionAndRowKey response. -func (client *tableClient) queryEntityWithPartitionAndRowKeyHandleResponse(resp *http.Response) (MapOfInterfaceResponse, error) { - var val map[string]interface{} - if err := azcore.UnmarshalAsJSON(resp, &val); err != nil { - return MapOfInterfaceResponse{}, err - } - result := MapOfInterfaceResponse{RawResponse: resp, Value: val} +func (client *TableClient) queryEntityWithPartitionAndRowKeyHandleResponse(resp *http.Response) (TableQueryEntityWithPartitionAndRowKeyResponse, error) { + result := TableQueryEntityWithPartitionAndRowKeyResponse{RawResponse: resp} if val := resp.Header.Get("x-ms-client-request-id"); val != "" { result.ClientRequestID = &val } @@ -896,7 +819,7 @@ func (client *tableClient) queryEntityWithPartitionAndRowKeyHandleResponse(resp if val := resp.Header.Get("Date"); val != "" { date, err := time.Parse(time.RFC1123, val) if err != nil { - return MapOfInterfaceResponse{}, err + return TableQueryEntityWithPartitionAndRowKeyResponse{}, err } result.Date = &date } @@ -909,80 +832,76 @@ func (client *tableClient) queryEntityWithPartitionAndRowKeyHandleResponse(resp if val := resp.Header.Get("x-ms-continuation-NextRowKey"); val != "" { result.XMSContinuationNextRowKey = &val } - if val := resp.Header.Get("Preference-Applied"); val != "" { - result.PreferenceApplied = &val - } - if val := resp.Header.Get("Content-Type"); val != "" { - result.ContentType = &val + if err := runtime.UnmarshalAsJSON(resp, &result.Value); err != nil { + return TableQueryEntityWithPartitionAndRowKeyResponse{}, err } return result, nil } // queryEntityWithPartitionAndRowKeyHandleError handles the QueryEntityWithPartitionAndRowKey error response. -func (client *tableClient) queryEntityWithPartitionAndRowKeyHandleError(resp *http.Response) error { - body, err := azcore.Payload(resp) +func (client *TableClient) queryEntityWithPartitionAndRowKeyHandleError(resp *http.Response) error { + body, err := runtime.Payload(resp) if err != nil { - return azcore.NewResponseError(err, resp) + return runtime.NewResponseError(err, resp) } errType := TableServiceError{raw: string(body)} - if err := azcore.UnmarshalAsJSON(resp, &errType); err != nil { - return azcore.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) + if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { + return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) } - return azcore.NewResponseError(&errType, resp) + return runtime.NewResponseError(&errType, resp) } // SetAccessPolicy - Sets stored access policies for the table that may be used with Shared Access Signatures. // If the operation fails it returns the *TableServiceError error type. -func (client *tableClient) SetAccessPolicy(ctx context.Context, table string, options *TableSetAccessPolicyOptions) (TableSetAccessPolicyResponse, error) { +func (client *TableClient) SetAccessPolicy(ctx context.Context, table string, options *TableSetAccessPolicyOptions) (TableSetAccessPolicyResponse, error) { req, err := client.setAccessPolicyCreateRequest(ctx, table, options) if err != nil { return TableSetAccessPolicyResponse{}, err } - resp, err := client.con.Pipeline().Do(req) + resp, err := client.Con.Pipeline().Do(req) if err != nil { return TableSetAccessPolicyResponse{}, err } - if !azcore.HasStatusCode(resp, http.StatusNoContent) { + if !runtime.HasStatusCode(resp, http.StatusNoContent) { return TableSetAccessPolicyResponse{}, client.setAccessPolicyHandleError(resp) } return client.setAccessPolicyHandleResponse(resp) } // setAccessPolicyCreateRequest creates the SetAccessPolicy request. -func (client *tableClient) setAccessPolicyCreateRequest(ctx context.Context, table string, options *TableSetAccessPolicyOptions) (*azcore.Request, error) { +func (client *TableClient) setAccessPolicyCreateRequest(ctx context.Context, table string, options *TableSetAccessPolicyOptions) (*policy.Request, error) { urlPath := "/{table}" if table == "" { return nil, errors.New("parameter table cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{table}", url.PathEscape(table)) - req, err := azcore.NewRequest(ctx, http.MethodPut, azcore.JoinPaths(client.con.Endpoint(), urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.Con.Endpoint(), urlPath)) if err != nil { return nil, err } - req.Telemetry(telemetryInfo) - reqQP := req.URL.Query() + reqQP := req.Raw().URL.Query() if options != nil && options.Timeout != nil { reqQP.Set("timeout", strconv.FormatInt(int64(*options.Timeout), 10)) } reqQP.Set("comp", "acl") - req.URL.RawQuery = reqQP.Encode() - req.Header.Set("x-ms-version", "2019-02-02") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header.Set("x-ms-version", "2019-02-02") if options != nil && options.RequestID != nil { - req.Header.Set("x-ms-client-request-id", *options.RequestID) + req.Raw().Header.Set("x-ms-client-request-id", *options.RequestID) } - req.Header.Set("Accept", "application/xml") + req.Raw().Header.Set("Accept", "application/xml") type wrapper struct { XMLName xml.Name `xml:"SignedIdentifiers"` TableACL *[]*SignedIdentifier `xml:"SignedIdentifier"` } if options != nil && options.TableACL != nil { - return req, req.MarshalAsXML(wrapper{TableACL: &options.TableACL}) + return req, runtime.MarshalAsXML(req, wrapper{TableACL: &options.TableACL}) } return req, nil } // setAccessPolicyHandleResponse handles the SetAccessPolicy response. -func (client *tableClient) setAccessPolicyHandleResponse(resp *http.Response) (TableSetAccessPolicyResponse, error) { +func (client *TableClient) setAccessPolicyHandleResponse(resp *http.Response) (TableSetAccessPolicyResponse, error) { result := TableSetAccessPolicyResponse{RawResponse: resp} if val := resp.Header.Get("x-ms-client-request-id"); val != "" { result.ClientRequestID = &val @@ -1004,37 +923,37 @@ func (client *tableClient) setAccessPolicyHandleResponse(resp *http.Response) (T } // setAccessPolicyHandleError handles the SetAccessPolicy error response. -func (client *tableClient) setAccessPolicyHandleError(resp *http.Response) error { - body, err := azcore.Payload(resp) +func (client *TableClient) setAccessPolicyHandleError(resp *http.Response) error { + body, err := runtime.Payload(resp) if err != nil { - return azcore.NewResponseError(err, resp) + return runtime.NewResponseError(err, resp) } errType := TableServiceError{raw: string(body)} - if err := azcore.UnmarshalAsJSON(resp, &errType); err != nil { - return azcore.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) + if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { + return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) } - return azcore.NewResponseError(&errType, resp) + return runtime.NewResponseError(&errType, resp) } // UpdateEntity - Update entity in a table. // If the operation fails it returns the *TableServiceError error type. -func (client *tableClient) UpdateEntity(ctx context.Context, table string, partitionKey string, rowKey string, tableUpdateEntityOptions *TableUpdateEntityOptions, queryOptions *QueryOptions) (TableUpdateEntityResponse, error) { - req, err := client.updateEntityCreateRequest(ctx, table, partitionKey, rowKey, tableUpdateEntityOptions, queryOptions) +func (client *TableClient) UpdateEntity(ctx context.Context, table string, partitionKey string, rowKey string, tableUpdateEntityOptions *TableUpdateEntityOptions, queryOptions *QueryOptions) (TableUpdateEntityResponse, error) { + req, err := client.UpdateEntityCreateRequest(ctx, table, partitionKey, rowKey, tableUpdateEntityOptions, queryOptions) if err != nil { return TableUpdateEntityResponse{}, err } - resp, err := client.con.Pipeline().Do(req) + resp, err := client.Con.Pipeline().Do(req) if err != nil { return TableUpdateEntityResponse{}, err } - if !azcore.HasStatusCode(resp, http.StatusNoContent) { + if !runtime.HasStatusCode(resp, http.StatusNoContent) { return TableUpdateEntityResponse{}, client.updateEntityHandleError(resp) } return client.updateEntityHandleResponse(resp) } -// updateEntityCreateRequest creates the UpdateEntity request. -func (client *tableClient) updateEntityCreateRequest(ctx context.Context, table string, partitionKey string, rowKey string, tableUpdateEntityOptions *TableUpdateEntityOptions, queryOptions *QueryOptions) (*azcore.Request, error) { +// UpdateEntityCreateRequest creates the UpdateEntity request. +func (client *TableClient) UpdateEntityCreateRequest(ctx context.Context, table string, partitionKey string, rowKey string, tableUpdateEntityOptions *TableUpdateEntityOptions, queryOptions *QueryOptions) (*policy.Request, error) { urlPath := "/{table}(PartitionKey='{partitionKey}',RowKey='{rowKey}')" if table == "" { return nil, errors.New("parameter table cannot be empty") @@ -1048,36 +967,35 @@ func (client *tableClient) updateEntityCreateRequest(ctx context.Context, table return nil, errors.New("parameter rowKey cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{rowKey}", url.PathEscape(rowKey)) - req, err := azcore.NewRequest(ctx, http.MethodPut, azcore.JoinPaths(client.con.Endpoint(), urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.Con.Endpoint(), urlPath)) if err != nil { return nil, err } - req.Telemetry(telemetryInfo) - reqQP := req.URL.Query() + reqQP := req.Raw().URL.Query() if tableUpdateEntityOptions != nil && tableUpdateEntityOptions.Timeout != nil { reqQP.Set("timeout", strconv.FormatInt(int64(*tableUpdateEntityOptions.Timeout), 10)) } if queryOptions != nil && queryOptions.Format != nil { reqQP.Set("$format", string(*queryOptions.Format)) } - req.URL.RawQuery = reqQP.Encode() - req.Header.Set("x-ms-version", "2019-02-02") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header.Set("x-ms-version", "2019-02-02") if tableUpdateEntityOptions != nil && tableUpdateEntityOptions.RequestID != nil { - req.Header.Set("x-ms-client-request-id", *tableUpdateEntityOptions.RequestID) + req.Raw().Header.Set("x-ms-client-request-id", *tableUpdateEntityOptions.RequestID) } - req.Header.Set("DataServiceVersion", "3.0") + req.Raw().Header.Set("DataServiceVersion", "3.0") if tableUpdateEntityOptions != nil && tableUpdateEntityOptions.IfMatch != nil { - req.Header.Set("If-Match", *tableUpdateEntityOptions.IfMatch) + req.Raw().Header.Set("If-Match", *tableUpdateEntityOptions.IfMatch) } - req.Header.Set("Accept", "application/json") + req.Raw().Header.Set("Accept", "application/json") if tableUpdateEntityOptions != nil && tableUpdateEntityOptions.TableEntityProperties != nil { - return req, req.MarshalAsJSON(tableUpdateEntityOptions.TableEntityProperties) + return req, runtime.MarshalAsJSON(req, tableUpdateEntityOptions.TableEntityProperties) } return req, nil } // updateEntityHandleResponse handles the UpdateEntity response. -func (client *tableClient) updateEntityHandleResponse(resp *http.Response) (TableUpdateEntityResponse, error) { +func (client *TableClient) updateEntityHandleResponse(resp *http.Response) (TableUpdateEntityResponse, error) { result := TableUpdateEntityResponse{RawResponse: resp} if val := resp.Header.Get("x-ms-client-request-id"); val != "" { result.ClientRequestID = &val @@ -1102,14 +1020,14 @@ func (client *tableClient) updateEntityHandleResponse(resp *http.Response) (Tabl } // updateEntityHandleError handles the UpdateEntity error response. -func (client *tableClient) updateEntityHandleError(resp *http.Response) error { - body, err := azcore.Payload(resp) +func (client *TableClient) updateEntityHandleError(resp *http.Response) error { + body, err := runtime.Payload(resp) if err != nil { - return azcore.NewResponseError(err, resp) + return runtime.NewResponseError(err, resp) } errType := TableServiceError{raw: string(body)} - if err := azcore.UnmarshalAsJSON(resp, &errType); err != nil { - return azcore.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) + if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { + return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) } - return azcore.NewResponseError(&errType, resp) + return runtime.NewResponseError(&errType, resp) } diff --git a/sdk/tables/aztable/zz_generated_time_rfc1123.go b/sdk/tables/aztable/internal/time_rfc1123.go similarity index 94% rename from sdk/tables/aztable/zz_generated_time_rfc1123.go rename to sdk/tables/aztable/internal/time_rfc1123.go index f1ea29aa7efe..72d7d9c3dee8 100644 --- a/sdk/tables/aztable/zz_generated_time_rfc1123.go +++ b/sdk/tables/aztable/internal/time_rfc1123.go @@ -1,12 +1,12 @@ -//go:build go1.13 -// +build go1.13 +//go:build go1.16 +// +build go1.16 // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -package aztable +package internal import ( "strings" diff --git a/sdk/tables/aztable/zz_generated_time_rfc3339.go b/sdk/tables/aztable/internal/time_rfc3339.go similarity index 96% rename from sdk/tables/aztable/zz_generated_time_rfc3339.go rename to sdk/tables/aztable/internal/time_rfc3339.go index 1388ade6d691..0fd55b59a045 100644 --- a/sdk/tables/aztable/zz_generated_time_rfc3339.go +++ b/sdk/tables/aztable/internal/time_rfc3339.go @@ -1,12 +1,12 @@ -//go:build go1.13 -// +build go1.13 +//go:build go1.16 +// +build go1.16 // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -package aztable +package internal import ( "regexp" diff --git a/sdk/tables/aztable/models.go b/sdk/tables/aztable/models.go index 476d07c102ca..944f4766864f 100644 --- a/sdk/tables/aztable/models.go +++ b/sdk/tables/aztable/models.go @@ -3,27 +3,291 @@ package aztable -// ListOptions contains a group of parameters for the Table.Query method. +import ( + "time" + + generated "github.com/Azure/azure-sdk-for-go/sdk/tables/aztable/internal" +) + +// ListOptions contains a group of parameters for the ServiceClient.Query method. type ListOptions struct { // OData filter expression. Filter *string - // Specifies the media type for the response. - Format *OdataMetadataFormat // Select expression using OData notation. Limits the columns on each record to just those requested, e.g. "$select=PolicyAssignmentId, ResourceId". Select *string // Maximum number of records to return. Top *int32 } -func (l *ListOptions) toQueryOptions() *QueryOptions { +// CorsRule - CORS is an HTTP feature that enables a web application running under one domain to access resources in another domain. Web browsers implement +// a security restriction known as same-origin policy that +// prevents a web page from calling APIs in a different domain; CORS provides a secure way to allow one domain (the origin domain) to call APIs in another +// domain. +type CorsRule struct { + // REQUIRED; The request headers that the origin domain may specify on the CORS request. + AllowedHeaders *string `xml:"AllowedHeaders"` + + // REQUIRED; The methods (HTTP request verbs) that the origin domain may use for a CORS request. (comma separated) + AllowedMethods *string `xml:"AllowedMethods"` + + // REQUIRED; The origin domains that are permitted to make a request against the service via CORS. The origin domain is the domain from which the request + // originates. Note that the origin must be an exact + // case-sensitive match with the origin that the user age sends to the service. You can also use the wildcard character '*' to allow all origin domains + // to make requests via CORS. + AllowedOrigins *string `xml:"AllowedOrigins"` + + // REQUIRED; The response headers that may be sent in the response to the CORS request and exposed by the browser to the request issuer. + ExposedHeaders *string `xml:"ExposedHeaders"` + + // REQUIRED; The maximum amount time that a browser should cache the preflight OPTIONS request. + MaxAgeInSeconds *int32 `xml:"MaxAgeInSeconds"` +} + +func (c *CorsRule) toGenerated() *generated.CorsRule { + if c == nil { + return nil + } + + return &generated.CorsRule{ + AllowedHeaders: c.AllowedHeaders, + AllowedMethods: c.AllowedMethods, + AllowedOrigins: c.AllowedOrigins, + ExposedHeaders: c.ExposedHeaders, + MaxAgeInSeconds: c.MaxAgeInSeconds, + } +} + +func fromGeneratedCors(c *generated.CorsRule) *CorsRule { + if c == nil { + return nil + } + + return &CorsRule{ + AllowedHeaders: c.AllowedHeaders, + AllowedMethods: c.AllowedMethods, + AllowedOrigins: c.AllowedOrigins, + ExposedHeaders: c.ExposedHeaders, + MaxAgeInSeconds: c.MaxAgeInSeconds, + } +} + +// ServiceProperties - Service Properties for a given table +type ServiceProperties struct { + // The set of CORS rules. + Cors []*CorsRule `xml:"Cors>CorsRule"` + + // A summary of request statistics grouped by API in hourly aggregates for tables. + HourMetrics *Metrics `xml:"HourMetrics"` + + // Azure Analytics Logging settings. + Logging *Logging `xml:"Logging"` + + // A summary of request statistics grouped by API in minute aggregates for tables. + MinuteMetrics *Metrics `xml:"MinuteMetrics"` +} + +func (t *ServiceProperties) toGenerated() *generated.TableServiceProperties { + if t == nil { + return &generated.TableServiceProperties{} + } + + return &generated.TableServiceProperties{ + Cors: toGeneratedCorsRules(t.Cors), + HourMetrics: toGeneratedMetrics(t.HourMetrics), + Logging: toGeneratedLogging(t.Logging), + MinuteMetrics: toGeneratedMetrics(t.MinuteMetrics), + } +} + +func toGeneratedCorsRules(corsRules []*CorsRule) []*generated.CorsRule { + var ret []*generated.CorsRule + for _, c := range corsRules { + ret = append(ret, c.toGenerated()) + } + return ret +} + +// RetentionPolicy - The retention policy. +type RetentionPolicy struct { + // REQUIRED; Indicates whether a retention policy is enabled for the service. + Enabled *bool `xml:"Enabled"` + + // Indicates the number of days that metrics or logging or soft-deleted data should be retained. All data older than this value will be deleted. + Days *int32 `xml:"Days"` +} + +func toGeneratedRetentionPolicy(r *RetentionPolicy) *generated.RetentionPolicy { + if r == nil { + return &generated.RetentionPolicy{} + } + + return &generated.RetentionPolicy{ + Enabled: r.Enabled, + Days: r.Days, + } +} + +func fromGeneratedRetentionPolicy(r *generated.RetentionPolicy) *RetentionPolicy { + if r == nil { + return &RetentionPolicy{} + } + + return &RetentionPolicy{ + Enabled: r.Enabled, + Days: r.Days, + } +} + +// Logging - Azure Analytics Logging settings. +type Logging struct { + // REQUIRED; Indicates whether all delete requests should be logged. + Delete *bool `xml:"Delete"` + + // REQUIRED; Indicates whether all read requests should be logged. + Read *bool `xml:"Read"` + + // REQUIRED; The retention policy. + RetentionPolicy *RetentionPolicy `xml:"RetentionPolicy"` + + // REQUIRED; The version of Analytics to configure. + Version *string `xml:"Version"` + + // REQUIRED; Indicates whether all write requests should be logged. + Write *bool `xml:"Write"` +} + +func toGeneratedLogging(l *Logging) *generated.Logging { if l == nil { - return &QueryOptions{} + return nil + } + + return &generated.Logging{ + Delete: l.Delete, + Read: l.Read, + RetentionPolicy: toGeneratedRetentionPolicy(l.RetentionPolicy), + Version: l.Version, + Write: l.Write, + } +} + +func fromGeneratedLogging(g *generated.Logging) *Logging { + if g == nil { + return nil + } + + return &Logging{ + Delete: g.Delete, + Read: g.Read, + Write: g.Write, + Version: g.Version, + RetentionPolicy: (*RetentionPolicy)(g.RetentionPolicy), + } +} + +type Metrics struct { + // REQUIRED; Indicates whether metrics are enabled for the Table service. + Enabled *bool `xml:"Enabled"` + + // Indicates whether metrics should generate summary statistics for called API operations. + IncludeAPIs *bool `xml:"IncludeAPIs"` + + // The retention policy. + RetentionPolicy *RetentionPolicy `xml:"RetentionPolicy"` + + // The version of Analytics to configure. + Version *string `xml:"Version"` +} + +func toGeneratedMetrics(m *Metrics) *generated.Metrics { + if m == nil { + return nil + } + + return &generated.Metrics{ + Enabled: m.Enabled, + IncludeAPIs: m.IncludeAPIs, + Version: m.Version, + RetentionPolicy: toGeneratedRetentionPolicy(m.RetentionPolicy), + } +} + +func fromGeneratedMetrics(m *generated.Metrics) *Metrics { + if m == nil { + return &Metrics{} + } + + return &Metrics{ + Enabled: m.Enabled, + IncludeAPIs: m.IncludeAPIs, + Version: m.Version, + RetentionPolicy: fromGeneratedRetentionPolicy(m.RetentionPolicy), + } +} + +// SignedIdentifier - A signed identifier. +type SignedIdentifier struct { + // REQUIRED; The access policy. + AccessPolicy *AccessPolicy `xml:"AccessPolicy"` + + // REQUIRED; A unique id. + ID *string `xml:"Id"` +} + +func toGeneratedSignedIdentifier(s *SignedIdentifier) *generated.SignedIdentifier { + if s == nil { + return nil + } + + return &generated.SignedIdentifier{ + ID: s.ID, + AccessPolicy: toGeneratedAccessPolicy(s.AccessPolicy), + } +} + +func fromGeneratedSignedIdentifier(s *generated.SignedIdentifier) *SignedIdentifier { + if s == nil { + return nil + } + + return &SignedIdentifier{ + ID: s.ID, + AccessPolicy: fromGeneratedAccessPolicy(s.AccessPolicy), + } + +} + +// AccessPolicy - An Access policy. +type AccessPolicy struct { + // REQUIRED; The datetime that the policy expires. + Expiry *time.Time `xml:"Expiry"` + + // REQUIRED; The permissions for the acl policy. + Permission *string `xml:"Permission"` + + // REQUIRED; The start datetime from which the policy is active. + Start *time.Time `xml:"Start"` +} + +func toGeneratedAccessPolicy(a *AccessPolicy) *generated.AccessPolicy { + if a == nil { + return nil + } + + return &generated.AccessPolicy{ + Expiry: a.Expiry, + Permission: a.Permission, + Start: a.Start, + } +} + +func fromGeneratedAccessPolicy(g *generated.AccessPolicy) *AccessPolicy { + if g == nil { + return nil } - return &QueryOptions{ - Filter: l.Filter, - Format: l.Format, - Select: l.Select, - Top: l.Top, + return &AccessPolicy{ + Expiry: g.Expiry, + Permission: g.Permission, + Start: g.Start, } } diff --git a/sdk/tables/aztable/options.go b/sdk/tables/aztable/options.go new file mode 100644 index 000000000000..b8a6fb647ddf --- /dev/null +++ b/sdk/tables/aztable/options.go @@ -0,0 +1,185 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package aztable + +import ( + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + generated "github.com/Azure/azure-sdk-for-go/sdk/tables/aztable/internal" + "github.com/Azure/azure-sdk-for-go/sdk/to" +) + +// Options for Client.Create and ServiceClient.CreateTable method +type CreateTableOptions struct { +} + +func (c *CreateTableOptions) toGenerated() *generated.TableCreateOptions { + return &generated.TableCreateOptions{} +} + +// Options for Client.Delete and ServiceClient.DeleteTable methods +type DeleteTableOptions struct { +} + +func (c *DeleteTableOptions) toGenerated() *generated.TableDeleteOptions { + return &generated.TableDeleteOptions{} +} + +// ListEntitiesOptions contains a group of parameters for the Table.Query method. +type ListEntitiesOptions struct { + // OData filter expression. + Filter *string + // Select expression using OData notation. Limits the columns on each record to just those requested, e.g. "$select=PolicyAssignmentId, ResourceId". + Select *string + // Maximum number of records to return. + Top *int32 +} + +func (l *ListEntitiesOptions) toQueryOptions() *generated.QueryOptions { + if l == nil { + return &generated.QueryOptions{} + } + + return &generated.QueryOptions{ + Filter: l.Filter, + Format: generated.ODataMetadataFormatApplicationJSONODataMinimalmetadata.ToPtr(), + Select: l.Select, + Top: l.Top, + } +} + +// ListEntitiesOptions contains a group of parameters for the ServiceClient.QueryTables method. +type ListTablesOptions struct { + // OData filter expression. + Filter *string + // Select expression using OData notation. Limits the columns on each record to just those requested, e.g. "$select=PolicyAssignmentId, ResourceId". + Select *string + // Maximum number of records to return. + Top *int32 +} + +func (l *ListTablesOptions) toQueryOptions() *generated.QueryOptions { + if l == nil { + return &generated.QueryOptions{} + } + + return &generated.QueryOptions{ + Filter: l.Filter, + Format: generated.ODataMetadataFormatApplicationJSONODataMinimalmetadata.ToPtr(), + Select: l.Select, + Top: l.Top, + } +} + +type ResponseFormat string + +const ( + ResponseFormatReturnContent ResponseFormat = "return-content" + ResponseFormatReturnNoContent ResponseFormat = "return-no-content" +) + +// PossibleResponseFormatValues returns the possible values for the ResponseFormat const type. +func PossibleResponseFormatValues() []ResponseFormat { + return []ResponseFormat{ + ResponseFormatReturnContent, + ResponseFormatReturnNoContent, + } +} + +// ToPtr returns a *ResponseFormat pointing to the current value. +func (c ResponseFormat) ToPtr() *ResponseFormat { + return &c +} + +// Options for Client.GetEntity method +type GetEntityOptions struct { +} + +func (g *GetEntityOptions) toGenerated() (*generated.TableQueryEntityWithPartitionAndRowKeyOptions, *generated.QueryOptions) { + return &generated.TableQueryEntityWithPartitionAndRowKeyOptions{}, &generated.QueryOptions{Format: generated.ODataMetadataFormatApplicationJSONODataMinimalmetadata.ToPtr()} +} + +// Options for the Client.AddEntity operation +type AddEntityOptions struct { + // Specifies whether the response should include the inserted entity in the payload. Possible values are return-no-content and return-content. + ResponsePreference *ResponseFormat +} + +type DeleteEntityOptions struct { + IfMatch *azcore.ETag +} + +func (d *DeleteEntityOptions) toGenerated() *generated.TableDeleteEntityOptions { + return &generated.TableDeleteEntityOptions{} +} + +type UpdateEntityOptions struct { + IfMatch *azcore.ETag + UpdateMode EntityUpdateMode +} + +func (u *UpdateEntityOptions) toGeneratedMergeEntity(m map[string]interface{}) *generated.TableMergeEntityOptions { + if u == nil { + return &generated.TableMergeEntityOptions{} + } + return &generated.TableMergeEntityOptions{ + IfMatch: to.StringPtr(string(*u.IfMatch)), + TableEntityProperties: m, + } +} + +func (u *UpdateEntityOptions) toGeneratedUpdateEntity(m map[string]interface{}) *generated.TableUpdateEntityOptions { + if u == nil { + return &generated.TableUpdateEntityOptions{} + } + return &generated.TableUpdateEntityOptions{ + IfMatch: to.StringPtr(string(*u.IfMatch)), + TableEntityProperties: m, + } +} + +type InsertEntityOptions struct { + ETag azcore.ETag + UpdateMode EntityUpdateMode +} + +type GetAccessPolicyOptions struct { +} + +func (g *GetAccessPolicyOptions) toGenerated() *generated.TableGetAccessPolicyOptions { + return &generated.TableGetAccessPolicyOptions{} +} + +type SetAccessPolicyOptions struct { + TableACL []*SignedIdentifier +} + +func (s *SetAccessPolicyOptions) toGenerated() *generated.TableSetAccessPolicyOptions { + var sis []*generated.SignedIdentifier + for _, t := range s.TableACL { + sis = append(sis, toGeneratedSignedIdentifier(t)) + } + return &generated.TableSetAccessPolicyOptions{ + TableACL: sis, + } +} + +type GetStatisticsOptions struct { +} + +func (g *GetStatisticsOptions) toGenerated() *generated.ServiceGetStatisticsOptions { + return &generated.ServiceGetStatisticsOptions{} +} + +type GetPropertiesOptions struct { +} + +func (g *GetPropertiesOptions) toGenerated() *generated.ServiceGetPropertiesOptions { + return &generated.ServiceGetPropertiesOptions{} +} + +type SetPropertiesOptions struct{} + +func (s *SetPropertiesOptions) toGenerated() *generated.ServiceSetPropertiesOptions { + return &generated.ServiceSetPropertiesOptions{} +} diff --git a/sdk/tables/aztable/proxy_test.go b/sdk/tables/aztable/proxy_test.go index da3f785bf0ad..83e47e2a837f 100644 --- a/sdk/tables/aztable/proxy_test.go +++ b/sdk/tables/aztable/proxy_test.go @@ -12,20 +12,20 @@ import ( "testing" "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/stretchr/testify/require" ) -var AADAuthenticationScope = "https://storage.azure.com/.default" - var pathToPackage = "sdk/tables/aztable" type recordingPolicy struct { options recording.RecordingOptions } -func NewRecordingPolicy(o *recording.RecordingOptions) azcore.Policy { +func NewRecordingPolicy(o *recording.RecordingOptions) policy.Policy { if o == nil { o = &recording.RecordingOptions{} } @@ -34,15 +34,15 @@ func NewRecordingPolicy(o *recording.RecordingOptions) azcore.Policy { return p } -func (p *recordingPolicy) Do(req *azcore.Request) (resp *http.Response, err error) { - originalURLHost := req.URL.Host - req.URL.Scheme = "https" - req.URL.Host = p.options.Host - req.Host = p.options.Host +func (p *recordingPolicy) Do(req *policy.Request) (resp *http.Response, err error) { + originalURLHost := req.Raw().URL.Host + req.Raw().URL.Scheme = "https" + req.Raw().URL.Host = p.options.Host + req.Raw().Host = p.options.Host - req.Header.Set(recording.UpstreamUriHeader, fmt.Sprintf("%v://%v", p.options.Scheme, originalURLHost)) - req.Header.Set(recording.ModeHeader, recording.GetRecordMode()) - req.Header.Set(recording.IdHeader, recording.GetRecordingId()) + req.Raw().Header.Set(recording.UpstreamUriHeader, fmt.Sprintf("%v://%v", p.options.Scheme, originalURLHost)) + req.Raw().Header.Set(recording.ModeHeader, recording.GetRecordMode()) + req.Raw().Header.Set(recording.IdHeader, recording.GetRecordingId()) return req.Next() } @@ -63,52 +63,57 @@ type fakeCredPolicy struct { cred *FakeCredential } -func newFakeCredPolicy(cred *FakeCredential, opts azcore.AuthenticationOptions) *fakeCredPolicy { +func newFakeCredPolicy(cred *FakeCredential, opts runtime.AuthenticationOptions) *fakeCredPolicy { return &fakeCredPolicy{cred: cred} } -func (f *fakeCredPolicy) Do(req *azcore.Request) (*http.Response, error) { +func (f *fakeCredPolicy) Do(req *policy.Request) (*http.Response, error) { authHeader := strings.Join([]string{"Authorization ", f.cred.accountName, ":", f.cred.accountKey}, "") - req.Request.Header.Set(headerAuthorization, authHeader) + req.Raw().Header.Set(headerAuthorization, authHeader) return req.Next() } -func (f *FakeCredential) NewAuthenticationPolicy(options azcore.AuthenticationOptions) azcore.Policy { +func (f *FakeCredential) NewAuthenticationPolicy(options runtime.AuthenticationOptions) policy.Policy { return newFakeCredPolicy(f, options) } -func createTableClientForRecording(t *testing.T, tableName string, serviceURL string, cred azcore.Credential) (*TableClient, error) { - policy := NewRecordingPolicy(&recording.RecordingOptions{UseHTTPS: true}) +func createClientForRecording(t *testing.T, tableName string, serviceURL string, cred azcore.Credential) (*Client, error) { + p := NewRecordingPolicy(&recording.RecordingOptions{UseHTTPS: true}) client, err := recording.GetHTTPClient() require.NoError(t, err) - options := &TableClientOptions{ - Scopes: []string{AADAuthenticationScope}, - PerCallOptions: []azcore.Policy{policy}, - HTTPClient: client, + + options := &ClientOptions{ + PerCallOptions: []policy.Policy{p}, + Transporter: client, } - return NewTableClient(tableName, serviceURL, cred, options) + if !strings.HasSuffix(serviceURL, "/") && tableName != "" { + serviceURL += "/" + } + serviceURL += tableName + + return NewClient(serviceURL, cred, options) } -func createTableServiceClientForRecording(t *testing.T, serviceURL string, cred azcore.Credential) (*TableServiceClient, error) { - policy := NewRecordingPolicy(&recording.RecordingOptions{UseHTTPS: true}) +func createServiceClientForRecording(t *testing.T, serviceURL string, cred azcore.Credential) (*ServiceClient, error) { + p := NewRecordingPolicy(&recording.RecordingOptions{UseHTTPS: true}) client, err := recording.GetHTTPClient() require.NoError(t, err) - options := &TableClientOptions{ - Scopes: []string{AADAuthenticationScope}, - PerCallOptions: []azcore.Policy{policy}, - HTTPClient: client, + + options := &ClientOptions{ + PerCallOptions: []policy.Policy{p}, + Transporter: client, } - return NewTableServiceClient(serviceURL, cred, options) + return NewServiceClient(serviceURL, cred, options) } -func initClientTest(t *testing.T, service string, createTable bool) (*TableClient, func()) { - var client *TableClient +func initClientTest(t *testing.T, service string, createTable bool) (*Client, func()) { + var client *Client var err error if service == string(storageEndpoint) { - client, err = createStorageTableClient(t) + client, err = createStorageClient(t) require.NoError(t, err) } else if service == string(cosmosEndpoint) { - client, err = createCosmosTableClient(t) + client, err = createCosmosClient(t) require.NoError(t, err) } @@ -116,7 +121,7 @@ func initClientTest(t *testing.T, service string, createTable bool) (*TableClien require.NoError(t, err) if createTable { - _, err = client.Create(context.Background()) + _, err = client.Create(context.Background(), nil) require.NoError(t, err) } @@ -128,8 +133,8 @@ func initClientTest(t *testing.T, service string, createTable bool) (*TableClien } } -func initServiceTest(t *testing.T, service string) (*TableServiceClient, func()) { - var client *TableServiceClient +func initServiceTest(t *testing.T, service string) (*ServiceClient, func()) { + var client *ServiceClient var err error if service == string(storageEndpoint) { client, err = createStorageServiceClient(t) @@ -175,25 +180,29 @@ func getSharedKeyCredential(t *testing.T) (azcore.Credential, error) { return NewSharedKeyCredential(accountName, accountKey) } -func createStorageTableClient(t *testing.T) (*TableClient, error) { +func createStorageClient(t *testing.T) (*Client, error) { var cred azcore.Credential + var err error accountName := recording.GetEnvVariable(t, "TABLES_STORAGE_ACCOUNT_NAME", "fakestorageaccount") + accountKey := recording.GetEnvVariable(t, "TABLES_PRIMARY_STORAGE_ACCOUNT_KEY", "fakestorageaccountkey") + if recording.InPlayback() { - accountName = "fakestorageaccount" + cred, err = getSharedKeyCredential(t) + require.NoError(t, err) + } else { + cred, err = NewSharedKeyCredential(accountName, accountKey) + require.NoError(t, err) } - cred, err := getAADCredential(t) - require.NoError(t, err) - serviceURL := storageURI(accountName, "core.windows.net") - tableName, err := createRandomName(t, "tableName") + tableName, err := createRandomName(t, tableNamePrefix) require.NoError(t, err) - return createTableClientForRecording(t, tableName, serviceURL, cred) + return createClientForRecording(t, tableName, serviceURL, cred) } -func createCosmosTableClient(t *testing.T) (*TableClient, error) { +func createCosmosClient(t *testing.T) (*Client, error) { var cred azcore.Credential accountName := recording.GetEnvVariable(t, "TABLES_COSMOS_ACCOUNT_NAME", "fakestorageaccount") if recording.InPlayback() { @@ -205,13 +214,13 @@ func createCosmosTableClient(t *testing.T) (*TableClient, error) { serviceURL := cosmosURI(accountName, "cosmos.azure.com") - tableName, err := createRandomName(t, "tableName") + tableName, err := createRandomName(t, tableNamePrefix) require.NoError(t, err) - return createTableClientForRecording(t, tableName, serviceURL, cred) + return createClientForRecording(t, tableName, serviceURL, cred) } -func createStorageServiceClient(t *testing.T) (*TableServiceClient, error) { +func createStorageServiceClient(t *testing.T) (*ServiceClient, error) { var cred azcore.Credential accountName := recording.GetEnvVariable(t, "TABLES_STORAGE_ACCOUNT_NAME", "fakestorageaccount") if recording.InPlayback() { @@ -223,10 +232,10 @@ func createStorageServiceClient(t *testing.T) (*TableServiceClient, error) { serviceURL := storageURI(accountName, "core.windows.net") - return createTableServiceClientForRecording(t, serviceURL, cred) + return createServiceClientForRecording(t, serviceURL, cred) } -func createCosmosServiceClient(t *testing.T) (*TableServiceClient, error) { +func createCosmosServiceClient(t *testing.T) (*ServiceClient, error) { var cred azcore.Credential accountName := recording.GetEnvVariable(t, "TABLES_COSMOS_ACCOUNT_NAME", "fakestorageaccount") if recording.InPlayback() { @@ -238,7 +247,7 @@ func createCosmosServiceClient(t *testing.T) (*TableServiceClient, error) { serviceURL := cosmosURI(accountName, "cosmos.azure.com") - return createTableServiceClientForRecording(t, serviceURL, cred) + return createServiceClientForRecording(t, serviceURL, cred) } func createRandomName(t *testing.T, prefix string) (string, error) { @@ -247,11 +256,11 @@ func createRandomName(t *testing.T, prefix string) (string, error) { return prefix + fmt.Sprint(h.Sum32()), err } -func clearAllTables(service *TableServiceClient) error { +func clearAllTables(service *ServiceClient) error { pager := service.ListTables(nil) for pager.NextPage(ctx) { resp := pager.PageResponse() - for _, v := range resp.TableListResponse.Value { + for _, v := range resp.Tables { _, err := service.DeleteTable(ctx, *v.TableName, nil) if err != nil { return err diff --git a/sdk/tables/aztable/recordings/TestAddBasicEntity/TestAddBasicEntity_cosmos.json b/sdk/tables/aztable/recordings/TestAddBasicEntity/TestAddBasicEntity_cosmos.json index d1437d695226..0469fb28e282 100644 --- a/sdk/tables/aztable/recordings/TestAddBasicEntity/TestAddBasicEntity_cosmos.json +++ b/sdk/tables/aztable/recordings/TestAddBasicEntity/TestAddBasicEntity_cosmos.json @@ -14,8 +14,8 @@ "Content-Length": "35", "Content-Type": "application/json", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:01:26 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:40:02 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": { @@ -24,11 +24,11 @@ "StatusCode": 201, "ResponseHeaders": { "Content-Type": "application/json; odata=minimalmetadata", - "Date": "Mon, 02 Aug 2021 18:01:27 GMT", - "ETag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A26.8627464Z\u0027\u0022", + "Date": "Tue, 31 Aug 2021 15:40:03 GMT", + "ETag": "W/\u0022datetime\u00272021-08-31T15%3A40%3A03.9576584Z\u0027\u0022", "Location": "https://seankaneprim.table.cosmos.azure.com/Tables(\u0027tableName4275288239\u0027)", "Transfer-Encoding": "chunked", - "x-ms-request-id": "6511d8eb-1d5e-427b-8a44-9621ea563e4c" + "x-ms-request-id": "415de367-233b-44f5-9cee-238e00b572e0" }, "ResponseBody": { "TableName": "tableName4275288239", @@ -50,8 +50,8 @@ "Content-Type": "application/json", "dataserviceversion": "3.0", "prefer": "return-no-content", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:01:28 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:40:03 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": { @@ -64,84 +64,84 @@ }, "StatusCode": 204, "ResponseHeaders": { - "Date": "Mon, 02 Aug 2021 18:01:27 GMT", - "ETag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A27.8188552Z\u0027\u0022", + "Date": "Tue, 31 Aug 2021 15:40:03 GMT", + "ETag": "W/\u0022datetime\u00272021-08-31T15%3A40%3A04.4942344Z\u0027\u0022", "Location": "https://seankaneprim.table.cosmos.azure.com/tableName4275288239(PartitionKey=\u0027pk001\u0027,RowKey=\u0027rk001\u0027)", "Preference-Applied": "return-no-content", - "x-ms-request-id": "b491538e-7c08-46d8-825e-93cfd5a17bfd" + "x-ms-request-id": "6c707fcf-62ae-4228-9f69-fc718f893657" }, "ResponseBody": null }, { - "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/tableName4275288239(PartitionKey=\u0027pk001\u0027,RowKey=\u0027rk001\u0027)", + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/tableName4275288239(PartitionKey=\u0027pk001\u0027,RowKey=\u0027rk001\u0027)?%24format=application%2Fjson%3Bodata%3Dminimalmetadata", "RequestMethod": "GET", "RequestHeaders": { ":authority": "localhost:5001", ":method": "GET", - ":path": "/tableName4275288239(PartitionKey=\u0027pk001\u0027,RowKey=\u0027rk001\u0027)", + ":path": "/tableName4275288239(PartitionKey=\u0027pk001\u0027,RowKey=\u0027rk001\u0027)?%24format=application%2Fjson%3Bodata%3Dminimalmetadata", ":scheme": "https", "Accept": "application/json;odata=minimalmetadata", "Accept-Encoding": "gzip", "Authorization": "Sanitized", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:01:28 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:40:04 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { "Content-Type": "application/json; odata=minimalmetadata", - "Date": "Mon, 02 Aug 2021 18:01:27 GMT", - "ETag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A27.8188552Z\u0027\u0022", + "Date": "Tue, 31 Aug 2021 15:40:03 GMT", + "ETag": "W/\u0022datetime\u00272021-08-31T15%3A40%3A04.4942344Z\u0027\u0022", "Transfer-Encoding": "chunked", - "x-ms-request-id": "4460d460-98f8-403c-a823-0a216e20a239" + "x-ms-request-id": "dbcdaa8f-cef1-4f0b-b5ee-5cf59baaf728" }, "ResponseBody": { "odata.metadata": "https://seankaneprim.table.cosmos.azure.com/tableName4275288239/$metadata#tableName4275288239/@Element", - "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A27.8188552Z\u0027\u0022", + "odata.etag": "W/\u0022datetime\u00272021-08-31T15%3A40%3A04.4942344Z\u0027\u0022", "Bool": true, "Integer": 10, "PartitionKey": "pk001", "RowKey": "rk001", "String": "abcdef", - "Timestamp": "2021-08-02T18:01:27.8188552Z" + "Timestamp": "2021-08-31T15:40:04.4942344Z" } }, { - "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/tableName4275288239()?%24filter=PartitionKey\u002Beq\u002B%27pk001%27", + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/tableName4275288239()?%24filter=PartitionKey\u002Beq\u002B%27pk001%27\u0026%24format=application%2Fjson%3Bodata%3Dminimalmetadata", "RequestMethod": "GET", "RequestHeaders": { ":authority": "localhost:5001", ":method": "GET", - ":path": "/tableName4275288239()?%24filter=PartitionKey\u002Beq\u002B%27pk001%27", + ":path": "/tableName4275288239()?%24filter=PartitionKey\u002Beq\u002B%27pk001%27\u0026%24format=application%2Fjson%3Bodata%3Dminimalmetadata", ":scheme": "https", "Accept": "application/json;odata=minimalmetadata", "Accept-Encoding": "gzip", "Authorization": "Sanitized", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:01:28 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:40:04 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { "Content-Type": "application/json; odata=minimalmetadata", - "Date": "Mon, 02 Aug 2021 18:01:27 GMT", + "Date": "Tue, 31 Aug 2021 15:40:03 GMT", "Transfer-Encoding": "chunked", - "x-ms-request-id": "70e0d313-0f8c-435e-b8ef-cad2758c8784" + "x-ms-request-id": "dbe1fac6-c33b-4e99-8451-a453aa049dc2" }, "ResponseBody": { "value": [ { - "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A27.8188552Z\u0027\u0022", + "odata.etag": "W/\u0022datetime\u00272021-08-31T15%3A40%3A04.4942344Z\u0027\u0022", "Bool": true, "Integer": 10, "PartitionKey": "pk001", "RowKey": "rk001", "String": "abcdef", - "Timestamp": "2021-08-02T18:01:27.8188552Z" + "Timestamp": "2021-08-31T15:40:04.4942344Z" } ], "odata.metadata": "https://seankaneprim.table.cosmos.azure.com/$metadata#tableName4275288239" @@ -158,15 +158,15 @@ "Accept": "application/json", "Accept-Encoding": "gzip", "Authorization": "Sanitized", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:01:28 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:40:04 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": null, "StatusCode": 204, "ResponseHeaders": { - "Date": "Mon, 02 Aug 2021 18:01:28 GMT", - "x-ms-request-id": "02bfd73e-00e9-4b0c-9050-ea7a7cb5265b" + "Date": "Tue, 31 Aug 2021 15:40:04 GMT", + "x-ms-request-id": "f1398f55-c8ba-444b-8864-c9ee8d8ef04a" }, "ResponseBody": null } diff --git a/sdk/tables/aztable/recordings/TestAddBasicEntity/TestAddBasicEntity_storage.json b/sdk/tables/aztable/recordings/TestAddBasicEntity/TestAddBasicEntity_storage.json index c7673322017e..a456036a618b 100644 --- a/sdk/tables/aztable/recordings/TestAddBasicEntity/TestAddBasicEntity_storage.json +++ b/sdk/tables/aztable/recordings/TestAddBasicEntity/TestAddBasicEntity_storage.json @@ -14,8 +14,8 @@ "Content-Length": "35", "Content-Type": "application/json", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:01:24 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:40:00 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": { @@ -25,7 +25,7 @@ "ResponseHeaders": { "Cache-Control": "no-cache", "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", - "Date": "Mon, 02 Aug 2021 18:01:24 GMT", + "Date": "Tue, 31 Aug 2021 15:40:01 GMT", "Location": "https://seankaneprim.table.core.windows.net/Tables(\u0027tableName1927585112\u0027)", "Server": [ "Windows-Azure-Table/1.0", @@ -33,7 +33,7 @@ ], "Transfer-Encoding": "chunked", "X-Content-Type-Options": "nosniff", - "x-ms-request-id": "a05b2c99-9002-0057-46c8-874646000000", + "x-ms-request-id": "041756d4-9002-00a9-797e-9eb0af000000", "x-ms-version": "2019-02-02" }, "ResponseBody": { @@ -56,8 +56,8 @@ "Content-Type": "application/json", "dataserviceversion": "3.0", "prefer": "return-no-content", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:01:25 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:40:01 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": { @@ -73,8 +73,8 @@ "Cache-Control": "no-cache", "Content-Length": "0", "DataServiceId": "https://seankaneprim.table.core.windows.net/tableName1927585112(PartitionKey=\u0027pk001\u0027,RowKey=\u0027rk001\u0027)", - "Date": "Mon, 02 Aug 2021 18:01:24 GMT", - "ETag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A25.1199393Z\u0027\u0022", + "Date": "Tue, 31 Aug 2021 15:40:01 GMT", + "ETag": "W/\u0022datetime\u00272021-08-31T15%3A40%3A02.1952595Z\u0027\u0022", "Location": "https://seankaneprim.table.core.windows.net/tableName1927585112(PartitionKey=\u0027pk001\u0027,RowKey=\u0027rk001\u0027)", "Preference-Applied": "return-no-content", "Server": [ @@ -82,25 +82,25 @@ "Microsoft-HTTPAPI/2.0" ], "X-Content-Type-Options": "nosniff", - "x-ms-request-id": "a05b2cf4-9002-0057-1ac8-874646000000", + "x-ms-request-id": "0417570f-9002-00a9-2b7e-9eb0af000000", "x-ms-version": "2019-02-02" }, "ResponseBody": null }, { - "RequestUri": "https://fakestorageaccount.table.core.windows.net/tableName1927585112(PartitionKey=\u0027pk001\u0027,RowKey=\u0027rk001\u0027)", + "RequestUri": "https://fakestorageaccount.table.core.windows.net/tableName1927585112(PartitionKey=\u0027pk001\u0027,RowKey=\u0027rk001\u0027)?%24format=application%2Fjson%3Bodata%3Dminimalmetadata", "RequestMethod": "GET", "RequestHeaders": { ":authority": "localhost:5001", ":method": "GET", - ":path": "/tableName1927585112(PartitionKey=\u0027pk001\u0027,RowKey=\u0027rk001\u0027)", + ":path": "/tableName1927585112(PartitionKey=\u0027pk001\u0027,RowKey=\u0027rk001\u0027)?%24format=application%2Fjson%3Bodata%3Dminimalmetadata", ":scheme": "https", "Accept": "application/json;odata=minimalmetadata", "Accept-Encoding": "gzip", "Authorization": "Sanitized", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:01:25 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:40:01 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": null, @@ -108,43 +108,42 @@ "ResponseHeaders": { "Cache-Control": "no-cache", "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", - "Date": "Mon, 02 Aug 2021 18:01:24 GMT", - "ETag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A25.1199393Z\u0027\u0022", + "Date": "Tue, 31 Aug 2021 15:40:01 GMT", + "ETag": "W/\u0022datetime\u00272021-08-31T15%3A40%3A02.1952595Z\u0027\u0022", "Server": [ "Windows-Azure-Table/1.0", "Microsoft-HTTPAPI/2.0" ], "Transfer-Encoding": "chunked", - "Vary": "Origin", "X-Content-Type-Options": "nosniff", - "x-ms-request-id": "a05b2d57-9002-0057-68c8-874646000000", + "x-ms-request-id": "04175759-9002-00a9-737e-9eb0af000000", "x-ms-version": "2019-02-02" }, "ResponseBody": { "odata.metadata": "https://seankaneprim.table.core.windows.net/$metadata#tableName1927585112/@Element", - "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A25.1199393Z\u0027\u0022", + "odata.etag": "W/\u0022datetime\u00272021-08-31T15%3A40%3A02.1952595Z\u0027\u0022", "PartitionKey": "pk001", "RowKey": "rk001", - "Timestamp": "2021-08-02T18:01:25.1199393Z", + "Timestamp": "2021-08-31T15:40:02.1952595Z", "Bool": true, "Integer": 10, "String": "abcdef" } }, { - "RequestUri": "https://fakestorageaccount.table.core.windows.net/tableName1927585112()?%24filter=PartitionKey\u002Beq\u002B%27pk001%27", + "RequestUri": "https://fakestorageaccount.table.core.windows.net/tableName1927585112()?%24filter=PartitionKey\u002Beq\u002B%27pk001%27\u0026%24format=application%2Fjson%3Bodata%3Dminimalmetadata", "RequestMethod": "GET", "RequestHeaders": { ":authority": "localhost:5001", ":method": "GET", - ":path": "/tableName1927585112()?%24filter=PartitionKey\u002Beq\u002B%27pk001%27", + ":path": "/tableName1927585112()?%24filter=PartitionKey\u002Beq\u002B%27pk001%27\u0026%24format=application%2Fjson%3Bodata%3Dminimalmetadata", ":scheme": "https", "Accept": "application/json;odata=minimalmetadata", "Accept-Encoding": "gzip", "Authorization": "Sanitized", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:01:26 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:40:01 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": null, @@ -152,25 +151,24 @@ "ResponseHeaders": { "Cache-Control": "no-cache", "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", - "Date": "Mon, 02 Aug 2021 18:01:24 GMT", + "Date": "Tue, 31 Aug 2021 15:40:01 GMT", "Server": [ "Windows-Azure-Table/1.0", "Microsoft-HTTPAPI/2.0" ], "Transfer-Encoding": "chunked", - "Vary": "Origin", "X-Content-Type-Options": "nosniff", - "x-ms-request-id": "a05b2dd7-9002-0057-48c8-874646000000", + "x-ms-request-id": "0417579f-9002-00a9-327e-9eb0af000000", "x-ms-version": "2019-02-02" }, "ResponseBody": { "odata.metadata": "https://seankaneprim.table.core.windows.net/$metadata#tableName1927585112", "value": [ { - "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A25.1199393Z\u0027\u0022", + "odata.etag": "W/\u0022datetime\u00272021-08-31T15%3A40%3A02.1952595Z\u0027\u0022", "PartitionKey": "pk001", "RowKey": "rk001", - "Timestamp": "2021-08-02T18:01:25.1199393Z", + "Timestamp": "2021-08-31T15:40:02.1952595Z", "Bool": true, "Integer": 10, "String": "abcdef" @@ -189,8 +187,8 @@ "Accept": "application/json", "Accept-Encoding": "gzip", "Authorization": "Sanitized", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:01:26 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:40:02 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": null, @@ -198,13 +196,13 @@ "ResponseHeaders": { "Cache-Control": "no-cache", "Content-Length": "0", - "Date": "Mon, 02 Aug 2021 18:01:24 GMT", + "Date": "Tue, 31 Aug 2021 15:40:02 GMT", "Server": [ "Windows-Azure-Table/1.0", "Microsoft-HTTPAPI/2.0" ], "X-Content-Type-Options": "nosniff", - "x-ms-request-id": "a05b2e12-9002-0057-70c8-874646000000", + "x-ms-request-id": "041757f2-9002-00a9-807e-9eb0af000000", "x-ms-version": "2019-02-02" }, "ResponseBody": null diff --git a/sdk/tables/aztable/recordings/TestAddComplexEntity/TestAddComplexEntity_cosmos.json b/sdk/tables/aztable/recordings/TestAddComplexEntity/TestAddComplexEntity_cosmos.json index a8765fc139a3..1673f5a6a837 100644 --- a/sdk/tables/aztable/recordings/TestAddComplexEntity/TestAddComplexEntity_cosmos.json +++ b/sdk/tables/aztable/recordings/TestAddComplexEntity/TestAddComplexEntity_cosmos.json @@ -14,8 +14,8 @@ "Content-Length": "35", "Content-Type": "application/json", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:01:51 GMT", + "User-Agent": "azsdk-go-aztable/v0.1.0 azsdk-go-azcore/v0.19.0 (go1.17; Windows_NT)", + "x-ms-date": "Wed, 01 Sep 2021 18:15:06 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": { @@ -24,11 +24,11 @@ "StatusCode": 201, "ResponseHeaders": { "Content-Type": "application/json; odata=minimalmetadata", - "Date": "Mon, 02 Aug 2021 18:01:51 GMT", - "ETag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A51.2255496Z\u0027\u0022", + "Date": "Wed, 01 Sep 2021 18:15:07 GMT", + "ETag": "W/\u0022datetime\u00272021-09-01T18%3A15%3A08.0942600Z\u0027\u0022", "Location": "https://seankaneprim.table.cosmos.azure.com/Tables(\u0027tableName2210495615\u0027)", "Transfer-Encoding": "chunked", - "x-ms-request-id": "56067665-023c-4182-89e0-65c6a9256bc5" + "x-ms-request-id": "f188f1d3-253c-4490-bcbf-15eab7f1cee7" }, "ResponseBody": { "TableName": "tableName2210495615", @@ -50,8 +50,8 @@ "Content-Type": "application/json", "dataserviceversion": "3.0", "prefer": "return-no-content", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:01:52 GMT", + "User-Agent": "azsdk-go-aztable/v0.1.0 azsdk-go-azcore/v0.19.0 (go1.17; Windows_NT)", + "x-ms-date": "Wed, 01 Sep 2021 18:15:07 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": { @@ -67,11 +67,11 @@ }, "StatusCode": 204, "ResponseHeaders": { - "Date": "Mon, 02 Aug 2021 18:01:51 GMT", - "ETag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A52.1141768Z\u0027\u0022", + "Date": "Wed, 01 Sep 2021 18:15:08 GMT", + "ETag": "W/\u0022datetime\u00272021-09-01T18%3A15%3A08.5852680Z\u0027\u0022", "Location": "https://seankaneprim.table.cosmos.azure.com/tableName2210495615(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", "Preference-Applied": "return-no-content", - "x-ms-request-id": "57236b2c-9f19-4dd1-8fdb-5ff492a6e51d" + "x-ms-request-id": "987a4b6b-a1de-4617-9489-fa8f446e016f" }, "ResponseBody": null }, @@ -86,15 +86,15 @@ "Accept": "application/json", "Accept-Encoding": "gzip", "Authorization": "Sanitized", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:01:52 GMT", + "User-Agent": "azsdk-go-aztable/v0.1.0 azsdk-go-azcore/v0.19.0 (go1.17; Windows_NT)", + "x-ms-date": "Wed, 01 Sep 2021 18:15:07 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": null, "StatusCode": 204, "ResponseHeaders": { - "Date": "Mon, 02 Aug 2021 18:01:52 GMT", - "x-ms-request-id": "49c94754-90b0-4ffd-a4db-f103ea89e96e" + "Date": "Wed, 01 Sep 2021 18:15:08 GMT", + "x-ms-request-id": "1b21c25f-22a6-4067-8853-535bfd37ef5d" }, "ResponseBody": null } diff --git a/sdk/tables/aztable/recordings/TestAddComplexEntity/TestAddComplexEntity_storage.json b/sdk/tables/aztable/recordings/TestAddComplexEntity/TestAddComplexEntity_storage.json index f3121e5c259a..72daa1157fab 100644 --- a/sdk/tables/aztable/recordings/TestAddComplexEntity/TestAddComplexEntity_storage.json +++ b/sdk/tables/aztable/recordings/TestAddComplexEntity/TestAddComplexEntity_storage.json @@ -14,8 +14,8 @@ "Content-Length": "35", "Content-Type": "application/json", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:01:51 GMT", + "User-Agent": "azsdk-go-aztable/v0.1.0 azsdk-go-azcore/v0.19.0 (go1.17; Windows_NT)", + "x-ms-date": "Wed, 01 Sep 2021 18:15:05 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": { @@ -25,7 +25,7 @@ "ResponseHeaders": { "Cache-Control": "no-cache", "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", - "Date": "Mon, 02 Aug 2021 18:01:49 GMT", + "Date": "Wed, 01 Sep 2021 18:15:06 GMT", "Location": "https://seankaneprim.table.core.windows.net/Tables(\u0027tableName1098819688\u0027)", "Server": [ "Windows-Azure-Table/1.0", @@ -33,7 +33,7 @@ ], "Transfer-Encoding": "chunked", "X-Content-Type-Options": "nosniff", - "x-ms-request-id": "a05b5ae4-9002-0057-70c8-874646000000", + "x-ms-request-id": "5c82026d-d002-0073-765d-9f294e000000", "x-ms-version": "2019-02-02" }, "ResponseBody": { @@ -56,8 +56,8 @@ "Content-Type": "application/json", "dataserviceversion": "3.0", "prefer": "return-no-content", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:01:51 GMT", + "User-Agent": "azsdk-go-aztable/v0.1.0 azsdk-go-azcore/v0.19.0 (go1.17; Windows_NT)", + "x-ms-date": "Wed, 01 Sep 2021 18:15:05 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": { @@ -76,8 +76,8 @@ "Cache-Control": "no-cache", "Content-Length": "0", "DataServiceId": "https://seankaneprim.table.core.windows.net/tableName1098819688(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", - "Date": "Mon, 02 Aug 2021 18:01:49 GMT", - "ETag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A50.7149383Z\u0027\u0022", + "Date": "Wed, 01 Sep 2021 18:15:06 GMT", + "ETag": "W/\u0022datetime\u00272021-09-01T18%3A15%3A06.9425059Z\u0027\u0022", "Location": "https://seankaneprim.table.core.windows.net/tableName1098819688(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", "Preference-Applied": "return-no-content", "Server": [ @@ -85,7 +85,7 @@ "Microsoft-HTTPAPI/2.0" ], "X-Content-Type-Options": "nosniff", - "x-ms-request-id": "a05b5b1b-9002-0057-24c8-874646000000", + "x-ms-request-id": "5c8202bf-d002-0073-435d-9f294e000000", "x-ms-version": "2019-02-02" }, "ResponseBody": null @@ -101,8 +101,8 @@ "Accept": "application/json", "Accept-Encoding": "gzip", "Authorization": "Sanitized", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:01:51 GMT", + "User-Agent": "azsdk-go-aztable/v0.1.0 azsdk-go-azcore/v0.19.0 (go1.17; Windows_NT)", + "x-ms-date": "Wed, 01 Sep 2021 18:15:06 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": null, @@ -110,13 +110,13 @@ "ResponseHeaders": { "Cache-Control": "no-cache", "Content-Length": "0", - "Date": "Mon, 02 Aug 2021 18:01:50 GMT", + "Date": "Wed, 01 Sep 2021 18:15:06 GMT", "Server": [ "Windows-Azure-Table/1.0", "Microsoft-HTTPAPI/2.0" ], "X-Content-Type-Options": "nosniff", - "x-ms-request-id": "a05b5b52-9002-0057-59c8-874646000000", + "x-ms-request-id": "5c82033b-d002-0073-375d-9f294e000000", "x-ms-version": "2019-02-02" }, "ResponseBody": null diff --git a/sdk/tables/aztable/recordings/TestEdmMarshalling/TestEdmMarshalling_cosmos.json b/sdk/tables/aztable/recordings/TestEdmMarshalling/TestEdmMarshalling_cosmos.json index 2ca4622d5385..29bbf564f70a 100644 --- a/sdk/tables/aztable/recordings/TestEdmMarshalling/TestEdmMarshalling_cosmos.json +++ b/sdk/tables/aztable/recordings/TestEdmMarshalling/TestEdmMarshalling_cosmos.json @@ -14,8 +14,8 @@ "Content-Length": "35", "Content-Type": "application/json", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:01:29 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:40:15 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": { @@ -24,11 +24,11 @@ "StatusCode": 201, "ResponseHeaders": { "Content-Type": "application/json; odata=minimalmetadata", - "Date": "Mon, 02 Aug 2021 18:01:29 GMT", - "ETag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A29.5478792Z\u0027\u0022", + "Date": "Tue, 31 Aug 2021 15:40:15 GMT", + "ETag": "W/\u0022datetime\u00272021-08-31T15%3A40%3A15.8942216Z\u0027\u0022", "Location": "https://seankaneprim.table.cosmos.azure.com/Tables(\u0027tableName3051201099\u0027)", "Transfer-Encoding": "chunked", - "x-ms-request-id": "7b2cd034-8393-4ed3-abd0-d8b2500f0f23" + "x-ms-request-id": "144206fb-53e0-40ba-859b-40d02225db2a" }, "ResponseBody": { "TableName": "tableName3051201099", @@ -50,8 +50,8 @@ "Content-Type": "application/json", "dataserviceversion": "3.0", "prefer": "return-no-content", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:01:30 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:40:15 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": { @@ -72,42 +72,42 @@ }, "StatusCode": 204, "ResponseHeaders": { - "Date": "Mon, 02 Aug 2021 18:01:29 GMT", - "ETag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A30.2675464Z\u0027\u0022", + "Date": "Tue, 31 Aug 2021 15:40:15 GMT", + "ETag": "W/\u0022datetime\u00272021-08-31T15%3A40%3A16.4027400Z\u0027\u0022", "Location": "https://seankaneprim.table.cosmos.azure.com/tableName3051201099(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", "Preference-Applied": "return-no-content", - "x-ms-request-id": "74214dc3-d3d6-4e72-a95f-b8aad84e7ee9" + "x-ms-request-id": "e8961774-e875-42cb-81a3-2f198414c32d" }, "ResponseBody": null }, { - "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/tableName3051201099(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)?%24format=application%2Fjson%3Bodata%3Dfullmetadata", + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/tableName3051201099(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)?%24format=application%2Fjson%3Bodata%3Dminimalmetadata", "RequestMethod": "GET", "RequestHeaders": { ":authority": "localhost:5001", ":method": "GET", - ":path": "/tableName3051201099(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)?%24format=application%2Fjson%3Bodata%3Dfullmetadata", + ":path": "/tableName3051201099(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)?%24format=application%2Fjson%3Bodata%3Dminimalmetadata", ":scheme": "https", "Accept": "application/json;odata=minimalmetadata", "Accept-Encoding": "gzip", "Authorization": "Sanitized", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:01:31 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:40:15 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { "Content-Type": "application/json; odata=minimalmetadata", - "Date": "Mon, 02 Aug 2021 18:01:30 GMT", - "ETag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A30.2675464Z\u0027\u0022", + "Date": "Tue, 31 Aug 2021 15:40:15 GMT", + "ETag": "W/\u0022datetime\u00272021-08-31T15%3A40%3A16.4027400Z\u0027\u0022", "Transfer-Encoding": "chunked", - "x-ms-request-id": "5ee6bbcb-a21b-4ee9-a45f-bfc8d2419181" + "x-ms-request-id": "414865c0-d0c6-407a-8a3e-180630b0fd8b" }, "ResponseBody": { "odata.metadata": "https://seankaneprim.table.cosmos.azure.com/tableName3051201099/$metadata#tableName3051201099/@Element", - "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A30.2675464Z\u0027\u0022", + "odata.etag": "W/\u0022datetime\u00272021-08-31T15%3A40%3A16.4027400Z\u0027\u0022", "Binary@odata.type": "Edm.Binary", "Binary": "U29tZUJpbmFyeQ==", "Bool": false, @@ -122,7 +122,7 @@ "PartitionKey": "partition", "RowKey": "1", "String": "test", - "Timestamp": "2021-08-02T18:01:30.2675464Z" + "Timestamp": "2021-08-31T15:40:16.4027400Z" } }, { @@ -136,15 +136,15 @@ "Accept": "application/json", "Accept-Encoding": "gzip", "Authorization": "Sanitized", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:01:31 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:40:16 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": null, "StatusCode": 204, "ResponseHeaders": { - "Date": "Mon, 02 Aug 2021 18:01:30 GMT", - "x-ms-request-id": "77321a9f-7b00-4e40-ba97-ce9878f881be" + "Date": "Tue, 31 Aug 2021 15:40:15 GMT", + "x-ms-request-id": "a6593c00-dc7f-46da-a35a-2d2f643a6323" }, "ResponseBody": null } diff --git a/sdk/tables/aztable/recordings/TestEdmMarshalling/TestEdmMarshalling_storage.json b/sdk/tables/aztable/recordings/TestEdmMarshalling/TestEdmMarshalling_storage.json index b651e9d4e6cc..d919c6a276fb 100644 --- a/sdk/tables/aztable/recordings/TestEdmMarshalling/TestEdmMarshalling_storage.json +++ b/sdk/tables/aztable/recordings/TestEdmMarshalling/TestEdmMarshalling_storage.json @@ -14,8 +14,8 @@ "Content-Length": "35", "Content-Type": "application/json", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:01:29 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:40:14 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": { @@ -25,7 +25,7 @@ "ResponseHeaders": { "Cache-Control": "no-cache", "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", - "Date": "Mon, 02 Aug 2021 18:01:27 GMT", + "Date": "Tue, 31 Aug 2021 15:40:14 GMT", "Location": "https://seankaneprim.table.core.windows.net/Tables(\u0027tableName1318965604\u0027)", "Server": [ "Windows-Azure-Table/1.0", @@ -33,7 +33,7 @@ ], "Transfer-Encoding": "chunked", "X-Content-Type-Options": "nosniff", - "x-ms-request-id": "a05b3516-9002-0057-63c8-874646000000", + "x-ms-request-id": "6b1bd41e-b002-0007-487e-9e1dbe000000", "x-ms-version": "2019-02-02" }, "ResponseBody": { @@ -56,8 +56,8 @@ "Content-Type": "application/json", "dataserviceversion": "3.0", "prefer": "return-no-content", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:01:29 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:40:14 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": { @@ -81,8 +81,8 @@ "Cache-Control": "no-cache", "Content-Length": "0", "DataServiceId": "https://seankaneprim.table.core.windows.net/tableName1318965604(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", - "Date": "Mon, 02 Aug 2021 18:01:27 GMT", - "ETag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A28.7214731Z\u0027\u0022", + "Date": "Tue, 31 Aug 2021 15:40:14 GMT", + "ETag": "W/\u0022datetime\u00272021-08-31T15%3A40%3A15.3632148Z\u0027\u0022", "Location": "https://seankaneprim.table.core.windows.net/tableName1318965604(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", "Preference-Applied": "return-no-content", "Server": [ @@ -90,54 +90,49 @@ "Microsoft-HTTPAPI/2.0" ], "X-Content-Type-Options": "nosniff", - "x-ms-request-id": "a05b3584-9002-0057-1bc8-874646000000", + "x-ms-request-id": "6b1bd45e-b002-0007-037e-9e1dbe000000", "x-ms-version": "2019-02-02" }, "ResponseBody": null }, { - "RequestUri": "https://fakestorageaccount.table.core.windows.net/tableName1318965604(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)?%24format=application%2Fjson%3Bodata%3Dfullmetadata", + "RequestUri": "https://fakestorageaccount.table.core.windows.net/tableName1318965604(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)?%24format=application%2Fjson%3Bodata%3Dminimalmetadata", "RequestMethod": "GET", "RequestHeaders": { ":authority": "localhost:5001", ":method": "GET", - ":path": "/tableName1318965604(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)?%24format=application%2Fjson%3Bodata%3Dfullmetadata", + ":path": "/tableName1318965604(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)?%24format=application%2Fjson%3Bodata%3Dminimalmetadata", ":scheme": "https", "Accept": "application/json;odata=minimalmetadata", "Accept-Encoding": "gzip", "Authorization": "Sanitized", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:01:29 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:40:14 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", - "Content-Type": "application/json; odata=fullmetadata; streaming=true; charset=utf-8", - "Date": "Mon, 02 Aug 2021 18:01:28 GMT", - "ETag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A28.7214731Z\u0027\u0022", + "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", + "Date": "Tue, 31 Aug 2021 15:40:15 GMT", + "ETag": "W/\u0022datetime\u00272021-08-31T15%3A40%3A15.3632148Z\u0027\u0022", "Server": [ "Windows-Azure-Table/1.0", "Microsoft-HTTPAPI/2.0" ], "Transfer-Encoding": "chunked", - "Vary": "Origin", "X-Content-Type-Options": "nosniff", - "x-ms-request-id": "a05b35e2-9002-0057-4cc8-874646000000", + "x-ms-request-id": "6b1bd493-b002-0007-317e-9e1dbe000000", "x-ms-version": "2019-02-02" }, "ResponseBody": { "odata.metadata": "https://seankaneprim.table.core.windows.net/$metadata#tableName1318965604/@Element", - "odata.type": "seankaneprim.tableName1318965604", - "odata.id": "https://seankaneprim.table.core.windows.net/tableName1318965604(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", - "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A28.7214731Z\u0027\u0022", - "odata.editLink": "tableName1318965604(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", + "odata.etag": "W/\u0022datetime\u00272021-08-31T15%3A40%3A15.3632148Z\u0027\u0022", "PartitionKey": "partition", "RowKey": "1", - "Timestamp@odata.type": "Edm.DateTime", - "Timestamp": "2021-08-02T18:01:28.7214731Z", + "Timestamp": "2021-08-31T15:40:15.3632148Z", "Binary@odata.type": "Edm.Binary", "Binary": "U29tZUJpbmFyeQ==", "Bool": false, @@ -163,8 +158,8 @@ "Accept": "application/json", "Accept-Encoding": "gzip", "Authorization": "Sanitized", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:01:29 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:40:15 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": null, @@ -172,13 +167,13 @@ "ResponseHeaders": { "Cache-Control": "no-cache", "Content-Length": "0", - "Date": "Mon, 02 Aug 2021 18:01:28 GMT", + "Date": "Tue, 31 Aug 2021 15:40:15 GMT", "Server": [ "Windows-Azure-Table/1.0", "Microsoft-HTTPAPI/2.0" ], "X-Content-Type-Options": "nosniff", - "x-ms-request-id": "a05b36d0-9002-0057-43c8-874646000000", + "x-ms-request-id": "6b1bd4bc-b002-0007-577e-9e1dbe000000", "x-ms-version": "2019-02-02" }, "ResponseBody": null diff --git a/sdk/tables/aztable/recordings/TestInsertEntity/TestInsertEntity_cosmos.json b/sdk/tables/aztable/recordings/TestInsertEntity/TestInsertEntity_cosmos.json index bdf17f03f44c..7dcda909dc69 100644 --- a/sdk/tables/aztable/recordings/TestInsertEntity/TestInsertEntity_cosmos.json +++ b/sdk/tables/aztable/recordings/TestInsertEntity/TestInsertEntity_cosmos.json @@ -14,8 +14,8 @@ "Content-Length": "35", "Content-Type": "application/json", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:01:59 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:41:13 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": { @@ -24,11 +24,11 @@ "StatusCode": 201, "ResponseHeaders": { "Content-Type": "application/json; odata=minimalmetadata", - "Date": "Mon, 02 Aug 2021 18:01:58 GMT", - "ETag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A58.7090440Z\u0027\u0022", + "Date": "Tue, 31 Aug 2021 15:41:13 GMT", + "ETag": "W/\u0022datetime\u00272021-08-31T15%3A41%3A14.0265992Z\u0027\u0022", "Location": "https://seankaneprim.table.cosmos.azure.com/Tables(\u0027tableName3858182091\u0027)", "Transfer-Encoding": "chunked", - "x-ms-request-id": "482077b6-f28f-4226-b3f7-e577806e4b28" + "x-ms-request-id": "71f2bc06-4933-4f29-bfa1-dfeaf3e8ecc4" }, "ResponseBody": { "TableName": "tableName3858182091", @@ -49,8 +49,8 @@ "Content-Length": "125", "Content-Type": "application/json", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:01:59 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:41:13 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": { @@ -64,46 +64,46 @@ "StatusCode": 204, "ResponseHeaders": { "Content-Type": "application/json", - "Date": "Mon, 02 Aug 2021 18:01:59 GMT", - "ETag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A59.3616392Z\u0027\u0022", - "x-ms-request-id": "89d03d66-f5a9-48bd-9b79-630bce7a3c57" + "Date": "Tue, 31 Aug 2021 15:41:13 GMT", + "ETag": "W/\u0022datetime\u00272021-08-31T15%3A41%3A14.4760328Z\u0027\u0022", + "x-ms-request-id": "634e9cb4-58d8-4b5e-a293-bf0d32c05b0a" }, "ResponseBody": null }, { - "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/tableName3858182091(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/tableName3858182091(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)?%24format=application%2Fjson%3Bodata%3Dminimalmetadata", "RequestMethod": "GET", "RequestHeaders": { ":authority": "localhost:5001", ":method": "GET", - ":path": "/tableName3858182091(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", + ":path": "/tableName3858182091(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)?%24format=application%2Fjson%3Bodata%3Dminimalmetadata", ":scheme": "https", "Accept": "application/json;odata=minimalmetadata", "Accept-Encoding": "gzip", "Authorization": "Sanitized", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:02:00 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:41:14 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { "Content-Type": "application/json; odata=minimalmetadata", - "Date": "Mon, 02 Aug 2021 18:01:59 GMT", - "ETag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A59.3616392Z\u0027\u0022", + "Date": "Tue, 31 Aug 2021 15:41:13 GMT", + "ETag": "W/\u0022datetime\u00272021-08-31T15%3A41%3A14.4760328Z\u0027\u0022", "Transfer-Encoding": "chunked", - "x-ms-request-id": "a1f6a398-213c-4098-ba60-2ea73fae92f6" + "x-ms-request-id": "2a3f3717-2197-4fd5-bb4e-7770188b4e60" }, "ResponseBody": { "odata.metadata": "https://seankaneprim.table.cosmos.azure.com/tableName3858182091/$metadata#tableName3858182091/@Element", - "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A59.3616392Z\u0027\u0022", + "odata.etag": "W/\u0022datetime\u00272021-08-31T15%3A41%3A14.4760328Z\u0027\u0022", "PartitionKey": "partition", "RowKey": "1", "Bool": true, "Integer": 1, "String": "some string 1", - "Timestamp": "2021-08-02T18:01:59.3616392Z" + "Timestamp": "2021-08-31T15:41:14.4760328Z" } }, { @@ -120,8 +120,8 @@ "Content-Length": "100", "Content-Type": "application/json", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:02:00 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:41:14 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": { @@ -134,46 +134,46 @@ "StatusCode": 204, "ResponseHeaders": { "Content-Type": "application/json", - "Date": "Mon, 02 Aug 2021 18:01:59 GMT", - "ETag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A59.6248072Z\u0027\u0022", - "x-ms-request-id": "fb03fef2-48fd-4282-9ccd-26143ecc074d" + "Date": "Tue, 31 Aug 2021 15:41:13 GMT", + "ETag": "W/\u0022datetime\u00272021-08-31T15%3A41%3A14.6962952Z\u0027\u0022", + "x-ms-request-id": "30006bbd-f612-4572-9e13-750ecbfdb7e7" }, "ResponseBody": null }, { - "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/tableName3858182091()?%24filter=RowKey\u002Beq\u002B%271%27", + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/tableName3858182091()?%24filter=RowKey\u002Beq\u002B%271%27\u0026%24format=application%2Fjson%3Bodata%3Dminimalmetadata", "RequestMethod": "GET", "RequestHeaders": { ":authority": "localhost:5001", ":method": "GET", - ":path": "/tableName3858182091()?%24filter=RowKey\u002Beq\u002B%271%27", + ":path": "/tableName3858182091()?%24filter=RowKey\u002Beq\u002B%271%27\u0026%24format=application%2Fjson%3Bodata%3Dminimalmetadata", ":scheme": "https", "Accept": "application/json;odata=minimalmetadata", "Accept-Encoding": "gzip", "Authorization": "Sanitized", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:02:00 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:41:14 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { "Content-Type": "application/json; odata=minimalmetadata", - "Date": "Mon, 02 Aug 2021 18:01:59 GMT", + "Date": "Tue, 31 Aug 2021 15:41:13 GMT", "Transfer-Encoding": "chunked", - "x-ms-request-id": "78b06880-c426-4787-a6b6-8282f9b46e98" + "x-ms-request-id": "4b37eef2-a8f8-4bcf-91de-ea5540b31a3b" }, "ResponseBody": { "value": [ { - "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A59.6248072Z\u0027\u0022", + "odata.etag": "W/\u0022datetime\u00272021-08-31T15%3A41%3A14.6962952Z\u0027\u0022", "PartitionKey": "partition", "RowKey": "1", "Integer": 1, "MergeProperty": "foo", "String": "some string 1", - "Timestamp": "2021-08-02T18:01:59.6248072Z" + "Timestamp": "2021-08-31T15:41:14.6962952Z" } ], "odata.metadata": "https://seankaneprim.table.cosmos.azure.com/$metadata#tableName3858182091" @@ -190,15 +190,15 @@ "Accept": "application/json", "Accept-Encoding": "gzip", "Authorization": "Sanitized", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:02:00 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:41:14 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": null, "StatusCode": 204, "ResponseHeaders": { - "Date": "Mon, 02 Aug 2021 18:01:59 GMT", - "x-ms-request-id": "9156c902-9c0b-4ef7-aebf-f44adef9cda5" + "Date": "Tue, 31 Aug 2021 15:41:14 GMT", + "x-ms-request-id": "67c4f191-08a1-4c70-adae-ac15e4952ab3" }, "ResponseBody": null } diff --git a/sdk/tables/aztable/recordings/TestInsertEntity/TestInsertEntity_storage.json b/sdk/tables/aztable/recordings/TestInsertEntity/TestInsertEntity_storage.json index 830e3e68491c..f38ea8b059be 100644 --- a/sdk/tables/aztable/recordings/TestInsertEntity/TestInsertEntity_storage.json +++ b/sdk/tables/aztable/recordings/TestInsertEntity/TestInsertEntity_storage.json @@ -14,8 +14,8 @@ "Content-Length": "35", "Content-Type": "application/json", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:01:58 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:41:12 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": { @@ -25,7 +25,7 @@ "ResponseHeaders": { "Cache-Control": "no-cache", "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", - "Date": "Mon, 02 Aug 2021 18:01:56 GMT", + "Date": "Tue, 31 Aug 2021 15:41:12 GMT", "Location": "https://seankaneprim.table.core.windows.net/Tables(\u0027tableName2262274532\u0027)", "Server": [ "Windows-Azure-Table/1.0", @@ -33,7 +33,7 @@ ], "Transfer-Encoding": "chunked", "X-Content-Type-Options": "nosniff", - "x-ms-request-id": "a05b646c-9002-0057-0dc8-874646000000", + "x-ms-request-id": "6b1c3269-b002-0007-357e-9e1dbe000000", "x-ms-version": "2019-02-02" }, "ResponseBody": { @@ -55,8 +55,8 @@ "Content-Length": "125", "Content-Type": "application/json", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:01:58 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:41:12 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": { @@ -71,32 +71,32 @@ "ResponseHeaders": { "Cache-Control": "no-cache", "Content-Length": "0", - "Date": "Mon, 02 Aug 2021 18:01:56 GMT", - "ETag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A57.8187862Z\u0027\u0022", + "Date": "Tue, 31 Aug 2021 15:41:12 GMT", + "ETag": "W/\u0022datetime\u00272021-08-31T15%3A41%3A13.3551092Z\u0027\u0022", "Server": [ "Windows-Azure-Table/1.0", "Microsoft-HTTPAPI/2.0" ], "X-Content-Type-Options": "nosniff", - "x-ms-request-id": "a05b6487-9002-0057-27c8-874646000000", + "x-ms-request-id": "6b1c3282-b002-0007-4b7e-9e1dbe000000", "x-ms-version": "2019-02-02" }, "ResponseBody": null }, { - "RequestUri": "https://fakestorageaccount.table.core.windows.net/tableName2262274532(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", + "RequestUri": "https://fakestorageaccount.table.core.windows.net/tableName2262274532(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)?%24format=application%2Fjson%3Bodata%3Dminimalmetadata", "RequestMethod": "GET", "RequestHeaders": { ":authority": "localhost:5001", ":method": "GET", - ":path": "/tableName2262274532(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", + ":path": "/tableName2262274532(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)?%24format=application%2Fjson%3Bodata%3Dminimalmetadata", ":scheme": "https", "Accept": "application/json;odata=minimalmetadata", "Accept-Encoding": "gzip", "Authorization": "Sanitized", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:01:58 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:41:12 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": null, @@ -104,24 +104,23 @@ "ResponseHeaders": { "Cache-Control": "no-cache", "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", - "Date": "Mon, 02 Aug 2021 18:01:57 GMT", - "ETag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A57.8187862Z\u0027\u0022", + "Date": "Tue, 31 Aug 2021 15:41:13 GMT", + "ETag": "W/\u0022datetime\u00272021-08-31T15%3A41%3A13.3551092Z\u0027\u0022", "Server": [ "Windows-Azure-Table/1.0", "Microsoft-HTTPAPI/2.0" ], "Transfer-Encoding": "chunked", - "Vary": "Origin", "X-Content-Type-Options": "nosniff", - "x-ms-request-id": "a05b64aa-9002-0057-4ac8-874646000000", + "x-ms-request-id": "6b1c32ab-b002-0007-747e-9e1dbe000000", "x-ms-version": "2019-02-02" }, "ResponseBody": { "odata.metadata": "https://seankaneprim.table.core.windows.net/$metadata#tableName2262274532/@Element", - "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A57.8187862Z\u0027\u0022", + "odata.etag": "W/\u0022datetime\u00272021-08-31T15%3A41%3A13.3551092Z\u0027\u0022", "PartitionKey": "partition", "RowKey": "1", - "Timestamp": "2021-08-02T18:01:57.8187862Z", + "Timestamp": "2021-08-31T15:41:13.3551092Z", "Bool": true, "Integer": 1, "String": "some string 1" @@ -141,8 +140,8 @@ "Content-Length": "100", "Content-Type": "application/json", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:01:58 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:41:13 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": { @@ -156,32 +155,32 @@ "ResponseHeaders": { "Cache-Control": "no-cache", "Content-Length": "0", - "Date": "Mon, 02 Aug 2021 18:01:57 GMT", - "ETag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A58.0749701Z\u0027\u0022", + "Date": "Tue, 31 Aug 2021 15:41:13 GMT", + "ETag": "W/\u0022datetime\u00272021-08-31T15%3A41%3A13.5582522Z\u0027\u0022", "Server": [ "Windows-Azure-Table/1.0", "Microsoft-HTTPAPI/2.0" ], "X-Content-Type-Options": "nosniff", - "x-ms-request-id": "a05b64c4-9002-0057-62c8-874646000000", + "x-ms-request-id": "6b1c32e1-b002-0007-287e-9e1dbe000000", "x-ms-version": "2019-02-02" }, "ResponseBody": null }, { - "RequestUri": "https://fakestorageaccount.table.core.windows.net/tableName2262274532()?%24filter=RowKey\u002Beq\u002B%271%27", + "RequestUri": "https://fakestorageaccount.table.core.windows.net/tableName2262274532()?%24filter=RowKey\u002Beq\u002B%271%27\u0026%24format=application%2Fjson%3Bodata%3Dminimalmetadata", "RequestMethod": "GET", "RequestHeaders": { ":authority": "localhost:5001", ":method": "GET", - ":path": "/tableName2262274532()?%24filter=RowKey\u002Beq\u002B%271%27", + ":path": "/tableName2262274532()?%24filter=RowKey\u002Beq\u002B%271%27\u0026%24format=application%2Fjson%3Bodata%3Dminimalmetadata", ":scheme": "https", "Accept": "application/json;odata=minimalmetadata", "Accept-Encoding": "gzip", "Authorization": "Sanitized", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:01:58 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:41:13 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": null, @@ -189,25 +188,24 @@ "ResponseHeaders": { "Cache-Control": "no-cache", "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", - "Date": "Mon, 02 Aug 2021 18:01:57 GMT", + "Date": "Tue, 31 Aug 2021 15:41:13 GMT", "Server": [ "Windows-Azure-Table/1.0", "Microsoft-HTTPAPI/2.0" ], "Transfer-Encoding": "chunked", - "Vary": "Origin", "X-Content-Type-Options": "nosniff", - "x-ms-request-id": "a05b64ea-9002-0057-05c8-874646000000", + "x-ms-request-id": "6b1c3319-b002-0007-607e-9e1dbe000000", "x-ms-version": "2019-02-02" }, "ResponseBody": { "odata.metadata": "https://seankaneprim.table.core.windows.net/$metadata#tableName2262274532", "value": [ { - "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A58.0749701Z\u0027\u0022", + "odata.etag": "W/\u0022datetime\u00272021-08-31T15%3A41%3A13.5582522Z\u0027\u0022", "PartitionKey": "partition", "RowKey": "1", - "Timestamp": "2021-08-02T18:01:58.0749701Z", + "Timestamp": "2021-08-31T15:41:13.5582522Z", "Integer": 1, "MergeProperty": "foo", "String": "some string 1" @@ -226,8 +224,8 @@ "Accept": "application/json", "Accept-Encoding": "gzip", "Authorization": "Sanitized", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:01:58 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:41:13 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": null, @@ -235,13 +233,13 @@ "ResponseHeaders": { "Cache-Control": "no-cache", "Content-Length": "0", - "Date": "Mon, 02 Aug 2021 18:01:57 GMT", + "Date": "Tue, 31 Aug 2021 15:41:13 GMT", "Server": [ "Windows-Azure-Table/1.0", "Microsoft-HTTPAPI/2.0" ], "X-Content-Type-Options": "nosniff", - "x-ms-request-id": "a05b650c-9002-0057-26c8-874646000000", + "x-ms-request-id": "6b1c334e-b002-0007-147e-9e1dbe000000", "x-ms-version": "2019-02-02" }, "ResponseBody": null diff --git a/sdk/tables/aztable/recordings/TestMergeEntity/TestMergeEntity_cosmos.json b/sdk/tables/aztable/recordings/TestMergeEntity/TestMergeEntity_cosmos.json index 013b94f70928..4825c5d1a677 100644 --- a/sdk/tables/aztable/recordings/TestMergeEntity/TestMergeEntity_cosmos.json +++ b/sdk/tables/aztable/recordings/TestMergeEntity/TestMergeEntity_cosmos.json @@ -14,8 +14,8 @@ "Content-Length": "35", "Content-Type": "application/json", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:01:56 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:40:49 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": { @@ -24,11 +24,11 @@ "StatusCode": 201, "ResponseHeaders": { "Content-Type": "application/json; odata=minimalmetadata", - "Date": "Mon, 02 Aug 2021 18:01:56 GMT", - "ETag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A56.2060808Z\u0027\u0022", + "Date": "Tue, 31 Aug 2021 15:40:49 GMT", + "ETag": "W/\u0022datetime\u00272021-08-31T15%3A40%3A50.4118280Z\u0027\u0022", "Location": "https://seankaneprim.table.cosmos.azure.com/Tables(\u0027tableName1856152197\u0027)", "Transfer-Encoding": "chunked", - "x-ms-request-id": "946f7f2e-5215-4c5d-89de-a2789163a1fb" + "x-ms-request-id": "e270dc16-1517-430d-8682-fbe4afa7db8a" }, "ResponseBody": { "TableName": "tableName1856152197", @@ -50,8 +50,8 @@ "Content-Type": "application/json", "dataserviceversion": "3.0", "prefer": "return-no-content", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:01:57 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:40:50 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": { @@ -64,48 +64,48 @@ }, "StatusCode": 204, "ResponseHeaders": { - "Date": "Mon, 02 Aug 2021 18:01:56 GMT", - "ETag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A56.8062472Z\u0027\u0022", + "Date": "Tue, 31 Aug 2021 15:40:49 GMT", + "ETag": "W/\u0022datetime\u00272021-08-31T15%3A40%3A50.9155336Z\u0027\u0022", "Location": "https://seankaneprim.table.cosmos.azure.com/tableName1856152197(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", "Preference-Applied": "return-no-content", - "x-ms-request-id": "3a247460-4436-4ee0-b000-ba35e8e2b77b" + "x-ms-request-id": "8e05d0d0-46d1-453c-a9d7-fa060ea7e166" }, "ResponseBody": null }, { - "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/tableName1856152197(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/tableName1856152197(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)?%24format=application%2Fjson%3Bodata%3Dminimalmetadata", "RequestMethod": "GET", "RequestHeaders": { ":authority": "localhost:5001", ":method": "GET", - ":path": "/tableName1856152197(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", + ":path": "/tableName1856152197(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)?%24format=application%2Fjson%3Bodata%3Dminimalmetadata", ":scheme": "https", "Accept": "application/json;odata=minimalmetadata", "Accept-Encoding": "gzip", "Authorization": "Sanitized", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:01:57 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:40:50 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { "Content-Type": "application/json; odata=minimalmetadata", - "Date": "Mon, 02 Aug 2021 18:01:56 GMT", - "ETag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A56.8062472Z\u0027\u0022", + "Date": "Tue, 31 Aug 2021 15:40:50 GMT", + "ETag": "W/\u0022datetime\u00272021-08-31T15%3A40%3A50.9155336Z\u0027\u0022", "Transfer-Encoding": "chunked", - "x-ms-request-id": "318ab877-7704-4c9e-aa5a-fe2a4fe44e87" + "x-ms-request-id": "b852721a-3f8a-4e8a-822f-1f4d73cd68db" }, "ResponseBody": { "odata.metadata": "https://seankaneprim.table.cosmos.azure.com/tableName1856152197/$metadata#tableName1856152197/@Element", - "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A56.8062472Z\u0027\u0022", + "odata.etag": "W/\u0022datetime\u00272021-08-31T15%3A40%3A50.9155336Z\u0027\u0022", "Bool": true, "Integer": 1, "PartitionKey": "partition", "RowKey": "1", "String": "some string 1", - "Timestamp": "2021-08-02T18:01:56.8062472Z" + "Timestamp": "2021-08-31T15:40:50.9155336Z" } }, { @@ -123,9 +123,9 @@ "Content-Type": "application/json", "dataserviceversion": "3.0", "If-Match": "*", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", "x-http-method": "MERGE", - "x-ms-date": "Mon, 02 Aug 2021 18:01:57 GMT", + "x-ms-date": "Tue, 31 Aug 2021 15:40:50 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": { @@ -139,47 +139,47 @@ }, "StatusCode": 204, "ResponseHeaders": { - "Date": "Mon, 02 Aug 2021 18:01:56 GMT", - "ETag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A57.0623496Z\u0027\u0022", - "x-ms-request-id": "4904d9ab-efe3-4eac-bbfc-6c9dc2718e11" + "Date": "Tue, 31 Aug 2021 15:40:50 GMT", + "ETag": "W/\u0022datetime\u00272021-08-31T15%3A40%3A51.1515656Z\u0027\u0022", + "x-ms-request-id": "d15e5e61-8061-44af-938d-b834329a2ef3" }, "ResponseBody": null }, { - "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/tableName1856152197()?%24filter=RowKey\u002Beq\u002B%271%27", + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/tableName1856152197()?%24filter=RowKey\u002Beq\u002B%271%27\u0026%24format=application%2Fjson%3Bodata%3Dminimalmetadata", "RequestMethod": "GET", "RequestHeaders": { ":authority": "localhost:5001", ":method": "GET", - ":path": "/tableName1856152197()?%24filter=RowKey\u002Beq\u002B%271%27", + ":path": "/tableName1856152197()?%24filter=RowKey\u002Beq\u002B%271%27\u0026%24format=application%2Fjson%3Bodata%3Dminimalmetadata", ":scheme": "https", "Accept": "application/json;odata=minimalmetadata", "Accept-Encoding": "gzip", "Authorization": "Sanitized", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:01:57 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:40:50 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { "Content-Type": "application/json; odata=minimalmetadata", - "Date": "Mon, 02 Aug 2021 18:01:56 GMT", + "Date": "Tue, 31 Aug 2021 15:40:50 GMT", "Transfer-Encoding": "chunked", - "x-ms-request-id": "8a0be61d-e8a0-4976-b86c-de540766c7ba" + "x-ms-request-id": "7aa34437-662e-4b59-8fcb-998538262d78" }, "ResponseBody": { "value": [ { - "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A57.0623496Z\u0027\u0022", + "odata.etag": "W/\u0022datetime\u00272021-08-31T15%3A40%3A51.1515656Z\u0027\u0022", "Bool": true, "Integer": 1, "PartitionKey": "partition", "RowKey": "1", "String": "some string 1", "MergeProperty": "foo", - "Timestamp": "2021-08-02T18:01:57.0623496Z" + "Timestamp": "2021-08-31T15:40:51.1515656Z" } ], "odata.metadata": "https://seankaneprim.table.cosmos.azure.com/$metadata#tableName1856152197" @@ -196,15 +196,15 @@ "Accept": "application/json", "Accept-Encoding": "gzip", "Authorization": "Sanitized", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:01:57 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:40:50 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": null, "StatusCode": 204, "ResponseHeaders": { - "Date": "Mon, 02 Aug 2021 18:01:57 GMT", - "x-ms-request-id": "9f0c5e31-feaf-482d-88e9-b02d296a8c6f" + "Date": "Tue, 31 Aug 2021 15:40:50 GMT", + "x-ms-request-id": "ca5648da-68d8-4292-b484-27400b6f3c52" }, "ResponseBody": null } diff --git a/sdk/tables/aztable/recordings/TestMergeEntity/TestMergeEntity_storage.json b/sdk/tables/aztable/recordings/TestMergeEntity/TestMergeEntity_storage.json index 7cce51c0f7a8..d9ee3d0b10a1 100644 --- a/sdk/tables/aztable/recordings/TestMergeEntity/TestMergeEntity_storage.json +++ b/sdk/tables/aztable/recordings/TestMergeEntity/TestMergeEntity_storage.json @@ -14,8 +14,8 @@ "Content-Length": "35", "Content-Type": "application/json", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:01:55 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:40:49 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": { @@ -25,7 +25,7 @@ "ResponseHeaders": { "Cache-Control": "no-cache", "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", - "Date": "Mon, 02 Aug 2021 18:01:54 GMT", + "Date": "Tue, 31 Aug 2021 15:40:49 GMT", "Location": "https://seankaneprim.table.core.windows.net/Tables(\u0027tableName1539808374\u0027)", "Server": [ "Windows-Azure-Table/1.0", @@ -33,7 +33,7 @@ ], "Transfer-Encoding": "chunked", "X-Content-Type-Options": "nosniff", - "x-ms-request-id": "a05b60f4-9002-0057-3ac8-874646000000", + "x-ms-request-id": "6b1c0bab-b002-0007-027e-9e1dbe000000", "x-ms-version": "2019-02-02" }, "ResponseBody": { @@ -56,8 +56,8 @@ "Content-Type": "application/json", "dataserviceversion": "3.0", "prefer": "return-no-content", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:01:55 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:40:49 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": { @@ -73,8 +73,8 @@ "Cache-Control": "no-cache", "Content-Length": "0", "DataServiceId": "https://seankaneprim.table.core.windows.net/tableName1539808374(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", - "Date": "Mon, 02 Aug 2021 18:01:54 GMT", - "ETag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A55.3111703Z\u0027\u0022", + "Date": "Tue, 31 Aug 2021 15:40:49 GMT", + "ETag": "W/\u0022datetime\u00272021-08-31T15%3A40%3A49.6724407Z\u0027\u0022", "Location": "https://seankaneprim.table.core.windows.net/tableName1539808374(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", "Preference-Applied": "return-no-content", "Server": [ @@ -82,25 +82,25 @@ "Microsoft-HTTPAPI/2.0" ], "X-Content-Type-Options": "nosniff", - "x-ms-request-id": "a05b6144-9002-0057-06c8-874646000000", + "x-ms-request-id": "6b1c0be1-b002-0007-357e-9e1dbe000000", "x-ms-version": "2019-02-02" }, "ResponseBody": null }, { - "RequestUri": "https://fakestorageaccount.table.core.windows.net/tableName1539808374(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", + "RequestUri": "https://fakestorageaccount.table.core.windows.net/tableName1539808374(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)?%24format=application%2Fjson%3Bodata%3Dminimalmetadata", "RequestMethod": "GET", "RequestHeaders": { ":authority": "localhost:5001", ":method": "GET", - ":path": "/tableName1539808374(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", + ":path": "/tableName1539808374(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)?%24format=application%2Fjson%3Bodata%3Dminimalmetadata", ":scheme": "https", "Accept": "application/json;odata=minimalmetadata", "Accept-Encoding": "gzip", "Authorization": "Sanitized", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:01:56 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:40:49 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": null, @@ -108,24 +108,23 @@ "ResponseHeaders": { "Cache-Control": "no-cache", "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", - "Date": "Mon, 02 Aug 2021 18:01:54 GMT", - "ETag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A55.3111703Z\u0027\u0022", + "Date": "Tue, 31 Aug 2021 15:40:49 GMT", + "ETag": "W/\u0022datetime\u00272021-08-31T15%3A40%3A49.6724407Z\u0027\u0022", "Server": [ "Windows-Azure-Table/1.0", "Microsoft-HTTPAPI/2.0" ], "Transfer-Encoding": "chunked", - "Vary": "Origin", "X-Content-Type-Options": "nosniff", - "x-ms-request-id": "a05b6179-9002-0057-3ac8-874646000000", + "x-ms-request-id": "6b1c0c0b-b002-0007-5e7e-9e1dbe000000", "x-ms-version": "2019-02-02" }, "ResponseBody": { "odata.metadata": "https://seankaneprim.table.core.windows.net/$metadata#tableName1539808374/@Element", - "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A55.3111703Z\u0027\u0022", + "odata.etag": "W/\u0022datetime\u00272021-08-31T15%3A40%3A49.6724407Z\u0027\u0022", "PartitionKey": "partition", "RowKey": "1", - "Timestamp": "2021-08-02T18:01:55.3111703Z", + "Timestamp": "2021-08-31T15:40:49.6724407Z", "Bool": true, "Integer": 1, "String": "some string 1" @@ -146,8 +145,8 @@ "Content-Type": "application/json", "dataserviceversion": "3.0", "If-Match": "*", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:01:56 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:40:49 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": { @@ -163,32 +162,32 @@ "ResponseHeaders": { "Cache-Control": "no-cache", "Content-Length": "0", - "Date": "Mon, 02 Aug 2021 18:01:54 GMT", - "ETag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A55.5861844Z\u0027\u0022", + "Date": "Tue, 31 Aug 2021 15:40:49 GMT", + "ETag": "W/\u0022datetime\u00272021-08-31T15%3A40%3A49.8696359Z\u0027\u0022", "Server": [ "Windows-Azure-Table/1.0", "Microsoft-HTTPAPI/2.0" ], "X-Content-Type-Options": "nosniff", - "x-ms-request-id": "a05b61ac-9002-0057-6dc8-874646000000", + "x-ms-request-id": "6b1c0c3f-b002-0007-107e-9e1dbe000000", "x-ms-version": "2019-02-02" }, "ResponseBody": null }, { - "RequestUri": "https://fakestorageaccount.table.core.windows.net/tableName1539808374()?%24filter=RowKey\u002Beq\u002B%271%27", + "RequestUri": "https://fakestorageaccount.table.core.windows.net/tableName1539808374()?%24filter=RowKey\u002Beq\u002B%271%27\u0026%24format=application%2Fjson%3Bodata%3Dminimalmetadata", "RequestMethod": "GET", "RequestHeaders": { ":authority": "localhost:5001", ":method": "GET", - ":path": "/tableName1539808374()?%24filter=RowKey\u002Beq\u002B%271%27", + ":path": "/tableName1539808374()?%24filter=RowKey\u002Beq\u002B%271%27\u0026%24format=application%2Fjson%3Bodata%3Dminimalmetadata", ":scheme": "https", "Accept": "application/json;odata=minimalmetadata", "Accept-Encoding": "gzip", "Authorization": "Sanitized", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:01:56 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:40:49 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": null, @@ -196,25 +195,24 @@ "ResponseHeaders": { "Cache-Control": "no-cache", "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", - "Date": "Mon, 02 Aug 2021 18:01:54 GMT", + "Date": "Tue, 31 Aug 2021 15:40:49 GMT", "Server": [ "Windows-Azure-Table/1.0", "Microsoft-HTTPAPI/2.0" ], "Transfer-Encoding": "chunked", - "Vary": "Origin", "X-Content-Type-Options": "nosniff", - "x-ms-request-id": "a05b61da-9002-0057-19c8-874646000000", + "x-ms-request-id": "6b1c0c87-b002-0007-557e-9e1dbe000000", "x-ms-version": "2019-02-02" }, "ResponseBody": { "odata.metadata": "https://seankaneprim.table.core.windows.net/$metadata#tableName1539808374", "value": [ { - "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A01%3A55.5861844Z\u0027\u0022", + "odata.etag": "W/\u0022datetime\u00272021-08-31T15%3A40%3A49.8696359Z\u0027\u0022", "PartitionKey": "partition", "RowKey": "1", - "Timestamp": "2021-08-02T18:01:55.5861844Z", + "Timestamp": "2021-08-31T15:40:49.8696359Z", "Bool": true, "Integer": 1, "MergeProperty": "foo", @@ -234,8 +232,8 @@ "Accept": "application/json", "Accept-Encoding": "gzip", "Authorization": "Sanitized", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:01:56 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:40:49 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": null, @@ -243,13 +241,13 @@ "ResponseHeaders": { "Cache-Control": "no-cache", "Content-Length": "0", - "Date": "Mon, 02 Aug 2021 18:01:55 GMT", + "Date": "Tue, 31 Aug 2021 15:40:49 GMT", "Server": [ "Windows-Azure-Table/1.0", "Microsoft-HTTPAPI/2.0" ], "X-Content-Type-Options": "nosniff", - "x-ms-request-id": "a05b621b-9002-0057-56c8-874646000000", + "x-ms-request-id": "6b1c0cbf-b002-0007-0a7e-9e1dbe000000", "x-ms-version": "2019-02-02" }, "ResponseBody": null diff --git a/sdk/tables/aztable/recordings/TestQueryComplexEntity/TestQueryComplexEntity_cosmos.json b/sdk/tables/aztable/recordings/TestQueryComplexEntity/TestQueryComplexEntity_cosmos.json index fb9854048349..28a361f121ca 100644 --- a/sdk/tables/aztable/recordings/TestQueryComplexEntity/TestQueryComplexEntity_cosmos.json +++ b/sdk/tables/aztable/recordings/TestQueryComplexEntity/TestQueryComplexEntity_cosmos.json @@ -14,8 +14,8 @@ "Content-Length": "34", "Content-Type": "application/json", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:02:05 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:42:06 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": { @@ -24,11 +24,11 @@ "StatusCode": 201, "ResponseHeaders": { "Content-Type": "application/json; odata=minimalmetadata", - "Date": "Mon, 02 Aug 2021 18:02:04 GMT", - "ETag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A04.6192648Z\u0027\u0022", + "Date": "Tue, 31 Aug 2021 15:42:06 GMT", + "ETag": "W/\u0022datetime\u00272021-08-31T15%3A42%3A06.7591176Z\u0027\u0022", "Location": "https://seankaneprim.table.cosmos.azure.com/Tables(\u0027tableName904913677\u0027)", "Transfer-Encoding": "chunked", - "x-ms-request-id": "a76e238c-fc5a-44be-bd6f-cd89cbfb46dc" + "x-ms-request-id": "415da316-1deb-442c-8860-93101b98d94a" }, "ResponseBody": { "TableName": "tableName904913677", @@ -50,8 +50,8 @@ "Content-Type": "application/json", "dataserviceversion": "3.0", "prefer": "return-no-content", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:02:05 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:42:06 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": { @@ -67,11 +67,11 @@ }, "StatusCode": 204, "ResponseHeaders": { - "Date": "Mon, 02 Aug 2021 18:02:04 GMT", - "ETag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A05.2071432Z\u0027\u0022", + "Date": "Tue, 31 Aug 2021 15:42:06 GMT", + "ETag": "W/\u0022datetime\u00272021-08-31T15%3A42%3A07.2003592Z\u0027\u0022", "Location": "https://seankaneprim.table.cosmos.azure.com/tableName904913677(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", "Preference-Applied": "return-no-content", - "x-ms-request-id": "6dfe03c8-806e-40ad-9f8a-34d66b99a13a" + "x-ms-request-id": "ea035668-942f-4f60-a6ea-6180921db50a" }, "ResponseBody": null }, @@ -90,8 +90,8 @@ "Content-Type": "application/json", "dataserviceversion": "3.0", "prefer": "return-no-content", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:02:05 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:42:06 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": { @@ -107,11 +107,11 @@ }, "StatusCode": 204, "ResponseHeaders": { - "Date": "Mon, 02 Aug 2021 18:02:05 GMT", - "ETag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A05.3329928Z\u0027\u0022", + "Date": "Tue, 31 Aug 2021 15:42:06 GMT", + "ETag": "W/\u0022datetime\u00272021-08-31T15%3A42%3A07.3064456Z\u0027\u0022", "Location": "https://seankaneprim.table.cosmos.azure.com/tableName904913677(PartitionKey=\u0027partition\u0027,RowKey=\u00272\u0027)", "Preference-Applied": "return-no-content", - "x-ms-request-id": "6b204c88-48e6-469f-a897-f122a6f629ae" + "x-ms-request-id": "4895e463-32c1-481a-80d3-94fc941b7bba" }, "ResponseBody": null }, @@ -130,8 +130,8 @@ "Content-Type": "application/json", "dataserviceversion": "3.0", "prefer": "return-no-content", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:02:06 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:42:06 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": { @@ -147,11 +147,11 @@ }, "StatusCode": 204, "ResponseHeaders": { - "Date": "Mon, 02 Aug 2021 18:02:05 GMT", - "ETag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A05.4596616Z\u0027\u0022", + "Date": "Tue, 31 Aug 2021 15:42:06 GMT", + "ETag": "W/\u0022datetime\u00272021-08-31T15%3A42%3A07.4158088Z\u0027\u0022", "Location": "https://seankaneprim.table.cosmos.azure.com/tableName904913677(PartitionKey=\u0027partition\u0027,RowKey=\u00273\u0027)", "Preference-Applied": "return-no-content", - "x-ms-request-id": "ab78fe5a-5a74-4b13-9ee0-65f9196f4d40" + "x-ms-request-id": "80857b4b-6c7e-4229-ae8f-637dd6579a81" }, "ResponseBody": null }, @@ -170,8 +170,8 @@ "Content-Type": "application/json", "dataserviceversion": "3.0", "prefer": "return-no-content", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:02:06 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:42:06 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": { @@ -187,11 +187,11 @@ }, "StatusCode": 204, "ResponseHeaders": { - "Date": "Mon, 02 Aug 2021 18:02:05 GMT", - "ETag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A05.5877640Z\u0027\u0022", + "Date": "Tue, 31 Aug 2021 15:42:06 GMT", + "ETag": "W/\u0022datetime\u00272021-08-31T15%3A42%3A07.5090952Z\u0027\u0022", "Location": "https://seankaneprim.table.cosmos.azure.com/tableName904913677(PartitionKey=\u0027partition\u0027,RowKey=\u00274\u0027)", "Preference-Applied": "return-no-content", - "x-ms-request-id": "e9002f26-312a-47e7-abe7-b4d88b5280d3" + "x-ms-request-id": "e9f28568-258a-4a0f-8139-9b35fd64425f" }, "ResponseBody": null }, @@ -210,8 +210,8 @@ "Content-Type": "application/json", "dataserviceversion": "3.0", "prefer": "return-no-content", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:02:06 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:42:07 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": { @@ -227,42 +227,42 @@ }, "StatusCode": 204, "ResponseHeaders": { - "Date": "Mon, 02 Aug 2021 18:02:05 GMT", - "ETag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A05.7221128Z\u0027\u0022", + "Date": "Tue, 31 Aug 2021 15:42:06 GMT", + "ETag": "W/\u0022datetime\u00272021-08-31T15%3A42%3A07.6351496Z\u0027\u0022", "Location": "https://seankaneprim.table.cosmos.azure.com/tableName904913677(PartitionKey=\u0027partition\u0027,RowKey=\u00275\u0027)", "Preference-Applied": "return-no-content", - "x-ms-request-id": "eaeb382b-182f-4368-9cd9-0ba3df08dc4e" + "x-ms-request-id": "4d755f86-1b4f-4013-92e7-82437d816fe6" }, "ResponseBody": null }, { - "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/tableName904913677()?%24filter=RowKey\u002Blt\u002B%275%27", + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/tableName904913677()?%24filter=RowKey\u002Blt\u002B%275%27\u0026%24format=application%2Fjson%3Bodata%3Dminimalmetadata", "RequestMethod": "GET", "RequestHeaders": { ":authority": "localhost:5001", ":method": "GET", - ":path": "/tableName904913677()?%24filter=RowKey\u002Blt\u002B%275%27", + ":path": "/tableName904913677()?%24filter=RowKey\u002Blt\u002B%275%27\u0026%24format=application%2Fjson%3Bodata%3Dminimalmetadata", ":scheme": "https", "Accept": "application/json;odata=minimalmetadata", "Accept-Encoding": "gzip", "Authorization": "Sanitized", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:02:06 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:42:07 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { "Content-Type": "application/json; odata=minimalmetadata", - "Date": "Mon, 02 Aug 2021 18:02:05 GMT", + "Date": "Tue, 31 Aug 2021 15:42:06 GMT", "Transfer-Encoding": "chunked", - "x-ms-request-id": "d430cc2c-147a-4f45-bfeb-696c937127d9" + "x-ms-request-id": "c9b1d5da-5a85-4048-8930-707316e34728" }, "ResponseBody": { "value": [ { - "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A05.2071432Z\u0027\u0022", + "odata.etag": "W/\u0022datetime\u00272021-08-31T15%3A42%3A07.2003592Z\u0027\u0022", "Bool": true, "Byte": "c29tZWJ5dGVz", "DateTime": "2021-07-13T00:00:00Z", @@ -271,10 +271,10 @@ "PartitionKey": "partition", "RowKey": "1", "String": "someString", - "Timestamp": "2021-08-02T18:02:05.2071432Z" + "Timestamp": "2021-08-31T15:42:07.2003592Z" }, { - "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A05.3329928Z\u0027\u0022", + "odata.etag": "W/\u0022datetime\u00272021-08-31T15%3A42%3A07.3064456Z\u0027\u0022", "Bool": true, "Byte": "c29tZWJ5dGVz", "DateTime": "2021-07-13T00:00:00Z", @@ -283,10 +283,10 @@ "PartitionKey": "partition", "RowKey": "2", "String": "someString", - "Timestamp": "2021-08-02T18:02:05.3329928Z" + "Timestamp": "2021-08-31T15:42:07.3064456Z" }, { - "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A05.4596616Z\u0027\u0022", + "odata.etag": "W/\u0022datetime\u00272021-08-31T15%3A42%3A07.4158088Z\u0027\u0022", "Bool": true, "Byte": "c29tZWJ5dGVz", "DateTime": "2021-07-13T00:00:00Z", @@ -295,10 +295,10 @@ "PartitionKey": "partition", "RowKey": "3", "String": "someString", - "Timestamp": "2021-08-02T18:02:05.4596616Z" + "Timestamp": "2021-08-31T15:42:07.4158088Z" }, { - "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A05.5877640Z\u0027\u0022", + "odata.etag": "W/\u0022datetime\u00272021-08-31T15%3A42%3A07.5090952Z\u0027\u0022", "Bool": true, "Byte": "c29tZWJ5dGVz", "DateTime": "2021-07-13T00:00:00Z", @@ -307,7 +307,7 @@ "PartitionKey": "partition", "RowKey": "4", "String": "someString", - "Timestamp": "2021-08-02T18:02:05.5877640Z" + "Timestamp": "2021-08-31T15:42:07.5090952Z" } ], "odata.metadata": "https://seankaneprim.table.cosmos.azure.com/$metadata#tableName904913677" @@ -324,15 +324,15 @@ "Accept": "application/json", "Accept-Encoding": "gzip", "Authorization": "Sanitized", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:02:06 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:42:07 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": null, "StatusCode": 204, "ResponseHeaders": { - "Date": "Mon, 02 Aug 2021 18:02:05 GMT", - "x-ms-request-id": "7783fb11-ecf6-41b7-96f9-76895753afcb" + "Date": "Tue, 31 Aug 2021 15:42:07 GMT", + "x-ms-request-id": "9e5716b7-f593-44de-ad2a-5f6e0872436a" }, "ResponseBody": null } diff --git a/sdk/tables/aztable/recordings/TestQueryComplexEntity/TestQueryComplexEntity_storage.json b/sdk/tables/aztable/recordings/TestQueryComplexEntity/TestQueryComplexEntity_storage.json index 1979d8d1bcef..2188f35962e4 100644 --- a/sdk/tables/aztable/recordings/TestQueryComplexEntity/TestQueryComplexEntity_storage.json +++ b/sdk/tables/aztable/recordings/TestQueryComplexEntity/TestQueryComplexEntity_storage.json @@ -14,8 +14,8 @@ "Content-Length": "34", "Content-Type": "application/json", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:02:03 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:42:05 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": { @@ -25,7 +25,7 @@ "ResponseHeaders": { "Cache-Control": "no-cache", "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", - "Date": "Mon, 02 Aug 2021 18:02:02 GMT", + "Date": "Tue, 31 Aug 2021 15:42:05 GMT", "Location": "https://seankaneprim.table.core.windows.net/Tables(\u0027tableName160818926\u0027)", "Server": [ "Windows-Azure-Table/1.0", @@ -33,7 +33,7 @@ ], "Transfer-Encoding": "chunked", "X-Content-Type-Options": "nosniff", - "x-ms-request-id": "a05b6ad2-9002-0057-1ac8-874646000000", + "x-ms-request-id": "6b1c7c8d-b002-0007-1e7e-9e1dbe000000", "x-ms-version": "2019-02-02" }, "ResponseBody": { @@ -56,8 +56,8 @@ "Content-Type": "application/json", "dataserviceversion": "3.0", "prefer": "return-no-content", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:02:04 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:42:05 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": { @@ -76,8 +76,8 @@ "Cache-Control": "no-cache", "Content-Length": "0", "DataServiceId": "https://seankaneprim.table.core.windows.net/tableName160818926(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", - "Date": "Mon, 02 Aug 2021 18:02:02 GMT", - "ETag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A03.4589Z\u0027\u0022", + "Date": "Tue, 31 Aug 2021 15:42:05 GMT", + "ETag": "W/\u0022datetime\u00272021-08-31T15%3A42%3A05.8382263Z\u0027\u0022", "Location": "https://seankaneprim.table.core.windows.net/tableName160818926(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", "Preference-Applied": "return-no-content", "Server": [ @@ -85,7 +85,7 @@ "Microsoft-HTTPAPI/2.0" ], "X-Content-Type-Options": "nosniff", - "x-ms-request-id": "a05b6af4-9002-0057-38c8-874646000000", + "x-ms-request-id": "6b1c7cb6-b002-0007-457e-9e1dbe000000", "x-ms-version": "2019-02-02" }, "ResponseBody": null @@ -105,8 +105,8 @@ "Content-Type": "application/json", "dataserviceversion": "3.0", "prefer": "return-no-content", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:02:04 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:42:05 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": { @@ -125,8 +125,8 @@ "Cache-Control": "no-cache", "Content-Length": "0", "DataServiceId": "https://seankaneprim.table.core.windows.net/tableName160818926(PartitionKey=\u0027partition\u0027,RowKey=\u00272\u0027)", - "Date": "Mon, 02 Aug 2021 18:02:02 GMT", - "ETag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A03.5829882Z\u0027\u0022", + "Date": "Tue, 31 Aug 2021 15:42:05 GMT", + "ETag": "W/\u0022datetime\u00272021-08-31T15%3A42%3A05.9453011Z\u0027\u0022", "Location": "https://seankaneprim.table.core.windows.net/tableName160818926(PartitionKey=\u0027partition\u0027,RowKey=\u00272\u0027)", "Preference-Applied": "return-no-content", "Server": [ @@ -134,7 +134,7 @@ "Microsoft-HTTPAPI/2.0" ], "X-Content-Type-Options": "nosniff", - "x-ms-request-id": "a05b6b14-9002-0057-55c8-874646000000", + "x-ms-request-id": "6b1c7cde-b002-0007-697e-9e1dbe000000", "x-ms-version": "2019-02-02" }, "ResponseBody": null @@ -154,8 +154,8 @@ "Content-Type": "application/json", "dataserviceversion": "3.0", "prefer": "return-no-content", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:02:04 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:42:05 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": { @@ -174,8 +174,8 @@ "Cache-Control": "no-cache", "Content-Length": "0", "DataServiceId": "https://seankaneprim.table.core.windows.net/tableName160818926(PartitionKey=\u0027partition\u0027,RowKey=\u00273\u0027)", - "Date": "Mon, 02 Aug 2021 18:02:02 GMT", - "ETag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A03.7060745Z\u0027\u0022", + "Date": "Tue, 31 Aug 2021 15:42:05 GMT", + "ETag": "W/\u0022datetime\u00272021-08-31T15%3A42%3A06.0383674Z\u0027\u0022", "Location": "https://seankaneprim.table.core.windows.net/tableName160818926(PartitionKey=\u0027partition\u0027,RowKey=\u00273\u0027)", "Preference-Applied": "return-no-content", "Server": [ @@ -183,7 +183,7 @@ "Microsoft-HTTPAPI/2.0" ], "X-Content-Type-Options": "nosniff", - "x-ms-request-id": "a05b6b3f-9002-0057-7dc8-874646000000", + "x-ms-request-id": "6b1c7cf8-b002-0007-027e-9e1dbe000000", "x-ms-version": "2019-02-02" }, "ResponseBody": null @@ -203,8 +203,8 @@ "Content-Type": "application/json", "dataserviceversion": "3.0", "prefer": "return-no-content", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:02:04 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:42:05 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": { @@ -223,8 +223,8 @@ "Cache-Control": "no-cache", "Content-Length": "0", "DataServiceId": "https://seankaneprim.table.core.windows.net/tableName160818926(PartitionKey=\u0027partition\u0027,RowKey=\u00274\u0027)", - "Date": "Mon, 02 Aug 2021 18:02:03 GMT", - "ETag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A03.8301613Z\u0027\u0022", + "Date": "Tue, 31 Aug 2021 15:42:05 GMT", + "ETag": "W/\u0022datetime\u00272021-08-31T15%3A42%3A06.1374374Z\u0027\u0022", "Location": "https://seankaneprim.table.core.windows.net/tableName160818926(PartitionKey=\u0027partition\u0027,RowKey=\u00274\u0027)", "Preference-Applied": "return-no-content", "Server": [ @@ -232,7 +232,7 @@ "Microsoft-HTTPAPI/2.0" ], "X-Content-Type-Options": "nosniff", - "x-ms-request-id": "a05b6b59-9002-0057-15c8-874646000000", + "x-ms-request-id": "6b1c7d20-b002-0007-267e-9e1dbe000000", "x-ms-version": "2019-02-02" }, "ResponseBody": null @@ -252,8 +252,8 @@ "Content-Type": "application/json", "dataserviceversion": "3.0", "prefer": "return-no-content", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:02:04 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:42:05 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": { @@ -272,8 +272,8 @@ "Cache-Control": "no-cache", "Content-Length": "0", "DataServiceId": "https://seankaneprim.table.core.windows.net/tableName160818926(PartitionKey=\u0027partition\u0027,RowKey=\u00275\u0027)", - "Date": "Mon, 02 Aug 2021 18:02:03 GMT", - "ETag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A03.9562509Z\u0027\u0022", + "Date": "Tue, 31 Aug 2021 15:42:05 GMT", + "ETag": "W/\u0022datetime\u00272021-08-31T15%3A42%3A06.2305028Z\u0027\u0022", "Location": "https://seankaneprim.table.core.windows.net/tableName160818926(PartitionKey=\u0027partition\u0027,RowKey=\u00275\u0027)", "Preference-Applied": "return-no-content", "Server": [ @@ -281,25 +281,25 @@ "Microsoft-HTTPAPI/2.0" ], "X-Content-Type-Options": "nosniff", - "x-ms-request-id": "a05b6b6d-9002-0057-29c8-874646000000", + "x-ms-request-id": "6b1c7d3f-b002-0007-447e-9e1dbe000000", "x-ms-version": "2019-02-02" }, "ResponseBody": null }, { - "RequestUri": "https://fakestorageaccount.table.core.windows.net/tableName160818926()?%24filter=RowKey\u002Blt\u002B%275%27", + "RequestUri": "https://fakestorageaccount.table.core.windows.net/tableName160818926()?%24filter=RowKey\u002Blt\u002B%275%27\u0026%24format=application%2Fjson%3Bodata%3Dminimalmetadata", "RequestMethod": "GET", "RequestHeaders": { ":authority": "localhost:5001", ":method": "GET", - ":path": "/tableName160818926()?%24filter=RowKey\u002Blt\u002B%275%27", + ":path": "/tableName160818926()?%24filter=RowKey\u002Blt\u002B%275%27\u0026%24format=application%2Fjson%3Bodata%3Dminimalmetadata", ":scheme": "https", "Accept": "application/json;odata=minimalmetadata", "Accept-Encoding": "gzip", "Authorization": "Sanitized", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:02:04 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:42:05 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": null, @@ -307,25 +307,24 @@ "ResponseHeaders": { "Cache-Control": "no-cache", "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", - "Date": "Mon, 02 Aug 2021 18:02:03 GMT", + "Date": "Tue, 31 Aug 2021 15:42:05 GMT", "Server": [ "Windows-Azure-Table/1.0", "Microsoft-HTTPAPI/2.0" ], "Transfer-Encoding": "chunked", - "Vary": "Origin", "X-Content-Type-Options": "nosniff", - "x-ms-request-id": "a05b6b92-9002-0057-4bc8-874646000000", + "x-ms-request-id": "6b1c7d61-b002-0007-637e-9e1dbe000000", "x-ms-version": "2019-02-02" }, "ResponseBody": { "odata.metadata": "https://seankaneprim.table.core.windows.net/$metadata#tableName160818926", "value": [ { - "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A03.4589Z\u0027\u0022", + "odata.etag": "W/\u0022datetime\u00272021-08-31T15%3A42%3A05.8382263Z\u0027\u0022", "PartitionKey": "partition", "RowKey": "1", - "Timestamp": "2021-08-02T18:02:03.4589Z", + "Timestamp": "2021-08-31T15:42:05.8382263Z", "Bool": true, "Byte": "c29tZWJ5dGVz", "DateTime": "2021-07-13T00:00:00Z", @@ -334,10 +333,10 @@ "String": "someString" }, { - "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A03.5829882Z\u0027\u0022", + "odata.etag": "W/\u0022datetime\u00272021-08-31T15%3A42%3A05.9453011Z\u0027\u0022", "PartitionKey": "partition", "RowKey": "2", - "Timestamp": "2021-08-02T18:02:03.5829882Z", + "Timestamp": "2021-08-31T15:42:05.9453011Z", "Bool": true, "Byte": "c29tZWJ5dGVz", "DateTime": "2021-07-13T00:00:00Z", @@ -346,10 +345,10 @@ "String": "someString" }, { - "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A03.7060745Z\u0027\u0022", + "odata.etag": "W/\u0022datetime\u00272021-08-31T15%3A42%3A06.0383674Z\u0027\u0022", "PartitionKey": "partition", "RowKey": "3", - "Timestamp": "2021-08-02T18:02:03.7060745Z", + "Timestamp": "2021-08-31T15:42:06.0383674Z", "Bool": true, "Byte": "c29tZWJ5dGVz", "DateTime": "2021-07-13T00:00:00Z", @@ -358,10 +357,10 @@ "String": "someString" }, { - "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A03.8301613Z\u0027\u0022", + "odata.etag": "W/\u0022datetime\u00272021-08-31T15%3A42%3A06.1374374Z\u0027\u0022", "PartitionKey": "partition", "RowKey": "4", - "Timestamp": "2021-08-02T18:02:03.8301613Z", + "Timestamp": "2021-08-31T15:42:06.1374374Z", "Bool": true, "Byte": "c29tZWJ5dGVz", "DateTime": "2021-07-13T00:00:00Z", @@ -383,8 +382,8 @@ "Accept": "application/json", "Accept-Encoding": "gzip", "Authorization": "Sanitized", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:02:04 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:42:05 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": null, @@ -392,13 +391,13 @@ "ResponseHeaders": { "Cache-Control": "no-cache", "Content-Length": "0", - "Date": "Mon, 02 Aug 2021 18:02:03 GMT", + "Date": "Tue, 31 Aug 2021 15:42:06 GMT", "Server": [ "Windows-Azure-Table/1.0", "Microsoft-HTTPAPI/2.0" ], "X-Content-Type-Options": "nosniff", - "x-ms-request-id": "a05b6bb9-9002-0057-72c8-874646000000", + "x-ms-request-id": "6b1c7da6-b002-0007-217e-9e1dbe000000", "x-ms-version": "2019-02-02" }, "ResponseBody": null diff --git a/sdk/tables/aztable/recordings/TestQuerySimpleEntity/TestQuerySimpleEntity_cosmos.json b/sdk/tables/aztable/recordings/TestQuerySimpleEntity/TestQuerySimpleEntity_cosmos.json index 1b1e2b28e5e1..b5d4a8d519b5 100644 --- a/sdk/tables/aztable/recordings/TestQuerySimpleEntity/TestQuerySimpleEntity_cosmos.json +++ b/sdk/tables/aztable/recordings/TestQuerySimpleEntity/TestQuerySimpleEntity_cosmos.json @@ -14,8 +14,8 @@ "Content-Length": "34", "Content-Type": "application/json", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:02:01 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:41:38 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": { @@ -24,11 +24,11 @@ "StatusCode": 201, "ResponseHeaders": { "Content-Type": "application/json; odata=minimalmetadata", - "Date": "Mon, 02 Aug 2021 18:02:01 GMT", - "ETag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A01.5497224Z\u0027\u0022", + "Date": "Tue, 31 Aug 2021 15:41:38 GMT", + "ETag": "W/\u0022datetime\u00272021-08-31T15%3A41%3A39.1907848Z\u0027\u0022", "Location": "https://seankaneprim.table.cosmos.azure.com/Tables(\u0027tableName978986389\u0027)", "Transfer-Encoding": "chunked", - "x-ms-request-id": "e9291aba-7233-4c68-a8e2-ebdcaac6b3d7" + "x-ms-request-id": "d702ab26-99a8-4c0f-acdf-a4f12e0f10ba" }, "ResponseBody": { "TableName": "tableName978986389", @@ -50,8 +50,8 @@ "Content-Type": "application/json", "dataserviceversion": "3.0", "prefer": "return-no-content", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:02:02 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:41:39 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": { @@ -64,11 +64,11 @@ }, "StatusCode": 204, "ResponseHeaders": { - "Date": "Mon, 02 Aug 2021 18:02:01 GMT", - "ETag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A02.1867528Z\u0027\u0022", + "Date": "Tue, 31 Aug 2021 15:41:38 GMT", + "ETag": "W/\u0022datetime\u00272021-08-31T15%3A41%3A39.6545544Z\u0027\u0022", "Location": "https://seankaneprim.table.cosmos.azure.com/tableName978986389(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", "Preference-Applied": "return-no-content", - "x-ms-request-id": "2c98279e-9097-4312-a7bd-fe4782695dfe" + "x-ms-request-id": "c2ad9f42-2410-4956-8982-7a56c23f626e" }, "ResponseBody": null }, @@ -87,8 +87,8 @@ "Content-Type": "application/json", "dataserviceversion": "3.0", "prefer": "return-no-content", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:02:02 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:41:39 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": { @@ -101,11 +101,11 @@ }, "StatusCode": 204, "ResponseHeaders": { - "Date": "Mon, 02 Aug 2021 18:02:02 GMT", - "ETag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A02.3116808Z\u0027\u0022", + "Date": "Tue, 31 Aug 2021 15:41:38 GMT", + "ETag": "W/\u0022datetime\u00272021-08-31T15%3A41%3A39.7600264Z\u0027\u0022", "Location": "https://seankaneprim.table.cosmos.azure.com/tableName978986389(PartitionKey=\u0027partition\u0027,RowKey=\u00272\u0027)", "Preference-Applied": "return-no-content", - "x-ms-request-id": "e1b9e14f-b4f8-4e83-bb8e-d3fb5c79d306" + "x-ms-request-id": "13d49b12-8738-4dac-bc1a-e6ab838cfa72" }, "ResponseBody": null }, @@ -124,8 +124,8 @@ "Content-Type": "application/json", "dataserviceversion": "3.0", "prefer": "return-no-content", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:02:03 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:41:39 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": { @@ -138,11 +138,11 @@ }, "StatusCode": 204, "ResponseHeaders": { - "Date": "Mon, 02 Aug 2021 18:02:02 GMT", - "ETag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A02.4440840Z\u0027\u0022", + "Date": "Tue, 31 Aug 2021 15:41:38 GMT", + "ETag": "W/\u0022datetime\u00272021-08-31T15%3A41%3A39.8700040Z\u0027\u0022", "Location": "https://seankaneprim.table.cosmos.azure.com/tableName978986389(PartitionKey=\u0027partition\u0027,RowKey=\u00273\u0027)", "Preference-Applied": "return-no-content", - "x-ms-request-id": "83965c23-e9e3-464d-9cdd-ae04d2464dbb" + "x-ms-request-id": "e0bb009a-ce2a-4287-8c0e-ee8f93351745" }, "ResponseBody": null }, @@ -161,8 +161,8 @@ "Content-Type": "application/json", "dataserviceversion": "3.0", "prefer": "return-no-content", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:02:03 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:41:39 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": { @@ -175,11 +175,11 @@ }, "StatusCode": 204, "ResponseHeaders": { - "Date": "Mon, 02 Aug 2021 18:02:02 GMT", - "ETag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A02.5690120Z\u0027\u0022", + "Date": "Tue, 31 Aug 2021 15:41:39 GMT", + "ETag": "W/\u0022datetime\u00272021-08-31T15%3A41%3A39.9613448Z\u0027\u0022", "Location": "https://seankaneprim.table.cosmos.azure.com/tableName978986389(PartitionKey=\u0027partition\u0027,RowKey=\u00274\u0027)", "Preference-Applied": "return-no-content", - "x-ms-request-id": "3343dbb9-e680-4fb6-aa69-b023a918ac87" + "x-ms-request-id": "5214d56a-7721-4a1d-8ce7-5b6955836c4c" }, "ResponseBody": null }, @@ -198,8 +198,8 @@ "Content-Type": "application/json", "dataserviceversion": "3.0", "prefer": "return-no-content", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:02:03 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:41:39 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": { @@ -212,75 +212,75 @@ }, "StatusCode": 204, "ResponseHeaders": { - "Date": "Mon, 02 Aug 2021 18:02:02 GMT", - "ETag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A02.6977288Z\u0027\u0022", + "Date": "Tue, 31 Aug 2021 15:41:39 GMT", + "ETag": "W/\u0022datetime\u00272021-08-31T15%3A41%3A40.0528904Z\u0027\u0022", "Location": "https://seankaneprim.table.cosmos.azure.com/tableName978986389(PartitionKey=\u0027partition\u0027,RowKey=\u00275\u0027)", "Preference-Applied": "return-no-content", - "x-ms-request-id": "fc29c204-724e-44d5-a7ec-1e6ebfeb60cc" + "x-ms-request-id": "ecdf0973-cd7b-4654-b8a1-9d09e54cb8c4" }, "ResponseBody": null }, { - "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/tableName978986389()?%24filter=RowKey\u002Blt\u002B%275%27", + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/tableName978986389()?%24filter=RowKey\u002Blt\u002B%275%27\u0026%24format=application%2Fjson%3Bodata%3Dminimalmetadata", "RequestMethod": "GET", "RequestHeaders": { ":authority": "localhost:5001", ":method": "GET", - ":path": "/tableName978986389()?%24filter=RowKey\u002Blt\u002B%275%27", + ":path": "/tableName978986389()?%24filter=RowKey\u002Blt\u002B%275%27\u0026%24format=application%2Fjson%3Bodata%3Dminimalmetadata", ":scheme": "https", "Accept": "application/json;odata=minimalmetadata", "Accept-Encoding": "gzip", "Authorization": "Sanitized", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:02:03 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:41:39 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { "Content-Type": "application/json; odata=minimalmetadata", - "Date": "Mon, 02 Aug 2021 18:02:02 GMT", + "Date": "Tue, 31 Aug 2021 15:41:39 GMT", "Transfer-Encoding": "chunked", - "x-ms-request-id": "17b4e9ec-ea75-4962-b6bf-6346b715458a" + "x-ms-request-id": "d56d4827-ddfa-41b7-9ea3-d67ccc313dc1" }, "ResponseBody": { "value": [ { - "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A02.1867528Z\u0027\u0022", + "odata.etag": "W/\u0022datetime\u00272021-08-31T15%3A41%3A39.6545544Z\u0027\u0022", "Bool": true, "Integer": 1, "PartitionKey": "partition", "RowKey": "1", "String": "some string 1", - "Timestamp": "2021-08-02T18:02:02.1867528Z" + "Timestamp": "2021-08-31T15:41:39.6545544Z" }, { - "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A02.3116808Z\u0027\u0022", + "odata.etag": "W/\u0022datetime\u00272021-08-31T15%3A41%3A39.7600264Z\u0027\u0022", "Bool": true, "Integer": 2, "PartitionKey": "partition", "RowKey": "2", "String": "some string 2", - "Timestamp": "2021-08-02T18:02:02.3116808Z" + "Timestamp": "2021-08-31T15:41:39.7600264Z" }, { - "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A02.4440840Z\u0027\u0022", + "odata.etag": "W/\u0022datetime\u00272021-08-31T15%3A41%3A39.8700040Z\u0027\u0022", "Bool": true, "Integer": 3, "PartitionKey": "partition", "RowKey": "3", "String": "some string 3", - "Timestamp": "2021-08-02T18:02:02.4440840Z" + "Timestamp": "2021-08-31T15:41:39.8700040Z" }, { - "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A02.5690120Z\u0027\u0022", + "odata.etag": "W/\u0022datetime\u00272021-08-31T15%3A41%3A39.9613448Z\u0027\u0022", "Bool": true, "Integer": 4, "PartitionKey": "partition", "RowKey": "4", "String": "some string 4", - "Timestamp": "2021-08-02T18:02:02.5690120Z" + "Timestamp": "2021-08-31T15:41:39.9613448Z" } ], "odata.metadata": "https://seankaneprim.table.cosmos.azure.com/$metadata#tableName978986389" @@ -297,15 +297,15 @@ "Accept": "application/json", "Accept-Encoding": "gzip", "Authorization": "Sanitized", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:02:03 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:41:39 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": null, "StatusCode": 204, "ResponseHeaders": { - "Date": "Mon, 02 Aug 2021 18:02:02 GMT", - "x-ms-request-id": "321043e2-6362-406a-bd06-86943ba97a42" + "Date": "Tue, 31 Aug 2021 15:41:39 GMT", + "x-ms-request-id": "def6056d-2212-4ae8-a0ed-d45b590a1464" }, "ResponseBody": null } diff --git a/sdk/tables/aztable/recordings/TestQuerySimpleEntity/TestQuerySimpleEntity_storage.json b/sdk/tables/aztable/recordings/TestQuerySimpleEntity/TestQuerySimpleEntity_storage.json index 20353dcdc395..0d97bc0e5d99 100644 --- a/sdk/tables/aztable/recordings/TestQuerySimpleEntity/TestQuerySimpleEntity_storage.json +++ b/sdk/tables/aztable/recordings/TestQuerySimpleEntity/TestQuerySimpleEntity_storage.json @@ -14,8 +14,8 @@ "Content-Length": "34", "Content-Type": "application/json", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:02:00 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:41:37 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": { @@ -25,7 +25,7 @@ "ResponseHeaders": { "Cache-Control": "no-cache", "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", - "Date": "Mon, 02 Aug 2021 18:01:59 GMT", + "Date": "Tue, 31 Aug 2021 15:41:37 GMT", "Location": "https://seankaneprim.table.core.windows.net/Tables(\u0027tableName246899398\u0027)", "Server": [ "Windows-Azure-Table/1.0", @@ -33,7 +33,7 @@ ], "Transfer-Encoding": "chunked", "X-Content-Type-Options": "nosniff", - "x-ms-request-id": "a05b6717-9002-0057-18c8-874646000000", + "x-ms-request-id": "6b1c53fc-b002-0007-387e-9e1dbe000000", "x-ms-version": "2019-02-02" }, "ResponseBody": { @@ -56,8 +56,8 @@ "Content-Type": "application/json", "dataserviceversion": "3.0", "prefer": "return-no-content", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:02:01 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:41:37 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": { @@ -73,8 +73,8 @@ "Cache-Control": "no-cache", "Content-Length": "0", "DataServiceId": "https://seankaneprim.table.core.windows.net/tableName246899398(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", - "Date": "Mon, 02 Aug 2021 18:01:59 GMT", - "ETag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A00.378734Z\u0027\u0022", + "Date": "Tue, 31 Aug 2021 15:41:37 GMT", + "ETag": "W/\u0022datetime\u00272021-08-31T15%3A41%3A38.3027816Z\u0027\u0022", "Location": "https://seankaneprim.table.core.windows.net/tableName246899398(PartitionKey=\u0027partition\u0027,RowKey=\u00271\u0027)", "Preference-Applied": "return-no-content", "Server": [ @@ -82,7 +82,7 @@ "Microsoft-HTTPAPI/2.0" ], "X-Content-Type-Options": "nosniff", - "x-ms-request-id": "a05b674b-9002-0057-48c8-874646000000", + "x-ms-request-id": "6b1c5417-b002-0007-4d7e-9e1dbe000000", "x-ms-version": "2019-02-02" }, "ResponseBody": null @@ -102,8 +102,8 @@ "Content-Type": "application/json", "dataserviceversion": "3.0", "prefer": "return-no-content", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:02:01 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:41:37 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": { @@ -119,8 +119,8 @@ "Cache-Control": "no-cache", "Content-Length": "0", "DataServiceId": "https://seankaneprim.table.core.windows.net/tableName246899398(PartitionKey=\u0027partition\u0027,RowKey=\u00272\u0027)", - "Date": "Mon, 02 Aug 2021 18:01:59 GMT", - "ETag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A00.5048231Z\u0027\u0022", + "Date": "Tue, 31 Aug 2021 15:41:37 GMT", + "ETag": "W/\u0022datetime\u00272021-08-31T15%3A41%3A38.4038527Z\u0027\u0022", "Location": "https://seankaneprim.table.core.windows.net/tableName246899398(PartitionKey=\u0027partition\u0027,RowKey=\u00272\u0027)", "Preference-Applied": "return-no-content", "Server": [ @@ -128,7 +128,7 @@ "Microsoft-HTTPAPI/2.0" ], "X-Content-Type-Options": "nosniff", - "x-ms-request-id": "a05b6773-9002-0057-6dc8-874646000000", + "x-ms-request-id": "6b1c5437-b002-0007-667e-9e1dbe000000", "x-ms-version": "2019-02-02" }, "ResponseBody": null @@ -148,8 +148,8 @@ "Content-Type": "application/json", "dataserviceversion": "3.0", "prefer": "return-no-content", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:02:01 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:41:37 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": { @@ -165,8 +165,8 @@ "Cache-Control": "no-cache", "Content-Length": "0", "DataServiceId": "https://seankaneprim.table.core.windows.net/tableName246899398(PartitionKey=\u0027partition\u0027,RowKey=\u00273\u0027)", - "Date": "Mon, 02 Aug 2021 18:01:59 GMT", - "ETag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A00.6309113Z\u0027\u0022", + "Date": "Tue, 31 Aug 2021 15:41:38 GMT", + "ETag": "W/\u0022datetime\u00272021-08-31T15%3A41%3A38.5049242Z\u0027\u0022", "Location": "https://seankaneprim.table.core.windows.net/tableName246899398(PartitionKey=\u0027partition\u0027,RowKey=\u00273\u0027)", "Preference-Applied": "return-no-content", "Server": [ @@ -174,7 +174,7 @@ "Microsoft-HTTPAPI/2.0" ], "X-Content-Type-Options": "nosniff", - "x-ms-request-id": "a05b67a6-9002-0057-1cc8-874646000000", + "x-ms-request-id": "6b1c544b-b002-0007-797e-9e1dbe000000", "x-ms-version": "2019-02-02" }, "ResponseBody": null @@ -194,8 +194,8 @@ "Content-Type": "application/json", "dataserviceversion": "3.0", "prefer": "return-no-content", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:02:01 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:41:38 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": { @@ -211,8 +211,8 @@ "Cache-Control": "no-cache", "Content-Length": "0", "DataServiceId": "https://seankaneprim.table.core.windows.net/tableName246899398(PartitionKey=\u0027partition\u0027,RowKey=\u00274\u0027)", - "Date": "Mon, 02 Aug 2021 18:01:59 GMT", - "ETag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A00.7740122Z\u0027\u0022", + "Date": "Tue, 31 Aug 2021 15:41:38 GMT", + "ETag": "W/\u0022datetime\u00272021-08-31T15%3A41%3A38.5939863Z\u0027\u0022", "Location": "https://seankaneprim.table.core.windows.net/tableName246899398(PartitionKey=\u0027partition\u0027,RowKey=\u00274\u0027)", "Preference-Applied": "return-no-content", "Server": [ @@ -220,7 +220,7 @@ "Microsoft-HTTPAPI/2.0" ], "X-Content-Type-Options": "nosniff", - "x-ms-request-id": "a05b67c9-9002-0057-3ec8-874646000000", + "x-ms-request-id": "6b1c545b-b002-0007-087e-9e1dbe000000", "x-ms-version": "2019-02-02" }, "ResponseBody": null @@ -240,8 +240,8 @@ "Content-Type": "application/json", "dataserviceversion": "3.0", "prefer": "return-no-content", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:02:01 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:41:38 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": { @@ -257,8 +257,8 @@ "Cache-Control": "no-cache", "Content-Length": "0", "DataServiceId": "https://seankaneprim.table.core.windows.net/tableName246899398(PartitionKey=\u0027partition\u0027,RowKey=\u00275\u0027)", - "Date": "Mon, 02 Aug 2021 18:02:00 GMT", - "ETag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A00.9151112Z\u0027\u0022", + "Date": "Tue, 31 Aug 2021 15:41:38 GMT", + "ETag": "W/\u0022datetime\u00272021-08-31T15%3A41%3A38.6820488Z\u0027\u0022", "Location": "https://seankaneprim.table.core.windows.net/tableName246899398(PartitionKey=\u0027partition\u0027,RowKey=\u00275\u0027)", "Preference-Applied": "return-no-content", "Server": [ @@ -266,25 +266,25 @@ "Microsoft-HTTPAPI/2.0" ], "X-Content-Type-Options": "nosniff", - "x-ms-request-id": "a05b67f8-9002-0057-6dc8-874646000000", + "x-ms-request-id": "6b1c5478-b002-0007-217e-9e1dbe000000", "x-ms-version": "2019-02-02" }, "ResponseBody": null }, { - "RequestUri": "https://fakestorageaccount.table.core.windows.net/tableName246899398()?%24filter=RowKey\u002Blt\u002B%275%27", + "RequestUri": "https://fakestorageaccount.table.core.windows.net/tableName246899398()?%24filter=RowKey\u002Blt\u002B%275%27\u0026%24format=application%2Fjson%3Bodata%3Dminimalmetadata", "RequestMethod": "GET", "RequestHeaders": { ":authority": "localhost:5001", ":method": "GET", - ":path": "/tableName246899398()?%24filter=RowKey\u002Blt\u002B%275%27", + ":path": "/tableName246899398()?%24filter=RowKey\u002Blt\u002B%275%27\u0026%24format=application%2Fjson%3Bodata%3Dminimalmetadata", ":scheme": "https", "Accept": "application/json;odata=minimalmetadata", "Accept-Encoding": "gzip", "Authorization": "Sanitized", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:02:01 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:41:38 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": null, @@ -292,52 +292,51 @@ "ResponseHeaders": { "Cache-Control": "no-cache", "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", - "Date": "Mon, 02 Aug 2021 18:02:00 GMT", + "Date": "Tue, 31 Aug 2021 15:41:38 GMT", "Server": [ "Windows-Azure-Table/1.0", "Microsoft-HTTPAPI/2.0" ], "Transfer-Encoding": "chunked", - "Vary": "Origin", "X-Content-Type-Options": "nosniff", - "x-ms-request-id": "a05b681b-9002-0057-0ec8-874646000000", + "x-ms-request-id": "6b1c5497-b002-0007-3f7e-9e1dbe000000", "x-ms-version": "2019-02-02" }, "ResponseBody": { "odata.metadata": "https://seankaneprim.table.core.windows.net/$metadata#tableName246899398", "value": [ { - "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A00.378734Z\u0027\u0022", + "odata.etag": "W/\u0022datetime\u00272021-08-31T15%3A41%3A38.3027816Z\u0027\u0022", "PartitionKey": "partition", "RowKey": "1", - "Timestamp": "2021-08-02T18:02:00.378734Z", + "Timestamp": "2021-08-31T15:41:38.3027816Z", "Bool": true, "Integer": 1, "String": "some string 1" }, { - "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A00.5048231Z\u0027\u0022", + "odata.etag": "W/\u0022datetime\u00272021-08-31T15%3A41%3A38.4038527Z\u0027\u0022", "PartitionKey": "partition", "RowKey": "2", - "Timestamp": "2021-08-02T18:02:00.5048231Z", + "Timestamp": "2021-08-31T15:41:38.4038527Z", "Bool": true, "Integer": 2, "String": "some string 2" }, { - "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A00.6309113Z\u0027\u0022", + "odata.etag": "W/\u0022datetime\u00272021-08-31T15%3A41%3A38.5049242Z\u0027\u0022", "PartitionKey": "partition", "RowKey": "3", - "Timestamp": "2021-08-02T18:02:00.6309113Z", + "Timestamp": "2021-08-31T15:41:38.5049242Z", "Bool": true, "Integer": 3, "String": "some string 3" }, { - "odata.etag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A00.7740122Z\u0027\u0022", + "odata.etag": "W/\u0022datetime\u00272021-08-31T15%3A41%3A38.5939863Z\u0027\u0022", "PartitionKey": "partition", "RowKey": "4", - "Timestamp": "2021-08-02T18:02:00.7740122Z", + "Timestamp": "2021-08-31T15:41:38.5939863Z", "Bool": true, "Integer": 4, "String": "some string 4" @@ -356,8 +355,8 @@ "Accept": "application/json", "Accept-Encoding": "gzip", "Authorization": "Sanitized", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:02:01 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:41:38 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": null, @@ -365,13 +364,13 @@ "ResponseHeaders": { "Cache-Control": "no-cache", "Content-Length": "0", - "Date": "Mon, 02 Aug 2021 18:02:00 GMT", + "Date": "Tue, 31 Aug 2021 15:41:38 GMT", "Server": [ "Windows-Azure-Table/1.0", "Microsoft-HTTPAPI/2.0" ], "X-Content-Type-Options": "nosniff", - "x-ms-request-id": "a05b684b-9002-0057-38c8-874646000000", + "x-ms-request-id": "6b1c54b5-b002-0007-5c7e-9e1dbe000000", "x-ms-version": "2019-02-02" }, "ResponseBody": null diff --git a/sdk/tables/aztable/recordings/TestQueryTable/TestQueryTable_cosmos.json b/sdk/tables/aztable/recordings/TestQueryTable/TestQueryTable_cosmos.json index 88337075fcc9..c7361dd5b8aa 100644 --- a/sdk/tables/aztable/recordings/TestQueryTable/TestQueryTable_cosmos.json +++ b/sdk/tables/aztable/recordings/TestQueryTable/TestQueryTable_cosmos.json @@ -14,8 +14,8 @@ "Content-Length": "21", "Content-Type": "application/json", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:02:16 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:42:33 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": { @@ -24,11 +24,11 @@ "StatusCode": 201, "ResponseHeaders": { "Content-Type": "application/json; odata=minimalmetadata", - "Date": "Mon, 02 Aug 2021 18:02:15 GMT", - "ETag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A15.6441608Z\u0027\u0022", + "Date": "Tue, 31 Aug 2021 15:42:33 GMT", + "ETag": "W/\u0022datetime\u00272021-08-31T15%3A42%3A34.0432904Z\u0027\u0022", "Location": "https://seankaneprim.table.cosmos.azure.com/Tables(\u0027zzza0\u0027)", "Transfer-Encoding": "chunked", - "x-ms-request-id": "f08a29ed-0e4c-496b-9c97-325e02c7cef1" + "x-ms-request-id": "8d26cdab-f70b-42f9-bc95-742545f585b4" }, "ResponseBody": { "TableName": "zzza0", @@ -49,8 +49,8 @@ "Content-Length": "21", "Content-Type": "application/json", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:02:16 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:42:33 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": { @@ -59,11 +59,11 @@ "StatusCode": 201, "ResponseHeaders": { "Content-Type": "application/json; odata=minimalmetadata", - "Date": "Mon, 02 Aug 2021 18:02:16 GMT", - "ETag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A16.4076552Z\u0027\u0022", + "Date": "Tue, 31 Aug 2021 15:42:33 GMT", + "ETag": "W/\u0022datetime\u00272021-08-31T15%3A42%3A34.5913352Z\u0027\u0022", "Location": "https://seankaneprim.table.cosmos.azure.com/Tables(\u0027zzza1\u0027)", "Transfer-Encoding": "chunked", - "x-ms-request-id": "6d8a02af-1675-402b-945f-a3b9ef7b4ead" + "x-ms-request-id": "ef4622fe-8401-4a70-9edb-2991c02ce58d" }, "ResponseBody": { "TableName": "zzza1", @@ -84,8 +84,8 @@ "Content-Length": "21", "Content-Type": "application/json", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:02:17 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:42:34 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": { @@ -94,11 +94,11 @@ "StatusCode": 201, "ResponseHeaders": { "Content-Type": "application/json; odata=minimalmetadata", - "Date": "Mon, 02 Aug 2021 18:02:17 GMT", - "ETag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A17.1583496Z\u0027\u0022", + "Date": "Tue, 31 Aug 2021 15:42:34 GMT", + "ETag": "W/\u0022datetime\u00272021-08-31T15%3A42%3A35.0946312Z\u0027\u0022", "Location": "https://seankaneprim.table.cosmos.azure.com/Tables(\u0027zzza2\u0027)", "Transfer-Encoding": "chunked", - "x-ms-request-id": "5233208b-8940-4135-8ecd-bb98b15c1e24" + "x-ms-request-id": "94460ad6-fc8b-4fcd-8438-44316eb1e4ba" }, "ResponseBody": { "TableName": "zzza2", @@ -119,8 +119,8 @@ "Content-Length": "21", "Content-Type": "application/json", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:02:18 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:42:35 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": { @@ -129,11 +129,11 @@ "StatusCode": 201, "ResponseHeaders": { "Content-Type": "application/json; odata=minimalmetadata", - "Date": "Mon, 02 Aug 2021 18:02:18 GMT", - "ETag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A17.9521544Z\u0027\u0022", + "Date": "Tue, 31 Aug 2021 15:42:35 GMT", + "ETag": "W/\u0022datetime\u00272021-08-31T15%3A42%3A35.6397064Z\u0027\u0022", "Location": "https://seankaneprim.table.cosmos.azure.com/Tables(\u0027zzza3\u0027)", "Transfer-Encoding": "chunked", - "x-ms-request-id": "0a7f5e9f-3af7-41b0-aece-2ebda3d60b6d" + "x-ms-request-id": "b5b2bcb7-64df-48df-88f8-189785cc2b6c" }, "ResponseBody": { "TableName": "zzza3", @@ -154,8 +154,8 @@ "Content-Length": "21", "Content-Type": "application/json", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:02:19 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:42:35 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": { @@ -164,11 +164,11 @@ "StatusCode": 201, "ResponseHeaders": { "Content-Type": "application/json; odata=minimalmetadata", - "Date": "Mon, 02 Aug 2021 18:02:18 GMT", - "ETag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A18.7719688Z\u0027\u0022", + "Date": "Tue, 31 Aug 2021 15:42:35 GMT", + "ETag": "W/\u0022datetime\u00272021-08-31T15%3A42%3A36.1499656Z\u0027\u0022", "Location": "https://seankaneprim.table.cosmos.azure.com/Tables(\u0027zzzb4\u0027)", "Transfer-Encoding": "chunked", - "x-ms-request-id": "8a89d850-cd07-401f-acff-a16095f56252" + "x-ms-request-id": "f4dc2c26-be99-4148-9186-b74243730084" }, "ResponseBody": { "TableName": "zzzb4", @@ -176,144 +176,144 @@ } }, { - "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables?%24filter=TableName\u002Bge\u002B%27zzza%27\u002Band\u002BTableName\u002Blt\u002B%27zzzb%27", + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables?%24filter=TableName\u002Bge\u002B%27zzza%27\u002Band\u002BTableName\u002Blt\u002B%27zzzb%27\u0026%24format=application%2Fjson%3Bodata%3Dminimalmetadata", "RequestMethod": "GET", "RequestHeaders": { ":authority": "localhost:5001", ":method": "GET", - ":path": "/Tables?%24filter=TableName\u002Bge\u002B%27zzza%27\u002Band\u002BTableName\u002Blt\u002B%27zzzb%27", + ":path": "/Tables?%24filter=TableName\u002Bge\u002B%27zzza%27\u002Band\u002BTableName\u002Blt\u002B%27zzzb%27\u0026%24format=application%2Fjson%3Bodata%3Dminimalmetadata", ":scheme": "https", "Accept": "application/json;odata=minimalmetadata", "Accept-Encoding": "gzip", "Authorization": "Sanitized", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:02:20 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:42:36 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { "Content-Type": "application/json; odata=minimalmetadata", - "Date": "Mon, 02 Aug 2021 18:02:19 GMT", + "Date": "Tue, 31 Aug 2021 15:42:35 GMT", "Transfer-Encoding": "chunked", - "x-ms-request-id": "180dcca7-a969-4771-8f9a-b6523df4bed7" + "x-ms-request-id": "8fe373cc-034c-4baf-be8f-b3d1b0b4f8e7" }, "ResponseBody": { "value": [ { - "TableName": "zzza0" + "TableName": "zzza1" }, { - "TableName": "zzza3" + "TableName": "zzza2" }, { - "TableName": "zzza1" + "TableName": "zzza3" }, { - "TableName": "zzza2" + "TableName": "zzza0" } ], "odata.metadata": "https://seankaneprim.table.cosmos.azure.com/$metadata#Tables" } }, { - "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables?%24filter=TableName\u002Bge\u002B%27zzza%27\u002Band\u002BTableName\u002Blt\u002B%27zzzb%27\u0026%24top=2", + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables?%24filter=TableName\u002Bge\u002B%27zzza%27\u002Band\u002BTableName\u002Blt\u002B%27zzzb%27\u0026%24format=application%2Fjson%3Bodata%3Dminimalmetadata\u0026%24top=2", "RequestMethod": "GET", "RequestHeaders": { ":authority": "localhost:5001", ":method": "GET", - ":path": "/Tables?%24filter=TableName\u002Bge\u002B%27zzza%27\u002Band\u002BTableName\u002Blt\u002B%27zzzb%27\u0026%24top=2", + ":path": "/Tables?%24filter=TableName\u002Bge\u002B%27zzza%27\u002Band\u002BTableName\u002Blt\u002B%27zzzb%27\u0026%24format=application%2Fjson%3Bodata%3Dminimalmetadata\u0026%24top=2", ":scheme": "https", "Accept": "application/json;odata=minimalmetadata", "Accept-Encoding": "gzip", "Authorization": "Sanitized", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:02:20 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:42:36 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { "Content-Type": "application/json; odata=minimalmetadata", - "Date": "Mon, 02 Aug 2021 18:02:19 GMT", + "Date": "Tue, 31 Aug 2021 15:42:35 GMT", "Transfer-Encoding": "chunked", - "x-ms-continuation-NextTableName": "-RID:~yatLAPMFP4M=#RT:1#TRC:2", - "x-ms-request-id": "4deb9f37-feab-4c23-8e93-0d359da5057b" + "x-ms-continuation-NextTableName": "-RID:~UGoPAMKQnWk=#RT:1#TRC:2", + "x-ms-request-id": "67f123b8-8828-486e-9d70-3f0be70a37f6" }, "ResponseBody": { "value": [ { - "TableName": "zzza0" + "TableName": "zzza1" }, { - "TableName": "zzza3" + "TableName": "zzza2" } ], "odata.metadata": "https://seankaneprim.table.cosmos.azure.com/$metadata#Tables" } }, { - "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables?%24filter=TableName\u002Bge\u002B%27zzza%27\u002Band\u002BTableName\u002Blt\u002B%27zzzb%27\u0026%24top=2\u0026NextTableName=-RID%3A~yatLAPMFP4M%3D%23RT%3A1%23TRC%3A2", + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables?%24filter=TableName\u002Bge\u002B%27zzza%27\u002Band\u002BTableName\u002Blt\u002B%27zzzb%27\u0026%24format=application%2Fjson%3Bodata%3Dminimalmetadata\u0026%24top=2\u0026NextTableName=-RID%3A~UGoPAMKQnWk%3D%23RT%3A1%23TRC%3A2", "RequestMethod": "GET", "RequestHeaders": { ":authority": "localhost:5001", ":method": "GET", - ":path": "/Tables?%24filter=TableName\u002Bge\u002B%27zzza%27\u002Band\u002BTableName\u002Blt\u002B%27zzzb%27\u0026%24top=2\u0026NextTableName=-RID%3A~yatLAPMFP4M%3D%23RT%3A1%23TRC%3A2", + ":path": "/Tables?%24filter=TableName\u002Bge\u002B%27zzza%27\u002Band\u002BTableName\u002Blt\u002B%27zzzb%27\u0026%24format=application%2Fjson%3Bodata%3Dminimalmetadata\u0026%24top=2\u0026NextTableName=-RID%3A~UGoPAMKQnWk%3D%23RT%3A1%23TRC%3A2", ":scheme": "https", "Accept": "application/json;odata=minimalmetadata", "Accept-Encoding": "gzip", "Authorization": "Sanitized", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:02:20 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:42:36 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { "Content-Type": "application/json; odata=minimalmetadata", - "Date": "Mon, 02 Aug 2021 18:02:19 GMT", + "Date": "Tue, 31 Aug 2021 15:42:35 GMT", "Transfer-Encoding": "chunked", - "x-ms-continuation-NextTableName": "-RID:~yatLALb4G9c=#RT:2#TRC:4", - "x-ms-request-id": "4467d925-cd70-42d8-b43e-c7c846e96fa4" + "x-ms-continuation-NextTableName": "-RID:~UGoPALkAOPo=#RT:2#TRC:4", + "x-ms-request-id": "fe9dbe88-f6b0-4cd6-8b39-211e13b0a02a" }, "ResponseBody": { "value": [ { - "TableName": "zzza1" + "TableName": "zzza3" }, { - "TableName": "zzza2" + "TableName": "zzza0" } ], "odata.metadata": "https://seankaneprim.table.cosmos.azure.com/$metadata#Tables" } }, { - "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables?%24filter=TableName\u002Bge\u002B%27zzza%27\u002Band\u002BTableName\u002Blt\u002B%27zzzb%27\u0026%24top=2\u0026NextTableName=-RID%3A~yatLALb4G9c%3D%23RT%3A2%23TRC%3A4", + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables?%24filter=TableName\u002Bge\u002B%27zzza%27\u002Band\u002BTableName\u002Blt\u002B%27zzzb%27\u0026%24format=application%2Fjson%3Bodata%3Dminimalmetadata\u0026%24top=2\u0026NextTableName=-RID%3A~UGoPALkAOPo%3D%23RT%3A2%23TRC%3A4", "RequestMethod": "GET", "RequestHeaders": { ":authority": "localhost:5001", ":method": "GET", - ":path": "/Tables?%24filter=TableName\u002Bge\u002B%27zzza%27\u002Band\u002BTableName\u002Blt\u002B%27zzzb%27\u0026%24top=2\u0026NextTableName=-RID%3A~yatLALb4G9c%3D%23RT%3A2%23TRC%3A4", + ":path": "/Tables?%24filter=TableName\u002Bge\u002B%27zzza%27\u002Band\u002BTableName\u002Blt\u002B%27zzzb%27\u0026%24format=application%2Fjson%3Bodata%3Dminimalmetadata\u0026%24top=2\u0026NextTableName=-RID%3A~UGoPALkAOPo%3D%23RT%3A2%23TRC%3A4", ":scheme": "https", "Accept": "application/json;odata=minimalmetadata", "Accept-Encoding": "gzip", "Authorization": "Sanitized", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:02:20 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:42:36 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { "Content-Type": "application/json; odata=minimalmetadata", - "Date": "Mon, 02 Aug 2021 18:02:19 GMT", + "Date": "Tue, 31 Aug 2021 15:42:35 GMT", "Transfer-Encoding": "chunked", - "x-ms-request-id": "11918ddc-78bc-4649-9217-b103371422bb" + "x-ms-request-id": "c8f69b47-4f78-473a-a3d1-3d7cf6ff4041" }, "ResponseBody": { "value": [], @@ -332,151 +332,151 @@ "Accept-Encoding": "gzip", "Authorization": "Sanitized", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:02:20 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:42:36 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { "Content-Type": "application/json; odata=minimalmetadata", - "Date": "Mon, 02 Aug 2021 18:02:19 GMT", + "Date": "Tue, 31 Aug 2021 15:42:36 GMT", "Transfer-Encoding": "chunked", - "x-ms-request-id": "2ae878d6-b367-4b6b-8dba-c4be9854e272" + "x-ms-request-id": "940d990a-fb59-4d8e-aa55-74e27e196488" }, "ResponseBody": { "value": [ { - "TableName": "zzza0" + "TableName": "zzza1" }, { - "TableName": "zzza3" + "TableName": "zzzb4" }, { - "TableName": "zzza1" + "TableName": "zzza2" }, { - "TableName": "zzzb4" + "TableName": "zzza3" }, { - "TableName": "zzza2" + "TableName": "zzza0" } ], "odata.metadata": "https://seankaneprim.table.cosmos.azure.com/$metadata#Tables" } }, { - "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables(\u0027zzza0\u0027)", + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables(\u0027zzza1\u0027)", "RequestMethod": "DELETE", "RequestHeaders": { ":authority": "localhost:5001", ":method": "DELETE", - ":path": "/Tables(\u0027zzza0\u0027)", + ":path": "/Tables(\u0027zzza1\u0027)", ":scheme": "https", "Accept": "application/json", "Accept-Encoding": "gzip", "Authorization": "Sanitized", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:02:20 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:42:36 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": null, "StatusCode": 204, "ResponseHeaders": { - "Date": "Mon, 02 Aug 2021 18:02:20 GMT", - "x-ms-request-id": "8a84bd87-d58b-423e-b4e9-a2666cedf002" + "Date": "Tue, 31 Aug 2021 15:42:36 GMT", + "x-ms-request-id": "bcd14b87-451d-47fc-9e31-af180bc44f5c" }, "ResponseBody": null }, { - "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables(\u0027zzza3\u0027)", + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables(\u0027zzzb4\u0027)", "RequestMethod": "DELETE", "RequestHeaders": { ":authority": "localhost:5001", ":method": "DELETE", - ":path": "/Tables(\u0027zzza3\u0027)", + ":path": "/Tables(\u0027zzzb4\u0027)", ":scheme": "https", "Accept": "application/json", "Accept-Encoding": "gzip", "Authorization": "Sanitized", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:02:21 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:42:36 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": null, "StatusCode": 204, "ResponseHeaders": { - "Date": "Mon, 02 Aug 2021 18:02:20 GMT", - "x-ms-request-id": "b7343aa8-9358-430f-8a54-21a6202fb97e" + "Date": "Tue, 31 Aug 2021 15:42:36 GMT", + "x-ms-request-id": "c3b130cb-615d-4fd6-9dad-4630ee2caff6" }, "ResponseBody": null }, { - "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables(\u0027zzza1\u0027)", + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables(\u0027zzza2\u0027)", "RequestMethod": "DELETE", "RequestHeaders": { ":authority": "localhost:5001", ":method": "DELETE", - ":path": "/Tables(\u0027zzza1\u0027)", + ":path": "/Tables(\u0027zzza2\u0027)", ":scheme": "https", "Accept": "application/json", "Accept-Encoding": "gzip", "Authorization": "Sanitized", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:02:21 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:42:37 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": null, "StatusCode": 204, "ResponseHeaders": { - "Date": "Mon, 02 Aug 2021 18:02:20 GMT", - "x-ms-request-id": "84eb2a70-be21-4853-81b6-4054571b8f3b" + "Date": "Tue, 31 Aug 2021 15:42:36 GMT", + "x-ms-request-id": "72b7b5c1-6a19-4fb7-8284-6979c87fa487" }, "ResponseBody": null }, { - "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables(\u0027zzzb4\u0027)", + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables(\u0027zzza3\u0027)", "RequestMethod": "DELETE", "RequestHeaders": { ":authority": "localhost:5001", ":method": "DELETE", - ":path": "/Tables(\u0027zzzb4\u0027)", + ":path": "/Tables(\u0027zzza3\u0027)", ":scheme": "https", "Accept": "application/json", "Accept-Encoding": "gzip", "Authorization": "Sanitized", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:02:22 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:42:37 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": null, "StatusCode": 204, "ResponseHeaders": { - "Date": "Mon, 02 Aug 2021 18:02:21 GMT", - "x-ms-request-id": "2c6a27c2-b190-455f-a838-a1a245cec07b" + "Date": "Tue, 31 Aug 2021 15:42:37 GMT", + "x-ms-request-id": "2daa266c-33a5-44d5-a204-3f52c735436f" }, "ResponseBody": null }, { - "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables(\u0027zzza2\u0027)", + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables(\u0027zzza0\u0027)", "RequestMethod": "DELETE", "RequestHeaders": { ":authority": "localhost:5001", ":method": "DELETE", - ":path": "/Tables(\u0027zzza2\u0027)", + ":path": "/Tables(\u0027zzza0\u0027)", ":scheme": "https", "Accept": "application/json", "Accept-Encoding": "gzip", "Authorization": "Sanitized", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:02:22 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:42:37 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": null, "StatusCode": 204, "ResponseHeaders": { - "Date": "Mon, 02 Aug 2021 18:02:21 GMT", - "x-ms-request-id": "6b6d66de-bdc9-4812-8973-356a0d74551e" + "Date": "Tue, 31 Aug 2021 15:42:37 GMT", + "x-ms-request-id": "e5357de0-8ad8-43b2-a957-196b3369d98d" }, "ResponseBody": null } diff --git a/sdk/tables/aztable/recordings/TestQueryTable/TestQueryTable_storage.json b/sdk/tables/aztable/recordings/TestQueryTable/TestQueryTable_storage.json index 317df177e52b..47e616ae4b85 100644 --- a/sdk/tables/aztable/recordings/TestQueryTable/TestQueryTable_storage.json +++ b/sdk/tables/aztable/recordings/TestQueryTable/TestQueryTable_storage.json @@ -14,8 +14,8 @@ "Content-Length": "21", "Content-Type": "application/json", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:02:14 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:42:30 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": { @@ -25,7 +25,7 @@ "ResponseHeaders": { "Cache-Control": "no-cache", "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", - "Date": "Mon, 02 Aug 2021 18:02:12 GMT", + "Date": "Tue, 31 Aug 2021 15:42:31 GMT", "Location": "https://seankaneprim.table.core.windows.net/Tables(\u0027zzza0\u0027)", "Server": [ "Windows-Azure-Table/1.0", @@ -33,7 +33,7 @@ ], "Transfer-Encoding": "chunked", "X-Content-Type-Options": "nosniff", - "x-ms-request-id": "a05b7636-9002-0057-3bc8-874646000000", + "x-ms-request-id": "6b1ca254-b002-0007-4f7e-9e1dbe000000", "x-ms-version": "2019-02-02" }, "ResponseBody": { @@ -55,8 +55,8 @@ "Content-Length": "21", "Content-Type": "application/json", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:02:14 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:42:31 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": { @@ -66,7 +66,7 @@ "ResponseHeaders": { "Cache-Control": "no-cache", "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", - "Date": "Mon, 02 Aug 2021 18:02:12 GMT", + "Date": "Tue, 31 Aug 2021 15:42:31 GMT", "Location": "https://seankaneprim.table.core.windows.net/Tables(\u0027zzza1\u0027)", "Server": [ "Windows-Azure-Table/1.0", @@ -74,7 +74,7 @@ ], "Transfer-Encoding": "chunked", "X-Content-Type-Options": "nosniff", - "x-ms-request-id": "a05b765f-9002-0057-62c8-874646000000", + "x-ms-request-id": "6b1ca391-b002-0007-737e-9e1dbe000000", "x-ms-version": "2019-02-02" }, "ResponseBody": { @@ -96,8 +96,8 @@ "Content-Length": "21", "Content-Type": "application/json", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:02:14 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:42:31 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": { @@ -107,7 +107,7 @@ "ResponseHeaders": { "Cache-Control": "no-cache", "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", - "Date": "Mon, 02 Aug 2021 18:02:12 GMT", + "Date": "Tue, 31 Aug 2021 15:42:31 GMT", "Location": "https://seankaneprim.table.core.windows.net/Tables(\u0027zzza2\u0027)", "Server": [ "Windows-Azure-Table/1.0", @@ -115,7 +115,7 @@ ], "Transfer-Encoding": "chunked", "X-Content-Type-Options": "nosniff", - "x-ms-request-id": "a05b7687-9002-0057-04c8-874646000000", + "x-ms-request-id": "6b1ca3b3-b002-0007-137e-9e1dbe000000", "x-ms-version": "2019-02-02" }, "ResponseBody": { @@ -137,8 +137,8 @@ "Content-Length": "21", "Content-Type": "application/json", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:02:14 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:42:31 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": { @@ -148,7 +148,7 @@ "ResponseHeaders": { "Cache-Control": "no-cache", "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", - "Date": "Mon, 02 Aug 2021 18:02:13 GMT", + "Date": "Tue, 31 Aug 2021 15:42:32 GMT", "Location": "https://seankaneprim.table.core.windows.net/Tables(\u0027zzza3\u0027)", "Server": [ "Windows-Azure-Table/1.0", @@ -156,7 +156,7 @@ ], "Transfer-Encoding": "chunked", "X-Content-Type-Options": "nosniff", - "x-ms-request-id": "a05b76ae-9002-0057-26c8-874646000000", + "x-ms-request-id": "6b1ca3dc-b002-0007-387e-9e1dbe000000", "x-ms-version": "2019-02-02" }, "ResponseBody": { @@ -178,8 +178,8 @@ "Content-Length": "21", "Content-Type": "application/json", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:02:14 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:42:32 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": { @@ -189,7 +189,7 @@ "ResponseHeaders": { "Cache-Control": "no-cache", "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", - "Date": "Mon, 02 Aug 2021 18:02:13 GMT", + "Date": "Tue, 31 Aug 2021 15:42:32 GMT", "Location": "https://seankaneprim.table.core.windows.net/Tables(\u0027zzzb4\u0027)", "Server": [ "Windows-Azure-Table/1.0", @@ -197,7 +197,7 @@ ], "Transfer-Encoding": "chunked", "X-Content-Type-Options": "nosniff", - "x-ms-request-id": "a05b76d3-9002-0057-4ac8-874646000000", + "x-ms-request-id": "6b1ca41f-b002-0007-787e-9e1dbe000000", "x-ms-version": "2019-02-02" }, "ResponseBody": { @@ -206,19 +206,19 @@ } }, { - "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables?%24filter=TableName\u002Bge\u002B%27zzza%27\u002Band\u002BTableName\u002Blt\u002B%27zzzb%27", + "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables?%24filter=TableName\u002Bge\u002B%27zzza%27\u002Band\u002BTableName\u002Blt\u002B%27zzzb%27\u0026%24format=application%2Fjson%3Bodata%3Dminimalmetadata", "RequestMethod": "GET", "RequestHeaders": { ":authority": "localhost:5001", ":method": "GET", - ":path": "/Tables?%24filter=TableName\u002Bge\u002B%27zzza%27\u002Band\u002BTableName\u002Blt\u002B%27zzzb%27", + ":path": "/Tables?%24filter=TableName\u002Bge\u002B%27zzza%27\u002Band\u002BTableName\u002Blt\u002B%27zzzb%27\u0026%24format=application%2Fjson%3Bodata%3Dminimalmetadata", ":scheme": "https", "Accept": "application/json;odata=minimalmetadata", "Accept-Encoding": "gzip", "Authorization": "Sanitized", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:02:14 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:42:32 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": null, @@ -226,15 +226,14 @@ "ResponseHeaders": { "Cache-Control": "no-cache", "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", - "Date": "Mon, 02 Aug 2021 18:02:13 GMT", + "Date": "Tue, 31 Aug 2021 15:42:32 GMT", "Server": [ "Windows-Azure-Table/1.0", "Microsoft-HTTPAPI/2.0" ], "Transfer-Encoding": "chunked", - "Vary": "Origin", "X-Content-Type-Options": "nosniff", - "x-ms-request-id": "a05b770b-9002-0057-7ec8-874646000000", + "x-ms-request-id": "6b1ca44e-b002-0007-217e-9e1dbe000000", "x-ms-version": "2019-02-02" }, "ResponseBody": { @@ -256,19 +255,19 @@ } }, { - "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables?%24filter=TableName\u002Bge\u002B%27zzza%27\u002Band\u002BTableName\u002Blt\u002B%27zzzb%27\u0026%24top=2", + "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables?%24filter=TableName\u002Bge\u002B%27zzza%27\u002Band\u002BTableName\u002Blt\u002B%27zzzb%27\u0026%24format=application%2Fjson%3Bodata%3Dminimalmetadata\u0026%24top=2", "RequestMethod": "GET", "RequestHeaders": { ":authority": "localhost:5001", ":method": "GET", - ":path": "/Tables?%24filter=TableName\u002Bge\u002B%27zzza%27\u002Band\u002BTableName\u002Blt\u002B%27zzzb%27\u0026%24top=2", + ":path": "/Tables?%24filter=TableName\u002Bge\u002B%27zzza%27\u002Band\u002BTableName\u002Blt\u002B%27zzzb%27\u0026%24format=application%2Fjson%3Bodata%3Dminimalmetadata\u0026%24top=2", ":scheme": "https", "Accept": "application/json;odata=minimalmetadata", "Accept-Encoding": "gzip", "Authorization": "Sanitized", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:02:15 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:42:32 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": null, @@ -276,16 +275,15 @@ "ResponseHeaders": { "Cache-Control": "no-cache", "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", - "Date": "Mon, 02 Aug 2021 18:02:13 GMT", + "Date": "Tue, 31 Aug 2021 15:42:32 GMT", "Server": [ "Windows-Azure-Table/1.0", "Microsoft-HTTPAPI/2.0" ], "Transfer-Encoding": "chunked", - "Vary": "Origin", "X-Content-Type-Options": "nosniff", - "x-ms-continuation-NextTableName": "1!32!enp6YTIBMDFkNzg3Yzg4NWMxMTg0ZA--", - "x-ms-request-id": "a05b7745-9002-0057-33c8-874646000000", + "x-ms-continuation-NextTableName": "1!32!enp6YTIBMDFkNzllN2VkMDBlOGU5MQ--", + "x-ms-request-id": "6b1ca482-b002-0007-527e-9e1dbe000000", "x-ms-version": "2019-02-02" }, "ResponseBody": { @@ -301,19 +299,19 @@ } }, { - "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables?%24filter=TableName\u002Bge\u002B%27zzza%27\u002Band\u002BTableName\u002Blt\u002B%27zzzb%27\u0026%24top=2\u0026NextTableName=1%2132%21enp6YTIBMDFkNzg3Yzg4NWMxMTg0ZA--", + "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables?%24filter=TableName\u002Bge\u002B%27zzza%27\u002Band\u002BTableName\u002Blt\u002B%27zzzb%27\u0026%24format=application%2Fjson%3Bodata%3Dminimalmetadata\u0026%24top=2\u0026NextTableName=1%2132%21enp6YTIBMDFkNzllN2VkMDBlOGU5MQ--", "RequestMethod": "GET", "RequestHeaders": { ":authority": "localhost:5001", ":method": "GET", - ":path": "/Tables?%24filter=TableName\u002Bge\u002B%27zzza%27\u002Band\u002BTableName\u002Blt\u002B%27zzzb%27\u0026%24top=2\u0026NextTableName=1%2132%21enp6YTIBMDFkNzg3Yzg4NWMxMTg0ZA--", + ":path": "/Tables?%24filter=TableName\u002Bge\u002B%27zzza%27\u002Band\u002BTableName\u002Blt\u002B%27zzzb%27\u0026%24format=application%2Fjson%3Bodata%3Dminimalmetadata\u0026%24top=2\u0026NextTableName=1%2132%21enp6YTIBMDFkNzllN2VkMDBlOGU5MQ--", ":scheme": "https", "Accept": "application/json;odata=minimalmetadata", "Accept-Encoding": "gzip", "Authorization": "Sanitized", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:02:15 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:42:32 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": null, @@ -321,15 +319,14 @@ "ResponseHeaders": { "Cache-Control": "no-cache", "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", - "Date": "Mon, 02 Aug 2021 18:02:13 GMT", + "Date": "Tue, 31 Aug 2021 15:42:32 GMT", "Server": [ "Windows-Azure-Table/1.0", "Microsoft-HTTPAPI/2.0" ], "Transfer-Encoding": "chunked", - "Vary": "Origin", "X-Content-Type-Options": "nosniff", - "x-ms-request-id": "a05b7778-9002-0057-66c8-874646000000", + "x-ms-request-id": "6b1ca4bd-b002-0007-0a7e-9e1dbe000000", "x-ms-version": "2019-02-02" }, "ResponseBody": { @@ -356,8 +353,8 @@ "Accept-Encoding": "gzip", "Authorization": "Sanitized", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:02:15 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:42:32 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": null, @@ -365,15 +362,14 @@ "ResponseHeaders": { "Cache-Control": "no-cache", "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", - "Date": "Mon, 02 Aug 2021 18:02:13 GMT", + "Date": "Tue, 31 Aug 2021 15:42:32 GMT", "Server": [ "Windows-Azure-Table/1.0", "Microsoft-HTTPAPI/2.0" ], "Transfer-Encoding": "chunked", - "Vary": "Origin", "X-Content-Type-Options": "nosniff", - "x-ms-request-id": "a05b77b1-9002-0057-19c8-874646000000", + "x-ms-request-id": "6b1ca4dd-b002-0007-277e-9e1dbe000000", "x-ms-version": "2019-02-02" }, "ResponseBody": { @@ -408,8 +404,8 @@ "Accept": "application/json", "Accept-Encoding": "gzip", "Authorization": "Sanitized", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:02:15 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:42:32 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": null, @@ -417,13 +413,13 @@ "ResponseHeaders": { "Cache-Control": "no-cache", "Content-Length": "0", - "Date": "Mon, 02 Aug 2021 18:02:13 GMT", + "Date": "Tue, 31 Aug 2021 15:42:32 GMT", "Server": [ "Windows-Azure-Table/1.0", "Microsoft-HTTPAPI/2.0" ], "X-Content-Type-Options": "nosniff", - "x-ms-request-id": "a05b77cf-9002-0057-37c8-874646000000", + "x-ms-request-id": "6b1ca503-b002-0007-477e-9e1dbe000000", "x-ms-version": "2019-02-02" }, "ResponseBody": null @@ -439,8 +435,8 @@ "Accept": "application/json", "Accept-Encoding": "gzip", "Authorization": "Sanitized", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:02:15 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:42:32 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": null, @@ -448,13 +444,13 @@ "ResponseHeaders": { "Cache-Control": "no-cache", "Content-Length": "0", - "Date": "Mon, 02 Aug 2021 18:02:14 GMT", + "Date": "Tue, 31 Aug 2021 15:42:32 GMT", "Server": [ "Windows-Azure-Table/1.0", "Microsoft-HTTPAPI/2.0" ], "X-Content-Type-Options": "nosniff", - "x-ms-request-id": "a05b77f0-9002-0057-58c8-874646000000", + "x-ms-request-id": "6b1ca52e-b002-0007-707e-9e1dbe000000", "x-ms-version": "2019-02-02" }, "ResponseBody": null @@ -470,8 +466,8 @@ "Accept": "application/json", "Accept-Encoding": "gzip", "Authorization": "Sanitized", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:02:15 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:42:32 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": null, @@ -479,13 +475,13 @@ "ResponseHeaders": { "Cache-Control": "no-cache", "Content-Length": "0", - "Date": "Mon, 02 Aug 2021 18:02:14 GMT", + "Date": "Tue, 31 Aug 2021 15:42:32 GMT", "Server": [ "Windows-Azure-Table/1.0", "Microsoft-HTTPAPI/2.0" ], "X-Content-Type-Options": "nosniff", - "x-ms-request-id": "a05b7819-9002-0057-01c8-874646000000", + "x-ms-request-id": "6b1ca54e-b002-0007-0e7e-9e1dbe000000", "x-ms-version": "2019-02-02" }, "ResponseBody": null @@ -501,8 +497,8 @@ "Accept": "application/json", "Accept-Encoding": "gzip", "Authorization": "Sanitized", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:02:15 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:42:33 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": null, @@ -510,13 +506,13 @@ "ResponseHeaders": { "Cache-Control": "no-cache", "Content-Length": "0", - "Date": "Mon, 02 Aug 2021 18:02:14 GMT", + "Date": "Tue, 31 Aug 2021 15:42:33 GMT", "Server": [ "Windows-Azure-Table/1.0", "Microsoft-HTTPAPI/2.0" ], "X-Content-Type-Options": "nosniff", - "x-ms-request-id": "a05b784b-9002-0057-2cc8-874646000000", + "x-ms-request-id": "6b1ca569-b002-0007-267e-9e1dbe000000", "x-ms-version": "2019-02-02" }, "ResponseBody": null @@ -532,8 +528,8 @@ "Accept": "application/json", "Accept-Encoding": "gzip", "Authorization": "Sanitized", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:02:15 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Tue, 31 Aug 2021 15:42:33 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": null, @@ -541,13 +537,13 @@ "ResponseHeaders": { "Cache-Control": "no-cache", "Content-Length": "0", - "Date": "Mon, 02 Aug 2021 18:02:14 GMT", + "Date": "Tue, 31 Aug 2021 15:42:33 GMT", "Server": [ "Windows-Azure-Table/1.0", "Microsoft-HTTPAPI/2.0" ], "X-Content-Type-Options": "nosniff", - "x-ms-request-id": "a05b7871-9002-0057-4fc8-874646000000", + "x-ms-request-id": "6b1ca593-b002-0007-4a7e-9e1dbe000000", "x-ms-version": "2019-02-02" }, "ResponseBody": null diff --git a/sdk/tables/aztable/recordings/TestServiceErrorsServiceClient/TestServiceErrorsServiceClient_cosmos.json b/sdk/tables/aztable/recordings/TestServiceErrorsServiceClient/TestServiceErrorsServiceClient_cosmos.json index 4637eb292845..2840ff74a8ab 100644 --- a/sdk/tables/aztable/recordings/TestServiceErrorsServiceClient/TestServiceErrorsServiceClient_cosmos.json +++ b/sdk/tables/aztable/recordings/TestServiceErrorsServiceClient/TestServiceErrorsServiceClient_cosmos.json @@ -11,27 +11,27 @@ "Accept": "application/json;odata=minimalmetadata", "Accept-Encoding": "gzip", "Authorization": "Sanitized", - "Content-Length": "25", + "Content-Length": "35", "Content-Type": "application/json", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:02:10 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Thu, 26 Aug 2021 15:49:28 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": { - "TableName": "tableName" + "TableName": "tableName1284590823" }, "StatusCode": 201, "ResponseHeaders": { "Content-Type": "application/json; odata=minimalmetadata", - "Date": "Mon, 02 Aug 2021 18:02:09 GMT", - "ETag": "W/\u0022datetime\u00272021-08-02T18%3A02%3A09.7852424Z\u0027\u0022", - "Location": "https://seankaneprim.table.cosmos.azure.com/Tables(\u0027tableName\u0027)", + "Date": "Thu, 26 Aug 2021 15:49:29 GMT", + "ETag": "W/\u0022datetime\u00272021-08-26T15%3A49%3A29.8447368Z\u0027\u0022", + "Location": "https://seankaneprim.table.cosmos.azure.com/Tables(\u0027tableName1284590823\u0027)", "Transfer-Encoding": "chunked", - "x-ms-request-id": "e9d25d08-5ac8-4fc1-b3b2-cf1901b7f95d" + "x-ms-request-id": "1dd81e1f-bf66-4160-a9a5-db1f8692207e" }, "ResponseBody": { - "TableName": "tableName", + "TableName": "tableName1284590823", "odata.metadata": "https://seankaneprim.table.cosmos.azure.com/$metadata#Tables/@Element" } }, @@ -46,47 +46,47 @@ "Accept": "application/json;odata=minimalmetadata", "Accept-Encoding": "gzip", "Authorization": "Sanitized", - "Content-Length": "25", + "Content-Length": "35", "Content-Type": "application/json", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:02:10 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Thu, 26 Aug 2021 15:49:29 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": { - "TableName": "tableName" + "TableName": "tableName1284590823" }, "StatusCode": 409, "ResponseHeaders": { "Content-Type": "application/json; odata=minimalmetadata", - "Date": "Mon, 02 Aug 2021 18:02:10 GMT", + "Date": "Thu, 26 Aug 2021 15:49:29 GMT", "Transfer-Encoding": "chunked", - "x-ms-request-id": "9385f1ff-3d0f-4a34-a196-072200111488" + "x-ms-request-id": "f5e9bddd-6a4f-47d8-bfdd-aa9900baa954" }, "ResponseBody": [ - "{\u0022odata.error\u0022:{\u0022code\u0022:\u0022TableAlreadyExists\u0022,\u0022message\u0022:{\u0022lang\u0022:\u0022en-us\u0022,\u0022value\u0022:\u0022The specified table already exists.\\nRequestID:9385f1ff-3d0f-4a34-a196-072200111488\\n\u0022}}}\r\n" + "{\u0022odata.error\u0022:{\u0022code\u0022:\u0022TableAlreadyExists\u0022,\u0022message\u0022:{\u0022lang\u0022:\u0022en-us\u0022,\u0022value\u0022:\u0022The specified table already exists.\\nRequestID:f5e9bddd-6a4f-47d8-bfdd-aa9900baa954\\n\u0022}}}\r\n" ] }, { - "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables(\u0027tableName\u0027)", + "RequestUri": "https://fakestorageaccount.table.cosmos.azure.com/Tables(\u0027tableName1284590823\u0027)", "RequestMethod": "DELETE", "RequestHeaders": { ":authority": "localhost:5001", ":method": "DELETE", - ":path": "/Tables(\u0027tableName\u0027)", + ":path": "/Tables(\u0027tableName1284590823\u0027)", ":scheme": "https", "Accept": "application/json", "Accept-Encoding": "gzip", "Authorization": "Sanitized", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:02:11 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Thu, 26 Aug 2021 15:49:29 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": null, "StatusCode": 204, "ResponseHeaders": { - "Date": "Mon, 02 Aug 2021 18:02:10 GMT", - "x-ms-request-id": "fed9ae14-6c81-4721-bca1-7b7e6200d6a0" + "Date": "Thu, 26 Aug 2021 15:49:29 GMT", + "x-ms-request-id": "ed4a24c8-09be-4d61-bc23-292a0c76a235" }, "ResponseBody": null } diff --git a/sdk/tables/aztable/recordings/TestServiceErrorsServiceClient/TestServiceErrorsServiceClient_storage.json b/sdk/tables/aztable/recordings/TestServiceErrorsServiceClient/TestServiceErrorsServiceClient_storage.json index 2c5f52d3ba04..1c7c089c2fce 100644 --- a/sdk/tables/aztable/recordings/TestServiceErrorsServiceClient/TestServiceErrorsServiceClient_storage.json +++ b/sdk/tables/aztable/recordings/TestServiceErrorsServiceClient/TestServiceErrorsServiceClient_storage.json @@ -11,34 +11,34 @@ "Accept": "application/json;odata=minimalmetadata", "Accept-Encoding": "gzip", "Authorization": "Sanitized", - "Content-Length": "25", + "Content-Length": "35", "Content-Type": "application/json", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:02:09 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Thu, 26 Aug 2021 15:49:27 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": { - "TableName": "tableName" + "TableName": "tableName2700083744" }, "StatusCode": 201, "ResponseHeaders": { "Cache-Control": "no-cache", "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", - "Date": "Mon, 02 Aug 2021 18:02:08 GMT", - "Location": "https://seankaneprim.table.core.windows.net/Tables(\u0027tableName\u0027)", + "Date": "Thu, 26 Aug 2021 15:49:28 GMT", + "Location": "https://seankaneprim.table.core.windows.net/Tables(\u0027tableName2700083744\u0027)", "Server": [ "Windows-Azure-Table/1.0", "Microsoft-HTTPAPI/2.0" ], "Transfer-Encoding": "chunked", "X-Content-Type-Options": "nosniff", - "x-ms-request-id": "a05b709e-9002-0057-70c8-874646000000", + "x-ms-request-id": "19b2b18c-d002-0030-1791-9a1dd6000000", "x-ms-version": "2019-02-02" }, "ResponseBody": { "odata.metadata": "https://seankaneprim.table.core.windows.net/$metadata#Tables/@Element", - "TableName": "tableName" + "TableName": "tableName2700083744" } }, { @@ -52,28 +52,28 @@ "Accept": "application/json;odata=minimalmetadata", "Accept-Encoding": "gzip", "Authorization": "Sanitized", - "Content-Length": "25", + "Content-Length": "35", "Content-Type": "application/json", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:02:09 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Thu, 26 Aug 2021 15:49:28 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": { - "TableName": "tableName" + "TableName": "tableName2700083744" }, "StatusCode": 409, "ResponseHeaders": { "Cache-Control": "no-cache", "Content-Type": "application/json; odata=minimalmetadata; streaming=true; charset=utf-8", - "Date": "Mon, 02 Aug 2021 18:02:08 GMT", + "Date": "Thu, 26 Aug 2021 15:49:28 GMT", "Server": [ "Windows-Azure-Table/1.0", "Microsoft-HTTPAPI/2.0" ], "Transfer-Encoding": "chunked", "X-Content-Type-Options": "nosniff", - "x-ms-request-id": "a05b710e-9002-0057-59c8-874646000000", + "x-ms-request-id": "19b2b1bc-d002-0030-4491-9a1dd6000000", "x-ms-version": "2019-02-02" }, "ResponseBody": { @@ -81,24 +81,24 @@ "code": "TableAlreadyExists", "message": { "lang": "en-US", - "value": "The table specified already exists.\nRequestId:a05b710e-9002-0057-59c8-874646000000\nTime:2021-08-02T18:02:09.2879995Z" + "value": "The table specified already exists.\nRequestId:19b2b1bc-d002-0030-4491-9a1dd6000000\nTime:2021-08-26T15:49:29.0397581Z" } } } }, { - "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables(\u0027tableName\u0027)", + "RequestUri": "https://fakestorageaccount.table.core.windows.net/Tables(\u0027tableName2700083744\u0027)", "RequestMethod": "DELETE", "RequestHeaders": { ":authority": "localhost:5001", ":method": "DELETE", - ":path": "/Tables(\u0027tableName\u0027)", + ":path": "/Tables(\u0027tableName2700083744\u0027)", ":scheme": "https", "Accept": "application/json", "Accept-Encoding": "gzip", "Authorization": "Sanitized", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", - "x-ms-date": "Mon, 02 Aug 2021 18:02:10 GMT", + "User-Agent": "azsdk-go-internal/v0.1.0 azsdk-go-internal/v0.1.0 azcore/v0.18.0 (go1.17; Windows_NT)", + "x-ms-date": "Thu, 26 Aug 2021 15:49:28 GMT", "x-ms-version": "2019-02-02" }, "RequestBody": null, @@ -106,13 +106,13 @@ "ResponseHeaders": { "Cache-Control": "no-cache", "Content-Length": "0", - "Date": "Mon, 02 Aug 2021 18:02:08 GMT", + "Date": "Thu, 26 Aug 2021 15:49:28 GMT", "Server": [ "Windows-Azure-Table/1.0", "Microsoft-HTTPAPI/2.0" ], "X-Content-Type-Options": "nosniff", - "x-ms-request-id": "a05b7145-9002-0057-0cc8-874646000000", + "x-ms-request-id": "19b2b1c9-d002-0030-5091-9a1dd6000000", "x-ms-version": "2019-02-02" }, "ResponseBody": null diff --git a/sdk/tables/aztable/responses.go b/sdk/tables/aztable/responses.go new file mode 100644 index 000000000000..73f2ed46e01d --- /dev/null +++ b/sdk/tables/aztable/responses.go @@ -0,0 +1,202 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package aztable + +import ( + "net/http" + + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + generated "github.com/Azure/azure-sdk-for-go/sdk/tables/aztable/internal" +) + +type CreateTableResponse struct { + RawResponse *http.Response +} + +func createTableResponseFromGen(g *generated.TableCreateResponse) CreateTableResponse { + if g == nil { + return CreateTableResponse{} + } + return CreateTableResponse{ + RawResponse: g.RawResponse, + } +} + +type DeleteTableResponse struct { + RawResponse *http.Response +} + +func deleteTableResponseFromGen(g *generated.TableDeleteResponse) DeleteTableResponse { + if g == nil { + return DeleteTableResponse{} + } + return DeleteTableResponse{ + RawResponse: g.RawResponse, + } +} + +type AddEntityResponse struct { + RawResponse *http.Response + ETag azcore.ETag +} + +func addEntityResponseFromGenerated(g *generated.TableInsertEntityResponse) AddEntityResponse { + if g == nil { + return AddEntityResponse{} + } + + return AddEntityResponse{ + RawResponse: g.RawResponse, + ETag: azcore.ETag(*g.ETag), + } +} + +type DeleteEntityResponse struct { + RawResponse *http.Response +} + +func deleteEntityResponseFromGenerated(g *generated.TableDeleteEntityResponse) DeleteEntityResponse { + if g == nil { + return DeleteEntityResponse{} + } + return DeleteEntityResponse{ + RawResponse: g.RawResponse, + } +} + +type UpdateEntityResponse struct { + RawResponse *http.Response + ETag azcore.ETag +} + +func updateEntityResponseFromMergeGenerated(g *generated.TableMergeEntityResponse) UpdateEntityResponse { + if g == nil { + return UpdateEntityResponse{} + } + + return UpdateEntityResponse{ + RawResponse: g.RawResponse, + ETag: azcore.ETag(*g.ETag), + } +} + +func updateEntityResponseFromUpdateGenerated(g *generated.TableUpdateEntityResponse) UpdateEntityResponse { + if g == nil { + return UpdateEntityResponse{} + } + + return UpdateEntityResponse{ + RawResponse: g.RawResponse, + ETag: azcore.ETag(*g.ETag), + } +} + +type InsertEntityResponse struct { + RawResponse *http.Response + ETag azcore.ETag +} + +func insertEntityFromGeneratedMerge(g *generated.TableMergeEntityResponse) InsertEntityResponse { + if g == nil { + return InsertEntityResponse{} + } + + return InsertEntityResponse{ + RawResponse: g.RawResponse, + ETag: azcore.ETag(*g.ETag), + } +} + +func insertEntityFromGeneratedUpdate(g *generated.TableUpdateEntityResponse) InsertEntityResponse { + if g == nil { + return InsertEntityResponse{} + } + + return InsertEntityResponse{ + RawResponse: g.RawResponse, + ETag: azcore.ETag(*g.ETag), + } +} + +type GetAccessPolicyResponse struct { + RawResponse *http.Response + SignedIdentifiers []*SignedIdentifier +} + +func getAccessPolicyResponseFromGenerated(g *generated.TableGetAccessPolicyResponse) GetAccessPolicyResponse { + if g == nil { + return GetAccessPolicyResponse{} + } + + var sis []*SignedIdentifier + for _, s := range g.SignedIdentifiers { + sis = append(sis, fromGeneratedSignedIdentifier(s)) + } + return GetAccessPolicyResponse{ + RawResponse: g.RawResponse, + SignedIdentifiers: sis, + } +} + +type SetAccessPolicyResponse struct { + RawResponse *http.Response +} + +func setAccessPolicyResponseFromGenerated(g *generated.TableSetAccessPolicyResponse) SetAccessPolicyResponse { + if g == nil { + return SetAccessPolicyResponse{} + } + return SetAccessPolicyResponse{ + RawResponse: g.RawResponse, + } +} + +type GetStatisticsResponse struct { + RawResponse *http.Response +} + +func getStatisticsResponseFromGenerated(g *generated.ServiceGetStatisticsResponse) GetStatisticsResponse { + return GetStatisticsResponse{ + RawResponse: g.RawResponse, + } +} + +type GetPropertiesResponse struct { + RawResponse *http.Response + // The set of CORS rules. + Cors []*CorsRule `xml:"Cors>CorsRule"` + + // A summary of request statistics grouped by API in hourly aggregates for tables. + HourMetrics *Metrics `xml:"HourMetrics"` + + // Azure Analytics Logging settings. + Logging *Logging `xml:"Logging"` + + // A summary of request statistics grouped by API in minute aggregates for tables. + MinuteMetrics *Metrics `xml:"MinuteMetrics"` +} + +func getPropertiesResponseFromGenerated(g *generated.ServiceGetPropertiesResponse) GetPropertiesResponse { + var cors []*CorsRule + for _, c := range g.Cors { + cors = append(cors, fromGeneratedCors(c)) + } + return GetPropertiesResponse{ + RawResponse: g.RawResponse, + Cors: cors, + HourMetrics: fromGeneratedMetrics(g.HourMetrics), + Logging: fromGeneratedLogging(g.Logging), + MinuteMetrics: fromGeneratedMetrics(g.MinuteMetrics), + } +} + +type SetPropertiesResponse struct { + RawResponse *http.Response +} + +func setPropertiesResponseFromGenerated(g *generated.ServiceSetPropertiesResponse) SetPropertiesResponse { + return SetPropertiesResponse{ + RawResponse: g.RawResponse, + } +} diff --git a/sdk/tables/aztable/sas_account.go b/sdk/tables/aztable/sas_account.go index 664b40481c12..18c3f10a303f 100644 --- a/sdk/tables/aztable/sas_account.go +++ b/sdk/tables/aztable/sas_account.go @@ -26,9 +26,9 @@ type AccountSASSignatureValues struct { ResourceTypes string `param:"srt"` // Create by initializing AccountSASResourceTypes and then call String() } -// NewSASQueryParameters uses an account's SharedKeyCredential to sign this signature values to produce +// Sign uses an account's SharedKeyCredential to sign this signature values to produce // the proper SAS query parameters. -func (v AccountSASSignatureValues) NewSASQueryParameters(sharedKeyCredential *SharedKeyCredential) (SASQueryParameters, error) { +func (v AccountSASSignatureValues) Sign(sharedKeyCredential *SharedKeyCredential) (SASQueryParameters, error) { // https://docs.microsoft.com/en-us/rest/api/storageservices/Constructing-an-Account-SAS if v.ExpiryTime.IsZero() || v.Permissions == "" || v.ResourceTypes == "" || v.Services == "" { return SASQueryParameters{}, errors.New("account SAS is missing at least one of these: ExpiryTime, Permissions, Service, or ResourceType") @@ -84,7 +84,14 @@ func (v AccountSASSignatureValues) NewSASQueryParameters(sharedKeyCredential *Sh // The AccountSASPermissions type simplifies creating the permissions string for an Azure Storage Account SAS. // Initialize an instance of this type and then call its String method to set AccountSASSignatureValues's Permissions field. type AccountSASPermissions struct { - Read, Write, Delete, List, Add, Create, Update, Process bool + Read bool + Write bool + Delete bool + List bool + Add bool + Create bool + Update bool + Process bool } // String produces the SAS permissions string for an Azure Storage account. @@ -151,7 +158,9 @@ func (p *AccountSASPermissions) Parse(s string) error { // The AccountSASResourceTypes type simplifies creating the resource types string for an Azure Storage Account SAS. // Initialize an instance of this type and then call its String method to set AccountSASSignatureValues's ResourceTypes field. type AccountSASResourceTypes struct { - Service, Container, Object bool + Service bool + Container bool + Object bool } // String produces the SAS resource types string for an Azure Storage account. diff --git a/sdk/tables/aztable/sas_query_params.go b/sdk/tables/aztable/sas_query_params.go index 1827d1f6967c..c2b8cbfa6cb0 100644 --- a/sdk/tables/aztable/sas_query_params.go +++ b/sdk/tables/aztable/sas_query_params.go @@ -4,10 +4,8 @@ package aztable import ( - "errors" "net" "net/url" - "strings" "time" ) @@ -22,8 +20,6 @@ const ( SASProtocolHTTPSandHTTP SASProtocol = "https,http" ) -const SnapshotTimeFormat = "2006-01-02T15:04:05.0000000Z07:00" - // FormatTimesForSASSigning converts a time.Time to a snapshotTimeFormat string suitable for a // SASField's StartTime or ExpiryTime fields. Returns "" if value.IsZero(). func FormatTimesForSASSigning(startTime, expiryTime time.Time) (string, string) { @@ -38,13 +34,12 @@ func FormatTimesForSASSigning(startTime, expiryTime time.Time) (string, string) return ss, se } -// SASTimeFormat represents the format of a SAS start or expiry time. Use it when formatting/parsing a time.Time. -const SASTimeFormat = "2006-01-02T15:04:05Z" //"2017-07-27T00:00:00Z" // ISO 8601 -var SASTimeFormats = []string{"2006-01-02T15:04:05.0000000Z", SASTimeFormat, "2006-01-02T15:04Z", "2006-01-02"} // ISO 8601 formats, please refer to https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas for more details. +// sasTimeFormat represents the format of a SAS start or expiry time. Use it when formatting/parsing a time.Time. +const sasTimeFormat = "2006-01-02T15:04:05Z" //"2017-07-27T00:00:00Z" // ISO 8601 // formatSASTimeWithDefaultFormat format time with ISO 8601 in "yyyy-MM-ddTHH:mm:ssZ". func formatSASTimeWithDefaultFormat(t *time.Time) string { - return formatSASTime(t, SASTimeFormat) // By default, "yyyy-MM-ddTHH:mm:ssZ" is used + return formatSASTime(t, sasTimeFormat) // By default, "yyyy-MM-ddTHH:mm:ssZ" is used } // formatSASTime format time with given format, use ISO 8601 in "yyyy-MM-ddTHH:mm:ssZ" by default. @@ -52,24 +47,7 @@ func formatSASTime(t *time.Time, format string) string { if format != "" { return t.Format(format) } - return t.Format(SASTimeFormat) // By default, "yyyy-MM-ddTHH:mm:ssZ" is used -} - -// parseSASTimeString try to parse sas time string. -func parseSASTimeString(val string) (t time.Time, timeFormat string, err error) { //nolint - for _, sasTimeFormat := range SASTimeFormats { - t, err = time.Parse(sasTimeFormat, val) - if err == nil { - timeFormat = sasTimeFormat - break - } - } - - if err != nil { - err = errors.New("fail to parse time with IOS 8601 formats, please refer to https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas for more details") - } - - return + return t.Format(sasTimeFormat) // By default, "yyyy-MM-ddTHH:mm:ssZ" is used } // https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas @@ -180,64 +158,6 @@ func (ipr *IPRange) String() string { return start + "-" + ipr.End.String() } -// NewSASQueryParameters creates and initializes a SASQueryParameters object based on the -// query parameter map's passed-in values. If deleteSASParametersFromValues is true, -// all SAS-related query parameters are removed from the passed-in map. If -// deleteSASParametersFromValues is false, the map passed-in map is unaltered. -func newSASQueryParameters(values url.Values, deleteSASParametersFromValues bool) SASQueryParameters { //nolint - p := SASQueryParameters{} - for k, v := range values { - val := v[0] - isSASKey := true - switch strings.ToLower(k) { - case "sv": - p.version = val - case "ss": - p.services = val - case "srt": - p.resourceTypes = val - case "spr": - p.protocol = SASProtocol(val) - case "st": - p.startTime, p.stTimeFormat, _ = parseSASTimeString(val) - case "se": - p.expiryTime, p.seTimeFormat, _ = parseSASTimeString(val) - case "sip": - dashIndex := strings.Index(val, "-") - if dashIndex == -1 { - p.ipRange.Start = net.ParseIP(val) - } else { - p.ipRange.Start = net.ParseIP(val[:dashIndex]) - p.ipRange.End = net.ParseIP(val[dashIndex+1:]) - } - case "si": - p.identifier = val - case "sr": - p.resource = val - case "sp": - p.permissions = val - case "sig": - p.signature = val - case "skv": - p.signedVersion = val - case "spk": - p.startPk = val - case "epk": - p.endPk = val - case "srk": - p.startRk = val - case "erk": - p.endRk = val - default: - isSASKey = false // We didn't recognize the query parameter - } - if isSASKey && deleteSASParametersFromValues { - delete(values, k) - } - } - return p -} - // addToValues adds the SAS components to the specified query parameters map. func (p *SASQueryParameters) addToValues(v url.Values) url.Values { if p.version != "" { diff --git a/sdk/tables/aztable/sas_service.go b/sdk/tables/aztable/sas_service.go index 4d89de18a927..e64cfce5984e 100644 --- a/sdk/tables/aztable/sas_service.go +++ b/sdk/tables/aztable/sas_service.go @@ -10,9 +10,9 @@ import ( "time" ) -// TableSASSignatureValues is used to generate a Shared Access Signature (SAS) for an Azure Table instance. +// SASSignatureValues is used to generate a Shared Access Signature (SAS) for an Azure Table instance. // For more information, see https://docs.microsoft.com/rest/api/storageservices/constructing-a-service-sas -type TableSASSignatureValues struct { +type SASSignatureValues struct { Version string // If not specified, this defaults to SASVersion Protocol SASProtocol // See the SASProtocol* constants StartTime time.Time // Not specified if IsZero @@ -29,26 +29,26 @@ type TableSASSignatureValues struct { // NewSASQueryParameters uses an account's SharedKeyCredential to sign this signature values to produce // the proper SAS query parameters. -func (v TableSASSignatureValues) NewSASQueryParameters(credential *SharedKeyCredential) (SASQueryParameters, error) { +func (v SASSignatureValues) NewSASQueryParameters(credential *SharedKeyCredential) (SASQueryParameters, error) { resource := "" if v.Version != "" { //Make sure the permission characters are in the correct order - perms := &TableSASPermissions{} + perms := &SASPermissions{} if err := perms.Parse(v.Permissions); err != nil { return SASQueryParameters{}, err } v.Permissions = perms.String() } else if v.TableName == "" { // Make sure the permission characters are in the correct order - perms := &TableSASPermissions{} + perms := &SASPermissions{} if err := perms.Parse(v.Permissions); err != nil { return SASQueryParameters{}, err } v.Permissions = perms.String() } else { // Make sure the permission characters are in the correct order - perms := &TableSASPermissions{} + perms := &SASPermissions{} if err := perms.Parse(v.Permissions); err != nil { return SASQueryParameters{}, err } @@ -103,9 +103,9 @@ func (v TableSASSignatureValues) NewSASQueryParameters(credential *SharedKeyCred return p, err } -// The TableSASPermissions type simplifies creating the permissions string for an Azure Table. +// The SASPermissions type simplifies creating the permissions string for an Azure Table. // Initialize an instance of this type and then call its String method to set TableSASSignatureValues's Permissions field. -type TableSASPermissions struct { +type SASPermissions struct { Read bool Add bool Update bool @@ -118,7 +118,7 @@ type TableSASPermissions struct { // String produces the SAS permissions string for an Azure Storage blob. // Call this method to set TableSASSignatureValues's Permissions field. -func (p TableSASPermissions) String() string { +func (p SASPermissions) String() string { var b bytes.Buffer if p.Read { b.WriteRune('r') @@ -136,8 +136,8 @@ func (p TableSASPermissions) String() string { } // Parse initializes the TableSASPermissions's fields from a string. -func (p *TableSASPermissions) Parse(s string) error { - *p = TableSASPermissions{} // Clear the flags +func (p *SASPermissions) Parse(s string) error { + *p = SASPermissions{} // Clear the flags for _, r := range s { switch r { case 'r': diff --git a/sdk/tables/aztable/shared_access_signature_test.go b/sdk/tables/aztable/shared_access_signature_test.go index 2ce8451bab57..606b516c649c 100644 --- a/sdk/tables/aztable/shared_access_signature_test.go +++ b/sdk/tables/aztable/shared_access_signature_test.go @@ -18,15 +18,15 @@ import ( func TestSASServiceClient(t *testing.T) { recording.LiveOnly(t) - accountName := os.Getenv("TABLES_PRIMARY_ACCOUNT_NAME") + accountName := os.Getenv("TABLES_STORAGE_ACCOUNT_NAME") accountKey := os.Getenv("TABLES_PRIMARY_STORAGE_ACCOUNT_KEY") cred, err := NewSharedKeyCredential(accountName, accountKey) require.NoError(t, err) - serviceClient, err := NewTableServiceClient(fmt.Sprintf("https://%s.table.core.windows.net/", accountName), cred, nil) + serviceClient, err := NewServiceClient(fmt.Sprintf("https://%s.table.core.windows.net/", accountName), cred, nil) require.NoError(t, err) - tableName, err := createRandomName(t, "tableName") + tableName, err := createRandomName(t, tableNamePrefix) require.NoError(t, err) delete := func() { @@ -35,7 +35,7 @@ func TestSASServiceClient(t *testing.T) { } defer delete() - _, err = serviceClient.CreateTable(context.Background(), tableName) + _, err = serviceClient.CreateTable(context.Background(), tableName, nil) require.NoError(t, err) resources := AccountSASResourceTypes{ @@ -44,51 +44,43 @@ func TestSASServiceClient(t *testing.T) { Container: true, } permissions := AccountSASPermissions{ - Read: true, - Add: true, - Write: true, + Read: true, + Add: true, + Write: true, + Create: true, + Update: true, } start := time.Date(2021, time.August, 4, 1, 1, 0, 0, time.UTC) expiry := time.Date(2022, time.August, 4, 1, 1, 0, 0, time.UTC) - accountSAS, err := serviceClient.GetAccountSASToken(resources, permissions, start, expiry) + sasUrl, err := serviceClient.GetAccountSASToken(resources, permissions, start, expiry) require.NoError(t, err) - queryParams := accountSAS.Encode() - - sasUrl := fmt.Sprintf("https://%s.table.core.windows.net/?%s", accountName, queryParams) - err = recording.StartRecording(t, pathToPackage, nil) require.NoError(t, err) - client, err := createTableClientForRecording(t, tableName, sasUrl, azcore.NewAnonymousCredential()) + svcClient, err := createServiceClientForRecording(t, sasUrl, azcore.NewAnonymousCredential()) require.NoError(t, err) defer recording.StopRecording(t, nil) //nolint - entity := map[string]string{ - "PartitionKey": "pk001", - "RowKey": "rk001", - "Value": "5", - } - marshalled, err := json.Marshal(entity) + _, err = svcClient.CreateTable(context.Background(), "sasTable001", nil) require.NoError(t, err) - _, err = client.AddEntity(context.Background(), marshalled) + _, err = svcClient.DeleteTable(context.Background(), "sasTable001", nil) require.NoError(t, err) } -func TestSASTableClient(t *testing.T) { +func TestSASClient(t *testing.T) { recording.LiveOnly(t) - accountName := os.Getenv("TABLES_PRIMARY_ACCOUNT_NAME") + accountName := os.Getenv("TABLES_STORAGE_ACCOUNT_NAME") accountKey := os.Getenv("TABLES_PRIMARY_STORAGE_ACCOUNT_KEY") cred, err := NewSharedKeyCredential(accountName, accountKey) require.NoError(t, err) - serviceClient, err := NewTableServiceClient(fmt.Sprintf("https://%s.table.core.windows.net/", accountName), cred, nil) + serviceClient, err := NewServiceClient(fmt.Sprintf("https://%s.table.core.windows.net/", accountName), cred, nil) require.NoError(t, err) - tableName, err := createRandomName(t, "tableName") + tableName, err := createRandomName(t, tableNamePrefix) require.NoError(t, err) - tableName = "tablename" delete := func() { _, err := serviceClient.DeleteTable(context.Background(), tableName, nil) @@ -96,26 +88,23 @@ func TestSASTableClient(t *testing.T) { } defer delete() - _, err = serviceClient.CreateTable(context.Background(), tableName) + _, err = serviceClient.CreateTable(context.Background(), tableName, nil) require.NoError(t, err) - permissions := TableSASPermissions{ + permissions := SASPermissions{ Read: true, Add: true, } start := time.Date(2021, time.August, 4, 1, 1, 0, 0, time.UTC) expiry := time.Date(2022, time.August, 4, 1, 1, 0, 0, time.UTC) - accountSAS, err := serviceClient.GetTableSASToken(tableName, permissions, start, expiry) + c := serviceClient.NewClient(tableName) + sasUrl, err := c.GetTableSASToken(permissions, start, expiry) require.NoError(t, err) - queryParams := accountSAS.Encode() - - sasUrl := fmt.Sprintf("https://%s.table.core.windows.net/?%s", accountName, queryParams) - err = recording.StartRecording(t, pathToPackage, nil) require.NoError(t, err) - client, err := createTableClientForRecording(t, tableName, sasUrl, azcore.NewAnonymousCredential()) + client, err := createClientForRecording(t, "", sasUrl, azcore.NewAnonymousCredential()) require.NoError(t, err) defer recording.StopRecording(t, nil) //nolint @@ -127,21 +116,21 @@ func TestSASTableClient(t *testing.T) { marshalled, err := json.Marshal(entity) require.NoError(t, err) - _, err = client.AddEntity(context.Background(), marshalled) + _, err = client.AddEntity(context.Background(), marshalled, nil) require.NoError(t, err) } -func TestSASTableClientReadOnly(t *testing.T) { +func TestSASClientReadOnly(t *testing.T) { recording.LiveOnly(t) - accountName := os.Getenv("TABLES_PRIMARY_ACCOUNT_NAME") + accountName := os.Getenv("TABLES_STORAGE_ACCOUNT_NAME") accountKey := os.Getenv("TABLES_PRIMARY_STORAGE_ACCOUNT_KEY") cred, err := NewSharedKeyCredential(accountName, accountKey) require.NoError(t, err) - serviceClient, err := NewTableServiceClient(fmt.Sprintf("https://%s.table.core.windows.net/", accountName), cred, nil) + serviceClient, err := NewServiceClient(fmt.Sprintf("https://%s.table.core.windows.net/", accountName), cred, nil) require.NoError(t, err) - tableName, err := createRandomName(t, "tableName") + tableName, err := createRandomName(t, tableNamePrefix) require.NoError(t, err) delete := func() { @@ -150,29 +139,26 @@ func TestSASTableClientReadOnly(t *testing.T) { } defer delete() - _, err = serviceClient.CreateTable(context.Background(), tableName) + _, err = serviceClient.CreateTable(context.Background(), tableName, nil) require.NoError(t, err) - client := serviceClient.NewTableClient(tableName) + client := serviceClient.NewClient(tableName) err = insertNEntities("pk001", 4, client) require.NoError(t, err) - permissions := TableSASPermissions{ + permissions := SASPermissions{ Read: true, } start := time.Date(2021, time.August, 4, 1, 1, 0, 0, time.UTC) expiry := time.Date(2022, time.August, 4, 1, 1, 0, 0, time.UTC) - accountSAS, err := serviceClient.GetTableSASToken(tableName, permissions, start, expiry) + c := serviceClient.NewClient(tableName) + sasUrl, err := c.GetTableSASToken(permissions, start, expiry) require.NoError(t, err) - queryParams := accountSAS.Encode() - - sasUrl := fmt.Sprintf("https://%s.table.core.windows.net/?%s", accountName, queryParams) - err = recording.StartRecording(t, pathToPackage, nil) require.NoError(t, err) - client, err = createTableClientForRecording(t, tableName, sasUrl, azcore.NewAnonymousCredential()) + client, err = createClientForRecording(t, "", sasUrl, azcore.NewAnonymousCredential()) require.NoError(t, err) defer recording.StopRecording(t, nil) //nolint @@ -185,30 +171,31 @@ func TestSASTableClientReadOnly(t *testing.T) { require.NoError(t, err) // Failure on a read - _, err = client.AddEntity(context.Background(), marshalled) + _, err = client.AddEntity(context.Background(), marshalled, nil) require.Error(t, err) // Success on a list pager := client.List(nil) count := 0 for pager.NextPage(context.Background()) { - count += len(pager.PageResponse().TableEntityQueryResponse.Value) + count += len(pager.PageResponse().Entities) } + require.NoError(t, pager.Err()) require.Equal(t, 4, count) } -func TestSASCosmosTableClientReadOnly(t *testing.T) { +func TestSASCosmosClientReadOnly(t *testing.T) { recording.LiveOnly(t) accountName := os.Getenv("TABLES_COSMOS_ACCOUNT_NAME") accountKey := os.Getenv("TABLES_PRIMARY_COSMOS_ACCOUNT_KEY") cred, err := NewSharedKeyCredential(accountName, accountKey) require.NoError(t, err) - serviceClient, err := NewTableServiceClient(fmt.Sprintf("https://%s.table.cosmos.azure.com/", accountName), cred, nil) + serviceClient, err := NewServiceClient(fmt.Sprintf("https://%s.table.cosmos.azure.com/", accountName), cred, nil) require.NoError(t, err) - tableName, err := createRandomName(t, "tableName") + tableName, err := createRandomName(t, tableNamePrefix) require.NoError(t, err) delete := func() { @@ -217,28 +204,26 @@ func TestSASCosmosTableClientReadOnly(t *testing.T) { } defer delete() - _, err = serviceClient.CreateTable(context.Background(), tableName) + _, err = serviceClient.CreateTable(context.Background(), tableName, nil) require.NoError(t, err) - client := serviceClient.NewTableClient(tableName) + client := serviceClient.NewClient(tableName) err = insertNEntities("pk001", 4, client) require.NoError(t, err) - permissions := TableSASPermissions{ + permissions := SASPermissions{ Read: true, } start := time.Date(2021, time.August, 4, 1, 1, 0, 0, time.UTC) expiry := time.Date(2022, time.August, 4, 1, 1, 0, 0, time.UTC) - accountSAS, err := serviceClient.GetTableSASToken(tableName, permissions, start, expiry) - require.NoError(t, err) - - queryParams := accountSAS.Encode() - sasUrl := fmt.Sprintf("https://%s.table.cosmos.azure.com/?%s", accountName, queryParams) + c := serviceClient.NewClient(tableName) + sasUrl, err := c.GetTableSASToken(permissions, start, expiry) + require.NoError(t, err) err = recording.StartRecording(t, pathToPackage, nil) require.NoError(t, err) - client, err = createTableClientForRecording(t, tableName, sasUrl, azcore.NewAnonymousCredential()) + client, err = createClientForRecording(t, "", sasUrl, azcore.NewAnonymousCredential()) require.NoError(t, err) defer recording.StopRecording(t, nil) //nolint @@ -251,15 +236,16 @@ func TestSASCosmosTableClientReadOnly(t *testing.T) { require.NoError(t, err) // Failure on a read - _, err = client.AddEntity(context.Background(), marshalled) + _, err = client.AddEntity(context.Background(), marshalled, nil) require.Error(t, err) // Success on a list pager := client.List(nil) count := 0 for pager.NextPage(context.Background()) { - count += len(pager.PageResponse().TableEntityQueryResponse.Value) + count += len(pager.PageResponse().Entities) } + require.NoError(t, pager.Err()) require.Equal(t, 4, count) } diff --git a/sdk/tables/aztable/shared_policy_shared_key_credential.go b/sdk/tables/aztable/shared_policy_shared_key_credential.go index 06c29da9bf8b..ac9aa0f4a4a7 100644 --- a/sdk/tables/aztable/shared_policy_shared_key_credential.go +++ b/sdk/tables/aztable/shared_policy_shared_key_credential.go @@ -11,18 +11,18 @@ import ( "fmt" "net/http" "net/url" - "sort" "strings" "sync/atomic" "time" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "github.com/Azure/azure-sdk-for-go/sdk/internal/log" ) // NewSharedKeyCredential creates an immutable SharedKeyCredential containing the // storage account's name and either its primary or secondary key. -func NewSharedKeyCredential(accountName, accountKey string) (*SharedKeyCredential, error) { +func NewSharedKeyCredential(accountName string, accountKey string) (*SharedKeyCredential, error) { c := SharedKeyCredential{accountName: accountName} if err := c.SetAccountKey(accountKey); err != nil { return nil, err @@ -76,36 +76,6 @@ func (c *SharedKeyCredential) buildStringToSign(req *http.Request) (string, erro return stringToSign, nil } -//nolint -func (c *SharedKeyCredential) buildCanonicalizedHeader(headers http.Header) string { - cm := map[string][]string{} - for k, v := range headers { - headerName := strings.TrimSpace(strings.ToLower(k)) - if strings.HasPrefix(headerName, "x-ms-") { - cm[headerName] = v // NOTE: the value must not have any whitespace around it. - } - } - if len(cm) == 0 { - return "" - } - - keys := make([]string, 0, len(cm)) - for key := range cm { - keys = append(keys, key) - } - sort.Strings(keys) - ch := bytes.NewBufferString("") - for i, key := range keys { - if i > 0 { - ch.WriteRune('\n') - } - ch.WriteString(key) - ch.WriteRune(':') - ch.WriteString(strings.Join(cm[key], ",")) - } - return ch.String() -} - func (c *SharedKeyCredential) buildCanonicalizedResource(u *url.URL) (string, error) { // https://docs.microsoft.com/en-us/rest/api/storageservices/authentication-for-the-azure-storage-services cr := bytes.NewBufferString("/") @@ -138,7 +108,7 @@ type sharedKeyCredPolicy struct { cred *SharedKeyCredential } -func newSharedKeyCredPolicy(cred *SharedKeyCredential, opts azcore.AuthenticationOptions) *sharedKeyCredPolicy { +func newSharedKeyCredPolicy(cred *SharedKeyCredential, opts runtime.AuthenticationOptions) *sharedKeyCredPolicy { s := &sharedKeyCredPolicy{ cred: cred, } @@ -146,11 +116,11 @@ func newSharedKeyCredPolicy(cred *SharedKeyCredential, opts azcore.Authenticatio return s } -func (s *sharedKeyCredPolicy) Do(req *azcore.Request) (*http.Response, error) { - if d := req.Request.Header.Get(headerXmsDate); d == "" { - req.Request.Header.Set(headerXmsDate, time.Now().UTC().Format(http.TimeFormat)) +func (s *sharedKeyCredPolicy) Do(req *policy.Request) (*http.Response, error) { + if d := req.Raw().Header.Get(headerXmsDate); d == "" { + req.Raw().Header.Set(headerXmsDate, time.Now().UTC().Format(http.TimeFormat)) } - stringToSign, err := s.cred.buildStringToSign(req.Request) + stringToSign, err := s.cred.buildStringToSign(req.Raw()) if err != nil { return nil, err } @@ -159,7 +129,7 @@ func (s *sharedKeyCredPolicy) Do(req *azcore.Request) (*http.Response, error) { return nil, err } authHeader := strings.Join([]string{"SharedKeyLite ", s.cred.AccountName(), ":", signature}, "") - req.Request.Header.Set(headerAuthorization, authHeader) + req.Raw().Header.Set(headerAuthorization, authHeader) response, err := req.Next() if err != nil && response != nil && response.StatusCode == http.StatusForbidden { @@ -170,6 +140,6 @@ func (s *sharedKeyCredPolicy) Do(req *azcore.Request) (*http.Response, error) { } // NewAuthenticationPolicy implements the Credential interface on SharedKeyCredential. -func (c *SharedKeyCredential) NewAuthenticationPolicy(options azcore.AuthenticationOptions) azcore.Policy { +func (c *SharedKeyCredential) NewAuthenticationPolicy(options runtime.AuthenticationOptions) policy.Policy { return newSharedKeyCredPolicy(c, options) } diff --git a/sdk/tables/aztable/table_access_policy_test.go b/sdk/tables/aztable/table_access_policy_test.go index 68e099a43659..c79d1daac25d 100644 --- a/sdk/tables/aztable/table_access_policy_test.go +++ b/sdk/tables/aztable/table_access_policy_test.go @@ -15,7 +15,7 @@ func TestSetEmptyAccessPolicy(t *testing.T) { client, delete := initClientTest(t, "storage", true) defer delete() - _, err := client.SetAccessPolicy(ctx, &TableSetAccessPolicyOptions{}) + _, err := client.SetAccessPolicy(ctx, &SetAccessPolicyOptions{}) require.NoError(t, err) } @@ -39,7 +39,7 @@ func TestSetAccessPolicy(t *testing.T) { ID: &id, }) - param := TableSetAccessPolicyOptions{ + param := SetAccessPolicyOptions{ TableACL: signedIdentifiers, } @@ -82,7 +82,7 @@ func TestSetMultipleAccessPolicies(t *testing.T) { }, }) - param := TableSetAccessPolicyOptions{ + param := SetAccessPolicyOptions{ TableACL: signedIdentifiers, } @@ -90,7 +90,7 @@ func TestSetMultipleAccessPolicies(t *testing.T) { require.NoError(t, err) // Make a Get to assert two access policies - resp, err := client.GetAccessPolicy(ctx) + resp, err := client.GetAccessPolicy(ctx, nil) require.NoError(t, err) require.Equal(t, len(resp.SignedIdentifiers), 3) } @@ -120,7 +120,7 @@ func TestSetTooManyAccessPolicies(t *testing.T) { } - param := TableSetAccessPolicyOptions{TableACL: signedIdentifiers} + param := SetAccessPolicyOptions{TableACL: signedIdentifiers} _, err := client.SetAccessPolicy(ctx, ¶m) require.NotNil(t, err, "Set access policy succeeded but should have failed") @@ -138,14 +138,14 @@ func TestSetNullAccessPolicy(t *testing.T) { ID: &id, }) - param := TableSetAccessPolicyOptions{ + param := SetAccessPolicyOptions{ TableACL: signedIdentifiers, } _, err := client.SetAccessPolicy(ctx, ¶m) require.NoError(t, err) - resp, err := client.GetAccessPolicy(ctx) + resp, err := client.GetAccessPolicy(ctx, nil) require.NoError(t, err) require.Equal(t, len(resp.SignedIdentifiers), 1) } diff --git a/sdk/tables/aztable/table_batch_test.go b/sdk/tables/aztable/table_batch_test.go index 526543bb052e..bfb5ac7293e3 100644 --- a/sdk/tables/aztable/table_batch_test.go +++ b/sdk/tables/aztable/table_batch_test.go @@ -9,6 +9,7 @@ import ( "net/http" "testing" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" "github.com/Azure/azure-sdk-for-go/sdk/internal/uuid" "github.com/stretchr/testify/require" @@ -22,12 +23,12 @@ func TestBatchAdd(t *testing.T) { defer delete() entitiesToCreate := createComplexEntities(10, "partition") - batch := make([]TableTransactionAction, 10) + batch := make([]TransactionAction, 10) for i, e := range *entitiesToCreate { marshalled, err := json.Marshal(e) require.NoError(t, err) - batch[i] = TableTransactionAction{ActionType: Add, Entity: marshalled} + batch[i] = TransactionAction{ActionType: Add, Entity: marshalled} } u1, err := uuid.New() @@ -45,7 +46,7 @@ func TestBatchAdd(t *testing.T) { count := 0 for pager.NextPage(ctx) { response := pager.PageResponse() - count += len(response.TableEntityQueryResponse.Value) + count += len(response.Entities) } require.Equal(t, count, 10) @@ -62,12 +63,12 @@ func TestBatchMixed(t *testing.T) { defer delete() entitiesToCreate := createComplexEntities(5, "partition") - batch := make([]TableTransactionAction, 3) + batch := make([]TransactionAction, 3) for i := range batch { marshalled, err := json.Marshal((*entitiesToCreate)[i]) require.NoError(t, err) - batch[i] = TableTransactionAction{ + batch[i] = TransactionAction{ ActionType: Add, Entity: marshalled, } @@ -84,20 +85,20 @@ func TestBatchMixed(t *testing.T) { require.Equal(t, http.StatusNoContent, r.StatusCode) } - var qResp TableEntityListByteResponseResponse + var qResp ListEntitiesPage filter := "RowKey eq '1'" - list := &ListOptions{Filter: &filter} + list := &ListEntitiesOptions{Filter: &filter} pager := client.List(list) for pager.NextPage(ctx) { qResp = pager.PageResponse() } - preMerge := qResp.TableEntityQueryResponse.Value[0] + preMerge := qResp.Entities[0] var unMarshalledPreMerge map[string]interface{} err = json.Unmarshal(preMerge, &unMarshalledPreMerge) require.NoError(t, err) // create a new batch slice. - batch = make([]TableTransactionAction, 5) + batch = make([]TransactionAction, 5) // create a merge action for the first added entity mergeProp := "MergeProperty" @@ -109,12 +110,17 @@ func TestBatchMixed(t *testing.T) { } marshalledMergeEntity, err := json.Marshal(mergeEntity) require.NoError(t, err) - batch[0] = TableTransactionAction{ActionType: UpdateMerge, Entity: marshalledMergeEntity, ETag: (*resp.TransactionResponses)[0].Header.Get(etag)} + etag := azcore.ETag((*resp.TransactionResponses)[0].Header.Get(etag)) + batch[0] = TransactionAction{ + ActionType: UpdateMerge, + Entity: marshalledMergeEntity, + IfMatch: &etag, + } // create a delete action for the second added entity marshalledSecondEntity, err := json.Marshal((*entitiesToCreate)[1]) require.NoError(t, err) - batch[1] = TableTransactionAction{ActionType: Delete, Entity: marshalledSecondEntity} + batch[1] = TransactionAction{ActionType: Delete, Entity: marshalledSecondEntity} // create an insert action to replace the third added entity with a new value replaceProp := "ReplaceProperty" @@ -125,15 +131,15 @@ func TestBatchMixed(t *testing.T) { } marshalledThirdEntity, err := json.Marshal(replaceProperties) require.NoError(t, err) - batch[2] = TableTransactionAction{ActionType: InsertReplace, Entity: marshalledThirdEntity} + batch[2] = TransactionAction{ActionType: InsertReplace, Entity: marshalledThirdEntity} // Add the remaining 2 entities. marshalled4thEntity, err := json.Marshal((*entitiesToCreate)[3]) require.NoError(t, err) marshalled5thEntity, err := json.Marshal((*entitiesToCreate)[4]) require.NoError(t, err) - batch[3] = TableTransactionAction{ActionType: Add, Entity: marshalled4thEntity} - batch[4] = TableTransactionAction{ActionType: Add, Entity: marshalled5thEntity} + batch[3] = TransactionAction{ActionType: Add, Entity: marshalled4thEntity} + batch[4] = TransactionAction{ActionType: Add, Entity: marshalled5thEntity} u1, err = uuid.New() require.NoError(t, err) @@ -152,7 +158,7 @@ func TestBatchMixed(t *testing.T) { for pager.NextPage(ctx) { qResp = pager.PageResponse() } - postMerge := qResp.TableEntityQueryResponse.Value[0] + postMerge := qResp.Entities[0] var unMarshaledPostMerge map[string]interface{} err = json.Unmarshal(postMerge, &unMarshaledPostMerge) require.NoError(t, err) @@ -174,7 +180,7 @@ func TestBatchError(t *testing.T) { entitiesToCreate := createComplexEntities(3, "partition") // Create the batch. - batch := make([]TableTransactionAction, 0, 3) + batch := make([]TransactionAction, 0, 3) u1, err := uuid.New() require.NoError(t, err) @@ -188,14 +194,14 @@ func TestBatchError(t *testing.T) { // Add the last entity to the table prior to adding it as part of the batch to cause a batch failure. marshalledFinalEntity, err := json.Marshal((*entitiesToCreate)[2]) require.NoError(t, err) - _, err = client.AddEntity(ctx, marshalledFinalEntity) + _, err = client.AddEntity(ctx, marshalledFinalEntity, nil) require.NoError(t, err) // Add the entities to the batch for i := 0; i < cap(batch); i++ { marshalledEntity, err := json.Marshal((*entitiesToCreate)[i]) require.NoError(t, err) - batch = append(batch, TableTransactionAction{ActionType: Add, Entity: marshalledEntity}) + batch = append(batch, TransactionAction{ActionType: Add, Entity: marshalledEntity}) } u1, err = uuid.New() @@ -204,10 +210,9 @@ func TestBatchError(t *testing.T) { require.NoError(t, err) resp, err := client.submitTransactionInternal(ctx, &batch, u1, u2, nil) require.NotNil(t, err) - transactionError, ok := err.(*TableTransactionError) + transactionError, ok := err.(*transactionError) require.Truef(t, ok, "err should be of type TableTransactionError") - require.Equal(t, "EntityAlreadyExists", transactionError.OdataError.Code) - require.Equal(t, 2, transactionError.FailedEntityIndex) + require.Equal(t, "EntityAlreadyExists", transactionError.ErrorCode()) require.Equal(t, http.StatusConflict, (*resp.TransactionResponses)[0].StatusCode) }) } @@ -225,39 +230,39 @@ func TestBatchComplex(t *testing.T) { edmEntity3 := createEdmEntity(3, "pk001") edmEntity4 := createEdmEntity(4, "pk001") edmEntity5 := createEdmEntity(5, "pk001") - batch := make([]TableTransactionAction, 5) + batch := make([]TransactionAction, 5) marshalled1, err := json.Marshal(edmEntity) require.NoError(t, err) - batch[0] = TableTransactionAction{ + batch[0] = TransactionAction{ ActionType: Add, Entity: marshalled1, } marshalled2, err := json.Marshal(edmEntity2) require.NoError(t, err) - batch[1] = TableTransactionAction{ + batch[1] = TransactionAction{ ActionType: Add, Entity: marshalled2, } marshalled3, err := json.Marshal(edmEntity3) require.NoError(t, err) - batch[2] = TableTransactionAction{ + batch[2] = TransactionAction{ ActionType: Add, Entity: marshalled3, } marshalled4, err := json.Marshal(edmEntity4) require.NoError(t, err) - batch[3] = TableTransactionAction{ + batch[3] = TransactionAction{ ActionType: Add, Entity: marshalled4, } marshalled5, err := json.Marshal(edmEntity5) require.NoError(t, err) - batch[4] = TableTransactionAction{ + batch[4] = TransactionAction{ ActionType: Add, Entity: marshalled5, } @@ -273,27 +278,27 @@ func TestBatchComplex(t *testing.T) { require.Equal(t, http.StatusNoContent, r.StatusCode) } - batch2 := make([]TableTransactionAction, 3) + batch2 := make([]TransactionAction, 3) edmEntity.Properties["Bool"] = false edmEntity2.Properties["Int32"] = int32(10) marshalled1, err = json.Marshal(edmEntity) require.NoError(t, err) - batch2[0] = TableTransactionAction{ + batch2[0] = TransactionAction{ ActionType: InsertMerge, Entity: marshalled1, } marshalled2, err = json.Marshal(edmEntity2) require.NoError(t, err) - batch2[1] = TableTransactionAction{ + batch2[1] = TransactionAction{ ActionType: InsertReplace, Entity: marshalled2, } marshalled3, err = json.Marshal(edmEntity3) require.NoError(t, err) - batch2[2] = TableTransactionAction{ + batch2[2] = TransactionAction{ ActionType: Delete, Entity: marshalled3, } @@ -312,7 +317,7 @@ func TestBatchComplex(t *testing.T) { received, err := client.GetEntity(ctx, edmEntity.PartitionKey, edmEntity.RowKey, nil) require.NoError(t, err) - var receivedEdm EdmEntity + var receivedEdm EDMEntity err = json.Unmarshal(received.Value, &receivedEdm) require.NoError(t, err) require.Equal(t, edmEntity.Properties["Bool"], receivedEdm.Properties["Bool"]) @@ -320,7 +325,7 @@ func TestBatchComplex(t *testing.T) { received2, err := client.GetEntity(ctx, edmEntity2.PartitionKey, edmEntity2.RowKey, nil) require.NoError(t, err) - var receivedEdm2 EdmEntity + var receivedEdm2 EDMEntity err = json.Unmarshal(received2.Value, &receivedEdm2) require.NoError(t, err) require.Equal(t, edmEntity2.Properties["Int32"], receivedEdm2.Properties["Int32"]) diff --git a/sdk/tables/aztable/table_client.go b/sdk/tables/aztable/table_client.go index 67f0c9cf2d54..80fdeacd360a 100644 --- a/sdk/tables/aztable/table_client.go +++ b/sdk/tables/aztable/table_client.go @@ -6,16 +6,21 @@ package aztable import ( "context" "encoding/json" + "errors" + "net/url" + "strings" + "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore" + generated "github.com/Azure/azure-sdk-for-go/sdk/tables/aztable/internal" ) -// A TableClient represents a client to the tables service affinitized to a specific table. -type TableClient struct { - client *tableClient - service *TableServiceClient +// A Client represents a client to the tables service affinitized to a specific table. +type Client struct { + client *generated.TableClient + service *ServiceClient cred azcore.Credential - Name string + name string } // EntityUpdateMode specifies what type of update to do on InsertEntity or UpdateEntity. ReplaceEntity @@ -27,29 +32,57 @@ const ( MergeEntity EntityUpdateMode = "merge" ) -// NewTableClient creates a TableClient struct in the context of the table specified in tableName, using the specified serviceURL, credential, and options. -func NewTableClient(tableName string, serviceURL string, cred azcore.Credential, options *TableClientOptions) (*TableClient, error) { +// NewClient creates a Client struct in the context of the table specified in the serviceURL, credential, and options. +func NewClient(serviceURL string, cred azcore.Credential, options *ClientOptions) (*Client, error) { if options == nil { - options = &TableClientOptions{} + options = &ClientOptions{} } - s, err := NewTableServiceClient(serviceURL, cred, options) - return s.NewTableClient(tableName), err + + parsedUrl, err := url.Parse(serviceURL) + if err != nil { + return &Client{}, err + } + + tableName := parsedUrl.Path[1:] + rawServiceURL := parsedUrl.Scheme + "://" + parsedUrl.Host + if parsedUrl.Scheme == "" { + rawServiceURL = parsedUrl.Host + } + if strings.Contains(tableName, "/") { + splits := strings.Split(parsedUrl.Path, "/") + tableName = splits[len(splits)-1] + rawServiceURL += strings.Join(splits[:len(splits)-1], "/") + } + sas := parsedUrl.Query() + if len(sas) > 0 { + rawServiceURL += "/?" + sas.Encode() + } + + s, err := NewServiceClient(rawServiceURL, cred, options) + if err != nil { + return &Client{}, err + } + return s.NewClient(tableName), nil } -// Create creates the table with the tableName specified when NewTableClient was called. -func (t *TableClient) Create(ctx context.Context) (TableResponseResponse, error) { - return t.service.CreateTable(ctx, t.Name) +// Create creates the table with the tableName specified when NewClient was called. +func (t *Client) Create(ctx context.Context, options *CreateTableOptions) (CreateTableResponse, error) { + if options == nil { + options = &CreateTableOptions{} + } + resp, err := t.client.Create(ctx, generated.TableProperties{TableName: &t.name}, options.toGenerated(), &generated.QueryOptions{}) + return createTableResponseFromGen(&resp), err } -// Delete deletes the table with the tableName specified when NewTableClient was called. -func (t *TableClient) Delete(ctx context.Context, options *TableDeleteOptions) (TableDeleteResponse, error) { - return t.service.DeleteTable(ctx, t.Name, options) +// Delete deletes the table with the tableName specified when NewClient was called. +func (t *Client) Delete(ctx context.Context, options *DeleteTableOptions) (DeleteTableResponse, error) { + return t.service.DeleteTable(ctx, t.name, options) } -// List queries the entities using the specified ListOptions. +// List queries the entities using the specified ListEntitiesOptions. // ListOptions can specify the following properties to affect the query results returned: // -// Filter: An Odata filter expression that limits results to those entities that satisfy the filter expression. +// Filter: An OData filter expression that limits results to those entities that satisfy the filter expression. // For example, the following expression would return only entities with a PartitionKey of 'foo': "PartitionKey eq 'foo'" // // Select: A comma delimited list of entity property names that selects which set of entity properties to return in the result set. @@ -60,59 +93,63 @@ func (t *TableClient) Delete(ctx context.Context, options *TableDeleteOptions) ( // // List returns a Pager, which allows iteration through each page of results. Example: // -// -// options := &ListOptions{Filter: to.StringPtr("PartitionKey eq 'pk001'"), Top: to.Int32Ptr(25), Select: to.StringPtr("PartitionKey,RowKey,Value,Price")} -// pager := client.List(options) // Pass in 'nil' if you want to return all Entities for an account. -// for pager.NextPage(ctx) { -// resp = pager.PageResponse() -// fmt.Printf("The page contains %i results.\n", len(resp.TableEntityQueryResponse.Value)) -// } -// err := pager.Err() -// handle(err) -func (t *TableClient) List(listOptions *ListOptions) TableEntityListResponsePager { +// options := &ListEntitiesOptions{Filter: to.StringPtr("PartitionKey eq 'pk001'"), Top: to.Int32Ptr(25), Select: to.StringPtr("PartitionKey,RowKey,Value,Price")} +// pager := client.List(options) // Pass in 'nil' if you want to return all Entities for an account. +// for pager.NextPage(ctx) { +// resp = pager.PageResponse() +// fmt.Printf("The page contains %i results.\n", len(resp.Value)) +// } +// err := pager.Err() +func (t *Client) List(listOptions *ListEntitiesOptions) ListEntitiesPager { return &tableEntityQueryResponsePager{ tableClient: t, - queryOptions: listOptions, - tableQueryOptions: &TableQueryEntitiesOptions{}} + listOptions: listOptions, + tableQueryOptions: &generated.TableQueryEntitiesOptions{}, + } } -// GetEntity retrieves a specific entity from the service using the specified partitionKey and rowKey values. -func (t *TableClient) GetEntity(ctx context.Context, partitionKey string, rowKey string, queryOptions *QueryOptions) (ByteArrayResponse, error) { - if queryOptions == nil { - queryOptions = &QueryOptions{} +// GetEntity retrieves a specific entity from the service using the specified partitionKey and rowKey values. If no entity is available it returns an error +func (t *Client) GetEntity(ctx context.Context, partitionKey string, rowKey string, options *GetEntityOptions) (GetEntityResponse, error) { + if options == nil { + options = &GetEntityOptions{} } - resp, err := t.client.QueryEntityWithPartitionAndRowKey(ctx, t.Name, partitionKey, rowKey, &TableQueryEntityWithPartitionAndRowKeyOptions{}, queryOptions) + + genOptions, queryOptions := options.toGenerated() + resp, err := t.client.QueryEntityWithPartitionAndRowKey(ctx, t.name, partitionKey, rowKey, genOptions, queryOptions) if err != nil { - return ByteArrayResponse{}, err + return GetEntityResponse{}, err } - return newByteArrayResponse(resp) + return newGetEntityResponse(resp) } -// AddEntity adds an entity (described by a JSON byte slice) to the table. This method returns an error if an entity with -// the same PartitionKey and RowKey already exists in the table. -func (t *TableClient) AddEntity(ctx context.Context, entity []byte) (interface{}, error) { +// AddEntity adds an entity (described by a byte slice) to the table. This method returns an error if an entity with +// the same PartitionKey and RowKey already exists in the table. If the supplied entity does not contain both a PartitionKey +// and a RowKey an error will be returned. +func (t *Client) AddEntity(ctx context.Context, entity []byte, options *AddEntityOptions) (AddEntityResponse, error) { var mapEntity map[string]interface{} err := json.Unmarshal(entity, &mapEntity) if err != nil { - return entity, err + return AddEntityResponse{}, err } - resp, err := t.client.InsertEntity(ctx, t.Name, &TableInsertEntityOptions{TableEntityProperties: mapEntity, ResponsePreference: ResponseFormatReturnNoContent.ToPtr()}, nil) - if err == nil { - insertResp := resp.(TableInsertEntityResponse) - return insertResp, nil - } else { + resp, err := t.client.InsertEntity(ctx, t.name, &generated.TableInsertEntityOptions{TableEntityProperties: mapEntity, ResponsePreference: generated.ResponseFormatReturnNoContent.ToPtr()}, nil) + if err != nil { err = checkEntityForPkRk(&mapEntity, err) - return TableInsertEntityResponse{}, err + return AddEntityResponse{}, err } + return addEntityResponseFromGenerated(&resp), err } // DeleteEntity deletes the entity with the specified partitionKey and rowKey from the table. -func (t *TableClient) DeleteEntity(ctx context.Context, partitionKey string, rowKey string, etag *string) (TableDeleteEntityResponse, error) { - if etag == nil { - nilEtag := "*" - etag = &nilEtag +func (t *Client) DeleteEntity(ctx context.Context, partitionKey string, rowKey string, options *DeleteEntityOptions) (DeleteEntityResponse, error) { + if options == nil { + options = &DeleteEntityOptions{} + } + if options.IfMatch == nil { + nilEtag := azcore.ETag("*") + options.IfMatch = &nilEtag } - return t.client.DeleteEntity(ctx, t.Name, partitionKey, rowKey, *etag, nil, &QueryOptions{}) + resp, err := t.client.DeleteEntity(ctx, t.name, partitionKey, rowKey, string(*options.IfMatch), options.toGenerated(), &generated.QueryOptions{}) + return deleteEntityResponseFromGenerated(&resp), err } // UpdateEntity updates the specified table entity if it exists. @@ -120,16 +157,22 @@ func (t *TableClient) DeleteEntity(ctx context.Context, partitionKey string, row // If updateMode is Merge, the property values present in the specified entity will be merged with the existing entity. Properties not specified in the merge will be unaffected. // The specified etag value will be used for optimistic concurrency. If the etag does not match the value of the entity in the table, the operation will fail. // The response type will be TableEntityMergeResponse if updateMode is Merge and TableEntityUpdateResponse if updateMode is Replace. -func (t *TableClient) UpdateEntity(ctx context.Context, entity []byte, etag *string, updateMode EntityUpdateMode) (interface{}, error) { - var ifMatch string = "*" - if etag != nil { - ifMatch = *etag +func (t *Client) UpdateEntity(ctx context.Context, entity []byte, options *UpdateEntityOptions) (UpdateEntityResponse, error) { + if options == nil { + options = &UpdateEntityOptions{ + UpdateMode: MergeEntity, + } + } + + if options.IfMatch == nil { + star := azcore.ETag("*") + options.IfMatch = &star } var mapEntity map[string]interface{} err := json.Unmarshal(entity, &mapEntity) if err != nil { - return entity, err + return UpdateEntityResponse{}, err } pk := mapEntity[partitionKey] @@ -138,24 +181,34 @@ func (t *TableClient) UpdateEntity(ctx context.Context, entity []byte, etag *str rk := mapEntity[rowKey] rowkey := rk.(string) - switch updateMode { + switch options.UpdateMode { case MergeEntity: - return t.client.MergeEntity(ctx, t.Name, partKey, rowkey, &TableMergeEntityOptions{IfMatch: &ifMatch, TableEntityProperties: mapEntity}, &QueryOptions{}) + resp, err := t.client.MergeEntity(ctx, t.name, partKey, rowkey, options.toGeneratedMergeEntity(mapEntity), &generated.QueryOptions{}) + return updateEntityResponseFromMergeGenerated(&resp), err case ReplaceEntity: - return t.client.UpdateEntity(ctx, t.Name, partKey, rowkey, &TableUpdateEntityOptions{IfMatch: &ifMatch, TableEntityProperties: mapEntity}, &QueryOptions{}) + resp, err := t.client.UpdateEntity(ctx, t.name, partKey, rowkey, options.toGeneratedUpdateEntity(mapEntity), &generated.QueryOptions{}) + return updateEntityResponseFromUpdateGenerated(&resp), err + } + if pk == "" || rk == "" { + return UpdateEntityResponse{}, errPartitionKeyRowKeyError } - return nil, errInvalidUpdateMode + return UpdateEntityResponse{}, errInvalidUpdateMode } // InsertEntity inserts an entity if it does not already exist in the table. If the entity does exist, the entity is // replaced or merged as specified the updateMode parameter. If the entity exists and updateMode is Merge, the property // values present in the specified entity will be merged with the existing entity rather than replaced. // The response type will be TableEntityMergeResponse if updateMode is Merge and TableEntityUpdateResponse if updateMode is Replace. -func (t *TableClient) InsertEntity(ctx context.Context, entity []byte, updateMode EntityUpdateMode) (interface{}, error) { +func (t *Client) InsertEntity(ctx context.Context, entity []byte, options *InsertEntityOptions) (InsertEntityResponse, error) { + if options == nil { + options = &InsertEntityOptions{ + UpdateMode: MergeEntity, + } + } var mapEntity map[string]interface{} err := json.Unmarshal(entity, &mapEntity) if err != nil { - return entity, err + return InsertEntityResponse{}, err } pk := mapEntity[partitionKey] @@ -164,25 +217,60 @@ func (t *TableClient) InsertEntity(ctx context.Context, entity []byte, updateMod rk := mapEntity[rowKey] rowkey := rk.(string) - switch updateMode { + switch options.UpdateMode { case MergeEntity: - return t.client.MergeEntity(ctx, t.Name, partKey, rowkey, &TableMergeEntityOptions{TableEntityProperties: mapEntity}, &QueryOptions{}) + resp, err := t.client.MergeEntity(ctx, t.name, partKey, rowkey, &generated.TableMergeEntityOptions{TableEntityProperties: mapEntity}, &generated.QueryOptions{}) + return insertEntityFromGeneratedMerge(&resp), err case ReplaceEntity: - return t.client.UpdateEntity(ctx, t.Name, partKey, rowkey, &TableUpdateEntityOptions{TableEntityProperties: mapEntity}, &QueryOptions{}) + resp, err := t.client.UpdateEntity(ctx, t.name, partKey, rowkey, &generated.TableUpdateEntityOptions{TableEntityProperties: mapEntity}, &generated.QueryOptions{}) + return insertEntityFromGeneratedUpdate(&resp), err } - return nil, errInvalidUpdateMode + if pk == "" || rk == "" { + return InsertEntityResponse{}, errPartitionKeyRowKeyError + } + return InsertEntityResponse{}, errInvalidUpdateMode } // GetAccessPolicy retrieves details about any stored access policies specified on the table that may be used with the Shared Access Signature -func (t *TableClient) GetAccessPolicy(ctx context.Context) (SignedIdentifierArrayResponse, error) { - return t.client.GetAccessPolicy(ctx, t.Name, nil) +func (t *Client) GetAccessPolicy(ctx context.Context, options *GetAccessPolicyOptions) (GetAccessPolicyResponse, error) { + resp, err := t.client.GetAccessPolicy(ctx, t.name, options.toGenerated()) + return getAccessPolicyResponseFromGenerated(&resp), err } // SetAccessPolicy sets stored access policies for the table that may be used with SharedAccessSignature -func (t *TableClient) SetAccessPolicy(ctx context.Context, options *TableSetAccessPolicyOptions) (TableSetAccessPolicyResponse, error) { - response, err := t.client.SetAccessPolicy(ctx, t.Name, options) +func (t *Client) SetAccessPolicy(ctx context.Context, options *SetAccessPolicyOptions) (SetAccessPolicyResponse, error) { + response, err := t.client.SetAccessPolicy(ctx, t.name, options.toGenerated()) if len(options.TableACL) > 5 { err = errTooManyAccessPoliciesError } - return response, err + return setAccessPolicyResponseFromGenerated(&response), err +} + +// GetTableSASToken is a convenience method for generating a SAS token for a specific table. +// It can only be used if the supplied azcore.Credential during creation was a SharedKeyCredential. +func (t Client) GetTableSASToken(permissions SASPermissions, start time.Time, expiry time.Time) (string, error) { + cred, ok := t.cred.(*SharedKeyCredential) + if !ok { + return "", errors.New("credential is not a SharedKeyCredential. SAS can only be signed with a SharedKeyCredential") + } + qps, err := SASSignatureValues{ + TableName: t.name, + Permissions: permissions.String(), + StartTime: start, + ExpiryTime: expiry, + StartPartitionKey: permissions.StartPartitionKey, + StartRowKey: permissions.StartRowKey, + EndPartitionKey: permissions.EndPartitionKey, + EndRowKey: permissions.EndRowKey, + }.NewSASQueryParameters(cred) + if err != nil { + return "", err + } + + serviceURL := t.client.Con.Endpoint() + if !strings.Contains(serviceURL, "/") { + serviceURL += "/" + } + serviceURL += t.name + "?" + qps.Encode() + return serviceURL, nil } diff --git a/sdk/tables/aztable/table_client_responses.go b/sdk/tables/aztable/table_client_responses.go deleted file mode 100644 index c99e4e074f15..000000000000 --- a/sdk/tables/aztable/table_client_responses.go +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package aztable - -import "time" - -type TableAddEntityResponse struct { - ClientRequestID string - RequestID string - Version string - Date time.Time - ETag string - XMSContinuationNextPartitionKey string - XMSContinuationNextRowKey string - PreferenceApplied string - ContentType string -} diff --git a/sdk/tables/aztable/table_client_test.go b/sdk/tables/aztable/table_client_test.go index 62fcd7183cb4..2c75f4ee8430 100644 --- a/sdk/tables/aztable/table_client_test.go +++ b/sdk/tables/aztable/table_client_test.go @@ -21,7 +21,7 @@ func TestServiceErrors(t *testing.T) { defer delete() // Create a duplicate table to produce an error - _, err := client.Create(ctx) + _, err := client.Create(ctx, nil) require.Error(t, err) }) } @@ -33,10 +33,11 @@ func TestCreateTable(t *testing.T) { client, delete := initClientTest(t, service, false) defer delete() - resp, err := client.Create(context.Background()) + resp, err := client.Create(context.Background(), nil) require.NoError(t, err) - require.Equal(t, *resp.TableResponse.TableName, client.Name) + require.NotNil(t, resp.RawResponse) + // require.Equal(t, *resp.TableResponse.TableName, client.name) }) } } @@ -51,7 +52,7 @@ func TestAddEntity(t *testing.T) { marshalledEntity, err := json.Marshal(simpleEntity) require.NoError(t, err) - _, err = client.AddEntity(ctx, marshalledEntity) + _, err = client.AddEntity(ctx, marshalledEntity, nil) require.NoError(t, err) }) } @@ -67,7 +68,8 @@ func TestAddComplexEntity(t *testing.T) { marshalledEntity, err := json.Marshal(entity) require.NoError(t, err) - _, err = client.AddEntity(ctx, marshalledEntity) + + _, err = client.AddEntity(ctx, marshalledEntity, nil) require.NoError(t, err) }) } @@ -83,7 +85,7 @@ func TestDeleteEntity(t *testing.T) { marshalledEntity, err := json.Marshal(simpleEntity) require.NoError(t, err) - _, err = client.AddEntity(ctx, marshalledEntity) + _, err = client.AddEntity(ctx, marshalledEntity, nil) require.NoError(t, err) _, delErr := client.DeleteEntity(ctx, simpleEntity.PartitionKey, simpleEntity.RowKey, nil) require.Nil(t, delErr) @@ -102,11 +104,11 @@ func TestMergeEntity(t *testing.T) { entityToCreate := createSimpleEntity(1, "partition") marshalled := marshalBasicEntity(entityToCreate, require) - _, err := client.AddEntity(ctx, *marshalled) + _, err := client.AddEntity(ctx, *marshalled, nil) require.NoError(err) filter := "RowKey eq '1'" - listOptions := &ListOptions{Filter: &filter} + listOptions := &ListEntitiesOptions{Filter: &filter} preMerge, err := client.GetEntity(ctx, entityToCreate.PartitionKey, entityToCreate.RowKey, nil) require.NoError(err) @@ -123,15 +125,15 @@ func TestMergeEntity(t *testing.T) { reMarshalled, err := json.Marshal(mapEntity) require.NoError(err) - _, updateErr := client.UpdateEntity(ctx, reMarshalled, nil, MergeEntity) + _, updateErr := client.UpdateEntity(ctx, reMarshalled, &UpdateEntityOptions{UpdateMode: MergeEntity}) require.Nil(updateErr) - var qResp TableEntityListByteResponseResponse + var qResp ListEntitiesPage pager := client.List(listOptions) for pager.NextPage(ctx) { qResp = pager.PageResponse() } - postMerge := qResp.TableEntityQueryResponse.Value[0] + postMerge := qResp.Entities[0] var unmarshalledPostMerge map[string]interface{} err = json.Unmarshal(postMerge, &unmarshalledPostMerge) require.NoError(err) @@ -157,11 +159,11 @@ func TestInsertEntity(t *testing.T) { entityToCreate := createSimpleEntity(1, "partition") marshalled := marshalBasicEntity(entityToCreate, require) - _, err := client.InsertEntity(ctx, *marshalled, ReplaceEntity) + _, err := client.InsertEntity(ctx, *marshalled, &InsertEntityOptions{UpdateMode: ReplaceEntity}) require.NoError(err) filter := "RowKey eq '1'" - list := &ListOptions{Filter: &filter} + list := &ListEntitiesOptions{Filter: &filter} // 2. Query for basic Entity preMerge, err := client.GetEntity(ctx, entityToCreate.PartitionKey, entityToCreate.RowKey, nil) @@ -179,16 +181,16 @@ func TestInsertEntity(t *testing.T) { require.NoError(err) // 4. Replace Entity with "bool"-less entity - _, err = client.InsertEntity(ctx, reMarshalled, (ReplaceEntity)) + _, err = client.InsertEntity(ctx, reMarshalled, &InsertEntityOptions{UpdateMode: ReplaceEntity}) require.Nil(err) // 5. Query for new entity - var qResp TableEntityListByteResponseResponse + var qResp ListEntitiesPage pager := client.List(list) for pager.NextPage(ctx) { qResp = pager.PageResponse() } - postMerge := qResp.TableEntityQueryResponse.Value[0] + postMerge := qResp.Entities[0] var unmarshalledPostMerge map[string]interface{} err = json.Unmarshal(postMerge, &unmarshalledPostMerge) require.NoError(err) @@ -215,22 +217,22 @@ func TestQuerySimpleEntity(t *testing.T) { for _, e := range *entitiesToCreate { marshalledEntity, err := json.Marshal(e) require.NoError(err) - _, err = client.AddEntity(ctx, marshalledEntity) + _, err = client.AddEntity(ctx, marshalledEntity, nil) require.NoError(err) } filter := "RowKey lt '5'" - list := &ListOptions{Filter: &filter} + list := &ListEntitiesOptions{Filter: &filter} expectedCount := 4 - var resp TableEntityListByteResponseResponse + var resp ListEntitiesPage pager := client.List(list) for pager.NextPage(ctx) { resp = pager.PageResponse() - require.Equal(len(resp.TableEntityQueryResponse.Value), expectedCount) + require.Equal(len(resp.Entities), expectedCount) } - for i, e := range resp.TableEntityQueryResponse.Value { + for i, e := range resp.Entities { var mapModel map[string]interface{} err := json.Unmarshal(e, &mapModel) require.NoError(err) @@ -238,7 +240,7 @@ func TestQuerySimpleEntity(t *testing.T) { _, ok := mapModel[timestamp] require.True(ok) - _, ok = mapModel[etagOdata] + _, ok = mapModel[etagOData] require.True(ok) var b basicTestEntity @@ -268,21 +270,21 @@ func TestQueryComplexEntity(t *testing.T) { for _, e := range *entitiesToCreate { marshalledEntity, err := json.Marshal(e) require.NoError(err) - _, err = client.AddEntity(ctx, marshalledEntity) + _, err = client.AddEntity(ctx, marshalledEntity, nil) require.NoError(err) } filter := "RowKey lt '5'" expectedCount := 4 - options := &ListOptions{Filter: &filter} + options := &ListEntitiesOptions{Filter: &filter} - var resp TableEntityListByteResponseResponse + var resp ListEntitiesPage pager := client.List(options) for pager.NextPage(ctx) { resp = pager.PageResponse() - require.Equal(expectedCount, len(resp.TableEntityQueryResponse.Value)) + require.Equal(expectedCount, len(resp.Entities)) - for idx, entity := range resp.TableEntityQueryResponse.Value { + for idx, entity := range resp.Entities { model := complexTestEntity{} err := json.Unmarshal(entity, &model) require.NoError(err) @@ -316,7 +318,7 @@ func TestInvalidEntity(t *testing.T) { badEntityMarshalled, err := json.Marshal(badEntity) require.NoError(err) - _, err = client.AddEntity(ctx, badEntityMarshalled) + _, err = client.AddEntity(ctx, badEntityMarshalled, nil) require.NotNil(err) require.Contains(err.Error(), errPartitionKeyRowKeyError.Error()) diff --git a/sdk/tables/aztable/table_pagers.go b/sdk/tables/aztable/table_pagers.go index 5d2b98bf64f7..a56f5d12064b 100644 --- a/sdk/tables/aztable/table_pagers.go +++ b/sdk/tables/aztable/table_pagers.go @@ -5,12 +5,12 @@ package aztable import ( "context" - "encoding/json" "net/http" - "time" + + generated "github.com/Azure/azure-sdk-for-go/sdk/tables/aztable/internal" ) -// TableEntityListResponsePager is a Pager for Table entity query results. +// ListEntitiesPager is a Pager for Table entity query results. // // NextPage should be called first. It fetches the next available page of results from the service. // If the fetched page contains results, the return value is true, else false. @@ -22,14 +22,13 @@ import ( // // for pager.NextPage(ctx) { // resp = pager.PageResponse() -// fmt.Printf("The page contains %i results.\n", len(resp.TableEntityQueryResponse.Value)) +// fmt.Printf("The page contains %i results.\n", len(resp.Value)) // } // err := pager.Err() -type TableEntityListResponsePager interface { - // azcore.Pager +type ListEntitiesPager interface { // PageResponse returns the current TableQueryResponseResponse. - PageResponse() TableEntityListByteResponseResponse + PageResponse() ListEntitiesPage // NextPage returns true if there is another page of data available, false if not NextPage(context.Context) bool // Err returns an error if there was an error on the last request @@ -37,10 +36,10 @@ type TableEntityListResponsePager interface { } type tableEntityQueryResponsePager struct { - tableClient *TableClient - current *TableEntityListByteResponseResponse - tableQueryOptions *TableQueryEntitiesOptions - queryOptions *ListOptions + tableClient *Client + current *ListEntitiesPage + tableQueryOptions *generated.TableQueryEntitiesOptions + listOptions *ListEntitiesOptions err error } @@ -48,13 +47,13 @@ type tableEntityQueryResponsePager struct { // If the fetched page contains results, the return value is true, else false. // Results fetched from the service can be evaluated by calling PageResponse on this Pager. func (p *tableEntityQueryResponsePager) NextPage(ctx context.Context) bool { - if p.err != nil || (p.current != nil && p.current.XMSContinuationNextPartitionKey == nil && p.current.XMSContinuationNextRowKey == nil) { + if p.err != nil || (p.current != nil && p.current.ContinuationNextPartitionKey == nil && p.current.ContinuationNextRowKey == nil) { return false } - var resp TableEntityQueryResponseResponse - resp, p.err = p.tableClient.client.QueryEntities(ctx, p.tableClient.Name, p.tableQueryOptions, p.queryOptions.toQueryOptions()) + var resp generated.TableQueryEntitiesResponse + resp, p.err = p.tableClient.client.QueryEntities(ctx, p.tableClient.name, p.tableQueryOptions, p.listOptions.toQueryOptions()) - c, err := castToByteResponse(&resp) + c, err := newListEntitiesPage(&resp) if err != nil { p.err = nil } @@ -62,7 +61,7 @@ func (p *tableEntityQueryResponsePager) NextPage(ctx context.Context) bool { p.current = &c p.tableQueryOptions.NextPartitionKey = resp.XMSContinuationNextPartitionKey p.tableQueryOptions.NextRowKey = resp.XMSContinuationNextRowKey - return p.err == nil && resp.TableEntityQueryResponse != nil && len(resp.TableEntityQueryResponse.Value) > 0 + return p.err == nil && len(resp.TableEntityQueryResponse.Value) > 0 } // PageResponse returns the results from the page most recently fetched from the service. @@ -70,10 +69,10 @@ func (p *tableEntityQueryResponsePager) NextPage(ctx context.Context) bool { // // for pager.NextPage(ctx) { // resp = pager.PageResponse() -// fmt.Printf("The page contains %i results.\n", len(resp.TableEntityQueryResponse.Value)) +// fmt.Printf("The page contains %i results.\n", len(resp.Value)) // } // err := pager.Err() -func (p *tableEntityQueryResponsePager) PageResponse() TableEntityListByteResponseResponse { +func (p *tableEntityQueryResponsePager) PageResponse() ListEntitiesPage { return *p.current } @@ -82,7 +81,7 @@ func (p *tableEntityQueryResponsePager) Err() error { return p.err } -// TableListResponsePager is a Pager for Table Queries +// ListTablesPager is a Pager for Table List operations // // NextPage should be called first. It fetches the next available page of results from the service. // If the fetched page contains results, the return value is true, else false. @@ -94,25 +93,56 @@ func (p *tableEntityQueryResponsePager) Err() error { // // for pager.NextPage(ctx) { // resp = pager.PageResponse() -// fmt.Printf("The page contains %i results.\n", len(resp.TableEntityQueryResponse.Value)) +// fmt.Printf("The page contains %i results.\n", len(resp.Value)) // } // err := pager.Err() -type TableListResponsePager interface { - // azcore.Pager - +type ListTablesPager interface { // PageResponse returns the current TableQueryResponseResponse. - PageResponse() TableListResponseResponse + PageResponse() ListTablesPage // NextPage returns true if there is another page of data available, false if not NextPage(context.Context) bool // Err returns an error if there was an error on the last request Err() error } +type ListTablesPage struct { + // RawResponse contains the underlying HTTP response. + RawResponse *http.Response + + // ContinuationNextTableName contains the information returned from the x-ms-continuation-NextTableName header response. + ContinuationNextTableName *string + + // The metadata response of the table. + ODataMetadata *string `json:"odata.metadata,omitempty"` + + // List of tables. + Tables []*ResponseProperties `json:"value,omitempty"` +} + +func fromGeneratedTableQueryResponseEnvelope(g *generated.TableQueryResponseEnvelope) *ListTablesPage { + if g == nil { + return nil + } + + var value []*ResponseProperties + + for _, v := range g.Value { + value = append(value, fromGeneratedTableResponseProperties(v)) + } + + return &ListTablesPage{ + RawResponse: g.RawResponse, + ContinuationNextTableName: g.XMSContinuationNextTableName, + ODataMetadata: g.ODataMetadata, + Tables: value, + } +} + type tableQueryResponsePager struct { - client *tableClient - current *TableListResponseResponse - tableQueryOptions *TableQueryOptions - queryOptions *ListOptions + client *generated.TableClient + current *generated.TableQueryResponseEnvelope + tableQueryOptions *generated.TableQueryOptions + listOptions *ListTablesOptions err error } @@ -123,9 +153,9 @@ func (p *tableQueryResponsePager) NextPage(ctx context.Context) bool { if p.err != nil || (p.current != nil && p.current.XMSContinuationNextTableName == nil) { return false } - var resp TableQueryResponseResponse - resp, p.err = p.client.Query(ctx, p.tableQueryOptions, p.queryOptions.toQueryOptions()) - p.current = listResponseFromQueryResponse(resp) + var resp generated.TableQueryResponseEnvelope + resp, p.err = p.client.Query(ctx, p.tableQueryOptions, p.listOptions.toQueryOptions()) + p.current = &resp p.tableQueryOptions.NextTableName = resp.XMSContinuationNextTableName return p.err == nil && resp.TableQueryResponse.Value != nil && len(resp.TableQueryResponse.Value) > 0 } @@ -137,182 +167,11 @@ func (p *tableQueryResponsePager) NextPage(ctx context.Context) bool { // resp = pager.PageResponse() // fmt.Printf("The page contains %i results.\n", len(resp.TableEntityQueryResponse.Value)) // } -func (p *tableQueryResponsePager) PageResponse() TableListResponseResponse { - return *p.current +func (p *tableQueryResponsePager) PageResponse() ListTablesPage { + return *fromGeneratedTableQueryResponseEnvelope(p.current) } // Err returns an error value if the most recent call to NextPage was not successful, else nil. func (p *tableQueryResponsePager) Err() error { return p.err } - -// ByteArrayResponse is the return type for a GetEntity operation. The entities properties are stored in the Value property -type ByteArrayResponse struct { - // ClientRequestID contains the information returned from the x-ms-client-request-id header response. - ClientRequestID *string - - // ContentType contains the information returned from the Content-Type header response. - ContentType *string - - // Date contains the information returned from the Date header response. - Date *time.Time - - // ETag contains the information returned from the ETag header response. - ETag *string - - // PreferenceApplied contains the information returned from the Preference-Applied header response. - PreferenceApplied *string - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response - - // RequestID contains the information returned from the x-ms-request-id header response. - RequestID *string - - // The other properties of the table entity. - Value []byte - - // Version contains the information returned from the x-ms-version header response. - Version *string - - // XMSContinuationNextPartitionKey contains the information returned from the x-ms-continuation-NextPartitionKey header response. - XMSContinuationNextPartitionKey *string - - // XMSContinuationNextRowKey contains the information returned from the x-ms-continuation-NextRowKey header response. - XMSContinuationNextRowKey *string -} - -// newByteArrayResponse converts a MapofInterfaceResponse from a map[string]interface{} to a []byte. -func newByteArrayResponse(m MapOfInterfaceResponse) (ByteArrayResponse, error) { - marshalledValue, err := json.Marshal(m.Value) - if err != nil { - return ByteArrayResponse{}, err - } - return ByteArrayResponse{ - ClientRequestID: m.ClientRequestID, - ContentType: m.ContentType, - Date: m.Date, - ETag: m.ETag, - PreferenceApplied: m.PreferenceApplied, - RawResponse: m.RawResponse, - RequestID: m.RequestID, - Value: marshalledValue, - Version: m.Version, - XMSContinuationNextPartitionKey: m.XMSContinuationNextPartitionKey, - XMSContinuationNextRowKey: m.XMSContinuationNextRowKey, - }, nil -} - -// TableEntityListByteResponseResponse is the response envelope for operations that return a TableEntityQueryResponse type. -type TableEntityListByteResponseResponse struct { - // ClientRequestID contains the information returned from the x-ms-client-request-id header response. - ClientRequestID *string - - // Date contains the information returned from the Date header response. - Date *time.Time - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response - - // RequestID contains the information returned from the x-ms-request-id header response. - RequestID *string - - // The properties for the table entity query response. - TableEntityQueryResponse *TableEntityQueryByteResponse - - // Version contains the information returned from the x-ms-version header response. - Version *string - - // XMSContinuationNextPartitionKey contains the information returned from the x-ms-continuation-NextPartitionKey header response. - XMSContinuationNextPartitionKey *string - - // XMSContinuationNextRowKey contains the information returned from the x-ms-continuation-NextRowKey header response. - XMSContinuationNextRowKey *string -} - -// TableEntityQueryByteResponse - The properties for the table entity query response. -type TableEntityQueryByteResponse struct { - // The metadata response of the table. - OdataMetadata *string - - // List of table entities. - Value [][]byte -} - -func castToByteResponse(resp *TableEntityQueryResponseResponse) (TableEntityListByteResponseResponse, error) { - marshalledValue := make([][]byte, 0) - for _, e := range resp.TableEntityQueryResponse.Value { - m, err := json.Marshal(e) - if err != nil { - return TableEntityListByteResponseResponse{}, err - } - marshalledValue = append(marshalledValue, m) - } - - t := TableEntityQueryByteResponse{ - OdataMetadata: resp.TableEntityQueryResponse.OdataMetadata, - Value: marshalledValue, - } - - return TableEntityListByteResponseResponse{ - ClientRequestID: resp.ClientRequestID, - Date: resp.Date, - RawResponse: resp.RawResponse, - RequestID: resp.RequestID, - TableEntityQueryResponse: &t, - Version: resp.Version, - XMSContinuationNextPartitionKey: resp.XMSContinuationNextPartitionKey, - XMSContinuationNextRowKey: resp.XMSContinuationNextRowKey, - }, nil -} - -type TableListResponse struct { - // The metadata response of the table. - OdataMetadata *string `json:"odata.metadata,omitempty"` - - // List of tables. - Value []*TableResponseProperties `json:"value,omitempty"` -} - -func tableListResponseFromQueryResponse(q *TableQueryResponse) *TableListResponse { - return &TableListResponse{ - OdataMetadata: q.OdataMetadata, - Value: q.Value, - } -} - -// TableListResponseResponse stores the results of a ListTables operation -type TableListResponseResponse struct { - // ClientRequestID contains the information returned from the x-ms-client-request-id header response. - ClientRequestID *string - - // Date contains the information returned from the Date header response. - Date *time.Time - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response - - // RequestID contains the information returned from the x-ms-request-id header response. - RequestID *string - - // The properties for the table query response. - TableListResponse *TableListResponse - - // Version contains the information returned from the x-ms-version header response. - Version *string - - // XMSContinuationNextTableName contains the information returned from the x-ms-continuation-NextTableName header response. - XMSContinuationNextTableName *string -} - -func listResponseFromQueryResponse(q TableQueryResponseResponse) *TableListResponseResponse { - return &TableListResponseResponse{ - ClientRequestID: q.ClientRequestID, - Date: q.Date, - RawResponse: q.RawResponse, - RequestID: q.RequestID, - TableListResponse: tableListResponseFromQueryResponse(q.TableQueryResponse), - Version: q.Version, - XMSContinuationNextTableName: q.XMSContinuationNextTableName, - } -} diff --git a/sdk/tables/aztable/table_service_client.go b/sdk/tables/aztable/table_service_client.go index 878b3fc142e0..fc331e9a1925 100644 --- a/sdk/tables/aztable/table_service_client.go +++ b/sdk/tables/aztable/table_service_client.go @@ -5,66 +5,76 @@ package aztable import ( "context" + "errors" "strings" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore" + generated "github.com/Azure/azure-sdk-for-go/sdk/tables/aztable/internal" ) const ( - LegacyCosmosTableDomain = ".table.cosmosdb." - CosmosTableDomain = ".table.cosmos." + legacyCosmosTableDomain = ".table.cosmosdb." + cosmosTableDomain = ".table.cosmos." ) -// A TableServiceClient represents a client to the table service. It can be used to query the available tables, add/remove tables, and various other service level operations. -type TableServiceClient struct { - client *tableClient - service *serviceClient +// A ServiceClient represents a client to the table service. It can be used to query the available tables, add/remove tables, and various other service level operations. +type ServiceClient struct { + client *generated.TableClient + service *generated.ServiceClient cred azcore.Credential } -// NewTableServiceClient creates a TableServiceClient struct using the specified serviceURL, credential, and options. -func NewTableServiceClient(serviceURL string, cred azcore.Credential, options *TableClientOptions) (*TableServiceClient, error) { +// NewServiceClient creates a ServiceClient struct using the specified serviceURL, credential, and options. +func NewServiceClient(serviceURL string, cred azcore.Credential, options *ClientOptions) (*ServiceClient, error) { if options == nil { - options = &TableClientOptions{} + options = &ClientOptions{} } conOptions := options.getConnectionOptions() if isCosmosEndpoint(serviceURL) { - conOptions.PerCallPolicies = []azcore.Policy{cosmosPatchTransformPolicy{}} + conOptions.PerCallPolicies = append(conOptions.PerCallPolicies, cosmosPatchTransformPolicy{}) } - conOptions.PerCallPolicies = append(conOptions.PerCallPolicies, cred.NewAuthenticationPolicy(azcore.AuthenticationOptions{TokenRequest: azcore.TokenRequestOptions{Scopes: options.Scopes}})) conOptions.PerCallPolicies = append(conOptions.PerCallPolicies, options.PerCallOptions...) - con := newConnection(serviceURL, conOptions) - return &TableServiceClient{client: &tableClient{con}, service: &serviceClient{con}, cred: cred}, nil + con := generated.NewConnection(serviceURL, cred, conOptions) + return &ServiceClient{ + client: generated.NewTableClient(con), + service: generated.NewServiceClient(con), + cred: cred, + }, nil } -// NewTableClient returns a pointer to a TableClient affinitzed to the specified table name and initialized with the same serviceURL and credentials as this TableServiceClient -func (t *TableServiceClient) NewTableClient(tableName string) *TableClient { - return &TableClient{client: t.client, cred: t.cred, Name: tableName, service: t} +// NewClient returns a pointer to a Client affinitized to the specified table name and initialized with the same serviceURL and credentials as this ServiceClient +func (t *ServiceClient) NewClient(tableName string) *Client { + return &Client{ + client: t.client, + cred: t.cred, + name: tableName, + service: t, + } } // Create creates a table with the specified name. -func (t *TableServiceClient) CreateTable(ctx context.Context, name string) (TableResponseResponse, error) { - resp, err := t.client.Create(ctx, TableProperties{&name}, new(TableCreateOptions), new(QueryOptions)) - if err == nil { - tableResp := resp.(TableResponseResponse) - return tableResp, nil +func (t *ServiceClient) CreateTable(ctx context.Context, name string, options *CreateTableOptions) (*Client, error) { + if options == nil { + options = &CreateTableOptions{} } - return TableResponseResponse{}, err + _, err := t.client.Create(ctx, generated.TableProperties{TableName: &name}, options.toGenerated(), &generated.QueryOptions{}) + return t.NewClient(name), err } // Delete deletes a table by name. -func (t *TableServiceClient) DeleteTable(ctx context.Context, name string, options *TableDeleteOptions) (TableDeleteResponse, error) { +func (t *ServiceClient) DeleteTable(ctx context.Context, name string, options *DeleteTableOptions) (DeleteTableResponse, error) { if options == nil { - options = &TableDeleteOptions{} + options = &DeleteTableOptions{} } - return t.client.Delete(ctx, name, options) + resp, err := t.client.Delete(ctx, name, options.toGenerated()) + return deleteTableResponseFromGen(&resp), err } -// List queries the existing tables using the specified ListOptions. +// List queries the existing tables using the specified ListTablesOptions. // ListOptions can specify the following properties to affect the query results returned: // -// Filter: An Odata filter expression that limits results to those tables that satisfy the filter expression. +// Filter: An OData filter expression that limits results to those tables that satisfy the filter expression. // For example, the following expression would return only tables with a TableName of 'foo': "TableName eq 'foo'" // // Top: The maximum number of tables that will be returned per page of results. @@ -72,18 +82,18 @@ func (t *TableServiceClient) DeleteTable(ctx context.Context, name string, optio // // List returns a Pager, which allows iteration through each page of results. Example: // -// options := &ListOptions{Filter: to.StringPtr("PartitionKey eq 'pk001'"), Top: to.Int32Ptr(25)} +// options := &ListTablesOptions{Filter: to.StringPtr("PartitionKey eq 'pk001'"), Top: to.Int32Ptr(25)} // pager := client.List(options) // Pass in 'nil' if you want to return all Tables for an account. // for pager.NextPage(ctx) { // resp = pager.PageResponse() // fmt.Printf("The page contains %i results.\n", len(resp.TableQueryResponse.Value)) // } // err := pager.Err() -func (t *TableServiceClient) ListTables(listOptions *ListOptions) TableListResponsePager { +func (t *ServiceClient) ListTables(listOptions *ListTablesOptions) ListTablesPager { return &tableQueryResponsePager{ client: t.client, - queryOptions: listOptions, - tableQueryOptions: new(TableQueryOptions), + listOptions: listOptions, + tableQueryOptions: new(generated.TableQueryOptions), } } @@ -93,11 +103,12 @@ func (t *TableServiceClient) ListTables(listOptions *ListOptions) TableListRespo // handle(err) // fmt.Println("Status: ", response.StorageServiceStats.GeoReplication.Status) // fmt.Println(Last Sync Time: ", response.StorageServiceStats.GeoReplication.LastSyncTime) -func (t *TableServiceClient) GetStatistics(ctx context.Context, options *ServiceGetStatisticsOptions) (TableServiceStatsResponse, error) { +func (t *ServiceClient) GetStatistics(ctx context.Context, options *GetStatisticsOptions) (GetStatisticsResponse, error) { if options == nil { - options = &ServiceGetStatisticsOptions{} + options = &GetStatisticsOptions{} } - return t.service.GetStatistics(ctx, options) + resp, err := t.service.GetStatistics(ctx, options.toGenerated()) + return getStatisticsResponseFromGenerated(&resp), err } // GetProperties retrieves the properties for an account including the metrics, logging, and cors rules established. @@ -108,11 +119,12 @@ func (t *TableServiceClient) GetStatistics(ctx context.Context, options *Service // fmt.Println(resopnse.StorageServiceStats.HourMetrics) // fmt.Println(resopnse.StorageServiceStats.Logging) // fmt.Println(resopnse.StorageServiceStats.MinuteMetrics) -func (t *TableServiceClient) GetProperties(ctx context.Context, options *ServiceGetPropertiesOptions) (TableServicePropertiesResponse, error) { +func (t *ServiceClient) GetProperties(ctx context.Context, options *GetPropertiesOptions) (GetPropertiesResponse, error) { if options == nil { - options = &ServiceGetPropertiesOptions{} + options = &GetPropertiesOptions{} } - return t.service.GetProperties(ctx, options) + resp, err := t.service.GetProperties(ctx, options.toGenerated()) + return getPropertiesResponseFromGenerated(&resp), err } // SetProperties allows the user to set cors , metrics, and logging rules for the account. @@ -139,22 +151,22 @@ func (t *TableServiceClient) GetProperties(ctx context.Context, options *Service // props := TableServiceProperties{Logging: &logging} // resp, err := context.client.SetProperties(ctx, props, nil) // handle(err) -func (t *TableServiceClient) SetProperties(ctx context.Context, properties TableServiceProperties, options *ServiceSetPropertiesOptions) (ServiceSetPropertiesResponse, error) { +func (t *ServiceClient) SetProperties(ctx context.Context, properties ServiceProperties, options *SetPropertiesOptions) (SetPropertiesResponse, error) { if options == nil { - options = &ServiceSetPropertiesOptions{} + options = &SetPropertiesOptions{} } - return t.service.SetProperties(ctx, properties, options) -} - -func (s TableServiceClient) CanGetAccountSASToken() bool { - return s.cred != nil + resp, err := t.service.SetProperties(ctx, *properties.toGenerated(), options.toGenerated()) + return setPropertiesResponseFromGenerated(&resp), err } -// GetAccountSASToken is a convenience method for generating a SAS token for the currently pointed at account. -// It can only be used if the supplied azcore.Credential during creation was a SharedKeyCredential. -// This validity can be checked with CanGetAccountSASToken(). -func (t TableServiceClient) GetAccountSASToken(resources AccountSASResourceTypes, permissions AccountSASPermissions, start time.Time, expiry time.Time) (SASQueryParameters, error) { - return AccountSASSignatureValues{ +// GetAccountSASToken is a convenience method for generating a SAS token for the currently pointed at account. This methods returns the full service URL and an error +// if there was an error during creation. This method can only be used if the supplied azcore.Credential during creation was a SharedKeyCredential. +func (t ServiceClient) GetAccountSASToken(resources AccountSASResourceTypes, permissions AccountSASPermissions, start time.Time, expiry time.Time) (string, error) { + cred, ok := t.cred.(*SharedKeyCredential) + if !ok { + return "", errors.New("credential is not a SharedKeyCredential. SAS can only be signed with a SharedKeyCredential") + } + qps, err := AccountSASSignatureValues{ Version: SASVersion, Protocol: SASProtocolHTTPS, Permissions: permissions.String(), @@ -162,33 +174,19 @@ func (t TableServiceClient) GetAccountSASToken(resources AccountSASResourceTypes ResourceTypes: resources.String(), StartTime: start.UTC(), ExpiryTime: expiry.UTC(), - }.NewSASQueryParameters(t.cred.(*SharedKeyCredential)) -} - -// GetTableSASToken is a convenience method for generating a SAS token for a specific table. -// It can only be used if the supplied azcore.Credential during creation was a SharedKeyCredential. -// This validity can be checked with CanGetAccountSASToken(). -func (t TableServiceClient) GetTableSASToken(tableName string, permissions TableSASPermissions, start time.Time, expiry time.Time) (SASQueryParameters, error) { - return TableSASSignatureValues{ - TableName: tableName, - Permissions: permissions.String(), - StartTime: start, - ExpiryTime: expiry, - StartPartitionKey: permissions.StartPartitionKey, - StartRowKey: permissions.StartRowKey, - EndPartitionKey: permissions.EndPartitionKey, - EndRowKey: permissions.EndRowKey, - }.NewSASQueryParameters(t.cred.(*SharedKeyCredential)) -} - -// CanGetSASToken returns true if the TableServiceClient was created with a SharedKeyCredential. -// This method can be used to determine if a TableServiceClient is capable of creating a Table SAS or Account SAS -func (t TableServiceClient) CanGetSASToken() bool { - _, ok := t.cred.(*SharedKeyCredential) - return ok + }.Sign(cred) + if err != nil { + return "", err + } + endpoint := t.client.Con.Endpoint() + if !strings.HasSuffix(endpoint, "/") { + endpoint += "/" + } + endpoint += "?" + qps.Encode() + return endpoint, nil } func isCosmosEndpoint(url string) bool { isCosmosEmulator := strings.Contains(url, "localhost") && strings.Contains(url, "8902") - return isCosmosEmulator || strings.Contains(url, CosmosTableDomain) || strings.Contains(url, LegacyCosmosTableDomain) + return isCosmosEmulator || strings.Contains(url, cosmosTableDomain) || strings.Contains(url, legacyCosmosTableDomain) } diff --git a/sdk/tables/aztable/table_service_client_test.go b/sdk/tables/aztable/table_service_client_test.go index 444de6935415..c29d522af0bc 100644 --- a/sdk/tables/aztable/table_service_client_test.go +++ b/sdk/tables/aztable/table_service_client_test.go @@ -14,19 +14,25 @@ import ( "github.com/stretchr/testify/require" ) +const tableNamePrefix = "tableName" + func TestServiceErrorsServiceClient(t *testing.T) { for _, service := range services { t.Run(fmt.Sprintf("%v_%v", t.Name(), service), func(t *testing.T) { service, delete := initServiceTest(t, service) defer delete() - _, err := service.CreateTable(context.Background(), "tableName") + + tableName, err := createRandomName(t, tableNamePrefix) + require.NoError(t, err) + + _, err = service.CreateTable(context.Background(), tableName, nil) require.NoError(t, err) // Create a duplicate table to produce an error - _, err = service.CreateTable(context.Background(), "tableName") + _, err = service.CreateTable(context.Background(), tableName, nil) require.Error(t, err) - _, err = service.DeleteTable(context.Background(), "tableName", nil) + _, err = service.DeleteTable(context.Background(), tableName, nil) require.NoError(t, err) }) } @@ -37,10 +43,11 @@ func TestCreateTableFromService(t *testing.T) { t.Run(fmt.Sprintf("%v_%v", t.Name(), service), func(t *testing.T) { service, delete := initServiceTest(t, service) defer delete() - tableName, err := createRandomName(t, "tableName") + + tableName, err := createRandomName(t, tableNamePrefix) require.NoError(t, err) - resp, err := service.CreateTable(ctx, tableName) + _, err = service.CreateTable(ctx, tableName, nil) deleteTable := func() { _, err := service.DeleteTable(ctx, tableName, nil) if err != nil { @@ -50,7 +57,7 @@ func TestCreateTableFromService(t *testing.T) { defer deleteTable() require.NoError(t, err) - require.Equal(t, *resp.TableResponse.TableName, tableName) + // require.Equal(t, *resp.TableResponse.TableName, tableName) }) } } @@ -76,18 +83,18 @@ func TestQueryTable(t *testing.T) { name := fmt.Sprintf("%v%v", prefix2, i) tableNames[i] = name } - _, err := service.CreateTable(ctx, tableNames[i]) + _, err := service.CreateTable(ctx, tableNames[i], nil) require.NoError(t, err) } // Query for tables with no pagination. The filter should exclude one table from the results filter := fmt.Sprintf("TableName ge '%s' and TableName lt '%s'", prefix1, prefix2) - pager := service.ListTables(&ListOptions{Filter: &filter}) + pager := service.ListTables(&ListTablesOptions{Filter: &filter}) resultCount := 0 for pager.NextPage(ctx) { resp := pager.PageResponse() - resultCount += len(resp.TableListResponse.Value) + resultCount += len(resp.Tables) } require.NoError(t, pager.Err()) @@ -95,13 +102,13 @@ func TestQueryTable(t *testing.T) { // Query for tables with pagination top := int32(2) - pager = service.ListTables(&ListOptions{Filter: &filter, Top: &top}) + pager = service.ListTables(&ListTablesOptions{Filter: &filter, Top: &top}) resultCount = 0 pageCount := 0 for pager.NextPage(ctx) { resp := pager.PageResponse() - resultCount += len(resp.TableListResponse.Value) + resultCount += len(resp.Tables) pageCount++ } @@ -118,14 +125,14 @@ func TestListTables(t *testing.T) { t.Run(fmt.Sprintf("%v_%v", t.Name(), service), func(t *testing.T) { service, delete := initServiceTest(t, service) defer delete() - tableName, err := createRandomName(t, "tableName") + tableName, err := createRandomName(t, tableNamePrefix) require.NoError(t, err) err = clearAllTables(service) require.NoError(t, err) for i := 0; i < 5; i++ { - _, err := service.CreateTable(ctx, fmt.Sprintf("%v%v", tableName, i)) + _, err := service.CreateTable(ctx, fmt.Sprintf("%v%v", tableName, i), nil) require.NoError(t, err) } @@ -133,7 +140,7 @@ func TestListTables(t *testing.T) { pager := service.ListTables(nil) for pager.NextPage(ctx) { resp := pager.PageResponse() - count += len(resp.TableListResponse.Value) + count += len(resp.Tables) } require.NoError(t, pager.Err()) @@ -160,7 +167,7 @@ func TestGetStatistics(t *testing.T) { require.NoError(t, err) accountName := recording.GetEnvVariable(t, "TABLES_STORAGE_ACCOUNT_NAME", "fakestorageaccount") serviceURL := storageURI(accountName+"-secondary", "core.windows.net") - service, err := createTableServiceClientForRecording(t, serviceURL, cred) + service, err := createServiceClientForRecording(t, serviceURL, cred) require.NoError(t, err) // s.T().Skip() // TODO: need to change URL to -secondary https://docs.microsoft.com/en-us/rest/api/storageservices/get-table-service-stats @@ -194,7 +201,7 @@ func TestSetLogging(t *testing.T) { Days: to.Int32Ptr(5), }, } - props := TableServiceProperties{Logging: &logging} + props := ServiceProperties{Logging: &logging} resp, err := service.SetProperties(ctx, props, nil) require.NoError(t, err) @@ -205,11 +212,11 @@ func TestSetLogging(t *testing.T) { received, err := service.GetProperties(ctx, nil) require.NoError(t, err) - require.Equal(t, *props.Logging.Read, *received.StorageServiceProperties.Logging.Read) - require.Equal(t, *props.Logging.Write, *received.StorageServiceProperties.Logging.Write) - require.Equal(t, *props.Logging.Delete, *received.StorageServiceProperties.Logging.Delete) - require.Equal(t, *props.Logging.RetentionPolicy.Enabled, *received.StorageServiceProperties.Logging.RetentionPolicy.Enabled) - require.Equal(t, *props.Logging.RetentionPolicy.Days, *received.StorageServiceProperties.Logging.RetentionPolicy.Days) + require.Equal(t, *props.Logging.Read, *received.Logging.Read) + require.Equal(t, *props.Logging.Write, *received.Logging.Write) + require.Equal(t, *props.Logging.Delete, *received.Logging.Delete) + require.Equal(t, *props.Logging.RetentionPolicy.Enabled, *received.Logging.RetentionPolicy.Enabled) + require.Equal(t, *props.Logging.RetentionPolicy.Days, *received.Logging.RetentionPolicy.Days) } func TestSetHoursMetrics(t *testing.T) { @@ -225,7 +232,7 @@ func TestSetHoursMetrics(t *testing.T) { }, Version: to.StringPtr("1.0"), } - props := TableServiceProperties{HourMetrics: &metrics} + props := ServiceProperties{HourMetrics: &metrics} resp, err := service.SetProperties(ctx, props, nil) require.NoError(t, err) @@ -236,10 +243,10 @@ func TestSetHoursMetrics(t *testing.T) { received, err := service.GetProperties(ctx, nil) require.NoError(t, err) - require.Equal(t, *props.HourMetrics.Enabled, *received.StorageServiceProperties.HourMetrics.Enabled) - require.Equal(t, *props.HourMetrics.IncludeAPIs, *received.StorageServiceProperties.HourMetrics.IncludeAPIs) - require.Equal(t, *props.HourMetrics.RetentionPolicy.Days, *received.StorageServiceProperties.HourMetrics.RetentionPolicy.Days) - require.Equal(t, *props.HourMetrics.RetentionPolicy.Enabled, *received.StorageServiceProperties.HourMetrics.RetentionPolicy.Enabled) + require.Equal(t, *props.HourMetrics.Enabled, *received.HourMetrics.Enabled) + require.Equal(t, *props.HourMetrics.IncludeAPIs, *received.HourMetrics.IncludeAPIs) + require.Equal(t, *props.HourMetrics.RetentionPolicy.Days, *received.HourMetrics.RetentionPolicy.Days) + require.Equal(t, *props.HourMetrics.RetentionPolicy.Enabled, *received.HourMetrics.RetentionPolicy.Enabled) } func TestSetMinuteMetrics(t *testing.T) { @@ -255,7 +262,7 @@ func TestSetMinuteMetrics(t *testing.T) { }, Version: to.StringPtr("1.0"), } - props := TableServiceProperties{MinuteMetrics: &metrics} + props := ServiceProperties{MinuteMetrics: &metrics} resp, err := service.SetProperties(ctx, props, nil) require.NoError(t, err) @@ -266,10 +273,10 @@ func TestSetMinuteMetrics(t *testing.T) { received, err := service.GetProperties(ctx, nil) require.NoError(t, err) - require.Equal(t, *props.MinuteMetrics.Enabled, *received.StorageServiceProperties.MinuteMetrics.Enabled) - require.Equal(t, *props.MinuteMetrics.IncludeAPIs, *received.StorageServiceProperties.MinuteMetrics.IncludeAPIs) - require.Equal(t, *props.MinuteMetrics.RetentionPolicy.Days, *received.StorageServiceProperties.MinuteMetrics.RetentionPolicy.Days) - require.Equal(t, *props.MinuteMetrics.RetentionPolicy.Enabled, *received.StorageServiceProperties.MinuteMetrics.RetentionPolicy.Enabled) + require.Equal(t, *props.MinuteMetrics.Enabled, *received.MinuteMetrics.Enabled) + require.Equal(t, *props.MinuteMetrics.IncludeAPIs, *received.MinuteMetrics.IncludeAPIs) + require.Equal(t, *props.MinuteMetrics.RetentionPolicy.Days, *received.MinuteMetrics.RetentionPolicy.Days) + require.Equal(t, *props.MinuteMetrics.RetentionPolicy.Enabled, *received.MinuteMetrics.RetentionPolicy.Enabled) } func TestSetCors(t *testing.T) { @@ -283,7 +290,7 @@ func TestSetCors(t *testing.T) { ExposedHeaders: to.StringPtr("x-ms-meta-source*"), MaxAgeInSeconds: to.Int32Ptr(500), } - props := TableServiceProperties{Cors: []*CorsRule{&corsRules1}} + props := ServiceProperties{Cors: []*CorsRule{&corsRules1}} resp, err := service.SetProperties(ctx, props, nil) require.NoError(t, err) @@ -294,11 +301,11 @@ func TestSetCors(t *testing.T) { received, err := service.GetProperties(ctx, nil) require.NoError(t, err) - require.Equal(t, *props.Cors[0].AllowedHeaders, *received.StorageServiceProperties.Cors[0].AllowedHeaders) - require.Equal(t, *props.Cors[0].AllowedMethods, *received.StorageServiceProperties.Cors[0].AllowedMethods) - require.Equal(t, *props.Cors[0].AllowedOrigins, *received.StorageServiceProperties.Cors[0].AllowedOrigins) - require.Equal(t, *props.Cors[0].ExposedHeaders, *received.StorageServiceProperties.Cors[0].ExposedHeaders) - require.Equal(t, *props.Cors[0].MaxAgeInSeconds, *received.StorageServiceProperties.Cors[0].MaxAgeInSeconds) + require.Equal(t, *props.Cors[0].AllowedHeaders, *received.Cors[0].AllowedHeaders) + require.Equal(t, *props.Cors[0].AllowedMethods, *received.Cors[0].AllowedMethods) + require.Equal(t, *props.Cors[0].AllowedOrigins, *received.Cors[0].AllowedOrigins) + require.Equal(t, *props.Cors[0].ExposedHeaders, *received.Cors[0].ExposedHeaders) + require.Equal(t, *props.Cors[0].MaxAgeInSeconds, *received.Cors[0].MaxAgeInSeconds) } func TestSetTooManyCors(t *testing.T) { @@ -312,7 +319,7 @@ func TestSetTooManyCors(t *testing.T) { ExposedHeaders: to.StringPtr("x-ms-meta-source*"), MaxAgeInSeconds: to.Int32Ptr(500), } - props := TableServiceProperties{Cors: make([]*CorsRule, 0)} + props := ServiceProperties{Cors: make([]*CorsRule, 0)} for i := 0; i < 6; i++ { props.Cors = append(props.Cors, &corsRules1) } @@ -334,7 +341,7 @@ func TestRetentionTooLong(t *testing.T) { }, Version: to.StringPtr("1.0"), } - props := TableServiceProperties{MinuteMetrics: &metrics} + props := ServiceProperties{MinuteMetrics: &metrics} _, err := service.SetProperties(ctx, props, nil) require.Error(t, err) diff --git a/sdk/tables/aztable/table_transactional_batch.go b/sdk/tables/aztable/table_transactional_batch.go index cb2227e2fd9d..c0851c940eb7 100644 --- a/sdk/tables/aztable/table_transactional_batch.go +++ b/sdk/tables/aztable/table_transactional_batch.go @@ -16,23 +16,25 @@ import ( "net/http" "net/textproto" "sort" - "strconv" - "strings" - "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/streaming" "github.com/Azure/azure-sdk-for-go/sdk/internal/uuid" + generated "github.com/Azure/azure-sdk-for-go/sdk/tables/aztable/internal" + "github.com/Azure/azure-sdk-for-go/sdk/to" ) -type TableTransactionActionType string +type TransactionType string const ( - Add TableTransactionActionType = "add" - UpdateMerge TableTransactionActionType = "updatemerge" - UpdateReplace TableTransactionActionType = "updatereplace" - Delete TableTransactionActionType = "delete" - InsertMerge TableTransactionActionType = "insertmerge" - InsertReplace TableTransactionActionType = "insertreplace" + Add TransactionType = "add" + UpdateMerge TransactionType = "updatemerge" + UpdateReplace TransactionType = "updatereplace" + Delete TransactionType = "delete" + InsertMerge TransactionType = "insertmerge" + InsertReplace TransactionType = "insertreplace" ) const ( @@ -41,181 +43,184 @@ const ( error_empty_transaction = "transaction cannot be empty" ) -type OdataErrorMessage struct { +// Use azcore.ResponseError type, pass RawResponse, might have to create manually depending on constructor +// Int statuscode, Return the inner status code +// ErrorCode string set equal to OdataErrorMessage ("DuplicateRowKey") +// Lang/Value are useless at runtime, failedentity index as well + +type oDataErrorMessage struct { Lang string `json:"lang"` Value string `json:"value"` } -type OdataError struct { +type oDataError struct { Code string `json:"code"` - Message OdataErrorMessage `json:"message"` + Message oDataErrorMessage `json:"message"` } -type TableTransactionError struct { - OdataError OdataError `json:"odata.error"` +type tableTransactionError struct { + ODataError oDataError `json:"odata.error"` FailedEntityIndex int } -func (e *TableTransactionError) Error() string { - return fmt.Sprintf("Code: %s, Message: %s", e.OdataError.Code, e.OdataError.Message.Value) +type transactionError struct { + rawResponse *http.Response + statusCode int + errorCode string + odataError oDataError `json:"odata.error"` //nolint } -type TableTransactionAction struct { - ActionType TableTransactionActionType - Entity []byte - ETag string +func (t *transactionError) StatusCode() int { + return t.rawResponse.StatusCode } -type TableTransactionResponse struct { - // ClientRequestID contains the information returned from the x-ms-client-request-id header response. - ClientRequestID *string +func (t *transactionError) ErrorCode() string { + return t.odataError.Code +} - // Date contains the information returned from the Date header response. - Date *time.Time +func (t *transactionError) RawResponse() *http.Response { + return t.rawResponse +} - // PreferenceApplied contains the information returned from the Preference-Applied header response. - PreferenceApplied *string +func (t *transactionError) Error() string { + return fmt.Sprintf("Code: %s, Message: %s", t.odataError.Code, t.odataError.Message.Value) +} - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response +type ResponseError interface { + error - // RequestID contains the information returned from the x-ms-request-id header response. - RequestID *string + StatusCode() int - // The response for a single table. - TransactionResponses *[]http.Response + ErrorCode() string + + RawResponse() *http.Response +} - // Version contains the information returned from the x-ms-version header response. - Version *string +type TransactionAction struct { + ActionType TransactionType + Entity []byte + IfMatch *azcore.ETag +} +type TransactionResponse struct { + // RawResponse contains the underlying HTTP response. + RawResponse *http.Response + // The response for a single table. + TransactionResponses *[]http.Response // ContentType contains the information returned from the Content-Type header response. - ContentType *string + ContentType string } -type TableSubmitTransactionOptions struct { +type SubmitTransactionOptions struct { RequestID *string } -// SubmitTransaction submits the table transactional batch according to the slice of TableTransactionActions provided. -func (t *TableClient) SubmitTransaction(ctx context.Context, transactionActions []TableTransactionAction, tableSubmitTransactionOptions *TableSubmitTransactionOptions) (*TableTransactionResponse, error) { +// SubmitTransaction submits the table transactional batch according to the slice of TableTransactionActions provided. All transactionActions must be for entities +// with the same PartitionKey. There can only be one transaction action for a row key, a duplicated row key will return an error. The TransactionResponse object +// contains the response for each sub-request in the same order that they are made in the transactionActions parameter. +func (t *Client) SubmitTransaction(ctx context.Context, transactionActions []TransactionAction, tableSubmitTransactionOptions *SubmitTransactionOptions) (TransactionResponse, error) { u1, err := uuid.New() if err != nil { - return nil, err + return TransactionResponse{}, err } u2, err := uuid.New() if err != nil { - return nil, err + return TransactionResponse{}, err } return t.submitTransactionInternal(ctx, &transactionActions, u1, u2, tableSubmitTransactionOptions) } // submitTransactionInternal is the internal implementation for SubmitTransaction. It allows for explicit configuration of the batch and changeset UUID values for testing. -func (t *TableClient) submitTransactionInternal(ctx context.Context, transactionActions *[]TableTransactionAction, batchUuid uuid.UUID, changesetUuid uuid.UUID, tableSubmitTransactionOptions *TableSubmitTransactionOptions) (*TableTransactionResponse, error) { +func (t *Client) submitTransactionInternal(ctx context.Context, transactionActions *[]TransactionAction, batchUuid uuid.UUID, changesetUuid uuid.UUID, tableSubmitTransactionOptions *SubmitTransactionOptions) (TransactionResponse, error) { if len(*transactionActions) == 0 { - return &TableTransactionResponse{}, errors.New(error_empty_transaction) + return TransactionResponse{}, errors.New(error_empty_transaction) } changesetBoundary := fmt.Sprintf("changeset_%s", changesetUuid.String()) changeSetBody, err := t.generateChangesetBody(changesetBoundary, transactionActions) if err != nil { - return &TableTransactionResponse{}, err + return TransactionResponse{}, err } - req, err := azcore.NewRequest(ctx, http.MethodPost, azcore.JoinPaths(t.client.con.Endpoint(), "$batch")) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(t.client.Con.Endpoint(), "$batch")) if err != nil { - return &TableTransactionResponse{}, err + return TransactionResponse{}, err } - req.Header.Set("x-ms-version", "2019-02-02") + req.Raw().Header.Set("x-ms-version", "2019-02-02") if tableSubmitTransactionOptions != nil && tableSubmitTransactionOptions.RequestID != nil { - req.Header.Set("x-ms-client-request-id", *tableSubmitTransactionOptions.RequestID) + req.Raw().Header.Set("x-ms-client-request-id", *tableSubmitTransactionOptions.RequestID) } - req.Header.Set("DataServiceVersion", "3.0") - req.Header.Set("Accept", string(OdataMetadataFormatApplicationJSONOdataMinimalmetadata)) + req.Raw().Header.Set("DataServiceVersion", "3.0") + req.Raw().Header.Set("Accept", string(generated.ODataMetadataFormatApplicationJSONODataMinimalmetadata)) boundary := fmt.Sprintf("batch_%s", batchUuid.String()) body := new(bytes.Buffer) writer := multipart.NewWriter(body) err = writer.SetBoundary(boundary) if err != nil { - return &TableTransactionResponse{}, err + return TransactionResponse{}, err } h := make(textproto.MIMEHeader) h.Set(headerContentType, fmt.Sprintf("multipart/mixed; boundary=%s", changesetBoundary)) batchWriter, err := writer.CreatePart(h) if err != nil { - return &TableTransactionResponse{}, err + return TransactionResponse{}, err } _, err = batchWriter.Write(changeSetBody.Bytes()) if err != nil { - return &TableTransactionResponse{}, err + return TransactionResponse{}, err } writer.Close() - err = req.SetBody(azcore.NopCloser(bytes.NewReader(body.Bytes())), fmt.Sprintf("multipart/mixed; boundary=%s", boundary)) + err = req.SetBody(streaming.NopCloser(bytes.NewReader(body.Bytes())), fmt.Sprintf("multipart/mixed; boundary=%s", boundary)) if err != nil { - return &TableTransactionResponse{}, err + return TransactionResponse{}, err } - resp, err := t.client.con.Pipeline().Do(req) + resp, err := t.client.Con.Pipeline().Do(req) if err != nil { - return &TableTransactionResponse{}, err + return TransactionResponse{}, err } transactionResponse, err := buildTransactionResponse(req, resp, len(*transactionActions)) if err != nil { - return transactionResponse, err + return *transactionResponse, err } - if !azcore.HasStatusCode(resp, http.StatusAccepted, http.StatusNoContent) { - return &TableTransactionResponse{}, azcore.NewResponseError(err, resp) + if !runtime.HasStatusCode(resp, http.StatusAccepted, http.StatusNoContent) { + return TransactionResponse{}, runtime.NewResponseError(err, resp) } - return transactionResponse, nil + return *transactionResponse, nil } -func buildTransactionResponse(req *azcore.Request, resp *http.Response, itemCount int) (*TableTransactionResponse, error) { +// create the transaction response. This will read the inner responses +func buildTransactionResponse(req *policy.Request, resp *http.Response, itemCount int) (*TransactionResponse, error) { innerResponses := make([]http.Response, itemCount) - result := TableTransactionResponse{RawResponse: resp, TransactionResponses: &innerResponses} - - if val := resp.Header.Get("x-ms-client-request-id"); val != "" { - result.ClientRequestID = &val - } - if val := resp.Header.Get("x-ms-request-id"); val != "" { - result.RequestID = &val - } - if val := resp.Header.Get("x-ms-version"); val != "" { - result.Version = &val - } - if val := resp.Header.Get("Date"); val != "" { - date, err := time.Parse(time.RFC1123, val) - if err != nil { - return &TableTransactionResponse{}, err - } - result.Date = &date - } + result := TransactionResponse{RawResponse: resp, TransactionResponses: &innerResponses} - if val := resp.Header.Get("Preference-Applied"); val != "" { - result.PreferenceApplied = &val - } if val := resp.Header.Get("Content-Type"); val != "" { - result.ContentType = &val + result.ContentType = val } bytesBody, err := ioutil.ReadAll(resp.Body) if err != nil { - return &TableTransactionResponse{}, err + return &TransactionResponse{}, err } reader := bytes.NewReader(bytesBody) if bytes.IndexByte(bytesBody, '{') == 0 { // This is a failure and the body is json - return &TableTransactionResponse{}, newTableTransactionError(bytesBody) + return &TransactionResponse{}, newTableTransactionError(bytesBody, resp) } outerBoundary := getBoundaryName(bytesBody) mpReader := multipart.NewReader(reader, outerBoundary) outerPart, err := mpReader.NextPart() if err != nil { - return &TableTransactionResponse{}, err + return &TransactionResponse{}, err } - innerBytes, err := ioutil.ReadAll(outerPart) //nolint + innerBytes, err := ioutil.ReadAll(outerPart) + if err != nil && err != io.ErrUnexpectedEOF { // Cosmos specific error handling + return &TransactionResponse{}, err + } innerBoundary := getBoundaryName(innerBytes) reader = bytes.NewReader(innerBytes) mpReader = multipart.NewReader(reader, innerBoundary) @@ -226,17 +231,21 @@ func buildTransactionResponse(req *azcore.Request, resp *http.Response, itemCoun if err != nil { break } - r, err := http.ReadResponse(bufio.NewReader(bytes.NewBuffer(part)), req.Request) + r, err := http.ReadResponse(bufio.NewReader(bytes.NewBuffer(part)), req.Raw()) if err != nil { - return &TableTransactionResponse{}, err + return &TransactionResponse{}, err } if r.StatusCode >= 400 { errorBody, err := ioutil.ReadAll(r.Body) if err != nil { - return &TableTransactionResponse{}, err + return &TransactionResponse{}, err } else { innerResponses = []http.Response{*r} - return &result, newTableTransactionError(errorBody) + retError := newTableTransactionError(errorBody, resp) + ret := retError.(*transactionError) + ret.statusCode = r.StatusCode + return &result, ret + // return &result, azcore.NewResponseError(ErrFailedBatch, resp) //newTableTransactionError(errorBody) } } innerResponses[i] = *r @@ -255,22 +264,21 @@ func getBoundaryName(bytesBody []byte) string { } // newTableTransactionError handles the SubmitTransaction error response. -func newTableTransactionError(errorBody []byte) error { - oe := TableTransactionError{} +func newTableTransactionError(errorBody []byte, resp *http.Response) error { + oe := tableTransactionError{} if err := json.Unmarshal(errorBody, &oe); err == nil { - if i := strings.Index(oe.OdataError.Message.Value, ":"); i > 0 { - if val, err := strconv.Atoi(oe.OdataError.Message.Value[0:i]); err == nil { - oe.FailedEntityIndex = val - } + return &transactionError{ + rawResponse: resp, + errorCode: oe.ODataError.Code, + odataError: oe.ODataError, } - return &oe } - return errors.New("Unknown error.") + return fmt.Errorf("unknown error: %s", string(errorBody)) } // generateChangesetBody generates the individual changesets for the various operations within the batch request. // There is a changeset for Insert, Delete, Merge etc. -func (t *TableClient) generateChangesetBody(changesetBoundary string, transactionActions *[]TableTransactionAction) (*bytes.Buffer, error) { +func (t *Client) generateChangesetBody(changesetBoundary string, transactionActions *[]TransactionAction) (*bytes.Buffer, error) { body := new(bytes.Buffer) writer := multipart.NewWriter(body) @@ -291,17 +299,17 @@ func (t *TableClient) generateChangesetBody(changesetBoundary string, transactio } // generateEntitySubset generates body payload for particular batch entity -func (t *TableClient) generateEntitySubset(transactionAction *TableTransactionAction, writer *multipart.Writer) error { +func (t *Client) generateEntitySubset(transactionAction *TransactionAction, writer *multipart.Writer) error { h := make(textproto.MIMEHeader) h.Set(headerContentTransferEncoding, "binary") h.Set(headerContentType, "application/http") - qo := &QueryOptions{Format: OdataMetadataFormatApplicationJSONOdataMinimalmetadata.ToPtr()} + qo := &generated.QueryOptions{Format: generated.ODataMetadataFormatApplicationJSONODataMinimalmetadata.ToPtr()} operationWriter, err := writer.CreatePart(h) if err != nil { return err } - var req *azcore.Request + var req *policy.Request var entity map[string]interface{} err = json.Unmarshal(transactionAction.Entity, &entity) if err != nil { @@ -315,50 +323,51 @@ func (t *TableClient) generateEntitySubset(transactionAction *TableTransactionAc return fmt.Errorf("entity properties must contain a %s property", rowKey) } // Consider empty ETags as '*' - if len(transactionAction.ETag) == 0 { - transactionAction.ETag = "*" + if transactionAction.IfMatch == nil { + star := azcore.ETagAny + transactionAction.IfMatch = &star } switch transactionAction.ActionType { case Delete: - req, err = t.client.deleteEntityCreateRequest(ctx, t.Name, entity[partitionKey].(string), entity[rowKey].(string), transactionAction.ETag, &TableDeleteEntityOptions{}, qo) + req, err = t.client.DeleteEntityCreateRequest(ctx, t.name, entity[partitionKey].(string), entity[rowKey].(string), string(*transactionAction.IfMatch), &generated.TableDeleteEntityOptions{}, qo) if err != nil { return err } case Add: - req, err = t.client.insertEntityCreateRequest(ctx, t.Name, &TableInsertEntityOptions{TableEntityProperties: entity, ResponsePreference: ResponseFormatReturnNoContent.ToPtr()}, qo) + req, err = t.client.InsertEntityCreateRequest(ctx, t.name, &generated.TableInsertEntityOptions{TableEntityProperties: entity, ResponsePreference: generated.ResponseFormatReturnNoContent.ToPtr()}, qo) if err != nil { return err } case UpdateMerge: fallthrough case InsertMerge: - opts := &TableMergeEntityOptions{TableEntityProperties: entity} - if len(transactionAction.ETag) > 0 { - opts.IfMatch = &transactionAction.ETag + opts := &generated.TableMergeEntityOptions{TableEntityProperties: entity} + if transactionAction.IfMatch != nil { + opts.IfMatch = to.StringPtr(string(*transactionAction.IfMatch)) } - req, err = t.client.mergeEntityCreateRequest(ctx, t.Name, entity[partitionKey].(string), entity[rowKey].(string), opts, qo) + req, err = t.client.MergeEntityCreateRequest(ctx, t.name, entity[partitionKey].(string), entity[rowKey].(string), opts, qo) if err != nil { return err } - if isCosmosEndpoint(t.client.con.Endpoint()) { + if isCosmosEndpoint(t.client.Con.Endpoint()) { transformPatchToCosmosPost(req) } case UpdateReplace: fallthrough case InsertReplace: - req, err = t.client.updateEntityCreateRequest(ctx, t.Name, entity[partitionKey].(string), entity[rowKey].(string), &TableUpdateEntityOptions{TableEntityProperties: entity, IfMatch: &transactionAction.ETag}, qo) + req, err = t.client.UpdateEntityCreateRequest(ctx, t.name, entity[partitionKey].(string), entity[rowKey].(string), &generated.TableUpdateEntityOptions{TableEntityProperties: entity, IfMatch: to.StringPtr(string(*transactionAction.IfMatch))}, qo) if err != nil { return err } } - urlAndVerb := fmt.Sprintf("%s %s HTTP/1.1\r\n", req.Method, req.URL) + urlAndVerb := fmt.Sprintf("%s %s HTTP/1.1\r\n", req.Raw().Method, req.Raw().URL) _, err = operationWriter.Write([]byte(urlAndVerb)) if err != nil { return err } - err = writeHeaders(req.Header, &operationWriter) + err = writeHeaders(req.Raw().Header, &operationWriter) if err != nil { return err } @@ -366,10 +375,7 @@ func (t *TableClient) generateEntitySubset(transactionAction *TableTransactionAc if err != nil { return err } - if req.Body != nil { - _, err = io.Copy(operationWriter, req.Body) - - } + _, err = io.Copy(operationWriter, req.Body()) return err } diff --git a/sdk/tables/aztable/zc_client_options.go b/sdk/tables/aztable/zc_client_options.go index 7109060d7ac1..2c8056a2a284 100644 --- a/sdk/tables/aztable/zc_client_options.go +++ b/sdk/tables/aztable/zc_client_options.go @@ -4,30 +4,30 @@ package aztable import ( - "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + generated "github.com/Azure/azure-sdk-for-go/sdk/tables/aztable/internal" ) -type TableClientOptions struct { - // HTTPClient sets the transport for making HTTP requests. - HTTPClient azcore.Transporter +type ClientOptions struct { + // Transporter sets the transport for making HTTP requests. + Transporter policy.Transporter // Retry configures the built-in retry policy behavior. - Retry azcore.RetryOptions + Retry policy.RetryOptions // Telemetry configures the built-in telemetry policy behavior. - Telemetry azcore.TelemetryOptions + Telemetry policy.TelemetryOptions // PerCallOptions are options to run on every request - PerCallOptions []azcore.Policy - // Scopes are the authentication scopes for AAD Authentication - Scopes []string + PerCallOptions []policy.Policy } -func (o *TableClientOptions) getConnectionOptions() *connectionOptions { +func (o *ClientOptions) getConnectionOptions() *generated.ConnectionOptions { if o == nil { return nil } - return &connectionOptions{ - HTTPClient: o.HTTPClient, - Retry: o.Retry, - Telemetry: o.Telemetry, + return &generated.ConnectionOptions{ + HTTPClient: o.Transporter, + Retry: o.Retry, + Telemetry: o.Telemetry, + PerCallPolicies: []policy.Policy{}, } } diff --git a/sdk/tables/aztable/zc_table_constants.go b/sdk/tables/aztable/zc_table_constants.go index 34c70e703d9c..041646a757e7 100644 --- a/sdk/tables/aztable/zc_table_constants.go +++ b/sdk/tables/aztable/zc_table_constants.go @@ -9,11 +9,8 @@ const ( timestamp = "Timestamp" partitionKey = "PartitionKey" rowKey = "RowKey" - etagOdata = "odata.etag" etag = "ETag" - OdataType = "@odata.type" - ISO8601 = "2006-01-02T15:04:05.9999999Z" ) var errPartitionKeyRowKeyError = errors.New("entity must have a PartitionKey and RowKey") -var errTooManyAccessPoliciesError = errors.New("you cannot set more than five (5) access policies at a time.") +var errTooManyAccessPoliciesError = errors.New("you cannot set more than five (5) access policies at a time") diff --git a/sdk/tables/aztable/zt_table_recorded_tests.go b/sdk/tables/aztable/zt_table_recorded_tests.go index da90be062fda..04ff643e033d 100644 --- a/sdk/tables/aztable/zt_table_recorded_tests.go +++ b/sdk/tables/aztable/zt_table_recorded_tests.go @@ -13,11 +13,6 @@ import ( "github.com/stretchr/testify/require" ) -const ( - DefaultStorageSuffix = "core.windows.net" - DefaultCosmosSuffix = "cosmos.azure.com" -) - type EndpointType string const ( @@ -35,7 +30,7 @@ func cosmosURI(accountName string, endpointSuffix string) string { return fmt.Sprintf("https://%v.table.%v/", accountName, endpointSuffix) } -func insertNEntities(pk string, n int, client *TableClient) error { +func insertNEntities(pk string, n int, client *Client) error { for i := 0; i < n; i++ { e := &map[string]interface{}{ "PartitionKey": pk, @@ -46,7 +41,7 @@ func insertNEntities(pk string, n int, client *TableClient) error { if err != nil { return err } - _, err = client.AddEntity(ctx, marshalled) + _, err = client.AddEntity(ctx, marshalled, nil) if err != nil { return err } @@ -131,8 +126,8 @@ func createComplexEntities(count int, pk string) *[]complexTestEntity { return &result } -func createEdmEntity(count int, pk string) EdmEntity { - return EdmEntity{ +func createEdmEntity(count int, pk string) EDMEntity { + return EDMEntity{ Entity: Entity{ PartitionKey: pk, RowKey: fmt.Sprint(count), @@ -140,19 +135,19 @@ func createEdmEntity(count int, pk string) EdmEntity { Properties: map[string]interface{}{ "Bool": false, "Int32": int32(1234), - "Int64": EdmInt64(123456789012), + "Int64": EDMInt64(123456789012), "Double": 1234.1234, "String": "test", - "Guid": EdmGuid("4185404a-5818-48c3-b9be-f217df0dba6f"), - "DateTime": EdmDateTime(time.Date(2013, time.August, 02, 17, 37, 43, 9004348, time.UTC)), - "Binary": EdmBinary("SomeBinary"), + "Guid": EDMGUID("4185404a-5818-48c3-b9be-f217df0dba6f"), + "DateTime": EDMDateTime(time.Date(2013, time.August, 02, 17, 37, 43, 9004348, time.UTC)), + "Binary": EDMBinary("SomeBinary"), }, } } func requireSameDateTime(t *testing.T, time1, time2 interface{}) { - t1 := time.Time(time1.(EdmDateTime)) - t2 := time.Time(time2.(EdmDateTime)) + t1 := time.Time(time1.(EDMDateTime)) + t2 := time.Time(time2.(EDMDateTime)) require.Equal(t, t1.Year(), t2.Year()) require.Equal(t, t1.Month(), t2.Month()) require.Equal(t, t1.Day(), t2.Day()) diff --git a/sdk/tables/test-resources.json b/sdk/tables/test-resources.json new file mode 100644 index 000000000000..1658eecf704d --- /dev/null +++ b/sdk/tables/test-resources.json @@ -0,0 +1,127 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "baseName": { + "type": "String" + }, + "testApplicationOid": { + "type": "string", + "metadata": { + "description": "The principal to assign the role to. This is application object id." + } + } + }, + "variables": { + "mgmtApiVersion": "2019-04-01", + "authorizationApiVersion": "2018-09-01-preview", + "blobDataContributorRoleId": "[concat('/subscriptions/', subscription().subscriptionId, '/providers/Microsoft.Authorization/roleDefinitions/0a9a7e1f-b9d0-4cc4-a60d-0319b160aaa3')]", + "location": "[resourceGroup().location]", + "primaryAccountName": "[concat(parameters('baseName'), 'prim')]", + "encryption": { + "services": { + "file": { + "enabled": true + }, + "blob": { + "enabled": true + } + }, + "keySource": "Microsoft.Storage" + }, + "networkAcls": { + "bypass": "AzureServices", + "virtualNetworkRules": [], + "ipRules": [], + "defaultAction": "Allow" + } + }, + "resources": [ + { + "type": "Microsoft.Authorization/roleAssignments", + "apiVersion": "[variables('authorizationApiVersion')]", + "name": "[guid(concat('tableDataContributorRoleId', resourceGroup().id))]", + "properties": { + "roleDefinitionId": "[variables('blobDataContributorRoleId')]", + "principalId": "[parameters('testApplicationOid')]" + } + }, + { + "type": "Microsoft.Storage/storageAccounts", + "apiVersion": "[variables('mgmtApiVersion')]", + "name": "[variables('primaryAccountName')]", + "location": "[variables('location')]", + "sku": { + "name": "Standard_RAGRS", + "tier": "Standard" + }, + "kind": "StorageV2", + "properties": { + "networkAcls": "[variables('networkAcls')]", + "supportsHttpsTrafficOnly": true, + "encryption": "[variables('encryption')]", + "accessTier": "Cool" + } + }, + { + "type": "Microsoft.DocumentDB/databaseAccounts", + "apiVersion": "2020-04-01", + "name": "[variables('primaryAccountName')]", + "location": "[variables('location')]", + "tags": { + "defaultExperience": "Azure Table", + "hidden-cosmos-mmspecial": "", + "CosmosAccountType": "Non-Production" + }, + "kind": "GlobalDocumentDB", + "properties": { + "publicNetworkAccess": "Enabled", + "enableAutomaticFailover": false, + "enableMultipleWriteLocations": false, + "isVirtualNetworkFilterEnabled": false, + "virtualNetworkRules": [], + "disableKeyBasedMetadataWriteAccess": false, + "enableFreeTier": false, + "enableAnalyticalStorage": false, + "databaseAccountOfferType": "Standard", + "consistencyPolicy": { + "defaultConsistencyLevel": "BoundedStaleness", + "maxIntervalInSeconds": 86400, + "maxStalenessPrefix": 1000000 + }, + "locations": [ + { + "locationName": "[variables('location')]", + "provisioningState": "Succeeded", + "failoverPriority": 0, + "isZoneRedundant": false + } + ], + "capabilities": [ + { + "name": "EnableTable" + } + ], + "ipRules": [] + } + } + ], + "outputs": { + "TABLES_STORAGE_ACCOUNT_NAME": { + "type": "string", + "value": "[variables('primaryAccountName')]" + }, + "TABLES_PRIMARY_STORAGE_ACCOUNT_KEY": { + "type": "string", + "value": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('primaryAccountName')), variables('mgmtApiVersion')).keys[0].value]" + }, + "TABLES_COSMOS_ACCOUNT_NAME": { + "type": "string", + "value": "[variables('primaryAccountName')]" + }, + "TABLES_PRIMARY_COSMOS_ACCOUNT_KEY": { + "type": "string", + "value": "[listKeys(resourceId('Microsoft.DocumentDB/databaseAccounts', variables('primaryAccountName')), '2020-04-01').primaryMasterKey]" + } + } +} \ No newline at end of file From ed6e5b6cb2615da2c9294382265c95fa25acba77 Mon Sep 17 00:00:00 2001 From: Sean Kane <68240067+seankane-msft@users.noreply.github.com> Date: Thu, 2 Sep 2021 12:24:46 -0400 Subject: [PATCH 40/42] [Tables] Docs and cleanup (#15428) * removing to library * cleanup * fixing two tests for live * removing options, responses, and table_pagers files * removing table_ prefix on files * removing byte_array_response.go file * fixing up two reponses, adding proper comments and fixing samples * removing NewClientFromConnStr * wrong 'to' library --- sdk/tables/aztable/CHANGELOG.md | 3 +- ...s_policy_test.go => access_policy_test.go} | 0 sdk/tables/aztable/byte_array_response.go | 122 ---- sdk/tables/aztable/client.go | 643 ++++++++++++++++++ .../{table_client_test.go => client_test.go} | 1 - sdk/tables/aztable/connection_string.go | 17 - sdk/tables/aztable/connection_string_test.go | 16 +- sdk/tables/aztable/constants.go | 45 +- sdk/tables/aztable/entity.go | 2 - sdk/tables/aztable/errors.go | 6 + sdk/tables/aztable/go.mod | 1 - sdk/tables/aztable/go.sum | 2 - sdk/tables/aztable/models.go | 72 +- sdk/tables/aztable/options.go | 185 ----- sdk/tables/aztable/responses.go | 202 ------ sdk/tables/aztable/sas_account.go | 3 +- sdk/tables/aztable/service_client.go | 438 ++++++++++++ ..._client_test.go => service_client_test.go} | 2 +- .../aztable/shared_access_signature_test.go | 5 +- sdk/tables/aztable/table_client.go | 276 -------- sdk/tables/aztable/table_pagers.go | 177 ----- sdk/tables/aztable/table_service_client.go | 192 ------ ...atch_test.go => transaction_batch_test.go} | 2 +- ...tional_batch.go => transactional_batch.go} | 21 +- sdk/tables/aztable/zc_table_constants.go | 16 - 25 files changed, 1212 insertions(+), 1237 deletions(-) rename sdk/tables/aztable/{table_access_policy_test.go => access_policy_test.go} (100%) delete mode 100644 sdk/tables/aztable/byte_array_response.go create mode 100644 sdk/tables/aztable/client.go rename sdk/tables/aztable/{table_client_test.go => client_test.go} (99%) delete mode 100644 sdk/tables/aztable/options.go delete mode 100644 sdk/tables/aztable/responses.go create mode 100644 sdk/tables/aztable/service_client.go rename sdk/tables/aztable/{table_service_client_test.go => service_client_test.go} (99%) delete mode 100644 sdk/tables/aztable/table_client.go delete mode 100644 sdk/tables/aztable/table_pagers.go delete mode 100644 sdk/tables/aztable/table_service_client.go rename sdk/tables/aztable/{table_batch_test.go => transaction_batch_test.go} (99%) rename sdk/tables/aztable/{table_transactional_batch.go => transactional_batch.go} (94%) delete mode 100644 sdk/tables/aztable/zc_table_constants.go diff --git a/sdk/tables/aztable/CHANGELOG.md b/sdk/tables/aztable/CHANGELOG.md index b8c2e452d173..688378f98d6c 100644 --- a/sdk/tables/aztable/CHANGELOG.md +++ b/sdk/tables/aztable/CHANGELOG.md @@ -1,3 +1,4 @@ # Release History -## v0.1.0 (Unreleased) +## v0.1.0 (09-07-2021) +* This is the initial release of the `aztable` library diff --git a/sdk/tables/aztable/table_access_policy_test.go b/sdk/tables/aztable/access_policy_test.go similarity index 100% rename from sdk/tables/aztable/table_access_policy_test.go rename to sdk/tables/aztable/access_policy_test.go diff --git a/sdk/tables/aztable/byte_array_response.go b/sdk/tables/aztable/byte_array_response.go deleted file mode 100644 index c9b1773ed4c5..000000000000 --- a/sdk/tables/aztable/byte_array_response.go +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package aztable - -import ( - "encoding/json" - "net/http" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - generated "github.com/Azure/azure-sdk-for-go/sdk/tables/aztable/internal" -) - -// GetEntityResponse is the return type for a GetEntity operation. The individual entities are stored in the Value property -type GetEntityResponse struct { - // ETag contains the information returned from the ETag header response. - ETag azcore.ETag - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response - - // The properties of the table entity. - Value []byte -} - -// newGetEntityResponse transforms a generated response to the GetEntityResponse type -func newGetEntityResponse(m generated.TableQueryEntityWithPartitionAndRowKeyResponse) (GetEntityResponse, error) { - marshalledValue, err := json.Marshal(m.Value) - if err != nil { - return GetEntityResponse{}, err - } - return GetEntityResponse{ - ETag: azcore.ETag(*m.ETag), - RawResponse: m.RawResponse, - Value: marshalledValue, - }, nil -} - -// ListEntitiesPage is the response envelope for operations that return a list of entities. -type ListEntitiesPage struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response - // ContinuationNextPartitionKey contains the information returned from the x-ms-continuation-NextPartitionKey header response. - ContinuationNextPartitionKey *string - // ContinuationNextRowKey contains the information returned from the x-ms-continuation-NextRowKey header response. - ContinuationNextRowKey *string - // The metadata response of the table. - ODataMetadata *string - // List of table entities. - Entities [][]byte -} - -// ListEntitiesResponse - The properties for the table entity query response. -type ListEntitiesResponse struct { - // The metadata response of the table. - ODataMetadata *string - // List of table entities stored as byte slices. - Entities [][]byte -} - -// transforms a generated query response into the ListEntitiesPaged -func newListEntitiesPage(resp *generated.TableQueryEntitiesResponse) (ListEntitiesPage, error) { - marshalledValue := make([][]byte, 0) - for _, e := range resp.TableEntityQueryResponse.Value { - m, err := json.Marshal(e) - if err != nil { - return ListEntitiesPage{}, err - } - marshalledValue = append(marshalledValue, m) - } - - t := ListEntitiesResponse{ - ODataMetadata: resp.TableEntityQueryResponse.ODataMetadata, - Entities: marshalledValue, - } - - return ListEntitiesPage{ - RawResponse: resp.RawResponse, - ContinuationNextPartitionKey: resp.XMSContinuationNextPartitionKey, - ContinuationNextRowKey: resp.XMSContinuationNextRowKey, - ODataMetadata: t.ODataMetadata, - Entities: t.Entities, - }, nil -} - -// ListTablesResponse contains the properties for a list of tables. -type ListTablesResponse struct { - // The metadata response of the table. - OdataMetadata *string `json:"odata.metadata,omitempty"` - - // List of tables. - Tables []*ResponseProperties `json:"value,omitempty"` -} - -// ResponseProperties contains the properties for a single Table -type ResponseProperties struct { - // The edit link of the table. - ODataEditLink *string `json:"odata.editLink,omitempty"` - - // The id of the table. - ODataID *string `json:"odata.id,omitempty"` - - // The odata type of the table. - ODataType *string `json:"odata.type,omitempty"` - - // The name of the table. - TableName *string `json:"TableName,omitempty"` -} - -// Convets a generated TableResponseProperties to a ResponseProperties -func fromGeneratedTableResponseProperties(g *generated.TableResponseProperties) *ResponseProperties { - if g == nil { - return nil - } - - return &ResponseProperties{ - TableName: g.TableName, - ODataEditLink: g.ODataEditLink, - ODataID: g.ODataID, - ODataType: g.ODataType, - } -} diff --git a/sdk/tables/aztable/client.go b/sdk/tables/aztable/client.go new file mode 100644 index 000000000000..265ae7911b0c --- /dev/null +++ b/sdk/tables/aztable/client.go @@ -0,0 +1,643 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package aztable + +import ( + "context" + "encoding/json" + "errors" + "net/http" + "net/url" + "strings" + "time" + + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + generated "github.com/Azure/azure-sdk-for-go/sdk/tables/aztable/internal" +) + +// A Client represents a client to the tables service affinitized to a specific table. +type Client struct { + client *generated.TableClient + service *ServiceClient + cred azcore.Credential + name string +} + +// NewClient creates a Client struct in the context of the table specified in the serviceURL, credential, and options. +// The serviceURL param is expected to have the name of the table in a format similar to: "https://myAccountName.core.windows.net/". +// If the serviceURL contains a Shared Access Signature, use azcore.NewAnonymousCredential() as the credential. +func NewClient(serviceURL string, cred azcore.Credential, options *ClientOptions) (*Client, error) { + if options == nil { + options = &ClientOptions{} + } + + parsedUrl, err := url.Parse(serviceURL) + if err != nil { + return &Client{}, err + } + + tableName := parsedUrl.Path[1:] + rawServiceURL := parsedUrl.Scheme + "://" + parsedUrl.Host + if parsedUrl.Scheme == "" { + rawServiceURL = parsedUrl.Host + } + if strings.Contains(tableName, "/") { + splits := strings.Split(parsedUrl.Path, "/") + tableName = splits[len(splits)-1] + rawServiceURL += strings.Join(splits[:len(splits)-1], "/") + } + sas := parsedUrl.Query() + if len(sas) > 0 { + rawServiceURL += "/?" + sas.Encode() + } + + s, err := NewServiceClient(rawServiceURL, cred, options) + if err != nil { + return &Client{}, err + } + return s.NewClient(tableName), nil +} + +type CreateTableResponse struct { + RawResponse *http.Response +} + +func createTableResponseFromGen(g *generated.TableCreateResponse) CreateTableResponse { + if g == nil { + return CreateTableResponse{} + } + return CreateTableResponse{ + RawResponse: g.RawResponse, + } +} + +// Create creates the table with the tableName specified when NewClient was called. +func (t *Client) Create(ctx context.Context, options *CreateTableOptions) (CreateTableResponse, error) { + if options == nil { + options = &CreateTableOptions{} + } + resp, err := t.client.Create(ctx, generated.TableProperties{TableName: &t.name}, options.toGenerated(), &generated.QueryOptions{}) + return createTableResponseFromGen(&resp), err +} + +// Delete deletes the table with the tableName specified when NewClient was called. +func (t *Client) Delete(ctx context.Context, options *DeleteTableOptions) (DeleteTableResponse, error) { + return t.service.DeleteTable(ctx, t.name, options) +} + +// ListEntitiesOptions contains a group of parameters for the Table.Query method. +type ListEntitiesOptions struct { + // OData filter expression. + Filter *string + // Select expression using OData notation. Limits the columns on each record to just those requested, e.g. "$select=PolicyAssignmentId, ResourceId". + Select *string + // Maximum number of records to return. + Top *int32 +} + +func (l *ListEntitiesOptions) toQueryOptions() *generated.QueryOptions { + if l == nil { + return &generated.QueryOptions{} + } + + return &generated.QueryOptions{ + Filter: l.Filter, + Format: generated.ODataMetadataFormatApplicationJSONODataMinimalmetadata.ToPtr(), + Select: l.Select, + Top: l.Top, + } +} + +// ListEntitiesPage is the response envelope for operations that return a list of entities. +type ListEntitiesPage struct { + // RawResponse contains the underlying HTTP response. + RawResponse *http.Response + + // ContinuationNextPartitionKey contains the information returned from the x-ms-continuation-NextPartitionKey header response. + ContinuationNextPartitionKey *string + + // ContinuationNextRowKey contains the information returned from the x-ms-continuation-NextRowKey header response. + ContinuationNextRowKey *string + + // The metadata response of the table. + ODataMetadata *string + + // List of table entities. + Entities [][]byte +} + +// ListEntitiesResponse - The properties for the table entity query response. +type ListEntitiesResponse struct { + // The metadata response of the table. + ODataMetadata *string + + // List of table entities stored as byte slices. + Entities [][]byte +} + +// transforms a generated query response into the ListEntitiesPaged +func newListEntitiesPage(resp *generated.TableQueryEntitiesResponse) (ListEntitiesPage, error) { + marshalledValue := make([][]byte, 0) + for _, e := range resp.TableEntityQueryResponse.Value { + m, err := json.Marshal(e) + if err != nil { + return ListEntitiesPage{}, err + } + marshalledValue = append(marshalledValue, m) + } + + t := ListEntitiesResponse{ + ODataMetadata: resp.TableEntityQueryResponse.ODataMetadata, + Entities: marshalledValue, + } + + return ListEntitiesPage{ + RawResponse: resp.RawResponse, + ContinuationNextPartitionKey: resp.XMSContinuationNextPartitionKey, + ContinuationNextRowKey: resp.XMSContinuationNextRowKey, + ODataMetadata: t.ODataMetadata, + Entities: t.Entities, + }, nil +} + +// ListEntitiesPager is a Pager for Table entity query results. +// +// NextPage should be called first. It fetches the next available page of results from the service. +// If the fetched page contains results, the return value is true, else false. +// Results fetched from the service can be evaluated by calling PageResponse on this Pager. +// If the result is false, the value of Err() will indicate if an error occurred. +// +// PageResponse returns the results from the page most recently fetched from the service. +// Example usage of this in combination with NextPage would look like the following: +// +// for pager.NextPage(ctx) { +// resp = pager.PageResponse() +// fmt.Printf("The page contains %i results.\n", len(resp.Entities)) +// } +// err := pager.Err() +type ListEntitiesPager interface { + + // PageResponse returns the current TableQueryResponseResponse. + PageResponse() ListEntitiesPage + // NextPage returns true if there is another page of data available, false if not + NextPage(context.Context) bool + // Err returns an error if there was an error on the last request + Err() error +} + +type tableEntityQueryResponsePager struct { + tableClient *Client + current *ListEntitiesPage + tableQueryOptions *generated.TableQueryEntitiesOptions + listOptions *ListEntitiesOptions + err error +} + +// NextPage fetches the next available page of results from the service. +// If the fetched page contains results, the return value is true, else false. +// Results fetched from the service can be evaluated by calling PageResponse on this Pager. +func (p *tableEntityQueryResponsePager) NextPage(ctx context.Context) bool { + if p.err != nil || (p.current != nil && p.current.ContinuationNextPartitionKey == nil && p.current.ContinuationNextRowKey == nil) { + return false + } + var resp generated.TableQueryEntitiesResponse + resp, p.err = p.tableClient.client.QueryEntities(ctx, p.tableClient.name, p.tableQueryOptions, p.listOptions.toQueryOptions()) + + c, err := newListEntitiesPage(&resp) + if err != nil { + p.err = nil + } + + p.current = &c + p.tableQueryOptions.NextPartitionKey = resp.XMSContinuationNextPartitionKey + p.tableQueryOptions.NextRowKey = resp.XMSContinuationNextRowKey + return p.err == nil && len(resp.TableEntityQueryResponse.Value) > 0 +} + +// PageResponse returns the results from the page most recently fetched from the service. +// Example usage of this in combination with NextPage would look like the following: +// +// for pager.NextPage(ctx) { +// resp = pager.PageResponse() +// fmt.Printf("The page contains %i results.\n", len(resp.Entities)) +// } +// err := pager.Err() +func (p *tableEntityQueryResponsePager) PageResponse() ListEntitiesPage { + return *p.current +} + +// Err returns an error value if the most recent call to NextPage was not successful, else nil. +func (p *tableEntityQueryResponsePager) Err() error { + return p.err +} + +// List queries the entities using the specified ListEntitiesOptions. +// listOptions can specify the following properties to affect the query results returned: +// +// Filter: An OData filter expression that limits results to those entities that satisfy the filter expression. +// For example, the following expression would return only entities with a PartitionKey of 'foo': "PartitionKey eq 'foo'" +// +// Select: A comma delimited list of entity property names that selects which set of entity properties to return in the result set. +// For example, the following value would return results containing only the PartitionKey and RowKey properties: "PartitionKey, RowKey" +// +// Top: The maximum number of entities that will be returned per page of results. +// Note: This value does not limit the total number of results if NextPage is called on the returned Pager until it returns false. +// +// List returns a Pager, which allows iteration through each page of results. Example: +// +// options := &ListEntitiesOptions{Filter: to.StringPtr("PartitionKey eq 'pk001'"), Top: to.Int32Ptr(25), Select: to.StringPtr("PartitionKey,RowKey,Value,Price")} +// pager := client.List(options) // Pass in 'nil' if you want to return all Entities for an account. +// for pager.NextPage(ctx) { +// resp = pager.PageResponse() +// fmt.Printf("The page contains %i results.\n", len(resp.Entities)) +// } +// err := pager.Err() +func (t *Client) List(listOptions *ListEntitiesOptions) ListEntitiesPager { + return &tableEntityQueryResponsePager{ + tableClient: t, + listOptions: listOptions, + tableQueryOptions: &generated.TableQueryEntitiesOptions{}, + } +} + +// Options for Client.GetEntity method +type GetEntityOptions struct { +} + +func (g *GetEntityOptions) toGenerated() (*generated.TableQueryEntityWithPartitionAndRowKeyOptions, *generated.QueryOptions) { + return &generated.TableQueryEntityWithPartitionAndRowKeyOptions{}, &generated.QueryOptions{Format: generated.ODataMetadataFormatApplicationJSONODataMinimalmetadata.ToPtr()} +} + +// GetEntityResponse is the return type for a GetEntity operation. The individual entities are stored in the Value property +type GetEntityResponse struct { + // ETag contains the information returned from the ETag header response. + ETag azcore.ETag + + // RawResponse contains the underlying HTTP response. + RawResponse *http.Response + + // The properties of the table entity. + Value []byte +} + +// newGetEntityResponse transforms a generated response to the GetEntityResponse type +func newGetEntityResponse(m generated.TableQueryEntityWithPartitionAndRowKeyResponse) (GetEntityResponse, error) { + marshalledValue, err := json.Marshal(m.Value) + if err != nil { + return GetEntityResponse{}, err + } + return GetEntityResponse{ + ETag: azcore.ETag(*m.ETag), + RawResponse: m.RawResponse, + Value: marshalledValue, + }, nil +} + +// GetEntity retrieves a specific entity from the service using the specified partitionKey and rowKey values. If no entity is available it returns an error +func (t *Client) GetEntity(ctx context.Context, partitionKey string, rowKey string, options *GetEntityOptions) (GetEntityResponse, error) { + if options == nil { + options = &GetEntityOptions{} + } + + genOptions, queryOptions := options.toGenerated() + resp, err := t.client.QueryEntityWithPartitionAndRowKey(ctx, t.name, partitionKey, rowKey, genOptions, queryOptions) + if err != nil { + return GetEntityResponse{}, err + } + return newGetEntityResponse(resp) +} + +// Options for the Client.AddEntity operation +type AddEntityOptions struct { + // Specifies whether the response should include the inserted entity in the payload. Possible values are return-no-content and return-content. + ResponsePreference *ResponseFormat +} + +type AddEntityResponse struct { + RawResponse *http.Response + ETag azcore.ETag +} + +func addEntityResponseFromGenerated(g *generated.TableInsertEntityResponse) AddEntityResponse { + if g == nil { + return AddEntityResponse{} + } + + return AddEntityResponse{ + RawResponse: g.RawResponse, + ETag: azcore.ETag(*g.ETag), + } +} + +// AddEntity adds an entity (described by a byte slice) to the table. This method returns an error if an entity with +// the same PartitionKey and RowKey already exists in the table. If the supplied entity does not contain both a PartitionKey +// and a RowKey an error will be returned. +func (t *Client) AddEntity(ctx context.Context, entity []byte, options *AddEntityOptions) (AddEntityResponse, error) { + var mapEntity map[string]interface{} + err := json.Unmarshal(entity, &mapEntity) + if err != nil { + return AddEntityResponse{}, err + } + resp, err := t.client.InsertEntity(ctx, t.name, &generated.TableInsertEntityOptions{TableEntityProperties: mapEntity, ResponsePreference: generated.ResponseFormatReturnNoContent.ToPtr()}, nil) + if err != nil { + err = checkEntityForPkRk(&mapEntity, err) + return AddEntityResponse{}, err + } + return addEntityResponseFromGenerated(&resp), err +} + +type DeleteEntityOptions struct { + IfMatch *azcore.ETag +} + +func (d *DeleteEntityOptions) toGenerated() *generated.TableDeleteEntityOptions { + return &generated.TableDeleteEntityOptions{} +} + +type DeleteEntityResponse struct { + RawResponse *http.Response +} + +func deleteEntityResponseFromGenerated(g *generated.TableDeleteEntityResponse) DeleteEntityResponse { + if g == nil { + return DeleteEntityResponse{} + } + return DeleteEntityResponse{ + RawResponse: g.RawResponse, + } +} + +// DeleteEntity deletes the entity with the specified partitionKey and rowKey from the table. +func (t *Client) DeleteEntity(ctx context.Context, partitionKey string, rowKey string, options *DeleteEntityOptions) (DeleteEntityResponse, error) { + if options == nil { + options = &DeleteEntityOptions{} + } + if options.IfMatch == nil { + nilEtag := azcore.ETag("*") + options.IfMatch = &nilEtag + } + resp, err := t.client.DeleteEntity(ctx, t.name, partitionKey, rowKey, string(*options.IfMatch), options.toGenerated(), &generated.QueryOptions{}) + return deleteEntityResponseFromGenerated(&resp), err +} + +type UpdateEntityOptions struct { + IfMatch *azcore.ETag + UpdateMode EntityUpdateMode +} + +func (u *UpdateEntityOptions) toGeneratedMergeEntity(m map[string]interface{}) *generated.TableMergeEntityOptions { + if u == nil { + return &generated.TableMergeEntityOptions{} + } + return &generated.TableMergeEntityOptions{ + IfMatch: to.StringPtr(string(*u.IfMatch)), + TableEntityProperties: m, + } +} + +func (u *UpdateEntityOptions) toGeneratedUpdateEntity(m map[string]interface{}) *generated.TableUpdateEntityOptions { + if u == nil { + return &generated.TableUpdateEntityOptions{} + } + return &generated.TableUpdateEntityOptions{ + IfMatch: to.StringPtr(string(*u.IfMatch)), + TableEntityProperties: m, + } +} + +type UpdateEntityResponse struct { + RawResponse *http.Response + ETag azcore.ETag +} + +func updateEntityResponseFromMergeGenerated(g *generated.TableMergeEntityResponse) UpdateEntityResponse { + if g == nil { + return UpdateEntityResponse{} + } + + return UpdateEntityResponse{ + RawResponse: g.RawResponse, + ETag: azcore.ETag(*g.ETag), + } +} + +func updateEntityResponseFromUpdateGenerated(g *generated.TableUpdateEntityResponse) UpdateEntityResponse { + if g == nil { + return UpdateEntityResponse{} + } + + return UpdateEntityResponse{ + RawResponse: g.RawResponse, + ETag: azcore.ETag(*g.ETag), + } +} + +// UpdateEntity updates the specified table entity if it exists. +// If updateMode is Replace, the entity will be replaced. This is the only way to remove properties from an existing entity. +// If updateMode is Merge, the property values present in the specified entity will be merged with the existing entity. Properties not specified in the merge will be unaffected. +// The specified etag value will be used for optimistic concurrency. If the etag does not match the value of the entity in the table, the operation will fail. +// The response type will be TableEntityMergeResponse if updateMode is Merge and TableEntityUpdateResponse if updateMode is Replace. +func (t *Client) UpdateEntity(ctx context.Context, entity []byte, options *UpdateEntityOptions) (UpdateEntityResponse, error) { + if options == nil { + options = &UpdateEntityOptions{ + UpdateMode: MergeEntity, + } + } + + if options.IfMatch == nil { + star := azcore.ETag("*") + options.IfMatch = &star + } + + var mapEntity map[string]interface{} + err := json.Unmarshal(entity, &mapEntity) + if err != nil { + return UpdateEntityResponse{}, err + } + + pk := mapEntity[partitionKey] + partKey := pk.(string) + + rk := mapEntity[rowKey] + rowkey := rk.(string) + + switch options.UpdateMode { + case MergeEntity: + resp, err := t.client.MergeEntity(ctx, t.name, partKey, rowkey, options.toGeneratedMergeEntity(mapEntity), &generated.QueryOptions{}) + return updateEntityResponseFromMergeGenerated(&resp), err + case ReplaceEntity: + resp, err := t.client.UpdateEntity(ctx, t.name, partKey, rowkey, options.toGeneratedUpdateEntity(mapEntity), &generated.QueryOptions{}) + return updateEntityResponseFromUpdateGenerated(&resp), err + } + if pk == "" || rk == "" { + return UpdateEntityResponse{}, errPartitionKeyRowKeyError + } + return UpdateEntityResponse{}, errInvalidUpdateMode +} + +type InsertEntityOptions struct { + ETag azcore.ETag + UpdateMode EntityUpdateMode +} + +type InsertEntityResponse struct { + RawResponse *http.Response + ETag azcore.ETag +} + +func insertEntityFromGeneratedMerge(g *generated.TableMergeEntityResponse) InsertEntityResponse { + if g == nil { + return InsertEntityResponse{} + } + + return InsertEntityResponse{ + RawResponse: g.RawResponse, + ETag: azcore.ETag(*g.ETag), + } +} + +func insertEntityFromGeneratedUpdate(g *generated.TableUpdateEntityResponse) InsertEntityResponse { + if g == nil { + return InsertEntityResponse{} + } + + return InsertEntityResponse{ + RawResponse: g.RawResponse, + ETag: azcore.ETag(*g.ETag), + } +} + +// InsertEntity inserts an entity if it does not already exist in the table. If the entity does exist, the entity is +// replaced or merged as specified the updateMode parameter. If the entity exists and updateMode is Merge, the property +// values present in the specified entity will be merged with the existing entity rather than replaced. +// The response type will be TableEntityMergeResponse if updateMode is Merge and TableEntityUpdateResponse if updateMode is Replace. +func (t *Client) InsertEntity(ctx context.Context, entity []byte, options *InsertEntityOptions) (InsertEntityResponse, error) { + if options == nil { + options = &InsertEntityOptions{ + UpdateMode: MergeEntity, + } + } + var mapEntity map[string]interface{} + err := json.Unmarshal(entity, &mapEntity) + if err != nil { + return InsertEntityResponse{}, err + } + + pk := mapEntity[partitionKey] + partKey := pk.(string) + + rk := mapEntity[rowKey] + rowkey := rk.(string) + + switch options.UpdateMode { + case MergeEntity: + resp, err := t.client.MergeEntity(ctx, t.name, partKey, rowkey, &generated.TableMergeEntityOptions{TableEntityProperties: mapEntity}, &generated.QueryOptions{}) + return insertEntityFromGeneratedMerge(&resp), err + case ReplaceEntity: + resp, err := t.client.UpdateEntity(ctx, t.name, partKey, rowkey, &generated.TableUpdateEntityOptions{TableEntityProperties: mapEntity}, &generated.QueryOptions{}) + return insertEntityFromGeneratedUpdate(&resp), err + } + if pk == "" || rk == "" { + return InsertEntityResponse{}, errPartitionKeyRowKeyError + } + return InsertEntityResponse{}, errInvalidUpdateMode +} + +type GetAccessPolicyOptions struct { +} + +func (g *GetAccessPolicyOptions) toGenerated() *generated.TableGetAccessPolicyOptions { + return &generated.TableGetAccessPolicyOptions{} +} + +type GetAccessPolicyResponse struct { + RawResponse *http.Response + SignedIdentifiers []*SignedIdentifier +} + +func getAccessPolicyResponseFromGenerated(g *generated.TableGetAccessPolicyResponse) GetAccessPolicyResponse { + if g == nil { + return GetAccessPolicyResponse{} + } + + var sis []*SignedIdentifier + for _, s := range g.SignedIdentifiers { + sis = append(sis, fromGeneratedSignedIdentifier(s)) + } + return GetAccessPolicyResponse{ + RawResponse: g.RawResponse, + SignedIdentifiers: sis, + } +} + +// GetAccessPolicy retrieves details about any stored access policies specified on the table that may be used with the Shared Access Signature +func (t *Client) GetAccessPolicy(ctx context.Context, options *GetAccessPolicyOptions) (GetAccessPolicyResponse, error) { + resp, err := t.client.GetAccessPolicy(ctx, t.name, options.toGenerated()) + return getAccessPolicyResponseFromGenerated(&resp), err +} + +type SetAccessPolicyOptions struct { + TableACL []*SignedIdentifier +} + +type SetAccessPolicyResponse struct { + RawResponse *http.Response +} + +func setAccessPolicyResponseFromGenerated(g *generated.TableSetAccessPolicyResponse) SetAccessPolicyResponse { + if g == nil { + return SetAccessPolicyResponse{} + } + return SetAccessPolicyResponse{ + RawResponse: g.RawResponse, + } +} +func (s *SetAccessPolicyOptions) toGenerated() *generated.TableSetAccessPolicyOptions { + var sis []*generated.SignedIdentifier + for _, t := range s.TableACL { + sis = append(sis, toGeneratedSignedIdentifier(t)) + } + return &generated.TableSetAccessPolicyOptions{ + TableACL: sis, + } +} + +// SetAccessPolicy sets stored access policies for the table that may be used with SharedAccessSignature +func (t *Client) SetAccessPolicy(ctx context.Context, options *SetAccessPolicyOptions) (SetAccessPolicyResponse, error) { + response, err := t.client.SetAccessPolicy(ctx, t.name, options.toGenerated()) + if len(options.TableACL) > 5 { + err = errTooManyAccessPoliciesError + } + return setAccessPolicyResponseFromGenerated(&response), err +} + +// GetTableSASToken is a convenience method for generating a SAS token for a specific table. +// It can only be used if the supplied azcore.Credential during creation was a SharedKeyCredential. +func (t Client) GetTableSASToken(permissions SASPermissions, start time.Time, expiry time.Time) (string, error) { + cred, ok := t.cred.(*SharedKeyCredential) + if !ok { + return "", errors.New("credential is not a SharedKeyCredential. SAS can only be signed with a SharedKeyCredential") + } + qps, err := SASSignatureValues{ + TableName: t.name, + Permissions: permissions.String(), + StartTime: start, + ExpiryTime: expiry, + StartPartitionKey: permissions.StartPartitionKey, + StartRowKey: permissions.StartRowKey, + EndPartitionKey: permissions.EndPartitionKey, + EndRowKey: permissions.EndRowKey, + }.NewSASQueryParameters(cred) + if err != nil { + return "", err + } + + serviceURL := t.client.Con.Endpoint() + if !strings.Contains(serviceURL, "/") { + serviceURL += "/" + } + serviceURL += t.name + "?" + qps.Encode() + return serviceURL, nil +} diff --git a/sdk/tables/aztable/table_client_test.go b/sdk/tables/aztable/client_test.go similarity index 99% rename from sdk/tables/aztable/table_client_test.go rename to sdk/tables/aztable/client_test.go index 2c75f4ee8430..60cf73136a9e 100644 --- a/sdk/tables/aztable/table_client_test.go +++ b/sdk/tables/aztable/client_test.go @@ -37,7 +37,6 @@ func TestCreateTable(t *testing.T) { require.NoError(t, err) require.NotNil(t, resp.RawResponse) - // require.Equal(t, *resp.TableResponse.TableName, client.name) }) } } diff --git a/sdk/tables/aztable/connection_string.go b/sdk/tables/aztable/connection_string.go index 451ca6b7a501..7aece4449794 100644 --- a/sdk/tables/aztable/connection_string.go +++ b/sdk/tables/aztable/connection_string.go @@ -10,23 +10,6 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" ) -// NewClientFromConnectionString creates a new Client struct from a connection string. The connection -// string must contain either an account name and account key or an account name and a shared access signature. -func NewClientFromConnectionString(connectionString string, tableName string, options *ClientOptions) (*Client, error) { - if options == nil { - options = &ClientOptions{} - } - endpoint, credential, err := parseConnectionString(connectionString) - if err != nil { - return nil, err - } - if !strings.HasSuffix(endpoint, "/") { - endpoint = endpoint + "/" - } - endpoint = endpoint + tableName - return NewClient(endpoint, credential, options) -} - // NewServiceClientFromConnectionString creates a new ServiceClient struct from a connection string. The connection // string must contain either an account name and account key or an account name and a shared access signature. func NewServiceClientFromConnectionString(connectionString string, options *ClientOptions) (*ServiceClient, error) { diff --git a/sdk/tables/aztable/connection_string_test.go b/sdk/tables/aztable/connection_string_test.go index 4e7596f4a0cd..693c7d150045 100644 --- a/sdk/tables/aztable/connection_string_test.go +++ b/sdk/tables/aztable/connection_string_test.go @@ -27,7 +27,7 @@ func TestConnectionStringParser(t *testing.T) { require.Equal(t, sharedKeyCred.accountName, "dummyaccount") require.Equal(t, getAccountKey(sharedKeyCred), "secretkeykey") - client, err := NewClientFromConnectionString(connStr, "tableName", nil) + client, err := NewServiceClientFromConnectionString(connStr, nil) require.NoError(t, err) require.NotNil(t, client) sharedKeyCred, ok = client.cred.(*SharedKeyCredential) @@ -50,7 +50,7 @@ func TestConnectionStringParserHTTP(t *testing.T) { require.Equal(t, sharedKeyCred.accountName, "dummyaccount") require.Equal(t, getAccountKey(sharedKeyCred), "secretkeykey") - client, err := NewClientFromConnectionString(connStr, "tableName", nil) + client, err := NewServiceClientFromConnectionString(connStr, nil) require.NoError(t, err) require.NotNil(t, client) sharedKeyCred, ok = client.cred.(*SharedKeyCredential) @@ -73,7 +73,7 @@ func TestConnectionStringParserBasic(t *testing.T) { require.Equal(t, sharedKeyCred.accountName, "dummyaccount") require.Equal(t, getAccountKey(sharedKeyCred), "secretkeykey") - client, err := NewClientFromConnectionString(connStr, "tableName", nil) + client, err := NewServiceClientFromConnectionString(connStr, nil) require.NoError(t, err) require.NotNil(t, client) sharedKeyCred, ok = client.cred.(*SharedKeyCredential) @@ -96,7 +96,7 @@ func TestConnectionStringParserCustomDomain(t *testing.T) { require.Equal(t, sharedKeyCred.accountName, "dummyaccount") require.Equal(t, getAccountKey(sharedKeyCred), "secretkeykey") - client, err := NewClientFromConnectionString(connStr, "tableName", nil) + client, err := NewServiceClientFromConnectionString(connStr, nil) require.NoError(t, err) require.NotNil(t, client) sharedKeyCred, ok = client.cred.(*SharedKeyCredential) @@ -133,7 +133,7 @@ func TestConnectionStringSAS(t *testing.T) { require.Equal(t, serviceURL, "https://dummyaccount.table.core.windows.net/?fakesharedaccesssignature") require.NotNil(t, cred) - client, err := NewClientFromConnectionString(connStr, "tableName", nil) + client, err := NewServiceClientFromConnectionString(connStr, nil) require.NoError(t, err) require.NotNil(t, client) require.True(t, strings.HasPrefix(client.client.Con.Endpoint(), "https://")) @@ -147,7 +147,7 @@ func TestConnectionStringCosmos(t *testing.T) { require.Equal(t, serviceURL, "https://dummyaccountname.table.cosmos.azure.com:443/") require.NotNil(t, cred) - client, err := NewClientFromConnectionString(connStr, "tableName", nil) + client, err := NewServiceClientFromConnectionString(connStr, nil) require.NoError(t, err) require.NotNil(t, client) require.True(t, strings.HasPrefix(client.client.Con.Endpoint(), "https://")) @@ -166,7 +166,7 @@ func TestConnectionStringChinaCloud(t *testing.T) { require.Equal(t, serviceURL, "http://dummyaccountname.table.core.chinacloudapi.cn") require.NotNil(t, cred) - client, err := NewClientFromConnectionString(connStr, "tableName", nil) + client, err := NewServiceClientFromConnectionString(connStr, nil) require.NoError(t, err) require.NotNil(t, client) require.True(t, strings.HasPrefix(client.client.Con.Endpoint(), "http://")) @@ -185,7 +185,7 @@ func TestConnectionStringAzurite(t *testing.T) { require.Equal(t, serviceURL, "http://local-machine:11002/custom/account/path/faketokensignature") require.NotNil(t, cred) - client, err := NewClientFromConnectionString(connStr, "tableName", nil) + client, err := NewServiceClientFromConnectionString(connStr, nil) require.NoError(t, err) require.NotNil(t, client) require.True(t, strings.HasPrefix(client.client.Con.Endpoint(), "http://")) diff --git a/sdk/tables/aztable/constants.go b/sdk/tables/aztable/constants.go index 9c3137b41f48..abd6909ca4cc 100644 --- a/sdk/tables/aztable/constants.go +++ b/sdk/tables/aztable/constants.go @@ -4,7 +4,46 @@ package aztable const ( - headerXmsDate = "x-ms-date" - headerAuthorization = "Authorization" - etagOData = "odata.etag" + headerXmsDate = "x-ms-date" + headerAuthorization = "Authorization" + etagOData = "odata.etag" + rfc3339 = "2006-01-02T15:04:05.9999999Z" + legacyCosmosTableDomain = ".table.cosmosdb." + cosmosTableDomain = ".table.cosmos." + headerContentType = "Content-Type" + headerContentTransferEncoding = "Content-Transfer-Encoding" + timestamp = "Timestamp" + partitionKey = "PartitionKey" + rowKey = "RowKey" + etag = "ETag" +) + +// ResponseFormat determines what is returned from a service request +type ResponseFormat string + +const ( + ResponseFormatReturnContent ResponseFormat = "return-content" + ResponseFormatReturnNoContent ResponseFormat = "return-no-content" +) + +// PossibleResponseFormatValues returns the possible values for the ResponseFormat const type. +func PossibleResponseFormatValues() []ResponseFormat { + return []ResponseFormat{ + ResponseFormatReturnContent, + ResponseFormatReturnNoContent, + } +} + +// ToPtr returns a *ResponseFormat pointing to the current value. +func (c ResponseFormat) ToPtr() *ResponseFormat { + return &c +} + +// EntityUpdateMode specifies what type of update to do on InsertEntity or UpdateEntity. ReplaceEntity +// will replace an existing entity, MergeEntity will merge properties of the entities. +type EntityUpdateMode string + +const ( + ReplaceEntity EntityUpdateMode = "replace" + MergeEntity EntityUpdateMode = "merge" ) diff --git a/sdk/tables/aztable/entity.go b/sdk/tables/aztable/entity.go index ed71817087c8..365d29faec05 100644 --- a/sdk/tables/aztable/entity.go +++ b/sdk/tables/aztable/entity.go @@ -209,8 +209,6 @@ func (e *EDMGUID) UnmarshalText(data []byte) error { // proper odata type annotations. type EDMDateTime time.Time -const rfc3339 = "2006-01-02T15:04:05.9999999Z" - func (e EDMDateTime) MarshalText() ([]byte, error) { return ([]byte)(time.Time(e).Format(rfc3339)), nil } diff --git a/sdk/tables/aztable/errors.go b/sdk/tables/aztable/errors.go index adcc22d4c0d4..1a83d35338fb 100644 --- a/sdk/tables/aztable/errors.go +++ b/sdk/tables/aztable/errors.go @@ -9,6 +9,12 @@ var errConnectionString = errors.New("connection string is either blank or malfo var errInvalidUpdateMode = errors.New("invalid EntityUpdateMode") +var errEmptyTransaction = errors.New("transaction cannot be empty") + +var errPartitionKeyRowKeyError = errors.New("entity must have a PartitionKey and RowKey") + +var errTooManyAccessPoliciesError = errors.New("you cannot set more than five (5) access policies at a time") + func checkEntityForPkRk(entity *map[string]interface{}, err error) error { if _, ok := (*entity)[partitionKey]; !ok { return errPartitionKeyRowKeyError diff --git a/sdk/tables/aztable/go.mod b/sdk/tables/aztable/go.mod index 060b52fa9545..b0ee750cfaf5 100644 --- a/sdk/tables/aztable/go.mod +++ b/sdk/tables/aztable/go.mod @@ -8,7 +8,6 @@ require ( github.com/Azure/azure-sdk-for-go/sdk/azcore v0.19.0 github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.10.0 github.com/Azure/azure-sdk-for-go/sdk/internal v0.7.0 - github.com/Azure/azure-sdk-for-go/sdk/to v0.1.4 github.com/stretchr/testify v1.7.0 gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect ) diff --git a/sdk/tables/aztable/go.sum b/sdk/tables/aztable/go.sum index d14df7728c0a..57b5601c311d 100644 --- a/sdk/tables/aztable/go.sum +++ b/sdk/tables/aztable/go.sum @@ -2,8 +2,6 @@ github.com/Azure/azure-sdk-for-go/sdk/azcore v0.19.0 h1:lhSJz9RMbJcTgxifR1hUNJnn github.com/Azure/azure-sdk-for-go/sdk/azcore v0.19.0/go.mod h1:h6H6c8enJmmocHUbLiiGY6sx7f9i+X3m1CHdd5c6Rdw= github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.10.0 h1:jq5Urf8QJK6h0wr8CMiwggo4OSMkXwpArQlkSjSpaBk= github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.10.0/go.mod h1:HcM1YX14R7CJcghJGOYCgdezslRSVzqwLf/q+4Y2r/0= -github.com/Azure/azure-sdk-for-go/sdk/to v0.1.4 h1:3w4gk+uYOwplGhID1fDP305/8bI5Aug3URoC1V493KU= -github.com/Azure/azure-sdk-for-go/sdk/to v0.1.4/go.mod h1:UL/d4lvWAzSJUuX+19uKdN0ktyjoOyQhgY+HWNgtIYI= github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dnaeon/go-vcr v1.1.0 h1:ReYa/UBrRyQdant9B4fNHGoCNKw6qh6P0fsdGmZpR7c= diff --git a/sdk/tables/aztable/models.go b/sdk/tables/aztable/models.go index 944f4766864f..c1fbee82126d 100644 --- a/sdk/tables/aztable/models.go +++ b/sdk/tables/aztable/models.go @@ -9,16 +9,6 @@ import ( generated "github.com/Azure/azure-sdk-for-go/sdk/tables/aztable/internal" ) -// ListOptions contains a group of parameters for the ServiceClient.Query method. -type ListOptions struct { - // OData filter expression. - Filter *string - // Select expression using OData notation. Limits the columns on each record to just those requested, e.g. "$select=PolicyAssignmentId, ResourceId". - Select *string - // Maximum number of records to return. - Top *int32 -} - // CorsRule - CORS is an HTTP feature that enables a web application running under one domain to access resources in another domain. Web browsers implement // a security restriction known as same-origin policy that // prevents a web page from calling APIs in a different domain; CORS provides a secure way to allow one domain (the origin domain) to call APIs in another @@ -264,7 +254,7 @@ type AccessPolicy struct { // REQUIRED; The permissions for the acl policy. Permission *string `xml:"Permission"` - // REQUIRED; The start datetime from which the policy is active. + // REQUIRED; The datetime from which the policy is active. Start *time.Time `xml:"Start"` } @@ -291,3 +281,63 @@ func fromGeneratedAccessPolicy(g *generated.AccessPolicy) *AccessPolicy { Start: g.Start, } } + +type GeoReplication struct { + // REQUIRED; A GMT date/time value, to the second. All primary writes preceding this value are guaranteed to be available for read operations at the secondary. + // Primary writes after this point in time may or may + // not be available for reads. + LastSyncTime *time.Time `xml:"LastSyncTime"` + + // REQUIRED; The status of the secondary location. + Status *GeoReplicationStatusType `xml:"Status"` +} + +func fromGeneratedGeoReplication(g *generated.GeoReplication) *GeoReplication { + if g == nil { + return nil + } + + return &GeoReplication{ + LastSyncTime: g.LastSyncTime, + Status: toGeneratedStatusType(g.Status), + } +} + +// GeoReplicationStatusType - The status of the secondary location. +type GeoReplicationStatusType string + +const ( + GeoReplicationStatusTypeBootstrap GeoReplicationStatusType = "bootstrap" + GeoReplicationStatusTypeLive GeoReplicationStatusType = "live" + GeoReplicationStatusTypeUnavailable GeoReplicationStatusType = "unavailable" +) + +// PossibleGeoReplicationStatusTypeValues returns the possible values for the GeoReplicationStatusType const type. +func PossibleGeoReplicationStatusTypeValues() []GeoReplicationStatusType { + return []GeoReplicationStatusType{ + GeoReplicationStatusTypeBootstrap, + GeoReplicationStatusTypeLive, + GeoReplicationStatusTypeUnavailable, + } +} + +// ToPtr returns a *GeoReplicationStatusType pointing to the current value. +func (c GeoReplicationStatusType) ToPtr() *GeoReplicationStatusType { + return &c +} + +func toGeneratedStatusType(g *generated.GeoReplicationStatusType) *GeoReplicationStatusType { + if g == nil { + return nil + } + if *g == generated.GeoReplicationStatusTypeBootstrap { + return GeoReplicationStatusTypeBootstrap.ToPtr() + } + if *g == generated.GeoReplicationStatusTypeLive { + return GeoReplicationStatusTypeLive.ToPtr() + } + if *g == generated.GeoReplicationStatusTypeUnavailable { + return GeoReplicationStatusTypeUnavailable.ToPtr() + } + return nil +} diff --git a/sdk/tables/aztable/options.go b/sdk/tables/aztable/options.go deleted file mode 100644 index b8a6fb647ddf..000000000000 --- a/sdk/tables/aztable/options.go +++ /dev/null @@ -1,185 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package aztable - -import ( - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - generated "github.com/Azure/azure-sdk-for-go/sdk/tables/aztable/internal" - "github.com/Azure/azure-sdk-for-go/sdk/to" -) - -// Options for Client.Create and ServiceClient.CreateTable method -type CreateTableOptions struct { -} - -func (c *CreateTableOptions) toGenerated() *generated.TableCreateOptions { - return &generated.TableCreateOptions{} -} - -// Options for Client.Delete and ServiceClient.DeleteTable methods -type DeleteTableOptions struct { -} - -func (c *DeleteTableOptions) toGenerated() *generated.TableDeleteOptions { - return &generated.TableDeleteOptions{} -} - -// ListEntitiesOptions contains a group of parameters for the Table.Query method. -type ListEntitiesOptions struct { - // OData filter expression. - Filter *string - // Select expression using OData notation. Limits the columns on each record to just those requested, e.g. "$select=PolicyAssignmentId, ResourceId". - Select *string - // Maximum number of records to return. - Top *int32 -} - -func (l *ListEntitiesOptions) toQueryOptions() *generated.QueryOptions { - if l == nil { - return &generated.QueryOptions{} - } - - return &generated.QueryOptions{ - Filter: l.Filter, - Format: generated.ODataMetadataFormatApplicationJSONODataMinimalmetadata.ToPtr(), - Select: l.Select, - Top: l.Top, - } -} - -// ListEntitiesOptions contains a group of parameters for the ServiceClient.QueryTables method. -type ListTablesOptions struct { - // OData filter expression. - Filter *string - // Select expression using OData notation. Limits the columns on each record to just those requested, e.g. "$select=PolicyAssignmentId, ResourceId". - Select *string - // Maximum number of records to return. - Top *int32 -} - -func (l *ListTablesOptions) toQueryOptions() *generated.QueryOptions { - if l == nil { - return &generated.QueryOptions{} - } - - return &generated.QueryOptions{ - Filter: l.Filter, - Format: generated.ODataMetadataFormatApplicationJSONODataMinimalmetadata.ToPtr(), - Select: l.Select, - Top: l.Top, - } -} - -type ResponseFormat string - -const ( - ResponseFormatReturnContent ResponseFormat = "return-content" - ResponseFormatReturnNoContent ResponseFormat = "return-no-content" -) - -// PossibleResponseFormatValues returns the possible values for the ResponseFormat const type. -func PossibleResponseFormatValues() []ResponseFormat { - return []ResponseFormat{ - ResponseFormatReturnContent, - ResponseFormatReturnNoContent, - } -} - -// ToPtr returns a *ResponseFormat pointing to the current value. -func (c ResponseFormat) ToPtr() *ResponseFormat { - return &c -} - -// Options for Client.GetEntity method -type GetEntityOptions struct { -} - -func (g *GetEntityOptions) toGenerated() (*generated.TableQueryEntityWithPartitionAndRowKeyOptions, *generated.QueryOptions) { - return &generated.TableQueryEntityWithPartitionAndRowKeyOptions{}, &generated.QueryOptions{Format: generated.ODataMetadataFormatApplicationJSONODataMinimalmetadata.ToPtr()} -} - -// Options for the Client.AddEntity operation -type AddEntityOptions struct { - // Specifies whether the response should include the inserted entity in the payload. Possible values are return-no-content and return-content. - ResponsePreference *ResponseFormat -} - -type DeleteEntityOptions struct { - IfMatch *azcore.ETag -} - -func (d *DeleteEntityOptions) toGenerated() *generated.TableDeleteEntityOptions { - return &generated.TableDeleteEntityOptions{} -} - -type UpdateEntityOptions struct { - IfMatch *azcore.ETag - UpdateMode EntityUpdateMode -} - -func (u *UpdateEntityOptions) toGeneratedMergeEntity(m map[string]interface{}) *generated.TableMergeEntityOptions { - if u == nil { - return &generated.TableMergeEntityOptions{} - } - return &generated.TableMergeEntityOptions{ - IfMatch: to.StringPtr(string(*u.IfMatch)), - TableEntityProperties: m, - } -} - -func (u *UpdateEntityOptions) toGeneratedUpdateEntity(m map[string]interface{}) *generated.TableUpdateEntityOptions { - if u == nil { - return &generated.TableUpdateEntityOptions{} - } - return &generated.TableUpdateEntityOptions{ - IfMatch: to.StringPtr(string(*u.IfMatch)), - TableEntityProperties: m, - } -} - -type InsertEntityOptions struct { - ETag azcore.ETag - UpdateMode EntityUpdateMode -} - -type GetAccessPolicyOptions struct { -} - -func (g *GetAccessPolicyOptions) toGenerated() *generated.TableGetAccessPolicyOptions { - return &generated.TableGetAccessPolicyOptions{} -} - -type SetAccessPolicyOptions struct { - TableACL []*SignedIdentifier -} - -func (s *SetAccessPolicyOptions) toGenerated() *generated.TableSetAccessPolicyOptions { - var sis []*generated.SignedIdentifier - for _, t := range s.TableACL { - sis = append(sis, toGeneratedSignedIdentifier(t)) - } - return &generated.TableSetAccessPolicyOptions{ - TableACL: sis, - } -} - -type GetStatisticsOptions struct { -} - -func (g *GetStatisticsOptions) toGenerated() *generated.ServiceGetStatisticsOptions { - return &generated.ServiceGetStatisticsOptions{} -} - -type GetPropertiesOptions struct { -} - -func (g *GetPropertiesOptions) toGenerated() *generated.ServiceGetPropertiesOptions { - return &generated.ServiceGetPropertiesOptions{} -} - -type SetPropertiesOptions struct{} - -func (s *SetPropertiesOptions) toGenerated() *generated.ServiceSetPropertiesOptions { - return &generated.ServiceSetPropertiesOptions{} -} diff --git a/sdk/tables/aztable/responses.go b/sdk/tables/aztable/responses.go deleted file mode 100644 index 73f2ed46e01d..000000000000 --- a/sdk/tables/aztable/responses.go +++ /dev/null @@ -1,202 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package aztable - -import ( - "net/http" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - generated "github.com/Azure/azure-sdk-for-go/sdk/tables/aztable/internal" -) - -type CreateTableResponse struct { - RawResponse *http.Response -} - -func createTableResponseFromGen(g *generated.TableCreateResponse) CreateTableResponse { - if g == nil { - return CreateTableResponse{} - } - return CreateTableResponse{ - RawResponse: g.RawResponse, - } -} - -type DeleteTableResponse struct { - RawResponse *http.Response -} - -func deleteTableResponseFromGen(g *generated.TableDeleteResponse) DeleteTableResponse { - if g == nil { - return DeleteTableResponse{} - } - return DeleteTableResponse{ - RawResponse: g.RawResponse, - } -} - -type AddEntityResponse struct { - RawResponse *http.Response - ETag azcore.ETag -} - -func addEntityResponseFromGenerated(g *generated.TableInsertEntityResponse) AddEntityResponse { - if g == nil { - return AddEntityResponse{} - } - - return AddEntityResponse{ - RawResponse: g.RawResponse, - ETag: azcore.ETag(*g.ETag), - } -} - -type DeleteEntityResponse struct { - RawResponse *http.Response -} - -func deleteEntityResponseFromGenerated(g *generated.TableDeleteEntityResponse) DeleteEntityResponse { - if g == nil { - return DeleteEntityResponse{} - } - return DeleteEntityResponse{ - RawResponse: g.RawResponse, - } -} - -type UpdateEntityResponse struct { - RawResponse *http.Response - ETag azcore.ETag -} - -func updateEntityResponseFromMergeGenerated(g *generated.TableMergeEntityResponse) UpdateEntityResponse { - if g == nil { - return UpdateEntityResponse{} - } - - return UpdateEntityResponse{ - RawResponse: g.RawResponse, - ETag: azcore.ETag(*g.ETag), - } -} - -func updateEntityResponseFromUpdateGenerated(g *generated.TableUpdateEntityResponse) UpdateEntityResponse { - if g == nil { - return UpdateEntityResponse{} - } - - return UpdateEntityResponse{ - RawResponse: g.RawResponse, - ETag: azcore.ETag(*g.ETag), - } -} - -type InsertEntityResponse struct { - RawResponse *http.Response - ETag azcore.ETag -} - -func insertEntityFromGeneratedMerge(g *generated.TableMergeEntityResponse) InsertEntityResponse { - if g == nil { - return InsertEntityResponse{} - } - - return InsertEntityResponse{ - RawResponse: g.RawResponse, - ETag: azcore.ETag(*g.ETag), - } -} - -func insertEntityFromGeneratedUpdate(g *generated.TableUpdateEntityResponse) InsertEntityResponse { - if g == nil { - return InsertEntityResponse{} - } - - return InsertEntityResponse{ - RawResponse: g.RawResponse, - ETag: azcore.ETag(*g.ETag), - } -} - -type GetAccessPolicyResponse struct { - RawResponse *http.Response - SignedIdentifiers []*SignedIdentifier -} - -func getAccessPolicyResponseFromGenerated(g *generated.TableGetAccessPolicyResponse) GetAccessPolicyResponse { - if g == nil { - return GetAccessPolicyResponse{} - } - - var sis []*SignedIdentifier - for _, s := range g.SignedIdentifiers { - sis = append(sis, fromGeneratedSignedIdentifier(s)) - } - return GetAccessPolicyResponse{ - RawResponse: g.RawResponse, - SignedIdentifiers: sis, - } -} - -type SetAccessPolicyResponse struct { - RawResponse *http.Response -} - -func setAccessPolicyResponseFromGenerated(g *generated.TableSetAccessPolicyResponse) SetAccessPolicyResponse { - if g == nil { - return SetAccessPolicyResponse{} - } - return SetAccessPolicyResponse{ - RawResponse: g.RawResponse, - } -} - -type GetStatisticsResponse struct { - RawResponse *http.Response -} - -func getStatisticsResponseFromGenerated(g *generated.ServiceGetStatisticsResponse) GetStatisticsResponse { - return GetStatisticsResponse{ - RawResponse: g.RawResponse, - } -} - -type GetPropertiesResponse struct { - RawResponse *http.Response - // The set of CORS rules. - Cors []*CorsRule `xml:"Cors>CorsRule"` - - // A summary of request statistics grouped by API in hourly aggregates for tables. - HourMetrics *Metrics `xml:"HourMetrics"` - - // Azure Analytics Logging settings. - Logging *Logging `xml:"Logging"` - - // A summary of request statistics grouped by API in minute aggregates for tables. - MinuteMetrics *Metrics `xml:"MinuteMetrics"` -} - -func getPropertiesResponseFromGenerated(g *generated.ServiceGetPropertiesResponse) GetPropertiesResponse { - var cors []*CorsRule - for _, c := range g.Cors { - cors = append(cors, fromGeneratedCors(c)) - } - return GetPropertiesResponse{ - RawResponse: g.RawResponse, - Cors: cors, - HourMetrics: fromGeneratedMetrics(g.HourMetrics), - Logging: fromGeneratedLogging(g.Logging), - MinuteMetrics: fromGeneratedMetrics(g.MinuteMetrics), - } -} - -type SetPropertiesResponse struct { - RawResponse *http.Response -} - -func setPropertiesResponseFromGenerated(g *generated.ServiceSetPropertiesResponse) SetPropertiesResponse { - return SetPropertiesResponse{ - RawResponse: g.RawResponse, - } -} diff --git a/sdk/tables/aztable/sas_account.go b/sdk/tables/aztable/sas_account.go index 18c3f10a303f..08acddabfb0a 100644 --- a/sdk/tables/aztable/sas_account.go +++ b/sdk/tables/aztable/sas_account.go @@ -26,8 +26,7 @@ type AccountSASSignatureValues struct { ResourceTypes string `param:"srt"` // Create by initializing AccountSASResourceTypes and then call String() } -// Sign uses an account's SharedKeyCredential to sign this signature values to produce -// the proper SAS query parameters. +// Sign uses an account's SharedKeyCredential to sign this signature values to produce the proper SAS query parameters. func (v AccountSASSignatureValues) Sign(sharedKeyCredential *SharedKeyCredential) (SASQueryParameters, error) { // https://docs.microsoft.com/en-us/rest/api/storageservices/Constructing-an-Account-SAS if v.ExpiryTime.IsZero() || v.Permissions == "" || v.ResourceTypes == "" || v.Services == "" { diff --git a/sdk/tables/aztable/service_client.go b/sdk/tables/aztable/service_client.go new file mode 100644 index 000000000000..9e3209dccbf5 --- /dev/null +++ b/sdk/tables/aztable/service_client.go @@ -0,0 +1,438 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package aztable + +import ( + "context" + "errors" + "net/http" + "strings" + "time" + + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + generated "github.com/Azure/azure-sdk-for-go/sdk/tables/aztable/internal" +) + +// A ServiceClient represents a client to the table service. It can be used to query the available tables, create/delete tables, and various other service level operations. +type ServiceClient struct { + client *generated.TableClient + service *generated.ServiceClient + cred azcore.Credential +} + +// NewServiceClient creates a ServiceClient struct using the specified serviceURL, credential, and options. +func NewServiceClient(serviceURL string, cred azcore.Credential, options *ClientOptions) (*ServiceClient, error) { + if options == nil { + options = &ClientOptions{} + } + conOptions := options.getConnectionOptions() + if isCosmosEndpoint(serviceURL) { + conOptions.PerCallPolicies = append(conOptions.PerCallPolicies, cosmosPatchTransformPolicy{}) + } + conOptions.PerCallPolicies = append(conOptions.PerCallPolicies, options.PerCallOptions...) + con := generated.NewConnection(serviceURL, cred, conOptions) + return &ServiceClient{ + client: generated.NewTableClient(con), + service: generated.NewServiceClient(con), + cred: cred, + }, nil +} + +// NewClient returns a pointer to a Client affinitized to the specified table name and initialized with the same serviceURL and credentials as this ServiceClient +func (t *ServiceClient) NewClient(tableName string) *Client { + return &Client{ + client: t.client, + cred: t.cred, + name: tableName, + service: t, + } +} + +// Options for Client.Create and ServiceClient.CreateTable method +type CreateTableOptions struct { +} + +func (c *CreateTableOptions) toGenerated() *generated.TableCreateOptions { + return &generated.TableCreateOptions{} +} + +// Create creates a table with the specified name. +func (t *ServiceClient) CreateTable(ctx context.Context, name string, options *CreateTableOptions) (*Client, error) { + if options == nil { + options = &CreateTableOptions{} + } + _, err := t.client.Create(ctx, generated.TableProperties{TableName: &name}, options.toGenerated(), &generated.QueryOptions{}) + return t.NewClient(name), err +} + +// Options for Client.Delete and ServiceClient.DeleteTable methods +type DeleteTableOptions struct { +} + +func (c *DeleteTableOptions) toGenerated() *generated.TableDeleteOptions { + return &generated.TableDeleteOptions{} +} + +// Response object from a ServiceClient.DeleteTable or Client.Delete operation +type DeleteTableResponse struct { + RawResponse *http.Response +} + +func deleteTableResponseFromGen(g *generated.TableDeleteResponse) DeleteTableResponse { + if g == nil { + return DeleteTableResponse{} + } + return DeleteTableResponse{ + RawResponse: g.RawResponse, + } +} + +// Delete deletes a table by name. +func (t *ServiceClient) DeleteTable(ctx context.Context, name string, options *DeleteTableOptions) (DeleteTableResponse, error) { + if options == nil { + options = &DeleteTableOptions{} + } + resp, err := t.client.Delete(ctx, name, options.toGenerated()) + return deleteTableResponseFromGen(&resp), err +} + +// ListEntitiesOptions contains a group of parameters for the ServiceClient.QueryTables method. +type ListTablesOptions struct { + // OData filter expression. + Filter *string + // Select expression using OData notation. Limits the columns on each record to just those requested, e.g. "$select=PolicyAssignmentId, ResourceId". + Select *string + // Maximum number of records to return. + Top *int32 +} + +func (l *ListTablesOptions) toQueryOptions() *generated.QueryOptions { + if l == nil { + return &generated.QueryOptions{} + } + + return &generated.QueryOptions{ + Filter: l.Filter, + Format: generated.ODataMetadataFormatApplicationJSONODataMinimalmetadata.ToPtr(), + Select: l.Select, + Top: l.Top, + } +} + +// ListTablesPager is a Pager for Table List operations +// +// NextPage should be called first. It fetches the next available page of results from the service. +// If the fetched page contains results, the return value is true, else false. +// Results fetched from the service can be evaluated by calling PageResponse on this Pager. +// If the result is false, the value of Err() will indicate if an error occurred. +// +// PageResponse returns the results from the page most recently fetched from the service. +// Example usage of this in combination with NextPage would look like the following: +// +// for pager.NextPage(ctx) { +// resp = pager.PageResponse() +// fmt.Printf("The page contains %i results.\n", len(resp.Tables)) +// } +// err := pager.Err() +type ListTablesPager interface { + // PageResponse returns the current TableQueryResponseResponse. + PageResponse() ListTablesPage + // NextPage returns true if there is another page of data available, false if not + NextPage(context.Context) bool + // Err returns an error if there was an error on the last request + Err() error +} + +// ListTablesPage contains the properties of a single page response from a ListTables operation +type ListTablesPage struct { + // RawResponse contains the underlying HTTP response. + RawResponse *http.Response + + // ContinuationNextTableName contains the information returned from the x-ms-continuation-NextTableName header response. + ContinuationNextTableName *string + + // The metadata response of the table. + ODataMetadata *string `json:"odata.metadata,omitempty"` + + // List of tables. + Tables []*ResponseProperties `json:"value,omitempty"` +} + +func fromGeneratedTableQueryResponseEnvelope(g *generated.TableQueryResponseEnvelope) *ListTablesPage { + if g == nil { + return nil + } + + var value []*ResponseProperties + + for _, v := range g.Value { + value = append(value, fromGeneratedTableResponseProperties(v)) + } + + return &ListTablesPage{ + RawResponse: g.RawResponse, + ContinuationNextTableName: g.XMSContinuationNextTableName, + ODataMetadata: g.ODataMetadata, + Tables: value, + } +} + +// ResponseProperties contains the properties for a single Table +type ResponseProperties struct { + // The edit link of the table. + ODataEditLink *string `json:"odata.editLink,omitempty"` + + // The id of the table. + ODataID *string `json:"odata.id,omitempty"` + + // The odata type of the table. + ODataType *string `json:"odata.type,omitempty"` + + // The name of the table. + TableName *string `json:"TableName,omitempty"` +} + +// Convets a generated TableResponseProperties to a ResponseProperties +func fromGeneratedTableResponseProperties(g *generated.TableResponseProperties) *ResponseProperties { + if g == nil { + return nil + } + + return &ResponseProperties{ + TableName: g.TableName, + ODataEditLink: g.ODataEditLink, + ODataID: g.ODataID, + ODataType: g.ODataType, + } +} + +type tableQueryResponsePager struct { + client *generated.TableClient + current *generated.TableQueryResponseEnvelope + tableQueryOptions *generated.TableQueryOptions + listOptions *ListTablesOptions + err error +} + +// NextPage fetches the next available page of results from the service. +// If the fetched page contains results, the return value is true, else false. +// Results fetched from the service can be evaulated by calling PageResponse on this Pager. +func (p *tableQueryResponsePager) NextPage(ctx context.Context) bool { + if p.err != nil || (p.current != nil && p.current.XMSContinuationNextTableName == nil) { + return false + } + var resp generated.TableQueryResponseEnvelope + resp, p.err = p.client.Query(ctx, p.tableQueryOptions, p.listOptions.toQueryOptions()) + p.current = &resp + p.tableQueryOptions.NextTableName = resp.XMSContinuationNextTableName + return p.err == nil && resp.TableQueryResponse.Value != nil && len(resp.TableQueryResponse.Value) > 0 +} + +// PageResponse returns the results from the page most recently fetched from the service. +// Example usage of this in combination with NextPage would look like the following: +// +// for pager.NextPage(ctx) { +// resp = pager.PageResponse() +// fmt.Printf("The page contains %i results.\n", len(resp.Tables)) +// } +func (p *tableQueryResponsePager) PageResponse() ListTablesPage { + return *fromGeneratedTableQueryResponseEnvelope(p.current) +} + +// Err returns an error value if the most recent call to NextPage was not successful, else nil. +func (p *tableQueryResponsePager) Err() error { + return p.err +} + +// List queries the existing tables using the specified ListTablesOptions. +// listOptions can specify the following properties to affect the query results returned: +// +// Filter: An OData filter expression that limits results to those tables that satisfy the filter expression. +// For example, the following expression would return only tables with a TableName of 'foo': "TableName eq 'foo'" +// +// Top: The maximum number of tables that will be returned per page of results. +// Note: This value does not limit the total number of results if NextPage is called on the returned Pager until it returns false. +// +// List returns a Pager, which allows iteration through each page of results. Example: +// +// options := &ListTablesOptions{Filter: to.StringPtr("PartitionKey eq 'pk001'"), Top: to.Int32Ptr(25)} +// pager := client.List(options) // Pass in 'nil' if you want to return all Tables for an account. +// for pager.NextPage(ctx) { +// resp = pager.PageResponse() +// fmt.Printf("The page contains %i results.\n", len(resp.Tables)) +// } +// err := pager.Err() +func (t *ServiceClient) ListTables(listOptions *ListTablesOptions) ListTablesPager { + return &tableQueryResponsePager{ + client: t.client, + listOptions: listOptions, + tableQueryOptions: new(generated.TableQueryOptions), + } +} + +// GetStatisticsOptions are the options for a ServiceClient.GetStatistics call +type GetStatisticsOptions struct { +} + +type GetStatisticsResponse struct { + RawResponse *http.Response + GeoReplication *GeoReplication `xml:"GeoReplication"` +} + +func getStatisticsResponseFromGenerated(g *generated.ServiceGetStatisticsResponse) GetStatisticsResponse { + return GetStatisticsResponse{ + RawResponse: g.RawResponse, + GeoReplication: fromGeneratedGeoReplication(g.GeoReplication), + } +} + +func (g *GetStatisticsOptions) toGenerated() *generated.ServiceGetStatisticsOptions { + return &generated.ServiceGetStatisticsOptions{} +} + +// GetStatistics retrieves all the statistics for an account with Geo-redundancy established. +// +// response, err := client.GetStatistics(context.Background, nil) +// handle(err) +// fmt.Println("Status: ", response.GeoReplication.Status) +// fmt.Println(Last Sync Time: ", response.GeoReplication.LastSyncTime) +func (t *ServiceClient) GetStatistics(ctx context.Context, options *GetStatisticsOptions) (GetStatisticsResponse, error) { + if options == nil { + options = &GetStatisticsOptions{} + } + resp, err := t.service.GetStatistics(ctx, options.toGenerated()) + return getStatisticsResponseFromGenerated(&resp), err +} + +type GetPropertiesOptions struct { +} + +func (g *GetPropertiesOptions) toGenerated() *generated.ServiceGetPropertiesOptions { + return &generated.ServiceGetPropertiesOptions{} +} + +type GetPropertiesResponse struct { + RawResponse *http.Response + // The set of CORS rules. + Cors []*CorsRule `xml:"Cors>CorsRule"` + + // A summary of request statistics grouped by API in hourly aggregates for tables. + HourMetrics *Metrics `xml:"HourMetrics"` + + // Azure Analytics Logging settings. + Logging *Logging `xml:"Logging"` + + // A summary of request statistics grouped by API in minute aggregates for tables. + MinuteMetrics *Metrics `xml:"MinuteMetrics"` +} + +func getPropertiesResponseFromGenerated(g *generated.ServiceGetPropertiesResponse) GetPropertiesResponse { + var cors []*CorsRule + for _, c := range g.Cors { + cors = append(cors, fromGeneratedCors(c)) + } + return GetPropertiesResponse{ + RawResponse: g.RawResponse, + Cors: cors, + HourMetrics: fromGeneratedMetrics(g.HourMetrics), + Logging: fromGeneratedLogging(g.Logging), + MinuteMetrics: fromGeneratedMetrics(g.MinuteMetrics), + } +} + +// GetProperties retrieves the properties for an account including the metrics, logging, and cors rules established. +// +// response, err := client.GetProperties(context.Background, nil) +// handle(err) +// fmt.Println(response.Cors) +// fmt.Println(response.HourMetrics) +// fmt.Println(response.Logging) +// fmt.Println(response.MinuteMetrics) +func (t *ServiceClient) GetProperties(ctx context.Context, options *GetPropertiesOptions) (GetPropertiesResponse, error) { + if options == nil { + options = &GetPropertiesOptions{} + } + resp, err := t.service.GetProperties(ctx, options.toGenerated()) + return getPropertiesResponseFromGenerated(&resp), err +} + +type SetPropertiesOptions struct{} + +func (s *SetPropertiesOptions) toGenerated() *generated.ServiceSetPropertiesOptions { + return &generated.ServiceSetPropertiesOptions{} +} + +type SetPropertiesResponse struct { + RawResponse *http.Response +} + +func setPropertiesResponseFromGenerated(g *generated.ServiceSetPropertiesResponse) SetPropertiesResponse { + return SetPropertiesResponse{ + RawResponse: g.RawResponse, + } +} + +// SetProperties allows the user to set cors , metrics, and logging rules for the account. +// +// Cors: A slice of CorsRules. +// +// HoursMetrics: A summary of request statistics grouped in hourly aggregatess for tables +// +// HoursMetrics: A summary of request statistics grouped in minute aggregates for tables +// +// Logging: Azure Analytics logging settings +// +// +// logging := aztable.Logging{ +// Read: to.BoolPtr(true), +// Write: to.BoolPtr(true), +// Delete: to.BoolPtr(true), +// Version: to.StringPtr("1.0"), +// RetentionPolicy: &aztable.RetentionPolicy{ +// Enabled: to.BoolPtr(true), +// Days: to.Int32Ptr(5), +// }, +// } +// props := aztable.ServiceProperties{Logging: &logging} +// resp, err := client.SetProperties(ctx, props, nil) +// handle(err) +func (t *ServiceClient) SetProperties(ctx context.Context, properties ServiceProperties, options *SetPropertiesOptions) (SetPropertiesResponse, error) { + if options == nil { + options = &SetPropertiesOptions{} + } + resp, err := t.service.SetProperties(ctx, *properties.toGenerated(), options.toGenerated()) + return setPropertiesResponseFromGenerated(&resp), err +} + +// GetAccountSASToken is a convenience method for generating a SAS token for the currently pointed at account. This methods returns the full service URL and an error +// if there was an error during creation. This method can only be used if the supplied azcore.Credential during creation was a SharedKeyCredential. +func (t ServiceClient) GetAccountSASToken(resources AccountSASResourceTypes, permissions AccountSASPermissions, start time.Time, expiry time.Time) (string, error) { + cred, ok := t.cred.(*SharedKeyCredential) + if !ok { + return "", errors.New("credential is not a SharedKeyCredential. SAS can only be signed with a SharedKeyCredential") + } + qps, err := AccountSASSignatureValues{ + Version: SASVersion, + Protocol: SASProtocolHTTPS, + Permissions: permissions.String(), + Services: "t", + ResourceTypes: resources.String(), + StartTime: start.UTC(), + ExpiryTime: expiry.UTC(), + }.Sign(cred) + if err != nil { + return "", err + } + endpoint := t.client.Con.Endpoint() + if !strings.HasSuffix(endpoint, "/") { + endpoint += "/" + } + endpoint += "?" + qps.Encode() + return endpoint, nil +} + +func isCosmosEndpoint(url string) bool { + isCosmosEmulator := strings.Contains(url, "localhost") && strings.Contains(url, "8902") + return isCosmosEmulator || strings.Contains(url, cosmosTableDomain) || strings.Contains(url, legacyCosmosTableDomain) +} diff --git a/sdk/tables/aztable/table_service_client_test.go b/sdk/tables/aztable/service_client_test.go similarity index 99% rename from sdk/tables/aztable/table_service_client_test.go rename to sdk/tables/aztable/service_client_test.go index c29d522af0bc..fa4ddbecf682 100644 --- a/sdk/tables/aztable/table_service_client_test.go +++ b/sdk/tables/aztable/service_client_test.go @@ -8,9 +8,9 @@ import ( "fmt" "testing" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/internal/recording" - "github.com/Azure/azure-sdk-for-go/sdk/to" "github.com/stretchr/testify/require" ) diff --git a/sdk/tables/aztable/shared_access_signature_test.go b/sdk/tables/aztable/shared_access_signature_test.go index 606b516c649c..f1fe97045206 100644 --- a/sdk/tables/aztable/shared_access_signature_test.go +++ b/sdk/tables/aztable/shared_access_signature_test.go @@ -49,6 +49,7 @@ func TestSASServiceClient(t *testing.T) { Write: true, Create: true, Update: true, + Delete: true, } start := time.Date(2021, time.August, 4, 1, 1, 0, 0, time.UTC) expiry := time.Date(2022, time.August, 4, 1, 1, 0, 0, time.UTC) @@ -62,10 +63,10 @@ func TestSASServiceClient(t *testing.T) { require.NoError(t, err) defer recording.StopRecording(t, nil) //nolint - _, err = svcClient.CreateTable(context.Background(), "sasTable001", nil) + _, err = svcClient.CreateTable(context.Background(), tableName+"002", nil) require.NoError(t, err) - _, err = svcClient.DeleteTable(context.Background(), "sasTable001", nil) + _, err = svcClient.DeleteTable(context.Background(), tableName+"002", nil) require.NoError(t, err) } diff --git a/sdk/tables/aztable/table_client.go b/sdk/tables/aztable/table_client.go deleted file mode 100644 index 80fdeacd360a..000000000000 --- a/sdk/tables/aztable/table_client.go +++ /dev/null @@ -1,276 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package aztable - -import ( - "context" - "encoding/json" - "errors" - "net/url" - "strings" - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - generated "github.com/Azure/azure-sdk-for-go/sdk/tables/aztable/internal" -) - -// A Client represents a client to the tables service affinitized to a specific table. -type Client struct { - client *generated.TableClient - service *ServiceClient - cred azcore.Credential - name string -} - -// EntityUpdateMode specifies what type of update to do on InsertEntity or UpdateEntity. ReplaceEntity -// will replace an existing entity, MergeEntity will merge properties of the entities. -type EntityUpdateMode string - -const ( - ReplaceEntity EntityUpdateMode = "replace" - MergeEntity EntityUpdateMode = "merge" -) - -// NewClient creates a Client struct in the context of the table specified in the serviceURL, credential, and options. -func NewClient(serviceURL string, cred azcore.Credential, options *ClientOptions) (*Client, error) { - if options == nil { - options = &ClientOptions{} - } - - parsedUrl, err := url.Parse(serviceURL) - if err != nil { - return &Client{}, err - } - - tableName := parsedUrl.Path[1:] - rawServiceURL := parsedUrl.Scheme + "://" + parsedUrl.Host - if parsedUrl.Scheme == "" { - rawServiceURL = parsedUrl.Host - } - if strings.Contains(tableName, "/") { - splits := strings.Split(parsedUrl.Path, "/") - tableName = splits[len(splits)-1] - rawServiceURL += strings.Join(splits[:len(splits)-1], "/") - } - sas := parsedUrl.Query() - if len(sas) > 0 { - rawServiceURL += "/?" + sas.Encode() - } - - s, err := NewServiceClient(rawServiceURL, cred, options) - if err != nil { - return &Client{}, err - } - return s.NewClient(tableName), nil -} - -// Create creates the table with the tableName specified when NewClient was called. -func (t *Client) Create(ctx context.Context, options *CreateTableOptions) (CreateTableResponse, error) { - if options == nil { - options = &CreateTableOptions{} - } - resp, err := t.client.Create(ctx, generated.TableProperties{TableName: &t.name}, options.toGenerated(), &generated.QueryOptions{}) - return createTableResponseFromGen(&resp), err -} - -// Delete deletes the table with the tableName specified when NewClient was called. -func (t *Client) Delete(ctx context.Context, options *DeleteTableOptions) (DeleteTableResponse, error) { - return t.service.DeleteTable(ctx, t.name, options) -} - -// List queries the entities using the specified ListEntitiesOptions. -// ListOptions can specify the following properties to affect the query results returned: -// -// Filter: An OData filter expression that limits results to those entities that satisfy the filter expression. -// For example, the following expression would return only entities with a PartitionKey of 'foo': "PartitionKey eq 'foo'" -// -// Select: A comma delimited list of entity property names that selects which set of entity properties to return in the result set. -// For example, the following value would return results containing only the PartitionKey and RowKey properties: "PartitionKey, RowKey" -// -// Top: The maximum number of entities that will be returned per page of results. -// Note: This value does not limit the total number of results if NextPage is called on the returned Pager until it returns false. -// -// List returns a Pager, which allows iteration through each page of results. Example: -// -// options := &ListEntitiesOptions{Filter: to.StringPtr("PartitionKey eq 'pk001'"), Top: to.Int32Ptr(25), Select: to.StringPtr("PartitionKey,RowKey,Value,Price")} -// pager := client.List(options) // Pass in 'nil' if you want to return all Entities for an account. -// for pager.NextPage(ctx) { -// resp = pager.PageResponse() -// fmt.Printf("The page contains %i results.\n", len(resp.Value)) -// } -// err := pager.Err() -func (t *Client) List(listOptions *ListEntitiesOptions) ListEntitiesPager { - return &tableEntityQueryResponsePager{ - tableClient: t, - listOptions: listOptions, - tableQueryOptions: &generated.TableQueryEntitiesOptions{}, - } -} - -// GetEntity retrieves a specific entity from the service using the specified partitionKey and rowKey values. If no entity is available it returns an error -func (t *Client) GetEntity(ctx context.Context, partitionKey string, rowKey string, options *GetEntityOptions) (GetEntityResponse, error) { - if options == nil { - options = &GetEntityOptions{} - } - - genOptions, queryOptions := options.toGenerated() - resp, err := t.client.QueryEntityWithPartitionAndRowKey(ctx, t.name, partitionKey, rowKey, genOptions, queryOptions) - if err != nil { - return GetEntityResponse{}, err - } - return newGetEntityResponse(resp) -} - -// AddEntity adds an entity (described by a byte slice) to the table. This method returns an error if an entity with -// the same PartitionKey and RowKey already exists in the table. If the supplied entity does not contain both a PartitionKey -// and a RowKey an error will be returned. -func (t *Client) AddEntity(ctx context.Context, entity []byte, options *AddEntityOptions) (AddEntityResponse, error) { - var mapEntity map[string]interface{} - err := json.Unmarshal(entity, &mapEntity) - if err != nil { - return AddEntityResponse{}, err - } - resp, err := t.client.InsertEntity(ctx, t.name, &generated.TableInsertEntityOptions{TableEntityProperties: mapEntity, ResponsePreference: generated.ResponseFormatReturnNoContent.ToPtr()}, nil) - if err != nil { - err = checkEntityForPkRk(&mapEntity, err) - return AddEntityResponse{}, err - } - return addEntityResponseFromGenerated(&resp), err -} - -// DeleteEntity deletes the entity with the specified partitionKey and rowKey from the table. -func (t *Client) DeleteEntity(ctx context.Context, partitionKey string, rowKey string, options *DeleteEntityOptions) (DeleteEntityResponse, error) { - if options == nil { - options = &DeleteEntityOptions{} - } - if options.IfMatch == nil { - nilEtag := azcore.ETag("*") - options.IfMatch = &nilEtag - } - resp, err := t.client.DeleteEntity(ctx, t.name, partitionKey, rowKey, string(*options.IfMatch), options.toGenerated(), &generated.QueryOptions{}) - return deleteEntityResponseFromGenerated(&resp), err -} - -// UpdateEntity updates the specified table entity if it exists. -// If updateMode is Replace, the entity will be replaced. This is the only way to remove properties from an existing entity. -// If updateMode is Merge, the property values present in the specified entity will be merged with the existing entity. Properties not specified in the merge will be unaffected. -// The specified etag value will be used for optimistic concurrency. If the etag does not match the value of the entity in the table, the operation will fail. -// The response type will be TableEntityMergeResponse if updateMode is Merge and TableEntityUpdateResponse if updateMode is Replace. -func (t *Client) UpdateEntity(ctx context.Context, entity []byte, options *UpdateEntityOptions) (UpdateEntityResponse, error) { - if options == nil { - options = &UpdateEntityOptions{ - UpdateMode: MergeEntity, - } - } - - if options.IfMatch == nil { - star := azcore.ETag("*") - options.IfMatch = &star - } - - var mapEntity map[string]interface{} - err := json.Unmarshal(entity, &mapEntity) - if err != nil { - return UpdateEntityResponse{}, err - } - - pk := mapEntity[partitionKey] - partKey := pk.(string) - - rk := mapEntity[rowKey] - rowkey := rk.(string) - - switch options.UpdateMode { - case MergeEntity: - resp, err := t.client.MergeEntity(ctx, t.name, partKey, rowkey, options.toGeneratedMergeEntity(mapEntity), &generated.QueryOptions{}) - return updateEntityResponseFromMergeGenerated(&resp), err - case ReplaceEntity: - resp, err := t.client.UpdateEntity(ctx, t.name, partKey, rowkey, options.toGeneratedUpdateEntity(mapEntity), &generated.QueryOptions{}) - return updateEntityResponseFromUpdateGenerated(&resp), err - } - if pk == "" || rk == "" { - return UpdateEntityResponse{}, errPartitionKeyRowKeyError - } - return UpdateEntityResponse{}, errInvalidUpdateMode -} - -// InsertEntity inserts an entity if it does not already exist in the table. If the entity does exist, the entity is -// replaced or merged as specified the updateMode parameter. If the entity exists and updateMode is Merge, the property -// values present in the specified entity will be merged with the existing entity rather than replaced. -// The response type will be TableEntityMergeResponse if updateMode is Merge and TableEntityUpdateResponse if updateMode is Replace. -func (t *Client) InsertEntity(ctx context.Context, entity []byte, options *InsertEntityOptions) (InsertEntityResponse, error) { - if options == nil { - options = &InsertEntityOptions{ - UpdateMode: MergeEntity, - } - } - var mapEntity map[string]interface{} - err := json.Unmarshal(entity, &mapEntity) - if err != nil { - return InsertEntityResponse{}, err - } - - pk := mapEntity[partitionKey] - partKey := pk.(string) - - rk := mapEntity[rowKey] - rowkey := rk.(string) - - switch options.UpdateMode { - case MergeEntity: - resp, err := t.client.MergeEntity(ctx, t.name, partKey, rowkey, &generated.TableMergeEntityOptions{TableEntityProperties: mapEntity}, &generated.QueryOptions{}) - return insertEntityFromGeneratedMerge(&resp), err - case ReplaceEntity: - resp, err := t.client.UpdateEntity(ctx, t.name, partKey, rowkey, &generated.TableUpdateEntityOptions{TableEntityProperties: mapEntity}, &generated.QueryOptions{}) - return insertEntityFromGeneratedUpdate(&resp), err - } - if pk == "" || rk == "" { - return InsertEntityResponse{}, errPartitionKeyRowKeyError - } - return InsertEntityResponse{}, errInvalidUpdateMode -} - -// GetAccessPolicy retrieves details about any stored access policies specified on the table that may be used with the Shared Access Signature -func (t *Client) GetAccessPolicy(ctx context.Context, options *GetAccessPolicyOptions) (GetAccessPolicyResponse, error) { - resp, err := t.client.GetAccessPolicy(ctx, t.name, options.toGenerated()) - return getAccessPolicyResponseFromGenerated(&resp), err -} - -// SetAccessPolicy sets stored access policies for the table that may be used with SharedAccessSignature -func (t *Client) SetAccessPolicy(ctx context.Context, options *SetAccessPolicyOptions) (SetAccessPolicyResponse, error) { - response, err := t.client.SetAccessPolicy(ctx, t.name, options.toGenerated()) - if len(options.TableACL) > 5 { - err = errTooManyAccessPoliciesError - } - return setAccessPolicyResponseFromGenerated(&response), err -} - -// GetTableSASToken is a convenience method for generating a SAS token for a specific table. -// It can only be used if the supplied azcore.Credential during creation was a SharedKeyCredential. -func (t Client) GetTableSASToken(permissions SASPermissions, start time.Time, expiry time.Time) (string, error) { - cred, ok := t.cred.(*SharedKeyCredential) - if !ok { - return "", errors.New("credential is not a SharedKeyCredential. SAS can only be signed with a SharedKeyCredential") - } - qps, err := SASSignatureValues{ - TableName: t.name, - Permissions: permissions.String(), - StartTime: start, - ExpiryTime: expiry, - StartPartitionKey: permissions.StartPartitionKey, - StartRowKey: permissions.StartRowKey, - EndPartitionKey: permissions.EndPartitionKey, - EndRowKey: permissions.EndRowKey, - }.NewSASQueryParameters(cred) - if err != nil { - return "", err - } - - serviceURL := t.client.Con.Endpoint() - if !strings.Contains(serviceURL, "/") { - serviceURL += "/" - } - serviceURL += t.name + "?" + qps.Encode() - return serviceURL, nil -} diff --git a/sdk/tables/aztable/table_pagers.go b/sdk/tables/aztable/table_pagers.go deleted file mode 100644 index a56f5d12064b..000000000000 --- a/sdk/tables/aztable/table_pagers.go +++ /dev/null @@ -1,177 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package aztable - -import ( - "context" - "net/http" - - generated "github.com/Azure/azure-sdk-for-go/sdk/tables/aztable/internal" -) - -// ListEntitiesPager is a Pager for Table entity query results. -// -// NextPage should be called first. It fetches the next available page of results from the service. -// If the fetched page contains results, the return value is true, else false. -// Results fetched from the service can be evaluated by calling PageResponse on this Pager. -// If the result is false, the value of Err() will indicate if an error occurred. -// -// PageResponse returns the results from the page most recently fetched from the service. -// Example usage of this in combination with NextPage would look like the following: -// -// for pager.NextPage(ctx) { -// resp = pager.PageResponse() -// fmt.Printf("The page contains %i results.\n", len(resp.Value)) -// } -// err := pager.Err() -type ListEntitiesPager interface { - - // PageResponse returns the current TableQueryResponseResponse. - PageResponse() ListEntitiesPage - // NextPage returns true if there is another page of data available, false if not - NextPage(context.Context) bool - // Err returns an error if there was an error on the last request - Err() error -} - -type tableEntityQueryResponsePager struct { - tableClient *Client - current *ListEntitiesPage - tableQueryOptions *generated.TableQueryEntitiesOptions - listOptions *ListEntitiesOptions - err error -} - -// NextPage fetches the next available page of results from the service. -// If the fetched page contains results, the return value is true, else false. -// Results fetched from the service can be evaluated by calling PageResponse on this Pager. -func (p *tableEntityQueryResponsePager) NextPage(ctx context.Context) bool { - if p.err != nil || (p.current != nil && p.current.ContinuationNextPartitionKey == nil && p.current.ContinuationNextRowKey == nil) { - return false - } - var resp generated.TableQueryEntitiesResponse - resp, p.err = p.tableClient.client.QueryEntities(ctx, p.tableClient.name, p.tableQueryOptions, p.listOptions.toQueryOptions()) - - c, err := newListEntitiesPage(&resp) - if err != nil { - p.err = nil - } - - p.current = &c - p.tableQueryOptions.NextPartitionKey = resp.XMSContinuationNextPartitionKey - p.tableQueryOptions.NextRowKey = resp.XMSContinuationNextRowKey - return p.err == nil && len(resp.TableEntityQueryResponse.Value) > 0 -} - -// PageResponse returns the results from the page most recently fetched from the service. -// Example usage of this in combination with NextPage would look like the following: -// -// for pager.NextPage(ctx) { -// resp = pager.PageResponse() -// fmt.Printf("The page contains %i results.\n", len(resp.Value)) -// } -// err := pager.Err() -func (p *tableEntityQueryResponsePager) PageResponse() ListEntitiesPage { - return *p.current -} - -// Err returns an error value if the most recent call to NextPage was not successful, else nil. -func (p *tableEntityQueryResponsePager) Err() error { - return p.err -} - -// ListTablesPager is a Pager for Table List operations -// -// NextPage should be called first. It fetches the next available page of results from the service. -// If the fetched page contains results, the return value is true, else false. -// Results fetched from the service can be evaluated by calling PageResponse on this Pager. -// If the result is false, the value of Err() will indicate if an error occurred. -// -// PageResponse returns the results from the page most recently fetched from the service. -// Example usage of this in combination with NextPage would look like the following: -// -// for pager.NextPage(ctx) { -// resp = pager.PageResponse() -// fmt.Printf("The page contains %i results.\n", len(resp.Value)) -// } -// err := pager.Err() -type ListTablesPager interface { - // PageResponse returns the current TableQueryResponseResponse. - PageResponse() ListTablesPage - // NextPage returns true if there is another page of data available, false if not - NextPage(context.Context) bool - // Err returns an error if there was an error on the last request - Err() error -} - -type ListTablesPage struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response - - // ContinuationNextTableName contains the information returned from the x-ms-continuation-NextTableName header response. - ContinuationNextTableName *string - - // The metadata response of the table. - ODataMetadata *string `json:"odata.metadata,omitempty"` - - // List of tables. - Tables []*ResponseProperties `json:"value,omitempty"` -} - -func fromGeneratedTableQueryResponseEnvelope(g *generated.TableQueryResponseEnvelope) *ListTablesPage { - if g == nil { - return nil - } - - var value []*ResponseProperties - - for _, v := range g.Value { - value = append(value, fromGeneratedTableResponseProperties(v)) - } - - return &ListTablesPage{ - RawResponse: g.RawResponse, - ContinuationNextTableName: g.XMSContinuationNextTableName, - ODataMetadata: g.ODataMetadata, - Tables: value, - } -} - -type tableQueryResponsePager struct { - client *generated.TableClient - current *generated.TableQueryResponseEnvelope - tableQueryOptions *generated.TableQueryOptions - listOptions *ListTablesOptions - err error -} - -// NextPage fetches the next available page of results from the service. -// If the fetched page contains results, the return value is true, else false. -// Results fetched from the service can be evaulated by calling PageResponse on this Pager. -func (p *tableQueryResponsePager) NextPage(ctx context.Context) bool { - if p.err != nil || (p.current != nil && p.current.XMSContinuationNextTableName == nil) { - return false - } - var resp generated.TableQueryResponseEnvelope - resp, p.err = p.client.Query(ctx, p.tableQueryOptions, p.listOptions.toQueryOptions()) - p.current = &resp - p.tableQueryOptions.NextTableName = resp.XMSContinuationNextTableName - return p.err == nil && resp.TableQueryResponse.Value != nil && len(resp.TableQueryResponse.Value) > 0 -} - -// PageResponse returns the results from the page most recently fetched from the service. -// Example usage of this in combination with NextPage would look like the following: -// -// for pager.NextPage(ctx) { -// resp = pager.PageResponse() -// fmt.Printf("The page contains %i results.\n", len(resp.TableEntityQueryResponse.Value)) -// } -func (p *tableQueryResponsePager) PageResponse() ListTablesPage { - return *fromGeneratedTableQueryResponseEnvelope(p.current) -} - -// Err returns an error value if the most recent call to NextPage was not successful, else nil. -func (p *tableQueryResponsePager) Err() error { - return p.err -} diff --git a/sdk/tables/aztable/table_service_client.go b/sdk/tables/aztable/table_service_client.go deleted file mode 100644 index fc331e9a1925..000000000000 --- a/sdk/tables/aztable/table_service_client.go +++ /dev/null @@ -1,192 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package aztable - -import ( - "context" - "errors" - "strings" - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - generated "github.com/Azure/azure-sdk-for-go/sdk/tables/aztable/internal" -) - -const ( - legacyCosmosTableDomain = ".table.cosmosdb." - cosmosTableDomain = ".table.cosmos." -) - -// A ServiceClient represents a client to the table service. It can be used to query the available tables, add/remove tables, and various other service level operations. -type ServiceClient struct { - client *generated.TableClient - service *generated.ServiceClient - cred azcore.Credential -} - -// NewServiceClient creates a ServiceClient struct using the specified serviceURL, credential, and options. -func NewServiceClient(serviceURL string, cred azcore.Credential, options *ClientOptions) (*ServiceClient, error) { - if options == nil { - options = &ClientOptions{} - } - conOptions := options.getConnectionOptions() - if isCosmosEndpoint(serviceURL) { - conOptions.PerCallPolicies = append(conOptions.PerCallPolicies, cosmosPatchTransformPolicy{}) - } - conOptions.PerCallPolicies = append(conOptions.PerCallPolicies, options.PerCallOptions...) - con := generated.NewConnection(serviceURL, cred, conOptions) - return &ServiceClient{ - client: generated.NewTableClient(con), - service: generated.NewServiceClient(con), - cred: cred, - }, nil -} - -// NewClient returns a pointer to a Client affinitized to the specified table name and initialized with the same serviceURL and credentials as this ServiceClient -func (t *ServiceClient) NewClient(tableName string) *Client { - return &Client{ - client: t.client, - cred: t.cred, - name: tableName, - service: t, - } -} - -// Create creates a table with the specified name. -func (t *ServiceClient) CreateTable(ctx context.Context, name string, options *CreateTableOptions) (*Client, error) { - if options == nil { - options = &CreateTableOptions{} - } - _, err := t.client.Create(ctx, generated.TableProperties{TableName: &name}, options.toGenerated(), &generated.QueryOptions{}) - return t.NewClient(name), err -} - -// Delete deletes a table by name. -func (t *ServiceClient) DeleteTable(ctx context.Context, name string, options *DeleteTableOptions) (DeleteTableResponse, error) { - if options == nil { - options = &DeleteTableOptions{} - } - resp, err := t.client.Delete(ctx, name, options.toGenerated()) - return deleteTableResponseFromGen(&resp), err -} - -// List queries the existing tables using the specified ListTablesOptions. -// ListOptions can specify the following properties to affect the query results returned: -// -// Filter: An OData filter expression that limits results to those tables that satisfy the filter expression. -// For example, the following expression would return only tables with a TableName of 'foo': "TableName eq 'foo'" -// -// Top: The maximum number of tables that will be returned per page of results. -// Note: This value does not limit the total number of results if NextPage is called on the returned Pager until it returns false. -// -// List returns a Pager, which allows iteration through each page of results. Example: -// -// options := &ListTablesOptions{Filter: to.StringPtr("PartitionKey eq 'pk001'"), Top: to.Int32Ptr(25)} -// pager := client.List(options) // Pass in 'nil' if you want to return all Tables for an account. -// for pager.NextPage(ctx) { -// resp = pager.PageResponse() -// fmt.Printf("The page contains %i results.\n", len(resp.TableQueryResponse.Value)) -// } -// err := pager.Err() -func (t *ServiceClient) ListTables(listOptions *ListTablesOptions) ListTablesPager { - return &tableQueryResponsePager{ - client: t.client, - listOptions: listOptions, - tableQueryOptions: new(generated.TableQueryOptions), - } -} - -// GetStatistics retrieves all the statistics for an account with Geo-redundancy established. -// -// response, err := client.GetStatistics(context.Background, nil) -// handle(err) -// fmt.Println("Status: ", response.StorageServiceStats.GeoReplication.Status) -// fmt.Println(Last Sync Time: ", response.StorageServiceStats.GeoReplication.LastSyncTime) -func (t *ServiceClient) GetStatistics(ctx context.Context, options *GetStatisticsOptions) (GetStatisticsResponse, error) { - if options == nil { - options = &GetStatisticsOptions{} - } - resp, err := t.service.GetStatistics(ctx, options.toGenerated()) - return getStatisticsResponseFromGenerated(&resp), err -} - -// GetProperties retrieves the properties for an account including the metrics, logging, and cors rules established. -// -// response, err := client.GetProperties(context.Background, nil) -// handle(err) -// fmt.Println(resopnse.StorageServiceStats.Cors) -// fmt.Println(resopnse.StorageServiceStats.HourMetrics) -// fmt.Println(resopnse.StorageServiceStats.Logging) -// fmt.Println(resopnse.StorageServiceStats.MinuteMetrics) -func (t *ServiceClient) GetProperties(ctx context.Context, options *GetPropertiesOptions) (GetPropertiesResponse, error) { - if options == nil { - options = &GetPropertiesOptions{} - } - resp, err := t.service.GetProperties(ctx, options.toGenerated()) - return getPropertiesResponseFromGenerated(&resp), err -} - -// SetProperties allows the user to set cors , metrics, and logging rules for the account. -// -// Cors: A slice of CorsRules. -// -// HoursMetrics: A summary of request statistics grouped in hourly aggregatess for tables -// -// HoursMetrics: A summary of request statistics grouped in minute aggregates for tables -// -// Logging: Azure Analytics logging settings -// -// -// logging := Logging{ -// Read: to.BoolPtr(true), -// Write: to.BoolPtr(true), -// Delete: to.BoolPtr(true), -// Version: to.StringPtr("1.0"), -// RetentionPolicy: &RetentionPolicy{ -// Enabled: to.BoolPtr(true), -// Days: to.Int32Ptr(5), -// }, -// } -// props := TableServiceProperties{Logging: &logging} -// resp, err := context.client.SetProperties(ctx, props, nil) -// handle(err) -func (t *ServiceClient) SetProperties(ctx context.Context, properties ServiceProperties, options *SetPropertiesOptions) (SetPropertiesResponse, error) { - if options == nil { - options = &SetPropertiesOptions{} - } - resp, err := t.service.SetProperties(ctx, *properties.toGenerated(), options.toGenerated()) - return setPropertiesResponseFromGenerated(&resp), err -} - -// GetAccountSASToken is a convenience method for generating a SAS token for the currently pointed at account. This methods returns the full service URL and an error -// if there was an error during creation. This method can only be used if the supplied azcore.Credential during creation was a SharedKeyCredential. -func (t ServiceClient) GetAccountSASToken(resources AccountSASResourceTypes, permissions AccountSASPermissions, start time.Time, expiry time.Time) (string, error) { - cred, ok := t.cred.(*SharedKeyCredential) - if !ok { - return "", errors.New("credential is not a SharedKeyCredential. SAS can only be signed with a SharedKeyCredential") - } - qps, err := AccountSASSignatureValues{ - Version: SASVersion, - Protocol: SASProtocolHTTPS, - Permissions: permissions.String(), - Services: "t", - ResourceTypes: resources.String(), - StartTime: start.UTC(), - ExpiryTime: expiry.UTC(), - }.Sign(cred) - if err != nil { - return "", err - } - endpoint := t.client.Con.Endpoint() - if !strings.HasSuffix(endpoint, "/") { - endpoint += "/" - } - endpoint += "?" + qps.Encode() - return endpoint, nil -} - -func isCosmosEndpoint(url string) bool { - isCosmosEmulator := strings.Contains(url, "localhost") && strings.Contains(url, "8902") - return isCosmosEmulator || strings.Contains(url, cosmosTableDomain) || strings.Contains(url, legacyCosmosTableDomain) -} diff --git a/sdk/tables/aztable/table_batch_test.go b/sdk/tables/aztable/transaction_batch_test.go similarity index 99% rename from sdk/tables/aztable/table_batch_test.go rename to sdk/tables/aztable/transaction_batch_test.go index bfb5ac7293e3..6b6578b86627 100644 --- a/sdk/tables/aztable/table_batch_test.go +++ b/sdk/tables/aztable/transaction_batch_test.go @@ -189,7 +189,7 @@ func TestBatchError(t *testing.T) { // Sending an empty batch throws. _, err = client.submitTransactionInternal(ctx, &batch, u1, u2, nil) require.NotNil(t, err) - require.Equal(t, error_empty_transaction, err.Error()) + require.Equal(t, errEmptyTransaction.Error(), err.Error()) // Add the last entity to the table prior to adding it as part of the batch to cause a batch failure. marshalledFinalEntity, err := json.Marshal((*entitiesToCreate)[2]) diff --git a/sdk/tables/aztable/table_transactional_batch.go b/sdk/tables/aztable/transactional_batch.go similarity index 94% rename from sdk/tables/aztable/table_transactional_batch.go rename to sdk/tables/aztable/transactional_batch.go index c0851c940eb7..8554b9e01996 100644 --- a/sdk/tables/aztable/table_transactional_batch.go +++ b/sdk/tables/aztable/transactional_batch.go @@ -8,7 +8,6 @@ import ( "bytes" "context" "encoding/json" - "errors" "fmt" "io" "io/ioutil" @@ -21,11 +20,12 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "github.com/Azure/azure-sdk-for-go/sdk/azcore/streaming" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/internal/uuid" generated "github.com/Azure/azure-sdk-for-go/sdk/tables/aztable/internal" - "github.com/Azure/azure-sdk-for-go/sdk/to" ) +// TransactionType is the type for a specific transaction operation. type TransactionType string const ( @@ -37,17 +37,6 @@ const ( InsertReplace TransactionType = "insertreplace" ) -const ( - headerContentType = "Content-Type" - headerContentTransferEncoding = "Content-Transfer-Encoding" - error_empty_transaction = "transaction cannot be empty" -) - -// Use azcore.ResponseError type, pass RawResponse, might have to create manually depending on constructor -// Int statuscode, Return the inner status code -// ErrorCode string set equal to OdataErrorMessage ("DuplicateRowKey") -// Lang/Value are useless at runtime, failedentity index as well - type oDataErrorMessage struct { Lang string `json:"lang"` Value string `json:"value"` @@ -133,7 +122,7 @@ func (t *Client) SubmitTransaction(ctx context.Context, transactionActions []Tra // submitTransactionInternal is the internal implementation for SubmitTransaction. It allows for explicit configuration of the batch and changeset UUID values for testing. func (t *Client) submitTransactionInternal(ctx context.Context, transactionActions *[]TransactionAction, batchUuid uuid.UUID, changesetUuid uuid.UUID, tableSubmitTransactionOptions *SubmitTransactionOptions) (TransactionResponse, error) { if len(*transactionActions) == 0 { - return TransactionResponse{}, errors.New(error_empty_transaction) + return TransactionResponse{}, errEmptyTransaction } changesetBoundary := fmt.Sprintf("changeset_%s", changesetUuid.String()) changeSetBody, err := t.generateChangesetBody(changesetBoundary, transactionActions) @@ -375,7 +364,9 @@ func (t *Client) generateEntitySubset(transactionAction *TransactionAction, writ if err != nil { return err } - _, err = io.Copy(operationWriter, req.Body()) + if req.Raw().Body != nil { + _, err = io.Copy(operationWriter, req.Body()) + } return err } diff --git a/sdk/tables/aztable/zc_table_constants.go b/sdk/tables/aztable/zc_table_constants.go deleted file mode 100644 index 041646a757e7..000000000000 --- a/sdk/tables/aztable/zc_table_constants.go +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package aztable - -import "errors" - -const ( - timestamp = "Timestamp" - partitionKey = "PartitionKey" - rowKey = "RowKey" - etag = "ETag" -) - -var errPartitionKeyRowKeyError = errors.New("entity must have a PartitionKey and RowKey") -var errTooManyAccessPoliciesError = errors.New("you cannot set more than five (5) access policies at a time") From 94396e54ba3c91a5fdfc396d13f6f46ac05ab1fc Mon Sep 17 00:00:00 2001 From: Sean Kane <68240067+seankane-msft@users.noreply.github.com> Date: Thu, 2 Sep 2021 13:49:42 -0400 Subject: [PATCH 41/42] [Tables]Rename package (#15448) - [ ] The purpose of this PR is explained in this or a referenced issue. - [ ] The PR does not update generated files. - These files are managed by the codegen framework at [Azure/autorest.go][]. - [ ] Tests are included and/or updated for code changes. - [ ] Updates to [CHANGELOG.md][] are included. - [ ] MIT license headers are included in each file. [Azure/autorest.go]: https://github.com/Azure/autorest.go [CHANGELOG.md]: https://github.com/Azure/azure-sdk-for-go/blob/main/CHANGELOG.md --- eng/config.json | 4 ++-- sdk/{tables => data}/autorest.md | 2 +- sdk/data/aztables/CHANGELOG.md | 4 ++++ sdk/{tables/aztable => data/aztables}/LICENSE | 0 .../aztable => data/aztables}/README.md | 14 +++++------ .../aztables}/access_policy_test.go | 2 +- .../aztable => data/aztables}/client.go | 4 ++-- .../aztable => data/aztables}/client_test.go | 2 +- .../aztables}/connection_string.go | 2 +- .../aztables}/connection_string_test.go | 2 +- .../aztable => data/aztables}/constants.go | 2 +- .../cosmos_patch_transform_policy.go | 2 +- .../aztable => data/aztables}/entity.go | 2 +- .../aztable => data/aztables}/entity_test.go | 2 +- .../aztable => data/aztables}/errors.go | 2 +- sdk/{tables/aztable => data/aztables}/go.mod | 2 +- sdk/{tables/aztable => data/aztables}/go.sum | 0 .../aztables}/internal/connection.go | 0 .../aztables}/internal/constants.go | 2 +- .../aztables}/internal/models.go | 0 .../aztables}/internal/response_types.go | 0 .../aztables}/internal/service_client.go | 0 .../aztables}/internal/table_client.go | 0 .../aztables}/internal/time_rfc1123.go | 0 .../aztables}/internal/time_rfc3339.go | 0 .../aztable => data/aztables}/models.go | 4 ++-- .../aztable => data/aztables}/proxy_test.go | 18 ++++++++------ .../TestAddBasicEntity_cosmos.json | 0 .../TestAddBasicEntity_storage.json | 0 .../TestAddComplexEntity_cosmos.json | 6 ++--- .../TestAddComplexEntity_storage.json | 6 ++--- .../TestAddEntity/TestAddEntity_cosmos.json | 6 ++--- .../TestAddEntity/TestAddEntity_storage.json | 6 ++--- .../TestBatchAdd/TestBatchAdd_cosmos.json | 8 +++---- .../TestBatchAdd/TestBatchAdd_storage.json | 8 +++---- .../TestBatchComplex_cosmos.json | 14 +++++------ .../TestBatchComplex_storage.json | 14 +++++------ .../TestBatchError/TestBatchError_cosmos.json | 8 +++---- .../TestBatchError_storage.json | 8 +++---- .../TestBatchMixed/TestBatchMixed_cosmos.json | 12 +++++----- .../TestBatchMixed_storage.json | 12 +++++----- .../TestCreateTable_cosmos.json | 4 ++-- .../TestCreateTable_storage.json | 4 ++-- .../TestCreateTableFromService_cosmos.json | 4 ++-- .../TestCreateTableFromService_storage.json | 4 ++-- .../TestDeleteEntity_cosmos.json | 8 +++---- .../TestDeleteEntity_storage.json | 8 +++---- .../TestEdmMarshalling_cosmos.json | 0 .../TestEdmMarshalling_storage.json | 0 .../recordings/TestGetProperties.json | 2 +- .../TestInsertEntity_cosmos.json | 0 .../TestInsertEntity_storage.json | 0 .../TestInvalidEntity_cosmos.json | 6 ++--- .../TestInvalidEntity_storage.json | 6 ++--- .../TestListTables/TestListTables_cosmos.json | 24 +++++++++---------- .../TestListTables_storage.json | 24 +++++++++---------- .../TestMergeEntity_cosmos.json | 0 .../TestMergeEntity_storage.json | 0 .../TestQueryComplexEntity_cosmos.json | 0 .../TestQueryComplexEntity_storage.json | 0 .../TestQuerySimpleEntity_cosmos.json | 0 .../TestQuerySimpleEntity_storage.json | 0 .../TestQueryTable/TestQueryTable_cosmos.json | 0 .../TestQueryTable_storage.json | 0 .../recordings/TestRetentionTooLong.json | 2 +- .../TestServiceErrors_cosmos.json | 6 ++--- .../TestServiceErrors_storage.json | 6 ++--- ...TestServiceErrorsServiceClient_cosmos.json | 0 ...estServiceErrorsServiceClient_storage.json | 0 .../recordings/TestSetAccessPolicy.json | 6 ++--- .../aztables}/recordings/TestSetCors.json | 4 ++-- .../recordings/TestSetEmptyAccessPolicy.json | 6 ++--- .../recordings/TestSetHoursMetrics.json | 4 ++-- .../aztables}/recordings/TestSetLogging.json | 4 ++-- .../recordings/TestSetMinuteMetrics.json | 4 ++-- .../TestSetMultipleAccessPolicies.json | 8 +++---- .../recordings/TestSetNullAccessPolicy.json | 8 +++---- .../TestSetTooManyAccessPolicies.json | 6 ++--- .../recordings/TestSetTooManyCors.json | 2 +- .../aztable => data/aztables}/sas_account.go | 2 +- .../aztables}/sas_query_params.go | 2 +- .../aztable => data/aztables}/sas_service.go | 2 +- .../aztables}/service_client.go | 10 ++++---- .../aztables}/service_client_test.go | 2 +- .../aztables}/shared_access_signature_test.go | 2 +- .../shared_policy_shared_key_credential.go | 2 +- .../aztables}/transaction_batch_test.go | 2 +- .../aztables}/transactional_batch.go | 4 ++-- .../aztables}/zc_client_options.go | 4 ++-- .../aztables}/zt_table_recorded_tests.go | 2 +- sdk/{tables => data}/ci.yml | 6 ++--- sdk/{tables => data}/test-resources.json | 0 sdk/tables/aztable/CHANGELOG.md | 4 ---- 93 files changed, 194 insertions(+), 190 deletions(-) rename sdk/{tables => data}/autorest.md (97%) create mode 100644 sdk/data/aztables/CHANGELOG.md rename sdk/{tables/aztable => data/aztables}/LICENSE (100%) rename sdk/{tables/aztable => data/aztables}/README.md (94%) rename sdk/{tables/aztable => data/aztables}/access_policy_test.go (99%) rename sdk/{tables/aztable => data/aztables}/client.go (99%) rename sdk/{tables/aztable => data/aztables}/client_test.go (99%) rename sdk/{tables/aztable => data/aztables}/connection_string.go (99%) rename sdk/{tables/aztable => data/aztables}/connection_string_test.go (99%) rename sdk/{tables/aztable => data/aztables}/constants.go (98%) rename sdk/{tables/aztable => data/aztables}/cosmos_patch_transform_policy.go (97%) rename sdk/{tables/aztable => data/aztables}/entity.go (99%) rename sdk/{tables/aztable => data/aztables}/entity_test.go (99%) rename sdk/{tables/aztable => data/aztables}/errors.go (98%) rename sdk/{tables/aztable => data/aztables}/go.mod (85%) rename sdk/{tables/aztable => data/aztables}/go.sum (100%) rename sdk/{tables/aztable => data/aztables}/internal/connection.go (100%) rename sdk/{tables/aztable => data/aztables}/internal/constants.go (99%) rename sdk/{tables/aztable => data/aztables}/internal/models.go (100%) rename sdk/{tables/aztable => data/aztables}/internal/response_types.go (100%) rename sdk/{tables/aztable => data/aztables}/internal/service_client.go (100%) rename sdk/{tables/aztable => data/aztables}/internal/table_client.go (100%) rename sdk/{tables/aztable => data/aztables}/internal/time_rfc1123.go (100%) rename sdk/{tables/aztable => data/aztables}/internal/time_rfc3339.go (100%) rename sdk/{tables/aztable => data/aztables}/models.go (99%) rename sdk/{tables/aztable => data/aztables}/proxy_test.go (95%) rename sdk/{tables/aztable => data/aztables}/recordings/TestAddBasicEntity/TestAddBasicEntity_cosmos.json (100%) rename sdk/{tables/aztable => data/aztables}/recordings/TestAddBasicEntity/TestAddBasicEntity_storage.json (100%) rename sdk/{tables/aztable => data/aztables}/recordings/TestAddComplexEntity/TestAddComplexEntity_cosmos.json (92%) rename sdk/{tables/aztable => data/aztables}/recordings/TestAddComplexEntity/TestAddComplexEntity_storage.json (94%) rename sdk/{tables/aztable => data/aztables}/recordings/TestAddEntity/TestAddEntity_cosmos.json (89%) rename sdk/{tables/aztable => data/aztables}/recordings/TestAddEntity/TestAddEntity_storage.json (91%) rename sdk/{tables/aztable => data/aztables}/recordings/TestBatchAdd/TestBatchAdd_cosmos.json (97%) rename sdk/{tables/aztable => data/aztables}/recordings/TestBatchAdd/TestBatchAdd_storage.json (98%) rename sdk/{tables/aztable => data/aztables}/recordings/TestBatchComplex/TestBatchComplex_cosmos.json (96%) rename sdk/{tables/aztable => data/aztables}/recordings/TestBatchComplex/TestBatchComplex_storage.json (96%) rename sdk/{tables/aztable => data/aztables}/recordings/TestBatchError/TestBatchError_cosmos.json (94%) rename sdk/{tables/aztable => data/aztables}/recordings/TestBatchError/TestBatchError_storage.json (94%) rename sdk/{tables/aztable => data/aztables}/recordings/TestBatchMixed/TestBatchMixed_cosmos.json (96%) rename sdk/{tables/aztable => data/aztables}/recordings/TestBatchMixed/TestBatchMixed_storage.json (96%) rename sdk/{tables/aztable => data/aztables}/recordings/TestCreateTable/TestCreateTable_cosmos.json (88%) rename sdk/{tables/aztable => data/aztables}/recordings/TestCreateTable/TestCreateTable_storage.json (90%) rename sdk/{tables/aztable => data/aztables}/recordings/TestCreateTableFromService/TestCreateTableFromService_cosmos.json (88%) rename sdk/{tables/aztable => data/aztables}/recordings/TestCreateTableFromService/TestCreateTableFromService_storage.json (90%) rename sdk/{tables/aztable => data/aztables}/recordings/TestDeleteEntity/TestDeleteEntity_cosmos.json (88%) rename sdk/{tables/aztable => data/aztables}/recordings/TestDeleteEntity/TestDeleteEntity_storage.json (90%) rename sdk/{tables/aztable => data/aztables}/recordings/TestEdmMarshalling/TestEdmMarshalling_cosmos.json (100%) rename sdk/{tables/aztable => data/aztables}/recordings/TestEdmMarshalling/TestEdmMarshalling_storage.json (100%) rename sdk/{tables/aztable => data/aztables}/recordings/TestGetProperties.json (94%) rename sdk/{tables/aztable => data/aztables}/recordings/TestInsertEntity/TestInsertEntity_cosmos.json (100%) rename sdk/{tables/aztable => data/aztables}/recordings/TestInsertEntity/TestInsertEntity_storage.json (100%) rename sdk/{tables/aztable => data/aztables}/recordings/TestInvalidEntity/TestInvalidEntity_cosmos.json (89%) rename sdk/{tables/aztable => data/aztables}/recordings/TestInvalidEntity/TestInvalidEntity_storage.json (91%) rename sdk/{tables/aztable => data/aztables}/recordings/TestListTables/TestListTables_cosmos.json (88%) rename sdk/{tables/aztable => data/aztables}/recordings/TestListTables/TestListTables_storage.json (90%) rename sdk/{tables/aztable => data/aztables}/recordings/TestMergeEntity/TestMergeEntity_cosmos.json (100%) rename sdk/{tables/aztable => data/aztables}/recordings/TestMergeEntity/TestMergeEntity_storage.json (100%) rename sdk/{tables/aztable => data/aztables}/recordings/TestQueryComplexEntity/TestQueryComplexEntity_cosmos.json (100%) rename sdk/{tables/aztable => data/aztables}/recordings/TestQueryComplexEntity/TestQueryComplexEntity_storage.json (100%) rename sdk/{tables/aztable => data/aztables}/recordings/TestQuerySimpleEntity/TestQuerySimpleEntity_cosmos.json (100%) rename sdk/{tables/aztable => data/aztables}/recordings/TestQuerySimpleEntity/TestQuerySimpleEntity_storage.json (100%) rename sdk/{tables/aztable => data/aztables}/recordings/TestQueryTable/TestQueryTable_cosmos.json (100%) rename sdk/{tables/aztable => data/aztables}/recordings/TestQueryTable/TestQueryTable_storage.json (100%) rename sdk/{tables/aztable => data/aztables}/recordings/TestRetentionTooLong.json (93%) rename sdk/{tables/aztable => data/aztables}/recordings/TestServiceErrors/TestServiceErrors_cosmos.json (89%) rename sdk/{tables/aztable => data/aztables}/recordings/TestServiceErrors/TestServiceErrors_storage.json (90%) rename sdk/{tables/aztable => data/aztables}/recordings/TestServiceErrorsServiceClient/TestServiceErrorsServiceClient_cosmos.json (100%) rename sdk/{tables/aztable => data/aztables}/recordings/TestServiceErrorsServiceClient/TestServiceErrorsServiceClient_storage.json (100%) rename sdk/{tables/aztable => data/aztables}/recordings/TestSetAccessPolicy.json (90%) rename sdk/{tables/aztable => data/aztables}/recordings/TestSetCors.json (93%) rename sdk/{tables/aztable => data/aztables}/recordings/TestSetEmptyAccessPolicy.json (89%) rename sdk/{tables/aztable => data/aztables}/recordings/TestSetHoursMetrics.json (93%) rename sdk/{tables/aztable => data/aztables}/recordings/TestSetLogging.json (93%) rename sdk/{tables/aztable => data/aztables}/recordings/TestSetMinuteMetrics.json (93%) rename sdk/{tables/aztable => data/aztables}/recordings/TestSetMultipleAccessPolicies.json (91%) rename sdk/{tables/aztable => data/aztables}/recordings/TestSetNullAccessPolicy.json (89%) rename sdk/{tables/aztable => data/aztables}/recordings/TestSetTooManyAccessPolicies.json (93%) rename sdk/{tables/aztable => data/aztables}/recordings/TestSetTooManyCors.json (96%) rename sdk/{tables/aztable => data/aztables}/sas_account.go (99%) rename sdk/{tables/aztable => data/aztables}/sas_query_params.go (99%) rename sdk/{tables/aztable => data/aztables}/sas_service.go (99%) rename sdk/{tables/aztable => data/aztables}/service_client.go (98%) rename sdk/{tables/aztable => data/aztables}/service_client_test.go (99%) rename sdk/{tables/aztable => data/aztables}/shared_access_signature_test.go (99%) rename sdk/{tables/aztable => data/aztables}/shared_policy_shared_key_credential.go (99%) rename sdk/{tables/aztable => data/aztables}/transaction_batch_test.go (99%) rename sdk/{tables/aztable => data/aztables}/transactional_batch.go (99%) rename sdk/{tables/aztable => data/aztables}/zc_client_options.go (90%) rename sdk/{tables/aztable => data/aztables}/zt_table_recorded_tests.go (99%) rename sdk/{tables => data}/ci.yml (79%) rename sdk/{tables => data}/test-resources.json (100%) delete mode 100644 sdk/tables/aztable/CHANGELOG.md diff --git a/eng/config.json b/eng/config.json index c06a0ba0ca4d..60ec513a8040 100644 --- a/eng/config.json +++ b/eng/config.json @@ -13,8 +13,8 @@ "CoverageGoal": 0.70 }, { - "Name": "tables", - "CoverageGoal": 0.01 + "Name": "data", + "CoverageGoal": 0.40 } ] } diff --git a/sdk/tables/autorest.md b/sdk/data/autorest.md similarity index 97% rename from sdk/tables/autorest.md rename to sdk/data/autorest.md index fac56c9df21c..8660db4aa221 100644 --- a/sdk/tables/autorest.md +++ b/sdk/data/autorest.md @@ -11,7 +11,7 @@ version: "^3.0.0" input-file: https://github.com/Azure/azure-rest-api-specs/blob/d744b6bcb95ab4034832ded556dbbe58f4287c5b/specification/cosmos-db/data-plane/Microsoft.Tables/preview/2019-02-02/table.json license-header: MICROSOFT_MIT_NO_VERSION clear-output-folder: false -output-folder: aztable/internal +output-folder: aztables/internal tag: package-2019-02 credential-scope: none use: "@autorest/go@4.0.0-preview.27" diff --git a/sdk/data/aztables/CHANGELOG.md b/sdk/data/aztables/CHANGELOG.md new file mode 100644 index 000000000000..74878a6e450d --- /dev/null +++ b/sdk/data/aztables/CHANGELOG.md @@ -0,0 +1,4 @@ +# Release History + +## v0.1.0 (09-07-2021) +* This is the initial release of the `aztables` library diff --git a/sdk/tables/aztable/LICENSE b/sdk/data/aztables/LICENSE similarity index 100% rename from sdk/tables/aztable/LICENSE rename to sdk/data/aztables/LICENSE diff --git a/sdk/tables/aztable/README.md b/sdk/data/aztables/README.md similarity index 94% rename from sdk/tables/aztable/README.md rename to sdk/data/aztables/README.md index 68e18a8eadd5..3083df0f1836 100644 --- a/sdk/tables/aztable/README.md +++ b/sdk/data/aztables/README.md @@ -1,7 +1,7 @@ # Azure Tables client library for Go -Azure Table storage is a service that stores large amounts of structured NoSQL data in the cloud, providing -a key/attribute store with a schema-less design. +Azure Table storage is a service that stores large amounts of structured NoSQL data in the cloud, providing +a key/attribute store with a schema-less design. Azure Cosmos DB provides a Table API for applications that are written for Azure Table storage that need premium capabilities like: @@ -26,13 +26,13 @@ If you need to create either of these, you can use the [Azure CLI][azure_cli]. #### Creating a storage account -Create a storage account `mystorageaccount` in resource group `MyResourceGroup` +Create a storage account `mystorageaccount` in resource group `MyResourceGroup` in the subscription `MySubscription` in the West US region. #### Creating a Cosmos DB -Create a Cosmos DB account `MyCosmosDBDatabaseAccount` in resource group `MyResourceGroup` +Create a Cosmos DB account `MyCosmosDBDatabaseAccount` in resource group `MyResourceGroup` in the subscription `MySubscription` and a table named `MyTableName` in the account. @@ -96,7 +96,7 @@ If we no longer need our new table entity, it can be deleted. ## Troubleshooting -When you interact with the Azure table library using the .NET SDK, errors returned by the service correspond to the same HTTP +When you interact with the Azure table library using the .NET SDK, errors returned by the service correspond to the same HTTP status codes returned for [REST API][tables_rest] requests. For example, if you try to create a table that already exists, a `409` error is returned, indicating "Conflict". @@ -126,14 +126,14 @@ the right to, and actually do, grant us the rights to use your contribution. For details, visit [cla.microsoft.com][cla]. This project has adopted the [Microsoft Open Source Code of Conduct][coc]. -For more information see the [Code of Conduct FAQ][coc_faq] or contact +For more information see the [Code of Conduct FAQ][coc_faq] or contact [opencode@microsoft.com][coc_contact] with any additional questions or comments. ## Generating the client From the tables dir: -autorest --use=@autorest/go@4.0.0-preview.20 https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/cosmos-db/data-plane/readme.md --tag=package-2019-02 --file-prefix="zz_generated_" --modelerfour.lenient-model-deduplication --license-header=MICROSOFT_MIT_NO_VERSION --output-folder=aztable --module=aztable --openapi-type="data-plane" --credential-scope=none +autorest --use=@autorest/go@4.0.0-preview.20 https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/cosmos-db/data-plane/readme.md --tag=package-2019-02 --file-prefix="zz_generated_" --modelerfour.lenient-model-deduplication --license-header=MICROSOFT_MIT_NO_VERSION --output-folder=aztables --module=aztables --openapi-type="data-plane" --credential-scope=none [tables_rest]: https://docs.microsoft.com/rest/api/storageservices/table-service-rest-api diff --git a/sdk/tables/aztable/access_policy_test.go b/sdk/data/aztables/access_policy_test.go similarity index 99% rename from sdk/tables/aztable/access_policy_test.go rename to sdk/data/aztables/access_policy_test.go index c79d1daac25d..b39ec23c7050 100644 --- a/sdk/tables/aztable/access_policy_test.go +++ b/sdk/data/aztables/access_policy_test.go @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package aztable +package aztables import ( "strconv" diff --git a/sdk/tables/aztable/client.go b/sdk/data/aztables/client.go similarity index 99% rename from sdk/tables/aztable/client.go rename to sdk/data/aztables/client.go index 265ae7911b0c..013dbe3d3ca9 100644 --- a/sdk/tables/aztable/client.go +++ b/sdk/data/aztables/client.go @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package aztable +package aztables import ( "context" @@ -14,7 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - generated "github.com/Azure/azure-sdk-for-go/sdk/tables/aztable/internal" + generated "github.com/Azure/azure-sdk-for-go/sdk/data/aztables/internal" ) // A Client represents a client to the tables service affinitized to a specific table. diff --git a/sdk/tables/aztable/client_test.go b/sdk/data/aztables/client_test.go similarity index 99% rename from sdk/tables/aztable/client_test.go rename to sdk/data/aztables/client_test.go index 60cf73136a9e..536eeedb71a6 100644 --- a/sdk/tables/aztable/client_test.go +++ b/sdk/data/aztables/client_test.go @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package aztable +package aztables import ( "context" diff --git a/sdk/tables/aztable/connection_string.go b/sdk/data/aztables/connection_string.go similarity index 99% rename from sdk/tables/aztable/connection_string.go rename to sdk/data/aztables/connection_string.go index 7aece4449794..cc5ccfca2320 100644 --- a/sdk/tables/aztable/connection_string.go +++ b/sdk/data/aztables/connection_string.go @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package aztable +package aztables import ( "fmt" diff --git a/sdk/tables/aztable/connection_string_test.go b/sdk/data/aztables/connection_string_test.go similarity index 99% rename from sdk/tables/aztable/connection_string_test.go rename to sdk/data/aztables/connection_string_test.go index 693c7d150045..714c0837f695 100644 --- a/sdk/tables/aztable/connection_string_test.go +++ b/sdk/data/aztables/connection_string_test.go @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package aztable +package aztables import ( "encoding/base64" diff --git a/sdk/tables/aztable/constants.go b/sdk/data/aztables/constants.go similarity index 98% rename from sdk/tables/aztable/constants.go rename to sdk/data/aztables/constants.go index abd6909ca4cc..02cfd66470bc 100644 --- a/sdk/tables/aztable/constants.go +++ b/sdk/data/aztables/constants.go @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package aztable +package aztables const ( headerXmsDate = "x-ms-date" diff --git a/sdk/tables/aztable/cosmos_patch_transform_policy.go b/sdk/data/aztables/cosmos_patch_transform_policy.go similarity index 97% rename from sdk/tables/aztable/cosmos_patch_transform_policy.go rename to sdk/data/aztables/cosmos_patch_transform_policy.go index 13279e86107b..bf2e16ee7e3c 100644 --- a/sdk/tables/aztable/cosmos_patch_transform_policy.go +++ b/sdk/data/aztables/cosmos_patch_transform_policy.go @@ -4,7 +4,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package aztable +package aztables import ( "net/http" diff --git a/sdk/tables/aztable/entity.go b/sdk/data/aztables/entity.go similarity index 99% rename from sdk/tables/aztable/entity.go rename to sdk/data/aztables/entity.go index 365d29faec05..14234f43f0ee 100644 --- a/sdk/tables/aztable/entity.go +++ b/sdk/data/aztables/entity.go @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package aztable +package aztables import ( "encoding/base64" diff --git a/sdk/tables/aztable/entity_test.go b/sdk/data/aztables/entity_test.go similarity index 99% rename from sdk/tables/aztable/entity_test.go rename to sdk/data/aztables/entity_test.go index 1f8880d4640c..1690a29c40aa 100644 --- a/sdk/tables/aztable/entity_test.go +++ b/sdk/data/aztables/entity_test.go @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package aztable +package aztables import ( "encoding/json" diff --git a/sdk/tables/aztable/errors.go b/sdk/data/aztables/errors.go similarity index 98% rename from sdk/tables/aztable/errors.go rename to sdk/data/aztables/errors.go index 1a83d35338fb..c90ace6ebe4b 100644 --- a/sdk/tables/aztable/errors.go +++ b/sdk/data/aztables/errors.go @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package aztable +package aztables import "errors" diff --git a/sdk/tables/aztable/go.mod b/sdk/data/aztables/go.mod similarity index 85% rename from sdk/tables/aztable/go.mod rename to sdk/data/aztables/go.mod index b0ee750cfaf5..fe4ab8d9fbb2 100644 --- a/sdk/tables/aztable/go.mod +++ b/sdk/data/aztables/go.mod @@ -1,4 +1,4 @@ -module github.com/Azure/azure-sdk-for-go/sdk/tables/aztable +module github.com/Azure/azure-sdk-for-go/sdk/data/aztables go 1.16 diff --git a/sdk/tables/aztable/go.sum b/sdk/data/aztables/go.sum similarity index 100% rename from sdk/tables/aztable/go.sum rename to sdk/data/aztables/go.sum diff --git a/sdk/tables/aztable/internal/connection.go b/sdk/data/aztables/internal/connection.go similarity index 100% rename from sdk/tables/aztable/internal/connection.go rename to sdk/data/aztables/internal/connection.go diff --git a/sdk/tables/aztable/internal/constants.go b/sdk/data/aztables/internal/constants.go similarity index 99% rename from sdk/tables/aztable/internal/constants.go rename to sdk/data/aztables/internal/constants.go index 505a4a5bca68..74f21f434f40 100644 --- a/sdk/tables/aztable/internal/constants.go +++ b/sdk/data/aztables/internal/constants.go @@ -9,7 +9,7 @@ package internal const ( - module = "aztable" + module = "aztables" version = "v0.1.0" ) diff --git a/sdk/tables/aztable/internal/models.go b/sdk/data/aztables/internal/models.go similarity index 100% rename from sdk/tables/aztable/internal/models.go rename to sdk/data/aztables/internal/models.go diff --git a/sdk/tables/aztable/internal/response_types.go b/sdk/data/aztables/internal/response_types.go similarity index 100% rename from sdk/tables/aztable/internal/response_types.go rename to sdk/data/aztables/internal/response_types.go diff --git a/sdk/tables/aztable/internal/service_client.go b/sdk/data/aztables/internal/service_client.go similarity index 100% rename from sdk/tables/aztable/internal/service_client.go rename to sdk/data/aztables/internal/service_client.go diff --git a/sdk/tables/aztable/internal/table_client.go b/sdk/data/aztables/internal/table_client.go similarity index 100% rename from sdk/tables/aztable/internal/table_client.go rename to sdk/data/aztables/internal/table_client.go diff --git a/sdk/tables/aztable/internal/time_rfc1123.go b/sdk/data/aztables/internal/time_rfc1123.go similarity index 100% rename from sdk/tables/aztable/internal/time_rfc1123.go rename to sdk/data/aztables/internal/time_rfc1123.go diff --git a/sdk/tables/aztable/internal/time_rfc3339.go b/sdk/data/aztables/internal/time_rfc3339.go similarity index 100% rename from sdk/tables/aztable/internal/time_rfc3339.go rename to sdk/data/aztables/internal/time_rfc3339.go diff --git a/sdk/tables/aztable/models.go b/sdk/data/aztables/models.go similarity index 99% rename from sdk/tables/aztable/models.go rename to sdk/data/aztables/models.go index c1fbee82126d..db5cb374afb4 100644 --- a/sdk/tables/aztable/models.go +++ b/sdk/data/aztables/models.go @@ -1,12 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package aztable +package aztables import ( "time" - generated "github.com/Azure/azure-sdk-for-go/sdk/tables/aztable/internal" + generated "github.com/Azure/azure-sdk-for-go/sdk/data/aztables/internal" ) // CorsRule - CORS is an HTTP feature that enables a web application running under one domain to access resources in another domain. Web browsers implement diff --git a/sdk/tables/aztable/proxy_test.go b/sdk/data/aztables/proxy_test.go similarity index 95% rename from sdk/tables/aztable/proxy_test.go rename to sdk/data/aztables/proxy_test.go index 83e47e2a837f..b050781be7d2 100644 --- a/sdk/tables/aztable/proxy_test.go +++ b/sdk/data/aztables/proxy_test.go @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package aztable +package aztables import ( "context" @@ -19,7 +19,7 @@ import ( "github.com/stretchr/testify/require" ) -var pathToPackage = "sdk/tables/aztable" +var pathToPackage = "sdk/data/aztables" type recordingPolicy struct { options recording.RecordingOptions @@ -153,7 +153,7 @@ func initServiceTest(t *testing.T, service string) (*ServiceClient, func()) { } } -func getAADCredential(t *testing.T) (azcore.Credential, error) { +func getAADCredential(t *testing.T) (azcore.Credential, error) { //nolint if recording.InPlayback() { return NewFakeCredential("fakestorageaccount", "fakeAccountKey"), nil } @@ -222,14 +222,18 @@ func createCosmosClient(t *testing.T) (*Client, error) { func createStorageServiceClient(t *testing.T) (*ServiceClient, error) { var cred azcore.Credential + var err error accountName := recording.GetEnvVariable(t, "TABLES_STORAGE_ACCOUNT_NAME", "fakestorageaccount") + accountKey := recording.GetEnvVariable(t, "TABLES_PRIMARY_STORAGE_ACCOUNT_KEY", "fakestorageaccountkey") + if recording.InPlayback() { - accountName = "fakestorageaccount" + cred, err = getSharedKeyCredential(t) + require.NoError(t, err) + } else { + cred, err = NewSharedKeyCredential(accountName, accountKey) + require.NoError(t, err) } - cred, err := getAADCredential(t) - require.NoError(t, err) - serviceURL := storageURI(accountName, "core.windows.net") return createServiceClientForRecording(t, serviceURL, cred) diff --git a/sdk/tables/aztable/recordings/TestAddBasicEntity/TestAddBasicEntity_cosmos.json b/sdk/data/aztables/recordings/TestAddBasicEntity/TestAddBasicEntity_cosmos.json similarity index 100% rename from sdk/tables/aztable/recordings/TestAddBasicEntity/TestAddBasicEntity_cosmos.json rename to sdk/data/aztables/recordings/TestAddBasicEntity/TestAddBasicEntity_cosmos.json diff --git a/sdk/tables/aztable/recordings/TestAddBasicEntity/TestAddBasicEntity_storage.json b/sdk/data/aztables/recordings/TestAddBasicEntity/TestAddBasicEntity_storage.json similarity index 100% rename from sdk/tables/aztable/recordings/TestAddBasicEntity/TestAddBasicEntity_storage.json rename to sdk/data/aztables/recordings/TestAddBasicEntity/TestAddBasicEntity_storage.json diff --git a/sdk/tables/aztable/recordings/TestAddComplexEntity/TestAddComplexEntity_cosmos.json b/sdk/data/aztables/recordings/TestAddComplexEntity/TestAddComplexEntity_cosmos.json similarity index 92% rename from sdk/tables/aztable/recordings/TestAddComplexEntity/TestAddComplexEntity_cosmos.json rename to sdk/data/aztables/recordings/TestAddComplexEntity/TestAddComplexEntity_cosmos.json index 1673f5a6a837..93557e9ce16f 100644 --- a/sdk/tables/aztable/recordings/TestAddComplexEntity/TestAddComplexEntity_cosmos.json +++ b/sdk/data/aztables/recordings/TestAddComplexEntity/TestAddComplexEntity_cosmos.json @@ -14,7 +14,7 @@ "Content-Length": "35", "Content-Type": "application/json", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/v0.1.0 azsdk-go-azcore/v0.19.0 (go1.17; Windows_NT)", + "User-Agent": "azsdk-go-aztables/v0.1.0 azsdk-go-azcore/v0.19.0 (go1.17; Windows_NT)", "x-ms-date": "Wed, 01 Sep 2021 18:15:06 GMT", "x-ms-version": "2019-02-02" }, @@ -50,7 +50,7 @@ "Content-Type": "application/json", "dataserviceversion": "3.0", "prefer": "return-no-content", - "User-Agent": "azsdk-go-aztable/v0.1.0 azsdk-go-azcore/v0.19.0 (go1.17; Windows_NT)", + "User-Agent": "azsdk-go-aztables/v0.1.0 azsdk-go-azcore/v0.19.0 (go1.17; Windows_NT)", "x-ms-date": "Wed, 01 Sep 2021 18:15:07 GMT", "x-ms-version": "2019-02-02" }, @@ -86,7 +86,7 @@ "Accept": "application/json", "Accept-Encoding": "gzip", "Authorization": "Sanitized", - "User-Agent": "azsdk-go-aztable/v0.1.0 azsdk-go-azcore/v0.19.0 (go1.17; Windows_NT)", + "User-Agent": "azsdk-go-aztables/v0.1.0 azsdk-go-azcore/v0.19.0 (go1.17; Windows_NT)", "x-ms-date": "Wed, 01 Sep 2021 18:15:07 GMT", "x-ms-version": "2019-02-02" }, diff --git a/sdk/tables/aztable/recordings/TestAddComplexEntity/TestAddComplexEntity_storage.json b/sdk/data/aztables/recordings/TestAddComplexEntity/TestAddComplexEntity_storage.json similarity index 94% rename from sdk/tables/aztable/recordings/TestAddComplexEntity/TestAddComplexEntity_storage.json rename to sdk/data/aztables/recordings/TestAddComplexEntity/TestAddComplexEntity_storage.json index 72daa1157fab..e485b19fc709 100644 --- a/sdk/tables/aztable/recordings/TestAddComplexEntity/TestAddComplexEntity_storage.json +++ b/sdk/data/aztables/recordings/TestAddComplexEntity/TestAddComplexEntity_storage.json @@ -14,7 +14,7 @@ "Content-Length": "35", "Content-Type": "application/json", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/v0.1.0 azsdk-go-azcore/v0.19.0 (go1.17; Windows_NT)", + "User-Agent": "azsdk-go-aztables/v0.1.0 azsdk-go-azcore/v0.19.0 (go1.17; Windows_NT)", "x-ms-date": "Wed, 01 Sep 2021 18:15:05 GMT", "x-ms-version": "2019-02-02" }, @@ -56,7 +56,7 @@ "Content-Type": "application/json", "dataserviceversion": "3.0", "prefer": "return-no-content", - "User-Agent": "azsdk-go-aztable/v0.1.0 azsdk-go-azcore/v0.19.0 (go1.17; Windows_NT)", + "User-Agent": "azsdk-go-aztables/v0.1.0 azsdk-go-azcore/v0.19.0 (go1.17; Windows_NT)", "x-ms-date": "Wed, 01 Sep 2021 18:15:05 GMT", "x-ms-version": "2019-02-02" }, @@ -101,7 +101,7 @@ "Accept": "application/json", "Accept-Encoding": "gzip", "Authorization": "Sanitized", - "User-Agent": "azsdk-go-aztable/v0.1.0 azsdk-go-azcore/v0.19.0 (go1.17; Windows_NT)", + "User-Agent": "azsdk-go-aztables/v0.1.0 azsdk-go-azcore/v0.19.0 (go1.17; Windows_NT)", "x-ms-date": "Wed, 01 Sep 2021 18:15:06 GMT", "x-ms-version": "2019-02-02" }, diff --git a/sdk/tables/aztable/recordings/TestAddEntity/TestAddEntity_cosmos.json b/sdk/data/aztables/recordings/TestAddEntity/TestAddEntity_cosmos.json similarity index 89% rename from sdk/tables/aztable/recordings/TestAddEntity/TestAddEntity_cosmos.json rename to sdk/data/aztables/recordings/TestAddEntity/TestAddEntity_cosmos.json index 27f612fa115f..1ef4082dc34a 100644 --- a/sdk/tables/aztable/recordings/TestAddEntity/TestAddEntity_cosmos.json +++ b/sdk/data/aztables/recordings/TestAddEntity/TestAddEntity_cosmos.json @@ -14,7 +14,7 @@ "Content-Length": "35", "Content-Type": "application/json", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:49 GMT", "x-ms-version": "2019-02-02" }, @@ -50,7 +50,7 @@ "Content-Type": "application/json", "dataserviceversion": "3.0", "prefer": "return-no-content", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:49 GMT", "x-ms-version": "2019-02-02" }, @@ -83,7 +83,7 @@ "Accept": "application/json", "Accept-Encoding": "gzip", "Authorization": "Sanitized", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:50 GMT", "x-ms-version": "2019-02-02" }, diff --git a/sdk/tables/aztable/recordings/TestAddEntity/TestAddEntity_storage.json b/sdk/data/aztables/recordings/TestAddEntity/TestAddEntity_storage.json similarity index 91% rename from sdk/tables/aztable/recordings/TestAddEntity/TestAddEntity_storage.json rename to sdk/data/aztables/recordings/TestAddEntity/TestAddEntity_storage.json index 6c3e3ef1d78e..6cd1ad836088 100644 --- a/sdk/tables/aztable/recordings/TestAddEntity/TestAddEntity_storage.json +++ b/sdk/data/aztables/recordings/TestAddEntity/TestAddEntity_storage.json @@ -14,7 +14,7 @@ "Content-Length": "34", "Content-Type": "application/json", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:48 GMT", "x-ms-version": "2019-02-02" }, @@ -56,7 +56,7 @@ "Content-Type": "application/json", "dataserviceversion": "3.0", "prefer": "return-no-content", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:48 GMT", "x-ms-version": "2019-02-02" }, @@ -98,7 +98,7 @@ "Accept": "application/json", "Accept-Encoding": "gzip", "Authorization": "Sanitized", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:49 GMT", "x-ms-version": "2019-02-02" }, diff --git a/sdk/tables/aztable/recordings/TestBatchAdd/TestBatchAdd_cosmos.json b/sdk/data/aztables/recordings/TestBatchAdd/TestBatchAdd_cosmos.json similarity index 97% rename from sdk/tables/aztable/recordings/TestBatchAdd/TestBatchAdd_cosmos.json rename to sdk/data/aztables/recordings/TestBatchAdd/TestBatchAdd_cosmos.json index 09b8d40f0155..ccbfbefc3379 100644 --- a/sdk/tables/aztable/recordings/TestBatchAdd/TestBatchAdd_cosmos.json +++ b/sdk/data/aztables/recordings/TestBatchAdd/TestBatchAdd_cosmos.json @@ -14,7 +14,7 @@ "Content-Length": "33", "Content-Type": "application/json", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:36 GMT", "x-ms-version": "2019-02-02" }, @@ -49,7 +49,7 @@ "Content-Length": "6520", "Content-Type": "multipart/mixed; boundary=batch_fde37ee2-2934-4e48-71f5-cdf1e920ee66", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:36 GMT", "x-ms-version": "2019-02-02" }, @@ -75,7 +75,7 @@ "Accept-Encoding": "gzip", "Authorization": "Sanitized", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:37 GMT", "x-ms-version": "2019-02-02" }, @@ -224,7 +224,7 @@ "Accept": "application/json", "Accept-Encoding": "gzip", "Authorization": "Sanitized", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:37 GMT", "x-ms-version": "2019-02-02" }, diff --git a/sdk/tables/aztable/recordings/TestBatchAdd/TestBatchAdd_storage.json b/sdk/data/aztables/recordings/TestBatchAdd/TestBatchAdd_storage.json similarity index 98% rename from sdk/tables/aztable/recordings/TestBatchAdd/TestBatchAdd_storage.json rename to sdk/data/aztables/recordings/TestBatchAdd/TestBatchAdd_storage.json index 23df621fed6b..6e9d637d12f6 100644 --- a/sdk/tables/aztable/recordings/TestBatchAdd/TestBatchAdd_storage.json +++ b/sdk/data/aztables/recordings/TestBatchAdd/TestBatchAdd_storage.json @@ -14,7 +14,7 @@ "Content-Length": "34", "Content-Type": "application/json", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:35 GMT", "x-ms-version": "2019-02-02" }, @@ -55,7 +55,7 @@ "Content-Length": "6530", "Content-Type": "multipart/mixed; boundary=batch_5c9213ba-0b13-4698-59cb-5dc0bdb24c9e", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:35 GMT", "x-ms-version": "2019-02-02" }, @@ -88,7 +88,7 @@ "Accept-Encoding": "gzip", "Authorization": "Sanitized", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:35 GMT", "x-ms-version": "2019-02-02" }, @@ -245,7 +245,7 @@ "Accept": "application/json", "Accept-Encoding": "gzip", "Authorization": "Sanitized", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:35 GMT", "x-ms-version": "2019-02-02" }, diff --git a/sdk/tables/aztable/recordings/TestBatchComplex/TestBatchComplex_cosmos.json b/sdk/data/aztables/recordings/TestBatchComplex/TestBatchComplex_cosmos.json similarity index 96% rename from sdk/tables/aztable/recordings/TestBatchComplex/TestBatchComplex_cosmos.json rename to sdk/data/aztables/recordings/TestBatchComplex/TestBatchComplex_cosmos.json index bb5f731f75fb..2c35081d7c62 100644 --- a/sdk/tables/aztable/recordings/TestBatchComplex/TestBatchComplex_cosmos.json +++ b/sdk/data/aztables/recordings/TestBatchComplex/TestBatchComplex_cosmos.json @@ -14,7 +14,7 @@ "Content-Length": "35", "Content-Type": "application/json", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:43 GMT", "x-ms-version": "2019-02-02" }, @@ -49,7 +49,7 @@ "Content-Length": "4253", "Content-Type": "multipart/mixed; boundary=batch_bc1877b8-a42d-42f7-69a7-42f6f586389e", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:44 GMT", "x-ms-version": "2019-02-02" }, @@ -77,7 +77,7 @@ "Content-Length": "2261", "Content-Type": "multipart/mixed; boundary=batch_8c9f1c57-354b-4894-53b2-afe5e16b1a9a", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:44 GMT", "x-ms-version": "2019-02-02" }, @@ -103,7 +103,7 @@ "Accept-Encoding": "gzip", "Authorization": "Sanitized", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:44 GMT", "x-ms-version": "2019-02-02" }, @@ -148,7 +148,7 @@ "Accept-Encoding": "gzip", "Authorization": "Sanitized", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:45 GMT", "x-ms-version": "2019-02-02" }, @@ -193,7 +193,7 @@ "Accept-Encoding": "gzip", "Authorization": "Sanitized", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:45 GMT", "x-ms-version": "2019-02-02" }, @@ -220,7 +220,7 @@ "Accept": "application/json", "Accept-Encoding": "gzip", "Authorization": "Sanitized", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:45 GMT", "x-ms-version": "2019-02-02" }, diff --git a/sdk/tables/aztable/recordings/TestBatchComplex/TestBatchComplex_storage.json b/sdk/data/aztables/recordings/TestBatchComplex/TestBatchComplex_storage.json similarity index 96% rename from sdk/tables/aztable/recordings/TestBatchComplex/TestBatchComplex_storage.json rename to sdk/data/aztables/recordings/TestBatchComplex/TestBatchComplex_storage.json index 8c32cf8ca5da..0dfd367d41e8 100644 --- a/sdk/tables/aztable/recordings/TestBatchComplex/TestBatchComplex_storage.json +++ b/sdk/data/aztables/recordings/TestBatchComplex/TestBatchComplex_storage.json @@ -14,7 +14,7 @@ "Content-Length": "34", "Content-Type": "application/json", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:42 GMT", "x-ms-version": "2019-02-02" }, @@ -55,7 +55,7 @@ "Content-Length": "4248", "Content-Type": "multipart/mixed; boundary=batch_46b3211d-45e6-466c-7436-ebf92a82b7c2", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:42 GMT", "x-ms-version": "2019-02-02" }, @@ -90,7 +90,7 @@ "Content-Length": "2237", "Content-Type": "multipart/mixed; boundary=batch_bbd2287c-a7b9-4631-7e34-bb6130733983", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:43 GMT", "x-ms-version": "2019-02-02" }, @@ -123,7 +123,7 @@ "Accept-Encoding": "gzip", "Authorization": "Sanitized", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:43 GMT", "x-ms-version": "2019-02-02" }, @@ -176,7 +176,7 @@ "Accept-Encoding": "gzip", "Authorization": "Sanitized", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:43 GMT", "x-ms-version": "2019-02-02" }, @@ -229,7 +229,7 @@ "Accept-Encoding": "gzip", "Authorization": "Sanitized", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:43 GMT", "x-ms-version": "2019-02-02" }, @@ -270,7 +270,7 @@ "Accept": "application/json", "Accept-Encoding": "gzip", "Authorization": "Sanitized", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:43 GMT", "x-ms-version": "2019-02-02" }, diff --git a/sdk/tables/aztable/recordings/TestBatchError/TestBatchError_cosmos.json b/sdk/data/aztables/recordings/TestBatchError/TestBatchError_cosmos.json similarity index 94% rename from sdk/tables/aztable/recordings/TestBatchError/TestBatchError_cosmos.json rename to sdk/data/aztables/recordings/TestBatchError/TestBatchError_cosmos.json index 6bf8e852db1e..505b5613a772 100644 --- a/sdk/tables/aztable/recordings/TestBatchError/TestBatchError_cosmos.json +++ b/sdk/data/aztables/recordings/TestBatchError/TestBatchError_cosmos.json @@ -14,7 +14,7 @@ "Content-Length": "35", "Content-Type": "application/json", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:41 GMT", "x-ms-version": "2019-02-02" }, @@ -50,7 +50,7 @@ "Content-Type": "application/json", "dataserviceversion": "3.0", "prefer": "return-no-content", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:41 GMT", "x-ms-version": "2019-02-02" }, @@ -89,7 +89,7 @@ "Content-Length": "2128", "Content-Type": "multipart/mixed; boundary=batch_c78db7be-ae44-4d89-7627-60c263af156f", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:42 GMT", "x-ms-version": "2019-02-02" }, @@ -114,7 +114,7 @@ "Accept": "application/json", "Accept-Encoding": "gzip", "Authorization": "Sanitized", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:42 GMT", "x-ms-version": "2019-02-02" }, diff --git a/sdk/tables/aztable/recordings/TestBatchError/TestBatchError_storage.json b/sdk/data/aztables/recordings/TestBatchError/TestBatchError_storage.json similarity index 94% rename from sdk/tables/aztable/recordings/TestBatchError/TestBatchError_storage.json rename to sdk/data/aztables/recordings/TestBatchError/TestBatchError_storage.json index ffcc44703bbf..56cc4b78a794 100644 --- a/sdk/tables/aztable/recordings/TestBatchError/TestBatchError_storage.json +++ b/sdk/data/aztables/recordings/TestBatchError/TestBatchError_storage.json @@ -14,7 +14,7 @@ "Content-Length": "35", "Content-Type": "application/json", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:40 GMT", "x-ms-version": "2019-02-02" }, @@ -56,7 +56,7 @@ "Content-Type": "application/json", "dataserviceversion": "3.0", "prefer": "return-no-content", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:40 GMT", "x-ms-version": "2019-02-02" }, @@ -104,7 +104,7 @@ "Content-Length": "2128", "Content-Type": "multipart/mixed; boundary=batch_207dc542-8ea6-440a-4786-6b87efbf5fa2", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:40 GMT", "x-ms-version": "2019-02-02" }, @@ -136,7 +136,7 @@ "Accept": "application/json", "Accept-Encoding": "gzip", "Authorization": "Sanitized", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:41 GMT", "x-ms-version": "2019-02-02" }, diff --git a/sdk/tables/aztable/recordings/TestBatchMixed/TestBatchMixed_cosmos.json b/sdk/data/aztables/recordings/TestBatchMixed/TestBatchMixed_cosmos.json similarity index 96% rename from sdk/tables/aztable/recordings/TestBatchMixed/TestBatchMixed_cosmos.json rename to sdk/data/aztables/recordings/TestBatchMixed/TestBatchMixed_cosmos.json index 272a4c5d4ce1..7b2d18eb7835 100644 --- a/sdk/tables/aztable/recordings/TestBatchMixed/TestBatchMixed_cosmos.json +++ b/sdk/data/aztables/recordings/TestBatchMixed/TestBatchMixed_cosmos.json @@ -14,7 +14,7 @@ "Content-Length": "35", "Content-Type": "application/json", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:38 GMT", "x-ms-version": "2019-02-02" }, @@ -49,7 +49,7 @@ "Content-Length": "2128", "Content-Type": "multipart/mixed; boundary=batch_89492166-bc25-4d1c-422b-2fd7f3237b86", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:39 GMT", "x-ms-version": "2019-02-02" }, @@ -75,7 +75,7 @@ "Accept-Encoding": "gzip", "Authorization": "Sanitized", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:39 GMT", "x-ms-version": "2019-02-02" }, @@ -119,7 +119,7 @@ "Content-Length": "2972", "Content-Type": "multipart/mixed; boundary=batch_16923db7-5505-41ff-4b60-2ef74f28414f", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:39 GMT", "x-ms-version": "2019-02-02" }, @@ -145,7 +145,7 @@ "Accept-Encoding": "gzip", "Authorization": "Sanitized", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:40 GMT", "x-ms-version": "2019-02-02" }, @@ -187,7 +187,7 @@ "Accept": "application/json", "Accept-Encoding": "gzip", "Authorization": "Sanitized", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:40 GMT", "x-ms-version": "2019-02-02" }, diff --git a/sdk/tables/aztable/recordings/TestBatchMixed/TestBatchMixed_storage.json b/sdk/data/aztables/recordings/TestBatchMixed/TestBatchMixed_storage.json similarity index 96% rename from sdk/tables/aztable/recordings/TestBatchMixed/TestBatchMixed_storage.json rename to sdk/data/aztables/recordings/TestBatchMixed/TestBatchMixed_storage.json index 40d5e4ada970..ef5786741042 100644 --- a/sdk/tables/aztable/recordings/TestBatchMixed/TestBatchMixed_storage.json +++ b/sdk/data/aztables/recordings/TestBatchMixed/TestBatchMixed_storage.json @@ -14,7 +14,7 @@ "Content-Length": "35", "Content-Type": "application/json", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:37 GMT", "x-ms-version": "2019-02-02" }, @@ -55,7 +55,7 @@ "Content-Length": "2128", "Content-Type": "multipart/mixed; boundary=batch_59628644-5f91-4d74-4e38-adfa297ce603", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:37 GMT", "x-ms-version": "2019-02-02" }, @@ -88,7 +88,7 @@ "Accept-Encoding": "gzip", "Authorization": "Sanitized", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:37 GMT", "x-ms-version": "2019-02-02" }, @@ -140,7 +140,7 @@ "Content-Length": "2951", "Content-Type": "multipart/mixed; boundary=batch_8c3530a3-8793-4181-667c-592dc6ecaa4b", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:37 GMT", "x-ms-version": "2019-02-02" }, @@ -173,7 +173,7 @@ "Accept-Encoding": "gzip", "Authorization": "Sanitized", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:38 GMT", "x-ms-version": "2019-02-02" }, @@ -223,7 +223,7 @@ "Accept": "application/json", "Accept-Encoding": "gzip", "Authorization": "Sanitized", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:38 GMT", "x-ms-version": "2019-02-02" }, diff --git a/sdk/tables/aztable/recordings/TestCreateTable/TestCreateTable_cosmos.json b/sdk/data/aztables/recordings/TestCreateTable/TestCreateTable_cosmos.json similarity index 88% rename from sdk/tables/aztable/recordings/TestCreateTable/TestCreateTable_cosmos.json rename to sdk/data/aztables/recordings/TestCreateTable/TestCreateTable_cosmos.json index fad01639b27d..8e0ffd5ecb5e 100644 --- a/sdk/tables/aztable/recordings/TestCreateTable/TestCreateTable_cosmos.json +++ b/sdk/data/aztables/recordings/TestCreateTable/TestCreateTable_cosmos.json @@ -14,7 +14,7 @@ "Content-Length": "34", "Content-Type": "application/json", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:47 GMT", "x-ms-version": "2019-02-02" }, @@ -46,7 +46,7 @@ "Accept": "application/json", "Accept-Encoding": "gzip", "Authorization": "Sanitized", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:48 GMT", "x-ms-version": "2019-02-02" }, diff --git a/sdk/tables/aztable/recordings/TestCreateTable/TestCreateTable_storage.json b/sdk/data/aztables/recordings/TestCreateTable/TestCreateTable_storage.json similarity index 90% rename from sdk/tables/aztable/recordings/TestCreateTable/TestCreateTable_storage.json rename to sdk/data/aztables/recordings/TestCreateTable/TestCreateTable_storage.json index 2627af4a28a3..d52dd2a5d45f 100644 --- a/sdk/tables/aztable/recordings/TestCreateTable/TestCreateTable_storage.json +++ b/sdk/data/aztables/recordings/TestCreateTable/TestCreateTable_storage.json @@ -14,7 +14,7 @@ "Content-Length": "35", "Content-Type": "application/json", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:47 GMT", "x-ms-version": "2019-02-02" }, @@ -52,7 +52,7 @@ "Accept": "application/json", "Accept-Encoding": "gzip", "Authorization": "Sanitized", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:47 GMT", "x-ms-version": "2019-02-02" }, diff --git a/sdk/tables/aztable/recordings/TestCreateTableFromService/TestCreateTableFromService_cosmos.json b/sdk/data/aztables/recordings/TestCreateTableFromService/TestCreateTableFromService_cosmos.json similarity index 88% rename from sdk/tables/aztable/recordings/TestCreateTableFromService/TestCreateTableFromService_cosmos.json rename to sdk/data/aztables/recordings/TestCreateTableFromService/TestCreateTableFromService_cosmos.json index 247d240271ff..16da658ba948 100644 --- a/sdk/tables/aztable/recordings/TestCreateTableFromService/TestCreateTableFromService_cosmos.json +++ b/sdk/data/aztables/recordings/TestCreateTableFromService/TestCreateTableFromService_cosmos.json @@ -14,7 +14,7 @@ "Content-Length": "35", "Content-Type": "application/json", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:02:12 GMT", "x-ms-version": "2019-02-02" }, @@ -46,7 +46,7 @@ "Accept": "application/json", "Accept-Encoding": "gzip", "Authorization": "Sanitized", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:02:13 GMT", "x-ms-version": "2019-02-02" }, diff --git a/sdk/tables/aztable/recordings/TestCreateTableFromService/TestCreateTableFromService_storage.json b/sdk/data/aztables/recordings/TestCreateTableFromService/TestCreateTableFromService_storage.json similarity index 90% rename from sdk/tables/aztable/recordings/TestCreateTableFromService/TestCreateTableFromService_storage.json rename to sdk/data/aztables/recordings/TestCreateTableFromService/TestCreateTableFromService_storage.json index 74ef489fa259..f55f1735a2a4 100644 --- a/sdk/tables/aztable/recordings/TestCreateTableFromService/TestCreateTableFromService_storage.json +++ b/sdk/data/aztables/recordings/TestCreateTableFromService/TestCreateTableFromService_storage.json @@ -14,7 +14,7 @@ "Content-Length": "35", "Content-Type": "application/json", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:02:12 GMT", "x-ms-version": "2019-02-02" }, @@ -52,7 +52,7 @@ "Accept": "application/json", "Accept-Encoding": "gzip", "Authorization": "Sanitized", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:02:12 GMT", "x-ms-version": "2019-02-02" }, diff --git a/sdk/tables/aztable/recordings/TestDeleteEntity/TestDeleteEntity_cosmos.json b/sdk/data/aztables/recordings/TestDeleteEntity/TestDeleteEntity_cosmos.json similarity index 88% rename from sdk/tables/aztable/recordings/TestDeleteEntity/TestDeleteEntity_cosmos.json rename to sdk/data/aztables/recordings/TestDeleteEntity/TestDeleteEntity_cosmos.json index 486776446619..38d7ede2b72d 100644 --- a/sdk/tables/aztable/recordings/TestDeleteEntity/TestDeleteEntity_cosmos.json +++ b/sdk/data/aztables/recordings/TestDeleteEntity/TestDeleteEntity_cosmos.json @@ -14,7 +14,7 @@ "Content-Length": "35", "Content-Type": "application/json", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:54 GMT", "x-ms-version": "2019-02-02" }, @@ -50,7 +50,7 @@ "Content-Type": "application/json", "dataserviceversion": "3.0", "prefer": "return-no-content", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:55 GMT", "x-ms-version": "2019-02-02" }, @@ -85,7 +85,7 @@ "Authorization": "Sanitized", "dataserviceversion": "3.0", "If-Match": "*", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:55 GMT", "x-ms-version": "2019-02-02" }, @@ -108,7 +108,7 @@ "Accept": "application/json", "Accept-Encoding": "gzip", "Authorization": "Sanitized", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:55 GMT", "x-ms-version": "2019-02-02" }, diff --git a/sdk/tables/aztable/recordings/TestDeleteEntity/TestDeleteEntity_storage.json b/sdk/data/aztables/recordings/TestDeleteEntity/TestDeleteEntity_storage.json similarity index 90% rename from sdk/tables/aztable/recordings/TestDeleteEntity/TestDeleteEntity_storage.json rename to sdk/data/aztables/recordings/TestDeleteEntity/TestDeleteEntity_storage.json index f86b8a175065..0089ac445e7d 100644 --- a/sdk/tables/aztable/recordings/TestDeleteEntity/TestDeleteEntity_storage.json +++ b/sdk/data/aztables/recordings/TestDeleteEntity/TestDeleteEntity_storage.json @@ -14,7 +14,7 @@ "Content-Length": "35", "Content-Type": "application/json", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:53 GMT", "x-ms-version": "2019-02-02" }, @@ -56,7 +56,7 @@ "Content-Type": "application/json", "dataserviceversion": "3.0", "prefer": "return-no-content", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:53 GMT", "x-ms-version": "2019-02-02" }, @@ -100,7 +100,7 @@ "Authorization": "Sanitized", "dataserviceversion": "3.0", "If-Match": "*", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:54 GMT", "x-ms-version": "2019-02-02" }, @@ -131,7 +131,7 @@ "Accept": "application/json", "Accept-Encoding": "gzip", "Authorization": "Sanitized", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:54 GMT", "x-ms-version": "2019-02-02" }, diff --git a/sdk/tables/aztable/recordings/TestEdmMarshalling/TestEdmMarshalling_cosmos.json b/sdk/data/aztables/recordings/TestEdmMarshalling/TestEdmMarshalling_cosmos.json similarity index 100% rename from sdk/tables/aztable/recordings/TestEdmMarshalling/TestEdmMarshalling_cosmos.json rename to sdk/data/aztables/recordings/TestEdmMarshalling/TestEdmMarshalling_cosmos.json diff --git a/sdk/tables/aztable/recordings/TestEdmMarshalling/TestEdmMarshalling_storage.json b/sdk/data/aztables/recordings/TestEdmMarshalling/TestEdmMarshalling_storage.json similarity index 100% rename from sdk/tables/aztable/recordings/TestEdmMarshalling/TestEdmMarshalling_storage.json rename to sdk/data/aztables/recordings/TestEdmMarshalling/TestEdmMarshalling_storage.json diff --git a/sdk/tables/aztable/recordings/TestGetProperties.json b/sdk/data/aztables/recordings/TestGetProperties.json similarity index 94% rename from sdk/tables/aztable/recordings/TestGetProperties.json rename to sdk/data/aztables/recordings/TestGetProperties.json index 4e9b8c2dc35b..397aa3e7b5ee 100644 --- a/sdk/tables/aztable/recordings/TestGetProperties.json +++ b/sdk/data/aztables/recordings/TestGetProperties.json @@ -11,7 +11,7 @@ "Accept": "application/xml", "Accept-Encoding": "gzip", "Authorization": "Sanitized", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:02:32 GMT", "x-ms-version": "2019-02-02" }, diff --git a/sdk/tables/aztable/recordings/TestInsertEntity/TestInsertEntity_cosmos.json b/sdk/data/aztables/recordings/TestInsertEntity/TestInsertEntity_cosmos.json similarity index 100% rename from sdk/tables/aztable/recordings/TestInsertEntity/TestInsertEntity_cosmos.json rename to sdk/data/aztables/recordings/TestInsertEntity/TestInsertEntity_cosmos.json diff --git a/sdk/tables/aztable/recordings/TestInsertEntity/TestInsertEntity_storage.json b/sdk/data/aztables/recordings/TestInsertEntity/TestInsertEntity_storage.json similarity index 100% rename from sdk/tables/aztable/recordings/TestInsertEntity/TestInsertEntity_storage.json rename to sdk/data/aztables/recordings/TestInsertEntity/TestInsertEntity_storage.json diff --git a/sdk/tables/aztable/recordings/TestInvalidEntity/TestInvalidEntity_cosmos.json b/sdk/data/aztables/recordings/TestInvalidEntity/TestInvalidEntity_cosmos.json similarity index 89% rename from sdk/tables/aztable/recordings/TestInvalidEntity/TestInvalidEntity_cosmos.json rename to sdk/data/aztables/recordings/TestInvalidEntity/TestInvalidEntity_cosmos.json index ceaf5d00c5c2..415cd9057fb2 100644 --- a/sdk/tables/aztable/recordings/TestInvalidEntity/TestInvalidEntity_cosmos.json +++ b/sdk/data/aztables/recordings/TestInvalidEntity/TestInvalidEntity_cosmos.json @@ -14,7 +14,7 @@ "Content-Length": "35", "Content-Type": "application/json", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:02:07 GMT", "x-ms-version": "2019-02-02" }, @@ -50,7 +50,7 @@ "Content-Type": "application/json", "dataserviceversion": "3.0", "prefer": "return-no-content", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:02:08 GMT", "x-ms-version": "2019-02-02" }, @@ -80,7 +80,7 @@ "Accept": "application/json", "Accept-Encoding": "gzip", "Authorization": "Sanitized", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:02:08 GMT", "x-ms-version": "2019-02-02" }, diff --git a/sdk/tables/aztable/recordings/TestInvalidEntity/TestInvalidEntity_storage.json b/sdk/data/aztables/recordings/TestInvalidEntity/TestInvalidEntity_storage.json similarity index 91% rename from sdk/tables/aztable/recordings/TestInvalidEntity/TestInvalidEntity_storage.json rename to sdk/data/aztables/recordings/TestInvalidEntity/TestInvalidEntity_storage.json index 793e598fd897..1b7ad44473ac 100644 --- a/sdk/tables/aztable/recordings/TestInvalidEntity/TestInvalidEntity_storage.json +++ b/sdk/data/aztables/recordings/TestInvalidEntity/TestInvalidEntity_storage.json @@ -14,7 +14,7 @@ "Content-Length": "35", "Content-Type": "application/json", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:02:07 GMT", "x-ms-version": "2019-02-02" }, @@ -56,7 +56,7 @@ "Content-Type": "application/json", "dataserviceversion": "3.0", "prefer": "return-no-content", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:02:07 GMT", "x-ms-version": "2019-02-02" }, @@ -100,7 +100,7 @@ "Accept": "application/json", "Accept-Encoding": "gzip", "Authorization": "Sanitized", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:02:07 GMT", "x-ms-version": "2019-02-02" }, diff --git a/sdk/tables/aztable/recordings/TestListTables/TestListTables_cosmos.json b/sdk/data/aztables/recordings/TestListTables/TestListTables_cosmos.json similarity index 88% rename from sdk/tables/aztable/recordings/TestListTables/TestListTables_cosmos.json rename to sdk/data/aztables/recordings/TestListTables/TestListTables_cosmos.json index 1a11361a4db6..0737fe0b3c78 100644 --- a/sdk/tables/aztable/recordings/TestListTables/TestListTables_cosmos.json +++ b/sdk/data/aztables/recordings/TestListTables/TestListTables_cosmos.json @@ -12,7 +12,7 @@ "Accept-Encoding": "gzip", "Authorization": "Sanitized", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:02:26 GMT", "x-ms-version": "2019-02-02" }, @@ -43,7 +43,7 @@ "Content-Length": "35", "Content-Type": "application/json", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:02:26 GMT", "x-ms-version": "2019-02-02" }, @@ -78,7 +78,7 @@ "Content-Length": "35", "Content-Type": "application/json", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:02:26 GMT", "x-ms-version": "2019-02-02" }, @@ -113,7 +113,7 @@ "Content-Length": "35", "Content-Type": "application/json", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:02:27 GMT", "x-ms-version": "2019-02-02" }, @@ -148,7 +148,7 @@ "Content-Length": "35", "Content-Type": "application/json", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:02:28 GMT", "x-ms-version": "2019-02-02" }, @@ -183,7 +183,7 @@ "Content-Length": "35", "Content-Type": "application/json", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:02:29 GMT", "x-ms-version": "2019-02-02" }, @@ -216,7 +216,7 @@ "Accept-Encoding": "gzip", "Authorization": "Sanitized", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:02:30 GMT", "x-ms-version": "2019-02-02" }, @@ -260,7 +260,7 @@ "Accept": "application/json", "Accept-Encoding": "gzip", "Authorization": "Sanitized", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:02:30 GMT", "x-ms-version": "2019-02-02" }, @@ -283,7 +283,7 @@ "Accept": "application/json", "Accept-Encoding": "gzip", "Authorization": "Sanitized", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:02:30 GMT", "x-ms-version": "2019-02-02" }, @@ -306,7 +306,7 @@ "Accept": "application/json", "Accept-Encoding": "gzip", "Authorization": "Sanitized", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:02:30 GMT", "x-ms-version": "2019-02-02" }, @@ -329,7 +329,7 @@ "Accept": "application/json", "Accept-Encoding": "gzip", "Authorization": "Sanitized", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:02:31 GMT", "x-ms-version": "2019-02-02" }, @@ -352,7 +352,7 @@ "Accept": "application/json", "Accept-Encoding": "gzip", "Authorization": "Sanitized", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:02:31 GMT", "x-ms-version": "2019-02-02" }, diff --git a/sdk/tables/aztable/recordings/TestListTables/TestListTables_storage.json b/sdk/data/aztables/recordings/TestListTables/TestListTables_storage.json similarity index 90% rename from sdk/tables/aztable/recordings/TestListTables/TestListTables_storage.json rename to sdk/data/aztables/recordings/TestListTables/TestListTables_storage.json index 833e3a5b841c..03ae644a11b7 100644 --- a/sdk/tables/aztable/recordings/TestListTables/TestListTables_storage.json +++ b/sdk/data/aztables/recordings/TestListTables/TestListTables_storage.json @@ -12,7 +12,7 @@ "Accept-Encoding": "gzip", "Authorization": "Sanitized", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:02:23 GMT", "x-ms-version": "2019-02-02" }, @@ -51,7 +51,7 @@ "Content-Length": "35", "Content-Type": "application/json", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:02:23 GMT", "x-ms-version": "2019-02-02" }, @@ -92,7 +92,7 @@ "Content-Length": "35", "Content-Type": "application/json", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:02:23 GMT", "x-ms-version": "2019-02-02" }, @@ -133,7 +133,7 @@ "Content-Length": "35", "Content-Type": "application/json", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:02:24 GMT", "x-ms-version": "2019-02-02" }, @@ -174,7 +174,7 @@ "Content-Length": "35", "Content-Type": "application/json", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:02:24 GMT", "x-ms-version": "2019-02-02" }, @@ -215,7 +215,7 @@ "Content-Length": "35", "Content-Type": "application/json", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:02:24 GMT", "x-ms-version": "2019-02-02" }, @@ -254,7 +254,7 @@ "Accept-Encoding": "gzip", "Authorization": "Sanitized", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:02:24 GMT", "x-ms-version": "2019-02-02" }, @@ -306,7 +306,7 @@ "Accept": "application/json", "Accept-Encoding": "gzip", "Authorization": "Sanitized", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:02:25 GMT", "x-ms-version": "2019-02-02" }, @@ -337,7 +337,7 @@ "Accept": "application/json", "Accept-Encoding": "gzip", "Authorization": "Sanitized", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:02:25 GMT", "x-ms-version": "2019-02-02" }, @@ -368,7 +368,7 @@ "Accept": "application/json", "Accept-Encoding": "gzip", "Authorization": "Sanitized", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:02:25 GMT", "x-ms-version": "2019-02-02" }, @@ -399,7 +399,7 @@ "Accept": "application/json", "Accept-Encoding": "gzip", "Authorization": "Sanitized", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:02:25 GMT", "x-ms-version": "2019-02-02" }, @@ -430,7 +430,7 @@ "Accept": "application/json", "Accept-Encoding": "gzip", "Authorization": "Sanitized", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:02:25 GMT", "x-ms-version": "2019-02-02" }, diff --git a/sdk/tables/aztable/recordings/TestMergeEntity/TestMergeEntity_cosmos.json b/sdk/data/aztables/recordings/TestMergeEntity/TestMergeEntity_cosmos.json similarity index 100% rename from sdk/tables/aztable/recordings/TestMergeEntity/TestMergeEntity_cosmos.json rename to sdk/data/aztables/recordings/TestMergeEntity/TestMergeEntity_cosmos.json diff --git a/sdk/tables/aztable/recordings/TestMergeEntity/TestMergeEntity_storage.json b/sdk/data/aztables/recordings/TestMergeEntity/TestMergeEntity_storage.json similarity index 100% rename from sdk/tables/aztable/recordings/TestMergeEntity/TestMergeEntity_storage.json rename to sdk/data/aztables/recordings/TestMergeEntity/TestMergeEntity_storage.json diff --git a/sdk/tables/aztable/recordings/TestQueryComplexEntity/TestQueryComplexEntity_cosmos.json b/sdk/data/aztables/recordings/TestQueryComplexEntity/TestQueryComplexEntity_cosmos.json similarity index 100% rename from sdk/tables/aztable/recordings/TestQueryComplexEntity/TestQueryComplexEntity_cosmos.json rename to sdk/data/aztables/recordings/TestQueryComplexEntity/TestQueryComplexEntity_cosmos.json diff --git a/sdk/tables/aztable/recordings/TestQueryComplexEntity/TestQueryComplexEntity_storage.json b/sdk/data/aztables/recordings/TestQueryComplexEntity/TestQueryComplexEntity_storage.json similarity index 100% rename from sdk/tables/aztable/recordings/TestQueryComplexEntity/TestQueryComplexEntity_storage.json rename to sdk/data/aztables/recordings/TestQueryComplexEntity/TestQueryComplexEntity_storage.json diff --git a/sdk/tables/aztable/recordings/TestQuerySimpleEntity/TestQuerySimpleEntity_cosmos.json b/sdk/data/aztables/recordings/TestQuerySimpleEntity/TestQuerySimpleEntity_cosmos.json similarity index 100% rename from sdk/tables/aztable/recordings/TestQuerySimpleEntity/TestQuerySimpleEntity_cosmos.json rename to sdk/data/aztables/recordings/TestQuerySimpleEntity/TestQuerySimpleEntity_cosmos.json diff --git a/sdk/tables/aztable/recordings/TestQuerySimpleEntity/TestQuerySimpleEntity_storage.json b/sdk/data/aztables/recordings/TestQuerySimpleEntity/TestQuerySimpleEntity_storage.json similarity index 100% rename from sdk/tables/aztable/recordings/TestQuerySimpleEntity/TestQuerySimpleEntity_storage.json rename to sdk/data/aztables/recordings/TestQuerySimpleEntity/TestQuerySimpleEntity_storage.json diff --git a/sdk/tables/aztable/recordings/TestQueryTable/TestQueryTable_cosmos.json b/sdk/data/aztables/recordings/TestQueryTable/TestQueryTable_cosmos.json similarity index 100% rename from sdk/tables/aztable/recordings/TestQueryTable/TestQueryTable_cosmos.json rename to sdk/data/aztables/recordings/TestQueryTable/TestQueryTable_cosmos.json diff --git a/sdk/tables/aztable/recordings/TestQueryTable/TestQueryTable_storage.json b/sdk/data/aztables/recordings/TestQueryTable/TestQueryTable_storage.json similarity index 100% rename from sdk/tables/aztable/recordings/TestQueryTable/TestQueryTable_storage.json rename to sdk/data/aztables/recordings/TestQueryTable/TestQueryTable_storage.json diff --git a/sdk/tables/aztable/recordings/TestRetentionTooLong.json b/sdk/data/aztables/recordings/TestRetentionTooLong.json similarity index 93% rename from sdk/tables/aztable/recordings/TestRetentionTooLong.json rename to sdk/data/aztables/recordings/TestRetentionTooLong.json index 3b8d65de6525..c25e4e2e0f73 100644 --- a/sdk/tables/aztable/recordings/TestRetentionTooLong.json +++ b/sdk/data/aztables/recordings/TestRetentionTooLong.json @@ -13,7 +13,7 @@ "Authorization": "Sanitized", "Content-Length": "234", "Content-Type": "application/xml", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:05:39 GMT", "x-ms-version": "2019-02-02" }, diff --git a/sdk/tables/aztable/recordings/TestServiceErrors/TestServiceErrors_cosmos.json b/sdk/data/aztables/recordings/TestServiceErrors/TestServiceErrors_cosmos.json similarity index 89% rename from sdk/tables/aztable/recordings/TestServiceErrors/TestServiceErrors_cosmos.json rename to sdk/data/aztables/recordings/TestServiceErrors/TestServiceErrors_cosmos.json index 027d8453ac18..e96be9b019b4 100644 --- a/sdk/tables/aztable/recordings/TestServiceErrors/TestServiceErrors_cosmos.json +++ b/sdk/data/aztables/recordings/TestServiceErrors/TestServiceErrors_cosmos.json @@ -14,7 +14,7 @@ "Content-Length": "35", "Content-Type": "application/json", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:46 GMT", "x-ms-version": "2019-02-02" }, @@ -49,7 +49,7 @@ "Content-Length": "35", "Content-Type": "application/json", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:46 GMT", "x-ms-version": "2019-02-02" }, @@ -78,7 +78,7 @@ "Accept": "application/json", "Accept-Encoding": "gzip", "Authorization": "Sanitized", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:47 GMT", "x-ms-version": "2019-02-02" }, diff --git a/sdk/tables/aztable/recordings/TestServiceErrors/TestServiceErrors_storage.json b/sdk/data/aztables/recordings/TestServiceErrors/TestServiceErrors_storage.json similarity index 90% rename from sdk/tables/aztable/recordings/TestServiceErrors/TestServiceErrors_storage.json rename to sdk/data/aztables/recordings/TestServiceErrors/TestServiceErrors_storage.json index 2f36fc18b9c1..7dc9d20ee414 100644 --- a/sdk/tables/aztable/recordings/TestServiceErrors/TestServiceErrors_storage.json +++ b/sdk/data/aztables/recordings/TestServiceErrors/TestServiceErrors_storage.json @@ -14,7 +14,7 @@ "Content-Length": "35", "Content-Type": "application/json", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:45 GMT", "x-ms-version": "2019-02-02" }, @@ -55,7 +55,7 @@ "Content-Length": "35", "Content-Type": "application/json", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:45 GMT", "x-ms-version": "2019-02-02" }, @@ -97,7 +97,7 @@ "Accept": "application/json", "Accept-Encoding": "gzip", "Authorization": "Sanitized", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:45 GMT", "x-ms-version": "2019-02-02" }, diff --git a/sdk/tables/aztable/recordings/TestServiceErrorsServiceClient/TestServiceErrorsServiceClient_cosmos.json b/sdk/data/aztables/recordings/TestServiceErrorsServiceClient/TestServiceErrorsServiceClient_cosmos.json similarity index 100% rename from sdk/tables/aztable/recordings/TestServiceErrorsServiceClient/TestServiceErrorsServiceClient_cosmos.json rename to sdk/data/aztables/recordings/TestServiceErrorsServiceClient/TestServiceErrorsServiceClient_cosmos.json diff --git a/sdk/tables/aztable/recordings/TestServiceErrorsServiceClient/TestServiceErrorsServiceClient_storage.json b/sdk/data/aztables/recordings/TestServiceErrorsServiceClient/TestServiceErrorsServiceClient_storage.json similarity index 100% rename from sdk/tables/aztable/recordings/TestServiceErrorsServiceClient/TestServiceErrorsServiceClient_storage.json rename to sdk/data/aztables/recordings/TestServiceErrorsServiceClient/TestServiceErrorsServiceClient_storage.json diff --git a/sdk/tables/aztable/recordings/TestSetAccessPolicy.json b/sdk/data/aztables/recordings/TestSetAccessPolicy.json similarity index 90% rename from sdk/tables/aztable/recordings/TestSetAccessPolicy.json rename to sdk/data/aztables/recordings/TestSetAccessPolicy.json index 24d6311fd2a6..1db328650b98 100644 --- a/sdk/tables/aztable/recordings/TestSetAccessPolicy.json +++ b/sdk/data/aztables/recordings/TestSetAccessPolicy.json @@ -14,7 +14,7 @@ "Content-Length": "35", "Content-Type": "application/json", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:32 GMT", "x-ms-version": "2019-02-02" }, @@ -54,7 +54,7 @@ "Authorization": "Sanitized", "Content-Length": "213", "Content-Type": "application/xml", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:32 GMT", "x-ms-version": "2019-02-02" }, @@ -83,7 +83,7 @@ "Accept": "application/json", "Accept-Encoding": "gzip", "Authorization": "Sanitized", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:32 GMT", "x-ms-version": "2019-02-02" }, diff --git a/sdk/tables/aztable/recordings/TestSetCors.json b/sdk/data/aztables/recordings/TestSetCors.json similarity index 93% rename from sdk/tables/aztable/recordings/TestSetCors.json rename to sdk/data/aztables/recordings/TestSetCors.json index 547cf7635e67..0222c7321c9e 100644 --- a/sdk/tables/aztable/recordings/TestSetCors.json +++ b/sdk/data/aztables/recordings/TestSetCors.json @@ -13,7 +13,7 @@ "Authorization": "Sanitized", "Content-Length": "303", "Content-Type": "application/xml", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:04:51 GMT", "x-ms-version": "2019-02-02" }, @@ -42,7 +42,7 @@ "Accept": "application/xml", "Accept-Encoding": "gzip", "Authorization": "Sanitized", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:05:36 GMT", "x-ms-version": "2019-02-02" }, diff --git a/sdk/tables/aztable/recordings/TestSetEmptyAccessPolicy.json b/sdk/data/aztables/recordings/TestSetEmptyAccessPolicy.json similarity index 89% rename from sdk/tables/aztable/recordings/TestSetEmptyAccessPolicy.json rename to sdk/data/aztables/recordings/TestSetEmptyAccessPolicy.json index b9a315608fb3..c8c03f1b10b3 100644 --- a/sdk/tables/aztable/recordings/TestSetEmptyAccessPolicy.json +++ b/sdk/data/aztables/recordings/TestSetEmptyAccessPolicy.json @@ -14,7 +14,7 @@ "Content-Length": "35", "Content-Type": "application/json", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:31 GMT", "x-ms-version": "2019-02-02" }, @@ -53,7 +53,7 @@ "Accept-Encoding": "gzip", "Authorization": "Sanitized", "Content-Length": "0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:31 GMT", "x-ms-version": "2019-02-02" }, @@ -82,7 +82,7 @@ "Accept": "application/json", "Accept-Encoding": "gzip", "Authorization": "Sanitized", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:32 GMT", "x-ms-version": "2019-02-02" }, diff --git a/sdk/tables/aztable/recordings/TestSetHoursMetrics.json b/sdk/data/aztables/recordings/TestSetHoursMetrics.json similarity index 93% rename from sdk/tables/aztable/recordings/TestSetHoursMetrics.json rename to sdk/data/aztables/recordings/TestSetHoursMetrics.json index 58cab9af2246..8ae8c66a8f27 100644 --- a/sdk/tables/aztable/recordings/TestSetHoursMetrics.json +++ b/sdk/data/aztables/recordings/TestSetHoursMetrics.json @@ -13,7 +13,7 @@ "Authorization": "Sanitized", "Content-Length": "228", "Content-Type": "application/xml", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:03:19 GMT", "x-ms-version": "2019-02-02" }, @@ -42,7 +42,7 @@ "Accept": "application/xml", "Accept-Encoding": "gzip", "Authorization": "Sanitized", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:04:04 GMT", "x-ms-version": "2019-02-02" }, diff --git a/sdk/tables/aztable/recordings/TestSetLogging.json b/sdk/data/aztables/recordings/TestSetLogging.json similarity index 93% rename from sdk/tables/aztable/recordings/TestSetLogging.json rename to sdk/data/aztables/recordings/TestSetLogging.json index 5d90ec0bed4c..31fc9195b90d 100644 --- a/sdk/tables/aztable/recordings/TestSetLogging.json +++ b/sdk/data/aztables/recordings/TestSetLogging.json @@ -13,7 +13,7 @@ "Authorization": "Sanitized", "Content-Length": "223", "Content-Type": "application/xml", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:02:33 GMT", "x-ms-version": "2019-02-02" }, @@ -42,7 +42,7 @@ "Accept": "application/xml", "Accept-Encoding": "gzip", "Authorization": "Sanitized", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:03:18 GMT", "x-ms-version": "2019-02-02" }, diff --git a/sdk/tables/aztable/recordings/TestSetMinuteMetrics.json b/sdk/data/aztables/recordings/TestSetMinuteMetrics.json similarity index 93% rename from sdk/tables/aztable/recordings/TestSetMinuteMetrics.json rename to sdk/data/aztables/recordings/TestSetMinuteMetrics.json index 2f1c1943a016..a682d0748542 100644 --- a/sdk/tables/aztable/recordings/TestSetMinuteMetrics.json +++ b/sdk/data/aztables/recordings/TestSetMinuteMetrics.json @@ -13,7 +13,7 @@ "Authorization": "Sanitized", "Content-Length": "232", "Content-Type": "application/xml", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:04:05 GMT", "x-ms-version": "2019-02-02" }, @@ -42,7 +42,7 @@ "Accept": "application/xml", "Accept-Encoding": "gzip", "Authorization": "Sanitized", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:04:50 GMT", "x-ms-version": "2019-02-02" }, diff --git a/sdk/tables/aztable/recordings/TestSetMultipleAccessPolicies.json b/sdk/data/aztables/recordings/TestSetMultipleAccessPolicies.json similarity index 91% rename from sdk/tables/aztable/recordings/TestSetMultipleAccessPolicies.json rename to sdk/data/aztables/recordings/TestSetMultipleAccessPolicies.json index a72683f7c9f7..1b9b5febd2c0 100644 --- a/sdk/tables/aztable/recordings/TestSetMultipleAccessPolicies.json +++ b/sdk/data/aztables/recordings/TestSetMultipleAccessPolicies.json @@ -14,7 +14,7 @@ "Content-Length": "34", "Content-Type": "application/json", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:32 GMT", "x-ms-version": "2019-02-02" }, @@ -54,7 +54,7 @@ "Authorization": "Sanitized", "Content-Length": "375", "Content-Type": "application/xml", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:32 GMT", "x-ms-version": "2019-02-02" }, @@ -83,7 +83,7 @@ "Accept": "application/xml", "Accept-Encoding": "gzip", "Authorization": "Sanitized", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:33 GMT", "x-ms-version": "2019-02-02" }, @@ -114,7 +114,7 @@ "Accept": "application/json", "Accept-Encoding": "gzip", "Authorization": "Sanitized", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:33 GMT", "x-ms-version": "2019-02-02" }, diff --git a/sdk/tables/aztable/recordings/TestSetNullAccessPolicy.json b/sdk/data/aztables/recordings/TestSetNullAccessPolicy.json similarity index 89% rename from sdk/tables/aztable/recordings/TestSetNullAccessPolicy.json rename to sdk/data/aztables/recordings/TestSetNullAccessPolicy.json index 31b1ca6e700b..0e926f0acac7 100644 --- a/sdk/tables/aztable/recordings/TestSetNullAccessPolicy.json +++ b/sdk/data/aztables/recordings/TestSetNullAccessPolicy.json @@ -14,7 +14,7 @@ "Content-Length": "34", "Content-Type": "application/json", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:33 GMT", "x-ms-version": "2019-02-02" }, @@ -54,7 +54,7 @@ "Authorization": "Sanitized", "Content-Length": "89", "Content-Type": "application/xml", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:34 GMT", "x-ms-version": "2019-02-02" }, @@ -83,7 +83,7 @@ "Accept": "application/xml", "Accept-Encoding": "gzip", "Authorization": "Sanitized", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:34 GMT", "x-ms-version": "2019-02-02" }, @@ -114,7 +114,7 @@ "Accept": "application/json", "Accept-Encoding": "gzip", "Authorization": "Sanitized", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:34 GMT", "x-ms-version": "2019-02-02" }, diff --git a/sdk/tables/aztable/recordings/TestSetTooManyAccessPolicies.json b/sdk/data/aztables/recordings/TestSetTooManyAccessPolicies.json similarity index 93% rename from sdk/tables/aztable/recordings/TestSetTooManyAccessPolicies.json rename to sdk/data/aztables/recordings/TestSetTooManyAccessPolicies.json index 5a9701884c01..3c29feb0be6b 100644 --- a/sdk/tables/aztable/recordings/TestSetTooManyAccessPolicies.json +++ b/sdk/data/aztables/recordings/TestSetTooManyAccessPolicies.json @@ -14,7 +14,7 @@ "Content-Length": "35", "Content-Type": "application/json", "dataserviceversion": "3.0", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:33 GMT", "x-ms-version": "2019-02-02" }, @@ -54,7 +54,7 @@ "Authorization": "Sanitized", "Content-Length": "1083", "Content-Type": "application/xml", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:33 GMT", "x-ms-version": "2019-02-02" }, @@ -89,7 +89,7 @@ "Accept": "application/json", "Accept-Encoding": "gzip", "Authorization": "Sanitized", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:01:33 GMT", "x-ms-version": "2019-02-02" }, diff --git a/sdk/tables/aztable/recordings/TestSetTooManyCors.json b/sdk/data/aztables/recordings/TestSetTooManyCors.json similarity index 96% rename from sdk/tables/aztable/recordings/TestSetTooManyCors.json rename to sdk/data/aztables/recordings/TestSetTooManyCors.json index d067f54a41e6..33be39037235 100644 --- a/sdk/tables/aztable/recordings/TestSetTooManyCors.json +++ b/sdk/data/aztables/recordings/TestSetTooManyCors.json @@ -13,7 +13,7 @@ "Authorization": "Sanitized", "Content-Length": "1488", "Content-Type": "application/xml", - "User-Agent": "azsdk-go-aztable/\u003Cversion\u003E azsdk-go-aztable/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", + "User-Agent": "azsdk-go-aztables/\u003Cversion\u003E azsdk-go-aztables/\u003Cversion\u003E azcore/v0.16.2 (go1.16.5; Windows_NT)", "x-ms-date": "Mon, 02 Aug 2021 18:05:37 GMT", "x-ms-version": "2019-02-02" }, diff --git a/sdk/tables/aztable/sas_account.go b/sdk/data/aztables/sas_account.go similarity index 99% rename from sdk/tables/aztable/sas_account.go rename to sdk/data/aztables/sas_account.go index 08acddabfb0a..aa5d20b9ef62 100644 --- a/sdk/tables/aztable/sas_account.go +++ b/sdk/data/aztables/sas_account.go @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package aztable +package aztables import ( "bytes" diff --git a/sdk/tables/aztable/sas_query_params.go b/sdk/data/aztables/sas_query_params.go similarity index 99% rename from sdk/tables/aztable/sas_query_params.go rename to sdk/data/aztables/sas_query_params.go index c2b8cbfa6cb0..87ae56b6e310 100644 --- a/sdk/tables/aztable/sas_query_params.go +++ b/sdk/data/aztables/sas_query_params.go @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package aztable +package aztables import ( "net" diff --git a/sdk/tables/aztable/sas_service.go b/sdk/data/aztables/sas_service.go similarity index 99% rename from sdk/tables/aztable/sas_service.go rename to sdk/data/aztables/sas_service.go index e64cfce5984e..a6a8830163ab 100644 --- a/sdk/tables/aztable/sas_service.go +++ b/sdk/data/aztables/sas_service.go @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package aztable +package aztables import ( "bytes" diff --git a/sdk/tables/aztable/service_client.go b/sdk/data/aztables/service_client.go similarity index 98% rename from sdk/tables/aztable/service_client.go rename to sdk/data/aztables/service_client.go index 9e3209dccbf5..f1c48bedbf82 100644 --- a/sdk/tables/aztable/service_client.go +++ b/sdk/data/aztables/service_client.go @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package aztable +package aztables import ( "context" @@ -11,7 +11,7 @@ import ( "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore" - generated "github.com/Azure/azure-sdk-for-go/sdk/tables/aztable/internal" + generated "github.com/Azure/azure-sdk-for-go/sdk/data/aztables/internal" ) // A ServiceClient represents a client to the table service. It can be used to query the available tables, create/delete tables, and various other service level operations. @@ -384,17 +384,17 @@ func setPropertiesResponseFromGenerated(g *generated.ServiceSetPropertiesRespons // Logging: Azure Analytics logging settings // // -// logging := aztable.Logging{ +// logging := aztables.Logging{ // Read: to.BoolPtr(true), // Write: to.BoolPtr(true), // Delete: to.BoolPtr(true), // Version: to.StringPtr("1.0"), -// RetentionPolicy: &aztable.RetentionPolicy{ +// RetentionPolicy: &aztables.RetentionPolicy{ // Enabled: to.BoolPtr(true), // Days: to.Int32Ptr(5), // }, // } -// props := aztable.ServiceProperties{Logging: &logging} +// props := aztables.ServiceProperties{Logging: &logging} // resp, err := client.SetProperties(ctx, props, nil) // handle(err) func (t *ServiceClient) SetProperties(ctx context.Context, properties ServiceProperties, options *SetPropertiesOptions) (SetPropertiesResponse, error) { diff --git a/sdk/tables/aztable/service_client_test.go b/sdk/data/aztables/service_client_test.go similarity index 99% rename from sdk/tables/aztable/service_client_test.go rename to sdk/data/aztables/service_client_test.go index fa4ddbecf682..c7eda6a68c10 100644 --- a/sdk/tables/aztable/service_client_test.go +++ b/sdk/data/aztables/service_client_test.go @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package aztable +package aztables import ( "context" diff --git a/sdk/tables/aztable/shared_access_signature_test.go b/sdk/data/aztables/shared_access_signature_test.go similarity index 99% rename from sdk/tables/aztable/shared_access_signature_test.go rename to sdk/data/aztables/shared_access_signature_test.go index f1fe97045206..7e7e7def86f2 100644 --- a/sdk/tables/aztable/shared_access_signature_test.go +++ b/sdk/data/aztables/shared_access_signature_test.go @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package aztable +package aztables import ( "context" diff --git a/sdk/tables/aztable/shared_policy_shared_key_credential.go b/sdk/data/aztables/shared_policy_shared_key_credential.go similarity index 99% rename from sdk/tables/aztable/shared_policy_shared_key_credential.go rename to sdk/data/aztables/shared_policy_shared_key_credential.go index ac9aa0f4a4a7..4e5018bf0632 100644 --- a/sdk/tables/aztable/shared_policy_shared_key_credential.go +++ b/sdk/data/aztables/shared_policy_shared_key_credential.go @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package aztable +package aztables import ( "bytes" diff --git a/sdk/tables/aztable/transaction_batch_test.go b/sdk/data/aztables/transaction_batch_test.go similarity index 99% rename from sdk/tables/aztable/transaction_batch_test.go rename to sdk/data/aztables/transaction_batch_test.go index 6b6578b86627..d364ca3f818f 100644 --- a/sdk/tables/aztable/transaction_batch_test.go +++ b/sdk/data/aztables/transaction_batch_test.go @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package aztable +package aztables import ( "encoding/json" diff --git a/sdk/tables/aztable/transactional_batch.go b/sdk/data/aztables/transactional_batch.go similarity index 99% rename from sdk/tables/aztable/transactional_batch.go rename to sdk/data/aztables/transactional_batch.go index 8554b9e01996..052b7ee27050 100644 --- a/sdk/tables/aztable/transactional_batch.go +++ b/sdk/data/aztables/transactional_batch.go @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package aztable +package aztables import ( "bufio" @@ -21,8 +21,8 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "github.com/Azure/azure-sdk-for-go/sdk/azcore/streaming" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + generated "github.com/Azure/azure-sdk-for-go/sdk/data/aztables/internal" "github.com/Azure/azure-sdk-for-go/sdk/internal/uuid" - generated "github.com/Azure/azure-sdk-for-go/sdk/tables/aztable/internal" ) // TransactionType is the type for a specific transaction operation. diff --git a/sdk/tables/aztable/zc_client_options.go b/sdk/data/aztables/zc_client_options.go similarity index 90% rename from sdk/tables/aztable/zc_client_options.go rename to sdk/data/aztables/zc_client_options.go index 2c8056a2a284..45d9f9e31b1b 100644 --- a/sdk/tables/aztable/zc_client_options.go +++ b/sdk/data/aztables/zc_client_options.go @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package aztable +package aztables import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - generated "github.com/Azure/azure-sdk-for-go/sdk/tables/aztable/internal" + generated "github.com/Azure/azure-sdk-for-go/sdk/data/aztables/internal" ) type ClientOptions struct { diff --git a/sdk/tables/aztable/zt_table_recorded_tests.go b/sdk/data/aztables/zt_table_recorded_tests.go similarity index 99% rename from sdk/tables/aztable/zt_table_recorded_tests.go rename to sdk/data/aztables/zt_table_recorded_tests.go index 04ff643e033d..4d4e6616e3fc 100644 --- a/sdk/tables/aztable/zt_table_recorded_tests.go +++ b/sdk/data/aztables/zt_table_recorded_tests.go @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package aztable +package aztables import ( "context" diff --git a/sdk/tables/ci.yml b/sdk/data/ci.yml similarity index 79% rename from sdk/tables/ci.yml rename to sdk/data/ci.yml index 107eb650032f..f3397a80cecf 100644 --- a/sdk/tables/ci.yml +++ b/sdk/data/ci.yml @@ -2,15 +2,15 @@ trigger: paths: include: - - sdk/tables/ + - sdk/data/ pr: paths: include: - - sdk/tables/ + - sdk/data/ stages: - template: /eng/pipelines/templates/jobs/archetype-sdk-client.yml parameters: - ServiceDirectory: 'tables' + ServiceDirectory: 'data' RunTests: true diff --git a/sdk/tables/test-resources.json b/sdk/data/test-resources.json similarity index 100% rename from sdk/tables/test-resources.json rename to sdk/data/test-resources.json diff --git a/sdk/tables/aztable/CHANGELOG.md b/sdk/tables/aztable/CHANGELOG.md deleted file mode 100644 index 688378f98d6c..000000000000 --- a/sdk/tables/aztable/CHANGELOG.md +++ /dev/null @@ -1,4 +0,0 @@ -# Release History - -## v0.1.0 (09-07-2021) -* This is the initial release of the `aztable` library From 71d5aea521e0cce7de20cae45ff13eb1ea8ee602 Mon Sep 17 00:00:00 2001 From: Sean Kane <68240067+seankane-msft@users.noreply.github.com> Date: Thu, 2 Sep 2021 15:48:28 -0400 Subject: [PATCH 42/42] [Tables] Merging internal (#15451) * updating * formatting --- sdk/data/aztables/proxy_test.go | 27 ++++++++++++++------------- sdk/internal/recording/recording.go | 1 - 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/sdk/data/aztables/proxy_test.go b/sdk/data/aztables/proxy_test.go index b050781be7d2..7159dd183411 100644 --- a/sdk/data/aztables/proxy_test.go +++ b/sdk/data/aztables/proxy_test.go @@ -23,13 +23,14 @@ var pathToPackage = "sdk/data/aztables" type recordingPolicy struct { options recording.RecordingOptions + t *testing.T } -func NewRecordingPolicy(o *recording.RecordingOptions) policy.Policy { +func NewRecordingPolicy(t *testing.T, o *recording.RecordingOptions) policy.Policy { if o == nil { o = &recording.RecordingOptions{} } - p := &recordingPolicy{options: *o} + p := &recordingPolicy{options: *o, t: t} p.options.Init() return p } @@ -42,7 +43,7 @@ func (p *recordingPolicy) Do(req *policy.Request) (resp *http.Response, err erro req.Raw().Header.Set(recording.UpstreamUriHeader, fmt.Sprintf("%v://%v", p.options.Scheme, originalURLHost)) req.Raw().Header.Set(recording.ModeHeader, recording.GetRecordMode()) - req.Raw().Header.Set(recording.IdHeader, recording.GetRecordingId()) + req.Raw().Header.Set(recording.IdHeader, recording.GetRecordingId(p.t)) return req.Next() } @@ -78,8 +79,8 @@ func (f *FakeCredential) NewAuthenticationPolicy(options runtime.AuthenticationO } func createClientForRecording(t *testing.T, tableName string, serviceURL string, cred azcore.Credential) (*Client, error) { - p := NewRecordingPolicy(&recording.RecordingOptions{UseHTTPS: true}) - client, err := recording.GetHTTPClient() + p := NewRecordingPolicy(t, &recording.RecordingOptions{UseHTTPS: true}) + client, err := recording.GetHTTPClient(t) require.NoError(t, err) options := &ClientOptions{ @@ -95,8 +96,8 @@ func createClientForRecording(t *testing.T, tableName string, serviceURL string, } func createServiceClientForRecording(t *testing.T, serviceURL string, cred azcore.Credential) (*ServiceClient, error) { - p := NewRecordingPolicy(&recording.RecordingOptions{UseHTTPS: true}) - client, err := recording.GetHTTPClient() + p := NewRecordingPolicy(t, &recording.RecordingOptions{UseHTTPS: true}) + client, err := recording.GetHTTPClient(t) require.NoError(t, err) options := &ClientOptions{ @@ -154,7 +155,7 @@ func initServiceTest(t *testing.T, service string) (*ServiceClient, func()) { } func getAADCredential(t *testing.T) (azcore.Credential, error) { //nolint - if recording.InPlayback() { + if recording.GetRecordMode() == "playback" { return NewFakeCredential("fakestorageaccount", "fakeAccountKey"), nil } @@ -167,7 +168,7 @@ func getAADCredential(t *testing.T) (azcore.Credential, error) { //nolint } func getSharedKeyCredential(t *testing.T) (azcore.Credential, error) { - if recording.InPlayback() { + if recording.GetRecordMode() == "playback" { return NewFakeCredential("fakestorageaccount", "fakeAccountKey"), nil } @@ -186,7 +187,7 @@ func createStorageClient(t *testing.T) (*Client, error) { accountName := recording.GetEnvVariable(t, "TABLES_STORAGE_ACCOUNT_NAME", "fakestorageaccount") accountKey := recording.GetEnvVariable(t, "TABLES_PRIMARY_STORAGE_ACCOUNT_KEY", "fakestorageaccountkey") - if recording.InPlayback() { + if recording.GetRecordMode() == "playback" { cred, err = getSharedKeyCredential(t) require.NoError(t, err) } else { @@ -205,7 +206,7 @@ func createStorageClient(t *testing.T) (*Client, error) { func createCosmosClient(t *testing.T) (*Client, error) { var cred azcore.Credential accountName := recording.GetEnvVariable(t, "TABLES_COSMOS_ACCOUNT_NAME", "fakestorageaccount") - if recording.InPlayback() { + if recording.GetRecordMode() == "playback" { accountName = "fakestorageaccount" } @@ -226,7 +227,7 @@ func createStorageServiceClient(t *testing.T) (*ServiceClient, error) { accountName := recording.GetEnvVariable(t, "TABLES_STORAGE_ACCOUNT_NAME", "fakestorageaccount") accountKey := recording.GetEnvVariable(t, "TABLES_PRIMARY_STORAGE_ACCOUNT_KEY", "fakestorageaccountkey") - if recording.InPlayback() { + if recording.GetRecordMode() == "playback" { cred, err = getSharedKeyCredential(t) require.NoError(t, err) } else { @@ -242,7 +243,7 @@ func createStorageServiceClient(t *testing.T) (*ServiceClient, error) { func createCosmosServiceClient(t *testing.T) (*ServiceClient, error) { var cred azcore.Credential accountName := recording.GetEnvVariable(t, "TABLES_COSMOS_ACCOUNT_NAME", "fakestorageaccount") - if recording.InPlayback() { + if recording.GetRecordMode() == "playback" { accountName = "fakestorageaccount" } diff --git a/sdk/internal/recording/recording.go b/sdk/internal/recording/recording.go index 62ce9d87da73..683b571f5d59 100644 --- a/sdk/internal/recording/recording.go +++ b/sdk/internal/recording/recording.go @@ -609,7 +609,6 @@ func GetRecordMode() string { return recordMode } - func getRootCas(t *testing.T) (*x509.CertPool, error) { localFile, ok := os.LookupEnv("PROXY_CERT")