Skip to content

Commit

Permalink
Update regex in the tests to allow rc version
Browse files Browse the repository at this point in the history
  • Loading branch information
tommysitu committed Jan 18, 2019
1 parent 6662278 commit b466c57
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions core/hoverfly_service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ func Test_Hoverfly_GetSimulation_ReturnsBlankSimulation_ifThereIsNoData(t *testi
Expect(simulation.GlobalActions.Delays).To(HaveLen(0))

Expect(simulation.MetaView.SchemaVersion).To(Equal("v5"))
Expect(simulation.MetaView.HoverflyVersion).To(MatchRegexp(`v\d+.\d+.\d+`))
Expect(simulation.MetaView.HoverflyVersion).To(MatchRegexp(`v\d+.\d+.\d+(-rc.\d)*`))
Expect(simulation.MetaView.TimeExported).ToNot(BeNil())
}

Expand Down Expand Up @@ -420,7 +420,7 @@ func Test_Hoverfly_GetFilteredSimulation_ReturnBlankSimulation_IfThereIsNoMatch(
Expect(simulation.GlobalActions.DelaysLogNormal).To(HaveLen(0))

Expect(simulation.MetaView.SchemaVersion).To(Equal("v5"))
Expect(simulation.MetaView.HoverflyVersion).To(MatchRegexp(`v\d+.\d+.\d+`))
Expect(simulation.MetaView.HoverflyVersion).To(MatchRegexp(`v\d+.\d+.\d+(-rc.\d)*`))
Expect(simulation.MetaView.TimeExported).ToNot(BeNil())
}

Expand Down
2 changes: 1 addition & 1 deletion functional-tests/core/api/hoverfly_api_v2_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ var _ = Describe("/api/v2/hoverfly", func() {
Expect(hoverflyJson).To(MatchRegexp(`"destination":"."`))
Expect(hoverflyJson).To(MatchRegexp(`"middleware":{"binary":"","script":"","remote":""}`))
Expect(hoverflyJson).To(MatchRegexp(`"usage":{"counters":{"capture":0,"diff":0,"modify":0,"simulate":0,"spy":0,"synthesize":0}}`))
Expect(hoverflyJson).To(MatchRegexp(`"version":"v\d+.\d+.\d+"`))
Expect(hoverflyJson).To(MatchRegexp(`"version":"v\d+.\d+.\d+(-rc.\d)*"`))
Expect(hoverflyJson).To(MatchRegexp(`"upstreamProxy":""`))
Expect(hoverflyJson).To(MatchRegexp(`"mode":"simulate","arguments":{"matchingStrategy":"strongest"}`))
})
Expand Down
2 changes: 1 addition & 1 deletion functional-tests/core/api/version_api_v2_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ var _ = Describe("/api/v2/hoverfly/version", func() {
Expect(res.StatusCode).To(Equal(200))
modeJson, err := ioutil.ReadAll(res.Body)
Expect(err).To(BeNil())
Expect(string(modeJson)).To(MatchRegexp(`{"version":"v\d+.\d+.\d+"}`))
Expect(string(modeJson)).To(MatchRegexp(`{"version":"v\d+.\d+.\d+(-rc.\d)*"}`))
})
})
})
2 changes: 1 addition & 1 deletion functional-tests/hoverctl/import_export_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ var _ = Describe("When I use hoverctl", func() {

hoverflySimulation = `"pairs":[{"request":{"path":[{"matcher":"exact","value":"/api/bookings"}],"method":[{"matcher":"exact","value":"POST"}],"destination":[{"matcher":"exact","value":"www.my-test.com"}],"scheme":[{"matcher":"exact","value":"http"}],"body":[{"matcher":"exact","value":"{\"flightId\": \"1\"}"}],"headers":{"Content-Type":[{"matcher":"exact","value":"application/json"}]}},"response":{"status":201,"body":"","encodedBody":false,"headers":{"Location":["http://localhost/api/bookings/1"]},"templated":false}}],"globalActions":{"delays":[],"delaysLogNormal":[]}}`

hoverflyMeta = `"meta":{"schemaVersion":"v5","hoverflyVersion":"v\d+.\d+.\d+","timeExported":`
hoverflyMeta = `"meta":{"schemaVersion":"v5","hoverflyVersion":"v\d+.\d+.\d+(-rc.\d)*","timeExported":`
)

Describe("with a running hoverfly", func() {
Expand Down

0 comments on commit b466c57

Please sign in to comment.