diff --git a/fly/commands/internal/flaghelpers/json_flag.go b/fly/commands/internal/flaghelpers/json_flag.go deleted file mode 100644 index 34ebeeba3..000000000 --- a/fly/commands/internal/flaghelpers/json_flag.go +++ /dev/null @@ -1,21 +0,0 @@ -package flaghelpers - -import ( - "encoding/json" -) - -type JsonFlag struct { - Raw string - Value map[string]string -} - -func (v *JsonFlag) UnmarshalFlag(value string) error { - err := json.Unmarshal([]byte(value), &v.Value) - if err != nil { - return err - } - - v.Raw = value - - return nil -} diff --git a/fly/commands/internal/flaghelpers/json_flag_test.go b/fly/commands/internal/flaghelpers/json_flag_test.go deleted file mode 100644 index 7e3c94e66..000000000 --- a/fly/commands/internal/flaghelpers/json_flag_test.go +++ /dev/null @@ -1,30 +0,0 @@ -package flaghelpers_test - -import ( - . "github.com/concourse/concourse/fly/commands/internal/flaghelpers" - - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" -) - -var _ = Describe("JsonFlag", func() { - Context("when JSON string is invalid", func() { - It("displays an error message", func() { - jsonFlag := &JsonFlag{} - - err := jsonFlag.UnmarshalFlag("{some:value}") - Expect(err).To(MatchError("invalid character 's' looking for beginning of object key string")) - }) - }) - - Context("when JSON string is valid", func() { - It("parse the JSON into version", func() { - jsonFlag := &JsonFlag{} - - err := jsonFlag.UnmarshalFlag(`{"some":"value"}`) - Expect(err).ToNot(HaveOccurred()) - Expect(jsonFlag.Value).To(Equal(map[string]string{"some": "value"})) - Expect(jsonFlag.Raw).To(Equal(`{"some":"value"}`)) - }) - }) -}) diff --git a/go-concourse/concourse/resourceversions_test.go b/go-concourse/concourse/resourceversions_test.go index d719749ce..c6459ba9b 100644 --- a/go-concourse/concourse/resourceversions_test.go +++ b/go-concourse/concourse/resourceversions_test.go @@ -158,11 +158,11 @@ var _ = Describe("ATC Handler Resource Versions", func() { Context("when filter is specified", func() { BeforeEach(func() { - filter = atc.Version{"some": "value", "some-other": "other-value"} + filter = atc.Version{"some": "value"} atcServer.AppendHandlers( ghttp.CombineHandlers( - ghttp.VerifyRequest("GET", expectedURL, "filter=some:value&filter=some-other:other-value"), + ghttp.VerifyRequest("GET", expectedURL, "filter=some:value"), ghttp.RespondWithJSONEncoded(http.StatusOK, expectedVersions), ), )