Skip to content

Commit

Permalink
Removing _created_by_fixture metadata (#1019)
Browse files Browse the repository at this point in the history
  • Loading branch information
gracegoo-stripe committed Jan 11, 2023
1 parent 0238a84 commit 7c83f6f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 11 deletions.
7 changes: 0 additions & 7 deletions pkg/fixtures/fixtures.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
"path"
"path/filepath"
"strings"
"time"

"github.com/imdario/mergo"
"github.com/joho/godotenv"
Expand Down Expand Up @@ -315,12 +314,6 @@ func (fxt *Fixture) makeRequest(ctx context.Context, data FixtureRequest, apiVer
return make([]byte, 0), err
}

if data.Method == "post" && !fxt.FixtureData.Meta.ExcludeMetadata {
now := time.Now().String()
metadata := fmt.Sprintf("metadata[_created_by_fixture]=%s", now)
params.AppendData([]string{metadata})
}

if data.IdempotencyKey != "" {
idempotencyKey, err := fxt.ParseQuery(data.IdempotencyKey)
if err != nil {
Expand Down
4 changes: 0 additions & 4 deletions pkg/fixtures/fixtures_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,6 @@ func TestMakeRequest(t *testing.T) {
t.Error(err)
}

if req.Form.Get("metadata[_created_by_fixture]") == "" {
t.Error("Metadata not set")
}

res.Write([]byte(`{"id": "cust_12345", "foo": "bar"}`))
case chargePath:
res.Write([]byte(`{"charge": true, "id": "char_12345"}`))
Expand Down

0 comments on commit 7c83f6f

Please sign in to comment.