MCPcopy Create free account
hub / github.com/SpectoLabs/hoverfly / Test_SetPACFile_ServerError

Function Test_SetPACFile_ServerError

hoverctl/wrapper/pac_test.go:49–85  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

47}
48
49func 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}

Callers

nothing calls this directly

Calls 3

SetPACFileFunction · 0.85
DeleteSimulationMethod · 0.65
PutSimulationMethod · 0.65

Tested by

no test coverage detected