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

Function Test_SetPACFile_CanSetPACFile

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

Source from the content-addressed store, hash-verified

9)
10
11func 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
49func Test_SetPACFile_ServerError(t *testing.T) {
50 RegisterTestingT(t)

Callers

nothing calls this directly

Calls 3

SetPACFileFunction · 0.85
DeleteSimulationMethod · 0.65
PutSimulationMethod · 0.65

Tested by

no test coverage detected