(t *testing.T)
| 47 | } |
| 48 | |
| 49 | func Test_SetPACFile_ServerError(t *testing.T) { |
| 50 | RegisterTestingT(t) |
| 51 | |
| 52 | hoverfly.DeleteSimulation() |
| 53 | hoverfly.PutSimulation(v2.SimulationViewV5{ |
| 54 | DataViewV5: v2.DataViewV5{ |
| 55 | RequestResponsePairs: []v2.RequestMatcherResponsePairViewV5{ |
| 56 | { |
| 57 | RequestMatcher: v2.RequestMatcherViewV5{ |
| 58 | Method: []v2.MatcherViewV5{ |
| 59 | { |
| 60 | Matcher: matchers.Exact, |
| 61 | Value: "PUT", |
| 62 | }, |
| 63 | }, |
| 64 | Path: []v2.MatcherViewV5{ |
| 65 | { |
| 66 | Matcher: matchers.Exact, |
| 67 | Value: "/api/v2/hoverfly/pac", |
| 68 | }, |
| 69 | }, |
| 70 | }, |
| 71 | Response: v2.ResponseDetailsViewV5{ |
| 72 | Status: 400, |
| 73 | Body: `PACFILE`, |
| 74 | }, |
| 75 | }, |
| 76 | }, |
| 77 | }, |
| 78 | MetaView: v2.MetaView{ |
| 79 | SchemaVersion: "v2", |
| 80 | }, |
| 81 | }) |
| 82 | |
| 83 | err := SetPACFile(target) |
| 84 | Expect(err).To(Not(BeNil())) |
| 85 | } |
nothing calls this directly
no test coverage detected