MCPcopy Index your code
hub / github.com/SpectoLabs/hoverfly / TestGetNewHoverflyCheckConfig

Function TestGetNewHoverflyCheckConfig

core/hoverfly_test.go:83–100  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

81}
82
83func TestGetNewHoverflyCheckConfig(t *testing.T) {
84 RegisterTestingT(t)
85
86 cfg := InitSettings()
87
88 db := cache.GetDB("testing2.db")
89 requestCache := cache.NewDefaultLRUCache()
90 tokenCache := cache.NewBoltDBCache(db, []byte("tokenBucket"))
91 userCache := cache.NewBoltDBCache(db, []byte("userBucket"))
92 backend := backends.NewCacheBasedAuthBackend(tokenCache, userCache)
93
94 unit := GetNewHoverfly(cfg, requestCache, backend)
95
96 Expect(unit.Cfg).To(Equal(cfg))
97
98 // deleting this database
99 os.Remove("testing2.db")
100}
101
102func Test_NewHoverflyWithConfiguration(t *testing.T) {
103 RegisterTestingT(t)

Callers

nothing calls this directly

Calls 7

GetDBFunction · 0.92
NewDefaultLRUCacheFunction · 0.92
NewBoltDBCacheFunction · 0.92
NewCacheBasedAuthBackendFunction · 0.92
InitSettingsFunction · 0.85
GetNewHoverflyFunction · 0.85
RemoveMethod · 0.80

Tested by

no test coverage detected