(t *testing.T)
| 9 | ) |
| 10 | |
| 11 | func Test_SetPACFile_CanSetPACFile(t *testing.T) { |
| 12 | RegisterTestingT(t) |
| 13 | |
| 14 | hoverfly.DeleteSimulation() |
| 15 | hoverfly.PutSimulation(v2.SimulationViewV5{ |
| 16 | DataViewV5: v2.DataViewV5{ |
| 17 | RequestResponsePairs: []v2.RequestMatcherResponsePairViewV5{ |
| 18 | { |
| 19 | RequestMatcher: v2.RequestMatcherViewV5{ |
| 20 | Method: []v2.MatcherViewV5{ |
| 21 | { |
| 22 | Matcher: matchers.Exact, |
| 23 | Value: "PUT", |
| 24 | }, |
| 25 | }, |
| 26 | Path: []v2.MatcherViewV5{ |
| 27 | { |
| 28 | Matcher: matchers.Exact, |
| 29 | Value: "/api/v2/hoverfly/pac", |
| 30 | }, |
| 31 | }, |
| 32 | }, |
| 33 | Response: v2.ResponseDetailsViewV5{ |
| 34 | Status: 200, |
| 35 | Body: `PACFILE`, |
| 36 | }, |
| 37 | }, |
| 38 | }, |
| 39 | }, |
| 40 | MetaView: v2.MetaView{ |
| 41 | SchemaVersion: "v2", |
| 42 | }, |
| 43 | }) |
| 44 | |
| 45 | err := SetPACFile(target) |
| 46 | Expect(err).To(BeNil()) |
| 47 | } |
| 48 | |
| 49 | func Test_SetPACFile_ServerError(t *testing.T) { |
| 50 | RegisterTestingT(t) |
nothing calls this directly
no test coverage detected