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

Function setupTaskPluginFactoryDisableTest

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

Source from the content-addressed store, hash-verified

150}
151
152func setupTaskPluginFactoryDisableTest(t *testing.T) {
153 t.Helper()
154 setupTaskPluginControllerTest(t)
155 originalMap := common.OptionMap
156 common.OptionMapRWMutex.Lock()
157 common.OptionMap = map[string]string{}
158 common.OptionMapRWMutex.Unlock()
159 t.Cleanup(func() {
160 jsplugin.DefaultRegistry.SetDisabledFactoryKeys(nil)
161 common.OptionMapRWMutex.Lock()
162 common.OptionMap = originalMap
163 common.OptionMapRWMutex.Unlock()
164 })
165}
166
167func postTaskPluginStatus(t *testing.T, key, query, body string) *httptest.ResponseRecorder {
168 t.Helper()

Calls 3

UnlockMethod · 0.80

Tested by

no test coverage detected