MCPcopy Create free account
hub / github.com/QuantumNous/new-api / setupTaskPluginFactoryDisableTest

Function setupTaskPluginFactoryDisableTest

controller/task_plugin_test.go:132–145  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

130}
131
132func setupTaskPluginFactoryDisableTest(t *testing.T) {
133 t.Helper()
134 setupTaskPluginControllerTest(t)
135 originalMap := common.OptionMap
136 common.OptionMapRWMutex.Lock()
137 common.OptionMap = map[string]string{}
138 common.OptionMapRWMutex.Unlock()
139 t.Cleanup(func() {
140 jsplugin.DefaultRegistry.SetDisabledFactoryKeys(nil)
141 common.OptionMapRWMutex.Lock()
142 common.OptionMap = originalMap
143 common.OptionMapRWMutex.Unlock()
144 })
145}
146
147func postTaskPluginStatus(t *testing.T, key, query, body string) *httptest.ResponseRecorder {
148 t.Helper()

Calls 3

UnlockMethod · 0.80

Tested by

no test coverage detected