Skip to content

Commit

Permalink
store vcr cassettes in s3 (#135)
Browse files Browse the repository at this point in the history
  • Loading branch information
pmenglund authored Sep 7, 2023
1 parent 338f6cd commit b6a0266
Show file tree
Hide file tree
Showing 55 changed files with 117 additions and 2,113 deletions.
11 changes: 6 additions & 5 deletions documents.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"net/http"

"github.com/rs/zerolog"
"github.com/rs/zerolog/log"

"github.com/rockset/rockset-go-client/openapi"
)
Expand All @@ -24,7 +25,6 @@ func (rc *RockClient) AddDocuments(ctx context.Context, workspace, collection st
var httpResp *http.Response
var resp *openapi.AddDocumentsResponse

log := zerolog.Ctx(ctx)
q := rc.DocumentsApi.AddDocuments(ctx, workspace, collection)

// TODO should the method accept []map[string]interface{} instead?
Expand Down Expand Up @@ -97,8 +97,6 @@ func (rc *RockClient) PatchDocuments(ctx context.Context, workspace, collection
return nil, err
}

log := zerolog.Ctx(ctx)

// should this accept all 2xx status codes?
if resp.StatusCode == http.StatusOK {
var pdr openapi.PatchDocumentsResponse
Expand Down Expand Up @@ -141,12 +139,15 @@ func (rc *RockClient) patchDocumentsRequest(ctx context.Context, ws, collection
return nil, err
}

req.Header.Set("Authorization", "apikey "+rc.RockConfig.APIKey)
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Accept", "application/json")
req.Header.Set("x-rockset-version", Version)
req.Header.Set("User-Agent", rc.RockConfig.cfg.UserAgent)

// copy all default headers
for k, v := range rc.RockConfig.cfg.DefaultHeader {
req.Header.Set(k, v)
}

return req, nil
}

Expand Down
13 changes: 9 additions & 4 deletions documents_test.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package rockset_test

import (
"github.com/stretchr/testify/suite"
"testing"

"github.com/fatih/structs"
"github.com/stretchr/testify/suite"

"github.com/rockset/rockset-go-client"
)

Expand Down Expand Up @@ -55,6 +56,7 @@ func (s *DocumentIntegrationSuite) TearDownSuite() {

func (s *DocumentIntegrationSuite) TestAddDocument() {
ctx := testCtx()
rc, _ := vcrTestClient(s.T(), s.T().Name())

type doc struct {
Foo string `json:"foo"`
Expand All @@ -65,14 +67,16 @@ func (s *DocumentIntegrationSuite) TestAddDocument() {
structs.Map(doc{Foo: "foo"}),
}

res, err := s.rc.AddDocuments(ctx, s.ws, s.collection, docs)
res, err := rc.AddDocuments(ctx, s.ws, s.collection, docs)
s.Require().NoError(err)
s.Require().Len(res, 1)
s.id = res[0].GetId()
}

func (s *DocumentIntegrationSuite) TestPatchDocument() {
ctx := testCtx()
rc, _ := vcrTestClient(s.T(), s.T().Name())
s.T().Logf("t: %s", s.T().Name())

patches := []rockset.PatchDocument{
{
Expand All @@ -86,7 +90,7 @@ func (s *DocumentIntegrationSuite) TestPatchDocument() {
},
},
}
res, err := s.rc.PatchDocuments(ctx, s.ws, s.collection, patches)
res, err := rc.PatchDocuments(ctx, s.ws, s.collection, patches)
s.Require().NoError(err)
s.Require().Len(res, 1)
s.Assert().Equal("PATCHED", res[0].GetStatus())
Expand All @@ -96,8 +100,9 @@ func (s *DocumentIntegrationSuite) TestPatchDocument() {
// but we want the operations in alphabetical order, add/patch/remove (delete).
func (s *DocumentIntegrationSuite) TestRemoveDocument() {
ctx := testCtx()
rc, _ := vcrTestClient(s.T(), s.T().Name())

res, err := s.rc.DeleteDocuments(ctx, s.ws, s.collection, []string{s.id})
res, err := rc.DeleteDocuments(ctx, s.ws, s.collection, []string{s.id})
s.Require().NoError(err)
s.Require().Len(res, 1)
s.Assert().Equal("DELETED", res[0].GetStatus())
Expand Down
22 changes: 21 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,38 @@ module github.com/rockset/rockset-go-client
go 1.20

require (
github.com/aws/aws-sdk-go-v2/config v1.18.30
github.com/aws/aws-sdk-go-v2/service/s3 v1.37.1
github.com/confluentinc/confluent-kafka-go v1.9.2
github.com/fatih/structs v1.1.0
github.com/go-zookeeper/zk v1.0.3
github.com/ory/dockertest/v3 v3.10.0
github.com/rs/zerolog v1.30.0
github.com/seborama/govcr/v13 v13.2.0
github.com/seborama/govcr/v14 v14.0.0
github.com/stretchr/testify v1.8.4
)

require (
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 // indirect
github.com/Microsoft/go-winio v0.6.0 // indirect
github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 // indirect
github.com/aws/aws-sdk-go-v2 v1.19.1 // indirect
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.10 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.13.29 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.6 // indirect
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.74 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.36 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.30 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.37 // indirect
github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.28 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.11 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.31 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.30 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.14.5 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.12.14 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.14 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.20.1 // indirect
github.com/aws/smithy-go v1.13.5 // indirect
github.com/cenkalti/backoff/v4 v4.1.3 // indirect
github.com/containerd/continuity v0.3.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
Expand All @@ -29,6 +48,7 @@ require (
github.com/google/uuid v1.3.0 // indirect
github.com/imdario/mergo v0.3.12 // indirect
github.com/jinzhu/copier v0.3.5 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.19 // indirect
github.com/mitchellh/mapstructure v1.4.1 // indirect
Expand Down
48 changes: 46 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,44 @@ github.com/actgardner/gogen-avro/v10 v10.1.0/go.mod h1:o+ybmVjEa27AAr35FRqU98DJu
github.com/actgardner/gogen-avro/v10 v10.2.1/go.mod h1:QUhjeHPchheYmMDni/Nx7VB0RsT/ee8YIgGY/xpEQgQ=
github.com/actgardner/gogen-avro/v9 v9.1.0/go.mod h1:nyTj6wPqDJoxM3qdnjcLv+EnMDSDFqE0qDpva2QRmKc=
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
github.com/aws/aws-sdk-go-v2 v1.19.1 h1:STs0lbbpXu3byTPcnRLghs2DH0yk9qKDo27TyyJSKsM=
github.com/aws/aws-sdk-go-v2 v1.19.1/go.mod h1:uzbQtefpm44goOPmdKyAlXSNcwlRgF3ePWVW6EtJvvw=
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.10 h1:dK82zF6kkPeCo8J1e+tGx4JdvDIQzj7ygIoLg8WMuGs=
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.10/go.mod h1:VeTZetY5KRJLuD/7fkQXMU6Mw7H5m/KP2J5Iy9osMno=
github.com/aws/aws-sdk-go-v2/config v1.18.30 h1:TTAXQIn31qYFUQjkW6siVrRTX1ux+sADZDOe3jsZcMg=
github.com/aws/aws-sdk-go-v2/config v1.18.30/go.mod h1:+YogjT7e/t9JVu/sOnZZgxTge1G+bPNk8zOaI0QIQvE=
github.com/aws/aws-sdk-go-v2/credentials v1.13.29 h1:KNgCpThGuZyCjq9EuuqoLDenKKMwO/x1Xx01ckDa7VI=
github.com/aws/aws-sdk-go-v2/credentials v1.13.29/go.mod h1:VMq1LcmSEa9qxBlOCYTjVuGJWEEzhGmgL552jQsmhss=
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.6 h1:kortK122LvTU34CGX/F9oJpelXKkEA2j/MW48II+8+8=
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.6/go.mod h1:k7IPHyHNIASI0m0RwOmCjWOTtgG+J0raqwuHH8WhWJE=
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.74 h1:5iIuHdeN3/x3kFBENHgYQl1ZtD+ZhLBXy6IgXflUtSI=
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.74/go.mod h1:kBEg7nSM1Dg9tsHX5eoFeJMmO+njnFOwxP0dPuQCEGc=
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.36 h1:kbk81RlPoC6e4co7cQx2FAvH9TgbzxIqCqiosAFiB+w=
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.36/go.mod h1:T8Jsn/uNL/AFOXrVYQ1YQaN1r9gN34JU1855/Lyjv+o=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.30 h1:lMl8S5SB8jNCB+Sty2Em4lnu3IJytceHQd7qbmfqKL0=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.30/go.mod h1:v3GSCnFxbHzt9dlWBqvA1K1f9lmWuf4ztupZBCAIVs4=
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.37 h1:BXiqvN7WuV/pMhz8CivhO8cG8icJcjnjHumif4ukQ0c=
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.37/go.mod h1:d4GZ62cjnz/hjKFdAu11gAwK73bdhqaFv2O4J1gaqIs=
github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.28 h1:mGA+qm0tiLaZ04PfQtxthU3XTZ1sN44YlqVjd+1E+Pk=
github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.28/go.mod h1:KkWH+0gAmvloVXaVjdY6/LLwQV6TjYOZ1j5JdVm+XBc=
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.11 h1:y2+VQzC6Zh2ojtV2LoC0MNwHWc6qXv/j2vrQtlftkdA=
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.11/go.mod h1:iV4q2hsqtNECrfmlXyord9u4zyuFEJX9eLgLpSPzWA8=
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.31 h1:TGjmYwqqE6dMDSUSyQNct4MyTAgz95bPnDAjBOEgwOI=
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.31/go.mod h1:HvfQ61vGBanxBijrBIpyG32mS9w6fsPZa+BwtV1uQUY=
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.30 h1:UcVZxLVNY4yayCmiG94Ge3l2qbc5WEB/oa4RmjoQEi0=
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.30/go.mod h1:wPffyJiWWtHwvpFyn23WjAjVjMnlQOQrl02+vutBh3Y=
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.14.5 h1:B90htdoSv7OMH6QzzZ9cuZUoXVwFml0fTCDOpcGakCw=
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.14.5/go.mod h1:fdxqVm1S6xQa6obwHysh1GPowmyqO2pQuaRPWdyG2iQ=
github.com/aws/aws-sdk-go-v2/service/s3 v1.37.1 h1:OoFnDN7ZixctMX/Do4DgQXFvjtzQynz0p0ErQrOCeAs=
github.com/aws/aws-sdk-go-v2/service/s3 v1.37.1/go.mod h1:fBgi8xY80Fv2EveXOoTM008OhKdjrxxtVH0w0h0ozYU=
github.com/aws/aws-sdk-go-v2/service/sso v1.12.14 h1:gUjz7trfz9qBm0AlkKTvJHBXELi1wvw+2LA9GfD2AsM=
github.com/aws/aws-sdk-go-v2/service/sso v1.12.14/go.mod h1:9kfRdJgLCbnyeqZ/DpaSwcgj9ZDYLfRpe8Sze+NrYfQ=
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.14 h1:8bEtxV5UT9ucdWGXfZ7CM3caQhSHGjWnTHt0OeF7m7s=
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.14/go.mod h1:nd9BG2UnexN2sDx/mk2Jd6pf3d2E61AiA8m8Fdvdx8Y=
github.com/aws/aws-sdk-go-v2/service/sts v1.20.1 h1:U7h9CPoyMfVoN5jUglB0LglCMP10AK4vMBsbsCKM8Yw=
github.com/aws/aws-sdk-go-v2/service/sts v1.20.1/go.mod h1:BUHusg4cOA1TFGegj7x8/eoWrbdHzJfoMrXcbMQAG0k=
github.com/aws/smithy-go v1.13.5 h1:hgz0X/DX0dGqTYpGALqXJoRKRj5oQ7150i5FdTePzO8=
github.com/aws/smithy-go v1.13.5/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA=
github.com/cenkalti/backoff/v4 v4.1.3 h1:cFAlzYUlVYDysBEH2T5hyJZMh3+5+WCBvSnK6Q8UtC4=
github.com/cenkalti/backoff/v4 v4.1.3/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
Expand Down Expand Up @@ -99,6 +137,7 @@ github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
Expand All @@ -123,6 +162,11 @@ github.com/jhump/protoreflect v1.11.0/go.mod h1:U7aMIjN0NWq9swDP7xDdoMfRHb35uiuT
github.com/jhump/protoreflect v1.12.0/go.mod h1:JytZfP5d0r8pVNLZvai7U/MCuTWITgrI4tTg7puQFKI=
github.com/jinzhu/copier v0.3.5 h1:GlvfUwHk62RokgqVNvYsku0TATCF7bAHVwEXoBh3iJg=
github.com/jinzhu/copier v0.3.5/go.mod h1:DfbEm0FYsaqBcKcFuvmOZb218JkPGtvSHsKg8S8hyyg=
github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg=
github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo=
github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8=
github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U=
github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0=
github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
github.com/juju/qthttptest v0.1.1/go.mod h1:aTlAv8TYaflIiTDIQYzxnl1QdPjAg8Q8qJMErpKy6A4=
github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM=
Expand Down Expand Up @@ -187,8 +231,8 @@ github.com/rs/zerolog v1.30.0 h1:SymVODrcRsaRaSInD9yQtKbtWqwsfoPcRff/oRXLj4c=
github.com/rs/zerolog v1.30.0/go.mod h1:/tk+P47gFdPXq4QYjvCmT5/Gsug2nagsFWBWhAiSi1w=
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/santhosh-tekuri/jsonschema/v5 v5.0.0/go.mod h1:FKdcjfQW6rpZSnxxUvEA5H/cDPdvJ/SZJQLWWXWGrZ0=
github.com/seborama/govcr/v13 v13.2.0 h1:18nmnyfEDzdX8RcslLJTnNWi0TLdjxLRl8mLjq+3k4w=
github.com/seborama/govcr/v13 v13.2.0/go.mod h1:rWXsxEVwOQWDqgLh+XeLUTILhYFH5GlqdCHtd8too8Y=
github.com/seborama/govcr/v14 v14.0.0 h1:jlIaDu7JySg+yJZckNIPTuTnFTfcfwFYnQvgLQV4ggY=
github.com/seborama/govcr/v14 v14.0.0/go.mod h1:blFznMokDguXozlZwQg2AWgvqgfekqj0a+ZW11nhZPY=
github.com/seccomp/libseccomp-golang v0.9.2-0.20220502022130-f33da4d89646/go.mod h1:JA8cRccbGaA1s33RQf7Y1+q9gHmZX1yB/z9WDN1C6fg=
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE=
Expand Down
44 changes: 34 additions & 10 deletions rockset_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,18 @@ package rockset_test
import (
"context"
"fmt"
"github.com/seborama/govcr/v13"
"github.com/seborama/govcr/v13/cassette/track"
"math/rand"
"os"
"strings"
"testing"
"time"

"github.com/aws/aws-sdk-go-v2/config"
"github.com/aws/aws-sdk-go-v2/service/s3"
"github.com/rs/zerolog"
"github.com/seborama/govcr/v14"
"github.com/seborama/govcr/v14/cassette/track"
"github.com/seborama/govcr/v14/fileio"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

Expand Down Expand Up @@ -104,34 +107,55 @@ func vcrTestClient(t *testing.T, name string) (*rockset.RockClient, func(string)
return rc, fn
}

const vcrBucket = "rockset-go-tests"

func vcrBucketPath(name string) string {
return fmt.Sprintf("/%s/vcr/%s/%s.cassette.gz", vcrBucket, rockset.Version, name)
}

func vcrClient(name string) (*rockset.RockClient, func(string) string, error) {
return vcrClientWrapper(strings.ToLower(os.Getenv("VCR_MODE")), name)
}

func vcrClientWrapper(mode, name string) (*rockset.RockClient, func(string) string, error) {
randFn := randomName
options := []rockset.RockOption{rockset.WithUserAgent("rockset-go-integration-tests")}
var settings []govcr.Setting
path := fmt.Sprintf("vcr/%s.cassette.gz", name)
path := vcrBucketPath(name)

switch mode := strings.ToLower(os.Getenv("VCR_MODE")); mode {
case "record": // remove cassette to force a new one to be created
// VCR cassettes are in S3 bucket rockset-go-tests (in us-west-2)
cfg, err := config.LoadDefaultConfig(context.Background(), config.WithRegion("us-west-2"))
if err != nil {
return nil, nil, err
}
s3Client := s3.NewFromConfig(cfg, func(o *s3.Options) { o.UsePathStyle = true })

switch mode {
case "record":
// remove cassette to force a new one to be created
//res, err := s3Client.DeleteObject(context.Background(), &s3.DeleteObjectInput{
// Bucket: aws.String(""),
// Key: "",
//})
randFn = func(pfx string) string {
return fmt.Sprintf("%s_go", pfx)
return fmt.Sprintf("go_%s", pfx)
}
// ignore errors
_ = os.Remove(path)
settings = vcrSettings(false)
case "offline", "": // quick run using a recorded response
randFn = func(pfx string) string {
return fmt.Sprintf("%s_go", pfx)
return fmt.Sprintf("go_%s", pfx)
}
settings = vcrSettings(true)
options = append(options, rockset.WithAPIKey("fake"),
rockset.WithAPIServer("fake"), rockset.WithRetry(&testRetrier{}))
case "online": // for running everything live
settings = vcrSettings(false)
settings = append(settings, govcr.WithLiveOnlyMode(), govcr.WithReadOnlyMode())
default:
return nil, nil, fmt.Errorf("unknown VCR_MODE: %s", mode)
}

vcr := govcr.NewVCR(govcr.NewCassetteLoader(path), settings...)
vcr := govcr.NewVCR(govcr.NewCassetteLoader(path).WithStore(fileio.NewAWS(s3Client)), settings...)
options = append(options, rockset.WithHTTPClient(vcr.HTTPClient()),
rockset.WithCustomHeader("x-rockset-test", "go-client"))

Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed vcr/QueryIntegrationSuite/TestAsyncQuery.cassette.gz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed vcr/QueryIntegrationSuite/TestListQueries.cassette.gz
Binary file not shown.
Binary file removed vcr/QueryIntegrationSuite/TestQuery.cassette.gz
Binary file not shown.
Binary file not shown.
Binary file removed vcr/QueryIntegrationSuite/TestValidateQuery.cassette.gz
Binary file not shown.
Binary file removed vcr/TestAliasIntegrationSuite.cassette.gz
Binary file not shown.
Binary file removed vcr/TestAzureIntegrations.cassette.gz
Binary file not shown.
Binary file removed vcr/TestCollectionIntegrationSuite.cassette.gz
Binary file not shown.
Binary file removed vcr/TestDocumentSuite.cassette.gz
Binary file not shown.
Binary file removed vcr/TestError_IsNotFoundError.cassette.gz
Binary file not shown.
Binary file removed vcr/TestListViews.cassette.gz
Binary file not shown.
Binary file removed vcr/TestQueryIntegration/TestAsyncQuery.cassette.gz
Binary file not shown.
Binary file removed vcr/TestQueryIntegration/TestCancelQuery.cassette.gz
Binary file not shown.
Binary file removed vcr/TestQueryIntegration/TestListQueries.cassette.gz
Binary file not shown.
Binary file removed vcr/TestQueryIntegration/TestQuery.cassette.gz
Binary file not shown.
Binary file removed vcr/TestQueryIntegration/TestValidateQuery.cassette.gz
Binary file not shown.
Binary file removed vcr/TestRockClient_CreateQueryLambda.cassette.gz
Binary file not shown.
Binary file removed vcr/TestRockClient_GetOrganization.cassette.gz
Binary file not shown.
Binary file removed vcr/TestRockClient_GetQueryLambdaVersion.cassette.gz
Binary file not shown.
Binary file not shown.
Binary file removed vcr/TestRockClient_ListQueryLambdaTags.cassette.gz
Binary file not shown.
Binary file not shown.
Binary file removed vcr/TestRockClient_ListQueryLambdas.cassette.gz
Binary file not shown.
Binary file not shown.
Binary file removed vcr/TestRockClient_Ping.cassette.gz
Binary file not shown.
Binary file removed vcr/TestRockClient_withAPIServerEnv.cassette.gz
Binary file not shown.
Binary file removed vcr/TestRoleIntegration.cassette.gz
Binary file not shown.
Binary file removed vcr/TestSuiteAPIKey.cassette.gz
Binary file not shown.
Binary file removed vcr/TestSuiteWorkspace.cassette.gz
Binary file not shown.
Binary file removed vcr/TestTemplate.cassette.gz
Binary file not shown.
Binary file removed vcr/TestUserIntegration.cassette.gz
Binary file not shown.
Binary file removed vcr/TestViewCRUD.cassette.gz
Binary file not shown.
Binary file removed vcr/TestVirtualInstance.cassette.gz
Binary file not shown.
Binary file removed vcr/TestVirtualInstanceIntegration.cassette.gz
Binary file not shown.
Binary file removed vcr/example_s3.cassette.gz
Binary file not shown.
Loading

0 comments on commit b6a0266

Please sign in to comment.