diff --git a/configuration/componentcfg/query.go b/configuration/componentcfg/query.go index 173660a6..66970424 100644 --- a/configuration/componentcfg/query.go +++ b/configuration/componentcfg/query.go @@ -45,7 +45,7 @@ var ( inputFullRegex = regexp.MustCompile(`^([a-zA-Z0-9-_]+)(\/[A-Z0-9-_]+){1}(\/[a-z-A-Z0-9-_]+){1}(\/[a-z-A-Z0-9-_]+){1}(\@[0-9]+)?$`) // component /RUNTYPE /rolename inputEntriesRegex = regexp.MustCompile(`^([a-zA-Z0-9-_]+)(\/[A-Z0-9-_]+){1}(\/[a-z-A-Z0-9-_]+){1}$`) - inputParametersRegex = regexp.MustCompile(`^([a-zA-Z0-9-_]+=[a-zA-Z0-9-_,]+)(&[a-zA-Z0-9-_]+=[a-zA-Z0-9-_,]+)*$`) + inputParametersRegex = regexp.MustCompile(`^([a-zA-Z0-9-_]+=[a-zA-Z0-9-_,]+)(&[a-zA-Z0-9-_]+=[a-zA-Z0-9-_,"\[\]]+)*$`) E_BAD_KEY = errors.New("bad component configuration key format") ) diff --git a/configuration/componentcfg/query_test.go b/configuration/componentcfg/query_test.go index d273f60c..e11fe30e 100644 --- a/configuration/componentcfg/query_test.go +++ b/configuration/componentcfg/query_test.go @@ -203,7 +203,7 @@ var _ = Describe("query", func() { When("creating new valid query parameters", func() { BeforeEach(func() { - q, err = componentcfg.NewQueryParameters("process=true&a=aaa&b=123&C_D3=C,C,C") + q, err = componentcfg.NewQueryParameters("process=true&a=aaa&b=123&C_D3=C,C,C&detectors=[\"MCH\",\"MID\"]") }) It("should be parsed without reporting errors", func() { Expect(err).To(BeNil()) @@ -215,6 +215,7 @@ var _ = Describe("query", func() { Expect(q.VarStack["a"]).To(Equal("aaa")) Expect(q.VarStack["b"]).To(Equal("123")) Expect(q.VarStack["C_D3"]).To(Equal("C,C,C")) + Expect(q.VarStack["detectors"]).To(Equal("[\"MCH\",\"MID\"]")) }) })