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

Function setupTaskPluginFactoryDisableTest

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

Source from the content-addressed store, hash-verified

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

Calls 3

UnlockMethod · 0.80

Tested by

no test coverage detected